You are on page 1of 4

SPICE

Verify macro model accuracy


with PSpice test circuits
By Soufiane Bendaoud is a circuit that allows their cus- results and then call up the apps would be helpful to have a collec-
Amplifiers Marketing Manager tomer to verify the accuracy of group of the IC manufacturer to tion of circuits that allows users to
National Semiconductor Corp. the macro model. tell them that the model they’ve test any model, in other words,
Op-amp macro models are developed is not functional. universal test circuits for op amp
Spice models have gained popu- probably the most sought after. When the applications person macro models.
larity over the past years. While IC While they can be extremely tries to get some details about
manufacturers strive to provide helpful when accurate, they can what’s not working in the model, Parameters for test
their customers with accurate also cause serious problems, es- the response is usually, “I used a Macro models differ in their levels
models, system designers dictate pecially when they are not in the different model from your com- of complexity or simplicity. Much
the trend of accuracy and in- hands of experts. petitor, and it works just fine in like the datasheets, the models
novations in Spice macro model Most system design engi- my circuit.” should emulate parameters rel-
development. neers take the time to test the The truth is that all models evant to applications in which
Many IC companies claim that op amp macro model by itself are not the same, and some may the op amp is thought to be ap-
their models are the best and that before implementing it in a more not work in a particular setting. propriate. For example, if you use
they offer revolutionary features. comprehensive circuit. I’ve seen Instead of investigating op amp a rail to rail output op amp, you
What they often fail to provide people get erroneous simulation macro models’ shortcomings, it should be able to test and verify

Figure 1: When testing open loop gain and phase, the user should choose a
frequency range that goes beyond the unity gain bandwidth of the amplifier.

Figure 3: CMRR is especially important in non-inverting configurations


because of modulation.

Figure 2: When running the simulation for slew rate, make sure your setup is Figure 4: PSRR is important in any application where the voltage supply is
in transient. susceptible to any interference.

Electronic Engineering Times-Asia | November 1-15, 2006 | eetasia.com 


Figure 6: To simulate the current-noise density, use the same circuit and place
a 100kΩ resistor in series with the non-inverting terminal.

Figure 7: You can use any circuit previously described, and simply activate the
voltage and current probes in PSpice to see them.

goes beyond the unity gain band- voltage that appears.


width of the amplifier. When running the simulation
When using a rail-to-rail out- for slew rate, make sure your
put model, it is important to use setup is in transient. Ensure that
the test circuit with the same the input signal also has fast
load indicated in the datasheet. enough rise time and fall time
Figure 5: When modeled correctly, the output impedance helps to get a more Otherwise, you will probably not (edges) as to not limit the slew
accurate settling-time behavior when the amplifier is driving capacitive loads. get the result you would expect, rate. On the other hand, the input
especially the DC gain (AOL = signal frequency must be chosen
the output saturation voltage vs. case of a voltage feedback ampli- gmRL). according to the op amp’s speed.
the load current. Likewise, a low- fier) and the phase margin all in An input signal that’s too fast will
noise amplifier should have a one simple little circuit. Slew rate—This is another ele- cause convergence problems.
model that emulates at least the Figure 1 shows the test cir- ment defining the amplifier
voltage noise. cuit. The RC network ensures speed that every model should CMRR, PSRR—These two parame-
Despite their differences, am- that the output is biased at a have. Slew rate is defined by the ters are not always modeled, but
plifier macro models have some suitable DC voltage. At higher ratio of the tail current over the they can be equally important.
things in common. These are the frequencies, the capacitor shorts compensation capacitance. CMRR and PSRR are fairly easy to
most interesting parameters— the inverting input to ground, Depending on the macro implement in a model, as they
they are usually the starting point placing the op amp in open loop. model, the capacitor that deter- usually consist of a simple RC
of the simulation. The capacitor is chosen to be mines the slew rate can be placed network, resistor divider and volt-
large to provide an early roll off at the input or in a separate age-controlled voltage source.
Open loop gain, phase margin— (f = 2πRC). Thus, even if the op network. CMRR is especially important
The open loop gain vs. frequency amp you’re testing has a very low Since we already know the in non-inverting configurations
is probably the first test that en- frequency dominant pole, you relationship Idt = Cdv, we can because of modulation. On the
gineers perform to evaluate the would be able to simulate, see a simply use the circuit of Figure other hand, PSRR is important in
amplifier’s macro-model perfor- smooth transition and the 20dB 2 and take the derivative of the any application where the volt-
mance. This test is important be- per decade roll off. output to get the slew rate. To do age supply is susceptible to any
cause it shows the DC gain, -3dB When testing open loop this, just use the insert command interference.
frequency, crossover frequency gain and phase, the user should in the probe screen and type in The test circuits presented in
(gain bandwidth product in the choose a frequency range that the letter d before the output Figures 3 and 4 allow the user to

 Electronic Engineering Times-Asia | November 1-15, 2006 | eetasia.com


Figure 8: This test circuit sweeps the current across the supply and allows
you to determine how much current is drawn from the amplifier at different
supply voltages. Figure 10: In the second test circuit, we sweep the voltage from -2.5V to 2.5V.

the 1/f corner as well. that the supply current is also


You can easily test the volt- shown to be 1.15mA at ±2.5V.
age-noise density by taking the
output of a voltage follower Output saturation voltage—This
(with a voltage source of 0V) on a parameter is sometimes known
log-log scale. To simulate the cur- as the dropout voltage. It is par-
rent-noise density, use the same ticularly important in rail-to-rail
circuit and place a 100kΩ resistor output models. This is because it
in series with the non-inverting indicates the output swing as a
terminal. In the probe window, function of the load current and
make sure to divide the result by can help you choose the appro-
100E3 or whatever resistor value priate op amp, especially when
you choose. driving heavy loads or when dy-
Using a large resistor value namic range is a concern.
makes the current noise domi- The test circuit uses a simple
Figure 9: The first test circuit uses a voltage-controlled voltage source. nate since it is coupled into the DC sweep with two equal input
resistance. Thus, voltage and voltages of opposite magnitude
simulate these two parameters. output impedance at different thermal noises become negli- to replicate the sourcing and sink-
If they are modeled correct- gains in the frequency domain. gible compared to the current ing of the load current.
ly, the pole and zero location The output impedance is ob- noise.
should match the graphs in the tained by taking the ratio of the Make sure to specify the out- Supply current vs. supply volt-
datasheet. output voltage over the 1A cur- put voltage in the analysis setup age—The test circuit in Figure
Note that you can choose to rent source. window of PSpice. In Figure 6, we 8 sweeps the current across
invert either CMRR or PSRR on the The graph in Figure 5 shows specify the output voltage as Vout the supply and allows you to
plot screen by simply inserting a the output impedance of the and the input voltage as Vin, and determine how much current is
minus sign preceding the volt- LMV791 to be approximately check the box “noise-enabled.” drawn from the amplifier at dif-
age probe. 100Ω. ferent supply voltages. This test
Input bias current input offset is particularly helpful for power-
Output impedance—This is a Voltage, current noise—This is one voltage—These parameters are conscious applications.
specification often omitted from of the areas in which the creators probably the easiest to model. The slope of the supply cur-
the datasheet altogether, but is of amplifier macro models have The input offset voltage can eas- rent curve can easily be added
sometimes necessary. made progress. Some of today’s ily be implemented as a voltage- into the model.
When modeled correctly, the models allow you to simulate controlled voltage source at the
output impedance helps to get the voltage noise with its flicker input whose value is taken from Overshoot, transient response—
a more accurate settling-time noise component and current the datasheet. This test circuit serves two
behavior when the amplifier is noise with excellent accuracy. In general, you won’t even purposes: testing the transient
driving capacitive loads. Output Modeling noise into the macro have to use a specific circuit to response (whether small signal or
impedance is also needed to model doesn’t take much more test Vos and IB. You can use any large signal) and the overshoot.
calculate the proper component computing or simulation time. circuit previously described, and Overshoot is important be-
values when a compensation However, it can be a difficult task, simply activate the voltage and cause it indicates how much ring-
scheme is considered for stability at least until you have figured out current probes in PSpice to see ing an amplifier has with a capaci-
purposes. the right equations that make them. Figure 7 shows the input tive load. Overshoot is a measure
The test circuits provide the the voltage-noise density curve bias current at 1.5pA and the in- of stability in time domain; it is the
user with three curves for the mimic the datasheet graph with put offset voltage at 1.48mV. Note equivalent of what peaking is in

Electronic Engineering Times-Asia | November 1-15, 2006 | eetasia.com 


the frequency domain. used as a load when measuring source. In the second test circuit voltage follower with a sine wave
Some macro models use extra the small signal transient. In that in Figure 10, we sweep the volt- input of 6V. The output waveform
passive components to mimic case, simply use the same value age from -2.5V to 2.5V. indicates that the macro model,
the overshoot accurately. But of capacitance. just like the op amp, doesn’t
generally, if the phase margin is Phase reversal—Phase reversal exhibit any phase reversal. It is
accurate, the overshoot should Common-mode voltage range— occurs in some amplifiers when clipped at ±2.5V.
come pretty close to what it This parameter is important as it the input signal exceeds the The test circuits described are
should be. allows the user to see the head input common-mode voltage not meant to replace the evalua-
You can test the transient room and how far away your in- range. During a phase reversal, tion of the device on the bench.
response using the same test put signal needs to be from the the output changes polarity and Rather, they provide the user with
circuit without the 100pF ca- supply. may cause damage to the op the flexibility of making quick
pacitor. Some datasheets indicate The first test circuit in Figure 9 amp, resulting in system lockups. assessments with respect to the
whether a small capacitance is uses a voltage-controlled voltage The test circuit is a simple accuracy of the macro model.

 Electronic Engineering Times-Asia | November 1-15, 2006 | eetasia.com

You might also like