Chapter 10

Transfer Functions, Poles and Zeros

Can we read a system's whole personality off one fraction?

Chapter 10: Transfer Functions, Poles and Zeros ↗

The system's recipe

June: Start the drone hovering at 1 m, with 4.9 N of base thrust balancing gravity. Measure both the requested change and the actual height change from that baseline. Just before a new request, both changes are zero. In the step example the request jumps to 2 m at t=0t=0, so its change becomes 1 m while the drone is still at 1 m.

Theo: Good, because last chapter we dropped the −h(0)-h(0) bits and the formula lied. Measured from the hover, those starting values really are zero, so this time they vanish honestly.

ΔH(s)=Kpms2+cs+Kp⏟G(s)⋅ΔR(s)\Delta\out{H}(s) = \underbrace{\frac{\eff{K_p}}{m s^2 + c s + \eff{K_p}}}_{G(s)} \cdot \Delta\sp{R}(s)

ΔR(s)\Delta\sp{R}(s) is the transform of the requested change from 1 m; ΔH(s)\Delta\out{H}(s) is the transform of the actual change from 1 m. G(s)G(s) is fixed by the drone and controller. It is the transfer function: output change divided by input change, with both changes starting at zero.

The plot still shows heights above the ground. Add the 1 m starting height to a change predicted by the formula to get the blue height on the plot.

Mika: June was right: the fraction is the drone. It's like its recipe. Feed in any ingredient and it tells you what comes out!

Try three different inputs on the same drone. The recipe never changes, only ΔR(s)\Delta\sp{R}(s) does.

Chapter 10: Transfer Functions, Poles and Zeros ↗

New words

Transfer function G(s)G(s)
Transformed output change ÷ transformed input change, starting from the same resting state. For this linear drone it is a fraction of polynomials in ss.
Starting from rest (zero initial conditions)
Every change and its speed is zero at t=0t = 0, as when we measure from the hover. Then Chapter 9's starting-value terms like −h(0)-h(0) are zero too, and G(s)G(s) is the whole story.

Poles: where the system wants to live

Where does G(s)G(s) blow up? Where its denominator is zero. Those points are the poles, drawn as ×. In this drone there are two, one for each of the two natural este^{st} motions from Chapter 7.

In Chapter 8, the transform of eate^{at} screamed at s=as = a. Read it backwards: wherever GG screams, a motion epte^{pt} is hiding.

June: So the poles are Chapter 7's modes, sitting on the map!

