Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need help with .param command in hspice

1,103 views
Skip to first unread message

DL

unread,
Apr 14, 2003, 6:21:45 AM4/14/03
to
Hi everybody! I'm a newbie in using hspice and I would like a little
help if possible. What I would like to do is simulate a circuit where
a resistance varies with frequency. In hspice manual I found that the
resistance should be written as a function of parameter "hertz".
When I simulate my circuit with the following command everything works
allright:

R1 IN 4 R='1g/hertz'

However, when I simulate the circuit using the following commands the
results are wrong:

.PARAM R='1g/(hertz)'
R1 IN 4 R

I would like to use something similar to the second method as the
function for the resistance is much more complicated.
Below I post a small code snippet of a simple circuit where I have
used these commands in case there is something else wrong:

MODEL TEST 2

.PARAM R='1g/(hertz)'
.PARAM Rs=10k

VIN IN 0 AC 1
R1 IN 4 R
R2 4 0 Rs

.AC DEC 10 2g 6g
.NET V(4) VIN ROUT=50 RIN=50
.PLOT AC S11(DB) S22(DB) S21(DB)
.PLOT AC VR1=PAR('V(IN)-V(4)') PAR('VR1/I(R1)')
.option post
.END

What I do is plot parameter VR1/I(R1) to get the value of resistance
R.

Thanks in advace for any help.

Mike Engelhardt

unread,
Apr 14, 2003, 11:03:22 AM4/14/03
to
DL,

Instead of

> .PARAM R='1g/(hertz)'
> R1 IN 4 R

try

.PARAM R='1g/(hertz)'
R1 IN 4 'R'

--Mike


DL

unread,
Apr 15, 2003, 10:01:26 AM4/15/03
to
Thanks for the reply Mike. Unfortunately, even your suggestion did not have
the desirable results. Any other ideas?

"Mike Engelhardt" <pm...@concentric.net> wrote in message
news:b7eijq$s...@dispatch.concentric.net...

Jim Thompson

unread,
Apr 15, 2003, 11:00:10 AM4/15/03
to
On Tue, 15 Apr 2003 17:01:26 +0300, "DL" <jim_n...@yahoo.com>
wrote:

"Frequency" is the variable, not "Hertz" (unless you've parameterized
"Hertz"). Even so, I doubt that it works in HSpice.

...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| Jim-T@analog_innovations.com Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |

For proper E-mail replies SWAP "-" and "_"

If you're American, STAND UP!

DL

unread,
Apr 17, 2003, 5:47:19 AM4/17/03
to
Well, finally, after hours of testing and experimentation it did work. Here
is how

...
.PARAM R(hertz)='1g/hertz'
...
R1 IN 4 'R(hertz)'
...

The above lines give you a frequency-dependent resistor in hspice.

Thanks all of you for your interest.


0 new messages