AN9523: Evaluation Programs for SPICE Op Amp Models

Evaluation Programs for SPICE Op Amp Models
Application Note
Introduction
There is no consistent method for evaluating SPICE models
in the industry, so it is hard to reproduce a specific manufacturer’s results or to compare models between manufacturers.
Furthermore, many of the SPICE models available from vendors do not correlate the vendor’s data sheet for the corresponding op amp; hence, there is confusion about the
validity of the model, the evaluation program, and/or the data
sheet. This paper includes a collection of SPICE programs
that have been used to evaluate some of the latest Intersil
Corporation current feedback op amps. The programs illustrated here will be used to evaluate new Intersil op amp
designs, both current and voltage feedback, so they will
serve as a standard until modified by common agreement.
These programs have several advantages: they are written,
they have been debugged, macros exist to eliminate the plotting effort, they cover the pertinent parameters, and they
contain equations to normalize the output for “Bode” type
plots.
January 1996
AN9523
Unless the output is normalized the vertical scale will have to
be large enough to accommodate the difference in gains, so
small effects such as peaking may be hard to discern or
measure. The program configures the load resistor as a voltage divider, and the output is taken at the voltage divider
output. If the op amp gain is 10 the load resistor gain will be
0.1. If a load resistor is not required by the data sheet enter a
large value such as 1000GΩ; the large resistor will not affect
the circuit operation while the normalization feature is
retained. Now the three curves will plot on top of each other
similar to the GBW curves shown in most data books.
11 RF11
RG11
IN
VIN
12
+
RA11
OUT1
CL111
RB11
21
Six programs which cover 13 parameters including: inverting
gain, non-inverting gain, positive power supply current, negative power supply current, positive input bias current, negative input bias current,offset current, positive offset voltage,
negative offset voltage, differential offset voltage, non-inverting common-mode voltage, transient response, and
enable/disable response are used to evaluate the op amp.
These thirteen parameters are displayed in eight plots which
have seventeen curves.
Printed copies of these programs are given here, and
electronic copies are available on the “Intersil CorporationAnalog SPICE Macromodels” disk dated January 1996 or
later.
AC Transfer Function For An Inverting
Op Amp
RG21
RF21
-
22
RA21
OUT2
+
CL21
RB21
31
RG31
RF31
-
32
RA31
OUT3
+
CL31
RB31
FIGURE 1. SCHEMATIC OF INVERTING OP AMP
The first program (see Figures 1, 2, and 3) is named
cfaig.cir, and it simulates the AC transfer function for an
inverting op amp. This program uses three op amps so it
computes the transfer function for three different gains in one
pass. The program requires the user to supply the feedback
resistance values for each gain, the gain settings, the load
resistance, the load capacitance, and the power supply voltage in volts. The program assumes that the op amp is run off
two power supplies of equal and opposite polarity each of
which is referenced to ground, so it applies the entered voltage to the op amp as a positive and negative supply with
equal magnitudes. If a single supply op amp is to be evaluated with these programs just enter half the power supply
voltage, and the analysis will be equivalent.
1
1-888-INTERSIL or 321-724-7143 | Copyright
© Intersil Corporation 1999
Application Note 9523
*This program simulates the AC transfer function for an inverting op amp.
*It has three op amps; each with a gain that is specified by the
*user with a .param statement. The user must specify the load RL, CL, the
*feedback resistors RF1, RF2, RF3 and the corresponding gains G1, G2, G3.
*The power supply voltage is set by the parameter “vsupply”. The load resistors
*are automatically split into voltage dividers to normalize the gain plot,
*and the gains can be plotted in dB by calling the macros G1, G2, and G3.
*The inputs are tied together, and the outputs are called OUT1, OUT2, and
*OUT3 corresponding to the respective gains. The op amp model is entered with
*a .lib statement. The model in the subcircuit call (x statement) must correspond to the model
*called in the .lib statement (3 times).
.param CL=10pf
.param RL=400
.param RF1=750
.param RF2=750
.param RF3=750
.param G1=1
.param G2=2
.param G3=3
.param vsupply=5
.lib b:ha502x.cir
x1 0 11 3 4 12 3 ha502x
x2 0 21 3 4 22 3 ha502x
x3 0 31 3 4 32 3 ha502x
VIN in 0 ac 1
RF11 11 12 {RF1}
RF21 21 22 {RF2}
RF31 31 32 {RF3}
RG11 in 11 {RF1/abs(G1) }
RG21 in 21 {RF2/abs(G2) }
RG31 in 31 {RF3/abs(G3) }
RA11 12 OUT1 {RL* (abs(G1)-.99999) /abs(G1) }
RA21 22 OUT2 {RL* (abs(G2)-.99999) /abs(G2) }
RA31 32 OUT3 {RL* (abs(G3)-.99999) /abs(G3) }
RB11 0 OUT1 {RL/abs(G1) }
RB21 0 OUT2 {RL/abs(G2) }
RB31 0 OUT3 {RL/abs(G3) }
CL11 0 12 {CL}
CL21 0 22 {CL}
CL31 0 32 {CL}
VCC 3 0 {vsupply}
VEE 4 0 {-1*vsupply}
.ac dec 50 1meg 3000meg
.probe
.end
FIGURE 2. INVERTING OP AMP AC TRANSFER FUNCTION PROGRAM
2
Application Note 9523
VCC
6.0
+
-
NORMALIZED GAIN IN dB
4.0
RA11
3
OUT1
4
RB11
VEE
2.0
11
RG11
VIN
0
RF11
12
CL11
VCC
-2.0
IN
G1
G2
G3
-4.0
-
3
10
30
FREQUENCY (MHz)
RA21
3
OUT2
4
RB21
VEE
-6.0
1
+
100
21
300
RG21
RF21
22
CL21
FIGURE 3. INVERTING OP AMP AC TRANSFER FUNCTION PLOT
VCC
AC Transfer Function for a Non-Inverting
Op Amp
Unless the output is normalized the vertical scale will have to
be large enough to accommodate the difference in gains, so
small effects such as peaking may be hard to discern or
measure. The program configures the load resistor as a voltage divider, and the output is taken at the voltage divider
output. If the op amp gain is 10, the load resistor gain will be
0.1. If a load resistor is not required by the data sheet enter a
large value such as 1000GΩ; the large resistor will not affect
the circuit operation while the normalization feature is
retained. Now the three curves will plot on top of each other
similar to the GBW curves shown in most data books.
3
-
3
RA31
OUT3
4
RB31
VEE
31
RG31
32
RF31
CL31
FIGURE 4. NON-INVERTING OP AMP SCHEMATIC
6.0
4.0
NORMALIZED GAIN IN dB
The second program (see Figures 4, 5, and 6) is named
cfanig.cir, and it simulates the AC transfer function for a noninverting op amp. This program uses three op amps so it can
compute the transfer function for three different gains in one
pass. The program requires the user to supply the feedback
resistance values for each gain, the gain settings, the load
resistance, the load capacitance, and the power supply voltage in volts. The program assumes that the op amp is run off
two power supplies of equal and opposite polarity each of
which is referenced to ground, so it applies the entered voltage to the op amp as a positive and negative supply with
equal magnitudes. If a single supply op amp needs to be
evaluated just enter half the power supply voltage, and the
analysis will be equivalent.
+
2.0
0
G1
-2.0
G2
G3
-4.0
-6.0
1
3
10
30
FREQUENCY (MHz)
100
FIGURE 5. NON-INVERTING OP AMP AC TRANSFER
FUNCTION PLOT
300
Application Note 9523
*This program simulates the transfer function for a non-inverting op amp.
*It has three op amps; each with a gain that is specified by the user
*with a .param statement. The user must specify the load RL, CL, the
*feedback resistors RF1, RF2, RF3 and the corresponding gains G1, G2, G3.
*The power supply voltage is set by the parameter “vsupply”. The load resistors
*are automatically split into voltage dividers to normalize the gain plot,
*and they can be plotted in dB by calling the macros G1, G2 and G3.
*The inputs are tied together, and the outputs are called OUT1, OUT2, and
*OUT3 corresponding to the respective gains. The op amp model is entered with
*a .lib statement. The model in the subcircuit call (x statement) must correspond to the model
*called in the .lib statement (3 times).
.param CL=10pf
.param RL=400
.param RF1=1000
.param RF2=681
.param RF3=383
.param G1=1
.param G2=2
.param G3=10
.param vsupply=5
.lib b:ha502x.cir
x1 in 11 3 4 12 3 ha502x
x2 in 21 3 4 22 3 ha502x
x3 in 31 3 4 32 3 has02x
vin in 0 ac 1
RF11 11 12 {RF1}
RF21 21 22 {RF2}
RF31 31 32 {RF3}
RG11 0 11 {RF1/(G1-.99999) }
RG21 0 21 {RF2/(G2-.99999) }
RG31 0 31 {RF3/(G3-.99999) }
RA11 12 OUT1 {RL*(G1-.99999)/G1}
RA21 22 OUT2 {RL*(G2-.99999)/G2}
RA31 32 OUT3 {RL*(G3-.99999)/G3}
RB11 0 OUT1 {RL-(RL*(G1-.99999)/G1) }
RB21 0 OUT2 {RL-(RL*(G2-.99999)/G2) }
RB31 0 OUT3 {RL-(RL*(G3-.99999)/G3) }
CL11 0 12 {CL}
CL21 0 22 {CL}
CL31 0 32 {CL}
VCC 3 0 {vsupply}
VEE 4 0 {-1*vsupply}
.ac dec 50 1meg 3000meg
.probe
.end
FIGURE 6. NON-INVERTING OP AMP AC TRANSFER FUNCTION PROGRAM
4
Application Note 9523
DC Parameters For a Non-Inverting
Op Amp
The input signal to the op amp is a DC sweep. The sweep
input enables a data analysis at VIN = 0V which is often a
data book point, and the parameters can be evaluated at
various other points of interest. The input currents can be
examined by plotting the currents through the feedback
resistor, RF, and the input resistor, RI . The difference
between these currents is the input offset current. When the
voltage is swept through zero the offset voltage for zero input
voltage can be calculated. Either input offset voltage can be
plotted by selecting the correct node voltage, or the differential input voltage can be plotted be selecting V(11)-V(13).
The supply currents are plotted by selecting I(VEE) or I(VCC)
for the negative and positive power supplies respectively.
The third program (see Figures 7 through 11) is named
cfadc.cir, and it simulates the salient DC parameters for a
non-inverting op amp. The program requires the user to supply the feedback resistance values, the load resistance, and
the power supply voltage in volts. The program assumes that
the op amp is run off two power supplies of equal and opposite polarity each of which is referenced to ground, so it
applies the entered voltage to the op amp as a positive and
negative supply with equal magnitudes. If a single supply op
amp needs to be evaluated just enter half the power supply
voltage, and the analysis will be equivalent.
INPUT CURRENT (µA)
10
RF
11
-
OUT
13 + 4
3
RI
IN
VIN
5
I(RF) - I(RI)
I(RF)
0
I(RI)
-5
RL
VEE
VCC
-10
-10
FIGURE 7. NON-INVERTING OP AMP SCHEMATIC (DC)
0
VIN (mV)
5
10
FIGURE 8. NON-INVERTING OP AMP INPUT CURRENT PLOT
10
10
5
SUPPLY CURRENT (mA)
INPUT VOLTAGE (mV)
-5
V(11)
V(13)
0
V(11) - V(13)
-5
I(VEE)
5
0
-5
I(VCC)
-10
-10
-10
-5
0
VIN (mV)
5
FIGURE 9. NON-INVERTING OP AMP INPUT OFFSET
VOLTAGE PLOT
5
10
-10
-5
0
VIN (mV)
5
FIGURE 10. NON-INVERTING OP AMP POWER SUPPLY
CURRENT PLOT
10
Application Note 9523
*This program simulates the salient DC parameters for a non-inverting op amp.
*The user must specify the feedback and load resistance with a .param
*statement. The power supply voltage is set by the parameter “vsupply”. Input
*currents are measured as IRI, the non-inverting input current, IRF, the
*inverting input current, and (IRF-IRI) the offset current. The offset
*voltage is calculated with the equation Vos=v(13)-v(11). The power supply
*currents can be determined by looking at the parameter ICC and IEE. The
*model is entered with a .lib statement. The model in the subcircuit call (x statement)
*must correspond to the model called in the .lib statement.
.param RF = 1000
.param RL = 400
.param vsupply = 5
.lib b:ha502x.cir
x1 13 11 3 4 out 3 ha502x
VIN in 0
RF1 11 out {RF}
RI in 13 {RF}
RL1 0 out {RL}
VCC 3 0 {vsupply}
VEE 4 0 {-1*vsupply}
.dc VIN -.1 .1 .001
.probe
.end
FIGURE 11. NON-INVERTING OP AMP DC TRANSFER FUNCTION PROGRAM
CMRR For A Non-Inverting Op Amp
The fourth program (see Figures 12, 13, and 14) is called
cfacmrr.cir, and it simulates the common mode rejection ratio
for a non-inverting op amp. The program uses two identical
non-inverting op amps to implement the equation CMRR =
change in input offset voltage divided by the common mode
input voltage change. The CMRR equation is shown in
circuit parameters in Figure 12. Referring to Figure 13, it is
seen that the common mode difference voltage is 2V. The
input is a square wave so the measurement should be made
in an area which has settled out. Notice that the worse
common-mode input voltage is negative so that value of
-1.3mV was used in the calculation. Using a square wave
rather than a DC signal enables the inspection of both
quadrants prior to calculating the CMRR. The program
requires the user to supply the feedback resistance value,
the load resistance, and the power supply voltage in volts.
RF1 = 1K
RF2 = 1K
VCC
11
-
+
IN1
3
21
OUT1
4
VEE
VIN1
VCC
RL1
IN2
VIN2
-
+
3
OUT2
4
VEE
RL2
∆V IO
( V ( IN1 ) – V ( 11 ) ) – ( V ( IN2 ) – V ( 21 ) )
CMMR = DB -------------------------------------------------------------------------------------------------- = DB ---------------( V ( IN2 ) – V ( IN1 ) )
∆V CM
FIGURE 12. SCHEMATIC AND EQUATION FOR COMMON-MODE REJECTION CIRCUIT
6
Application Note 9523
*This program simulates the common-mode rejection ratio for a non-inverting op
*amp. The equation recommended for the calculation is
*CMRR=dB((V(IN1)-V(11)) -(V(IN2)-V(21)))/(V(IN2)-(VIN1)) and this program uses
*two identical op amps to obtain the calculation data. The user
*must specify the feedback resistance, RF, and the load resistance, RL.
*The power supply voltage is set by the parameter “vsupply”. The op amp model
*is entered with a .lib statement. The model in the subcircuit call (x statement) must
*correspond to the model in the .lib statement (2 times).
.param RF=1K
.param RL=400
.param vsupply=5
.lib b:ha502x.cir
x1 IN1 11 3 4 OUT1 3 ha502x
x2 IN2 21 3 4 OUT2 3 ha502x
VIN1 IN1 0 pulse (0 1m .1ns .1ns .1ns 100ns 200ns)
VIN2 IN2 0 pulse (0 2.001 .1ns .1ns.1ns 100ns 200ns)
RF1 11 OUT1 {RF}
RF2 21 OUT2 {RF}
RI1 OUT1 0 {RL}
RL2 OUT2 0 {RL}
VCC 3 0 {vsupply}
VEE 4 0 {-1*vsupply
.tran 20ns 420ns
.probe
.end
FIGURE 13. COMMON-MODE REJECTION PROGRAM
3.0
OUTPUT VOLTAGE (mV)
2.0
1.0
0
-1.0
-1.3mV
-2.0
–3
– 1.3
CMMR = 20LOG --------------10
= 63.7dB
2
-3.0
0
50
100
TIME (ns)
150
200
FIGURE 14. PLOT OF COMMON-MODE REJECTION PROGRAM OUTPUT
7
Application Note 9523
Transient Response For A Non-Inverting
Op Amp
The fifth program (see Figures 15, 16, and 17) is called
cfatran.cir, and it simulates the transient response for a noninverting op amp. If the input signal is small, about 100mv as
shown in Figure 16, the analysis will be small signal. Larger
input signals will yield a large signal analysis. The program
requires the user to supply the feedback resistance, the load
resistance, the input resistance, and the power supply voltage in volts. The program assumes that the op amp is run off
two power supplies of equal and opposite polarity each of
which is referenced to ground, so it applies the entered voltage to the op amp as a positive and negative supply with
equal magnitudes. If a single supply op amp needs to be
evaluated just enter half the power supply voltage, and the
analysis will be equivalent. The rise time, fall time, slew rate,
and delay time can be read off the plot shown in Figure 16.
120
80
VCC
IN
11
RI1
50
40
+
OUT
-
VEE
RF1
RL1
0
VIN
-40
1K
VOUT
-80
-120
0
50
100
150
TIME (ns)
FIGURE 15. TRANSIENT RESPONSE CIRCUIT SCHEMATIC
FIGURE 16. TRANSIENT RESPONSE PROGRAM OUTPUT PLOT
*This program simulates the time domain response for a non-inverting op amp.
*The response will be small signal or large signal depending on the amplitude
*of the input signal. The user must specify the load resistance, RL, the
*feedback resistance, RF, and the input resistance, RI. The power supply
*voltage is set by the parameter “vsupply”. The op amp model is entered with
*a .lib statement. The model in the x statement must correspond to the
*model called in the .lib statement.
.param RI = 50
.param RF = 1K
.param RL = 100
.param vsupply=5
.lib b:ha502x.cir
x1 in 11 3 4 out 3 ha502x
VIN1 in 0 PULSE (-.1 .1 .1ns .1ns .1ns 100ns 200ns)
RF1 11 out {RF}
RL1 out 0 {RL}
RI1 0 in {RI}
VCC 3 0 {vsupply}
VEE 4 0 [-1*vsupply}
.tran 20ns 420ns
.probe
.end
FIGURE 17. TRANSIENT RESPONSE PROGRAM
8
Application Note 9523
Enable Response For A Non-Inverting Op Amp
prior to modification. The program requires the user to supply
the feedback resistance, the load resistance, the input resistance, and the power supply voltage in volts. The program
assumes that the op amp is run off two power supplies of equal
and opposite polarity each of which is referenced to ground, so
it applies the entered voltage to the op amp as a positive and
negative supply with equal magnitudes. If a single supply op
amp needs to be evaluated just enter half the power supply
voltage, and the analysis will be equivalent. The enable
response times can be read off of Figure 19.
The Sixth program (see Figures 18, 19, and 20) is called
cfaenabl.cir, and it computes the response of a non-inverting op
amp to an enable control signal. A 2VDC excitation is applied to
the positive op amp input, and a square wave is applied to the
enable input. The enable signal swings from ground to the positive power supply rail, thus simulating an open collector driver.
This signal can be modified as required, but it must be disconnected from the supply voltage by removing the {vsupply} term
5.0
4.0
RF
(V)
3.0
VCC
- 3
+
ENA
4
11
IN
VIN
RI
2.0
OUT
ENABLE/
DISABLE
1.0
RL
VEE
0
0
FIGURE 18. ENABLE RESPONSE CIRCUIT SCHEMATIC
0.5
1.0
1.5
3.0
3.5
4.0
4.5
FIGURE 19. ENABLE RESPONSE PROGRAM OUTPUT PLOT
*This program simulates the time response of the enable/disable function of
*the non-inverting op amp. The response is obtained with a 2VDC
*input signal, while the voltage on the enable pin swings from VCC to ground.
*The user must specify the load resistance, RL, the feedback resistance, RF,
*and the input resistance, RI. The power supply voltage is set by a parameter
*“vsupply”. The op amp model is entered with a .lib statement. The model in the subcircuit call
*(x statement) must correspond to the model called in the .lib statement. If
*the rise and fall times of the enable signal are too fast the program may
*not converge (10ns is optimal).
.param RI = 50
.param RF = 1K
.param RL = 100
.param vsupply=5
.lib b:ha502x.cir
x1 in 11 3 4 out ena ha502x
VIN in 0 2
vena ena 0 PULSE ({vsupply} 0 0ns 10ns 10ns 2000ns 4000ns)
RF1 11 out {RF}
RL1 out 0 {RL}
RI1 0 in {RI}
VCC 3 0 {vsupply}
VEE 4 0 {-1*vsupply}
.tran 20ns 4020ns
.probe
.end
FIGURE 20. ENABLE RESPONSE PROGRAM
9
2.0
2.5
TIME (µs)
Application Note 9523
Summary
Six programs which compute and plot the response of an op
amp are described here. These programs make it easy to
complete the SPICE analysis, and by using them the results
may be compared to new Intersil Corporation data sheets.
This approach gives the minimum data required to evaluate
the model, but the actual evaluation must be made by the
design engineer. If the model indicates 2dB peaking at the
-3dB point while the data sheet shows 3dB peaking at the
same point, which does the engineer believe? Since the
model is an approximation, the data sheet should be more
correct than the model, but because the data sheet is based
on “typicals” their curves are sometimes hard to reproduce.
This vague area must be resolved through the experience of
the design engineer coupled with laboratory data. There is
no substitute for accurate measurements! When the data
sheet curves, the model curves and the lab curves all fit
within a reasonable tolerance the design engineer can begin
to trust the models. Keep testing though, because models
have been known to be very unpredictable.
Any comments, deletions or additions should be directed to
one of the authors for inclusion in revisions on this document.
All Intersil semiconductor products are manufactured, assembled and tested under ISO9000 quality systems certification.
Intersil semiconductor products are sold by description only. Intersil Corporation reserves the right to make changes in circuit design and/or specifications at any time without notice. Accordingly, the reader is cautioned to verify that data sheets are current before placing orders. Information furnished by Intersil is believed to be accurate and
reliable. However, no responsibility is assumed by Intersil or its subsidiaries for its use; nor for any infringements of patents or other rights of third parties which may result
from its use. No license is granted by implication or otherwise under any patent or patent rights of Intersil or its subsidiaries.
For information regarding Intersil Corporation and its products, see web site www.intersil.com
Sales Office Headquarters
NORTH AMERICA
Intersil Corporation
P. O. Box 883, Mail Stop 53-204
Melbourne, FL 32902
TEL: (321) 724-7000
FAX: (321) 724-7240
10
EUROPE
Intersil SA
Mercure Center
100, Rue de la Fusee
1130 Brussels, Belgium
TEL: (32) 2.724.2111
FAX: (32) 2.724.22.05
ASIA
Intersil (Taiwan) Ltd.
7F-6, No. 101 Fu Hsing North Road
Taipei, Taiwan
Republic of China
TEL: (886) 2 2716 9310
FAX: (886) 2 2715 3029
Similar pages