The MGF1302 is a low noise GaAs FET designed for S band to X band amplifiers, and was very popular in ham equipment until the arrival of pHEMT devices.

An important characteristic of the MGF1302 is that matching the input circuit for maximum gain (maximum power transfer) does not achieve the best Noise Figure… and since low noise is the objective, then we must design for that.

The datasheet contains a set of Γ_{opt} for the source impedance seen by the device gate, and interpolating for 1296MHz Γ_{opt}=0.73∠-10.5°.

Lets convert Γ_{opt} to some other useful values.

The equivalent source Z, Y and rectangular form of Γ_{opt}= will be convenient during the circuit design phase.

The other important characteristic is Zin of the gate in the final circuit configuration, and that is derived from a model of the device in circuit. The value is 7.8-j164Ω. At low frequencies, the FET gate looks like an extremely high impedance, at higher frequencies more like tiny capacitance with very low equivalent series resistance (ESR), and still higher frequencies the capacitive reactance is lower and ESR higher, and still higher frequencies lead inductance comes into play and the gate looks inductive with even higher ESR.

A model of the antenna to gate circuit was built in SimSmith v16.9.

Above, the SimSmith model which includes a swept length of LDF4-50A transmission line.

The standard display was supplemented with impedance, admittance and Γ looking from the gate back towards the antenna. These make it easier to adjust the L and C components for the desired outcome. The G component of Y is most sensitive to adjustment of L and the B component to adjustment of C. So, they are both adjusted to approximately obtain Γ_{opt}=0.7178-j0.1330 from the conversions done earlier.

A sweep is shown for power from the source (antenna) and power into the FET gate for a range for transmission line lengths. Whilst loss between antenna and gate may seem high, the LNA delivers around NF<1dB and 13dB of gain from its input terminal (ie looking into L1) to output despite the lack of conjugate matching.

The behavior demonstrates the complex interaction of source, transmission line and load… worth studying.

The discussion is about a low noise receiving system where optimal results come from an input circuit that is not designed for maximum power transfer.

]]>Jacobi’s law (also known as Jacobi’s Maximum Power Transfer Theorem) of nearly 200 years ago stated

Maximum power is transferred when the internal resistance of the source equals the resistance of the load.

Implied is that the internal resistance of the source is held constant, it does not work otherwise. The source must be one that can validly be represented by a Thevenin equivalent circuit. This was in the very early days of harnessing electric current, direct current initially.

Later adaptation dealt with alternating current and it became

Maximum power is transferred when the load impedance is equal to the complex conjugate of the internal impedance of the source.

Again a necessary condition is that the source must be one that can validly be represented by a Thevenin equivalent circuit.

It is one of the principles of basic circuit theory / analysis and the mathematical proof is something a high school student should be able to perform.

So, if you have a transmitter with a known Thevenin equivalent source impedance, you can seek to provide a load that ensures maximum power transfer.

The practical problem is that it is quite difficult to control the equivalent source impedance of a high power transmitter so that it is a known constant over the entire range of transmitter output power, frequencies etc. So for many purposes, source impedance is not controlled, and the transmitter cannot be validly represented by a Thevenin equivalent circuit, and as a result, the Jacobi Maximum Power Transfer Theorem does not apply.

Do not be confused about transmitter specifications, a requirement that the transmitter load impedance be some value (eg 50Ω) is not specification of a Thevenin equivalent source impedance.

Very few ham transmitters have a controlled equivalent source impedance. Though some claim to have proven by one or few measurements that it is 50Ω, many other valid experiments have shown otherwise and it takes only one valid experiment to disprove the claim.

For the most part, calculations and other claims of mismatch loss in transmitter / antenna systems are misguided, popular but misguided.

The objective with most high powered transmitters is to provide them with a load impedance at their output terminals that complies with the design requirements as embodied in published specifications so as to safely obtain stability, rated power and rated distortion performance.

The obsession with conjugate matching is mostly with the many hams who are devotees of Walt Maxwell’s teachings.

A little knowledge is a dangerous thing; read widely and think.

]]>After a lot of testing, it came time to try it on some target work.

