Wednesday, December 16, 2015

Antenna Auto-Tuner Design, Part 8: Build, Phase 2: Match-Detection Integration

I've finally found some time to devote to my automatic antenna tuner build, and I've just finished incorporating the Match-Detection circuitry into it.  (The previous post in this series can be found here:  http://k6jca.blogspot.com/2015/09/antenna-auto-tuner-design-part-7-build.html).

Originally I had planned to incorporate four different Match Detection functions.  These functions were to be:
  1. Return Loss (SWR) Detector
  2. R Detector
  3. G Detector
  4. Phase Detector
(As discussed here and here).

But as I proceeded with this latest phase of the build I discovered I was space-constrained within the tuner's chassis (besides being timed constrained, too), and that it would be difficult to fit into the chassis all of the circuitry I had hoped to install.  So I decided to limit the detectors to a single one:  the Return Loss (SWR) Detector.  The design and installation of this detector is described below.

I've broken this design into two schematics.  The first schematic describes the Directional Coupler, including the two AD8307 Log-Amp Detectors which convert the Directional Coupler's output voltages into voltages that correspond to power in decibel form.

The second schematic describes the circuitry used to calculate Return Loss and which also provides outputs for driving an analog panel meter as well as a microprocessor with A/D inputs (I hope to describe the incorporation of this processor in the next blog post).

Let's take a look at these two schematics. First, the Directional Coupler...


Schematic, Directional Coupler:

(Click on image to enlarge)

Notes on the Directional Coupler Schematic:

I originally described my proposed Directional Coupler design in this post:  http://k6jca.blogspot.com/2015/07/antenna-auto-tuner-design-part-5.html

But since writing that post, I've made two changes to the proposed design:
  1. The current-sense transformer and voltage-sense transformers now use differently sized cores.
  2. The turns-ratio of each transformer is now 24, not 25
1.  Core Size:

I chose to use cores of different sizes because there is no reason why the current-sense transformer should be the same size as the voltage-sense transformer.  The Flux Density within the current-sense transformer is much less than the voltage-sense transformer's Flux Density, as I show in this spreadsheet:

(Click on image to enlarge)

Regarding the calculations used for the spreadsheet above: I use the formula for B, Flux Density, shown below:



The voltage across the driven-winding (the 1-turn primary) of the current-sense transformer is equal to the current through this winding times the resistance represented by the secondary's load (25 ohms) reflected into the primary (25/N^2), assuming that this reflected-resistance is much smaller than the primary winding's reactance.  In other words, Vprimary = I*(25/N^2) and thus (per equation B1, above), B = [I*(25/N^2)]*10^8/(4.44*f*Ae) -- note that because we are measuring across the single-turn primary winding, the "N" term in equation B1's denominator is 1.

Thus, even with an anticipated peak current of 8 Amps, the voltage across the current-sense transformer's primary and thus the Flux Density within the core is very small and well within the specification of a smaller FT50-43 core.

Note that the same flux-density could also be calculated with respect to the secondary's voltage (rather than the primary's voltage).  The voltage across the N-turn secondary is the secondary's current times its 25 ohm load. That is, Vsecondary = (I/N)*25, where I is the current through the primary winding and N is the turns-ratio.

If we then substitute Vsecondary into equation for flux-density (equation B1), the result is:  B = (I/N)*25*10^8/(4.44*f*N*Ae) -- note that the N in the denominator is no longer 1, as it was two paragraphs earlier.  N is now the number of turns in the secondary winding.

If we rearrange terms in this equation the result is:  B =  [I*(25/N^2)]*10^8/(4.44*f*Ae).  In other words, this equation, derived with respect to the transformer's secondary voltage, is the same equation that we derived two paragraphs earlier for flux density with respect to the transformer's  primary voltage.

As I mentioned earlier, the flux-density within the current-sense transformer's core is well within the specification of an FT50-43 core.  On the other hand, the voltage-sense transformer has a significantly higher voltage across its N-turn winding and thus a significant higher flux density, and so it uses a larger 2643625002 core (that I had in my junkbox).

Note:  Many designs using the Tandem Match Directional Coupler topology use identical cores for both Voltage and Current sensing transformers.  They needn't (as I've demonstrated above), and if a design is space-constrained (or cost constrained), a smaller core can be used for the current-sense transformer.

2.  Turns-ratio:

My original plan was to use 25 turns on each coil, but when I wound my first transformer I discovered that I had cut the wire slightly too short and I only had enough wire to wind 24 turns around the core.  Rather than rewind the core, I decided that 24 turns was good enough -- its Coupling Factor is 27.6, which is only 0.4 dB less than 28 dB (the Coupling Factor if the turns-ratio were 25, not 24).

3.  AD8307, Return Loss, and non-Simultaneity:

Why use AD8307 Log-amp detectors rather than just rectify the Directional Coupler's Forward and Reflected port voltages and amplify/buffer them with op-amps?

Two reasons.  The first is convenience.

I wanted to have some way to measure and display load-mismatch before I incorporated a microprocessor into the design.  I had used the AD8307 IC previously (here), and I knew that two AD8307 ICs would make this mismatch-measurement task easy -- they would convert the Directional Coupler's voltages into decibel form, from which Return Loss (which is related to SWR) could be calculated by simply subtracting the Reflected-path's AD8307 output from the output of the Forward-path's AD8307 output.

This Return Loss measurement would be accurate over a wide range of power (sub-watt to a kilowatt, in my design) without any need for additional pot tweaking if the input power changed.

And the second reason for this choice is my concern over A/D sampling methodology...

Over the years I've collected a number of commercial ham radio auto-tuners utilizing relay-switch components and controlled by microprocessors.  Most of them are gathering dust on a closet shelf because, when I used them, I noticed at times an inability to achieve a good match, even though one was available.

I've assumed this problem was due to microprocessor sampling, specifically that the micro was sampling and converting the Forward and Reverse voltages sequentially, rather than simultaneously.

Why might sequential sampling be a problem?

Suppose that the power level into the Tuner was fluctuating during these measurements (perhaps due to PA ALC action caused by load impedance variation (as the tuner tunes), or perhaps due to voice transients, or perhaps due to some other reason), then, if the power level changed between the measurement of the Forward voltage and the measurement of the Reflected voltage, the microprocessor's SWR calculation could be incorrect.

And if the SWR calculation was incorrect, it was possible, too, that the tuned-to setting was incorrect and perhaps sub-optimal. 

Of course, the severity of this potential error is a function the time delay between sequential samples as well as the input-power's rate-of-change.

Could either of these be large enough to be an issue?  I didn't, and don't, know.  But just in case they were, by calculating Return Loss (or SWR) externally and then feeding that result into a single A/D, rather than calculating Return Loss or SWR from two sequentially-sampled A/D values, the possibility of there being a problem (be that problem real or imaginary) was eliminated.

OK, let's continue...

4.AD8307 input range and PI attenuator:


From the its datasheet, here is a graph of the AD8307's output voltage versus input power:

(Click on image to enlarge)

As you can see, the transfer characteristic becomes noticeably non-linear above +15 dBm and below about -68 dBm.  So (in my opinion), a reasonable range of operation (with a bit of headroom) would be between -60 and +10 dBm.

I've specified the maximum power that this tuner should see as being 800 watts, but for the purposes of determining the input-range of the AD8307 ICs let's assume that it's 60 dBm (1 KW).

Therefore I will need 50 dB of attenuation to bring a 60 dBm signal down to my desired AD8307 maximum input level of +10 dBm.

Given that the 24-turn transformers have a Coupling Factor of 27.6 dB, I will need an additional 22.4 dB of attenuation (it doesn't need to be exactly 22.4 dB -- somewhere in the ballpark of that value will be fine -- I've designed in plenty of headroom).

