---
title: Transfer functions and block diagrams
heading: Combining blocks in series, parallel and feedback, the closed-loop transfer functions from reference, disturbance and noise, the characteristic equation, Mason's gain formula, and why pole–zero cancellations hide trouble
eyebrow: S9 · Lesson 4 · Transfer functions and block diagrams
xp: 50
---

::: hook
A control system is a few blocks wired in a loop: a controller, an actuator, the plant, a sensor. Each block is a transfer function, and the algebra of block diagrams turns the whole loop into one transfer function from any input to any output. The denominator that appears every time, $1 + L(s)$, holds the loop's fate: its roots are the closed-loop poles. This lesson builds the algebra and uses it to see how feedback speeds up a slow plant.
:::

::: play
- A first-order plant $P = K_0/(\tau s + 1)$ with $K_0$ = 20 and τ = 16 ms (the motor of lesson 2) under proportional control $K_p$.
- The closed loop is first order too, with DC gain $K_pK_0/(1 + K_pK_0)$ and time constant $\tau/(1 + K_pK_0)$: more gain makes it faster and more accurate.
- The dashed curve is the plant alone, scaled to reach 1. The loop's speed comes from overdriving the plant at first, which a real amplifier can do only up to its limits.
:::

```sim plot
view: graph
x: t = 0..0.06 s
y: y = 0..1.1
slider: K = 0.05..5 = 0.5 log
plot: K*20/(1 + K*20)*(1 - exp(-t*(1 + K*20)/0.016)) | samples: 400 | label: closed loop
plot: 1 - exp(-t/0.016) | dashed | color: ch3 | label: plant alone (normalized)
readout: closed-loop time constant, ms = 16/(1 + 20*K) | digits: 3
readout: steady error, % = 100/(1 + 20*K) | digits: 3
```

::: predict
## The motor $P = 20/(0.016s + 1)$ gets proportional control with $K_p$ = 0.5. What's the closed loop's time constant?

- [ ] 16 ms, the same as the plant
- [ ] 8 ms
- [x] About 1.5 ms
- [ ] 0.16 ms

::: reveal
$T = \frac{10/(0.016s + 1)}{1 + 10/(0.016s + 1)} = \frac{10}{0.016s + 11}$, a pole at −11/0.016 = −688 s⁻¹: time constant 16/11 = 1.45 ms, eleven times faster than the plant, with DC gain 10/11 = 0.91.
:::
:::

::: nameit
## Combining blocks

Series blocks multiply, parallel blocks add, and a forward path G with feedback H through a summing junction with a minus sign gives

$$\frac{G}{1 + GH}$$

## The loop's transfer functions

With controller C, plant P, unity sensor and loop gain $L = PC$, from each input to the output y and the error e:

| From | To y | To e |
|---|---|---|
| Reference r | $T = \dfrac{PC}{1 + PC}$ | $S = \dfrac{1}{1 + PC}$ |
| Disturbance at the plant's input | $\dfrac{P}{1 + PC}$ | |
| Disturbance at the output | $S$ | |
| Sensor noise n | $-T$ | |

Every one shares the denominator $1 + L(s)$. The **characteristic equation** $1 + L(s) = 0$ gives the closed-loop poles.

## Mason's gain formula

