---
title: "Negative feedback: gain, bandwidth and linearity"
heading: Giving up gain to get everything else
eyebrow: C6 · Lesson 16 · Negative feedback
xp: 50
---

::: hook
In 1927 Harold Black, working on telephone repeaters that distorted and drifted, had an idea on the ferry to work: build an amplifier with far more gain than needed, then feed a fraction of its output back to subtract from its input. The result has less gain, but that gain is set by a pair of resistors instead of the fickle amplifier, it reaches much higher frequencies, and its distortion shrinks by the same factor. Negative feedback is the reason analog electronics works at all.

::: play
- The open-loop curve is an amplifier with huge DC gain $A_0$ and a pole at $f_p$. The closed-loop curve is the same amplifier with a fraction β of its output fed back.
- Raise β. How does the closed-loop gain change? How does its bandwidth change?
- Multiply the closed-loop gain by its bandwidth. Compare with the open loop's gain times its bandwidth.
:::
:::

```sim plot
view: graph
x: f = 1..10M Hz log
y: gain = -20..120 dB
slider: A0 = 1000..1000000 = 100000 log
slider: fp = 1..1000 = 10 Hz log
slider: beta = 0.001..1 = 0.01 log
plot: 20*log10(abs(A0/(1 + j*f/fp))) | label: open loop A
plot: 20*log10(abs((A0/(1 + j*f/fp))/(1 + beta*A0/(1 + j*f/fp)))) | color: ch2 | label: closed loop A/(1 + Aβ)
plot: 20*log10(1/beta) | dashed | color: ch3 | label: 1/β
readout: closed-loop gain at DC = A0/(1 + A0*beta)
readout: closed-loop bandwidth in Hz = fp*(1 + A0*beta)
readout: open-loop gain × bandwidth in Hz = A0*fp
```

::: predict
## An amplifier with an open-loop gain of 100,000 is used with β = 0.01 (aiming for a gain of 100). Its open-loop gain then drops by 20%, to 80,000. How much does the closed-loop gain change?

- [ ] By 20%
- [ ] By 2%
- [x] By about 0.025%
- [ ] Not at all

::: reveal
By about 0.025%. The closed-loop gain is $A/(1 + A\beta)$: 99.900 with A = 100,000 and 99.875 with 80,000. A change in A is divided by the **loop gain** $1 + A\beta$, here about 1000. That's why op-amp circuits keep their gain as the op amp warms up, ages or is swapped for another.
:::
:::

::: nameit
## The feedback equations

**The loop.** An amplifier of gain A takes the error $x_\text{in} - \beta x_\text{out}$, where β is the fraction of the output fed back (set by resistors):

$$G = \frac{x_\text{out}}{x_\text{in}} = \frac{A}{1 + A\beta}$$

When the **loop gain** $A\beta \gg 1$, $G \approx 1/\beta$: the gain depends only on the feedback network.

**Everything improves by the same factor, $1 + A\beta$:**

- **Sensitivity.** $\frac{dG}{G} = \frac{1}{1 + A\beta}\frac{dA}{A}$.
- **Bandwidth.** With a single-pole amplifier $A = A_0/(1 + jf/f_p)$, the closed loop has its pole at $f_p(1 + A_0\beta)$. Gain falls by the same factor, so the **gain-bandwidth product** stays constant: $G \times f_\text{3dB} \approx A_0f_p$.
- **Distortion and noise inside the loop** are reduced by $1 + A\beta$, because the feedback sees them and corrects for them.
- **Impedances** change by $1 + A\beta$: feedback that senses the output voltage lowers the output impedance; feedback mixed in series with the input raises the input impedance.

**The cost** is gain, which is cheap: transistors provide plenty. The danger is that at high frequencies the amplifier's phase shift can turn negative feedback into positive (lesson 38).

**Positive feedback** (adding instead of subtracting) does the opposite: it makes switching circuits snap and oscillators oscillate (lesson 48).
:::


::: example
## An amplifier's gain is 10⁵ ± 20%. With β = 0.01, what is the closed-loop gain, and how much does it vary?

::: solution
1. **Closed-loop gain.**
   $$\begin{aligned} G &= \frac{10^5}{1 + 1000} \\ &= 99.9 \end{aligned}$$
2. **Variation.** The 20% variation is divided by $1 + A\beta$ = 1001:
   $$\frac{20\%}{1001} = 0.02\%$$

**Answer:** the closed-loop gain is 99.9, and it varies by only 0.02%.
:::
:::

::: example
## The same amplifier has a single pole at 10 Hz. What bandwidth does the closed loop have?

::: solution
1. **Closed-loop pole.** The pole moves up by $1 + A\beta$:
   $$10\ \text{Hz} \times 1001 = 10\ \text{kHz}$$
2. **Check.** Gain times bandwidth stays at 1 MHz.

**Answer:** the closed loop has a bandwidth of 10 kHz.
:::
:::

::: example
## An amplifier with an open-loop gain of 1000 has 5% second-harmonic distortion at its rated output. Wrapped in feedback with β = 0.1, what's its gain, and its distortion at the same output?

::: solution
1. **Closed-loop gain.** The loop gain is $A\beta$ = 100, so
   $$\begin{aligned} G &= \frac{1000}{101} \\ &= 9.90 \end{aligned}$$
2. **Distortion.** A harmonic created inside the loop is fed back and cancelled like any other error, so at the same output amplitude it's divided by $1 + A\beta$:
   $$\begin{aligned} HD_2 &= \frac{5\%}{101} \\ &= 0.050\% \end{aligned}$$
3. **The trade.** Feedback traded a factor of 101 in gain for a factor of 101 in linearity. The same trade sets an op amp's distortion: a large open-loop gain is what there is to spend.

