Scattering Parameter
Simulation in WinSPICE3.
In this note we outline one of the ways we at Silicon
Devices simulate scattering parameters using WinSPICE3, a generic net-list driven linear and
non-linear SPICE simulator. The netlists accompanying this note
(available from our website) may easily be modified
for use in other SPICE simulators by virtue of the use of generalized primitive
functions in the netlist. Node names are meaningful easing the
writing of the mathematical
functions in WinSPICE3's graphical post-processor which minimizes the
simulator's calculation overhead. The example netlist with this
note reproduces
scattering parameter plots like those to be found in some component
manufacturers'
datasheets.
[return to
SDL design resources]
With reference to the full
schematic for the balanced input/output "Vector Network Analyser"
model, following, we see that the split source E1a/E1b and split source
resistance R1p/R1n convert the single ended input to a balanced
input. The input port common-mode bias is provided by Vdc1 and
Rcm1. Usually Vdc1 is set to 0V and Rcm1 is set to a very high
value (1E12) to prevent it loading either of the input ports,
P1p/P1n. E2c/E2d, R2p/R2n, Vdc2 and Rcm2 fulfill a similar role
for the output port P2p/P2n. By reducing Rcm1 to a low value,
Vdc1 acts as the power source for an input "Bias-T" for a balanced
input device. Similarly Rcm2 and Vdc2 can act as a bias-tee for
the output port. To allow us to calculate the scattering
parameters correctly, the isolated loops containing Rz1 with Iz1 and
Rz2 with Iz1 allow us to pass the parameter Zo1 and Zo2 into the
graphical post processor for carrying out scattering parameter
conversions to other parameter sets; for example impedance parameters
to determine input and output impedances for the device under test
(DUT).
Having created the VNA netlist, we need to control
the direction of signal flow to correctly plot the scattering
parameters; either VS1 or VS1 should be active during a simulation, not
both. WinSPICE3 is powerful for this type of simulation script
control and allows us to simulate twice; alternately with each source
whilst plotting the voltage at node S11 and S21 with VS1 active and
nodes S12 and S22 with VS2 active. By plotting the real and
imaginary parts of S11 and S22 on a log frequency x ordinate we should
see something like the following:
WinSPICE3 has an internal command which allows us
to plot these parameters on a complex x-y plane as a "Smith Chart" thus:
Once we can correctly plot a Smith
Chart, we can go on to calculate input and output impedance
by implementing the expressions needed from the scattering parameters
in
WinSPICE3's graphical post-processor (that is, enter the appropriate
equations). The resistive or real part of the input impedance can
be calculated with:
Rin =
Zo1(Re((1+S11) / (1-S11))
which in WinSPICE3 plot syntax is:
ac1.v(Zo1)*real((1+ac1.v(S11))/(1-ac1.v(S11)))
where " ac1." means the first AC simulation (see
the netlist with this note for clarification) when the input voltage
source AC1 is active. A similar equation is written for the
output resistance:
ac2.v(Zo2)*real((1+ac2.v(S22))/(1-ac2.v(S22)))
where "ac2." means the second AV simulation (where
AC2 is active). The input and output reactance is found by
altering "real" to "imaginary". The output plot should look
something like this:
We see that the input and output reactance is negative (capacative) for
this example. We can now see the utility of naming critical node
with parameter names, allowing the transformation equations to be
entered directly into the netlist.
Forward and reverse gain can be calculated with:
MAG =
20*log(S21) ANG = 180/PI*atan(imag(S21)/real(S21))
MAG =
20*log(S12) ANG = 180/PI*atan(imag(S12)/real(S12))
With AC1 active and AC2 active respectively.
The output plot will look like this:
We can also calculate "unilateral transducer gain"
for a "Device under
test" with:
Gum =
10*log(abs(S21)^2/((1-abs(S11)^2)*(1-abs(S22)^2)))
which uses results from both simulations,
resulting in a plot lke this:
In the examples above, we used a
NPN RF transistor, for which we need a model file for the DUT; which is
included in
the example netlist we have
provided with this note, being the BFR93AW
from Philips. Correctly
biasing a transistor DUT requires a a
"dummy" or "replica" device biased at the required current and voltage
level which is then used to bias the DUT through the VNA ports thus:
Notice that this is only possible in a simulation testbench and cannot
be implemented practically due to mis-matches between the replica and
the DUT. A one micro-ohm resitor is added into each device arm in
the netlist (but not drawn in schematic above) to allow the correct
naming and to prevent convergence problems. Large value Inductors
are also added into the netlist across the VNA ports to ensure that
both devices see the same DC bias.
In this note, we have seen how we may create a
"balanced" VNA model,
then
simulate scattering parameters for a commercially available active
device using a
simple test-bench in a readily available SPICE simulator, by
implementing a few
simple mathematical formulae along with published device model
libraries.
The test-bench used in the above
examples maybe
downloaded at VNAtest.zip. If
you wish to explore VNA modelling further please contact the author.
You may also wish to
contact Technical@SiliconDevices.com for an updated copy of the test
bench as it is in continuous development because we use similar AC and
TRAN testbenches to simulate our IPcells throughout
their design
cycle.