Above is a scrap Jiffy box and the milling job is to cut holes for three pushbuttons (tactile momentary switches on a veroboard base with 10mm caps) and the holes for M3 screws and pillars.

The whole job took 40s, most of it was moves rather that cutting, it took a second or two to cut each of the large holes.

Waiting on some accessories, like a vice to hold these boxes and a edge finder for rapid and accurate indexing.

Capability to mill a box for an LCD opening and three or four momentary buttons opens up a lot of possibilities for controls for a range of microcontroller projects.

Above is an example set of buttons topside, and below the underside.

In this case the screw pillars are 0.05″ offset from the button centres. One could rotate the switches to align the centres but at the expense of a wider assembly which will not fit two of the small boxes I use.

I have not broken any records here… I think I started this project in June (over 4 months ago).

]]>Walt Maxwell (W2DU) made much of conjugate matching in antenna systems, he wrote of his volume in the preface to (Maxwell 2001 24.5):

It explains in great detail how the antenna tuner at the input terminals of the feed line provides a conjugate match at the antenna terminals, and tunes a non-resonant antenna to resonance while also providing an impedance match for the output of the transceiver.

Walt Maxwell made much of conjugate matching, and wrote often of it as though at some optimal adjustment of an ATU there was a system wide state of conjugate match conferred, that at each and every point in an antenna system the impedance looking towards the source was the conjugate of the impedance looking towards the load.

This is popularly held to be some nirvana, a heavenly state where transmitters are “happy” and all is good. Happiness of transmitters is often given in online discussion by hams as the raison d’être for ATUs, anthropomorphism over science.

(Maxwell 2001 24.5) states

To expand on this definition, conjugate match means that if in one direction from a junction the impedance has the dimensions R + jX, then in the opposite direction the impedance will have the dimensions R − jX. Further paraphrasing of the theorem, when a conjugate match is accomplished at any of the junctions in the system, any reactance appearing at any junction is canceled by an equal and opposite reactance, which also includes any reactance appearing in the load, such as a non-resonant antenna. This reactance cancellation results in a net system reactance of zero, establishing resonance in the entire system. In this resonant condition the source delivers its maximum available power to the load. …(1)

Let us look at a very simple example in SimSmith.

The scenario is:

- a Thevenin source at 1MHz with a source impedance of 50+j0Ω;
- a nominal half wave of RG59 transmission line; and
- an adjustable load impedance.

This should not be taken to imply that ham transmitters are commonly well represented as a Thevenin source.

The load impedance has been adjusted for a nearly perfect match at the source.

Above is the SimSmith model. The load R and X were adjusted for extremely low |Γ| at the source. |Γ| at the source is extremely low (0.0000173), Return Loss is 95dB, this is a match better than instruments could ever measure. We have achieved an almost perfect conjugate match at the interface between source and T1.

So let us now examine the impedance looking both ways at the load to T1 interface.

SimSmith has an internal feature to calculate the impedance looking backwards into an element, and it is used to calculate the impedance looking back from the load into element L. It is shown under the generator element as L_revZ.

So at the load to T1 interface:

- Z looking into the load is 38.75+j1.813Ω; and
- Z looking into T1 is 58.43-j1.534Ω.

They are not conjugates of each other, not nearly, in fact the mismatch is characterised by Return Loss (in terms of the load Z) is just 14dB (or VSWR=1.5).

In this very simple configuration, a near perfect match at the source does not result in a similar quality match at the other node in the system.

(Maxwell 2001 24.5) relies on a quotation:

If a group of four-terminal networks containing only pure reactances (or lossless lines) are arranged in tandem to connect a source to its load, then if at any junction there is a conjugate match of impedances, there will be a conjugate match of impedances at every other junction in the system. (Everitt 1937 243) and (Everitt and Anner 1956 407)

The problem is that Maxwell silently dropped from his statement (1) above the requirement that networks and lines must be lossless, and the example calculated here shows that Maxwell’s proposition does not apply to real world networks that have loss.

Recourse to simple linear circuit analysis will reveal that lossy networks do not have the property Everitt ascribed to lossless networks.

Walt Maxwell’s conjugate mirror

does not apply in the real world, and the concept is of limited use in understanding real world antenna systems.

When you see people sprouting the Walt’s conjugate mirror

you can expect that they have not read widely or thought about the subject much.

- Duffy, O. Mar 2013. The failure of lossless line analysis in the real world. VK1OD.net (offline).
- Everitt, W L. 1937 Communications Engineering, 2nd ed. New York: McGraw-Hill Book Co.
- Everitt, W L, and Anner, G E. 1956 Communications Engineering, 3rd ed. New York: McGraw-Hill Book Co.
- Maxwell, Walter M. 2001. Reflections II. Sacramento: Worldradio books.

]]>

…so you are telling me that I could measure this Prev>Pfwd with a directional wattmeter like my Bird43… I have never seen it and I don’t believe it.

For clarification, I did not discuss Prev or Pfwd in respect of the three scenarios (other than to say Pref cannot exceed Pfwd).

I did discuss line voltage measurements you can make with a simple RF volt meter

which was in the article’s reference quote. But, let’s discuss what you might measure by inserting a 50Ω Bird43 directional wattmeter in the Load case 2 scenario.

Above is a calculated plot of the expected Pfwd and -Prev readings, Prev is shown negated so you can add it by eye with Pfwd to obtain the net power Power (blue line).

Note that Pref is never greater then Pfwd, there is no implied breach of the law of conservation of energy.

So, what is the implied ρ?

Above is a plot of calculated ‘actual’ ρ and ρ(50), ρ wrt Zo=50+j0Ω, which would be derived from the Bird43 measurements.

The ‘actual’ ρ is a smooth exponential curve, a consequence of transmission line loss. The ρ(50) curve oscillates, and the error is due to the fact that its reference impedance is not the transmission line actual Zo. You will also see that whereas ρ>1.0 at the load, ρ(50) is never greater than 1.0. When Zref is purely real, ρ(Zref)<=1.0.

Even though ρ(50) is not a good estimator of ‘actual’ ρ, the blue Power line in the previous chart is correct.

Further, that given the shape of the blue Power line in the previous chart, it is clear that it cannot be derived from the ‘actual’ ρ line in the second chart, many of the operations based on ρ depend on Zo being purely real (ie a Distortionless Line).

The same response can be expected of any directional wattmeter, VSWR meter, antenna analyser or VNA calibrated for a purely real impedance such a 50+j0Ω.

]]>Most tools and most derivations of SWR will produce negative SWR reports because they are more interested in mathematics than in measurements you can make with a simple RF volt meter.

…, this article explores the expected voltage on a practical transmission line under two mismatch scenarios, voltage that ought be measurable with a simple RF voltmeter.

Textbooks on transmission lines often introduce the concept of standing waves by presenting a plot of voltage along a mismatched lossless transmission line.

Above is a plot of calculated line voltage vs displacement from the load, -ve is towards the source.

In this case the fully developed standing wave pattern repeats identically from load to source because the line is lossless, and in this case the VSWR can easily be calculated as the maximum voltage to the minimum voltage, all the maxima and minima are the same, so VSWR is unambiguously 20:1 or 20.

Drilling down to a more fundamental metric, we can plot the complex reflection coefficient along the line.

Above is a plot of the phase and magnitude of the complex reflection coefficient Γ. Note that the amplitude is constant (0.9048), but the phase varies linearly along the line.

Metrics derived from the magnitude of Γ (|Γ|) such as rho (ρ), Return Loss (-20logρ), and VSWR will be constant along the line… so to speak of any of those quantities is unambiguous, they each apply anywhere along the line.

This is a pure mathematics exercise with no relevance to the real world because lossless lines do not exist in the real world. It is true though that sometimes approximating practical lines as lossless in certain scenarios may be a quite adequate approximation, but approximations do not determine fact.

Let us look at calculated values on a 1λ electrical length of practical transmission line at 100kHz. The choice of frequency is to expose effects that might be difficult to measure at higher frequencies where the loss per wavelength becomes lower.

