Maker Pro
Maker Pro

LTSpice: 2-pole op-amp rail behaving oddly

C

Chris Carlen

Jan 1, 1970
0
Greetings:

I have the newest LTSpice.

When I use the 1-pole amp, with rail=0, the output can swing to the
supply rails. If rail=1, then it can swing within 1V of the rails.
This makes sense.

But the 2-pole op-amp doesn't work like this. For instance, with a 10V
positive supply and -5V negative supply, and rail=0, the 2-pole op-amp
swings from -3V to 9.8V. This is inconsistent with what seems to be the
intent of the rail parameter, and inconsistent as well with the 1-pole
behavior. Is the 2-pole broken or it is supposed to work differently?

Thanks.
--
____________________________________
Christopher R. Carlen
Principal Laser/Optical Technologist
Sandia National Laboratories CA USA
[email protected]
 
M

Mike Engelhardt

Jan 1, 1970
0
Chris,
I have the newest LTSpice.

When I use the 1-pole amp, with rail=0, the output can swing to the
supply rails. If rail=1, then it can swing within 1V of the rails.
This makes sense.

But the 2-pole op-amp doesn't work like this. For instance, with a 10V
positive supply and -5V negative supply, and rail=0, the 2-pole op-amp
swings from -3V to 9.8V. This is inconsistent with what seems to be the
intent of the rail parameter, and inconsistent as well with the 1-pole
behavior. Is the 2-pole broken or it is supposed to work differently?

I couldn't duplicate this problem. Attached is a counter example
showing rail working the same for 1pole as 2pole. You can send
a problem circuit to the support e-mail address on the Help=>About
dialog box. Note that no matter what rail value you assign, the output
still has output impedance.

--Mike
--- rails.asc ---
Version 4
SHEET 1 936 680
WIRE 112 400 112 384
WIRE 112 208 112 192
WIRE 112 304 112 288
WIRE 112 96 112 80
WIRE -48 0 -32 0
WIRE 160 0 176 0
WIRE 48 0 64 0
WIRE 176 0 176 240
WIRE 176 240 144 240
WIRE 80 224 64 224
WIRE 64 224 64 0
WIRE 64 0 80 0
WIRE -256 256 -64 256
WIRE -256 368 -256 352
WIRE -256 272 -256 256
WIRE 416 288 416 272
WIRE 240 128 256 128
WIRE 448 128 464 128
WIRE 336 128 352 128
WIRE 464 128 464 240
WIRE 464 240 448 240
WIRE 384 224 352 224
WIRE 352 224 352 128
WIRE 352 128 368 128
WIRE 352 256 384 256
WIRE 176 240 208 240
WIRE 480 240 464 240
WIRE 112 192 416 192
WIRE 112 192 112 176
WIRE 112 288 416 288
WIRE 112 288 112 272
WIRE 416 192 416 208
WIRE -64 256 -64 432
WIRE -64 256 80 256
WIRE -64 432 352 432
WIRE 352 432 352 256
FLAG 112 80 0
FLAG 112 400 0
FLAG -48 0 0
FLAG -256 368 0
FLAG 240 128 0
FLAG 208 240 A
FLAG 480 240 B
SYMBOL opamps\\1pole 112 240 R0
WINDOW 0 22 -22 Left 0
SYMATTR InstName U1
SYMATTR SpiceLine ilimit=25m rail=1 Vos=0
SYMBOL voltage 112 288 R0
SYMATTR InstName V1
SYMATTR Value -10
SYMBOL voltage 112 192 M180
WINDOW 0 24 104 Left 0
WINDOW 3 24 16 Left 0
SYMATTR InstName V2
SYMATTR Value 10
SYMBOL res 176 -16 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R1
SYMATTR Value 10K
SYMBOL res 64 -16 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R2
SYMATTR Value 1K
SYMBOL voltage -256 256 R0
WINDOW 3 30 94 Left 0
SYMATTR InstName V3
SYMATTR Value sine(0 1 1K)
SYMBOL res 464 112 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R3
SYMATTR Value 10K
SYMBOL res 352 112 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R4
SYMATTR Value 1K
SYMBOL opamps\\2pole 416 240 R0
WINDOW 0 8 -43 Left 0
SYMATTR InstName U2
SYMATTR SpiceLine ilimit=25m rail=1 Vos=0 phimargin=45
TEXT -224 392 Left 0 !.tran 3m
 
M

Mike Engelhardt

Jan 1, 1970
0
But the 2-pole op-amp doesn't work like this. For instance, with a 10V
I couldn't duplicate this problem...

Oh, now I can duplicate it. Replace ./lib/sub/2pole.sub with this:

* Copyright © Linear Technology Corp. 2003. All rights reserved.
*
..subckt 2pole 1 2 3 4 5
S1 5 3 N002 5 Q
S2 4 5 5 N002 Q
A1 2 1 0 0 0 0 N003 0 OTA G={Avol/Rout} ref={Vos}
+ Iout={slew*Cout} Cout={Cout} en={en} enk={enk}
+ in={in} ink={ink} Vhigh=1e308 Vlow=-1e308 Rout={Rout}
C3 5 4 1p
C4 3 5 1p
S3 N002 0 4 N002 C
S4 0 N002 N002 3 C
R3 3 2 1G noiseless
G1 0 N002 N003 0 {1/Rout}
R1 3 N002 {2*Rout} noiseless
R2 N002 4 {2*Rout} noiseless
C1 N002 0 {X*Cout/Avol}
S5 0 N003 N003 3 C
S6 N003 0 4 N003 C
R4 3 1 1G noiseless
R5 1 4 1G noiseless
R6 2 4 1G noiseless
..model C SW(Ron=100 Roff=1T Vt=1.5 Vh=-1 noiseless)
..param Rout=100Meg
..param Cout={Avol/GBW/2/pi/Rout}
..model Q SW(Ron=10 Roff=10Meg Vt=0 Vh=-.1 Vser={Rail}
+ ilimit={Ilimit} noiseless)
..param Avol=1Meg GBW=10Meg Slew=10Meg rail=0 Vos=0 ilimit=25m
..param en=0 enk=0 in=0 ink=0 phimargin=45
..param X table(phimargin,29.4,3.5,32.1,2.9,33.8,2.6,35.8,2.3,
+38.1,2,40.9,1.7,43.2,1.5,45.9,1.3,49.2,1.1,53.2,0.9,58.2,
+0.7,64.7,0.5,73,0.3,86.1,0.05)
..ends 2pole
 
C

Chris Carlen

Jan 1, 1970
0
Mike said:
Oh, now I can duplicate it. Replace ./lib/sub/2pole.sub with this:

Thanks Mike. Will you be including the updated .sub in future releases?


Good day!
* Copyright © Linear Technology Corp. 2003. All rights reserved.
*
.subckt 2pole 1 2 3 4 5
S1 5 3 N002 5 Q
S2 4 5 5 N002 Q
A1 2 1 0 0 0 0 N003 0 OTA G={Avol/Rout} ref={Vos}
+ Iout={slew*Cout} Cout={Cout} en={en} enk={enk}
+ in={in} ink={ink} Vhigh=1e308 Vlow=-1e308 Rout={Rout}
C3 5 4 1p
C4 3 5 1p
S3 N002 0 4 N002 C
S4 0 N002 N002 3 C
R3 3 2 1G noiseless
G1 0 N002 N003 0 {1/Rout}
R1 3 N002 {2*Rout} noiseless
R2 N002 4 {2*Rout} noiseless
C1 N002 0 {X*Cout/Avol}
S5 0 N003 N003 3 C
S6 N003 0 4 N003 C
R4 3 1 1G noiseless
R5 1 4 1G noiseless
R6 2 4 1G noiseless
.model C SW(Ron=100 Roff=1T Vt=1.5 Vh=-1 noiseless)
.param Rout=100Meg
.param Cout={Avol/GBW/2/pi/Rout}
.model Q SW(Ron=10 Roff=10Meg Vt=0 Vh=-.1 Vser={Rail}
+ ilimit={Ilimit} noiseless)
.param Avol=1Meg GBW=10Meg Slew=10Meg rail=0 Vos=0 ilimit=25m
.param en=0 enk=0 in=0 ink=0 phimargin=45
.param X table(phimargin,29.4,3.5,32.1,2.9,33.8,2.6,35.8,2.3,
+38.1,2,40.9,1.7,43.2,1.5,45.9,1.3,49.2,1.1,53.2,0.9,58.2,
+0.7,64.7,0.5,73,0.3,86.1,0.05)
.ends 2pole


--
____________________________________
Christopher R. Carlen
Principal Laser/Optical Technologist
Sandia National Laboratories CA USA
[email protected]
 
Top