Where to stimulate when you simulate

Article By : John Dunn

If you want to model the gain/phase of some circuit using a Bode plotter in SPICE, you need to provide that circuit with a nominal signal stimulus.

One cannot be arbitrary about where to introduce stimulation into a circuit model. It has been noted before that if you want to model the gain/phase of some circuit using a Bode plotter in SPICE, you need to somehow provide that circuit with a nominal signal stimulus.

Please see: “Simulation Trouble: Bode Plotting an Oscillator.”

Well, it happened again. This time, I wanted to look at the accuracy of an op-amp model’s gain-bandwidth properties so I tried it two ways: first WITHOUT a slight signal stimulus which DID NOT work, and then in a second way WITH a slight signal stimulus which DID work (Figure 1).

Figure 1 Failure and success.

However, that successful outcome did not just happen. I had blithely thought at first that I could introduce a small stimulus signal pretty much anywhere I arbitrarily chose and all would be well.

To quote the late George Carlin: “Au contraire, mon frère.”

When I inserted my signal stimulus as shown below, the Bode plotter did NOT display the op-amp information I was seeking (Figure 2).

Figure 2 Unsuccessful attempt.

The reason why this didn’t work was that by adding the stimulus signal at the op-amp’s non-inverting input, that op-amp behaved as a non-inverting gain stage with respect to V3. The inverting input was forced to follow whatever signal the non-inverting input received. With R1 and R2 of equal value, the non-inverting circuit gain was two which comes to 6.0206…dB, which the Bode plotter then presented as 6.025 dB over the frequency range for which the op-amp could provide service.

My error was in not realizing that the attempted gain measurement would be dominated by the two resistors and NOT by the op-amp. One cannot always just arbitrarily choose a stimulus point.

I won’t (I hope) make that mistake ever again.

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).

 

Leave a comment