Skip to main content

Why does an Op Amp Oscillate?

Ever saw an op amp circuit oscillating and behaving weirdly? We basically have just two options: give up to the idea it's not really going to work and try another circuit, or the better option would be is to figure out what is wrong and make it work.

As some well known author has said, every op amp sits there waiting to oscillate [1]. I discussed in one of my articles here, titled What's The Feedback Around Op Amp All About?, the concept of negative feedback and how the large open loop gain makes the overall closed loop gain stable and predictable. It is when this negative feedback becomes not negative anymore, that is, if it becomes positive, that the circuit becomes unstable and starts to oscillate.

Figure 1 General Feedback Topology

How can that possibly happen? To put it in simplest terms, it happens when enough phase shift is introduced in the complete feedback path which includes the amplifier itself, enough to make the feedback turns180 degrees around, thus making the negative feedback positive. The gain of this loop all the way from the feedback input to the end of the feedback network is called loop gain. Below figure illustrates the feedback loop gain, where the signal starts at the negative input and ends at point x. This signal can be any noise present at the input when the circuit is turned on.

Figure 2 Loop Gain


Recall that if the feedback is positive, two things can possibly happen, either the output gets stuck at the power supply rail, or the output oscillates because the op amp experiences non-linearity towards the rail which reduces the open loop gain to less than one and makes the output head towards the opposite direction. Most often you will see oscillation.

Phase shifts in the loop gain are introduced by parasitics or by the amplifier itself, or a a combination of both. A capacitor, parasitic or not, at the output of the op amp right away introduces a pole in the loop gain, so does at the   negative feedback input node. But why would a capacitor at the output introduce a phase shift? The often ignored or forgotten reason is because the amplifier has an output resistance, Ro, which forms an R-C network with the load capacitor. Feed the signal back to the input and you will have added additional phase shift. This and an accumulation of more phase shifts due to parasitics, connive to make your amplifier go wayward and "sing", as the old timers put it.

Figure 3.a


Figure 3.b Additional Pole Added by the R-C at the Output



We hear the word "internally compensated" op amps, they refer to amplifiers which are "unity gain" stable. These amplifiers have a single R-C-network-like characteristics in the frequency domain up at least until the unity gain frequency. An R-C network has a single pole and has a maximum of 90 degrees phase shift. If these op amps are configured to a unity gain amplifier, the most phase shift it will ideally have in the loop gain is 90 degrees. Looking at the open loop gain plot, observe that the amplitude rolls-off at -20dB per decade, and crossing the unity gain frequency (0 dB) at the same slope. The loop gain plot of the buffer is the same as its open loop gain because the feedback network has a gain of one (feedback factor Beta is 1) . So they are guaranteed to operate in the unity gain configuration, unless you terribly mess up your circuit. The datasheet should tell you if your op amp is unity gain stable. It goes without telling then that you cannot use just any amplifier in a unity gain configuration. Below is a plot of open loop gain taken from the datasheet of OP77, a unity gain stable amplifier.

Figure 4 OP77


The ultimate question would be how can we avoid our amplifiers to oscillate. It is necessary that we understand the reason why op amps oscillate and try to avoid that in our design, which means choosing the right amplifiers and gain, knowing where parasitics can be, and provide the ability for compensation. Compensation refers to schemes that are used to reduce the phase shift and increase the phase margin, the amount of phase shift left to make the feedback positive, in the feedback loop. Phase margin therefore is 180 degrees minus the phase shift. Examples of compensation schemes are placement of a feedback capacitor, or a series resistor at the output of the amplifier. I will not cover here in detail how they increase the phase phase margin of the feedback loop, but I will dedicate separate topics on stability and compensation in future articles. Suffice it to say that the placement of those compensation networks are techniques to make the phase shift low enough (about 60 degrees phase margin is considered good) when the loop gain gets to the frequency where it is unity, by introducing some zero or a combination of zero and pole.

One last point I'd like to point out, which is very useful for engineers to know, is that increasing the overall closed loop gain of the amplifier increases the phase margin of the circuit. By increasing the closed loop gain, or commonly called the noise gain, the feedback attenuation decreases which means the loop gain plot will cross the unity gain earlier in frequency, and therefore lesser phase shift. That means an amplifier that has a gain of 10 has more phase margin (or we can say more "stable") than that with a gain of 1. This one is a very useful technique, but as I always say to my friends , analog problems don't have plug and play solutions. If a solution doesn't work, go look in other places and try to understand the problem better, which means more learning in store for us.

If you like this article and want to say thank you, please click like or post a feedback to help share knowledge.

References:
[1] Chapter 6 Putting the Amp into A Linear System, A Bakers Dozen, by Bonnie Baker, 2005

Other Recommended Readings
Op Amps for Everyone by Texas Instruments, Ron Mancini, Editor in Chief
Op Amps Driving Capacitive Loads, Ask The Applications Engineer, Analog Dialogue Volume 31




Comments

Popular posts from this blog

Arduino Transistor DC Motor Control

Arduino boards have PWM (Pulse Width Modulation) outputs that can be used to control like the speed of a DC motor. On a Pro Micro, those outputs are encircled white on the board. You can program it such that it outputs on a scale of 1-255, 1 being the slowest and 255 being the fastest. PWM gives out pulses whose width is varied (modulated) while the period is constant. The longer it is high, the higher power it delivers to the circuit. PWM can be used to drive a transistor (switch) which in turn drives the motor ON and OFF. The longer the switch is ON, the higher the power delivered to the motor, and thus faster. The circuit consists of a transistor Q1 (TIP31) NPN transistor, driven by the PWM from Arduino. The resistor is to limit the current to the base, but enough to operate the transistor in saturation when the input is high. The diode is to protect the motor from any back emf that might come from the motor when the current is cut off. The circuit is supplied by a 9V battery.

What Can You Do With Two Transistors (BJT)? Part 2 - Transistor Regulator

In the first installment of this series, we talked about what exciting things we can do with just two transistors, in particular BJT transistors. Some of us might probably think that we don't talk a lot about BJT transistors nowadays, not with the thrill, excitement, and trend brought about by high advancements in the technology in the Internet of Things, Machine Learning, Machine Intelligence, Advanced Algorithm, etc.. But we argue that these little circuits and components are constantly in the background of the advancements we see around us and we should not ignore them, as much we will not ignore what we currently enjoy and what the future holds for us. Let's continue to look at the Two-Transistor Series Regulator we talked about in Part 1 . The circuit below is a different version, now using the transistor to provide feedback from the output. This makes the output voltage higher. The output is still derived from the zener voltage. The output voltage is now a s

How Does The Howland Current Source Work?

Current source programs an output current as defined by the user, regardless of the load resistance. We know that when load resistance is larger, the voltage across it also increases. An ideal source would maintain a constant amount of current even if the load resistance changes, or in other words even if the output voltage changes. Such behavior describes a very good current source that has high output impedance. Remember, the output voltage changes, but very little or no change in output current. That means high output resistance or impedance. We use the term impedance when dealing with changes. Howland circuit in the figure is a classic current source circuit.   When R 1 is made equal to R 2 , R F equal to R 3,  the output current is given by V IN /R 1 where V IN is V 1 minus V 2 . A simple implementation is grounding V 2 and taking V 1 as the V IN . Figure 1 Basic Howland Current Source This circuit is such a clever manipulation of the op amp, such