Maker Pro
Maker Pro

SPICE AC analysis -- multiplying or dividing signals

J

Jim Thompson

Jan 1, 1970
0
Jim,

I think you're missing Helmut's point. In the simulation,
the behavior source's are linearized just like any other
non-linear devices like diodes and transistors. Yes, you
can multiply a signal path and see the gain of the complex
signal through the path. But that's as close as you can
get to "You can certainly do phasor multiplication with
behavioral sources in PSpice." That is, you can do
the complex multiplication with behavioral sources but
only if one of the products is *real*. I.e., your statement
is incorrect. Division is only possible if the divisor is
real. Helmut is just trying to help because this is a point
that I think just about every gets confused about in SPICE
.ac analysis along the learning curve, but it seems impossible
to explain to someone -- or at least just not worth it.
It's one of those things that people seem to have to figure
out for themselves.

Agreed. I DID previously post....

I haven't tried it, but the multiplication may require _multiple_
steps to accomplish:

(1) Separate out the real and imaginary parts
(2) Do the appropriate multiplications
(3) Sum appropriate parts to get the resultant real and imaginary
terms
To the OP, one industry-standard way to get S-parameters out
of a SPICE simulation is with hspice's .net statement. It
will compute S-, H-, Z-, and Y- matrices of a two-port
linear network. A super-set of this command is availible
in LTspice if you don't have a copy of hspice. The pertaine
example case is installed by default as
C:\Program Files\LTC\SwCADIII\examples\Educational\S-param.asc

Regards,
[snip]

Also...

http://analog-innovations.com/SED/CreateS-ParameterSUBCKTinPSpice.pdf

...Jim Thompson
 
J

Joel Kolstad

Jan 1, 1970
0
Jim Thompson said:

Thanks for the link... for measuring S11 and S21, that's very similar to what
I use, although I split apart the voltage sources (making one dependent on the
other, rather than putting them "in-line" as shown); I also made the source
voltage and source and termination resistances parameters. I hadn't yet
tackled trying to get tables of S parameters *into* SPICE; I do like the way
they do it.

---Joel
 
J

Joel Kolstad

Jan 1, 1970
0
Hi Mike,

Mike Engelhardt said:
To the OP, one industry-standard way to get S-parameters out
of a SPICE simulation is with hspice's .net statement.

SIMetrix doesn't have a .net statement, and I'm thinking PSpice doesn't
either, although I certainly could be mistaken there.

But you say that LTspice does, eh? Sheesh... your piece of freeware there
looks better and better every day!

Thanks,
---Joel
 
J

Jim Thompson

Jan 1, 1970
0
Thanks for the link... for measuring S11 and S21, that's very similar to what
I use, although I split apart the voltage sources (making one dependent on the
other, rather than putting them "in-line" as shown); I also made the source
voltage and source and termination resistances parameters. I hadn't yet
tackled trying to get tables of S parameters *into* SPICE; I do like the way
they do it.

---Joel

Somewhere I think I have safely stashed away an even simpler way...
stashed so safely I can't find it :-(

...Jim Thompson
 
J

Joel Kolstad

Jan 1, 1970
0
Jim Thompson said:
Somewhere I think I have safely stashed away an even simpler way...
stashed so safely I can't find it :-(

I started looking at what it would take to do it in SIMetrix, and
unfortunately SIMetrix doesn't have something as nice as a voltage source with
a table-defined output vs. frequency (as that app note uses in PSpice). They
*do* have functions to lookup (and even interpolate) data stored in an X-Y
array (e.g., voltage magnitude or phase vs. frequency, taken from S parameter
data), and they give you access to the parameter HERTZ (the current simulation
frequency during AC analysis), so I believe there's enough functionality there
to create a table-based voltage source... I'll just have to work on that
*first*.

Hmm... too bad John Warner (Mr. SIMetrix) doesn't seem to hang out in these
forums anymore.

Fun with SPICE here is about to get put on hold since I need to get an RF
front-end working before leaving the country in another week and a half. It'd
be nice if you IC designer guys would make a VCO-based synthesizer with a,
say, 30% bandwidth (e.g., 1-1.3GHz)... so far I haven't seen anything over
20%, and many are only 10%; I could save a few ICs.

---Joel
 
J

Jim Thompson

Jan 1, 1970
0
I started looking at what it would take to do it in SIMetrix, and
unfortunately SIMetrix doesn't have something as nice as a voltage source with
a table-defined output vs. frequency (as that app note uses in PSpice). They
*do* have functions to lookup (and even interpolate) data stored in an X-Y
array (e.g., voltage magnitude or phase vs. frequency, taken from S parameter
data), and they give you access to the parameter HERTZ (the current simulation
frequency during AC analysis), so I believe there's enough functionality there
to create a table-based voltage source... I'll just have to work on that
*first*.

Hmm... too bad John Warner (Mr. SIMetrix) doesn't seem to hang out in these
forums anymore.

Fun with SPICE here is about to get put on hold since I need to get an RF
front-end working before leaving the country in another week and a half. It'd
be nice if you IC designer guys would make a VCO-based synthesizer with a,
say, 30% bandwidth (e.g., 1-1.3GHz)... so far I haven't seen anything over
20%, and many are only 10%; I could save a few ICs.

---Joel

The way we do it on custom ASIC's is with range-switching.

Most of my stuff is usually single, or just two specific frequencies.

...Jim Thompson
 
J

Joel Kolstad

Jan 1, 1970
0
Jim Thompson said:
The way we do it on custom ASIC's is with range-switching.

Apparently there's already some of that within many ICs, e.g., Analog Devices'
ADF4360 (http://www.analog.com/UploadedFiles/Data_Sheets/AD4360-8.pdf -- fig.
19 on page 11). I'm guessing the various ranges correspond to switching in
various fixed capacitors, so presumably the frequency range is ultimately
determined by how large a capacitor you're willing to build into your IC?

---Jowl
 
R

Robert

Jan 1, 1970
0
Jim Thompson said:
message [snip]
I may have already downloaded a copy. I'll look.

...Jim Thompson

here you go....

http://analog-innovations.com/SED/CreateS-ParameterSUBCKTinPSpice.pdf

...Jim Thompson

I have an old App Note from Wes Hayward showing a method to do that in
PSpice which we used at TriQuint. IIRC, it's a Word Document but small
enough to email if you're interested Joel.

Robert

Robert, I'd like a copy as well. Thanks!

...Jim Thompson

Done. Let me know if it got there.

As I mentioned, Wes Hayward wrote the original App Note. I believe he
created the technique independently quite a while ago. But from what you've
said it may be the same way as you've mentioned.

Robert
 
J

Jim Thompson

Jan 1, 1970
0
Jim Thompson said:
message [snip]
I may have already downloaded a copy. I'll look.

...Jim Thompson

here you go....

http://analog-innovations.com/SED/CreateS-ParameterSUBCKTinPSpice.pdf

...Jim Thompson

I have an old App Note from Wes Hayward showing a method to do that in
PSpice which we used at TriQuint. IIRC, it's a Word Document but small
enough to email if you're interested Joel.

Robert

Robert, I'd like a copy as well. Thanks!

...Jim Thompson

Done. Let me know if it got there.

As I mentioned, Wes Hayward wrote the original App Note. I believe he
created the technique independently quite a while ago. But from what you've
said it may be the same way as you've mentioned.

Robert

Got it! Thanks!

...Jim Thompson
 
Q

qrk

Jan 1, 1970
0
I started looking at what it would take to do it in SIMetrix, and
unfortunately SIMetrix doesn't have something as nice as a voltage source with
a table-defined output vs. frequency (as that app note uses in PSpice). They
*do* have functions to lookup (and even interpolate) data stored in an X-Y
array (e.g., voltage magnitude or phase vs. frequency, taken from S parameter
data), and they give you access to the parameter HERTZ (the current simulation
frequency during AC analysis), so I believe there's enough functionality there
to create a table-based voltage source... I'll just have to work on that
*first*.

Hmm... too bad John Warner (Mr. SIMetrix) doesn't seem to hang out in these
forums anymore.

Fun with SPICE here is about to get put on hold since I need to get an RF
front-end working before leaving the country in another week and a half. It'd
be nice if you IC designer guys would make a VCO-based synthesizer with a,
say, 30% bandwidth (e.g., 1-1.3GHz)... so far I haven't seen anything over
20%, and many are only 10%; I could save a few ICs.

---Joel

I recall some flavors of Spice having the B source (non-linear
dependent source)? I know you can put expressions in a B source, but
don't know if you can use tables. Or, make an equation from your table
data.
 
J

Joel Kolstad

Jan 1, 1970
0
Jim,

Jim Thompson said:
Got it! Thanks!

Could you drop a copy on ABSE or your web site, perhaps? :)

Thanks,
---Joel
 
R

Robert

Jan 1, 1970
0
Jim Thompson said:

Please! I don't like credit for someone else's work. Wes Hayward [1] did the
original App Note. And I believe he created the technique way back when. I
just rewrote it as part of my job at the time.

Robert

[1]
http://www.amazon.com/Introduction-Radio-Frequency-Design-Hayward/dp/0134940210

http://www.powells.com/biblio?isbn=0872598799
 
Top