---
title: Block diagrams and feedback
heading: Connecting systems, and what feeding the output back does
eyebrow: C9 · Lesson 34 · Block diagrams and feedback
xp: 40
---

::: hook
Real systems are built from blocks: a sensor, an amplifier, a motor, a controller. In the s-domain, connecting blocks is just algebra: blocks in a chain multiply, blocks side by side add. The most consequential connection is **feedback**, where the output is measured and subtracted from the input. It's how an op amp gets a precise gain from wildly variable transistors, how a thermostat holds a temperature, and how a rocket balances on its thrust. Feedback moves a system's poles, which means it can make a sluggish system fast, an unstable one stable, or, pushed too hard, a stable one ring.
:::

::: play
- A plant $G(s) = K/(s(s + a))$, like a motor's position, sits in a unity-feedback loop. The crosses are the open-loop poles and the line is the root locus: where the closed-loop poles go as the gain K rises.
- The dots are the closed-loop poles at the current K. At low K they're real: a slow, smooth response. Past $K = a^2/4$ they split into a complex pair and the response overshoots.
- Raise K and the poles climb: faster, but less damped. The readouts give the natural frequency, damping ratio and step-response overshoot.
:::
:::

```sim plot
view: splane
range: 12
slider: a = 1..8 = 4 step 0.5
slider: K = 0..150 = 16 step 0.5
den: s*(s + a)
locus: K = 0..150
readout: natural frequency ωn, rad/s = sqrt(K) | digits: 3
readout: damping ratio ζ = a/(2*sqrt(K + 0.000001)) | digits: 3
readout: overshoot, % = 100*exp(-pi*a/(2*sqrt(K + 0.000001))/sqrt(abs(1 - a^2/(4*K + 0.000001))))*step(1 - a^2/(4*K + 0.000001)) | digits: 3
```

::: predict
## An unstable plant $G(s) = 1/(s - 2)$ is put in a unity-feedback loop with a gain K in front. How large must K be for the loop to be stable?

- [ ] Any K > 0
- [x] K > 2
- [ ] K > 4
- [ ] No K stabilizes it

::: reveal
K > 2. The closed loop is $K/(s - 2 + K)$, with its pole at $s = 2 - K$, which is in the left half-plane once K > 2. Feedback pulls the pole across the jω axis, which no amount of open-loop gain could do.
:::
:::

::: nameit
## Connecting blocks

| Connection | Overall transfer function |
|---|---|
| series | $H_1(s)H_2(s)$ |
| parallel | $H_1(s) + H_2(s)$ |
| negative feedback, forward G, feedback H | $\dfrac{G(s)}{1 + G(s)H(s)}$ |

$G(s)H(s)$ is the **loop gain**. Where it's large, the closed loop is about 1/H: set by the feedback path, which can be made of precise resistors, instead of by G.

## What feedback buys

- **Insensitivity:** a fractional change in G changes the closed-loop gain by only $1/(1 + GH)$ of that fraction.
- **Speed:** for $G = K/(s + a)$ with unity feedback, the closed-loop pole moves from −a to $-(a + K)$: faster by a factor $1 + K/a$, at a DC gain of $K/(a + K)$.
- **Stabilization:** $G = K/(s - a)$ has a closed-loop pole at $a - K$, stable for K > a.

## The price

Higher gain moves poles further, and not always leftward. With $G = K/(s(s + a))$ the closed loop is $K/(s^2 + as + K)$, a second-order system with

$$\omega_n = \sqrt{K}, \qquad \zeta = \frac{a}{2\sqrt K}, \qquad \text{overshoot} = e^{-\pi\zeta/\sqrt{1 - \zeta^2}}$$

so more gain means faster but more oscillatory. Plants with more poles can go unstable as K rises, which is where control design (S9) begins.
:::

::: example
## An amplifier with open-loop gain 1000 uses feedback H = 0.01. What is its closed-loop gain, and what happens if the open-loop gain drops 20%?

::: solution
1. **Closed-loop gain.**
   $$\begin{aligned} \frac{G}{1 + GH} &= \frac{1000}{1 + 10} \\ &= 90.9 \end{aligned}$$
   close to 1/H = 100.
2. **With G down 20%.** G falls to 800:
   $$800/9 = 88.9$$
   a change of 2.2% for a 20% change in G.
3. **First-order estimate.**
   $$\begin{aligned} 20\%/(1 + GH) &= 20\%/11 \\ &= 1.8\% \end{aligned}$$

**Answer:** the closed-loop gain is 90.9, and it falls only 2.2%, to 88.9, when the open-loop gain drops 20%.
:::
:::

::: example
## $G = K/(s(s + 4))$ in unity feedback. Describe the step response at K = 16 and K = 100.

::: solution
1. **Damping at K = 16.**
   $$\begin{aligned} \omega_n &= 4 \\ \zeta &= 4/8 \\ &= 0.5 \end{aligned}$$
2. **Overshoot at K = 16.**
   $$e^{-\pi \cdot 0.5/\sqrt{0.75}} = 16\%$$
3. **K = 100.** Here $\omega_n = 10$ and ζ = 0.2, so the overshoot is 53%.
4. **Compare.** Six times the gain: faster, but far more ringing.

**Answer:** at K = 16 the response overshoots 16% (ζ = 0.5); at K = 100 it's faster but overshoots 53% (ζ = 0.2).
:::
:::

::: example
## A plant $G = K/(s + 1)$ is in unity feedback. Where is the closed-loop pole, and what is the steady-state error to a step, for K = 9?

::: solution
1. **Closed loop.**
   $$T = K/(s + 1 + K)$$
2. **Pole.** It moves from −1 to $-(1 + K) = -10$: ten times faster.
3. **Steady-state error.** The DC gain is
   $$K/(1 + K) = 0.9$$
   so the output settles at 90% of the command, an error of 1/(1 + K) = 10%.
4. **The promise of feedback.** More gain means a faster loop and a smaller error, which is the basic promise of feedback; an integrator in the loop removes the error entirely.

**Answer:** the closed-loop pole is at −10, and the steady-state error to a step is 10%.
:::
:::

::: check
given: G = 100 | 1000 | 1e5; H = 0.1 | 0.02
answer: G/(1 + G*H)
tolerance: 0.5%

## A forward gain of {G} has feedback H = {H}. What is the closed-loop gain?

::: right
Right. $G/(1 + GH)$ = {answer}, near 1/H = 1/{H}.
:::

::: misses
- [G/(1 - G*H)] Negative feedback subtracts: the denominator is 1 + GH.
- [any] Not yet. $G/(1 + GH)$.
:::
:::

::: check
given: G = 200 | 2000; H = 0.05 | 0.1; d = 10 | 30
answer: d/(1 + G*H)
unit: %
tolerance: 0.5%

## The forward gain {G} drifts by {d}%. With feedback H = {H}, by roughly how many percent does the closed-loop gain change?

::: right
Right. $d/(1 + GH)$ = {answer}%.
:::

::: misses
- [d] Feedback divides the sensitivity by 1 + GH.
- [any] Not yet. Divide by 1 + GH.
:::
:::

::: check
kind: parts
given: K = 9 | 40; a = 1 | 5

## $G(s) = \given{K}/(s + \given{a})$ in unity feedback.

::: part
answer: -(a + K)
tolerance: 0.5%

### Where is the closed-loop pole?

::: misses
- [-a] That's the open-loop pole; feedback moves it to −(a + K).
- [any] Not yet. Solve $s + a + K = 0$.
:::
:::

::: part
answer: K/(a + K)
tolerance: 0.5%

### What is the closed-loop DC gain?

::: misses
- [K/a] That's the open-loop DC gain.
- [any] Not yet. $T(0) = K/(a + K)$.
:::
:::
:::

::: check
given: a = 0.5 | 3 | 10
answer: a
tolerance: 0.5%

## $G(s) = K/(s - \given{a})$ is unstable. Above what K does unity feedback make it stable?

::: right
Right. The closed-loop pole is at a − K, in the left half-plane for K > {a}.
:::

::: misses
- [2*a] The pole is at a − K; it just needs to cross 0.
- [any] Not yet. Find where a − K = 0.
:::
:::

::: check
kind: parts
given: K = 9 | 25 | 64; a = 2 | 6

## $G(s) = \given{K}/(s(s + \given{a}))$ in unity feedback.

::: part
answer: sqrt(K)
unit: rad/s
tolerance: 0.5%

### What is the closed loop's natural frequency?

::: misses
- [any] $\sqrt K$.
:::
:::

::: part
answer: a/(2*sqrt(K))
tolerance: 0.5%

### What is its damping ratio?

::: misses
- [a/sqrt(K)] $2\zeta\omega_n = a$.
- [any] Not yet. $\zeta = a/(2\sqrt K)$.
:::
:::
:::

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

## A second-order closed loop has ζ = {z}. What percent overshoot does its step response show?

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

::: misses
- [100*exp(-pi*z)] Divide πζ by $\sqrt{1 - \zeta^2}$ too.
- [any] Not yet. $100e^{-\pi\zeta/\sqrt{1-\zeta^2}}$.
:::
:::

::: check
kind: parts
given: k1 = 2 | 6; a1 = 1 | 3; k2 = 3 | 5; a2 = 4 | 10

## $H_1 = \given{k1}/(s + \given{a1})$ and $H_2 = \given{k2}/(s + \given{a2})$.

::: part
answer: k1/a1*k2/a2
tolerance: 0.5%

### What is the DC gain of the two in series?

::: misses
- [k1/a1 + k2/a2] That's parallel; in series they multiply.
- [any] Not yet. $H_1(0)H_2(0)$.
:::
:::

::: part
answer: k1/a1 + k2/a2
tolerance: 0.5%

### What is the DC gain of the two in parallel?

::: misses
- [any] $H_1(0) + H_2(0)$.
:::
:::
:::

::: check
kind: parts
given: G = 50 | 200 | 1000; H = 0.05 | 0.1

## An amplifier with forward gain {G} uses feedback H = {H}.

::: part
answer: G/(1 + G*H)
tolerance: 0.5%

### What is the closed-loop gain?

::: misses
- [1/H] That's the limit for infinite G.
- [any] $G/(1 + GH)$.
:::
:::

::: part
answer: 1/(1 + G*H)
tolerance: 0.5%

### By what factor does feedback shrink the effect of a change in G?

::: misses
- [any] The sensitivity, $1/(1 + GH)$.
:::
:::
:::

::: check
kind: parts
given: K = 4 | 25 | 100; a = 2 | 4 | 6

## $G = K/(s(s + a))$ with K = {K} and a = {a}, in unity feedback.

::: part
answer: sqrt(K)
unit: rad/s
tolerance: 0.5%

### What is $\omega_n$?

::: misses
- [any] The closed loop is $s^2 + as + K$.
:::
:::

::: part
answer: a/(2*sqrt(K))
tolerance: 0.5%

### What is ζ?

::: misses
- [any] $a = 2\zeta\omega_n$.
:::
:::
:::

::: explain
## Why does a large loop gain make the closed-loop gain depend on the feedback network instead of the amplifier?

::: model
The closed-loop gain is G/(1 + GH). When GH is much larger than 1, the 1 is negligible and the G's cancel, leaving 1/H. Physically, the feedback compares a fraction H of the output with the input and drives the amplifier with the difference; a huge G means only a tiny difference is needed, so the output settles where H times the output nearly equals the input. Changes in G change that tiny difference but barely move the output. Since H is usually a resistor divider, which can be made precise and stable, the whole amplifier inherits that precision.
:::
:::

::: practice

::: check
given: G = 500 | 1e4; H = 0.01 | 0.1
answer: G/(1 + G*H)
tolerance: 0.5%

## Closed-loop gain for G = {G}, H = {H}?

::: misses
- [any] $G/(1 + GH)$.
:::
:::

::: check
given: K = 16 | 49; a = 4 | 7
answer: a/(2*sqrt(K))
tolerance: 0.5%

## Damping of $\given{K}/(s(s + \given{a}))$ in unity feedback?

::: misses
- [any] $a/(2\sqrt K)$.
:::
:::

::: check
given: K = 5 | 20; a = 2 | 4
answer: -(a + K)
tolerance: 0.5%

## Closed-loop pole of $\given{K}/(s + \given{a})$ with unity feedback?

::: misses
- [any] −(a + K).
:::
:::
:::
