Tuesday, June 9, 2020

An Alternate Method for Characterizing Baluns and Common-Mode Chokes

Not long ago the NanoVNA group had a thread discussing the Nooelec 1:9  Balun and how to characterize it using the NanoVNA.


The topic was interesting, and so I thought I'd make my own measurements.  Specifically, I wanted to measure "Operating Power Gain" (also known as 'Gp'), which can be a truer measure of balun power loss, compared to Insertion Loss.  And I also wanted to check the balun's Common-Mode impedance.

A common technique for measuring balun loss is to connect two identical baluns back to back via their "balanced" ports, measure the loss of this combined configuration using a Vector Network Analyzer (VNA), and then divide that loss by two to get the loss of a single device (refer to this post on the Johanson website: Chip Balun, Definitions and Measurement Terminology)

But this method requires two baluns.  Suppose I only had one?  Or, if I had two baluns, how would I know if the two baluns were truly identical?

So I wondered -- what would happen if I simply connected the two ports of the Nooelec 1:9 Balun directly to my VNA?  Looking at its schematic, it looked like there might be two issues.

First, the balun's secondary winding (that is, the winding connecting to the balun's high-impedance port) of the Nooelec's balun transformer has a center-tap, and this center-tap is tied to ground.  If I connect a VNA port directly to the balun's 450-ohm (balanced) output, the VNA port's ground would short out half of the secondary windings.  Not a good idea.

