[SI-LIST] Re: how to simulate with S parameters

  • From: sam.sim@xxxxxxx
  • To: hassan@xxxxxxxx
  • Date: Mon, 3 Mar 2003 10:03:27 -0500

Hassan, 

I think you had a kind of typo. The S-parameter model is supported only in
HSPICE-RF and I expect strongly the model will be supported in HSPICE next
version HSPICE 2003.

The current Spice which can support the simple and seamless import to a
measured touchstone file is NSPICE of Apache in my experience. 

Hope to avoid to confuse SI colleagues.

Sam 

-----Original Message-----
From: Hassan O. Ali [mailto:hassan@xxxxxxxx]
Sent: Sunday, March 02, 2003 12:50 PM
To: Giovanni.Guasti@xxxxxxxxxx
Cc: 'si-list@xxxxxxxxxxxxx'
Subject: [SI-LIST] Re: how to simulate with S parameters



I asked this question before and I received a lot of good info. The info
even cleared some of the things I was clueless about. Here are a few
tips pertaining to HSPICE:

1. You can use the S element (N-port linear element) in HSPICE 2002.2.
Read more about the S element from page 6-66 of the "True-Hspice Device
Models Reference Manual, Release 2002.2".

The general syntax is:

Sxxx n_1 n_2 n_3 ... n_N <n_ref> mname=Smodel_name

n_1 ... n_N   are N signal nodes
n_ref is the reference node
mname is the name of the .MODEL statement of type S.

The S model syntax is as follows:

.MODEL S_model_name S
+ [FQMODEL=sp_model_name | TSTONEFILE=file | CITIFILE=filename]
+ <TYPE =[S|Y|Z]> <FBASE=base_frequency> <FMAX=maximum_frequency>
+ <Zo=[50 | vector_value] | Zof=ref_model>

You have to RTFM to understand the parameters above.


For example, if you have your 2-port S-parameter model in a file
"cable.s2p" in Touchstone format with 50ohm reference, the S element and
.MODEL statements can be as follows:

S1 n1 n2 0 mname=cable
.MODEL cable S TSTONEFILE=cable.s2p

That's it!

I think it's better to use HSPICE's SP file format (it has more control
parameters). For better transient accuracy, you have to supply enough
S-parameter data to cover the frequency bandwidth (BW) of interest
(starting from DC). A general rule of thumb for NRZ signal, BW =
0.35/tr, where tr is the rise time. The higher the BW the more accurate
the transient simulation would be. 

It's better to make the number of frequency points a power of 2 e.g.
256, 512, 1024, etc, to simplify HSPICE's inverse Fourier
transformation. If you need a time resolution, dT, in your transient
simulation, then the n'th frequency point, f_n, would be determined by
the formula: 

f_n = n/(N.dT) , n=0, 1, 2, ..., N-1

where N is the number of frequency points such that N.dF is
approximately equal to the BW, and dF is the frequency interval in your
S-parameter data file. I use the above formulas to determine a frequency
step and highest frequency to set in a field solver such as HFSS.

The time resolution, dT, for example, can be determined by the number of
time points per risetime. A risetime of 100ps resolved in 5 time points
would make dT=20ps.

Field solvers and network analyzers won't give you S-parameter values at
DC but you can use any curve-fitting tool (e.g. Excel) to extrapolate
S-parameter curves to DC (0 frequency) and add the data in the
S-parameter file. In Excel, I plot the first 10 to 30 points (too many
points would confuse curve-fitting) and add a 6th order polynomial
trendline. In Trendline Options I extrapolate the trendline Backward to
0 frequency and I choose to display the equation on the chart and read
the DC value as the constant in the displayed equation.


2. You can also use the G element which I think is supported by all
SPICE's (certainly supported by HSPICE). Here is what Thomas Beneken
<beneken@xxxxxxxxxxxx> mentioned about it:

====================
If you obtained the S-parameters of a device, e.g. from VNA
measurements,
You can build up a SPICE subcircuit that represents the (linear) device
in
simulations.

S-parameters describe waves in 50 Ohm systems, but you need voltages and
currents for SPICE. So first to do is to convert S-parameters into
y-parameters:

y11=((1-s11)*(1+s22)+s12*s21)/d
y12=-2*s12/d
y21=-2*s21/d
y22=((1+s11)*(1-s22)+s12*s21)/d

d=((1+s11)*(1+s22)-s12*s21)*Z0
Z0=50 Ohms

Next step is to build up the SPICE subcircuit following this template:

.SUBCKT MyDevice IN OUT GND

RIN IN GND 1E20
ROUT OUT GND 1E20

G11 IN GND FREQ {V(IN,GND)}=
+(<f>,<y11dB>,<y11deg>) ... this line repeated for all frequencies

G12 IN GND FREQ {V(IN,GND)}=
+(<f>,<y12dB>,<y12deg>) ... this line repeated for all frequencies

G21 IN GND FREQ {V(IN,GND)}=
+(<f>,<y21dB>,<y21deg>) ... this line repeated for all frequencies

G22 IN GND FREQ {V(IN,GND)}=
+(<f>,<y11dB>,<y22deg>) ... this line repeated for all frequencies

.ENDS

If You are lucky You have the y-parameters analytically expressed in s
(=
j*2*PI*f). For instance this subcircuit describes a directional
transmission
line matched to 50 Ohms with a delay of 100 picoseconds:

SUBCKT MyDelayline IN OUT GND
RIN IN GND 1E20
ROUT OUT GND 1E20
G11 IN GND LAPLACE {V(IN,GND)}={1/50}
G12 IN GND LAPLACE {V(OUT,GND)}={0}
G21 OUT GND LAPLACE {V(IN,GND)}={-2*exp(-s*1E-10)/50}
G22 OUT GND LAPLACE {V(OUT,GND)}={1/50}
.ENDS

Hope it helps,
Thomas

=================================

Hope that helps.

Regards.

Hassan.


Guasti Giovanni wrote:
> 
> Hi All,
> I would like to make some transient and ac simulation of a lossy cable,
> modeled with frequency Scatter parameters.
> Does anybody know the right way to do it? Does Hspice permit it? Could you
> indicate some interesting lectures  to me?
> Thanks in advance.
> 
> Regards,
> 
> 
> 
> Giovanni Guasti
>     giovanni.guasti@xxxxxxxxxx <mailto:giovanni.guasti@xxxxxxxxxx>
> 


-- 
Hassan O. Ali            Email: hassan@xxxxxxxx
12-2159 Elmira Drive     Tel/Fax: (613) 721-9047
Ottawa, Ontario 
CANADA K2C 1H3           WWW: http://www.glcom.com/hassan
------------------------------------------------------------------
To unsubscribe from si-list:
si-list-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field

or to administer your membership from a web page, go to:
//www.freelists.org/webpage/si-list

For help:
si-list-request@xxxxxxxxxxxxx with 'help' in the Subject field

List archives are viewable at:     
                //www.freelists.org/archives/si-list
or at our remote archives:
                http://groups.yahoo.com/group/si-list/messages 
Old (prior to June 6, 2001) list archives are viewable at:
                http://www.qsl.net/wb6tpu
  


------------------------------------------------------------------
To unsubscribe from si-list:
si-list-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field

or to administer your membership from a web page, go to:
//www.freelists.org/webpage/si-list

For help:
si-list-request@xxxxxxxxxxxxx with 'help' in the Subject field

List archives are viewable at:     
                //www.freelists.org/archives/si-list
or at our remote archives:
                http://groups.yahoo.com/group/si-list/messages 
Old (prior to June 6, 2001) list archives are viewable at:
                http://www.qsl.net/wb6tpu
  

Other related posts: