---
title: Block diagrams
heading: Transfer functions as blocks, combining blocks in series, in parallel and around a feedback loop, nested loops, DC gain from s = 0, and reducing a motor position loop to a second-order system whose natural frequency and damping can be read off
eyebrow: D3 · Lesson 4 · Block diagrams
xp: 40
---

::: hook
A control engineer's first sketch of any system is a block diagram: boxes for the motor, the amplifier, the sensor and the controller, joined by arrows carrying signals, with circles where signals add or subtract. Each box holds a transfer function, the Laplace-domain ratio of its output to its input (C9). A handful of rules collapse any diagram into one transfer function from reference to output, and from that single expression come the loop's speed, damping, steady-state error and stability.
:::

::: play
- A motor position loop: an amplifier and motor with transfer function $G(s) = K/(s(\tau s + 1))$ (the motor's speed lags its voltage by τ, and position integrates speed), with unity feedback.
- Reducing the loop gives $T(s) = K/(\tau s^2 + s + K)$, a second-order system with $\omega_n = \sqrt{K/\tau}$ and $\zeta = 1/(2\sqrt{K\tau})$.
- Raising the gain K speeds the loop but lowers its damping: the classic trade-off.
:::

```sim plot
view: graph
x: t = 0..2
y: y = 0..1.8
slider: K = 1..200 = 10 log
slider: T = 0.02..0.5 step 0.01 = 0.1
plot: 1 + 0*t | dashed | color: ch3 | label: reference
plot: 1 - Re(exp(-t/(2*T))*(cosh(sqrt(1/(4*K*T) - 1 + 1e-9)*sqrt(K/T)*t) + 1/(2*sqrt(K*T))*sinh(sqrt(1/(4*K*T) - 1 + 1e-9)*sqrt(K/T)*t)/sqrt(1/(4*K*T) - 1 + 1e-9))) | samples: 400 | label: position (τ in s)
readout: natural frequency, rad/s = sqrt(K/T) | digits: 3
readout: damping ratio = 1/(2*sqrt(K*T)) | digits: 3
```

::: predict
## A motor with τ = 0.1 s sits in a unity-feedback position loop with gain K = 10. What's the closed loop's damping ratio?

- [ ] 0.1
- [x] 0.5
- [ ] 1
- [ ] 10

::: reveal
The loop reduces to $T(s) = K/(\tau s^2 + s + K)$. Dividing by τ: $s^2 + 10s + 100$, so $\omega_n$ = 10 rad/s and $2\zeta\omega_n$ = 10, ζ = 0.5. Quadrupling K to 40 doubles $\omega_n$ but halves ζ to 0.25.
:::
:::

::: nameit
## Combining blocks

- **Series**: blocks in a chain multiply, $G_1G_2$.
- **Parallel**: paths that join at a summing junction add, $G_1 + G_2$.
- **Feedback**: a forward path G with feedback H subtracted at the input gives

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

Nested loops reduce from the inside out: replace the inner loop by its closed-loop transfer function, then treat it as a block of the outer loop.

## DC gain

Setting s = 0 gives each block's response to a constant. A block with a pole at s = 0 (an integrator, such as position from speed) has infinite DC gain, which is why a type 1 loop like the motor position loop has zero steady-state error to a step.

## Reading the result

A closed loop of the form $\omega_n^2/(s^2 + 2\zeta\omega_ns + \omega_n^2)$ is a standard second-order system: its natural frequency and damping ratio give the overshoot and settling time of lesson 3.
:::

::: example
## A forward path of DC gain 20 has an inner feedback loop of gain 0.5 around it and unity feedback around everything. What's the overall DC gain?

::: solution
1. **Inner loop.**
   $$\frac{20}{1 + 20 \times 0.5} = 1.818$$
2. **Outer loop.**
   $$\frac{1.818}{1 + 1.818} = 0.645$$
3. **Check.** It's the same as
   $$\frac{a}{1 + ab + a} = \frac{20}{31}$$
4. **Why it's so low.** The inner loop's heavy feedback leaves too little gain for the outer loop to track well.

**Answer:** the overall DC gain is 0.645.
:::
:::

::: example
## In the motor loop with τ = 0.1 s, what gain gives ζ = 0.7, and what's $\omega_n$ then?

::: solution
1. **Set the damping.**
   $$\frac{1}{2\sqrt{K\tau}} = 0.7$$
   gives Kτ = 0.510, so K = 5.10.
2. **Natural frequency.**
   $$\begin{aligned} \omega_n &= \sqrt{5.10/0.1} \\ &= 7.14\ \text{rad/s} \end{aligned}$$

**Answer:** K = 5.10 gives ζ = 0.7, with $\omega_n$ = 7.14 rad/s.
:::
:::

::: example
## Two blocks of gain 10 and 5 are in series, with a feedback path of 0.2 from the output back to the input. What is the overall gain?

::: solution
1. **Forward path.**
   $$10 \times 5 = 50$$
2. **Loop gain.**
   $$50 \times 0.2 = 10$$
3. **Overall gain.**
   $$\begin{aligned} T &= 50/(1 + 10) \\ &= 4.55 \end{aligned}$$
4. **Compare.** That's close to the $1/0.2 = 5$ that a very large loop gain would give.

**Answer:** the overall gain is 4.55.
:::
:::

::: check
given: a = 5 | 20 | 100; b = 0.1 | 0.5 | 1
answer: a/(1 + a*b)
tolerance: 0.5%

## A forward block of DC gain {a} has feedback of gain {b}. What's the closed loop's DC gain?

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

::: misses
- [a/(1 - a*b)] Negative feedback adds $GH$ in the denominator.
- [any] Not yet. The feedback formula at s = 0.
:::
:::

::: check
given: K = 5 | 20 | 80; T = 0.05 | 0.2 | 0.5
answer: sqrt(K/T)
unit: rad/s
tolerance: 0.5%

## A unity-feedback loop around $K/(s(\tau s + 1))$ has K = {K} s⁻¹ and τ = {T} s. What's its natural frequency?

::: right
Right. $\sqrt{K/\tau}$ = {answer} rad/s.
:::

::: misses
- [K/T] Take the square root.
- [any] Not yet. Divide $\tau s^2 + s + K$ by τ.
:::
:::

::: check
given: K = 5 | 20 | 80; T = 0.05 | 0.2 | 0.5
answer: 1/(2*sqrt(K*T))
tolerance: 0.5%

## For the same loop (K = {K} s⁻¹, τ = {T} s), what's the damping ratio?

::: right
Right. $1/(2\sqrt{K\tau})$ = {answer}.
:::

::: misses
- [any] Not yet. $2\zeta\omega_n = 1/\tau$.
:::
:::

::: check
given: a = 10 | 50; b = 0.05 | 0.2 | 1
answer: a/(1 + a*b + a)
tolerance: 0.5%

## A forward block of DC gain {a} has an inner feedback loop of gain {b} around it, and unity feedback around the whole thing. What's the overall DC gain?

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

::: misses
- [a/(1 + a*b)] That's only the inner loop; close the outer loop around it.
- [any] Not yet. Reduce from the inside out.
:::
:::

::: check
kind: parts
given: a = 5 | 10 | 50; b = 2 | 5; h = 0.1 | 0.2 | 0.5

## Blocks of gain {a} and {b} are in series with feedback {h} from the output.

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

### What is the overall gain?

::: misses
- [a*b] Feedback divides by $1 + $ loop gain.
- [any] $G/(1 + GH)$.
:::
:::

::: part
answer: a*b*h
tolerance: 0.5%

### What is the loop gain?

::: misses
- [any] Product around the loop.
:::
:::
:::

::: check
kind: parts
given: t = 0.05 | 0.1 | 0.2; z = 0.5 | 0.7 | 1

## A motor $1/(s(\tau s + 1))$ with τ = {t} s is under proportional gain K with unity feedback.

::: part
answer: 1/(4*z^2*t)
tolerance: 0.5%

### What K gives ζ = {z}?

::: misses
- [any] $\zeta = 1/(2\sqrt{K\tau})$.
:::
:::

::: part
answer: sqrt(1/(4*z^2*t)/t)
unit: rad/s
tolerance: 0.5%

### What is $\omega_n$ then?

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

::: explain
## Why does raising the gain of a motor position loop make it faster but less damped?

::: model
Closing the loop around the motor and its integrator gives a second-order system whose stiffness comes from the gain and whose damping comes from the motor's own friction and lag, which the gain doesn't change. Raising the gain is like stiffening a spring on a fixed mass and damper: the natural frequency rises with the square root of the gain, so the response gets faster, but the same damping is spread over a faster motion, so the damping ratio falls with the square root of the gain and the response overshoots and rings more. Adding damping through the controller, such as velocity feedback or a derivative term, is how a loop gets both speed and damping.
:::
:::

::: practice

::: check
given: a = 1 | 1000; b = 0.001 | 2
answer: a/(1 + a*b)
tolerance: 0.5%

## Closed-loop DC gain: G = {a}, H = {b}?

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

::: check
given: K = 1 | 500; T = 0.01 | 2
answer: 1/(2*sqrt(K*T))
tolerance: 0.5%

## ζ: K = {K}, τ = {T} s?

::: misses
- [any] $1/(2\sqrt{K\tau})$.
:::
:::

::: check
given: K = 1 | 500; T = 0.01 | 2
answer: sqrt(K/T)
unit: rad/s
tolerance: 0.5%

## $\omega_n$: K = {K}, τ = {T} s?

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