Electronics-Related.com
Forums

S-parameter curves in LTspice

Started by Jeroen Belleman May 9, 2014
On 5/11/2014 3:57 PM, John S wrote:
> On 5/10/2014 4:05 PM, jeroen Belleman wrote: >> On 10/05/14 18:37, John S wrote: >>> On 5/10/2014 3:08 AM, Kevin Aylward wrote: >>>>> "Jeroen Belleman" wrote in message >>>>> news:lkis08$6i0$1@speranza.aioe.org... >>>> >>>>> 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 other option, is simply to use an alternative, but design >>>> equivalent, method of specifying circuit conditions. I do that here: >>>> >>>> http://www.kevinaylward.co.uk/ee/lna/lna.html >>>> >>>> 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. >>>> www.kevinaylward.co.uk >>>> www.anasoft.co.uk - SuperSpice. >>> >>> 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 >> >> >> 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. > > 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.
Not the same thing, of course. I meant to say Zin is my goal so S11 is an extra step for me.
"John S"  wrote in message news:lkoo8h$unf$1@dont-email.me...

On 5/10/2014 4:05 PM, jeroen Belleman wrote:
> On 10/05/14 18:37, John S wrote: >> On 5/10/2014 3:08 AM, Kevin Aylward wrote: >>>> "Jeroen Belleman" wrote in message >>>> news:lkis08$6i0$1@speranza.aioe.org... >>> >>>> 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 other option, is simply to use an alternative, but design >>> equivalent, method of specifying circuit conditions. I do that here: >>> >>> http://www.kevinaylward.co.uk/ee/lna/lna.html >>> >>> 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. >>> www.kevinaylward.co.uk >>> www.anasoft.co.uk - SuperSpice. >> >> 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 > > >> 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.
>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 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. www.kevinaylward.co.uk www.anasoft.co.uk
On 12/05/14 18:35, Kevin Aylward wrote:
> "John S" wrote in message news:lkoo8h$unf$1@dont-email.me... > > On 5/10/2014 4:05 PM, jeroen Belleman wrote: >> On 10/05/14 18:37, John S wrote: >>> On 5/10/2014 3:08 AM, Kevin Aylward wrote: >>>>> "Jeroen Belleman" wrote in message >>>>> news:lkis08$6i0$1@speranza.aioe.org... >>>> >>>>> 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 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. >>>> >>>> [...] >>>> Kevin Aylward B.Sc. >>>> www.kevinaylward.co.uk >>>> www.anasoft.co.uk - SuperSpice. >>> >>> 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 >> >> >>> 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. > >> 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 don't even plot Zin. Its redundant information.
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
"jeroen Belleman"  wrote in message news:lkr59l$s43$1@speranza.aioe.org...

On 12/05/14 18:35, Kevin Aylward wrote:
> "John S" wrote in message news:lkoo8h$unf$1@dont-email.me... > > On 5/10/2014 4:05 PM, jeroen Belleman wrote: >> On 10/05/14 18:37, John S wrote: >>> On 5/10/2014 3:08 AM, Kevin Aylward wrote: >>>>> "Jeroen Belleman" wrote in message >>>>> news:lkis08$6i0$1@speranza.aioe.org... >>>> >>>>> 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 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. >>>> >>>> [...] >>>> Kevin Aylward B.Sc. >>>> www.kevinaylward.co.uk >>>> www.anasoft.co.uk - SuperSpice. >>> >>> 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 >> >> >>> 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. > >> 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 don't even plot Zin. Its redundant information.
>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.
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. www.kevinaylward.co.uk www.anasoft.co.uk - SuperSpice
On 2014-05-13 18:21, Kevin Aylward wrote:
> "jeroen Belleman" wrote in message news:lkr59l$s43$1@speranza.aioe.org... > > On 12/05/14 18:35, Kevin Aylward wrote: >> On 5/10/2014 4:05 PM, jeroen Belleman wrote: >>> >> To each his own. [...] S11, or more often 20*log|S11|, is an >> excellent indicator of the quality of the match. > > I think this still misses my point. The voltage and phase give the exact > same information. [...]
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
"Jeroen Belleman"  wrote in message news:lkvn6u$v35$1@speranza.aioe.org...

On 2014-05-13 18:21, Kevin Aylward wrote:
> "jeroen Belleman" wrote in message news:lkr59l$s43$1@speranza.aioe.org... > > On 12/05/14 18:35, Kevin Aylward wrote: >> On 5/10/2014 4:05 PM, jeroen Belleman wrote: >>> >> To each his own. [...] S11, or more often 20*log|S11|, is an >> excellent indicator of the quality of the match. > > I think this still misses my point. The voltage and phase give the exact > same information. [...]
>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.
Oh... those imaginary ones... Kevin Aylward B.Sc. www.kevinaylward.co.uk www.ansoft.co.uk
On Friday, May 9, 2014 8:25:00 AM UTC-7, Jeroen Belleman wrote:
> 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. >=20 > Just insert ".net V1 v(out)" somewhere into the schematic, > and an S11 trace will become available. >=20 > 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?
I suspect it may have to do with your lack of specifying "Rout," as the doc= umentation puts it. You have R1=3D1, 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=3D1e12 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.)
> Frankly, I don't even get why the *output* load should=20 > appear in there at all. S11 is the reflection from the=20 > *input*.=20
Unless S12 is zero, the load most certainly matters. Let us know what you discover.
On Sat, 10 May 2014 09:08:38 +0100, Kevin Aylward wrote:

> No one here converts to Fahrenheit to understand why its hot
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)
On Sat, 10 May 2014 11:37:55 -0500, John S wrote:

> 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.
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)