I could avoid shorting out half the secondary if I cut the trace connecting the center-tap to ground, as shown, below (and that's what I did).


But there is still a second potential problem -- I would still be connecting a balun's "balanced" output (albeit with transformer center-tap now floating) to an unbalanced port of the VNA, and in doing so the balun's balanced port (balanced with respect to ground) would be forced to be unbalanced by the direct connection of one side of that port to ground..

But why not give it a try (after first floating the center-tap), and see what happens?

The results were not good.  If I placed my hand on either of the two coax cables connecting the VNA to the Nooelec balun, the s-parameter measurements would change!  (Important note:  VNA measurements should not change if you touch the coax cables connecting a Device-Under-Test to the VNA.)

The s-parameter plots, below, demonstrate this problem (note the inset photo of the test setup).

First, here are the balun s-parameters without hand touching coax...


...and next, with hand touching coax:


A huge difference!

Adding snap-on common-mode chokes to the coax cables reduced the common-mode coupling, but there were still some troublesome anomalies that I could not account for, and also, how would I know if the choking action was sufficient?

Clearly, connecting the Nooelec balun's ports directly to the VNA was problematic.

Maybe I could attach a transformer to the balanced-port of the balun to isolate it from the VNA, like this:


After all, this is essentially what happens when you connect two baluns back to back.

But the transformer would have its own impairments, such as loss and inductance.  Again, problematic.

About this time I was discussing the topic of balun measurements with Dick Benson, W1QG, and he mentioned that he had run a series of balun measurements back in 2018 using MATLAB and a technique he developed in which a 2-port balun is treated as a 3-port network.

What got my attention was that this technique allowed the balun's "balanced" port to always remains balanced with respect to ground.  And MATLAB allowed him to mathematically transform these results into a 2-port network from which loss and common-mode impedance could be directly computed.

This sounded ideal!

So...what is Dick's balun-characterization method and how do we use it?

First, Dick characterizes the 2-port balun as a 3-port network.  Let's look at how (and why) this is done:


Characterizing a Balun as a 3-port Network:

We normally think of a balun as being a 2-port device with one of its ports balanced with respect to ground and the other port unbalanced (e.g. one side of the port tied to ground).  Dick's technique treats the balun as a 3-port device.  That is, in addition to a balun's "unbalanced" port, each of the two terminals of the balun's "balanced" port is now considered to be its own port.

As an example, let's consider the "Nooelec 1:9 Balun."  The left-hand port is the unbalanced (with respect to ground) port, and the right-hand port is the balanced port:

And here is its 3-port representation:


How does this 3-port model help us?

To calculate power-loss and common-mode impedance, we need to first measure the s-parameters of this 3-port network.  If we can ensure that ports 2 and 3 always see the same impedance (with respect to ground) during the measurement process, then we will have ensured that the balanced port has remained in balance.

The method of measuring the s-parameters of this 3-port balun with a 2-port VNA is one that ensures that all 3 ports will always see an impedance of 50 ohms to ground, irrespective of the 2-port measurement being made.

The drawing below is an example of the Balun's three ports always seeing 50 ohms during a VNA measurement:


If all three ports always see an impedance of 50 ohms to ground (during VNA measurements), then the balun's "balanced" port is always balanced with respect to ground.
(Note -- this technique does not guarantee that a balance must always exist, but it should significantly reduce balanced-port imbalances.  After all, if the balun is mounted on a PCB and there is more ground-plane near one of the balanced terminals compared to the other terminal, an imbalance will exist due to differences in capacitive coupling to ground.  The 50 ohm terminations should help "level out" such imbalances, if these stray couplings are high impedances, but they cannot completely correct for poor balun design.)
We need to represent the 3-port network with its s-parameter matrix, which looks like:


How do we measure these nine s-parameters with a 2-port VNA?  Fortunately, there is a common procedure for doing this.

First, we measure the 2-port s-parameters (S11, S21, S12, S22)  between port 1 and port 2 of the 3-port network (for the Nooelec balun, this would be between the balun's unbalanced-port port and the port representing the first (of two) "balanced" terminal).  Port 3 is terminated with 50 ohms.

The second step measures the s-parameters between port 1 and port 3 of the 3-port network (i.e. between the balun's unbalanced-port and the port representing the second "balanced" terminal).  Port 2 is terminated with 50 ohms.

And finally, the third step measures the s-parameters between port 2 and port 3 of the 3-port network (i.e. between the two terminals of the Nooelec balun's balanced output).  Port 1 is terminated with 50 ohms.

Like this:


At the end of these three steps we will have collected 12 s-parameters (i.e. S11, S21, S12, and S22 for each of the three port-pairs).  We then use 9 of these measurements to populate the 3-by-3 s-parameter matrix.

Below is a photo showing the Nooelec Balun as a 3-port Network (with two SMA connectors added to the "balanced" port).  It is connected to a 2-port VNA via the two coax cables.  Note that the 3rd port of the balun is terminated with 50 ohms.


The following code block illustrates how Dick's code fills the 3x3 matrix (named 'balun_sp') from the two-port measurements


Note that SAB represents the 2-port measurements between ports 1 and 2 of the 3-port network.  SAC represents the 2-port measurements between ports 1 and 3 of the 3-port network.  And SBC represents the 2-port measurements between ports 2 and 3 of the 3-port network.


Determining Balun Loss

Now that we've populated the 3-port network's s-parameter matrix, what is the next step?  Loss depends upon load impedance, but an impedance (i.e. R + jX), conceptually, is a one-port network.  How do I connect a 1-port load to the  2 output ports of my 3-port network?

We need to somehow convert the two output ports back to one single port.  Then I can connect the load to  this port.  But this conversion must be done in such a way as to not throw the balun's "balanced" port into imbalance.

Dick's technique relies on a mathematical model of an "ideal" (no loss, no delay, no inductance) 1:1 transformer to convert the balun back to a 2-port network without losing the balance of the balanced port.

Conceptually, the balun network would look like the transformer-coupled balun I mentioned earlier in this post.  But this transformer isn't physical, it is mathematical and avoids the impairments a physical transformer would introduce:


To connect this "mathematical" transformer to the 3-port balun, Dick implements the transformer as a 3-port entity within MATLAB.  Being a 3-port network, two of the transformer's ports are then "virtually" connected to the two output ports of the 3-port balun.  And the third port of the transformer becomes an "unbalanced" port that connects to load.

Here is the 3-port network representation of the "ideal" 1:1 transformer:


The diagram below shows the connection of the balun's two output ports to the two input ports of the transformer (this connection is made mathematically using MATLAB's cascadesparams function).  The result is a 2-port network with one unbalanced input port and one unbalanced output port.


With this new network and using MATLAB's powergain function (and specifying a load impedance for the function's 'zl' input variable), we can calculate Gp (Operating Power Gain) given the load impedance.

Please note that this transformer is a mathematically "perfect" MATLAB model of a 1:1 transformer.  It has neither loss nor delay.  And given its 1:1 turns-ratio, its 3-port S-parameter matrix is:


Note, we can generalize the 3-port S-parameter matrix for an ideal transformer with an N:1 turns ratio as:


If you substitute '1' for N in the above equations, you'll get the numbers shown above in the 3x3 s-parameter matrix for the 1:1 transformer.  (More on the derivation of these equations later in this post).

Here's the MATLAB code to create the 3x3 s-parameter matrix for the transformer (given the turns-ratio 'N'), and cascade the two 3-port networks (the cascading is done with the last line of code).


Power loss is calculated as "Operating Power Gain" (Gp).  Loss depends upon load, and the MATLAB code calculates power loss for a set of given load resistance values (defined elsewhere in the code).

Note that a single line of MATLAB code performs the power-loss calculation.


OK, so we can treat the 2-port balun as a 3-port network, make a series of 2-port s-parameter measurements with a VNA (while keeping the balun's "balanced" port always balanced with respect to ground), and then use MATLAB to calculate balun's power-loss for a given load.

But what about measuring Common-Mode impedance?


Measuring Common-Mode Impedance:

To determine a balun's Common-Mode impedance, one technique is to measure the balun's reflection-coefficient when configured in "common-mode" (in which the input is shorted together and floated from ground, and the output is shorted together and tied to ground:


In other words, we are treating the balun as a single-port impedance (R + jX) tied across port 1 of the VNA and measuring its S11.  From S11 we can calculate its impedance.

But our balun is now a 3-port network.  How should we short the output ports?

 Dick mathematically creates a 3-port "T" connection and then cascades it with the balun's 3 port network, using MATLAB's "cascadesparams" function.  This "T" shorts the two balun output ports and attaches them to a third port, so that the resulting "cascaded" network is again a 2-port network.


The 3-port T's s-parameter matrix is:


To calculate common-mode impedance, rather than drive a "floating" Port 1, Dick instead shorts Port 1 to ground and measures the reflection coefficient at Port 2 using MATLAB's gammaout function. (Note that Port 1 is shorted to ground by setting the 'zs' input variable of the gammaout function to 0).

The resulting S22 measurement is the balun's common-mode impedance.

Here's how it looks:


Note that, functionally, this is the same as shorting the balun's output to ground, floating the input port, and measuring S11 from the floating input-port to ground.


Measurement Results:

I soldered two SMA jacks to the back of the Nooelec 1:9 Balun to turn it into a 3-port network (keeping its transformer's center-tap grounded) and then ran the series of s-parameter measurements.

Dick's MATLAB code takes these s-parameter measurements and plots a number of results versus frequency, as shown below:

Balun Power Loss

This is a plot of Gp (Operating Power Gain), but here it is plotted as a loss.

Note that I've calculated (and plotted) both Forward and Reverse power loss.  The turns-ratio of the ideal transformer used in the MATLAB code is 1:1.

Given the balun's usual application of being a receive balun with an antenna connected to its 450-ohm balanced port and a receiver (with a 50-ohm input?) connected to the balun's SMA, the curve-of-interest would be the cyan plot, not the yellow plot.


Common-mode Impedance:

Below is a plot of the balun's common-mode impedance.  Note that the calculation that  the common-mode impedance be measured at the network's output port.  So this is a measure of the network's S22.

Note how low the common-mode impedance is.  If you need common-mode rejection, add proper common-mode chokes.


S-parameters:

Below are plots of the balun's s-parameters (derived from the 3-port measurements).

Note that the loads to the input and output ports of the balun are both 50 ohms (at the output port this is because the "ideal transformer" has a turns ratio of 1:1).

The balun's S22 is around 450 ohms because the 50 ohms at the balun's input is multiplied by 9 (at least theoretically) by the balun's transformer.

And the balun's S11 is around 5.6 ohms because the VNA's 50 ohms connected to the balun's output port is divided by 9 by the balun's transformer.

S12 and S21 losses are in the 4.6 dB range because of the reflected-power at the input and output ports due to S11 and S22 not being anywhere near 50 ohms (power reflected back from the input port, for example, also manifests as a worse S21).



S11 of the balun's 50 ohm input port with a 450 ohm load at the balun's output:

The MATLAB code allows me to terminate the balun with a perfect 450 ohm load, resulting in the S11 plot, below.

You can see that the network's input impedance with a 450 ohm load is close, but not quite 50 ohms.



S11 of the balun's 50 ohm input port versus other load impedances:

This plot shows S11 for output loads from 350 to 600 ohms, in steps of 50 ohms.  Interestingly, the input's match to 50 ohms looks best when the load is 550 ohms (i.e. the red line), rather than 450 ohms.



Balun Power Loss versus load impedance:

And here is balun power loss for different output loads (from 350 to 600 ohms, in steps of 50 ohms), as well as a plot of power loss when the output port is driven and the SMA port sees 50 ohms.

Interestingly, as load-impedance drops, so does power-loss.



S-parameters with 3:1 Ideal Transformer:

The mathematical model of an ideal transformer used for the above plots has a turns-ratio of 1:1, but there's no reason why we couldn't use a "mathematically perfect" transformer with a different turns ratio to get a better match between the balun's output port and the VNA's 50 ohm impedance.

If a 3:1 "ideal" transformer is used in lieu of the 1:1 "ideal" transformer, then both S11 and S22 should be significantly close to 50 ohms.  Also, S12 and S21 should show less loss, because less power is being reflected back due to port mismatch.

The plot below compares the parameters of the balun with the 'ideal" 1:1 transformer (yellow traces) versus the balun with an "ideal" 3:1 transformer (cyan traces).  You can see that the 3:1 transformer brings the balun's input and output port impedances much closer to 50 ohms.



Balun Power Loss with 3:1 Ideal Transformer:

Here's a plot of power-loss with the 3:1 transformer replacing the 1:1 transformer.  And if you compare the plot below with the earlier plot made with the 1:1 transformer, the losses are essentially identical.



Comparing 3-Port Measurements with Back-to-back Balun Measurements:

Nooelec's measurements of loss were made by connecting the 450-ohm ports of two-baluns together and then attaching the VNA ports to the baluns' SMA connectors:


I thought I'd repeat this measurement, but I would calculate Gp rather than Insertion Loss.

Because input and output impedances of this back-to-back balun configuration should be around 50 ohms, it made sense to me to compare it to the 3-port balun that was cascaded with the "ideal" 3:1 transformer, which also has input and output impedances around 50 ohms.

So I purchased a second Nooelec balun and connected the two baluns as shown, above.  The results are below:

S-Parameter Comparison, Balun as a 3-port Network versus Two Baluns Back-to-back:

First, a comparison of S-parameters.  Note that the insertion loss (S21 and S12) of the back-to-back configuration is almost exactly twice the insertion loss of the single balun.

S11 and S22 are also worse for the back-to-back baluns.



Power Loss Comparison, Balun as a 3-port Network versus Two Baluns Back-to-back:

Interestingly, when I compare the power-loss of the two configurations (after first dividing the Gp loss of the two back-to-back baluns by 2 to approximate the loss of a single balun), the back-to-back baluns look better than the single balun.

I can explain why mathematically...S21 and S12 are essentially equivalent for the two configurations (if we first divide S21 and S12 of the back-to-back configuration by 2), but the worse S11 and S22 of the back-to-back configuration result in the calculated power-loss being less.  (See the formula for Gp, below).

Anyway -- that's the mathematical explanation.  Not very satisfying.




Other topics...


1.  What is Gp (Operating Power Gain) and Why do I Prefer it to Insertion Loss?

I am interested in the power dissipated within a balun.  If there is too much power, the balun breaks.

Gp is the power delivered by a network to its load minus the power entering into the input of the network. (Note that the power entering into the network's input is the power arriving at the input port minus the power reflected back from this network's input.  Whatever power isn't reflected by the input is power entering into the balun).

If Gp is positive, there is gain.  And if Gp is negative, there is loss.

If there is a loss, this loss represents the power lost within the network.  It is this power loss that heats up the network.

Here is the equation for Gp per the Mathworks website (to which I've added a few notes):


On the other hand, Insertion Loss includes input power that is reflected back by the network's input (due to input mismatch).  It does not enter the network, but it is included in the Insertion Loss quantity.  And because this reflected power is not dissipated within the balun, I do not want to include it in the balun's loss calculation.


2.  Deriving the 3-port Ideal N:1 Transformer S-parameter Matrix:

Dick used MATLAB's Symbolic Math to create the equations for the 3-port s-parameter matrices for the ideal transformer and for the ideal T connection.  But Dick is a much more experienced MATLAB user than am I.  So I've instead derived these s-parameters the old fashioned way, with quill and parchment.

As a reminder, a 3-port network has 9 s-parameters, and they are arranged in a 3x3 matrix as follows:


The diagram below recaps the port assignments of the ideal N:1 transformer.  Note that port 3 represents the transformer's "unbalanced" port.


Next are equations for the elements of the 3x3 s-parameter matrix:


And finally, here are my derivations of the above equations.

First, S11 and S22:


Next, S33:


Then, S21, S12, S31, and S32:


Note:  When Zload = Zsource = Zo, S21 = 2*(V2/Vg)  (See page 17 of:
https://www.ece.ucsb.edu/~long/ece145a/Notes4_Sparams.pdf)
Ditto for the other Transmission s-parameters.

And finally, S13 and S23:



3.  Deriving the 3-port T's S-parameter Matrix:

Below are my derivations of the s-parameters for the 3-port ideal "T" connection.

First, a recap of the port assignments.


Next are values for the elements of the 3x3 s-parameter matrix:


And finally, here are my derivations of the above equations.

First, S11, S22, and S33:


Followed by the rest of the S-parameters,  S31, S13, S32, S23, S21, and S12:


4.  MATLAB Script to Generate 3-port Transformer S-parameter Equations:

As I mentioned above, Dick used MATLAB's Symbolic Math to generate the 3-port Transformer's s-parameter equations.  Below is his MATLAB script.

(I've added a note in the script identifying the other MATLAB resources required to run it.)

% 3 Port Transformer Symbolic Analysis
% Dick Benson June 2020
%
% Note that this script requires MATLAB's Symbolic Math
% Toolbox and RF Toolbox as well as Dick's "Function Based
% Symbolic Circuit Analysis" package of scripts (etc.),
% available for download from the Mathworks MATLAB Central
% File Exchange site.
% - Jeff, k6jca
%
clear; close; clc;

syms N Z Zo real

    % S11 = (Z-Zo)/(Z+Zo);   Ports 2 and 3 terminated in Zo
    % Port 1  Z =  (Zo*N^2)  +  Zo
     Z = Zo*(N^2) + Zo;
     S11 =  simplify((Z-Zo)/(Z+Zo));
     S22 =  S11; % by inspection

     % Port 3  Z = (Zo+Zo)/(N^2)
     Z   =  2*Zo/(N^2);
     S33 =  simplify((Z-Zo)/(Z+Zo));

     % S21 = Power delivered to Port 2 from Port 1
     %       with Port 3 terminated in Zo.
     %   Equivalent a series resistor ----Zo*N^2----
     %   between ports 1 and 2.
     %
     % Y parameters for a series-R
     Y_series_R = [1 -1; -1 1]/(Zo*N^2);
     S = y2s_symbolic(Y_series_R,Zo);
     S21 = S(2,1);
     S12 = S21;

     % S13 = power delivered to port 1 from port 3
     %       with port 2 terminated in Zo
     % This is equivalent to having a 1:N transformer
     % with a series Zo on the secondary side.
     abcd_trans = [1/N 0; 0 N];
     abcd_series_Zo = [1 Zo; 0 1];
     abcd_cascade = abcd_trans*abcd_series_Zo;
     S_cascade = simplify(abcd2s_symbolic(abcd_cascade,Zo));
     S13 = S_cascade(1,2);
     S31 = S13;

     % S23 is simply S13 with 180 degree phase shift
     S23 = -S13;
     S32 = S23;

     S_Result =   [S11  S12  S13;
                   S21  S22  S23;
                   S31  S32  S33]
 
S_Result =
 
[   N^2/(N^2 + 2),      2/(N^2 + 2),      (2*N)/(N^2 + 2)]
[     2/(N^2 + 2),    N^2/(N^2 + 2),     -(2*N)/(N^2 + 2)]
[ (2*N)/(N^2 + 2), -(2*N)/(N^2 + 2), -(N^2 - 2)/(N^2 + 2)]
 


5.  A Note regarding Common-Mode Z derived from S11 Measurements:

If Common-Mode Z is high, beware that an S11 measurement might be inaccurate due to resonance with the test fixture.

I have personally found that there is about 2 pF of capacitance, to ground, at the port where I measure S11.  This capacitance can form a parallel-resonant circuit with the choke's inductance and lower the "peak-impedance" frequency.

If it appears that you might have a resonance (i.e. sharp peak, for example, and phase passes through zero at the peak's frequency), I'd recommend using G3TXQ's method of deriving CM Z using S21 (in lieu of S11).

For more on this techniques, see this blog post:

http://k6jca.blogspot.com/2018/06/transmit-common-mode-chokes-11-current.html



Resources:

I have uploaded Dick's MATLAB 3-port Balun Analysis code and examples to my Github site.  You can download them from:
https://github.com/k6jca/Three_Port_Balun_Analysis

The MATLAB code written by Dick Benson requires, of course, MATLAB.

In addition, it requires the associated MATLAB RF Toolbox and also the "S-Parameter Utilities" that Dick has uploaded to MATLAB Central: (see below).  You can download the "S-Parameter Utilities" package via the link,
  • S-Parameter Utilities (Very useful!  A number of these utilities, such as s1p_viewer, are used by Dick's other MATLAB scripts).
Dick has also written a number of other packages available on the Mathworks MATLAB Central File Exchange site (here).  Of particular interest are the following:
The latter two uploads of Dick's require MATLAB's "Instrument Control Toolbox" in addition to the "RF Toolbox".



My Balun (and 80-Meter Loop) posts:








Standard Caveat:

I might have made a mistake in my designs, schematics, equations, models, etc.  If anything looks confusing or wrong to you, please feel free to leave a comment or send me an email.

Also, I will note:

This design and any associated information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without an implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

No comments: