S-parameter curves in LTspice

Call me dense, but after many years of using LTspice, during which many times I inserted return-loss bridges into my circuits to measure S11, someone pointed out to me that LTspice has a directive for that.

Just insert ".net V1 v(out)" somewhere into the schematic, and an S11 trace will become available.

I'm still missing some of the finer points however: The resulting S11 only makes sense with the directive above. The docs seem to say that it should be ".net v(out) V1", but then the resulting S11 makes no sense that I can see. With the latter form, I also get the three missing S- parameters, as well as H, Z and Y parameters. S21 makes no sense either. I don't know yet about the others. If I insert ".net I(R1) V1", with R1 the output load, S11 is OK again. I'm puzzled. Maybe someone can shed some light on this?

For the curious, below is the circuit I've been playing with. It's a constant impedance O(6) Bessel low-pass filter. It's more an exercise in filter synthesis than a practical design...

Jeroen Belleman

Version 4 SHEET 1 1468 680 WIRE -96 -80 -144 -80 WIRE 16 -80 -32 -80 WIRE 64 -80 16 -80 WIRE 176 -80 144 -80 WIRE 288 -80 256 -80 WIRE 400 -80 288 -80 WIRE 464 -80 400 -80 WIRE 608 -80 544 -80 WIRE 736 -80 688 -80 WIRE 848 -80 736 -80 WIRE 896 -80 848 -80 WIRE 1104 -80 976 -80 WIRE 16 -32 16 -80 WIRE 288 -32 288 -80 WIRE 400 -32 400 -80 WIRE 1104 -32 1104 -80 WIRE 736 -16 736 -80 WIRE 848 -16 848 -80 WIRE 16 96 16 48 WIRE 288 96 288 32 WIRE 400 96 400 48 WIRE 736 96 736 48 WIRE 848 96 848 64 WIRE 1104 96 1104 48 WIRE -144 176 -144 -80 WIRE -144 176 -496 176 WIRE -16 176 -144 176 WIRE 160 176 64 176 WIRE 256 176 160 176 WIRE 544 176 336 176 WIRE 592 176 544 176 WIRE 896 176 672 176 WIRE 1008 176 896 176 WIRE 1056 176 1008 176 WIRE 1056 192 1056 176 WIRE -496 208 -496 176 WIRE 160 208 160 176 WIRE 544 208 544 176 WIRE 896 208 896 176 WIRE 160 288 160 272 WIRE 544 288 544 272 WIRE 896 288 896 272 WIRE 1056 288 1056 272 WIRE -496 304 -496 288 FLAG 1056 288 0 FLAG 896 288 0 FLAG 544 288 0 FLAG 160 288 0 FLAG -496 304 0 FLAG 1008 176 out FLAG 1104 96 0 FLAG 848 96 0 FLAG 736 96 0 FLAG 400 96 0 FLAG 288 96 0 FLAG 16 96 0 SYMBOL ind -32 192 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 5 56 VBottom 2 SYMATTR InstName L1 SYMATTR Value 1.5124 SYMATTR SpiceLine Rser=0 SYMBOL ind 240 192 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 5 56 VBottom 2 SYMATTR InstName L2 SYMATTR Value .8125 SYMATTR SpiceLine Rser=0 SYMBOL ind 576 192 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 5 56 VBottom 2 SYMATTR InstName L3 SYMATTR Value .3785 SYMATTR SpiceLine Rser=0 SYMBOL cap 144 208 R0 SYMATTR InstName C1 SYMATTR Value 1.0329 SYMBOL cap 528 208 R0 SYMATTR InstName C2 SYMATTR Value .6072 SYMBOL cap 880 208 R0 SYMATTR InstName C3 SYMATTR Value .1287 SYMBOL res 1040 176 R0 SYMATTR InstName R1 SYMATTR Value 1 SYMBOL voltage -496 192 R0 WINDOW 3 -185 164 Left 2 WINDOW 123 24 124 Left 2 WINDOW 39 0 0 Left 2 SYMATTR Value PULSE(0 1 1 1m 1m 1m) SYMATTR Value2 ac 1 SYMATTR InstName V1 SYMBOL cap -32 -96 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C4 SYMATTR Value {1/1.06998} SYMBOL res 0 -48 R0 SYMATTR InstName R2 SYMATTR Value 1 SYMBOL ind 48 -64 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 5 56 VBottom 2 SYMATTR InstName L4 SYMATTR Value 2.44663 SYMATTR SpiceLine Rser=0 SYMBOL res 272 -96 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R3 SYMATTR Value 1.61635 SYMBOL cap 272 -32 R0 SYMATTR InstName C5 SYMATTR Value .501225 SYMBOL res 384 -48 R0 SYMATTR InstName R4 SYMATTR Value {1/.23388} SYMBOL res 704 -96 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R5 SYMATTR Value 1.0087 SYMBOL ind 448 -64 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 5 56 VBottom 2 SYMATTR InstName L5 SYMATTR Value 1.67931 SYMATTR SpiceLine Rser=0 SYMBOL ind 880 -64 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 5 56 VBottom 2 SYMATTR InstName L6 SYMATTR Value .944529 SYMATTR SpiceLine Rser=0 SYMBOL res 1120 64 R180 WINDOW 0 36 76 Left 2 WINDOW 3 36 40 Left 2 SYMATTR InstName R6 SYMATTR Value 3.55786 SYMBOL cap 720 -16 R0 SYMATTR InstName C6 SYMATTR Value .330091 SYMBOL res 832 -32 R0 SYMATTR InstName R7 SYMATTR Value {1/.397832} TEXT 240 352 Left 2 !.ac dec 100 10m 10 TEXT 240 392 Left 2 !;tran 10 TEXT 248 304 Left 2 !.net v1 v(out)

Reply to
Jeroen Belleman
Loading thread data ...

I have no idea what that LTspice directive does, but maybe these appnotes will shed some light...

...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Ah, there's an even simpler return-loss bridge in there than what I've been using. Thanks.

In the mean time, I've been perusing some LTspice courses and hints, and they seem to prefer the ".net I(R1) V1" form, which indeed worked for me too. Presumably they had the same problem. ;-) Frankly, I don't even get why the *output* load should appear in there at all. S11 is the reflection from the *input*.

Jeroen belleman

Reply to
jeroen Belleman

The other option, is simply to use an alternative, but design equivalent, method of specifying circuit conditions. I do that here:

formatting link

To wit, drive the amp with the source, say 50 ohm, and make a statement on the the frequency range of say, 1db variance from -6db attenuation and, say

+/-10 degs from 0, or whatever.

The R.F. universe sits in a universe by itself. There is no technical reason to use and think in terms of s-parameters at all. This is a historical artefact. All design parameters can simply be reformulated in a way that ANY Spice can handle directly. So long as all blocks are consistently specified, it all cancels out in the wash.

Its a bit like you yanks living in the past with your 105 deg F in TX, when the rest of the sensible world moved on to Centigrade in the last century. No one here converts to Fahrenheit to understand why its hot where jimmy T lives, we all know 45 degrees C has fried his brain a while back.

Kevin Aylward B.Sc.

formatting link
formatting link
- SuperSpice.

Reply to
Kevin Aylward

...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

I agree with you, Kevin. S11 means a lot less to me than Zin which is easy to plot in the simulation universe. However, Zin is not so easy to measure in our universe at very high frequencies, thus the S11 approach.

John S

Reply to
John S

I only live in the simulation universe now, the lower level staff can deal with the real world and report back the results :-)

Kevin Aylward B.Sc.

formatting link
formatting link
- SuperSpice.

Reply to
Kevin Aylward

In that universe, you are correct. It might be nice to visit the other universe occasionally to discover the difficulties encountered to report the results you are using. Nevertheless, I accept and understand your position on the matter.

Cheers, John S

Reply to
John S

Bridges are still the most accurate way to compare impedances, and S11 is just the what comes out of a bridge. One gets used to it. I tend to favour S11 for impedance close to the reference and Zin when it's far away, but that's just me.

Using S11 at or close to DC tends to raise some eyebrows, but there is nothing against it, really.

Jeroen Belleman

Reply to
jeroen Belleman

Oh yes, that's fine. I just never use the .NET directive in LTSpice because of the problem you brought up. I simply plot Zin, which is the same thing and easier to remember.

I know. Now try to tell somebody that you can measure the power factor of a switching load on a battery. That will raise eyebrows, too.

John S

Reply to
John S

Not the same thing, of course. I meant to say Zin is my goal so S11 is an extra step for me.

Reply to
John S

I don't even plot Zin. Its redundant information. I just plot the voltage to see if it attenuated too much or little. What matters are only the final voltages, currents and frequency/transient response of the complete system. S,H, Z, ABCD, parameters etc are only artefacts invented to determine volts and amps 80 years ago with pencil and paper when they didn't have computers. They are, essentially, not necessary. Its er...ahmmm... a paradigm shift....

e.g. Have a a signal feeding a model of the Rx antenna, taking the out from the antenna model into the receiver etc, and have the PA amp drive a model of the transmit antenna with an output sensing the radiation resistance part of the model.

You can then do 10,000s of multiple parameter sweeps for all the tuned components and pick the ones that get you the desired voltages and currents. i.e. Its irrelevant what the actual VSWR is, what matters, e.g., is whether the transmitter blows up with overvoltage when you disconnect its load and so forth. As prior noted my 4 year old Dell comes in at 30 GFLOPS.

Simulators give you all this information directly, without having to piss about with legacy concepts, e.g. smith charts.

Regards

Kevin Aylward B.Sc.

formatting link
formatting link

Reply to
Kevin Aylward

To each his own. In my case, I have capacitive transducers producing signals at the far end of long coax cables. If I don't terminate them correctly, I get reflections that mess up measurements two cable delays later. S11, or more often 20*log|S11|, is an excellent indicator of the quality of the match.

Jeroen Belleman

Reply to
jeroen Belleman

I think this still misses my point. The voltage and phase give the exact same information. That was the point about the Fahrenheit and Celsius. If everything is handled in the same mode of thought, it all cancels out, with no conversion necessary.

Regarding the initial issue of this thread. Spice does not deal with S-parameters, it deals with volts and amps. The solution is to think and do everything in volts and amps.

Kevin Aylward B.Sc.

formatting link
formatting link
- SuperSpice

Reply to
Kevin Aylward

Of course, and no, I didn't miss your point. But I still prefer to think in terms of incident and reflected waves in many cases. YMMV.

Jeroen Belleman

Reply to
Jeroen Belleman

Oh... those imaginary ones...

Kevin Aylward B.Sc.

formatting link
formatting link

Reply to
Kevin Aylward

I suspect it may have to do with your lack of specifying "Rout," as the doc umentation puts it. You have R1=1, but perhaps it is in parallel with th e 1 ohm the .net parameter puts in by default when it is unspecified. Basi cally, I think you are terming the right side with 0.5 ohm instead of 1.0 o hm when you don't specify. Make R1=1e12 or something like that, and see what happens.

I am not sure why ".net V1 v(out)" even works at all, as you've swapped I/O . There is a reason, I'm sure, but I wouldn't bother with unorthodox forms at this point. (I typically use the ".net I(R1) V1" form, and have never found a problem with it.)

Unless S12 is zero, the load most certainly matters.

Let us know what you discover.

Reply to
Simon S Aysdie

ISTR that the British media use(d) Fahrenheit for a "heat wave" (sic), and Celsius for cold weather ;-)

--
"Design is the reverse of analysis" 
                   (R.D. Middlebrook)
Reply to
Fred Abse

S11 is just reflection coefficient. Easy to visualize, and measure.

LTspice ".net" directive gives Zin, Zout, Yin, Yout, S-params, H-params, Y-params, and Z-params. There's gotta be something in there for most people ;-)

--
"Design is the reverse of analysis" 
                   (R.D. Middlebrook)
Reply to
Fred Abse

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.