Circuit Mason‎ > ‎Advanced Topics‎ > ‎

## Motivation

Some degree of confusion about measurements and simulations stems from misinterpretations about S-Parameters.  The following assumes some basic understanding of S-Parameters, starting with a review of the math and hitting a lot of the fallacies I've run across.  Finally, I cover how to best use S-Parameters with Mason.

The first section (definitions) has a lot of  math, albeit simple math.  After that I try to keep it in paragraph form, to exactly describe in words some of the implications.  Advanced users might want to just read the big red bullets, and please check out the Mason specific applications.

## Definitions (Quick review before it gets interesting)

S-Parameters are a ratio of voltage waves.  Recall the classic voltage waves traveling down a transmission line: V1+ is an incident wave, and V1- is the reflected wave.  The strength of the reflected voltage wave is determined by:

At this point we have defined the relationship between the incident and reflected voltage waves to a single S-Parameter.  The actual voltage is the sum of the incident and reflected voltage... more on that later

#### Note 1: S-Parameters deal with voltage waves.  Not power, not voltages as measured with a multimeter (although the voltage V1 = V1++ V1-), only voltage waves.

Things get more interesting for a two-port network.  The following definitions and points extend for whenever you have more than one port.  Consider the following two-port network with four relevant voltage waves.

As in the one-port case, the incident and reflected voltage waves are related to the S-Parameter.

Now here's what the these equations imply: in order to define the S-Parameter, one port has to be driven and the rest of the ports have to be terminated.

## Voltage versus Power

These relationships are all ratios of voltage waves, and to some extent describe a voltage gain (more on that later).   These are not power "waves" or any such nonsense.  People often relate the power gain as:
Similarly, people will use 10*log10 for power gain, and 20*log10 for voltage gain.  The assumption that is often made implicitly is that all of the ports are terminated with the same impedance.  If the port impedances are not equal but are real, then this relationship can be fixed with the following:

Note that all we have done is preserved the power equation P=V^2 / R.

## Driving more than one port

S-Parameters are only valid for the condition that one port is driven and the rest are terminated.  Consider the case of the four-way combiner, for port 1 being the input and ports 2-5 being the output.  If port 1 is driven, it makes sense that port 2 will have a voltage wave -6dB less than the input (one quarter the power).  But as stated above, if instead the four "output" ports are driven, obviously the -6dB number is not valid: we broke one of the S-Parameter conditions.  Two approaches can be taken.

#### Excess Loss

The engineering approach is a concept of excess loss: how much loss do we see beyond the expected power divider loss.  For example, a four-way divider theoretically has a -6dB loss.  In reality, the device will have some loss; consider if the actual divider measured -7dB.  The 1dB difference between the theoretical loss and the measured loss is the excess loss, and it is the power burned up inside the device and/or reflected by the inputs (S11 keeps some power from even entering the divider).

Simply sum the power going into the combiner (e.g., 1mW into four ports is 4mW, or 6dBm) and subtract out the 1dB of excess loss (so 5dBm is at the combiner port, or 3.2mW).

#### Real Math

So perhaps you want a more exact answer, or don't trust "engineering" math.  Doing the math for real isn't hard.
The voltage wave coming out of port 1 (the summed port) is equal to the weighted sum of all of the incident waves.  V1+ is equal to zero (this is the output port), and assuming all ports are driven equally then.... that's just the standard power / voltage / resistance relationship.

To get the power coming out of the system... it's the same power relationship again.
So, doing it for real really isn't so hard.  If your intuition is throwing a red flag, go through the math:
1. For a four way combiner, the S-parameter gains are 0.5.
2. The incident voltages are 7.07V for 1W incident power and a 50-ohm system.
3. The output voltage wave is 28.28V
4. The output power is 4W.

## Circuit Mason

By understanding the fundamentals of S-Parameters, one can better apply them to the design process.  Since Circuit Mason and  Mason Plot both use an advanced math parser, one can optimize and plot not just for simple S-Parameters but instead potentially more relevant figures of merit.  Simple S-Parameter terms such as return loss or simple gain are not defined below.

To make it easier to copy and paste into Circuit Mason or Mason Plot, all these equations will be in text form.

Eventually I'll  fill in the different amplifier gain equations... to much to transcribe correctly at this hour....

#### Insertion Loss

Whereas the traditional S-Parameter gain penalizes the device for mismatch, the insertion loss only looks at the loss (or gain) within the device itself.
IL = 10*log10(pow(abs(S_2_1),2) / (1-pow(abs(S_1_1),2)))

#### Differential impedance (Port 1 and Port 2 measured single ended)

S_d1_d1 = 0.5*(S_1_1+S_2_2) - 0.5*(S_2_1+S_1_2)

#### Common mode impedance (Port 1 and Port 2 measured single ended)

S_c1_c1 = 0.5*(S_1_1+S_2_2) + 0.5*(S_2_1+S_1_2)

#### VSWR (Voltage Standing Wave Ratio)

Optimizing for VSWR is the same as optimizing for return loss, but one may want to plot VSWR.
VSWR = (1+abs(S_1_1)) / (1-abs(S_1_1))

#### Phase

To compare phasing, it is nice to look at relative phase shifts, and to compare these plots on top of each other you may need to add some fixed phase delay.
arg(S_3_1/S_2_1)+90  [S_3_1 relative to S_2_1, shifted by 90-degrees]
arg(S_5_1/S_2_1)-90  [S_5_1 relative to S_2_1, shifted by 90-degrees]

Mason Plot does do phase unwrapping in degrees (using the Arg plot option).  However, purely as an example, this is a way to also to unwrapping by equations (using the dB plot option).

if(arg(S_4_1/S_2_1)+180<180,arg(S_4_1/S_2_1)+180,arg(S_4_1/S_2_1)-180)
[S_5_1 relative to S_2_1, shifted by +/-180-degrees]