**Answer:** the gain is 9.90, and the distortion falls to 0.050% at the same output.
:::
:::

::: check
given: A = 100 | 1000; beta = 0.01 | 0.1
answer: A/(1 + A*beta)
tolerance: 0.1%

## An amplifier with A = {A} has feedback fraction β = {beta}. What's the closed-loop gain?

::: right
Right. $A/(1 + A\beta)$ = {answer}, close to $1/\beta$.
:::

::: misses
- [1/beta] That's the ideal value; with finite A it's slightly less.
- [A*beta] Divide, don't multiply.
- [any] Not yet. $G = A/(1 + A\beta)$.
:::
:::

::: check
given: A = 100 | 1000; beta = 0.01 | 0.1
answer: 100/(1 + A*beta)
unit: %
tolerance: 0.5%

## With A = {A} and β = {beta}, by what percentage does the closed-loop gain fall short of the ideal 1/β?

::: right
Right. The shortfall is $\frac{1}{1 + A\beta}$ = {answer}.
:::

::: misses
- [100/(A*beta)] Close; the exact fraction is $1/(1 + A\beta)$.
- [any] Not yet. $1 - \frac{A\beta}{1 + A\beta} = \frac{1}{1 + A\beta}$.
:::
:::

::: check
given: A = 10000 | 100000; beta = 0.01 | 0.1; dA = 10 | 30
answer: dA/(1 + A*beta)
unit: %
tolerance: 1%

## An amplifier (A = {A}) with β = {beta} loses {dA}% of its open-loop gain. By roughly what percentage does the closed-loop gain change?

::: right
Right. Divided by the loop gain: {answer}.
:::

::: misses
- [dA] Feedback reduces the effect by $1 + A\beta$.
- [any] Not yet. $\frac{dG}{G} = \frac{1}{1 + A\beta}\frac{dA}{A}$.
:::
:::

::: check
given: A0 = 100000 | 200000; fp = 5 | 10; G = 10 | 100 | 1000
answer: A0*fp/G/1000
unit: kHz
tolerance: 1%

## An op amp has $A_0$ = {A0} and an open-loop pole at {fp} Hz. Configured for a gain of {G}, roughly what's its bandwidth?

::: right
Right. Gain-bandwidth is constant: $A_0f_p/G$ = {answer}.
:::

::: misses
- [fp*G/1000] Bandwidth goes down as gain goes up: divide.
- [any] Not yet. $f_\text{3dB} \approx A_0f_p/G$.
:::
:::

::: check
given: THD = 1 | 5 | 10; Ab = 10 | 100 | 1000
answer: THD/(1 + Ab)
unit: %
tolerance: 1%

## An amplifier stage distorts by {THD}% open loop. Inside a feedback loop with a loop gain $A\beta$ = {Ab}, roughly how much distortion remains?

::: right
Right. Reduced by $1 + A\beta$: {answer}.
:::

::: misses
- [THD] Feedback corrects distortion inside the loop.
- [any] Not yet. Divide by $1 + A\beta$.
:::
:::

::: check
kind: parts
given: A = 200 | 1000; b = 0.01 | 0.1; h = 2 | 5 | 10

## An amplifier with open-loop gain {A} and {h}% distortion at its rated output gets feedback with β = {b}.

::: part
answer: A/(1 + A*b)
tolerance: 0.5%

### What's its closed-loop gain?

::: misses
- [1/b] Close; the exact gain is $\frac{A}{1 + A\beta}$.
- [any] $\frac{A}{1 + A\beta}$.
:::
:::

::: part
answer: h/(1 + A*b)
unit: %
tolerance: 0.5%

### What's its distortion at the same output?

::: misses
- [h/(A*b)] Divide by $1 + A\beta$.
- [any] $\frac{HD}{1 + A\beta}$.
:::
:::
:::

::: check
kind: derivation
vars: A = 10..1000000, b = 0.0001..1, p = 1..10000

## An amplifier with gain A and a single pole at p (Hz) is closed with feedback β = b.

::: step
answer: A/(1 + A*b)

### What's the closed-loop gain?
:::

::: step
answer: p*(1 + A*b)

### Where's the closed-loop pole?
:::

::: step
answer: A*p

### What's the gain-bandwidth product, closed or open?
:::

::: right
Right. Feedback moves along a line of constant gain-bandwidth.
:::
:::

::: explain
## Why does a feedback amplifier's gain depend almost entirely on the feedback network when the loop gain is large?

::: model
The amplifier only amplifies the difference between the input and the fed-back fraction of the output. With very high gain, a tiny difference is enough to produce any output needed, so in operation the fed-back signal is almost exactly equal to the input. That forces the output to be the input divided by the feedback fraction, $1/\beta$. The amplifier's own gain only sets how small the leftover difference is, so even large changes in it barely change the overall gain.
:::
:::

::: practice

::: check
given: beta = 0.001 | 0.01 | 0.1
answer: 1/beta
tolerance: 0.5%

## Ideal closed-loop gain for β = {beta}?

::: misses
- [beta] It's the reciprocal.
- [any] $1/\beta$.
:::
:::

::: check
given: A = 100 | 1000; beta = 0.1 | 0.01
answer: 1 + A*beta
tolerance: 0.5%

## A = {A}, β = {beta}. Loop gain factor $1 + A\beta$?

::: misses
- [A*beta] Add 1.
- [any] $1 + A\beta$.
:::
:::

::: check
given: GBW = 1 | 10; G = 10 | 100
answer: GBW*1000/G
unit: kHz
tolerance: 0.5%

## GBW {GBW} MHz at a gain of {G}. Bandwidth?

::: misses
- [any] GBW ÷ gain.
:::
:::
:::