So I've terminated each output of the Directional Coupler with a 50-ohm 22 dB PI-network attenuator.  Implemented with standard 1% resistor values (59 and 316 ohms) and taking into account the AD8307's input resistance of 1.5K ohms, the actual attenuation is 22.2 dB, and its input Return Loss is 50 dB.  (PI Network calculator here:  http://chemandy.com/calculators/matching-pi-attenuator-calculator.htm).

For power-dissipation calculations the maximum average power applied to the tuner is assumed to be 200 watts.  This power level is attenuated by the Directional Coupler's Coupling Factor (27.6dB) prior to being applied to the PI attenuators, which means that the maximum average power applied to a PI attenuator would be 0.35 watts.

Most of this 0.35 watts would be dissipated by the PI attenuator's first shunt resistor, so I've implemented this resistor with two 118 ohm 1/4-watt resistors connected in parallel.

5.  AD8307 Circuit:

The AD8307 circuitry is essentially the same circuit shown in the datasheet.  I have not incorporated the Intercept and Gain pots, preferring to do these functions in the Return Loss Calculator circuitry (described later in this post).

One AD8307 converts the Forward Power from the Directional Coupler to a decibel-related voltage.  The second AD8307 does the same for the Reflected Power.

The two AD8307 ICs are in their own shielded compartment with 0.1uF caps (and feed-thru caps) at the output and power pins of these two ICs to reduce the chances of external RF fields affecting performance in unwanted ways.

Note that the second shunt resistor of each PI attenuator is also installed in this compartment.

The AD8307 outputs have a transfer characteristic of about 25mV per dB of applied power, with a DC offset (when no RF is applied) of (very) roughly 0.28 VDC.


Schematic, Return Loss Calculator:

(Click on image to enlarge)

Notes on the Return Loss Calculator Schematic:
(Important note:  there was a design error in the original schematic that I posted here (Rev. X).  The schematic above is the corrected schematic, and its revision-level is now Rev. A1.  Please see Post 9 in this series for a description of the error and an explanation of the fix).
1.  Return Loss relation to SWR

The AD8307 output voltages represent, in dB form, the power applied to their inputs.  And thus Return Loss can be calculated via a simple subtraction, implemented with a single op-amp:


where Pi(dBm) is the output of the Forward path AD8307 and Pr(dBm) is the output of the Reflected path AD8307 (equation copied from Wikipedia).

SWR is related to Return Loss by this equation:


Not a simple relationship, but knowing this equation, if I'm using an analog panel meter to aid me in tuning, and if this meter's full-scale represents 30dB return loss (i.e. only 0.1% of the applied power is reflected back -- a very good match!), then I can easily mark the meter's scale per the following table:

(Click on image to enlarge)

A note on Return Loss meter orientation:  when tuning an antenna tuner using a Return Loss meter, the goal is to peak the Return Loss reading, which will then correspond to minimum SWR.  But I've been adjusting tuners for decades by dipping SWR meters for minimum SWR, so the Return Loss adjustment method of peaking the reading seems awkward to me.

A simple solution (it seems to me) is to install the Return Loss meter upside-down.  So, in my tuner, a Return Loss of 0 (infinite SWR) corresponds to the meter's needle at the top of the meter (undeflected).  And when the tuner has been tuned for a 1:1 match, the needle will deflect to its full-scale reading at the bottom of the meter's scale -- thus one dips the meter for best SWR!

(Click on image to enlarge)

2.  VF and VR circuits:

One of my goals is to incorporate a processor with A/D inputs (PIC or Arduino) to perform the automatic tuning, and I thought it would be nice to use the processor to calculate and display Forward Power using the AD8307 VF signal (and perhaps calculate and display Reflected Power using VR).

Assuming the processor A/D is referenced to its VDD pin (+5VDC), I'd like to have 4.5VDC represent the maximum applied power of +60 dBm (to give me a bit of headroom).

Also, I would like the range of Forward Power represented by VF to be, at a minimum, from 1 watt (30 dBm) to 1 KW (60 dBm).  Plus, if I'm measuring a 30 dB Return Loss when Forward Power is 1 watt, then the Reflected Power will be 1 milliwatt (0 dBm). And so VR must be just at least 0V when the Reflected Power is 0 dBm.

So, VF and VR, in spanning the range from 0 to 4.5 volts, must represent, at a minimum, a power range of 0 to 60 dBm.

If the AD8307's transfer function is 25 mV per dB, then multiplying this value by 3 would result in a transfer function of 75 mV per dB, which would give us a 60 dB span over the voltage range from 0 to 4.5 volts.

But why not have a bit more range?  If I multiply the AD8307's transfer function by 2 instead of 3, I will change the transfer function to 50 mV per dB (500 mV per 10 dB).  Assuming a 10-bit ADC referenced to 5 VDC, measurement resolution would be about 0.1 dB, which would be perfectly fine in this application.

And note that at 50 mV per dB, 0 to 4.5V will represent a 90 dB span, so I could accurately measure power and Return Loss at powers well below 1 watt.  (Theoretically, this would put the lower Forward Power limit for accurate Return Loss measurements at 0 dBm (1 milliwatt), but as I'll discuss below, the AD8307's specifications result, in this application, in a practical lower limit of +10 dBm Forward Power for accurate measurements).

Op-amps U1A and U1B, configured as non-inverting amplifiers with gains of 2, perform this amplification.  And by connecting the AD8307 outputs directly to their non-inverting inputs, I avoid any unnecessary loading of the AD8307 outputs that might affect their gain.

Potentiometers R11 and R12 create a DC shift so that, when calibrated, +4.5V represents +60dBm.  U11B and U11C isolate these two pots from being included in the gain-equations of the U1A and U1D feedback networks, so that adjusting R11 and R12 won't also change the path gain.

The voltages at U1.7 and U1.8 should be about 0.75 VDC when R11 and R12 are centered.  I then adjust R11 and R12 so that, for a +10 dBm signal applied to the Directional Coupler, VF (or VR) measures 2.00 VDC.

3.  Return Loss Circuit:

U2 performs two functions.  It subtracts VR from VF to create the Return Loss measurement, and it also multiplies this result by 3.

The scaling factor of 3 was chosen so that a measurement of 30 dB of Return Loss would be equal to 4.5V at VRL (VRL is the Return Loss signal that would drive a processor A/D input).  In other words, given the transfer characteristic of VF and VR of 50 mV per dB, I'd like the Return Loss transfer characteristic to be 150 mV per dB.

U2 also drives an analog panel meter so that I can use the tuner without having a processor installed.  The meter is 1 mA full-scale, and R19 adjusts the current through the meter so that 4.5V at VRL results in 1mA through the meter.  Thus, the meter would read 30 dB of Return Loss when deflected to its full scale.

R24 compensates for differences in path-gain between the Forward and Reflected paths.  Because it is in the attenuator network attached to U2's non-inverting input, it adjusts the gain of the Forward path (the gain of the Reflected path being fixed).

But there's a potential problem -- changing the gain at this point also changes, in effect, VF's DC offset as seen at U2's non-inverting input.  And because this change in DC offset at U2 is occurring simultaneously with a change in the Forward path gain at U2, these two changes become inextricably intertwined, and I don't know by how much I should adjust R11 to compensate for this change in offset.

The net effect is that VRL could be shifted slightly either higher or lower by a constant amount.  And thus Return Loss could be shifted, too, to be either higher or lower than it should be.


If the shift is small, this shouldn't be a big deal.  But it could become a problem for larger shifts, depending upon how accurate one wants the Return Loss measurement to be.

Fortunately, in my "one-off" build, the transfer characteristics of the two AD8307 ICs are essentially identical at 25 mV per dB and so adjusting U2's gain via R24 should be fine in this application -- I'm essentially just setting the gains of each of U2's "legs" to be equal.  But in hindsight I would have approached path-gain compensation differently.

For example, I probably would have made U2's gain fixed, without any pots (and using 1% resistors) and instead had separate gain adjustments earlier in the Forward path and the Reflected path.  Pots could have been placed at the outputs of the AD8307 ICs (per the datasheet), for example, or in the feedback networks of U1A and U1D.

But that's hindsight.

4.  Other notes:

0.1 uF caps are sprinkled liberally throughout the circuit and especially at any connector to which a cable might attach, thus bypassing these connectors to ground to (hopefully) prevent external RF fields that might couple into the wiring from affecting circuit operation.

I've inserted 100 ohm resistors between op-amp outputs and 0.1uF bypass caps (where these are used) to "isolate" the op-amp's output (and feedback network) from the capacitive load and thus isolate this load's effect on the overall amplifier phase-response and stability.  (More info on this here (Analog Devices), here (TI), and here (Microchip)). (Unfortunately, TI doesn't spec the output impedance of the LMC660 series, so it's difficult to judge what the effect actually is.  However, per my bench measurements, stability seems fine).

I also roll-off the U2's response with C9 and C10, placing a pole at about 5 KHz  -- there's no reason why this op amp needs a wide bandwidth.

OK, I believe I've covered the schematics.  On to the build...


Build, Directional Coupler:

The Directional Coupler started out as a prototype on a piece of PCB stock that would fit within the Tuner on the existing Capacitor-select board.  I tried some different orientations for the two transformers, such as orthogonal to each-other, but Directivity was only about 20 dB, so I went back to the implementation I'd used in this post: http://k6jca.blogspot.com/2015/01/building-hf-directional-coupler.html, which was:


I changed the current-sense transformer's core size (see discussion above) and bread-boarded the circuit:


Measuring Directivity:

With the implementation shown above Directivity measure 45 dB or better from 1 to 30 MHz.  But when I added additional compartment shielding and the 22 dB PI attenuators, worst-case Directivity dropped from 45 dB to 35 dB:


Note that the 30 MHz marker in the image above shows 85 dB of attenuation.  But we need to factor out 50 dB of attenuation (27.6 dB coupling factor plus the PI Attenuator's 22.2 dB of attenuation).  The result is 35 dB of attenuation, which represents the Directional Coupler's Directivity.

Here's that implementation:


(Note that you can just see the AD8307 circuitry at the far-left of the image above.  Although present in the photo above, this circuitry had not yet been installed when I made my Directivity measurements.)

Also, if you look closely, you can see some yellow Teflon insulation on the end of one of the voltage-sense transformer's secondary winding.  There is actually Teflon insulation on both ends of this winding.  Both ends are side-by side on the transformer and there is a high voltage potential between them (one end being grounded and the other end connected to the transmission line).

There is also a little rectangle of Kapton tape mounted under voltage-sense transformer on the bottom of the compartment.  It provides a bit more voltage isolation between the transformer windings and chassis ground.

(I also tested an implementation using a 2643625002 core for the current-sense transformer.  I saw no difference in performance between it and the FT50-43 I am currently using.)

Return-Loss Uncertainty due to Directivity:

Now that I knew the Directional Coupler's Directivity, I could determine Return-Loss Uncertainty.

Note that with a worst-case Directivity of 35 dB, there will be an increasing uncertainty in Return Loss readings as the Return Loss approaches its theoretical maximum of 35 dB (Return Loss cannot be larger than the Directivity).  This uncertainty is shown in the table below, per the calculator found here bytecollector.com/library/DirectivityErrorCalc-w-SWR.xls:

(Click on image to enlarge)

So, given my planned-for maximum Return Loss reading of 30 dB and a worst-case Directivity of 35 dB, the actual Return Loss for this reading (and excluding path errors such as AD8307 accuracy) would lie somewhere in the range between 26 and 37 dB, which represents an actual SWR that would be between 1.03 and 1.1 -- still quite acceptable.

AD8307 circuit implementation:

The AD8307 ICs are SOIC-8 packages.  I find that such a small size can be a headache to prototype with (unless, of course, one has a PCB with appropriate component footprints), so I purchased some small SOIC prototyping boards from eBay.  These greatly facilitate wiring to the IC pins.  (Alternatively, I could have purchased these ICs in DIP packages).


(I later added copper tape to shield the sides of the AD8307 chamber, and a copper top will be added over the entire assembly after I finished mounting it in the tuner chassis).


Build, Return Loss Calculator:

When I finished my Directional Coupler build I discovered, if I placed it in the Tuner chassis, there wasn't much additional room available on the Capacitor-selection board for me to add the Return Loss Calculator Circuitry.

And given the fact that my junk-box potentiometers were all designed to mount end-on, I decided instead to build the circuit on a small piece of plated-through perf board that I would mount vertically on the bulkhead shield that separates the Tuner's RF compartment from the Control compartment.

Although the two ICs are DIP ICs, the passive resistors and capacitors are all surface mount (0805 packages).

Here's the build, shown un-annotated and also annotated with I/O names and potentiometer reference designators added:



The board was notched in two places due to mechanical interference issues with two pre-existing mounting screws, given the tight space that I was trying to mount it into.


Incorporating the Directional Coupler and the Return Loss Assemblies into the Tuner Chassis:

Here's a picture showing the installed Directional Coupler Assembly and Return Loss Calculator Assembly.  (You can see the latter's pots next to the bulkhead divider).


(Note that I did not remove the SMA connectors on the Directional Coupler assembly.  They are left there in case I need them for future testing.)

Below I've installed a copper plate (cut from a sheet of 26 gauge copper) over the top of the RF compartments, with bent-down tabs tacked to the side walls in 5 places.



Calibration Procedure:

1.  With the Directional Coupler's output unloaded (open load) and disconnected from the Tuner's L-Network circuitry, and with a +10 dBm 3.5 MHz signal applied to the Directional Coupler's input, make the following adjustments:
  • Adjust R11 so that VF is 2.00 VDC
  • Adjust R12 so that VR is 2.00 VDC
2.  With the input to the Directional Coupler still +10 dBm at 3.5 MHz, connect a calibrated 75 ohm load to the Directional Coupler's output and make the following adjustments
  • Adjust R24 so that VRL measures 2.10 VDC (equals 14 dB Return Loss times 0.15V/dB)
  • Adjust R23 so that the Panel Meter deflects to 47% of Full Scale.

Design Verification Measurements:

1.  VF and VR versus Input Power.

This test is performed with the Directional Coupler's output unloaded (i.e. open, so that Forward and Reflected powers are identical) and after R11 and R12 have been calibrated to give equal readings of 2.00 volts at VF and VR for a +10 dBm input signal.  It measures the response, versus signal level, of VF and VR.

(Click on image to enlarge)

Note that the gain of VF and and the gain of VR are essentially identical.  (There's no guarantee that this will be true for all AD8307's, though).

2.  VRL versus Zload:

This test measures the Return Loss voltage versus different loads connected to the Directional Coupler's output.  Note that the Zload is resistive rather than a complex impedance.

(Click on image to enlarge)

For the three loads I used, the measured Return Loss is close (error under a dB) to the loads' actual Return Loss (per my HP 8753A).  This error is quite adequate for my tuner application, which is not meant to be a lab-grade measurement device.

3.  Step Response, VRL

This test checks VRL's step-response to a change in Return Loss, measuring the amount of time it would take the VRL reading to settle down after, for example, a change to the tuner's L-Network settings.

But rather than performing the test by changing the Directional Coupler's load in a "step" fashion (for which I'd have to design some sort of fast-switching circuit), I instead "mimic" a change in load impedance by taking advantage of the VF and VR circuits' characteristics at low signal levels.

