# Stability

When the op-amp is connected in closed-loop configurations, under certain conditions, the op-amp can go into oscillation causing stability issues.

Using the closed-loop transfer function below, as G = A(f)/[1+βA(f)], where f is the operating frequency. The closed-loop gain of the op-amp is frequency dependent.

Noted that if βA(f0) = -1, the gain goes to infinity, the circuit is unstable, it can amplify its own noise, and it eventually begins to oscillate. Keep in mind that we can construct an op-amp as an oscillator with a defined and controlled frequency. However, in this case, the op-amp is presumably used as a DC amplifier and any oscillation is undesirable. This condition can be expressed as |βA|=1 and ےβA = -180°, at f = f0. Note that the total phase shift around the loop at f = f0 is 360° because negative feedback itself introduces 180°of phase shift. In other words, if the overall controlled loop introduces a total of 360° phase shift, the op-amp can potentially oscillate.

There are two specific criteria we use to determine if the op-amp is stable or not at a specific frequency, phase margin and gain margin.