Now flip it around. Instead of choosing gains and finding the poles, let's drag the poles and see what drone we get. That needs a second knob, Kd\eff{K_d}: a push against speed, which we'll meet properly in Chapter 11. It adds to the drag cc, and the two roots are pp and its mirror twin pˉ\bar p (the bar flips the sign of the imaginary part, like Chapter 6's twins):

ms2+(c+Kd) s+Kp=0⟹s=p, pˉ(the poles)\begin{aligned} & m s^2 + (c + \eff{K_d})\,s + \eff{K_p} = 0 \\ \Longrightarrow\quad & s = p,\ \bar p \qquad \text{(the poles)} \end{aligned}

Chapter 10: Transfer Functions, Poles and Zeros ↗

Predict first! What does the drone do if we drag the poles into the right half of the s-plane?

Chapter 10: Transfer Functions, Poles and Zeros ↗

Reading the map

Play with it. A few rules jump out, and each one is an old friend in disguise:

  • Left half = calms down, right half = blows up. The real part σ\sigma is the shrink or grow rate of eσte^{\sigma t}.
  • Further left = faster. Settling takes about 4/∣σ∣4/|\sigma| seconds (the dashed vertical lines): Chapter 7's four time constants, since e−∣σ∣te^{-|\sigma| t} is below 2 % after ln⁡50/∣σ∣≈3.9/∣σ∣\ln 50/|\sigma| \approx 3.9/|\sigma| seconds.
  • Further up = more wiggly. The height ω\omega is Chapter 7's damped frequency, so one wiggle takes 2π/ω2\pi/\omega seconds.
  • The angle sets the overshoot. The angle θ\theta from the negative real axis gives ζ=cos⁡θ\zeta = \cos\theta (Chapter 7's circle), and the overshoot is e−π∣σ∣/ωe^{-\pi|\sigma|/\omega} (the dashed rays). Near the real axis it barely overshoots, near the vertical axis a lot. (Exact for two poles and no zero, starting from rest. A zero changes it: in the next section one turns 12 % into 15 %.)

Mika: I wanted just one pole up high and one down low. It won't let me! The bottom one keeps copying the top one.

Theo: Remember the twin spinners from Chapter 6? A real drone has real motion, so every spinning este^{st} needs its mirror twin to cancel the imaginary parts. Complex poles always come in mirror pairs.

Predict first! Keep σ=−2\sigma = -2 and slide the poles straight up, from ±4i\pm 4i to ±8i\pm 8i. What changes?

June: The playground jumped when we answered: the ghost pair sits at ±4i\pm 4i, the new one at ±8i\pm 8i. Same envelope, twice as many wiggles, and a much bigger first swing.

Mika: What if both poles sit on the real axis, one at −0.2-0.2 and one at −5-5?

June: The fast one's gone in a second. The slow one is the boss.

Chapter 10: Transfer Functions, Poles and Zeros ↗

New words

Pole
A value of ss where the transfer function blows up. Each pole pp is one motion epte^{pt} of the system.
Mirror pair p, pˉp,\ \bar p
Two poles with the same real part and opposite imaginary parts. Complex poles of a real system always come this way.
Dominant pole
The pole nearest the vertical axis. Its slow motion outlasts the others, so it usually decides the settling time, unless a zero sits almost on top of it (Chapter 11 has one).

Zeros: a quick look

The numerator can be zero too. Those points are zeros, drawn as ○. Usually they change how much of each pole's motion appears in the output. If a zero sits exactly on a pole, the shared factor cancels and that pole disappears from this input-to-output recipe. It's still inside the system, though: nudge the drone some other way, with a gust, and that motion comes back. That matters a lot if the hidden pole is on the right.

Here's a system with fixed poles at −2±3i-2 \pm 3i and one zero you can slide. (Our playground's Kd\eff{K_d} pushes against the drone's speed, so its recipe has no zero. Push against the error's speed instead, as Chapter 11 will, and a zero appears at −Kp/Kd-\eff{K_p}/\eff{K_d}: for these poles that's −6.5-6.5, with 15 % overshoot instead of 12 %.)

Chapter 10: Transfer Functions, Poles and Zeros ↗

June: Same poles, but when the zero gets close to the origin the response jumps up way faster and overshoots more!

Theo: Same poles means the same motions. So the zero can't add a new one. It must be adding a bit of something we already have.

Chapter 10: Transfer Functions, Poles and Zeros ↗

Multiplying by ss takes the slope (Chapter 9), so the factor (1+s/∣z∣)(1 + s/|z|) adds 1/∣z∣1/|z| times the slope. That's why a zero near the origin makes the system react so strongly to changes: the overshoot grows, even though the poles didn't move. Far away, the zero hardly matters. That's all we need about zeros for now.

New words

Zero
A value of ss where the transfer function is zero: a motion ezte^{zt} the system does not pass on.

Is further left always better?

June: Easy: drag the poles way left. Settles in a blink. Best drone ever!

Theo: What thrust does that need, though? Until now we've pretended the motors could push as hard as the maths wants.

Time to be honest. Our motors can push between 0 N and 20 N (about four times the drone's weight). Below, the poles move left along a 45° line (that's ζ≈0.71\zeta \approx 0.71, Chapter 7's sweet spot). The dashed curves are the maths with imaginary, unlimited motors; the solid ones are real motors.

Chapter 10: Transfer Functions, Poles and Zeros ↗

Chapter 10: Transfer Functions, Poles and Zeros ↗

Past about −3.9±3.9i-3.9 \pm 3.9i the maths asks for more than 20 N. The orange thrust flattens against the limit, and past about −6±6i-6 \pm 6i the maths even wants to pull the drone down, which propellers can't. The real drone stops following the pretty linear prediction. Its settling stops improving at about 0.7 s, near −6.5±6.5i-6.5 \pm 6.5i, and further left it gets worse, with extra overshoot.

June: I slid it all the way to −8±8i-8 \pm 8i. The maths says 0.53 s. The real drone takes 0.77 s: slower than at −6.5-6.5!

Mika: And its overshoot went from 4 % to 16 %. All that extra thrust was never there to be had.

June: So "further left" is only better until you run out of motor. Placing poles is a trade-off, not a race.

New words

First push
The thrust asked for at the first instant of a step: mg+Kp Δrmg + \eff{K_p}\,\Delta r, before the drone has moved.
Thrust budget
The pole positions the motors can afford for a given step: a circle around 0.
Motor limit (saturation)
Real thrust is clipped to 0–20 N, whatever the maths asks for.

Closing the loop on paper

June: In Chapter 1 we drew the loop as boxes and arrows. In s-land every box just multiplies. Can the boxes do the algebra for us?

Give each box its recipe. The controller is C(s)C(s), for now simply Kp\eff{K_p}. The drone on its own, thrust change in and height change out, is P(s)=1ms2+csP(s) = \frac{1}{ms^2 + cs}: P for plant, Chapter 1's word, not the P of P control. It comes straight from the drone's equation, the same way as the recipe above.

June: Easy. The request goes through the controller, then the drone. Multiply along the line!

ΔH=?C P ΔR=Kpms2+cs ΔR\Delta\out{H} \overset{?}{=} C\,P\,\Delta\sp{R} = \frac{\eff{K_p}}{ms^2 + cs}\,\Delta\sp{R}

Theo: Poles at 0 and −2? No wiggle at all, and a pole at 0 that never settles. That's Chapter 1's open loop: tell the drone what to do and never look. The controller doesn't see the request, June. It sees the error.

The arrow back from the drone is the whole point of feedback. The controller acts on ΔR−ΔH\Delta\sp{R} - \Delta\out{H}, so the output turns up on both sides. Collect it, and divide:

ΔH=C P (ΔR−ΔH)ΔH (1+C P)=C P ΔRΔH=C P1+C P ΔR\begin{aligned} \Delta\out{H} &= C\,P\,\big(\Delta\sp{R} - \Delta\out{H}\big) \\ \Delta\out{H}\,\big(1 + C\,P\big) &= C\,P\,\Delta\sp{R} \\ \Delta\out{H} &= \frac{C\,P}{1 + C\,P}\,\Delta\sp{R} \end{aligned}

Put in C=KpC = \eff{K_p} and P=1/(ms2+cs)P = 1/(ms^2+cs), then multiply the top and the bottom by ms2+csms^2 + cs:

C P1+C P=Kp/(ms2+cs)1+Kp/(ms2+cs)=Kpms2+cs+Kp\frac{C\,P}{1 + C\,P} = \frac{\eff{K_p}/(ms^2+cs)}{1 + \eff{K_p}/(ms^2+cs)} = \frac{\eff{K_p}}{ms^2 + cs + \eff{K_p}}

Mika: That's the recipe from the start of this chapter! We got it twice: once from the drone's equation, once from the boxes.

So the loop's poles are where the bottom, 1+C(s) P(s)1 + C(s)\,P(s), is zero. That is the same as C P=−1C\,P = -1. Read C PC\,P as one lap round the loop: what the controller and then the drone do to a signal. At a pole, a lap brings the signal back at the same size and flipped, and the minus sign in the error flips it back again. So it keeps itself going with no request at all.

1+C(s) P(s)=0⟺C(s) P(s)=−11 + C(s)\,P(s) = 0 \quad\Longleftrightarrow\quad C(s)\,P(s) = -1

Try it on a steady wiggle, s=iωs = i\omega. One lap turns the wiggle's arrow into C(iω) P(iω)C(i\omega)\,P(i\omega): shorter or longer, and turned back. The widget draws that arrow for every wiggle speed, and the point −1 it would have to reach.

Chapter 10: Transfer Functions, Poles and Zeros ↗

Theo: However far I push Kp\eff{K_p}, the curve bends towards −1 but never touches it. It gets closest at about the drone's own swing speed.

Here's why. The drag turns a lap back by up to 90°, and the mass by up to another 90°, but together they only reach 180° for infinitely fast wiggles. So P control alone can never tip this drone over. A bigger Kp\eff{K_p} just makes the lap pass closer to −1, and closer means less damping: Chapter 2's "more KpK_p, more wiggle", now as a picture.

Chapter 10: Transfer Functions, Poles and Zeros ↗

New words

Closed loop
A controller that acts on the error, so the output feeds back into its own input: ΔH=C P1+C P ΔR\Delta H = \frac{C\,P}{1 + C\,P}\,\Delta R.
Loop gain C(s) P(s)C(s)\,P(s)
What one lap round the loop does to a signal. The closed loop's poles are where it equals −1.

What we know now

What we figured out

  • Yes, one fraction does it. The transfer function G(s)G(s) = output change ÷ input change in s-land, starting from rest. It's the system's recipe, ΔH=G⋅ΔR\Delta\out{H} = G\cdot\Delta\sp{R}, and it comes straight from the drone's equation.
  • Poles (×) are where G(s)G(s) explodes: the epte^{pt} modes the system is made of.
  • Left half = stable, right half = explodes. Further left = faster (settles in about 4/∣σ∣4/|\sigma| s, a rule of thumb), higher = wigglier (one wiggle = 2π/ω2\pi/\omega s), angle = damping ζ\zeta = overshoot e−π∣σ∣/ωe^{-\pi|\sigma|/\omega}. The pole nearest the axis is the boss.
  • Complex poles always come in mirror pairs.
  • Zeros (○) change how much of each mode you get. Near the origin they add a kick: 1/∣z∣1/|z| times the slope.
  • Close the loop on paper and the recipe is C P1+C P\frac{C\,P}{1 + C\,P}. The poles are where one lap round the loop, C PC\,P, equals −1.
  • The first push is mg+m∣p∣2mg + m|p|^2 for a 1 m step, so far-away poles need thrust the motors don't have.

Theo: "The poles are beautiful. But hold on: we cheated all chapter by handing the drone its hover thrust. Without it, gravity still makes it droop. Our map is fine. It's our controller that needs fixing."

Chapter 10: Transfer Functions, Poles and Zeros ↗