Skip to content

S-parameters for the novice ​

S-parameters describe how a circuit responds to waves arriving at its ports. At RF frequencies, they answer two useful questions: how much of an incident wave returns to its source, and how much emerges from another port? Each S-parameter is a complex ratio, so it carries both magnitude and phase. It has no units and generally changes with frequency.

What the four numbers mean ​

For a two-port circuit, let a1 and a2 be waves traveling into ports 1 and 2, and b1 and b2 be waves traveling out. Their relationship at one frequency is:

b1=S11a1+S12a2b2=S21a1+S22a2
ParameterMeaningMeasurement condition
S11Reflection seen at port 1b1/a1 with a2=0
S21Transmission from port 1 to port 2b2/a1 with a2=0
S12Transmission from port 2 to port 1b1/a2 with a1=0
S22Reflection seen at port 2b2/a2 with a1=0

Setting a2=0 means port 2 is terminated in its reference impedance, so no wave arrives from that port. It does not mean that the voltage at port 2 is zero. Here the reference impedance is 50Ω at both ports. For background on incident and reflected waves, see the Rohde & Schwarz S-parameter primer.

Hand calculation: a 5 nH inductor at 2 GHz ​

nP.L() models an ideal series inductor between two ports:

text
50 Ω reference          L = 5 nH          50 Ω reference
    port 1 ─────────────[ inductor ]───────────── port 2

First calculate its impedance at f=2×109Hz:

ω=2πf=12.566370614×109rad/sZ=jωL=j(2π)(2×109)(5×10−9)=j62.831853072ΩZ0=50Ω2Z0=100Ω

To see where the S-parameter formulas come from, send a voltage wave V+ into port 1 while port 2 is matched. Call the reflected wave V− and the transmitted wave Vt. The same current flows through the series inductor and the port 2 termination:

I=V+−V−Z0I=VtZ0Vt=V+−V−ZI=(V++V−)−Vt2V−=ZZ0(V+−V−)

Solving for the two wave ratios gives the same formulas used by L.js:

S11=V−V+=ZZ+2Z0S21=VtV+=2Z0Z+2Z0

The circuit is symmetric and reciprocal, so S22=S11 and S12=S21. Now substitute the impedance and multiply each fraction by the complex conjugate of its denominator:

D=100+j62.831853072|D|2=1002+62.8318530722=13947.841760436S11=j62.831853072D=62.8318530722+j(100)(62.831853072)|D|2=0.283043200+j0.450477243S21=100D=1002−j(100)(62.831853072)|D|2=0.716956800−j0.450477243

Thus, at 2 GHz:

ParameterComplex valueMagnitudeMagnitude in dB
S11=S220.283043+j0.4504770.532018−5.481dB
S21=S120.716957−j0.4504770.846733−1.445dB

The dB values are 20log10⁡|S|. With matched reference impedances, the reflected and transmitted power fractions are |S11|2=0.283043 and |S21|2=0.716957. They sum to 1 because this model has no resistance. The negative S21 dB value comes from reflection, not dissipative loss.

How nP.L() builds the nPort ​

The public nP.L() constructor uses src/np-nport/src/rlc/L.js. It reads the selected analysis frequencies and reference impedance, creates a two-port nPort, and repeats the calculation for every frequency. The essential steps are:

js
var lPort = new nPort;
var settings = componentSettings(global, options);
var frequencyList = analysisFrequencies(settings);
var Zo = complex(global.Ro, 0);
var two = complex(2, 0);
var sparsArray = [];

for (var i = 0; i < frequencyList.length; i++) {
  var Z = complex(0, 2 * Math.PI * L * frequencyList[i]);
  var s11 = Z.div(Z.add(Zo.add(Zo)));
  var s21 = two.mul(Zo).div(Z.add(Zo.add(Zo)));
  var s12 = s21;
  var s22 = s11;
  sparsArray[i] = [frequencyList[i], s11, s12, s21, s22];
}

lPort.setspars(sparsArray);
lPort.setglobal(settings);
return lPort;

complex(0, ...) represents the inductor's jωL. The complex arithmetic methods perform the same divisions as the hand calculation. Each .spars row contains the frequency followed by four complex S-parameters in the order [frequency, s11, s12, s21, s22]. setglobal(settings) records the analysis settings on the returned nPort. With one frequency in fList, the nPort has one row; with a sweep, it has one row per frequency.

Try the 2 GHz case in nPort:

js
var g = nP.global;
g.Ro = 50;
g.fList = [2e9];

var l1 = nP.L(5e-9);
var sParameters = l1.out('s11Re', 's11Im', 's21Re', 's21Im', 's11dB', 's21dB');
nP.log(sParameters);

sParameters is a numeric table headed by Freq and the requested selectors. Its single data row agrees with the values above. The nPort itself retains the complex values in l1.spars[0]; .out(...) extracts numbers suitable for a chart or table. See the nPort object guide for more output selectors.

Continue with nPort overview to see how component nPorts become a circuit model.