This is an important point:  specifically, if the drive to the Directional Coupler is less than +10 dBm, and if the load itself is an accurate 50 ohm load (Return Loss > 30 dB), the measured Return Loss will be a function of the input power level, rather than a function of the load attached.

This effect is mainly due to the fact that, at low power levels, the VF and VR op-amp outputs will clamp to their negative rail -- they cannot go below 0 volts.

Thus, even with a 50 ohms load is connected to the Directional Coupler's output, Return Loss will appear to be very poor if the applied power level is very low, as I demonstrate in this table:


As one can see, because VR cannot go below U1's lower power rail of 0V, the delta between VF and VR is artificially reduced at low power levels.  And so Return Loss erroneously appears to worsen.

One important conclusion from this data:  If the input power applied to the Directional Coupler is less than +10 dBm, the Return Loss measurement could be wrong.  So tuning should only be done when VF measures at least 2.0 VDC (i.e. input power at least +10 dBm).

(But keeping the input power above +10 dBm shouldn't be an issue.  After all, +10 dBm represents 10 milliwatts.)

(Note, as power decreases, even if VR weren't clamped to 0V by U1, the same effect would occur at some lower power level because the Reflected path's AD8307 transfer-characteristic limits-out at at the lower limit of its input-power specification.)

We can use this behavior to mimic a step-change in the impedance seen by the Directional Coupler's output.

Here's an oscilloscope capture of VRL step-response to a step-change in the signal level applied to it (via my Fluke 6060B).  Although I'm stepping the level from -20 to -10 dBm, which, per the previous table, should give a VRL transient from 1.5 to 3 volts (a Return Loss step from 10 dB to 20 dB), the Fluke's attenuator relays, as they change, briefly create an attenuation larger than -20 dBm before they step to +10 dBm.  The result is that VF goes to 0 volts (rather than starting at 0.5V) before stepping to 1.0 volt.  VR is 0 volts in both cases, and thus VRL (being equal to VF-VR) steps from 0V to 3V.

In other words, this test mimics a step-change in Return Loss from 0 dB to 20 dB.

(Click on image to enlarge)

VRL settles down within about 7-8 msec of the initiation of the step transient.

4.  Impact of Directional Coupler circuitry and the Additional Grounded Shields on Tuner Match Performance:

This test checks if the addition of the Directional Coupler assembly (and its shields) has any effect on the Tuner's "match-space."  This test is performed at 30 MHz (the highest frequency I'm specifying for this tuner) to accentuate the negative effects of any stray parasitic components.