The model uses Heaviside’s RLGC model for a transmission line, it is a lossy line having non-zero R and G terms. The line Zo has a significant imaginary component.

Load case 1 is a significantly mismatched purely resistive load.

Above is a plot of calculated line voltage vs displacement from the load, -ve is towards the source.

Note the difference to the chart for a lossless line. This is the same load, same nominal Zo, but now a practical lossy line.

A voltage standing wave is evident, as is the effect of line loss. The curve is a composite of an exponential decay in voltage due to line loss and superposed, the the reflected wave voltage which of course is also affected by line loss.

Given the definition of VSWR as the ratio of a voltage maximum to voltage minimum, what would you give as VSWR for this case?

VSWR is often calculated as a property of a point along a line (notwithstanding its definition), and the formula is given in most text books as VSWR=(1+ρ)/(1-ρ), and this would yield a curve for VSWR along the line. Likewise for Return Loss.

Whilst this is a calculated plot, it is the voltage that one would expect to measure along such a line under these source and load conditions. It is not simply a pure mathematics exercise with no relevance to the real world, it is a good mathematical model of the real world transmission line.

Load case 1 is a significantly mismatched load with a dominant imaginary part.

Above is a plot of calculated line voltage vs displacement from the load, -ve is towards the source.

In broad form, the plot is similar to the last, and again we would expect to be able to measure along such a line under these source and load conditions. It is not simply a pure mathematics exercise with no relevance to the real world, it is a good mathematical model of the real world transmission line.

Let’s drill down on Γ.

Above is a plot of the phase and magnitude of the complex reflection coefficient Γ. It is different to the case of the lossless line presented earlier as the magnitude of Γ varies along the line due to line loss.

But wait, look at the magnitude of Γ at the load, it is greater than 1.0. That has not given rise to an unrealistic voltage standing wave as plotted, in fact it is not very different to the purely resistive load case where Γ at the load was less than 1.0.

What is different is that for formula VSWR=f(ρ) will have a singularity where ρ=1 (VSWR=∞), and for ρ>1, calculated VSWR will be negative. Some will insist that this proves that ρ must never equal or exceed 1.0, but the problem is actually that that is a constraint of Distortionless Lines (of which Lossless Lines are a special case).

Another justification often given to argue that ρ must be less than 1.0 is that it implies that reflected power is greater than forward power, violating the law of conservation of energy. Sounds impressive, but it is due to flawed analysis of power on a line with complex Zo.

Some authors insist that negative VSWR is invalid and hide that the underlying conditions gave rise to negative VSWR.

Above is a calculation from the popular SimSmith (v16.9) package. Note that the cursor is at the load which plotted on a Smith chart centred on the complex Zo from the T1 section is outside the outer circle. It is reported in the cursor data, and in the element calculations as having VSWR=39.96. In fact, it is easy to see that ρ>1, and that VSWR should be negative, it has been sanitised / corrupted.

Above is a calculation of various metrics from the scenario Zload and Zo using accepted formulas, and it yields a negative VSWR, a warning that the scenario is one where common Distortionless Line assumptions for ρ, Return Loss, and VSWR are likely to be unsafe.

You might well ask what you can do with a cooked VSWR value, you cannot derive the value of ρ from it (ie there is no inverse function), you are in a fools paradise where you have a nice positive value that means nothing and masquerades as something that it is not.

]]>Above is the system block diagram. The grbl_ESP32 gcode interpeter processes a gcode S (speed) command, converting it to a variable duty cycle PWM waveform on parallel port pin 1.

The first step in that path is quite linear, the graph above shows the relationship between measured PWM duty cycle and requested speed (Sx).

grbl has recently had a facility added for piecewise linearisation of the spindle curve.

This has now been ported to grbl_ESP32 and committed to the master branch by b7ee4265515757c82a732c4b19e3a976ffc39a56 on 20191014.

The documented method is to set grbl_ESP32 up so that spindle speed is configured for a range of 1 to 255 (forcing a 1:1 correspondence between input and PWM value), and to record measured spindle speed for a range of input values.

In my case, I created a gcode file to step through a set of values and dwell for 5s, and the spindle speed was measured with an optical tachometer (UT372) and the observations written to a file.

Above is a plot of measured spindle speed vs PWM value.

The next step is to load those values into a supplied Python scripts which finds a piecewise compensation approximation.

Above is the graphic summary of a 3 section fit.

The script supplies a bunch of program constants that have to be loaded to implement the compensation.

D:\src\Grbl_Esp32\fit>fit_nonlinear_spindle.py CONFIG: N_pieces: 3 PWM_min: 4.0 PWM_max: 196.0 PWM_point1: 8.0 PWM_point2: 12.0 N_data: 46 PWM_set: [ 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 22. 24. 26. 28. 30. 35. 40. 45. 50. 55. 60. 65. 70. 75. 80. 90. 100. 110. 120. 130. 140. 150. 160. 170. 180. 190. 192. 194. 196.] RPM_measured: [ 1423. 2231. 2915. 3481. 3941. 4309. 4591. 4827. 5017. 5204. 5371. 5512. 5651. 5771. 5912. 6031. 6138. 6359. 6572. 6763. 6972. 7184. 7705. 8176. 8671. 9167. 9660. 10167. 10651. 11184. 11690. 12182. 13196. 14210. 15233. 16262. 17324. 18359. 19396. 20429. 21517. 22554. 23685. 23922. 23945. 23944.] SOLUTION: [Update these #define values and uncomment] [ENABLE_PIECEWISE_LINEAR_SPINDLE in config.h.] #define N_PIECES 3 #define RPM_MAX 24149.0 #define RPM_MIN 1552.7 #define RPM_POINT12 4020.2 #define RPM_POINT23 5240.1 #define RPM_LINE_A1 1.621130e-03 #define RPM_LINE_B1 -1.482797e+00 #define RPM_LINE_A2 3.278733e-03 #define RPM_LINE_B2 5.181036e+00 #define RPM_LINE_A3 9.730872e-03 #define RPM_LINE_B3 3.899117e+01 [To operate over full model range, manually write these] ['$' settings or alter values in defaults.h. Grbl will] [operate between min($30,RPM_MAX) and max($31,RPM_MIN)] $30=24149.0 (rpm max) $31=1552.7 (rpm min) [Update the following #define values in cpu_map.h] #define SPINDLE_PWM_MIN_VALUE 4 #define SPINDLE_PWM_MAX_VALUE 196 [1552.7462823692342, 4020.1611749474096, 5240.144531140442, 24149.036632505395] [1552.74628237 616.85372314 304.99583905 102.76571794] [[ 4.71702537e+03 -1.44931297e+03 2.79049481e+02 -2.87569907e-01] [-1.44931297e+03 6.32384871e+02 -2.79049450e+02 2.87570282e-01] [ 2.79049481e+02 -2.79049450e+02 2.43459738e+02 -1.09276718e+00] [-2.87569907e-01 2.87570282e-01 -1.09276718e+00 5.40151890e-02]] [68.68060403 25.14726369 15.60319641 0.23241168]

Above is the output of fit_nonlinear_spindle.py (some additions by me at the end to examine the quality of the fit).

I tweaked some coefficients in fit_nonlinear_spindle.py to improve the model on my data.

PWM_point1 = 8.0 # (S) Point between segments 0 and 1. Used when n_pieces >= 2. PWM_point2 = 12.0 # (S) Point between segments 1 and 2. Used when n_pieces >= 3. PWM_point3 = 100.0 # (S) Point between segments 2 and 3. Used when n_pieces = 4.

The code changes were implemented and tested.

Above, calibration is much more accurate. The blue line has a slope that is very close to 1, and a Y intercept that is very close to zero.

Note that the calibration coefficients used here are specific to the instance, and appropriate coefficients for other instances must be established by measurement as described.

Bart Dring is a responsive developer with whom it was a pleasure to collaborate.

]]>Above is the system block diagram. The grbl_ESP32 gcode interpeter processes a gcode S (speed) command, converting it to a variable duty cycle PWM waveform on parallel port pin 1.

Above, the PWM wave at low duty cycle (period is 200µs).

