How to extract S-parameters (S11, S21, S21, and S22) from passive network?

So, I’ve designed and simulated 5-pole Chebyshev BP filters in LTSpice VII and also in QSpice 2 weeks ago. In LTSpice, I used the .net directive to obtain S11 for the filter’s Return Loss.

I spoke with Mike Englehardt about QSpice not supporting the .net directive yet. He recommended I read an article about how to extract S-parameters in this QSpice forum from Frank Wiedemann. I’ve searched and haven’t found it yet.

Can anyone respond with a link to this article or a method to extract S-Parameters in QSpice?
Thank you in advance,

To search a user, in search bar, type @ before username. Here is an example


Thanks for the links below. I’ve checked all three links and I could not find any mention of simulating S-parameters from @frank.wiedmann on the QSpice forum. What am I missing?

I’ve attached a paper that does describe an alternate method for extracting S11 and S21 simulated graphs that you could list on your forum. I’m adding this email to my forum question.
PSpice S-parameters

Best Regards,
John Trites

I suppose that Mike @Engelhardt was referring to the Winslow Impedance Probe, which is not quite the same as the .net directive, but can also be pretty useful. For simulating the S-parameters of a circuit directly, I would also recommend the setup shown in Figure 25 of

This is not a complete S-parameters extraction, as my work normally only requires to get S11 (sometime S21), and this is the method I use. I have a more detail explanation upload to Github for your reference.

Qspice/Supplementary/Explanation of S11 and S21 in Spice Simulation.pdf at main · KSKelvin-Github/Qspice

Here is an example to measure a pi-network and compare its result with SimNEC (SimSmith). This method normally good enough for me to yield a result to compare with measurement from network analyzer.
Limitation of Qspice is that its waveform viewer not support Cartesian representation, and you have to export data and post-process it with other software to get SmithChart representation for S11.

Based on @frank.wiedmann reference link, convert test circuit as this MicroSim App Note and yield the same results. I didn’t think about adding another 1V source can get S11 directly from port1 voltage. But above post can still help you to plot S11 into a SmithChart, and leave a reference about how to use a single source to get S11 and S21.

@KSKelvin By the way, it is not necessary to use an external program to plot the result of an .ac analysis in the complex plane, although some effort is required to configure the plot accordingly. As an example, I have attached a plot config file for the Tian.qsch demo circuit from the QSPICE distribution. Because it is not possible to upload a .pfg file to this forum, I have renamed it as a .txt file. In order to use it, you have to rename it back to Tian.pfg.
Tian.txt (160 Bytes)

@frank.wiedmann I did consider this method but so far not possible to get Im(S11()) to display a negative number. I guess the reason is that waveform viewer always plot .ac result (imaginary number format) with its magnitude and phase, where magnitude is always with abs() operator. Here is what I get if to setup a plot with x-y scatter.

If I put the plot against frequency, we determine whether this Re() or Im() value is positive or negative from phase (0 degree or 180 degree).

So far, I cannot find a way in waveform viewer can display a negative value. I hope one day when Mike has time can give Cartesian representation, which may be the best way to deal with this type of plot.

1 Like

I mistakenly tried to respond to your 2 replies by email but got 2 send errors. So, I’ll thank you again for providing these great detailed responses about extracting S-Parameters in QSpice. I’ve tried both methods and chose the method you and Frank provided with the simple Pi filter. Works like a charm.
I too use SimSmith (now SimNEC) since 2013 and have successfully simulated my same filters.
John Trites NO5X

1 Like

Thank you for the paper in this link on extracting S-Parameters. I remember having an old PSpice book over 20 years ago that contained this info. However, it’s in storage in some box that I haven’t found yet.
For my filter project, I implemented your simpler method later in this thread.
John Trites NO5X