The test is identical to the one described in this post: http://k6jca.blogspot.com/2015/09/antenna-auto-tuner-design-part-7-build.html

And here are the results:

(Click on image to enlarge)

Below are the results from my prior testing (from Part 7 of this series of posts):

(Click on image to enlarge)

These two plots appear identical to my eyes. Therefore, the incorporation of the Directional Coupler assembly into the tuner has little, if any, effect on the tuner's match-space.


Other Notes:

I actually breadboarded the R, G, and Phase Detectors just to make sure that, conceptually, they worked.  And they did, but I only did a minimal amount of testing.

Here is an image of the schematics:

(Click on image to enlarge)

Note that the schematics are not entirely representative of the final breadboard circuit (they are included here only for sake of completeness).

For example, after I smoked one of the resistors in my first voltage sampler, I changed the two resistive transmission-line voltage samplers to instead be capacitive voltage dividers (each divider became a 1.7-11 pF variable cap (to the transmission line) in series with 120 pF fixed cap (to ground)).

I also needed to add a DC path to ground (yet high impedance at RF) at each capacitive dividers' voltage-divider node.  I did this with a 2.5 mH inductor connected in parallel across each 120 pF cap.
Also, I deleted the 2N7000 in the phase detector -- the goal was to have the LEDs turn ON only when RF was present.  But, given the 2N7000 turn-on voltage, this wasn't working as planned for the RF power levels I was testing at.  No problem, as I didn't really need to do this to verify detector functionality, so I simply grounded the 2N7000's Drain to ground.

And the Vv and Vi signals are defined per the definitions shown in my post (post 6 in this series) on Match Detection.


OK, that ends this post!


Part Nine of this blog series is posted here: http://k6jca.blogspot.com/2016/01/antenna-auto-tuner-design-part-9-build.html

And please note:  The "final" schematics could have changed from the versions included above, in this post.  The final "release" schematics can be found in Part 10 of this series:  http://k6jca.blogspot.com/2016/01/antenna-auto-tuner-design-part-10-final.html


Links to my blog posts in this Auto-tuner series:

Part 1:  Preliminary Specification

Part 2:  Network Capacitor Selection

Part 3:  Network Inductor Selection

Part 4:  Relays and L-Network Schematic (Preliminary)

Part 5:  Directional Coupler Design

Part 6:  Notes on Match Detection

Part 7:  The Build, Phase 1

Part 8:  The Build, Phase 2 (Integration of Match Detection)

Part 9:  The Build, Phase 3 (Incorporating a Microcontroller)

Part 10:  The Final Schematics


Links to my Directional-Coupler Posts:

Notes on HF Directional Couplers

Notes on the Bruene Coupler, Part 1

Notes on the Bruene Coupler, Part 2

Notes on the Monimatch 

Notes on the Bird Wattmeter

Building an HF Directional Coupler

Notes on the Twin-lead "Twin-Lamp" SWR Indicator


Standard Caveat:

As always, I might have made a mistake in my equations, assumptions, drawings, or interpretations.  If you see anything you believe to be in error or if anything is confusing, please feel free to contact me or comment below.

And so I should add -- this design and any associated information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thursday, November 19, 2015

Notes on Modeling Transformers for RF

These notes are from an earlier blog post (here), specifically dealing with transformers used for "Match Detection" at RF (e.g. measuring transmission-line voltage and current).  I recently needed to refer to these notes and I discovered (to my chagrin) that I'd forgotten in which post I'd put them.  So, to make future searches easier, I thought I'd also give them their own blog post.

These notes came about because I was wondering why, in some applications (such as a Phase Detector), a transformer's output would have a 90 degree phase shift, but in other applications there would be no phase shift (that is, the phase would be either 0 or 180 degrees, depending upon phase-orientation of the windings, but never 90 degrees).  So I sat down and worked out the following...

Notes on Modeling Transformers for RF applications:

A transformer is really just coupled inductors.  Let's look at a model of the basic coupled-inductor:



Drawn with these voltage polarities and current directions, the voltage and current relationships are:

V1 = jωL1* I1 + jωM * I2
V2 = jωM * I1 + jωL2 * I2
 
Where: ω = 2* π * Frequency

In actual use, though, where one coupled inductor is driven and the other attaches to a load, it's more conventional to draw the voltages and currents as follows (note the relationship of the phasing dots):


Note that Zl is the load attached across L2, and I2 is flowing in the opposite direction (now from the positive terminal of L2), compared to the previous drawing.

Because the direction of I2 is reversed, we need to flip the sign of the I2 components in the previous equations, which now become:

Equation 1:  V1 = jωL1* I1 - jωM * I2
Equation 2: V2 = jωM * I1 - jωL2 * I2

Manipulating these two equations results in the following voltage gain relationship:


We can express this relationship in terms of N1 and N2, the number of turns of each inductance's winding.  If the inductors are tightly coupled, they will be on a common core with identical dimensions.  We can replace L1 and L2 in the above equation with their inductance equations...


We could also solve the equations for the current-gain.  The result is:


For the purposes of understanding how the current-sense transformer in a Phase Discriminator creates a voltage with a 90 degree phase shift, let's derive the equation for the secondary's voltage in terms of the primary's current:


(The 'j' term in the above equation means that V2 and I1 are 90 degrees out of phase.)

This is an important conclusion.  If we assume that the load impedance (Zl) is significantly larger than the reactance of the "secondary's" impedance (L2), then the voltage at the secondary of the transformer will be shifted by 90 degrees from the phase of the primary's current!

(By the way, you can see this 90-degree relationship applied in the Bird Wattmeter, here).

On the other hand...


Note that if Zl is resistive and appreciably smaller than the reactance of the secondary's impedance (L2), there is no longer a phase shift between primary current and secondary voltage!

Finally, let's determine the impedance seen across the primary winding when a load, Zl, is connected across the secondary:


for tightly coupled inductors, this equation becomes:


and we can simplify it further, with two different conclusions...


The first reduction above is simply the reflection of the load, Zl, (divided by the square of the turns ratio) to be the primary's impedance.

And the last equation signifies that, if there is no load attached to L2, then it's as if L2 isn't there and L1 simply looks like itself, an inductor.
What does this mean?

If the current-sense transformer has a high-impedance load attached to its secondary (so that it creates the 90 degree phase shift), its primary inductance could add phase-shift to the transmission line and thus affect the SWR.

To minimize this unwanted effect, if the reactance of L1 is kept to, say, 5 ohms (1/10th of 50 ohms) at the highest frequency, 30 MHz, then the SWR will only shift from 1:1 to 1.1:1.

But 5 ohms at 30 MHz is an inductance of 26 nH.  Very small!!
(Note:  10 ohms of added reactance will shift a 1:1 SWR to 1.2:1, 20 ohms to 1.5:1).
For analysis purposes, Mutually-Coupled Inductors can also be represented by a T-network equivalent circuit.  All of the above equations could be derived using this model in lieu of the two coupled inductors:


A quick note on multiple secondaries...

If there is a single primary, the current through this primary must equal the sum of the currents in all of the secondary windings, multiplied by their turn ratios.  E.g. for a three-secondary transformer:

Ip = Is1*N1 + Is2*N2 + Is3*N3

In the above examples, some of the transformers have had two equal secondary windings ('N' turns-ratio, each) with identical loads across each winding.  Therefore the current in each secondary is the same:

Ip = Is1*N1 + Is2*N2 = 2*Is*N

And therefore the current in each secondary is:

Is = Ip/(2N)


That's it for this post!


Links to my Directional Coupler blog posts:

Notes on the Bruene Coupler, Part 2

Notes on the Bruene Coupler, Part 1

Notes on HF Directional Couplers

Building an HF Directional Coupler

Notes on the Bird Wattmeter

Notes on the Monimatch

Antenna Auto-tuner Design, Part 5:  Directional Coupler Design


Standard Caveat:

As always, I might have made a mistake in my equations, assumptions, drawings, or interpretations.  If you see anything you believe to be in error or if anything is confusing, please feel free to contact me or comment below.

And so I should add -- this information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Wednesday, October 21, 2015

Notes on Measuring Antenna Tuner Power Loss

These are my notes on measuring Antenna Tuner Loss that I've made while working on my own tuner design (here:  http://k6jca.blogspot.com/2015/09/antenna-auto-tuner-design-part-7-build.html).

But first, please note...

>>  Click on any image to enlarge! <<

And now, on to my notes...

Over the years, several different methods for measuring Tuner Power Loss have been mentioned in ARRL publications.  Let's look at two of these.

Technique 1:  Measure Loss via SWR, the AI1H Method:

The first mention of Tuner Loss Measurements (that I'm familiar with) is a technique described by Frank Witt, AI1H, published in the April, 1995 issue of QST.  This technique can be found in these following references:
"How to Evaluate Your Antenna Tuner, Part 1", Frank Witt, AI1H, QST, April, 1995  (Part 2 is in the May, 1995 issue -- the link associated with this text goes to a site that has combined both articles into one).

"Evaluation of Antenna Tuners and Baluns -- an Update", Frank Witt, AI1H, QEX, Sept/Oct, 2003

This technique uses either an SWR meter or an Antenna Analyzer to measure SWR for load resistances that are either twice or half of the value (Rload) being analyzed, and the measured SWR values are then applied to the following formula:

LEST = 5*log(((S1 + 1)(S2+1))/(9*(S1-1)(S2-1)))

Where:
  • LEST =Estimated Loss, in dB
  • S1 = SWR with load resistance equal to Rload/2
  • S2 = SWR with load resistance equal to Rload*2
There are a number of factors which will affect the accuracy of the results, though...

Of course, accuracy of the SWR reading will be a major influence.  But also important is the actual impedance of the loads being measured, at the test frequency.  Impedances measured at one frequency might be different at another, depending upon load fixture parasitics and the characteristics of the resistances, themselves.

As the ARRL points out in "Antenna Tuner Testing Methods vs Accuracy" by Michael Tracy, KC1SX in the February, 2003 issue of QST (page 75), "the bottom line is that the original test method was reasonably accurate, but not necessarily reproducible.  To the extent practical, the Lab will continue to use the more accurate "direct" method for further testing.  The AI1H method will still be used for some testing, but only with careful cross-checking of the instrumentation used"

Note their mention of the "more accurate 'direct' method."  Let's look into this further...


Technique 2:  Measure Loss via the ARRL "Direct" Method:

The ARRL's "direct" method of Loss Measurement is first mentioned (to my knowledge) in the article
"Antenna Tuner Testing Methods vs Accuracy", by Michael Tracy, KC1SX,  and which appeared in QST, February, 2003, on page 75.

From the article, here is what their test fixture looked like.  Note the power resistors.


Unfortunately, the article's description of the test setup is sketchy at best.  But later articles do a better job describing the fixture and test technique.

For example, Phil Salas, AD5X, has a more detailed description of this testing technique in a product review of two MFJ auto-tuners published in QST  ("The MFJ-994BRT and MFJ-998RT Remote Automatic Antenna Tuners", Phil Salas, AD5X, QST, Aug, 2012).  The following two images are quotes from the article.  First, a description of the basic setup:


And here's a description of the Load Box used for the testing.  Note that the resistors need to be able so handle the RF power sourced by the transmitter:


And, from the article, here's a picture of the Resistive Load Box:


So, for example, if the desired Tuner test-load were 200 ohms (4:1 SWR), the series 150 ohm resistor and no shunt resistance would be selected.  This 150 ohm resistor, in series with the 50 ohms presented to the fixture by the 40 dB pad, adds to create the 200 ohms seen by the tuner.

And the voltage at the input of the 40 dB pad should be 1/4 of the applied voltage.  That is, there should be a 12.041 dB loss due to this fixture.  And thus any measured loss beyond the "ideal" attenuation of 12.041 dB would be due to Tuner Loss.

Similarly, if the desired Tuner test-load were 12.5 ohms (again, 4:1 SWR), the series element would be the short (0 ohms) and the shunt resistance would be be 16.67 ohms, which, when shunted across the 50 ohms presented to the fixture's output by the 40 dB pad, creates a resistance, as seen by the tuner, of 12.5 ohms.

Again there's 12.041 dB loss due to the fixture (because 3/4 of the power is shunted into the 16.67 ohm resistor).

[Note that in the actual fixture schematic above 15 ohms is used in lieu of  16.67 ohms.  This creates an 11.54 ohm impedance in lieu of 12.5 ohms, for an SWR of 4.33: 1 and an "ideal" attenuation of 12.74 dB.]

I took a similar approach to my initial power-loss testing of my own tuner (here).  But I didn't have any high-power resistors suitable for testing at RF frequencies, and so I thought, why not use my HP 8753A Vector Network Analyzer, instead?

Power could be kept low (on the order of 0 dBm), and so I could minimize unwanted fixture "parasitic" inductance and capacitance by using small, low-power components placed on a small piece of PCB with SMA connectors on either end.  Pads on the PCB would allow me to connect a resistor in series or in parallel with the SMA that connects to Port 2 of the S-Parameter Test Set.
Below is my test setup for this method of power-loss testing.  Note that:

1.  To test loads (Rload) greater than 50 ohms, Rp should not be stuffed and Rs should be equal to Rload - 50.

2.  To test loads (Rload) less than 50 ohms, Rs should be stuffed with a short (0 ohms) and Rp should be equal to 1/(1/Rload - 1/50).


I measure S21 with the fixture in place and compare it to the "ideal S21" that should exist if:
  • The tuner is lossless, and
  • There was no reflected power from the tuner's input (SWR = 1:1)

Here's my fixture:


I used this method to measure the loss of two tuners:  one of my own design and my Elecraft KAT500.  Here are the results:



Notes regarding these tables:
  • Column A is the SWR measured at the Tuner's input (Red means appreciably high SWR).
  • Column B is the Return Loss equivalent of the measured SWR in Column A.
  • Column C is the effect, in dB that this Return Loss has on the S21 measurement (and is equal to -10*log10(1-10^(- Return_Loss/10)). [Note that Return Loss, in the table above, is positive, and so I negate the Return Loss term in the equation].
  • Column D is the S21 Measurement.
  • Column E is the actual S21 loss due to the tuner itself with the loss due to Return Loss removed (i.e. Column E = Column D + Column C).
  • Column F is Column E represented as a percent of total power delivered to the tuner assuming an ideal S21 of -10 dB.  That is, Column F = 100*(1-(10^((Column_E - Ideal_S21)/10))).  Note that "Ideal_S21" should be -10.00 dB for 500 and 5 ohm loads.
  • And the remaining columns are simply the tuner settings that gave me minimum SWR for the given load.
Note that there are issues with this measurement technique!

The biggest problem with this technique that it assumes that resistor divider actually has the "desired" voltage division ratio and that it's presenting the "desired" impedance to the tuner.

For example, if, for a 500 load, Rs on the test fixture were exactly 450 + j0 ohms, and if the impedance presented by Port 2 of the S-Parameter Test Set to the SMA were exactly 50 ohms, and if the Load Fixture had no parasitic elements, then the ideal S21 would be exactly -10 dB, and any derivation from this value would represent actual tuner loss (as long as Return Loss is compensated for).

But my Load Fixture, even though I took care to minimize lead lengths, does have parasitic reactance, and an S11 measurement of the impedance presented by the input of this Fixture will show a small but noticeable rotation clockwise, off of the horizontal axis, on a Smith Chart.

So we already know there is some reactance -- how much of this is due to parasitic elements (e.g. series inductance and shunt capacitance) is difficult for me to say.  How close is the division ratio to the ideal 10:1?

Again, tough for me to say.  The reactance just mentioned will undoubtedly have some effect, depending upon how it is distributed between fixture components, as well as the "not-exactly-50-ohms" impedance presented to the fixture's output by the S-Parameter Test Set (I think on my test set Port 2's Return Loss is somewhere between 30 and 40 dB).

And I'll note that the ARRL fixture has another potential issue:  the resistors in this fixture could be dissipating significant power.  If they heat up because of this power dissipation, their values will change and thus the voltage division ratio will change.  The amount of this change depends upon the resistor's characteristics, its heat-sink, and the amount of power it's dissipating, but any change will add uncertainty to the assumed "ideal" S21.

So there is some uncertainty regarding what the ideal S21 really ought to be.  And although there might be ways to calibrate this uncertainty down to acceptable levels, they aren't obvious to me!  (If obvious to you, please let me know).

Anyway, there is some amount of assumption (i.e. the "ideal" division ratio versus actual component resistances/impedances and interconnect parasitic elements ) upon which this technique depends, making it, in my opinion, less than ideal.

But what to do instead?  I happened to mention this problem to a friend of mine, Dick Benson, W1QG, an engineer of many years and vast experience.  It piqued his interest and he started emailing me (while I was gallivanting about on vacation) some interesting ways to measure tuner loss.

Here's his first effort.  Note that, like my first attempt, all of his techniques will depend upon the use of a Vector Network Analyzer...


Technique 3: W1QG, Measure Tuner Loss with "Passive-T" (or Pi) Interface:

What better way to explain this technique than to simply copy Dick's email to me:


The current DUT is simply a (well characterized) toroid L with a fixed mica C shunted by a trimmer: 


The “trick” was to carefully create a very accurate 3 resistor network that provided:
1: a 500 ohm load to the DUT
2: a 50 ohm source Z to port 2 of the VNA
3: a precisely known attenuation
 
The setup is: 


The resistors to accomplish this are:
   Ra =  478.158     (477.0)
   Rb =  31.942       (31.86)
   Rc =  19.0679     (19.08)

The values in () are what I used.  The resistors were carefully crafted from 1% films and measured (1kHz) with GR 1658. 

With these values, the attenuation works out to be 19.995 dB, where 20.000 was the goal.  This (known) attenuation was compensated for in the M code.  

The 8753a VNA also has a small error when measuring a 20 dB loss. It is off by -0.028 dB, and this also must be factored in since it is large relative to the loss of the matching network. 

How one determines this correction is yet another saga J
 
The “raw” s-parameter measurements: 


 The current scheme works for a 500 ohm Zload, but obviously it won’t work for a 5 ohm load.
A pi-network rather than a T should do it for the 5 ohm version.  But it is a pain to create these T networks.
 
Therefore I will be investigating an “Active” approach rather than the above “Passive”.
The hope being that only ONE resistor (the load)  needs to be changed. 


Note that this technique depends upon an assumption that is difficult to verify, which is that the T-network's component values (measured by Dick at 1 KHz with a GenRad 1658 Digibridge), and thus the T-network's attenuation and load characteristics, are the same at the RF test frequency (e.g. 30 MHz).

With that, let's look at Dick's next approach...


Technique 4: W1QG, Measure Tuner Loss with an "Active Load Interface":

Dick's next approach again uses a Vector Network Analyzer (the HP 8753A), and utilizes an "Active Interface" (or, as I call it, an "Active Load Interface") that terminates the tuner with the desired load impedance (in this case, 500 or 5 ohms).  An op-amp senses the voltage across this load and forwards it on to Port 2 of the VNA's S-Parameter unit, thus providing isolation between the load being tested and port 2 of the S-parameter Test Set.

Here's a description, in Dick's words:

An Active Interface (“AI”) based on the AD9632 op-amp was created.  The measurement setup is:



The idea is to provide a known termination for the DUT, a known gain, and a known Zout to port 2 of the VNA.  The charm of this is that no complicated passive network is required, just a single “Rterm” resistor as a load. 
 
The DUT power loss in dB is:  dBloss = 10*log10(Rterm/50) - measured_S21
 
Step 1:  Calibrate the VNA with the AI in place and Rterm= 50 ohms, no DUT.
This removes gain errors in the VNA measurement as well as gain errors in the AI.
Here is the result: 

 


Step 2:  Replace the 50 ohm termination on the AI input with the desired termination. In this case a 500 ohm (499 1%) was used.  Then MEASURE the actual input impedance. Here is the result:


VNA Port 1 must be calibrated otherwise this result will be useless. The AI input looks like 5.5 pF and 494.4 ohms (Cp and Rp above).  This result is expected due to the physical interface to the DUT as well as parasitic losses that are not accounted for. Since the capacitance ends up in parallel with the matching network output tuning capacitance, it is of no consequence.  The important part is the load is NOT 500 ohms, it is 494.4 (ok +/- measurement noise).   We are indeed splitting hairs here. 
 


Step 3: Insert the DUT between Port 1 of the VNA and the AI input with the 500 ohm (nominal) termination.  Use the VNA calibration and setup in Step 1.  

Here is the result:

 
Now, if Rterm were 500 Ohms, the DUT loss would be 10.0 - 9.9089 =  0.0911 dB. 
This is a bit on the high side, but not atrocious.  But per Step 2, Rterm is closer to 494.4 ohms, therefore the DUT loss is:

10*log10(494.4/50)-9.9089 =  0.042 dB.  

Ok, it is not in perfect agreement with the 0.057 dB measured with the Passive T,but in reality, who gives a damn about .015 dB !!! 
 
A more realistic test is when the L gets “de-Q’d” to make for a more realistic finite loss situation. 

Here is the AI measurement with the same 3.07 ohm resistor in series with the L that was used in the Passive T measurement:


Note that the DUT input SWR is not longer perfect at 5.9 MHz since the DUT input now looks like 50+3.07 ohms,and what we see above in the S11 window is 53.1 ohms!
 
From the above, the DUT loss is therefore:  10*log10(494.4/50)-9.6351 =  0.316 dB.  
The Passive T method gave 0.319 dB so the measurements are within 3/1000th of a dB.
It just does not get any better!   


A single supply can be used as long as it is dedicated to this device.  In other words, no other stuff is being powered.
 
Here are the guts:

 
And the (more or less) end result:


The resistor on the top side is the load Z.  As previously described, the fixture needs to be measured to get a better estimate of the actual DUT load for maximum accuracy.
 
The gain is quite flat (circa +/- .01 dB) over the HF frequency range: 

The reverse isolation (S12) is pretty remarkable for what that is worth J


The DUT power loss in dB is:  dBloss = 10*log10(Rterm/50) - measured_S21
 
It is a matter of doing vna calibrations which includes the AI per this recipe:
 
Step 1:  Calibrate the VNA with the AI in place and Rterm= 50 ohms, no DUT.
This removes gain errors in the VNA measurement as well as gain errors in the AI.
Here is the result: 

 
Step 2:  Replace the 50 ohm termination on the AI input with the desired termination. In this case a 500 ohm (499 1%) was used.  Then MEASURE the actual input impedance. 

Here is the result:


VNA Port 1 must be calibrated otherwise this result will be useless. The AI input looks like 5.5 pF and 494.4 ohms (Cp and Rp above).  This result is expected due to the physical interface to the DUT as well as parasitic losses that are not accounted for. Since the capacitance ends up in parallel with the matching network output tuning capacitance, it is of no consequence.  The important part is the load is NOT 500 ohms, it is 494.4 (ok +/- measurement noise).   We are indeed splitting hairs here. 
 
Step 3: Insert the DUT between Port 1 of the VNA and the AI input with the 500 ohm (nominal) termination. 

Use the VNA calibration and setup in Step 1.  Here is the result:


Now, if Rterm were 500 Ohms, the DUT loss would be 10.0 - 9.9089 =  0.0911 dB. 
This is a bit on the high side, but not atrocious.  But per Step 2, Rterm is closer to 494.4 ohms, therefore the DUT loss is:

10*log10(494.4/50)-9.9089 =  0.042 dB.
 
Here is the measurement setup with DUT in place:


  The Rq is set to zero for this run and the L C tuned to provide a 1.01:1 SWR:


The point is the loss is dBloss = 10*log10(Rterm/50) - measured_S21 = 10 – 9.9998 = ZERO. 

Now, with a inductor with a Q of 380, Rq= 0.392 ohms. 


The loss is now 10-9.9655= 0.0345 dB. 

I implemented the same circuit that Dick designed.  Here's its schematic:


And here's my implementation of the "ALI" (Active Load Interface):




ALI attached to Tuner:


The supply current into the unit should be kept to around 10-15 mA (i.e. 10 - 11 volts) to prevent excessive power dissipation within the ALI fixture.  If the unit feels like it's getting hot, it's drawing too much current from the power supply.  Remember, heat will change the value of Rterm and thus your measured S21.

Here are my measurement results for my own tuner design and for my KAT500



Notes on these measurements:
  • Column A is just the Return Loss of the ALI with its Rterm set to 50 ohms (made while calibrating the S21 response).  This measurement simply tells me that the fixture was properly terminated when I did the VNA calibration and therefore S21 of 0 dB represents an Rterm of 50 ohms.
  • Column B identifies the value of Rterm (ideal) used for the measurements -- either 500 or 5 ohms.
  • Columns C-F are a log of a tuner's settings for minimum SWR for the selected frequency range.
  • Column G is just a reminder to myself to set the VNA IF bandwidth to 30 Hz (to reduce measurement noise).
  • Column H is the frequency at which I measured minimum SWR (via S11) for the tuner settings in columns C-F.
  • Column I is the Return Loss associated with the minimum SWR (and logged in lieu of SWR).
  • Column J is the S21 of 'Tuner plus ALI' measured with the VNA.
  • Columns K-N represent the actual measured impedance of the ALI's input for the selected Rterm.  This impedance is represented either in series form (Rs + Ls) or parallel form (Rp + Cp)  (These values come from one of Dick's Matlab programs).  Either this measured Rs or Rp will be used to calculate the "ideal S21 (i.e. Ideal S21 = 10*log10(Rs_or_Rp / 50))
  • Column O identifies if Rs or Rp was used to calculate the "ideal" S21.  (Note that Rp is used for all -- this will be explained in just a bit).
  • Column P is the calculated "ideal" S21 ( = 10*log10(Rp/50)).  (Note that Rp is used for all -- this will be explained in just a bit).
  • Column Q is the amount of loss due to Return Loss.  This is not loss dissipated by the tuner and thus should not be included in the Tuner's loss measurement, but it is a part of the S21 number, so it must be subtracted out.  This value = -10*log10(1-10^((Return Loss (dB))/10)), where Return Loss  is expressed as a negative number.
  • Column R is the calculated Tuner Loss, which is equal to:  Column_P - Column_J - Column_Q.
  • And Column S is the loss in Column R represented as a percent of Total Power applied to the Tuner, and is equal to 100*(1-10^((-Column_R)/10)).
Here's a summary of the equations used:


Ideally, the ALI and  its Rterm have no parasitic elements nor delay and its measured impedance is strictly resistive without any reactance.  If this were the case, you'd simply use the measured value of Rterm to calculate the ideal S21.

But suppose there is reactance in the impedance that the ALI presents as a load to the tuner?

Here's an example: 


At 29.67 MHz my ALI's impedance with an Rterm of 5 ohms looks like 5.144 + j1.614 ohms.

The series and parallel equivalent-circuits of this impedance would be:
  • Series:  Rs = 5.144 ohms, Ls = 0.008659 uH.
  • Parallel:  Rp = 5.65 ohms, Cp = -297.9 pF (that is, because of the negative sign it really should be modeled as an inductance, but this is the value that Dick's routine give's me).
Note that Rs and Rp are about 10% different.  This is a significant difference, and it will result in a difference in loss of roughly 0.5 dB (that is, roughly 10 percentage points), depending upon which resistance, Rs or Rp, is used to calculate the "ideal S21."

So which one to use?  It turns out that Rp will give very close results (although I will admit that it isn't obvious to me why Rp should be used).  But I "brute forced" my way to this conclusion, as follows:

First, I assumed that the op-amp in the ALI is measuring the voltage across the entire S11 impedance, which in this case is 5.144 + j1.614 ohms, and not some portion thereof.  (This assumption is very dependent upon ALI implementation and is not easily verified (if it's verifiable at all), and thus the reason why this is an assumption).

What would be the voltage across this impedance (and measured by the op-amp), if this load were perfectly matched to 50 ohms with a lossless network and driven with 1 watt of power?  And how would this voltage compare to the voltage across a 50 ohm resistor driven with 1 watt?  After all, this difference is the heart of the "ALI" measurement technique.

To calculate the voltage across 5.144 + j1.614 given 1 watt of drive, I used an Excel spreadsheet I had created (before I purchased Matlab) to do simple network analysis.

Here's the spreadsheet with the values of the lossless network (i.e. lossless because component Q is defined to be 10^10).



Note that Return Loss is 128 dB (the last line).  The lossless network has an excellent match to 50 ohms!

This spreadsheet also returns voltage and current for every element, given my input power of 1 watt:


I've highlighted the voltage across Zload.  Note that it is has a magnitude of 2.377 volts.

Now, if there were no network and the load was 50 ohms, driven with 1 watt, the voltage across the 50 ohm load would be 7.071 volts.

The difference between these two voltages is:

20*log10(2.377/7.071) = -9.4689 dB

OK, so now let's look at the "ideal S21" formula for this ALI technique of measuring Tuner Loss (refer to Dick's post, above):

Ideal_S21 = 10*log10(Rterm/50)

If  either Rs or Rp (or |Z| = |5.144 + j1.614|) were plugged into this equation for Rterm, would the result be the same as the above result of -9.469 dB?

Doing the math...

Ideal_S21(|5.144 + j1.614|) = -9.673 dB.  Nope, not close.

Ideal_S21(Rs = 5.144) = -9.877 dB.  Even further off!

Ideal_S21(Rp = 5.65) = -9.4692 dBVery close!! 

(There's a difference of about 0.0003 dB between the Ideal_S21 calculation using Rp and the "target" of -9.4689, so, although very close, they are not identical.  But close enough for me.)

Anyway, my conclusion is that even this technique is not ideal.  Again, assumptions are made that are difficult to verify, and so some amount of "hand-waving" is taking place.  And the results very much depends upon how one actually builds the ALI fixture.  Ideally, Rterm should always look resistive, with no additional reactive component (or reactance minimized to be insignificant).  And its measured S11 impedance should be the same impedance across which the op-amp is measuring voltage.

(Also, note that when changing values of Rterm, if soldering them to the fixture they should first be allowed to cool before measurements are made, as heat (from soldering) will temporarily change the value of a resistor).


But Dick hadn't stopped in his search...


Technique 5:  W1QG, Measure Gp (Operating Power Gain) with a VNA:

Dick then came up with simplest (and potentially, in my opinion, the most accurate) approach to measuring tuner loss -- use the Vector Network Analyzer itself to measure Gp (Operating Power Gain) without any loads attached.  Just connect the VNA to the Tuner's In and Out ports.

First, though...what is Gp, "Operating Power Gain"?

It is simply the power going to the load divided by the power going into a 2-port network (such as the tuner):

Gp = PL / Pin

Note that the power into the network is exactly that, the power that is actually going into the network (or tuner).  That is: Pin =  PFORWARD - PREFLECTED.

Gp can be expressed in terms of S-Parameter measurements and therefore can be measured with a Vector Network Analyzer.  Its accuracy will depend upon the VNA's accuracy and how well it was calibrated.

Here's a terse mathematical explanation of Gp from Matlab (type "edit powergain" in Matlab's Command Window if you have their RF toolbox):

%   G = POWERGAIN(S_OBJ, ZL, 'Gp') calculates the operating power
%   gain of a 2-port network by
%
%     Gp = Pl/Pin = (|S21|^2) * (1 - |GAMMAL|^2) /
%         ((1 - |GAMMAIN|^2) * (|1 - S22 * GAMMAL|^2))
%
%   where Pin is the input power and:
%     GAMMAIN = S11 + (S12 * S21 * GAMMAL)/(1 - S22 * GAMMAL)

%   The reflection coefficients are defined as:
%
%     GAMMAS  = (ZS - Z0)/(ZS + Z0)
%     GAMMAL  = (ZL - Z0)/(ZL + Z0)
%
%   The function arguments are:
%   S_PARAMS is a complex 2x2xK array of K 2-port S-parameters.
%   Z0 is the reference impedance of the S-parameters. The default is 50 ohms.
%   S_OBJ is a 2-port sparameters object
%   ZS is the source impedance. The default is 50 ohms.
%   ZL is the load impedance. The default is 50 ohms.

(Derivation of Gp can also be found here: http://rfic.eecs.berkeley.edu/~niknejad/ee242/pdf/eecs242_lect7_powergain.pdf ).  And other explanations/derivations can be found via Google.

Note:  Gp is significantly different from Gt, "Transducer Gain".  Gt, Transducer Gain, also includes loss due to power being reflected back from the input of the two-port network.  So, if a network's SWR is not 1:1, Gt would not accurately represent the power lost within the two-port network itself, and so it should not be used as a measure of Tuner loss (unless the SWR at the Tuner input is 1:1).

Let's follow Dick's line of thought...

Yesterday it struck me that one should be able to directly measure the s-parameters of the DUT / Coupler and then mathematically predict loss due to the DUT without any other attachments.  After all, the DUT s-parameters should describe behavior when the DUT is connected to arbitrary source and load impedances.   
 
It is a three step procedure:
   1) Connect the desired test load (eg 500 ohms) to the DUT and tune the DUT for best input match.
   2) Then, remove the test load and carefully measure the s-parameters of the DUT in this “tuned” configuration.
   3) M-code is used to predict the loss due to the DUT.  
 
I started (naturally) with a model and connected a 500 ohm test load:


The inductor Q was set by the addition of a series resistor of 3.16 ohms which corresponds to my physical DUT.  The L in my physical DUT is fixed, but the C can be varied over a small range.
 
Note that only s11 has meaning. The C in the model was tuned to attain a rather perfect match, 

                                 
Next, the 500 ohms is removed, port 2 of the VNA is connected:


And the 2 port s-parameters are measured: 


 Next this M-Code uses the DUT s-parameters to predict the loss:
% Compute the insertion loss of a DUT for arbitrary source and load
% impedances.
% Dick Benson, October 2015

clear
clc
close all
path='';

% Choose synthetic or measured data by editing:
FileName='analyze_LC_Match_NO_Interface_with_Loss.s2p';
% FileName='LC_Match_Q42.s2p';  % Measured Data 

[rf_obj,Notes,State]=spar_read(path,FileName);
spar=rf_obj.S_Parameters;  % this should completly describe the DUT
Fvec=rf_obj.Freq;

Zo=50;     % the system impedance
Zs=50;     % the source
Zl=500;    % note the LOAD is set to 500 ohms.

% Check the input relection coefficient when the 500 ohm load is apppled.
figure;
gamma = gammain(spar,Zo,Zl);
smithchart(gamma); 

% Compute the DUT VOLTAGE transfer function and compensate for Zl 
figure;
tf=s2tf(spar,Zo,Zs,Zl,1);
plot(Fvec*1e-6,20*log10(abs(tf))-10*log10(Zl/Zo),'marker','+');
h=title(FileName);
set(h,'Interpreter','none');

% Use the "analyze" method to compute "Transducer Gain" and compare it to
% the above method.
% They sdhould be identical and they are, which is comforting.
hold on
analyze(rf_obj,Fvec,Zl,Zs,Zo);
plot(rf_obj,'Gt');
xlabel('MHz');
ylabel('dB');
legend('s2tf','analyze() Gt')
h=title(FileName);
set(h,'Interpreter','none');

The first result is the DUT input reflection coefficient with the 500 ohm load: 


Note the nice match. Sorry no useful cursor for this crummy stock smith chart!
 
Here is the loss prediction: 


That result is in excellent agreement with the other (passive and active) techniques.
 
The rubber meets the road with real-world measurements.

A full 2 port calibration was done on the 8753A.  
 
A 500 ohm (a 499 ohm film resistor, that happens to be 500 ohms!) is attached to the physical DUT. 

The 2 resistors in || make up the 3.16 ohm series R.  The resistor on the 3rd SMA is the 500 ohms test load. 


  The capacitor is tuned for match:


  The 500 ohm load is removed and port 2 of the the 8753a is attached: 


  The 2 port parameters are measured: 


  And this measured data is then analyzed with the above M code: 


Nice !!
 
And this is even nicer: 


So we have 0.308 dB loss measured and 0.318 dB loss from the Simulink circuit model.
 
WOW ….  0.01 dB difference ….  it just does not get any better than that.
I think my work is done here, it was quite a journey J
 
Note that Dick is using Gt for his measurements.  This parameter is OK to use as long as the DUT's SWR is very low, but note that Gt doesn't just represent DUT loss, it also includes power loss due to power reflected from the DUT's input.  If SWR is low, then this reflected power is negligible and Gt will represent the DUT's power loss.  In the case of non-negligible SWR, a better measure of DUT power loss (as Dick later determined) is Gp, as this value is a measure of only the DUT's power loss and does not include power reflected from its input.

As Dick mentioned above, with a VNA the test procedure is very simple.  Here are the steps I take:

Before I start the actual test, on my 8753A I select the frequency range I want to test over (e.g. 21 - 21.45 MHz), set the IF bandwidth to 30 Hz (to minimize measurement noise) and do a full two-port calibration.

Then I attach the desired test-load to the output (antenna) port of the Tuner and tune the Tuner for minimum SWR (VNA S11), as measured across the frequency range I've selected on the VNA.

Here's my setup with load attached to my Tuner's Antenna port.  The Tuner's "XMTR" port is driven by Port 1 of the VNA's S-Parameter unit.


Next, I replace the load attached to the Tuner's output with a coax cable (the same used for calibration!) connected to Port 2 of the VNA's S-Parameter unit.  I try to keep Port 2's Reference Plane as close as I can to the point where the load was attached to the Tuner (see photo above) -- in actuality, the delta between these two is about 0.36 inches.  I could compensate for this delta by adjusting the location of Port 2's reference plane, but the measurement results seem to be close enough, in my opinion, without any compensation.


Then I run Dick's Matlab routine, which automatically captures the S-parameters through my GPIB interface and plots Gp and S11 between the VNA's start and stop frequencies.

Here's an example of the output from Dick's Matlab routine.  (I've modified the routine slightly to show Return Loss (RL) on the Smith Chart "readout", for example):


At resonance (3.77 MHz), the Tuner's loss is 0.065196 dB.  (That is, Gp (gain) is -0.065196 dB).

Percent Loss can be calculated from Gp as follows:

Power Loss (percent) = 100 * ( 1 - 10^(Gp/10) )

Which, in this case,  works out to be 1.5%.  (And note, too, that to apply the formula above correctly, Gp should be negative).

Here are my Tuner-Loss results using the "Gp" technique for both my tuner and my Elecraft KAT500:



Of course, Dick's Matlab routine makes these measurement a snap.  But you can still run this test without Dick's routine.  However, I would strongly recommend using Matlab.  Their home version is, in my opinion, a great deal compared to what a Matlab "seat" normally costs.  (If you are interested in using Matlab, please note that for this application I'm using Matlab plus the "RF Toolbox" and the "Instrument Control Toolbox").

But you don't need Matlab.  If not running Matlab, instead collect S11, S12, S21, and S22 from the network analyzer and use these values to solve the Gp equation.

Please note that this technique does not rely upon any assumptions!  (Apart from an assumption on the accuracy of calibration.)  So, unlike the other four techniques where some amount of "hand-waving" takes place, this technique has the potential to be the most accurate of the five techniques described above.  Of course, its accuracy depends greatly upon the accuracy of the VNA calibration, so care must be taken during this step and accurate Reference Standards should be used.


Additional Notes:

1.  Measurement uncertainty of my 8753A:
  • When run with a bandwidth of 30 Hz (default is 3000 Hz), the "noise" on the measurements was about 0.01dB peak-to-peak, IF Bandwidth = 30 Hz.  (Per "eyeball" measurement).
2.  Use of Adapters:

For testing low-impedance loads, try to minimize the number of adapters between a Tuner's output (typically a PL-259) and the test-fixture/load, as each will add some small amount of resistance and thus additional loss.

For example, for Gp testing, I have, between the Tuner's antenna port and the coax going to Port 2 of the S-Parameter Test set, the following adapters:
  • PL-259 to BNC (female)
  • BNC (male) to SMA (female)
  • SMA (male) to SMA (male)
  • SMA (female) to SMA (female)
The latter two adapters were used to ensure that that the reference plane for Port 2 was near where the load had been when I'd tuned for minimum SWR.
3.  Here's a summary of the Power Loss found via three different measurement techniques for both my tuner and my Elecraft KAT500:



Note that I recorded Return Loss in lieu of SWR for Technique 4 (ALI).  You can easily convert Return Loss to SWR, if you'd like to, using on-line calculators such as the one found here.

Also, the Technique 2 measurements were the first Power Loss measurements that I made and I did not note the frequency where SWR was lowest.  I corrected this omission in my later  measurements.

As you can see, the results for the three different techniques vary significantly.  I believe that technique 5 (Gp measurement) is the most accurate (but I cannot prove it), because it relies on no assumptions, and that the results from the other techniques differ from those of technique 5 because the assumptions I made (but could not verify) were incorrect.

Never the less, if we assume that an acceptable error is, say,  +/- 5 percentage points in the "percent loss" column (which isn't bad!), then all three are acceptable.

4.  A note on the sign of Return Loss:

In this blog post you will sometimes see Return Loss expressed as a positive number and sometimes as a negative number.  Given that Return Loss is a loss, my belief is that it should be expressed as a positive number when expressing actual attenuation.

However, the 8753A displays S11 (when expressed as magnitude, in dB) as a negative number, and I lazily usually just copy this value down as Return Loss, sign included.  Anyway -- if the inconsistent use of signs bothers anyone, my apologies, and I will add that it bothers me, too, but I have no desire to go back and fix all of the sign inconsistencies.  Just remember that, in this blog post, Return Loss always represents a loss, never a gain.  And where Return Loss is used in a formula, I have tried to identify if the equation requires it be expressed as a positive or as a negative number (please let me know if I've missed any equation!).

OK, that's it for this blog post!


Standard Caveat:

As always, I might have made a mistake in my equations, assumptions, drawings, or interpretations.  If you see anything you believe to be in error or if anything is confusing, please feel free to contact me or comment below.

And so I should add -- this information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.