X

This sketch is for a zero offset, two pole lowpass filter that was described in part 1 of this series. It’s transfer function and algebraically-calculated roll-off results are nothing special. The roll-off results were also replicated in Multi-Sim SPICE.

**Figure 1** The roll-off results for this zero offset lowpass filter are nothing special.

Almost replicated that is! As it later turned out, because of a SPICE-related glitch that was not discussed at the time, there was an issue that arose involving one’s choice of op-amp model.

The following three SPICE simulations of this filter illustrate three choices for modeling the op amp.

**Figure 2** These lowpass filter simulations illustrate three choices for modeling the op amp.

Op amp U1 is the default “virtual” op amp in the SPICE library. Although virtual, it is NOT an “ideal” op amp. U1 has finite gain instead of infinite gain, finite bandwidth instead of infinite bandwidth, and U1 has a limited speed of response instead of infinite speed. Those constraints do matter.

Op amp U2 is another virtual device but U2 has had its gain, bandwidth, and speed extended pretty much as far up and out as the SPICE program would allow in order to make U2 look as much as possible like an ideal op amp. Please see **Figure 3** for the comparisons.

**Figure 3** These results show the attempted idealization or enhancement of U2 versus U1.

Op amp U3 is a SPICE library model of an actual device. The three filter simulation results come out as follows.

**Figure 4** Compare the filter simulations to assess the op amps.

The simulation with U1 starts to roll off as we might expect it to but there is a notch frequency, even though the algebraic equation for finding Eo/E1 doesn’t lead to any such thing. By comparison, the simulation using U2, the op amp that we modified to make U2 closer to ideal, shows no such notch within the range of this graphical presentation. (There still is a notch at a higher frequency and greater roll-off attenuation, but that notch is beyond viewing in these images.)

“Hooray,” you might say. If I idealize the chosen op amp, I get the result mathematically predicted by the Eo/E1 transfer function equation. But! (there is always a but, isn’t there), if we use the model of an actual op amp as in U3, not only do I get that notch back again, there is even further re-entry deviation in the frequency response curve for frequencies above that notch frequency.

The idealized op amp model U2 is very much a less accurate representation of the actual op amp than the default model is. The default model does a better job of revealing actual performance truths.

The underlying caution to all of this is to not make any assumptions about the parameters and properties of any virtual models in SPICE. Before you depend on a virtual model in your simulation, you must take a look at the assigned properties of that virtual model and see how they compare to the real life device that will end up in your design.

You might get a surprise or two.

*This article was originally published on EDN.*

*John Dunn is an electronics consultant, and a graduate of The Polytechnic Institute of Brooklyn (BSEE) and of New York University (MSEE).*

**Related articles**: