---
title: Stability and ringing
heading: When negative feedback turns positive
eyebrow: C6 · Lesson 38 · Stability and ringing
xp: 50
---

::: hook
Negative feedback subtracts the output from the input. But every amplifier delays its signal, and at high enough frequencies that delay becomes half a cycle. Then the "subtracted" signal is in step with the input, and if the loop still has a gain of one or more there, the amplifier feeds itself and oscillates. Short of that, it rings. A classic way to cause it: an op amp driving a capacitive load, such as a long cable.

::: play
- An op-amp follower (gain 1) drives a load capacitance through its own output resistance, 100 Ω here. Feedback is taken at the load. A 1 V step goes in.
- Start with a small capacitance and raise it. When does the output start to overshoot? When does it ring for several cycles?
- Now lower $R_O$, which moves the extra pole up. Watch the ringing calm down.
:::
:::

```sim circuit
V1 in 0 step 1              @ 0,2 down 2
RO x out 100                @ 5,1 up 3
CL out 0 1n                 @ 7,-2 down 6
U1 in out x GBW=10M         @ 2,1
slider: CL 10p..10n log
slider: RO 10..1k log
scope: v(in), v(out)
time: 0..3u s
```

::: predict
## The follower above has a 10 MHz gain-bandwidth; its 100 Ω output resistance and the 1 nF load add a second pole at 1.6 MHz. Roughly what's its phase margin?

- [ ] 80°
- [ ] 45°
- [x] About 20°
- [ ] Negative: it oscillates

::: reveal
About 22°. The extra pole pulls the loop's crossover down from 10 MHz to about 3.8 MHz, where the op amp's own pole contributes −90° and the load's pole $-\arctan(3.8/1.6) \approx -67°$, leaving 22°. That's far too small for comfort: the step response overshoots by about 50% and rings. Shrink the capacitor tenfold and the second pole moves to 16 MHz, raising the margin to about 60°.
:::
:::

::: nameit
## Stability

**The condition.** Around a feedback loop the signal is multiplied by the **loop gain** $L = A\beta$. If at some frequency $|L| = 1$ and the phase of L is −180°, the subtracted signal returns in phase: the circuit sustains an oscillation (the Barkhausen condition).

**Phase margin.** At the **crossover** frequency where $|L| = 1$, the phase margin is how far the phase of L is from −180°:

- 90°: a single-pole loop, perfectly damped;
- 60°: about 9% overshoot, a common target;
- 45°: about 23% overshoot;
- below 30°: pronounced ringing;
- 0° or less: oscillation.

**Two poles.** With the op amp's dominant pole (−90° above it) and a second pole at $f_2$, a follower's loop crosses over at or below GBW. A quick, pessimistic estimate of the margin is $90° - \arctan(\text{GBW}/f_2)$; it underestimates when $f_2$ is below GBW, because the second pole also pulls the crossover down. Exactly, the closed loop is second order with

$$\zeta = \tfrac12\sqrt{f_2/\text{GBW}}$$

so the overshoot follows from C2.15.

**Capacitive loads.** The op amp's output resistance $R_O$ and a load capacitance $C_L$ add a pole at $f_2 = 1/(2\pi R_OC_L)$. Cures:

- an **isolation resistor** between the output and the load, with feedback taken before it;
- an op amp rated for capacitive loads, or a lower-resistance output stage;
- more noise gain: a gain-of-10 stage crosses over ten times lower, where the second pole matters less.

**Compensation.** Op amps are designed with one deliberately dominant pole so that all their own internal poles sit above GBW; that's what makes them unity-gain stable. Some faster op amps are only stable above a minimum gain.
:::


::: example
## An op amp (GBW 1 MHz, output resistance 50 Ω) drives 10 nF as a follower. Estimate its phase margin and step overshoot.

::: solution
1. **Load pole.**
   $$\begin{aligned} f_2 &= \frac{1}{2\pi \times 50 \times 10\ \text{nF}} \\ &= 318\ \text{kHz} \end{aligned}$$
2. **Phase margin.**
   $$\begin{aligned} PM &\approx 90° - \arctan\frac{1}{0.318} \\ &= 18° \end{aligned}$$
3. **Damping and overshoot.**
   $$\begin{aligned} \zeta &= \frac12\sqrt{0.318} \\ &= 0.28 \end{aligned}$$
   so the overshoot is about 40%: it rings badly.

**Answer:** the phase margin is about 18°, and the step overshoots by about 40%.
:::
:::

::: example
## How far must the second pole move for a follower to overshoot by less than 2%?

::: solution
1. **Damping needed.** 2% overshoot needs ζ ≈ 0.78.
2. **Second pole.** Solve $\zeta = \frac12\sqrt{f_2/\text{GBW}}$ for $f_2$:
   $$\begin{aligned} f_2 &= 4\zeta^2\,\text{GBW} \\ &= 2.4\ \text{GBW} \end{aligned}$$
3. **How to get there.** An isolation resistor or a smaller load capacitance moves it there.

**Answer:** the second pole must sit at least 2.4 times GBW.
:::
:::

::: example
## The follower of the first example (GBW 1 MHz, 50 Ω output resistance) drives a capacitor. How large can the capacitor be for 45° of phase margin, and for 60°?

::: solution
1. **Load pole and margin.** The load makes a pole at
   $$f_2 = \frac{1}{2\pi \times 50\ \Omega \times C}$$
   and with the crossover near GBW, PM ≈ $90° - \arctan\frac{\text{GBW}}{f_2}$.
2. **For 45°.** $f_2$ = GBW, so
   $$\begin{aligned} C &= \frac{1}{2\pi \times 50 \times 1\ \text{MHz}} \\ &= 3.18\ \text{nF} \end{aligned}$$
3. **For 60°.**
   $$\begin{aligned} f_2 &= \frac{\text{GBW}}{\tan30°} \\ &= 1.73\ \text{MHz} \end{aligned}$$
   so C = 1.84 nF.
4. **On a datasheet.** "Stable with 1 nF" means about this: beyond it, the step response rings, and an isolation resistor or a slower op amp is needed.

**Answer:** up to 3.18 nF for 45° of phase margin, and 1.84 nF for 60°.
:::
:::

::: check
given: Ro = 10 | 50 | 100; CL = 0.1 | 1 | 10
answer: 1/(2*pi*Ro*CL*1e-9)/1e6
unit: MHz
tolerance: 0.5%

## An op amp's {Ro} Ω output resistance drives {CL} nF. Where is the extra pole?

::: right
Right. $1/(2\pi R_OC_L)$ = {answer}.
:::

::: misses
- [1/(Ro*CL*1e-9)/1e6] Include 2π.
- [any] Not yet. $f_2 = 1/(2\pi R_OC_L)$.
:::
:::

::: check
given: GBW = 1 | 10; f2 = 2 | 5 | 20
answer: 90 - atan(GBW/f2)*180/pi
unit: °
tolerance: 1%

## A follower built from a {GBW} MHz op amp has a second pole at {f2} MHz. Roughly what's its phase margin, using $90° - \arctan(\text{GBW}/f_2)$?

::: right
Right. {answer}.
:::

::: misses
- [atan(GBW/f2)*180/pi] That's the second pole's lag. Subtract it from 90°.
- [90 - atan(f2/GBW)*180/pi] It's GBW over $f_2$.
- [any] Not yet. $PM \approx 90° - \arctan(\text{GBW}/f_2)$.
:::
:::

::: check
given: GBW = 10; f2 = 2.5 | 20 | 40
answer: 0.5*sqrt(f2/GBW)
tolerance: 0.5%

## A follower with a 10 MHz op amp and a second pole at {f2} MHz. What's the damping ratio of its closed-loop response?

::: right
Right. $\zeta = \tfrac12\sqrt{f_2/\text{GBW}}$ = {answer}.
:::

::: misses
- [sqrt(f2/GBW)] Include the ½.
- [0.5*sqrt(GBW/f2)] It's $f_2$ over GBW.
- [any] Not yet. $\zeta = \tfrac12\sqrt{f_2/\text{GBW}}$.
:::
:::

::: check
given: z = 0.25 | 0.5 | 0.7
answer: 100*exp(-pi*z/sqrt(1 - z^2))
unit: %
tolerance: 1%

## That damping ratio comes out at ζ = {z}. How much does the step response overshoot?

::: right
Right. $e^{-\pi\zeta/\sqrt{1 - \zeta^2}}$ = {answer}.
:::

::: misses
- [100*exp(-pi*z)] Include $\sqrt{1 - \zeta^2}$.
- [any] Not yet. The second-order overshoot formula (C2.15).
:::
:::

::: check
kind: choice

## An op-amp follower rings when driving a long cable. Which change helps most?

- [ ] Raise the supply voltage
- [x] Add a small resistor between the op amp's output and the cable, taking feedback from the op amp side
- [ ] Use a larger load capacitance
- [ ] Remove the feedback

::: right
Right. The isolation resistor separates the load's pole from the feedback loop.
:::

::: misses
- [1] The supply doesn't move the poles.
- [3] More capacitance lowers the extra pole: worse.
- [4] Without feedback it's no longer a follower.
:::
:::

::: check
kind: parts
given: G = 0.5 | 1 | 10; Ro = 20 | 50 | 100; P = 55 | 60 | 65

## A follower (GBW {G} MHz, output resistance {Ro} Ω) drives a capacitor.

::: part
answer: 1/(2*pi*Ro*G*1e6/tan((90 - P)*pi/180))*1e9
unit: nF
tolerance: 0.5%

### What's the largest capacitor for {P}° of phase margin, with the crossover at GBW?

::: misses
- [1/(2*pi*Ro*G*1e6)*1e9] That gives 45°; solve $90° - \arctan\frac{\text{GBW}}{f_2} = $ PM.
- [any] $f_2 = \frac{\text{GBW}}{\tan(90° - \text{PM})}$ and $C = \frac{1}{2\pi R_of_2}$.
:::
:::

::: part
answer: 0.5*sqrt(G*1e6/tan((90 - P)*pi/180)/(G*1e6))
tolerance: 0.5%

### What damping ratio does that give?

::: misses
- [any] $\zeta = \frac12\sqrt{f_2/\text{GBW}}$.
:::
:::
:::

::: check
kind: derivation
vars: G = 100000..100000000, f = 100000..1000000000

## A follower has gain-bandwidth G and a second pole at f.

::: step
answer: 90 - atan(G/f)*180/pi

### What's its phase margin, in degrees, with the crossover at G?
:::

::: step
answer: 0.5*sqrt(f/G)

### What's its damping ratio?
:::

::: right
Right. A second pole at the GBW gives 45° and ζ = 0.5.
:::
:::

::: explain
## Why can an amplifier with negative feedback oscillate?

::: model
Every amplifier's response lags more and more at higher frequencies. Feedback is negative only as long as the fed-back signal is roughly opposite to the input. At the frequency where the loop's total phase lag reaches 180°, the fed-back signal arrives in step with the input instead, adding rather than subtracting. If the loop gain at that frequency is still at least one, a disturbance there grows each time around the loop, and the circuit oscillates. Phase margin measures how far the loop is from that condition where its gain falls to one.
:::
:::

::: practice

::: check
given: pm = 30 | 45 | 60
answer: 180 - pm
unit: °
tolerance: 0.5%

## A loop has {pm}° of phase margin. How much phase lag does it have at crossover?

::: misses
- [pm] Margin is measured from 180°.
- [any] $180° - PM$.
:::
:::

::: check
given: GBW = 1 | 10; G = 2 | 10
answer: GBW/G
unit: MHz
tolerance: 0.5%

## A {GBW} MHz op amp at a noise gain of {G}: roughly where does its loop cross over?

::: misses
- [GBW*G] Divide.
- [any] GBW ÷ noise gain.
:::
:::

::: check
kind: choice

## A loop has 0° of phase margin. What happens?

- [ ] It's perfectly damped
- [ ] It overshoots slightly
- [x] It oscillates
- [ ] It saturates

::: right
Right. It sits at the Barkhausen condition.
:::

::: misses
- [1] That's about 76° or more.
- [2] A little overshoot means a healthy margin.
- [4] Saturation may follow, but the cause is oscillation.
:::
:::
:::