For a diagram with forward paths $P_k$ and loops $L_i$, $T = \frac{\sum_k P_k\Delta_k}{\Delta}$, with $\Delta = 1 - \sum L_i + \sum L_iL_j - \dots$ (sums over sets of loops that don't touch), and $\Delta_k$ is Δ with the loops touching path k removed. For a loop inside a loop: $T = \frac{G_1G_2}{1 + G_2H_2 + G_1G_2H_1}$.

## Cancellations

If C has a zero exactly on an unstable pole of P, the pole disappears from T but not from the loop: it's still in $P/(1 + PC)$, so a disturbance at the plant's input makes the output blow up. Never cancel an unstable pole.
:::

::: example
## A loop has an inner loop ($G_2$ = 4 with feedback $H_2$ = 0.25) inside an outer one ($G_1$ = 5 ahead of it, feedback $H_1$ = 0.5). What's the DC gain?

::: solution
1. **Reduce the inner loop.**
   $$\begin{aligned} \frac{G_2}{1 + G_2H_2} &= \frac{4}{2} \\ &= 2 \end{aligned}$$
2. **Close the outer loop.**
   $$\begin{aligned} T &= \frac{5 \times 2}{1 + 5 \times 2 \times 0.5} \\ &= \frac{10}{6} \\ &= 1.667 \end{aligned}$$
3. **Check with Mason's formula.** It gives the result at once:
   $$\begin{aligned} T &= \frac{G_1G_2}{1 + G_2H_2 + G_1G_2H_1} \\ &= \frac{20}{1 + 1 + 10} \\ &= 1.667 \end{aligned}$$

**Answer:** the DC gain is 1.667.
:::
:::

::: example
## A load torque enters the motor loop at the plant's input, where it would cost 20 rad/s of speed per unit without control. With $K_p$ = 0.5, how much speed does it cost?

::: solution
1. **Disturbance path.** The disturbance reaches the output through $P/(1 + PC)$, whose DC value is
   $$\begin{aligned} \frac{P}{1 + PC} &= \frac{20}{1 + 10} \\ &= 1.82\ \text{rad/s} \end{aligned}$$
   per unit: eleven times less.
2. **What would remove it.** Proportional control doesn't remove it entirely; an integrator would.

**Answer:** the load costs 1.82 rad/s of speed per unit, eleven times less than without control.
:::
:::

::: example
## A plant P = 2 has a feedback controller C = 5 and a feedforward path F from the reference straight to the plant's input. What closed-loop gain results, and what F makes it exactly 1?

::: solution
1. **Mason's formula.** There are two forward paths, PC and PF, both touching the one loop −PC, so
   $$T = \frac{P(C + F)}{1 + PC}$$
2. **Without feedforward.** With F = 0:
   $$\begin{aligned} T &= \frac{10}{11} \\ &= 0.909 \end{aligned}$$
3. **Choose F.** With $F = 1/P = 0.5$:
   $$\begin{aligned} T &= \frac{2 \times 5.5}{11} \\ &= 1 \end{aligned}$$
   exactly.
4. **Why it works.** The feedforward supplies the input the plant needs, and feedback only has to correct what the model gets wrong.

**Answer:** $T = P(C + F)/(1 + PC)$: 0.909 with no feedforward, and exactly 1 with F = 1/P = 0.5.
:::
:::

::: check
given: t = 10 | 50 | 200; P = 2 | 20; K = 0.5 | 2 | 5
answer: t/(1 + K*P)
unit: ms
tolerance: 0.5%

## A plant $P = \given{P}/(\tau s + 1)$ with τ = {t} ms gets proportional control $K_p$ = {K}. What's the closed-loop time constant?

::: right
Right. $\tau/(1 + K_pK_0)$ = {answer} ms.
:::

::: misses
- [t/(K*P)] The closed-loop pole is at $-(1 + K_pK_0)/\tau$.
- [t] Feedback moves the pole.
- [any] Not yet. Solve $\tau s + 1 + K_pK_0 = 0$.
:::
:::

::: check
given: K = 0.2 | 1 | 5; P = 3 | 10
answer: K*P/(1 + K*P)
tolerance: 0.2%

## What's the DC gain of the closed loop around $P = \given{P}/(\tau s + 1)$ with $K_p$ = {K}?

::: right
Right. $K_pK_0/(1 + K_pK_0)$ = {answer}.
:::

::: misses
- [1/(1 + K*P)] That's the sensitivity, the fraction left as error.
- [any] Not yet. $T(0) = L(0)/(1 + L(0))$.
:::
:::

::: check
given: A = 2 | 10; B = 4 | 8; H = 0.1 | 0.5; G = 0.2 | 1
answer: A*B/(1 + B*G + A*B*H)
tolerance: 0.5%

## An inner loop $G_2$ = {B} with feedback $H_2$ = {G} sits inside an outer loop: $G_1$ = {A}, feedback $H_1$ = {H}. What's the overall DC gain?

::: right
Right. $G_1G_2/(1 + G_2H_2 + G_1G_2H_1)$ = {answer}.
:::

::: misses
- [A*B/(1 + A*B*H)] Reduce the inner loop first.
- [any] Not yet. Reduce the inner loop to $G_2/(1 + G_2H_2)$, then the outer one.
:::
:::

::: check
given: a = 2 | 4 | 10; K = 4 | 25 | 100
answer: a/(2*sqrt(K))
tolerance: 0.5%

## A loop gain $L = K/(s(s + a))$ with K = {K} and a = {a}. What's the closed loop's damping ratio?

::: right
Right. The characteristic equation $s^2 + as + K = 0$ gives $\omega_n = \sqrt{K}$ and $\zeta = a/2\sqrt{K}$ = {answer}.
:::

::: misses
- [a/sqrt(K)] $2\zeta\omega_n = a$.
- [any] Not yet. Write $1 + L = 0$ as a polynomial.
:::
:::

::: check
given: d = 1 | 5; P = 4 | 20; K = 0.5 | 3
answer: d*P/(1 + K*P)
unit: rad/s
tolerance: 0.5%

## A disturbance of {d} units enters at the input of a plant with DC gain {P}, under proportional control $K_p$ = {K}. How much does it change the output at DC?

::: right
Right. $dP(0)/(1 + K_pP(0))$ = {answer} rad/s.
:::

::: misses
- [d/(1 + K*P)] A disturbance at the plant's input goes through the plant first: $P/(1 + PC)$.
- [d*P] That's without feedback.
- [any] Not yet. Input disturbances reach y through $P/(1 + PC)$.
:::
:::

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

## A forward gain G = {G} has a sensor gain H = {H} in its feedback path. What's the closed-loop gain?

::: right
Right. $G/(1 + GH)$ = {answer}, close to $1/H$ when GH is large.
:::

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

::: check
kind: parts
given: P = 0.5 | 2 | 5; K = 1 | 4 | 20

## A plant of DC gain {P} is under proportional control $K_p$ = {K} with unity feedback.

::: part
answer: P*K/(1 + P*K)
tolerance: 0.5%

### What is the closed-loop DC gain from reference to output?

::: misses
- [any] $T = PK/(1 + PK)$.
:::
:::

::: part
answer: P/(1 + P*K)
tolerance: 0.5%

### What DC gain does a disturbance at the plant's input see?

::: misses
- [1/(1 + P*K)] That's a disturbance at the output.
- [any] $P/(1 + PK)$.
:::
:::

::: part
answer: P*K/(1 + P*K)
tolerance: 0.5%

### And sensor noise (in magnitude)?

::: misses
- [any] Noise passes through T.
:::
:::
:::

::: check
kind: derivation
vars: a = 0.1..10, b = 0.1..10, c = 0.01..2, d = 0.01..2

## A forward gain a sits ahead of an inner loop (forward b, feedback d); the outer loop's feedback is c.

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

### What is the inner loop's gain?
:::

::: step
answer: a*b/(1 + b*d)/(1 + a*b*c/(1 + b*d))

### What is the overall gain?
:::

::: right
Right. Reduce loops from the inside out: each closed loop becomes a single block for the next.
:::
:::

::: explain
## Why is it dangerous to cancel an unstable plant pole with a controller zero?

::: model
On paper the zero and the pole divide out of the loop gain, so the transfer function from reference to output looks stable. But the cancellation only hides the pole from that one transfer function. A disturbance entering at the plant's input, or any initial condition in the plant, still excites the unstable mode, and the controller can't see or act on it because its zero blocks exactly that signal. In practice the cancellation is never exact either, so the closed loop keeps a pole very near the unstable one. The pole has to be moved by feedback, not covered up.
:::
:::

::: practice

::: check
given: t = 5 | 100; P = 1 | 50; K = 0.3 | 4
answer: t/(1 + K*P)
unit: ms
tolerance: 0.5%

## Closed-loop time constant: τ = {t} ms, $K_0$ = {P}, $K_p$ = {K}?

::: misses
- [any] $\tau/(1 + K_pK_0)$.
:::
:::

::: check
given: a = 3 | 6 | 20; K = 9 | 36 | 400
answer: a/(2*sqrt(K))
tolerance: 0.5%

## Damping ratio for $L = \given{K}/(s(s + \given{a}))$?

::: misses
- [any] $a/2\sqrt{K}$.
:::
:::

::: check
given: A = 3 | 20; B = 2 | 6; H = 0.2 | 1; G = 0.5 | 2
answer: A*B/(1 + B*G + A*B*H)
tolerance: 0.5%

## Nested loops: $G_1$ = {A}, $G_2$ = {B}, $H_2$ = {G}, $H_1$ = {H}. DC gain?

::: misses
- [any] $G_1G_2/(1 + G_2H_2 + G_1G_2H_1)$.
:::
:::
:::