The first step in that path is quite linear, the graph above shows the relationship between measured PWM duty cycle and requested speed (Sx).

Above, the end to end response is quite non-linear.

A simple method of improving the response is to segment the measured curve into a number of segments where a straight line approximation will be sufficiently accurate.

Above is the plot from about 5000-24000rpm, and a curve fit (equation shown).

The same process was followed to obtain in all three segments.

First step was to make a minimal modification to the existing code to pull in a customer user calculation if such a file exists.

This is the change to the existing spindle_control_cpp to perform a conditional include of the user file spindle_curve.h (if it exists) at a key point in the calculation of the PWM duty cycle.

// Compute intermediate PWM value with linear spindle speed model. // NOTE: A nonlinear model could be installed here, if required, but keep it VERY light-weight. sys.spindle_speed = rpm; #if defined __has_include #if __has_include("spindle_curve.h") #include "spindle_curve.h" #endif #endif pwm_value = floor((rpm-settings.rpm_min)*pwm_gradient) + SPINDLE_PWM_MIN_VALUE; } return(pwm_value);

The next step is a user function that implements compensation of the non linear response as described above.

//optional user customisation of spindle PWM curve //needs consistent settings.rpm_min and settings.rpm_max //use block to make vars private { // static long spdcuri[]={0,24000,1000000}; // static float spdcurm[]={0,1,0}; // static long spdcurb[]={0,0,24000}; static long spdcuri[]={1000,3360,5760,24000,1000000}; static float spdcurm[]={0,0.1412,0.325,0.8872 ,0}; static float spdcurb[]={0,1013,382,-2592,24000}; int i; for(i=0;i<sizeof(spdcuri)/sizeof(spdcuri[0]);i++){ if(rpm<spdcuri[i]){ rpm=spdcurm[i]*rpm+spdcurb[i]; break; } } }

The code changes were implemented and tested. They work quite well, though at very low rpm the VFD drive calibration appears a bit unstable. Notwithstanding that, calibration is quite good from about 1500-24000rpm.

Note that the calibration coefficients used here are specific to the instance, and appropriate coefficients for other instances must be established by measurement as described.

]]>The screenshot above demonstrates its use where the DUT and Att_{12} are cryogenically cooled.

For most applications, the default value of 290K is appropriate, so though the form has a few more fields, there isn’t more data entry for most usage.

The calcs have not changed, just replacement of a global T_{att} with T for each instance. The input form and output form have been reformatted to suit.

]]>

## Effective Bandwidth

The contribution to the available output noise by the Johnson-noise sources in the signal generator is readily calculated for and ideal or square-top band-pass characteristic and it is GKTB where B is the bandwidth in cycles per second. In practice, however, the band is not flat; ie, the gain over the band is not constant but varies with frequency. In this case the total contribution is ∫G

_{f}KTdf where G_{f}is the gain at frequency f. The effective bandwidth B of the network is defined as the bandwidth of an ideal band-pass network with gain G that gives this contribution to the noise output.

Above is the response of the ‘factory’ 2400Hz soft filter in an IC-7300 (SDR) transceiver. It is not an ideal rectangular response.

To perform the calculation described by Friis, ∫G_{f}KTdf, we firstly need a G(f) dataset. The above plot is of the log of G(f) and to perform geometric operations to find the area under the curve is quite misguided.

Above is a plot of G(f) (measured with Gaussian noise integrated over a period), and we can find ∫G_{f}KTdf wrt G at some reference frequency (1kHz in the above example as that is what is used for sensitivity measurement).

In this case the filter -6dB response is 377-2616Hz=2239Hz, and Effective Bandwidth wrt gain at 1kHz is 2077Hz.

In my own articles and software I usually refer to this as the Effective Noise Bandwidth (ENB) to be clearer.

ARRL to be different refer to Equivalent Rectangular Bandwidth but they do not expose how they calculate it (it is a hammy thing).

The term Equivalent Noise Bandwidth is sometimes used.

- Friis, HT. Noise figures of radio receivers. Proceedings of the IRE, Jul 1944 p420.