Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to make a ideal op-amp in HSPICE

Status
Not open for further replies.

Julian18

Full Member level 3
Joined
Apr 9, 2007
Messages
167
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,298
Activity points
2,389
e hspice ideal amp

Hi there,
how to make a ideal op-amp in hspice? I wrote a script like this.
.......
.......
E_opamp 1 2 OPAMP 3 4
.......
......
when simulating this, i got "no convergence with standard algorithm, trying damped pseudo-transient"

when i comment this statement, the simulation seems OK , of course at that time i would get what what i want, so how can i overcome this problems?or do i have to give some control options to make it work?

any suggestion would be appreciated.

Julian
 

hspice ideal opamp

You can try simply use a VCVS or VCCS instead.
 

ideal opamp with rc in hspice

The statement is like this:

Exxx n+ n- <VCVS> in+ in- gain <options>

If you use it like this you won't have any problems at all!

Hope I helped.
 

Are you using the OPAMP in closed-loop ? This pseudo-device has infinite gain, I think, and will only simulate correctly in feedback configs, where the output controls the inputs so that there's zero voltage difference at the input.

During transient simulation if there's any RC delay in the feedback path then the
OPAMP will not always keep both inputs at the same voltage, and the output will saturate at +- infinite voltage...

Use another macro-model, with two poles and MAX and MIN limiters at the output. I think that this exists in Hspice.
 

n1cm0c said:
Are you using the OPAMP in closed-loop ? This pseudo-device has infinite gain, I think, and will only simulate correctly in feedback configs, where the output controls the inputs so that there's zero voltage difference at the input.

You have the <gain> option where you can have f.e. a gain of 1E+06
 

the Exx OPAMP device is not the same as the VCVS device... I think that the <gain> parameter only exists in the VCVS, because the OPAMP one is an infinite gain device, by definition.


Here's a macro-model for an OPAMP you can try,


op_amp.sp --- operational amplifier
*
* this circuit is taken from "chua & lin, computer aided
* analysis of electronic circuits, englewood cliffs,
* printice-hall,1975, page 117.
* also, it is given in "spice2 application notes for
* dependent sources by bert epler, ieee ckts. & dev. magazine,
* sept. 1987"
*
.options post
.tran .001ms 2ms
.ac dec 10 .1hz 10meg
.probe tran vout=v(output) vin=v(input)
.probe ac voutdb=vdb(output) vphase=vp(output)
* main circuit
xamp input 0 output opamp
vin input 0 sin(0,1m,1k) ac 1
* subcircuit definitions
* input subckt
.subckt opin in+ in- out
rin in+ in- 2meg
rin+ in+ 0 500meg
rin- in- 0 500meg
g 0 out pwl(1) in+ in- -68mv,-68ma 68mv,68ma delta=1mv
c out 0 .136uf
r out 0 835k
.ends
* rc ckt with pole at 9 megahertz
.subckt oprc in out
e out1 0 in 0 1
r1 out1 out2 168
r2 out2 out3 1.68k
r3 out3 out4 16.8k
r4 out4 out 168k
c1 out2 0 100p
c2 out3 0 10p
c3 out4 0 1p
c4 out 0 .1p
r out 0 1e12
.ends
* output limiter to 15v
.subckt opout in out
e out1 0 in 0 1
rout out1 out 75
vdum out dum 0
h dum 0 pwl(1) vdum delta=.01ma -.1ma,-15v .1ma,15v
.ends
* op-amp subckt
.subckt opamp in+ in- out
xin in+ in- out1 opin
xrc out1 out2 oprc
xout out2 out opout
.ends
.end
 

Maybe you can write like this:
E_opamp 1 2 VCVS 3 4 1E6 max=A min=B

where 1E6 is the gain of the ideal op, and you can change it as you want.
A B is the max and min output voltage of OP. You can give a reasonable value for convergence.

By doing this,if you simulation is still gone error for no convergence, you can add
.option convergence=1
(or other numbers 1 - 4 )to the netlist.

Ryan
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top