Module 1: Models You Can Compute With
Three plants derived from physics to transfer functions and carried through the rest of the course: a DC motor, a mass-spring-damper, and a heated aluminium block. Then linearisation about an operating point, block diagram reduction, and the time response that poles alone predict.
Three Plants, Derived: A Motor, a Mass on a Spring, and an Oven
- Derive the transfer function of a DC motor from the electrical and mechanical equations and evaluate its poles and DC gain numerically.
- Derive the transfer functions of a mass-spring-damper and of a heated block, and identify natural frequency, damping ratio, time constant and static gain from each.
- State the four assumptions a transfer function buys its convenience with, and say where each one fails.
In 1868 James Clerk Maxwell published five pages in the Proceedings of the Royal Society called On Governors. Flyball governors had been regulating steam engines for eighty years by then, and by the 1860s some of them had developed a habit engineers called hunting: instead of settling at a speed, the engine would surge above it, fall below, surge again, and keep surging. Maxwell did not build a better governor. He wrote down the differential equations of the machine, and showed that whether it hunted or settled depended entirely on the roots of one algebraic equation. If every root had a negative real part, the motion died away. If any root did not, it did not.
That is the whole method of this course, arriving fully formed a century and a half ago. Write the physics as differential equations, turn them into an algebraic object, read the behaviour off the roots. The root locus of Module 3, the Bode plot of Module 4 and the state feedback of Module 5 are machinery for doing Maxwell's last step faster and for changing the answer on purpose.
This lesson does Maxwell's first step three times, on three plants you meet again in every module: a DC motor, a mass-spring-damper, and a heated aluminium block. Learn their numbers now and you will not have to relearn them.
Plant one: the motor, from Kirchhoff and Newton
A permanent-magnet DC motor is two systems bolted together. Electrically it is a resistance R and an inductance L in series with a voltage source the motor generates itself. Mechanically it is a rotating inertia J with viscous friction b. The bolt joining them is a pair of constants: torque is proportional to current, and generated voltage is proportional to speed.
Apply Kirchhoff's voltage law around the armature circuit, with e the back electromotive force:
V = R i + L di/dt + e, with e = K_e omega.
Apply Newton's second law for rotation, with the electromagnetic torque driving the shaft:
J domega/dt + b omega = K_t i.
In SI units and with no magnetic losses, Kt and Ke are numerically the same constant, which we call K. Take Laplace transforms of both equations with zero initial conditions, which turns d/dt into multiplication by s:
(Ls + R) I(s) = V(s) - K Omega(s) and (Js + b) Omega(s) = K I(s).
Eliminate I(s) between them. From the second, I = (Js + b) Omega / K. Substitute into the first and collect:
Omega(s)/V(s) = K / [ (Ls + R)(Js + b) + K2 ].
Now numbers. The parameter set below is the one used in most control texts for a laboratory machine, and it is a fairly large motor, not a hobby one: J = 0.01 kg m2, b = 0.1 N m s, K = 0.01 N m per amp, R = 1 ohm, L = 0.5 H. Multiply out the denominator:
(0.5s + 1)(0.01s + 0.1) + 0.0001 = 0.005 s2 + 0.06 s + 0.1001.
Divide numerator and denominator by 0.005 to get a monic polynomial:
Omega(s)/V(s) = 2 / (s2 + 12 s + 20.02).
Find the poles with the quadratic formula: s = [-12 +/- sqrt(144 - 80.08)]/2 = [-12 +/- 7.9950]/2, giving s = -2.0025 and s = -9.9975. Both are real, both negative, and they correspond to time constants of 0.4994 s and 0.1000 s. The DC gain is the transfer function at s = 0: 2/20.02 = 0.0999 rad/s per volt. Put 12 V across this motor and it settles at 1.199 rad/s, about 11.4 rpm at the shaft.
Look at what the coupling term did. K2 = 0.0001 sits next to 0.1 in the constant term, a contribution of one part in a thousand. In this parameter set back electromotive force is almost irrelevant to the dynamics. In a small motor with R near 1 ohm and K near 0.05, the term K2/R dominates the mechanical damping and the motor is essentially self-braking. Do not carry an intuition about back EMF from one machine to another without recomputing that ratio.
Key idea: the difference between 20.02 and 20 is a tenth of a percent, smaller than the tolerance on any of the five parameters. For the rest of this course the motor is G(s) = 2/((s + 2)(s + 10)) in speed, and, because angle is the integral of speed, G(s) = 2/(s(s + 2)(s + 10)) in position. Those factored forms are what make the arithmetic in later lessons checkable by hand, and rounding to them costs nothing you could measure.
Plant two: the mass on a spring, from a free-body diagram
A mass m slides on a rail. A spring of stiffness k pulls it back toward the origin, a damper of coefficient c opposes its velocity, and you push it with a force F. Draw the free body, sum the forces, and Newton gives one equation:
m x'' + c x' + k x = F.
Laplace with zero initial conditions gives (m s2 + c s + k) X(s) = F(s), so
X(s)/F(s) = 1 / (m s2 + c s + k).
Take m = 1 kg, c = 4 N s/m, k = 100 N/m. Then X/F = 1/(s2 + 4s + 100). Every second-order system of this shape can be written wn2/(s2 + 2 zeta wn s + wn2) up to a gain, which lets you read two numbers straight off:
- Natural frequency
wn = sqrt(k/m) = sqrt(100) = 10rad/s, which is 1.59 Hz. - Damping ratio
zeta = c / (2 sqrt(k m)) = 4 / (2 x 10) = 0.2.
The poles are s = -zeta wn +/- j wn sqrt(1 - zeta2) = -2 +/- j 9.798. The real part sets the decay rate, so the ringing envelope falls as e-2t; the imaginary part sets the ringing frequency at 9.798 rad/s, or 1.559 Hz. The DC gain is 1/100 = 0.01 m per newton: hang a 1 N weight on it and it settles 10 mm lower, which is Hooke's law reappearing at s = 0. This plant is deliberately springy, and with zeta = 0.2 it overshoots a step by more than half its final value, which Lesson 3 computes exactly.
Plant three: the oven, from an energy balance
The third plant is a 0.55 kg aluminium block with a 200 W cartridge heater in a bored hole and a thermocouple bonded 40 mm away. Aluminium has a specific heat capacity near 900 J per kg per kelvin, so the block stores about C = 500 J/K. The insulation around it passes heat to the room at a rate proportional to the temperature difference, with a thermal resistance R = 0.5 K/W.
Conservation of energy for the block, with P the electrical power in and Ta the ambient temperature:
C dT/dt = P - (T - T_a)/R.
Work in the rise above ambient, theta = T - T_a, which removes Ta from the equation and is the honest variable anyway, since no heater controls the room. Rearranged:
RC dtheta/dt + theta = R P, so Theta(s)/P(s) = R/(RCs + 1) = 0.5/(250 s + 1).
One pole, at s = -1/250 = -0.004. The time constant is RC = 250 s, four minutes and ten seconds. The DC gain is 0.5 K/W, so 100 W of steady heat holds the block 50 K above the room. Nothing oscillates, because a single real pole cannot.
Except that the measured step response does not look like that. Switch on 100 W and the thermocouple reads nothing for about fifteen seconds before it moves. Heat has to diffuse through 40 mm of aluminium and through the sensor sheath, and a first-order model cannot express a delay. So we fit one on: G(s) = 0.5 e-15s/(250 s + 1), a first-order-plus-dead-time model. The 15 seconds is not transport down a pipe; it is a lumped stand-in for diffusion and sensor lag, and the fit works because the diffusion tail is small next to a 250 second dominant lag. Remember the ratio L/T = 15/250 = 0.06: Lesson 8 tunes a PID controller from exactly those two numbers, and the delay is why that tuning is hard.
The point: three quite different pieces of physics, an armature circuit, a sliding mass and a hot block, produced the same kind of object. That is not a coincidence of the examples. Any system whose governing equations are linear with constant coefficients has a transfer function, which is why one set of design tools serves an aircraft, a chemical reactor and a disk drive.
Reading a transfer function, and the four assumptions inside it
A transfer function is the ratio of the Laplace transform of the output to that of the input, with all initial conditions zero. Four things are worth reading off it immediately.
| Quantity | Where it lives | Motor (speed) | Mass-spring-damper | Oven |
|---|---|---|---|---|
| Poles | Roots of the denominator | -2, -10 | -2 +/- j9.798 | -0.004 |
| Zeros | Roots of the numerator | none | none | none |
| DC gain | Value at s = 0 | 0.0999 rad/s per V | 0.01 m per N | 0.5 K per W |
| Relative degree | Poles minus zeros | 2 | 2 | 1 plus delay |
Poles set the shape of the free response. Zeros do not appear in these three, but they will, and they shape how much of each pole's mode a given input excites. DC gain answers the steady-state question. Relative degree says how many integrations separate input from output, which is why none of these three plants responds instantly to a step: with relative degree two, the output starts with zero slope.
The convenience is bought with four assumptions of linear time-invariant modelling, and you should be able to say where each fails here.
- Linearity. The motor breaks it at the supply rail: ask a 12 V drive for 24 V and you get 12. Coulomb friction breaks it near zero speed.
- Time invariance. The oven breaks it as insulation ages and R drifts; a motor breaks it as the magnets warm and K falls a few percent.
- Zero initial conditions. Start the mass at x = 5 mm and there is a free response the transfer function never mentions.
- Lumped parameters. The block is treated as one temperature, which is exactly the assumption that forced a delay onto the front.
Common misconceptions
- "The transfer function is the system." It is one description of one input-output pair of a linearised model. The same motor has a different transfer function from voltage to current, and a different one again from load torque to speed. Ask which input and which output before you use a transfer function someone hands you.
- "A model with more terms is a better model." Adding the armature inductance to the motor moved a pole to -10, five times faster than the pole at -2. In a loop closed at 2 rad/s that pole contributes almost nothing but makes every hand calculation harder. Franklin, Powell and Emami-Naeini put the rule plainly: model what matters at the frequencies you will control, and no more.
- "The Laplace variable s is just notation." It has units of inverse seconds and a physical reading. Its real part is a growth or decay rate in nepers per second, and its imaginary part is an oscillation frequency in radians per second. A pole at
-2 + j9.798is a literal statement: this system rings at 9.798 rad/s while decaying with a 0.5 s time constant. - "Dead time is just a big time constant." They behave completely differently. A time constant contributes at most 90 degrees of phase lag no matter how high the frequency goes; a delay contributes phase lag without limit, minus 15w radians at frequency w, while touching the magnitude not at all. That unlimited lag is what makes the oven the hardest of the three plants to control fast, and Lesson 16 makes the limit exact.
Putting it together
Maxwell's procedure has not changed: physics to differential equations, differential equations to an algebraic object, behaviour from the roots. You did it three times. The motor gave 2/((s+2)(s+10)) in speed, DC gain 0.0999 rad/s per volt. The mass-spring-damper gave 1/(s2 + 4s + 100), wn = 10 rad/s, zeta = 0.2, poles at -2 +/- j9.798, DC gain 10 mm per newton. The oven gave 0.5 e-15s/(250s + 1), one pole at -0.004, DC gain 0.5 K/W, and a delay no first-order model can absorb.
Worth holding on to: those nine numbers are the vocabulary of the next sixteen lessons. Every controller you design will be designed on one of these three plants, so that when a method changes the answer you can see exactly what it changed.
The next lesson deals with the awkward fact that two of the three derivations quietly assumed a linearity the physical plant does not have, and shows how to buy it back near an operating point.
Sources
- Maxwell, J. C. (1868). On governors. Proceedings of the Royal Society of London, 16, 270-283. Reprinted in Bellman and Kalaba, Selected Papers on Mathematical Trends in Control Theory (Dover, 1964).
- Cheever, E. (n.d.). Transfer function representation. Linear Physical Systems Analysis, Swarthmore College. lpsa.swarthmore.edu
- Hallauer, W. L. (2016). Introduction to linear time-invariant dynamic systems for students of engineering. Engineering LibreTexts. eng.libretexts.org
- Nise, N. S. (2019). Control systems engineering (8th ed.), Chapter 2. Wiley.
- Franklin, G. F., Powell, J. D., and Emami-Naeini, A. (2019). Feedback control of dynamic systems (8th ed.), Chapter 2. Pearson.
- Key terms
- Transfer function
- The ratio of the Laplace transform of the output to that of the input, with zero initial conditions, for one specified input-output pair.
- Pole
- A root of the transfer function denominator; its real part is a decay rate in inverse seconds and its imaginary part an oscillation frequency.
- DC gain
- The transfer function evaluated at s = 0, giving the steady-state output per unit constant input.
- Back electromotive force
- The voltage a motor generates in proportion to its speed, K_e omega, which opposes the applied voltage.
- Damping ratio
- zeta = c/(2 sqrt(km)) for a mass-spring-damper; zeta below 1 gives complex poles and ringing.
- Natural frequency
- wn = sqrt(k/m), the frequency at which an undamped second-order system would oscillate, in radians per second.
- First-order plus dead time
- The model K exp(-Ls)/(Ts + 1), a one-pole lag with a pure delay, and the standard fit for process plants.
- Relative degree
- Number of poles minus number of zeros; it determines how many derivatives of the output are zero at the instant a step is applied.
Why the Loop Hunts at Eighty Percent: Linearisation and Block Diagrams
- Explain a gain that changes with operating point, and compute it for an equal-percentage control valve at two travels.
- Linearise a nonlinear differential equation about an equilibrium by first-order Taylor expansion and obtain the resulting transfer function.
- Reduce a block diagram with an inner and an outer loop to a single transfer function, and compute how inner-loop feedback moves the plant poles.
A boiler feedwater loop runs beautifully at 30 percent valve travel. Push the plant to full load, so the valve sits at 80 percent, and the level begins to hunt: a slow oscillation, growing, that nobody asked for. The tuning has not been touched in two years. The setpoint has not moved. The controller is doing exactly what it did yesterday.
The valve is the culprit, and the arithmetic is short. Most process control valves are cut with an equal-percentage characteristic, meaning flow rises exponentially with stem travel: q(x) = q_max R(x-1), where x runs from 0 to 1 and R is the rangeability, typically 50. Differentiate: dq/dx = q ln R = 3.912 q. The valve's gain is proportional to the flow through it.
Put the two travels in. At x = 0.3, q = 100 x 50-0.7 = 6.46 percent of maximum flow, so dq/dx = 25.3 percent per unit travel. At x = 0.8, q = 45.7 percent and dq/dx = 178.8. The gain has risen by a factor of 500.5 = 7.07. A loop with a comfortable gain margin of 6 dB at low load, meaning you could double the gain before instability, is running at seven times that gain at high load. It does not hunt because something broke. It hunts because the linear model the tuner used was only ever true near one operating point.
Linearisation is a Taylor series stopped after two terms
Linearisation is the move that lets the entire rest of this course exist. Take a nonlinear state equation x' = f(x, u). Find an operating point, a pair (x0, u0) at which f(x_0, u_0) = 0, so nothing is changing. Write the state as that equilibrium plus a deviation, x = x_0 + dx and u = u_0 + du, and expand f in a Taylor series:
f(x_0 + dx, u_0 + du) = f(x_0,u_0) + (df/dx) dx + (df/du) du + (second order and beyond).
The first term is zero by construction. Throw away everything beyond first order and you are left with dx' = A dx + B du, where A and B are the partial derivatives evaluated at the operating point. Two facts about that discard are worth stating plainly. It is exact in the limit of small deviations, and it is wrong by an amount that grows quadratically with the deviation. Nothing in the method tells you how small is small; only the physics and a test do.
Why this matters: a linearised model is not an approximate description of the plant. It is an exact description of a different plant, one that happens to agree with yours near a point. Everything you design in the next fifteen lessons is designed for that different plant.
The draining tank, worked
A cylindrical tank of cross-section A = 1 m2 drains through a hole in its base. Torricelli's law makes the outflow proportional to the square root of the head, q_out = c sqrt(h), and we will take c = 0.01 in SI units, so a 1 m head drains at 10 litres per second. Conservation of volume gives the plant equation:
A dh/dt = q_in - c sqrt(h).
That square root is the nonlinearity. Choose an operating level h0; equilibrium requires q_in0 = c sqrt(h_0). Now expand. The only derivative needed is d/dh [c sqrt(h)] = c/(2 sqrt(h)), so
A d(dh)/dt = dq - [c/(2 sqrt(h_0))] dh,
which is a first-order lag with time constant tau = 2 A sqrt(h_0)/c and static gain K = 2 sqrt(h_0)/c. Evaluate at two levels:
| Operating level h0 | Steady inflow | tau | Static gain K | Transfer function |
|---|---|---|---|---|
| 1 m | 10 L/s | 200 s | 200 s/m2 | 200/(200s + 1) |
| 4 m | 20 L/s | 400 s | 400 s/m2 | 400/(400s + 1) |
Both doubled. Here is the part worth noticing, because it is the opposite of the valve story: the ratio K/tau = 1/A = 1 at every level. The initial slope of the tank's step response does not depend on where you are operating, because a tank fills at a rate set by its area and nothing else. Proportional control on this plant is therefore far more forgiving of operating point than the valve upstream of it. Two nonlinearities, two completely different consequences for a controller, and only the arithmetic tells them apart.
When the linearisation is unstable: the inverted pendulum
Balance a rod of length L = 0.5 m upright on a pivot. For the pendulum angle theta from vertical, the equation of motion of a simple inverted pendulum is theta'' = (g/L) sin(theta). The equilibrium at theta = 0 is genuine: put it exactly upright and it stays. Linearise with sin(theta) = theta:
theta'' = (g/L) theta = 19.62 theta, so the poles are s = +/- sqrt(19.62) = +/- 4.43 per second.
One pole sits in the right half-plane at +4.43, and the response grows as e4.43t. The doubling time is ln 2 / 4.43 = 0.156 s. That is the honest measure of how fast a controller must be: a loop that takes half a second to react to a lean has already let the error grow by a factor of nine. It is also why balancing a broom on your palm is possible and balancing a pencil is not, since halving L raises the growth rate by sqrt(2).
The general result behind this is Lyapunov's indirect method: if every eigenvalue of A has a strictly negative real part, the equilibrium of the nonlinear system is locally asymptotically stable; if any has a strictly positive real part, it is unstable. If the eigenvalues sit exactly on the imaginary axis, the linearisation tells you nothing at all. The proof of that last clause is a pair of one-line examples: x' = -x3 converges to zero and x' = +x3 escapes to infinity, and both linearise to the same dx' = 0.
Block diagrams: three rules and two moves
A block diagram is algebra drawn as plumbing, and reducing one is algebra done in pictures. Three rules do most of the work.
- Series. Blocks in cascade multiply:
G_1 G_2. This is valid only if the second block does not load the first, which is why a passive RC filter cascaded with another passive RC filter is not the product of the two. - Parallel. Blocks fed from one node and summed:
G_1 + G_2. - Feedback. Forward path G, feedback path H, negative sum:
G/(1 + GH). With a positive sum it isG/(1 - GH), and getting that sign wrong is the single most common error in the subject.
Two moves handle the rest. To slide a takeoff point from after a block to before it, insert G in the branch you moved. To slide a summing junction from before a block to after it, insert G in the signal you moved. Both follow from writing the node equations, and if you cannot see why, write them. For diagrams too tangled to reduce this way, Mason's gain formula computes the transfer function directly from forward paths and loops.
Reducing the motor loop, and what the tachometer does
Take the motor of Lesson 1 driving a load whose angle you want to control. The physical loop has two nested rings: a tachometer on the shaft feeds speed back with gain Kt to an inner loop, and an encoder feeds angle back to an outer loop with gain Kp. Reduce from the inside out.
The inner loop has forward path 2/((s+2)(s+10)) and feedback Kt, so it closes to
G_inner(s) = 2 / ((s+2)(s+10) + 2K_t) = 2/(s2 + 12s + 20 + 2K_t).
Now turn the tachometer gain up and watch the poles, which are always the roots of s2 + 12s + (20 + 2K_t).
| Kt | Constant term | Closed-loop poles | What happened |
|---|---|---|---|
| 0 | 20 | -2, -10 | Open loop, the bare motor |
| 0.5 | 21 | -2.127, -9.873 | Poles creep toward each other |
| 8 | 36 | -6, -6 (repeated) | Critically damped, the fastest non-ringing response |
| 12 | 44 | -6 +/- j2.828 | Complex: velocity feedback has made the motor ring |
Notice that the sum of the poles is -12 in every row. Feedback around this plant moved the poles but could not change where their average sits, because the coefficient of s2 was untouched by Kt. That constraint is not a curiosity; it is the first appearance of a conservation law that Module 3 turns into the asymptotes of the root locus and Module 6 turns into the waterbed effect.
Closing the outer loop is now one more application of the feedback rule. Angle is the integral of speed, so the outer forward path is K_p G_inner(s)/s, and with unity feedback the closed-loop characteristic polynomial for Kt = 0.5 is
s(s2 + 12s + 21) + 2K_p = s3 + 12s2 + 21s + 2K_p.
In short: the whole tangle collapsed to one cubic, and the only design freedom left in it is Kp. Lesson 6 shows that this loop is stable for K_p < 126 and finds the exact frequency at which it starts to oscillate.
Common misconceptions
- "Keep more Taylor terms and the model gets better." Keep the quadratic term and you no longer have a linear model, so root locus, Bode plots, transfer functions and superposition all stop applying. The point of linearisation is not accuracy; it is admission to a toolbox. Better accuracy comes from linearising at several operating points and scheduling the controller between them.
- "If the nonlinear system is stable, its linearisation is stable." Only one direction of that is safe. A strictly left-half-plane linearisation proves local stability of the nonlinear system, and a right-half-plane eigenvalue proves instability, but poles exactly on the axis prove nothing either way, as x' = -x3 and x' = +x3 show.
- "Block diagram reduction is bookkeeping, so order does not matter." Move a takeoff point across a block without inserting the compensating 1/G and you have written down a different system. Reduce from the innermost loop outward and check one thing at the end: the closed-loop DC gain, computed by setting s = 0 in your result, should match what you get by reasoning about steady state on the original diagram.
- "Cascading two blocks always multiplies them." Only when the second draws nothing from the first. Two RC low-pass sections in series do not give the square of one section's transfer function, because the second stage loads the first; the same trap catches mechanical stages coupled through a compliant shaft.
Where this leaves us
Linearisation replaces a nonlinear plant with a linear one that agrees near an operating point, and the price is that the model, and every controller designed on it, is local. The equal-percentage valve made that price visible: a sevenfold gain change between 30 and 80 percent travel, enough to eat any reasonable gain margin. The tank showed the opposite case, where the gain and the time constant both doubled and cancelled in the ratio that mattered. The inverted pendulum showed a linearisation with a pole at +4.43 per second and a doubling time of 0.156 s, which is a specification for the controller, not a defect in the model.
The core of it: block diagram reduction then turns any interconnection into a single transfer function, and reducing the motor's two nested loops gave s3 + 12s2 + 21s + 2K_p, one cubic with one knob.
You now have plants and you have loops. The next lesson asks what the poles of such a polynomial actually do in time, and computes rise, peak and settling times to two decimal places.
Sources
- Wikipedia contributors. (n.d.). Linearization. Wikipedia. en.wikipedia.org
- Trumper, D. (2014). 2.14 Analysis and design of feedback control systems. MIT OpenCourseWare. ocw.mit.edu
- Wikipedia contributors. (n.d.). Mason's gain formula. Wikipedia. en.wikipedia.org
- Ogata, K. (2010). Modern control engineering (5th ed.), Chapters 2 and 3. Prentice Hall.
- Nise, N. S. (2019). Control systems engineering (8th ed.), Chapter 5. Wiley.
- Key terms
- Operating point
- A state and input pair at which the derivatives vanish, so the plant sits still; linearisation is performed about it.
- Jacobian linearisation
- Replacing f(x,u) by its first-order Taylor expansion, giving dx' = A dx + B du with A and B the partial derivatives at the operating point.
- Equal-percentage valve
- A valve whose flow follows q = q_max R^(x-1), so its incremental gain is proportional to the flow passing through it.
- Rangeability
- The ratio of maximum to minimum controllable flow through a valve, typically 50 for an equal-percentage trim.
- Lyapunov's indirect method
- Eigenvalues strictly in the left half-plane prove local asymptotic stability; any in the right half-plane prove instability; eigenvalues on the axis are inconclusive.
- Block diagram reduction
- Applying series, parallel and feedback rules, plus takeoff and summing-junction moves, to collapse an interconnection into one transfer function.
- Minor-loop feedback
- An inner feedback loop, such as tachometer velocity feedback, closed inside an outer loop to reshape the plant the outer loop sees.
- Gain scheduling
- Linearising at several operating points and switching or interpolating controller parameters between them.
Fifteen Point Two Seven Millimetres: Reading Time Response Off the Poles
- Compute rise, peak and settling times and percentage overshoot for a second-order system from its damping ratio and natural frequency.
- Compare first-order, overdamped and underdamped step responses and say which pole governs each feature of the curve.
- Apply and test the dominant-pole approximation, quantifying the error it makes on the motor.
Push the mass-spring-damper of Lesson 1 with a steady 1 N force and it ends up 10.00 mm from where it started. On the way there it reaches 15.27 mm. It comes back, undershoots to about 7.2 mm, rings three more times, and is inside a 2 percent band of its final value 2.00 seconds after the push began. Every one of those numbers came out of two quantities, zeta = 0.2 and wn = 10 rad/s, with no simulation and no measurement.
That is the trade this lesson makes concrete. The poles of a transfer function are two numbers; the step response is a curve. This lesson is the dictionary between them, and it is built as a comparison, because the fastest way to learn what a pole does is to watch what changes when you move it.
One pole: the exponential, and the five numbers worth memorising
A first-order plant K/(tau s + 1) driven by a unit step gives y(t) = K(1 - e-t/tau). There is no overshoot, no ringing, and nothing to design: the curve has exactly one shape, stretched by tau. Five points on it are worth knowing cold.
| Time | tau | 2 tau | 3 tau | 4 tau | 5 tau |
|---|---|---|---|---|---|
| Percent of final value | 63.2 | 86.5 | 95.0 | 98.2 | 99.3 |
The 10 to 90 percent rise time is tau ln 9 = 2.197 tau, and the 2 percent settling time is tau ln 50 = 3.912 tau, which everyone rounds to 4 tau. For the oven of Lesson 1, tau = 250 s, so a step of heater power reaches 95 percent of its final rise 750 s after the delay ends, that is 765 s or 12.75 minutes after you press the button. If that feels slow, it is: process plants live at these timescales, and it is the reason process control tuning is done by rules rather than by watching.
Two poles: the same curve, five ways
A second-order plant is written in standard form as wn2/(s2 + 2 zeta wn s + wn2), whose poles are s = -zeta wn +/- j wn sqrt(1 - zeta2). The damping ratio zeta decides the character of the response, and the natural frequency wn decides only how fast the whole picture runs.
| Range of zeta | Poles | Name | Step response |
|---|---|---|---|
| zeta = 0 | Pure imaginary pair | Undamped | Rings forever at wn, never settles |
| 0 < zeta < 1 | Complex pair | Underdamped | Overshoots, rings, decays as e to the minus zeta wn t |
| zeta = 1 | Repeated real pole | Critically damped | Fastest approach with no overshoot at all |
| zeta > 1 | Two distinct real poles | Overdamped | Sluggish, dominated by the slower pole |
| zeta < 0 | Right half-plane pair | Unstable | Growing oscillation without bound |
For the underdamped case the exact step response is
y(t) = 1 - [e-zeta wn t/sqrt(1 - zeta2)] sin(wd t + beta), where wd = wn sqrt(1 - zeta2) and beta = arccos(zeta).
Four design numbers fall out of that expression by differentiating it or by inspection.
- Peak time
tp = pi/wd, the first zero of the derivative. - Percentage overshoot
Mp = exp(-pi zeta / sqrt(1 - zeta2)), which depends on zeta and on absolutely nothing else. - Settling time
ts = 4/(zeta wn)to 2 percent, or3/(zeta wn)to 5 percent, from the envelope alone. - Rise time
tr = (pi - beta)/wdfrom 0 to 100 percent, or roughly1.8/wnfrom 10 to 90 percent near zeta = 0.5.
Overshoot against damping is the table every control engineer eventually knows by heart. Compute it once and keep it.
| zeta | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.707 | 0.8 | 0.9 |
|---|---|---|---|---|---|---|---|---|---|
| Overshoot, percent | 72.9 | 52.7 | 37.2 | 25.4 | 16.3 | 9.5 | 4.3 | 1.5 | 0.15 |
Two entries earn their fame. At zeta = 0.5 the overshoot is 16.3 percent, which is why 0.5 is the default when a specification says only that the response should be brisk. At zeta = 0.707 the overshoot is exactly e-pi = 4.32 percent, and the closed-loop frequency response is maximally flat, which is why that value turns up again in Lesson 15 as the answer an optimal regulator gives on its own.
What matters here: the real part of the pole, sigma = zeta wn, sets how fast the response dies; the imaginary part wd sets how fast it rings; and the angle of the pole from the negative real axis, whose cosine is zeta, sets the overshoot. Three geometric facts about a point in the plane, three features of a curve in time.
The mass-spring-damper, carried to the millimetre
Now do the plant. X/F = 1/(s2 + 4s + 100), so wn = 10, zeta = 0.2, wd = 10 sqrt(0.96) = 9.798 rad/s, and beta = arccos(0.2) = 1.3694 rad. A 1 N step gives a final value of 0.01 m.
| Quantity | Formula | Value |
|---|---|---|
| Peak time | pi/wd | 0.3206 s |
| Overshoot | exp(-pi zeta/sqrt(1-zeta2)) | 52.7 percent, so a peak of 15.27 mm |
| Settling time, 2 percent | 4/(zeta wn) | 2.00 s |
| Rise time, 0 to 100 percent | (pi - beta)/wd | 0.181 s |
| Cycles before settling | ts wd/(2 pi) | 3.1 |
Check the peak by substitution rather than trusting the formula. At t = 0.3206, the envelope factor is e-0.6413/0.9798 = 0.5375 and sin(9.798 x 0.3206 + 1.3694) = sin(4.511) = -0.9798, so y = 1 + 0.5267 = 1.5267 times the final value. That is 15.27 mm, which is where this lesson started.
Notice the tension in those five numbers. The rise time is 0.181 s and the settling time is 2.00 s, more than ten times longer. A specification written only as make it reach the target in 0.2 seconds is met by this plant and is also a disaster, because it says nothing about the two seconds of ringing that follow.
The motor, and how much the second pole actually matters
The motor speed plant 2/((s+2)(s+10)) has two real poles, so in standard form wn = sqrt(20) = 4.472 and zeta = 12/(2 x 4.472) = 1.342: overdamped, no overshoot, none of the underdamped formulas apply. What governs it instead is the dominant pole, the one nearest the imaginary axis, at -2.
The dominant-pole approximation says: throw away any pole at least five times further left, keep the DC gain, and treat what remains. Here that leaves 0.0999/(0.5 s + 1), a first-order lag with tau = 0.5 s, predicting a 2 percent settling time of 3.912 x 0.5 = 1.96 s.
The exact answer came out of Lesson 1: omega(t) = 1.2 - 1.5 e-2t + 0.3 e-10t for a 12 V step, which crosses 98 percent of 1.2 at t = 2.07 s. The approximation is 5 percent low. That is the honest size of the error, and it is small because the fast pole is five times faster and carries a residue of only 0.3 against the slow pole's 1.5.
Bottom line: the dominant-pole approximation is not a way of being lazy; it is a statement about which pole your controller has to argue with. Push the motor's fast pole to -50 and nothing about the settling time changes. Push the slow one to -4 and everything does.
Common misconceptions
- "Raising the natural frequency reduces overshoot." It does not. Percentage overshoot is a function of zeta alone, so a pole pair at
-2 +/- j9.798and one at-20 +/- j97.98both overshoot 52.7 percent. Raising wn compresses the whole curve in time: the same shape, ten times faster. - "Settling time is set by the ringing frequency." Settling is set by the envelope, so by the real part of the pole and nothing else. Two systems with poles at
-2 +/- j3and-2 +/- j30settle at the same instant; the second simply rings ten times as often on the way. - "Adding a faster pole makes the system faster." Adding poles can only slow a system down. What a fast pole does is contribute little, which is not the same thing as helping. The only way to speed up settling is to move the dominant pole left, and Modules 3 and 4 are about doing exactly that.
- "These formulas apply to any second-order system." They apply to a second-order system with no zeros. Add a zero near the poles and the overshoot rises well above the table; put the zero in the right half-plane and the response first moves the wrong way, an undershoot the formulas cannot express. Lesson 16 shows why that is a hard limit rather than a nuisance.
The short version
A first-order response is one exponential: 63 percent at one time constant, 95 at three, settled at four. A second-order response is an exponential envelope wrapped around a sinusoid, and three geometric facts about the pole location give you the whole curve. The real part sets the settling time as 4/sigma. The imaginary part sets the ringing at wd. The angle sets the overshoot, 16.3 percent at zeta = 0.5 and 4.3 percent at zeta = 0.707. On the mass-spring-damper those rules predicted a 15.27 mm peak at 0.32 s and a 2.00 s settle, and substitution into the exact solution confirmed the peak to four figures.
On the motor, two real poles five times apart let the dominant-pole approximation predict settling within 5 percent of the exact value, which is the sort of error worth accepting to keep a design calculation on one page.
What none of this has done yet is change anything. Every number here describes the plant you were given. The next module closes a loop around it and asks what that buys.
Sources
- Cheever, E. (n.d.). The unit step response. Linear Physical Systems Analysis, Swarthmore College. lpsa.swarthmore.edu
- Wikipedia contributors. (n.d.). Damping ratio. Wikipedia. en.wikipedia.org
- Hallauer, W. L. (2016). Introduction to linear time-invariant dynamic systems for students of engineering, Chapters 9 and 10. Engineering LibreTexts. eng.libretexts.org
- Nise, N. S. (2019). Control systems engineering (8th ed.), Chapter 4. Wiley.
- Ogata, K. (2010). Modern control engineering (5th ed.), Chapter 5. Prentice Hall.
- Key terms
- Damping ratio
- zeta, the cosine of the angle between the pole and the negative real axis; it alone fixes percentage overshoot.
- Damped natural frequency
- wd = wn sqrt(1 - zeta^2), the imaginary part of the pole and the frequency of the ringing.
- Percentage overshoot
- exp(-pi zeta/sqrt(1 - zeta^2)) expressed as a percentage: 16.3 at zeta = 0.5 and 4.3 at zeta = 0.707.
- Settling time
- Time for the response to enter and stay within a band of the final value; 4/(zeta wn) for 2 percent, set by the envelope only.
- Peak time
- pi/wd, the instant of maximum overshoot, independent of how large that overshoot is.
- Dominant pole
- The closed-loop pole nearest the imaginary axis, which governs the slow part of the response.
- Dominant-pole approximation
- Discarding poles at least five times further left while preserving DC gain; on the motor it predicts settling within 5 percent.
- Critical damping
- zeta = 1, a repeated real pole, giving the fastest approach that does not overshoot.
Module 2: What Feedback Buys and What It Charges
Close the loop and pay for it. Sensitivity and disturbance rejection worked in decibels on the motor, the noise and stability costs that come with them, steady-state error read off the system type, and the Routh-Hurwitz criterion that turns a stability question into arithmetic on a polynomial.
Harold Black's Ferry Ride, and the Bill Feedback Sends
- Define the sensitivity and complementary sensitivity functions and use S + T = 1 to explain why disturbance rejection and noise immunity cannot both be maximised.
- Compute, for the motor speed loop at several gains, the steady-state error, the disturbance rejection factor in decibels, and the resulting overshoot.
- Show on the motor position loop that closing a loop around a stable plant can produce an unstable system.
On the morning of 2 August 1927 Harold Black took the Lackawanna ferry from Hoboken to Manhattan. He had been at Bell Labs six years, and the problem he had been given was brutal: to carry a telephone call across the continent you need repeater amplifiers every fifty miles, and by the time a signal has been through a hundred vacuum-tube amplifiers, the distortion each one adds has swamped the conversation. Black had spent years trying to build an amplifier linear enough. On the ferry he stopped trying. He sketched, on a spare page of that morning's New York Times, an amplifier that fed part of its output back to its input with the sign reversed, deliberately throwing away most of its gain.
The trade he wrote down is the trade this whole module is about. Give an amplifier a raw gain of 100,000 and use feedback to reduce the useful gain to 100, and the distortion falls by the same factor of a thousand that the gain did. The precision of the result stops depending on the tubes, which drift and age, and starts depending on the feedback network, which is a couple of resistors. Bell's patent examiners did not believe it for nine years; US patent 2,102,671 issued in 1937. The negative-feedback amplifier then made transcontinental telephony work, and the mathematics his colleagues Nyquist and Bode built to explain when it did not work is Module 4 of this course.
Here we spend the whole lesson sending Black's bill to the motor, item by item.
Two functions that add to one
Put the motor speed plant G(s) = 2/((s+2)(s+10)) in a loop with a proportional controller of gain Kc, so the loop transfer function is L(s) = K_c G(s). Two quantities describe everything that follows.
S(s) = 1/(1 + L(s)), the sensitivity function, and T(s) = L(s)/(1 + L(s)), the complementary sensitivity.
Add them: S + T = 1 at every single frequency. That identity is not an approximation or a design guideline. It is algebra, and it is the reason feedback design is a negotiation rather than an optimisation. Each function is the gain from a different place to the output:
- From reference to output:
T. You want this near 1 in the band you care about. - From output disturbance to output:
S. You want this small, and small S is exactly what large loop gain gives. - From sensor noise to output:
-T. You want this small, and it is near 1 wherever S is small. - From plant gain error to closed-loop gain error:
Sagain, sincedT/T = S (dG/G).
Remember: wherever the loop is doing its job on disturbances, it is passing sensor noise straight through. There is no gain setting that escapes this, only a choice about which frequencies get which treatment.
The bill, priced on the motor
At zero frequency the loop gain is L(0) = 2K_c/20 = 0.1 K_c. Steady-state error to a step reference is S(0) = 1/(1 + 0.1K_c). The closed-loop poles are the roots of s2 + 12s + 20 + 2K_c. Every column below comes from those two facts.
| Kc | L(0) | Steady-state error | Disturbance rejection | Closed-loop poles | zeta | Overshoot | ts (2 percent) |
|---|---|---|---|---|---|---|---|
| 0 (open loop) | 0 | 100 percent | 0 dB | -2, -10 | 1.34 | 0 | 2.07 s |
| 10 | 1 | 50 percent | 6.0 dB | -6 +/- j2 | 0.949 | 0.008 percent | 0.67 s |
| 100 | 10 | 9.1 percent | 20.8 dB | -6 +/- j13.56 | 0.405 | 24.9 percent | 0.67 s |
| 1000 | 100 | 0.99 percent | 40.1 dB | -6 +/- j44.54 | 0.134 | 65.5 percent | 0.67 s |
Read the last column first, because it is the surprise. The settling time is 0.67 s for every gain from 10 upward, and no amount of extra gain improves it. The reason is the constraint from Lesson 2: the coefficient of s2 is 12 whatever Kc does, so the two poles always sum to -12, and once they have gone complex their common real part is pinned at -6. Proportional gain on this plant buys accuracy and buys nothing else at all in the time domain. It buys ringing.
Now the disturbance column, in physical terms. A load torque Td on the shaft slows the open-loop motor by T_d/(b + K2/R) = T_d/0.1001. Hang 0.03 N m on it and the speed falls by 0.300 rad/s, which against a 12 V running speed of 1.199 rad/s is a 25 percent droop. Close the loop at Kc = 100 and the same torque produces 0.300/(1 + 10) = 0.027 rad/s, a droop of 2.3 percent. That factor of eleven is 1/S(0), and 20 log(11) = 20.8 dB is the entry in the table.
And the plant-variation column, which is Black's original point. Let the magnets warm in service so the torque constant K falls 5 percent. Open loop, the speed falls 5 percent. Closed loop at L(0) = 10, the change is S(0) x 5 = 0.45 percent; at L(0) = 100 it is 0.05 percent. The closed-loop behaviour has stopped being a property of the motor and become a property of the feedback path, exactly as it stopped being a property of Black's vacuum tubes.
The item on the bill nobody expects: stability
The motor speed plant is stable, and every closed-loop polynomial s2 + 12s + 20 + 2K_c has positive coefficients, so the speed loop is stable for every positive gain. That is a property of second-order systems, not of feedback, and it misleads people badly.
Control the shaft angle instead. Angle is the integral of speed, so the plant becomes 2/(s(s+2)(s+10)) and the closed-loop characteristic polynomial is
s3 + 12s2 + 20s + 2K_c.
Every coefficient is still positive at every positive gain, and yet this loop goes unstable. Lesson 6 does the algebra properly; the answer is that stability requires 2K_c < 12 x 20 = 240, so K_c < 120, and at exactly K_c = 120 the loop oscillates at sqrt(20) = 4.472 rad/s, or 0.712 Hz. Below that it settles. Above it, the shaft hunts and then destroys the gearbox.
Nothing about the open-loop motor could go unstable. It is a lump of iron with friction; leave it alone and it stops. Feedback created a failure mode the plant did not have. That is the item Black's colleagues at Bell discovered the hard way when their feedback amplifiers began to sing, and it is why Nyquist was asked in 1932 to work out exactly when a loop would do that.
Common misconceptions
- "More gain is better." The table refutes it in four columns at once. From Kc = 100 to 1000, the steady-state error improved from 9.1 percent to 1 percent, the overshoot went from 25 percent to 65 percent, and the settling time did not move at all. Whether that is a good trade depends on the application, and no general rule says it is.
- "A stable plant stays stable when you close a loop around it." The motor position loop is the counterexample, and it is not exotic: a stable third-order plant with proportional feedback, which is the most ordinary configuration in engineering. Feedback rearranges the poles, and rearranging can move them into the right half-plane.
- "Feedback removes disturbances." It divides them by
1 + Lat the frequencies where L is large, and does nothing at all where L is small. Since L falls off at high frequency for every real plant, fast disturbances pass through essentially untouched, and it is worth knowing where your loop stops helping before you promise anything. - "Sensor noise is a hardware problem, not a control problem." The transfer from noise to output is T, which you set when you chose the loop gain. A quieter tachometer helps, and so does accepting a lower bandwidth; those are two ways of buying the same thing, and the second is usually cheaper.
What to carry forward
Feedback buys three things: accuracy against a reference, rejection of disturbances, and insensitivity to the plant's own parameters, all by the same factor 1/(1 + L). It charges three things: full transmission of sensor noise wherever it is doing that job, since S + T = 1; increased ringing as the loop gain rises; and the outright possibility of instability in a plant that had none.
On the motor those numbers were: at Kc = 100, a steady-state error of 9.1 percent, disturbance rejection of 20.8 dB, torque droop cut from 25 percent to 2.3 percent, sensitivity to a 5 percent motor change cut to 0.45 percent, and the price paid as 24.9 percent overshoot with no gain in settling time whatsoever.
The upshot: Black gave away gain to buy precision, and every loop you design will give away something to buy something else. The job is to know the exchange rate before you sign.
The next lesson makes the accuracy half of that bargain exact, and shows how to get zero steady-state error rather than 9.1 percent by changing the controller rather than by turning it up.
Sources
- Wikipedia contributors. (n.d.). Negative-feedback amplifier. Wikipedia. en.wikipedia.org
- Roberge, J. K., and Trumper, D. (2007). 6.302 Feedback systems. MIT OpenCourseWare. ocw.mit.edu
- Wikipedia contributors. (n.d.). Sensitivity (control systems). Wikipedia. en.wikipedia.org
- Black, H. S. (1934). Stabilized feedback amplifiers. Bell System Technical Journal, 13(1), 1-18.
- Astrom, K. J., and Murray, R. M. (2021). Feedback systems: An introduction for scientists and engineers (2nd ed.), Chapters 1 and 12. Princeton University Press.
- Key terms
- Sensitivity function
- S = 1/(1 + L), the transfer from output disturbance to output and the factor by which feedback shrinks plant variations.
- Complementary sensitivity
- T = L/(1 + L), the transfer from reference to output and, with a sign change, from sensor noise to output.
- The identity S + T = 1
- An algebraic fact holding at every frequency, which forbids making disturbance rejection and noise immunity both large at the same frequency.
- Loop transfer function
- L = CG, the product of everything going once around the loop; its size at a frequency decides what feedback achieves there.
- Steady-state error
- The residual difference between reference and output as time goes to infinity; for a step it equals S(0).
- Disturbance rejection
- The factor 1 + L by which a disturbance at a given frequency is attenuated relative to the open-loop case.
- Torque droop
- The speed a motor loses under an applied load torque; on the open-loop motor 0.03 N m costs 0.300 rad/s, cut to 0.027 rad/s at a loop gain of 10.
- Stability price
- The failure mode feedback creates in a plant that had none, visible here as the motor position loop going unstable above Kc = 120.
Why the Oven Sits Sixteen Degrees Low: System Type and Steady-State Error
- Apply the final value theorem correctly, including the stability condition that makes it valid.
- Determine system type from the loop transfer function and compute position, velocity and acceleration error constants for the motor and the oven.
- Distinguish reference tracking error from disturbance-induced offset and sensor bias, and say which of the three an integrator can remove.
Set the oven controller to 50 degrees above ambient, walk away, come back in an hour, and the block is 33.3 degrees above ambient. Nothing is broken. The heater is on, the loop is closed, the measurement is correct, and the error is 16.7 degrees and will stay 16.7 degrees forever. A proportional controller with gain 4 on a plant of gain 0.5 has a loop gain of 2, and a loop gain of 2 leaves a third of the error standing. This lesson is the procedure that predicts numbers like 16.7 before you build the thing, and the one change to the controller that drives them to zero.
Step one: the final value theorem, and when it lies
The final value theorem says that if a signal settles, its settled value is
lim(t to infinity) f(t) = lim(s to 0) s F(s).
The conditional clause is the whole content. The theorem is valid only when every pole of s F(s) lies strictly in the left half-plane. Apply it without checking and it will return a confident number for a system that is flying apart. Take a closed loop with T(s) = 2/(s2 - s + 2), whose poles are at 0.5 +/- j1.323, firmly in the right half-plane. Its step response is Y(s) = 2/(s(s2 - s + 2)), and s Y(s) at s = 0 is exactly 1. The theorem reports a final value of 1 for a response that grows without bound.
Key idea: check stability first, then compute the steady-state error. Every number in this lesson assumes a stable closed loop, and Lesson 6 supplies the test that earns that assumption.
Step two: write the error and count the integrators
For unity feedback with loop transfer function L(s), the error is E(s) = R(s)/(1 + L(s)). So
e_ss = lim(s to 0) s R(s)/(1 + L(s)).
Everything now depends on how many poles L(s) has at the origin, a count called the system type. Write L(s) = K N(s)/(sn D(s)) with N(0) and D(0) both nonzero; then n is the type. Three error constants follow, each the limit that survives for one class of input.
| Constant | Definition | Input it handles | Error |
|---|---|---|---|
| Position, Kp | L(0) | Step | 1/(1 + Kp) |
| Velocity, Kv | lim s L(s) | Ramp | 1/Kv |
| Acceleration, Ka | lim s2 L(s) | Parabola | 1/Ka |
Combining the two gives the table every design starts from. Each integrator in the loop converts one infinite error into a finite one, and one finite error into zero.
| Type | Step error | Ramp error | Parabola error |
|---|---|---|---|
| 0 | 1/(1 + Kp), finite | Infinite | Infinite |
| 1 | Zero | 1/Kv, finite | Infinite |
| 2 | Zero | Zero | 1/Ka, finite |
The diagonal structure is not a coincidence. A ramp is the integral of a step, and an integrator in the loop is exactly what lets a constant error signal produce the steadily rising control action a ramp demands. Once you see that, the table is something you can reconstruct rather than memorise.
Step three: the oven, worked
The oven loop with proportional gain Kc has L(s) = 0.5 K_c/(250s + 1), with no pole at the origin, so it is type 0. Then K_p = 0.5 K_c and the step error is 1/(1 + 0.5K_c).
At K_c = 4: K_p = 2 and the error is 1/3. Ask for 50 degrees and you get 33.3, which is the 16.7 degree shortfall this lesson opened with. The physical reading is worth having: a proportional controller commands heat in proportion to error, so if the error were zero the heater would be off, and a block that needs 66.7 W to hold its temperature can only get 66.7 W if some error remains to ask for it. Offset is not a defect of the tuning. It is what proportional control is.
You can shrink it by raising Kc. At Kc = 40, the error is 1/21, so 2.4 degrees. At Kc = 400 it is 0.25 degrees, and by then the 15 second delay has long since made the loop oscillate. Lesson 8 finds the actual limit; it is nowhere near 400.
The alternative is to change the controller rather than its size. A proportional-integral controller, C(s) = K_c(1 + 1/(T_i s))= K_c(T_i s + 1)/(T_i s), puts a pole at the origin into L(s). The loop becomes type 1, Kp becomes infinite, and the step error becomes exactly zero. Not small: zero. The integrator keeps accumulating as long as any error remains, so the only steady state it will accept is the one with no error at all.
Step four: the motor position loop, where type 1 is not enough
Now the motor. In speed, L = 2K_c/((s+2)(s+10)) is type 0 and the step error at K_c = 100 is 9.1 percent, as Lesson 4 found. In position, angle is the integral of speed, so L = 2K_c/(s(s+2)(s+10)) is type 1 for free, with no integrator in the controller at all. The shaft therefore parks at exactly the commanded angle after any step command.
Command a rotation instead. A ramp of 1 rad/s means the shaft must keep turning, and now the velocity constant matters: K_v = lim s L(s) = 2K_c/20 = 0.1K_c, so the tracking error is 10/K_c radians per rad/s of command.
| Kc | Kv | Lag while tracking 1 rad/s | Stable? |
|---|---|---|---|
| 20 | 2 | 0.500 rad, or 28.6 degrees | Yes |
| 100 | 10 | 0.100 rad, or 5.73 degrees | Yes |
| 120 | 12 | 0.083 rad, or 4.77 degrees | Marginal, oscillates at 4.472 rad/s |
So proportional control on this axis cannot do better than a 4.8 degree lag, and cannot even reach that without ringing forever. If the specification says track a 1 rad/s slew within 1 degree, no gain exists that meets it, and this is the moment to stop turning the knob.
Adding integral action makes the loop type 2 and the ramp error zero. It also adds a pole at the origin to an already marginal loop, so the integrator has to be gentle. With C(s) = K_c(s + a)/s the characteristic polynomial is s4 + 12s3 + 20s2 + 2K_c s + 2K_c a, and a Routh test, which Lesson 6 performs, requires both K_c < 120 and 12a < 20 - K_c/6. Choose K_c = 60 and a = 0.5: the Routh first column comes out 1, 12, 10, 48, 60, all positive, so the loop is stable, the ramp error is zero, and the acceleration constant is K_a = 2K_c a/20 = 3, leaving a finite 0.333 rad error only if you ask the shaft to accelerate steadily forever.
So what?: type is a design variable, not a fact about the plant. You choose it when you choose the controller, and each integrator you add buys an entire class of inputs at the cost of stability margin.
Three errors that look the same and are not
Steady-state error to a reference is only one of three offsets a loop can show, and confusing them wastes a great deal of time.
- Reference tracking error. Governed by type and the error constants above. Removed by an integrator anywhere in the loop.
- Disturbance-induced offset. The ambient temperature falls 5 degrees. With proportional gain 4, the block cools by
5/(1 + 2) = 1.67degrees and stays there. An integrator in the controller removes this, because the disturbance enters downstream of it and the integrator can wind up to whatever heater output the new ambient requires. An integrator that is part of the plant, as in the motor position loop, does not help against a disturbance entering after it. - Sensor bias. The thermocouple reads 3 degrees high. The loop drives the measurement to setpoint, so the block settles 3 degrees below where you wanted it, permanently, and no integrator will ever fix it. The loop has no way to know. This is the single most common cause of a control system that is working perfectly and delivering the wrong answer.
Common misconceptions
- "System type is a property of the plant." It is a property of the loop transfer function, which includes the controller. The oven is type 0 with a P controller and type 1 with a PI controller, and it is the same oven.
- "Zero steady-state error means the output equals the reference." It means the error tends to zero for that class of input, eventually. A type 1 loop tracks a step perfectly and lags a ramp forever, and both statements are about the limit as time goes to infinity, not about the first two seconds.
- "An integrator always removes offset." Only offsets that enter the loop after the integrator. A sensor bias enters where the integrator cannot see it, and no amount of integral action touches it.
- "Proportional offset is a tuning error." It is structural. A proportional controller needs a non-zero error to produce a non-zero output, so any plant that requires steady effort to hold its setpoint, which means every heater, every motor lifting a load, and every valve against a pressure, will sit off target under pure proportional control.
What you now know
The procedure is four steps and never varies. Confirm the closed loop is stable, or the final value theorem will lie to you. Write E(s) = R(s)/(1 + L(s)). Count the poles of L(s) at the origin to get the type. Take the appropriate limit for the input you care about.
Run on the oven it gave a 16.7 degree offset at Kc = 4, falling to 2.4 degrees at Kc = 40 and to zero, structurally, the moment integral action is added. Run on the motor position loop it gave a tracking lag of 5.73 degrees at 1 rad/s with Kc = 100 and an unreachable floor of 4.77 degrees at the stability limit, which is the honest answer to a specification that proportional control cannot meet.
The point: and the three offsets are different animals. Reference error yields to type. Disturbance offset yields to an integrator in the controller. Sensor bias yields to calibration and to nothing else.
Twice now a design has stopped at a number labelled the stability limit, quoted without proof. The next lesson proves it, with a test that needs no root finding at all.
Sources
- Wikipedia contributors. (n.d.). Steady state error. Wikipedia. en.wikipedia.org
- Woolf, P. (n.d.). Proportional-integral-derivative (PID) control. Chemical process dynamics and controls. Engineering LibreTexts. eng.libretexts.org
- Wikipedia contributors. (n.d.). Final value theorem. Wikipedia. en.wikipedia.org
- Nise, N. S. (2019). Control systems engineering (8th ed.), Chapter 7. Wiley.
- Franklin, G. F., Powell, J. D., and Emami-Naeini, A. (2019). Feedback control of dynamic systems (8th ed.), Chapter 4. Pearson.
- Key terms
- Final value theorem
- The settled value of f(t) equals the limit of s F(s) as s goes to zero, valid only when every pole of s F(s) is strictly in the left half-plane.
- System type
- The number of poles the loop transfer function has at the origin; it decides which classes of input the loop can track without error.
- Position error constant
- Kp = L(0); the step error of a type 0 loop is 1/(1 + Kp).
- Velocity error constant
- Kv = lim s L(s); the ramp error of a type 1 loop is 1/Kv, giving a constant lag while tracking.
- Acceleration error constant
- Ka = lim s^2 L(s); the error of a type 2 loop to a parabolic input is 1/Ka.
- Proportional offset
- The structural steady-state error of proportional control, arising because a non-zero output requires a non-zero error to command it.
- Disturbance offset
- A permanent shift caused by a constant load or ambient change, removable only by integral action sitting upstream of where the disturbance enters.
- Sensor bias
- A fixed measurement error; the loop drives the measurement to setpoint, so the true output is off by the bias and no integrator can detect it.
All the Coefficients Are Positive, So It Is Stable: Tracing a Wrong Answer
- Explain why the left half-plane is the stability boundary for a linear time-invariant system, and what a pole exactly on the axis means physically.
- Construct a Routh array, count right half-plane roots from sign changes, and handle the row-of-zeros case with an auxiliary polynomial.
- Apply the criterion to find exact gain limits for the motor position loop and for a type 2 design, and interpret a result that is stable but unusable.
Here is a piece of reasoning that sounds right and is not. A colleague hands you the closed-loop characteristic polynomial of the motor position loop at a gain of 200:
s3 + 12s2 + 20s + 400.
She says: every coefficient is positive, there are no missing powers, so all three roots are in the left half-plane and the loop is stable. That reasoning has a true half and a false half, and separating them is worth a lesson, because it is the most common wrong answer in the subject and it is wrong in a specific, traceable way.
The roots of that cubic are -12.53 and 0.264 +/- j5.65. The loop oscillates at 5.65 rad/s with an envelope growing as e0.264t, doubling every 2.6 seconds. The gearbox has about a minute.
Where the true half comes from
Start with what stability means. The free response of a linear system is a sum of terms es_k t, one for each pole sk. Write s = sigma + j w and the magnitude of that term is esigma t. If sigma is negative the mode dies. If sigma is positive it grows. If sigma is exactly zero it does neither, and the system rings forever at w without growing or decaying. That is the entire reason the imaginary axis is the boundary: it is the locus where the exponential envelope is flat.
Now the necessary condition. If every root of a real polynomial lies in the left half-plane, the polynomial factors into terms (s + a) with a > 0 and terms (s2 + bs + c) with b, c > 0, since complex roots come in conjugate pairs whose sum is -b and whose product is c. Multiplying polynomials whose coefficients are all positive can never produce a negative or missing coefficient. So a stable polynomial has all its coefficients present and of one sign. That much of the colleague's reasoning is a theorem.
The false half is the converse. All-positive coefficients do not imply stability, and for polynomials of degree 3 and above they never did. The smallest counterexample is short enough to check by hand:
s3 + s2 + 2s + 8 = (s + 2)(s2 - s + 4), with roots at -2 and 0.5 +/- j1.936.
Every coefficient is positive; two roots are in the right half-plane. For degree 1 and 2 the converse does hold, which is exactly why the intuition survives: most people's mental library of examples is quadratic.
Why this matters: the all-positive test is a fast way to reject a polynomial, never a way to accept one. Use it to save time, then do the real test.
The real test, without finding a single root
Edward Routh won the 1877 Adams Prize for a method that counts right half-plane roots from arithmetic on the coefficients. Adolf Hurwitz reached the same result from determinants in 1895, prompted by the turbine engineer Aurel Stodola, who wanted to know when his speed governors would hunt. The combined result is the Routh-Hurwitz stability criterion, and its statement is exact: the number of roots in the right half-plane equals the number of sign changes in the first column of the Routh array.
Build the array by writing the coefficients in two rows, alternating, then generating each subsequent row from the two above it. For a_0 s4 + a_1 s3 + a_2 s2 + a_3 s + a_4:
| Row | First entry | Second entry |
|---|---|---|
| s4 | a0 | a2 |
| s3 | a1 | a3 |
| s2 | b1 = (a1a2 - a0a3)/a1 | b2 = a4 |
| s1 | c1 = (b1a3 - a1b2)/b1 | 0 |
| s0 | a4 |
Each new entry is a two-by-two determinant of the two rows above, divided by the first entry of the row immediately above, with a sign flip. Rows may be scaled by any positive number without changing the sign pattern, which is worth doing to keep the fractions small.
Worked once: the motor position loop
The polynomial is s3 + 12s2 + 20s + 2K_c. The array:
| Row | Column 1 | Column 2 |
|---|---|---|
| s3 | 1 | 20 |
| s2 | 12 | 2Kc |
| s1 | (240 - 2Kc)/12 | 0 |
| s0 | 2Kc |
The first column is 1, 12, (240 - 2K_c)/12, 2K_c. No sign changes requires both K_c > 0 and 240 - 2K_c > 0, so 0 < Kc < 120. That is the number quoted twice already, now earned.
Test the colleague's case, K_c = 200: the third entry is (240 - 400)/12 = -13.3 and the fourth is 400. The column runs 1, 12, -13.3, 400: two sign changes, so two right half-plane roots, which is exactly the conjugate pair at 0.264 +/- j5.65 that the root finder produced.
Set K_c = 120 exactly and the s1 row becomes zero. A vanishing row is not a breakdown of the method; it is the method telling you something specific. It means the polynomial has roots symmetric about the origin, and the row above it, read as a polynomial in even powers, is a factor. Here that auxiliary polynomial is
A(s) = 12s2 + 240 = 0, giving s = +/- j sqrt(20) = +/- j4.472.
So at the exact stability limit the loop carries a pole pair on the imaginary axis and oscillates at 4.472 rad/s, or 0.712 Hz. Lesson 7 will find this same gain and this same frequency by a completely different route, and Lesson 10 by a third.
Worked twice: the type 2 design, and a stable answer worth rejecting
Lesson 5 proposed making the position loop type 2 with C(s) = K_c(s + a)/s, giving
s4 + 12s3 + 20s2 + 2K_c s + 2K_c a.
The array in symbols has first column 1, 12, b_1, c_1, 2K_c a with b_1 = 20 - K_c/6 and c_1 = 2K_c(1 - 12a/b_1). Requiring all four positive gives two conditions: K_c < 120, as before, and 12a < 20 - K_c/6. The integrator zero must sit close to the origin, and the more gain you use the closer it must sit.
Take K_c = 60 and a = 0.5. Then b_1 = 10, c_1 = 120(1 - 6/10) = 48, and the first column reads 1, 12, 10, 48, 60. All positive, no sign changes, stable. The design passes.
Now look at where the poles actually are, which Routh deliberately does not tell you: -11.13, -0.533, and -0.169 +/- j3.176. That complex pair has a damping ratio of 0.169/3.18 = 0.053 and a settling time of 4/0.169 = 23.7 seconds, during which it completes about twelve visible cycles. The loop is stable and it is unusable. Every claim made about it in Lesson 5 was true and none of them was sufficient.
In short: Routh-Hurwitz answers one question, whether any pole is in the right half-plane, and answers it exactly. It says nothing about damping, speed or overshoot, which is why the next three lessons are about methods that show you where the poles go rather than merely which side they are on.
Common misconceptions
- "All coefficients positive means stable." The premise of this lesson. It is a valid rejection test and an invalid acceptance test above degree 2, and
s3 + s2 + 2s + 8is the counterexample to keep in your pocket. - "One negative coefficient means one unstable pole." The count comes from sign changes in the Routh first column, not from the coefficients. The quartic
s4 + 2s3 + 3s2 + 4s + 5has every coefficient positive and a first column of 1, 2, 1, -6, 5: two sign changes, and indeed two roots at0.288 +/- j1.416. - "A row of zeros means the method failed." It means the polynomial has roots placed symmetrically about the origin, which is precisely the case you most want to detect, because a pair on the imaginary axis is the boundary of stability. The auxiliary polynomial hands you the oscillation frequency for free.
- "Marginally stable is close enough." A pole exactly on the axis is a measure-zero condition. Any drift in gain, any warm bearing, any change in load inertia moves it, and it is as likely to move right as left. Designs are specified with margin for this reason, and Module 4 makes margin a measured quantity rather than a feeling.
Recap
The left half-plane is the stability boundary because |est| = esigma t, so the sign of the real part decides whether a mode grows, decays or persists. All-positive coefficients are necessary for stability and, from degree 3 upward, not sufficient. Routh-Hurwitz closes the gap: build the array, count sign changes in the first column, and that count is exactly the number of right half-plane roots.
On the motor position loop the criterion gave 0 < K_c < 120, correctly diagnosed two unstable roots at K_c = 200, and at K_c = 120 produced a row of zeros whose auxiliary polynomial named the oscillation frequency as 4.472 rad/s. On the type 2 quartic it gave two simultaneous conditions and passed a design whose poles then turned out to have a damping ratio of 0.053.
That last result is the honest limit of the method, and the reason for the next lesson. Knowing that the poles are in the left half-plane is not knowing where they are, and a designer needs to see them move.
Sources
- Wikipedia contributors. (n.d.). Routh-Hurwitz stability criterion. Wikipedia. en.wikipedia.org
- Hallauer, W. L. (2016). Introduction to system stability: time-response criteria. Introduction to linear time-invariant dynamic systems for students of engineering. Engineering LibreTexts. eng.libretexts.org
- Routh, E. J. (1877). A treatise on the stability of a given state of motion. Macmillan. (Adams Prize essay.)
- Nise, N. S. (2019). Control systems engineering (8th ed.), Chapter 6. Wiley.
- Ogata, K. (2010). Modern control engineering (5th ed.), Section 5.6. Prentice Hall.
- Key terms
- Bounded-input bounded-output stability
- For an LTI system, the property that every bounded input produces a bounded output; equivalent to every pole having a strictly negative real part.
- Necessary condition
- All coefficients present and of the same sign; a stable polynomial must satisfy it, but satisfying it proves nothing above degree 2.
- Routh array
- A table built from the polynomial coefficients, each entry a two-by-two determinant of the two rows above divided by the leading entry above.
- Sign-change count
- The number of sign changes down the Routh first column, which equals exactly the number of roots in the right half-plane.
- Auxiliary polynomial
- The row above a vanishing row, read as a polynomial in even powers; its roots are the symmetric roots of the original, including any on the imaginary axis.
- Marginal stability
- A pole exactly on the imaginary axis, giving sustained oscillation; a measure-zero condition that no real design should rely on.
- Ultimate gain
- The gain at which the Routh first column first develops a zero row, so the loop sits exactly on the stability boundary; 120 for the motor position loop.
- Ultimate frequency
- The oscillation frequency at the ultimate gain, taken from the auxiliary polynomial; 4.472 rad/s for the motor position loop.
Module 3: Design in the s-Plane
Watch the poles move. Root locus drawn by the rules for two systems and read for a gain, PID designed and tuned by Ziegler-Nichols on the thermal plant with a better tuning beside it, and a debugging lesson on the three ways a working PID controller misbehaves in the field.
Where Do the Poles Go? Drawing Two Root Loci and Reading a Gain Off One
- Derive the magnitude and angle conditions and use them to justify the root locus construction rules.
- Sketch complete root loci for a third-order real-pole system and for a complex-pole system with a zero, including asymptotes, breakaway points, imaginary-axis crossings and departure angles.
- Read a gain off a locus for a specified damping ratio and check the resulting step response against the second-order prediction.
Lesson 6 ended with two numbers and a gap between them. The motor position loop is stable for K < 120, and at K = 120 it oscillates at 4.472 rad/s. But at K = 5, or 15, or 60, where exactly are the poles? Routh will not say. It answers only which side of the axis they are on, and a designer needs to know how far from it, at what angle, and how that changes as the one knob turns.
In 1948 Walter Evans, then at North American Aviation, published the construction that answers the question with a pencil. It is called the root locus, and its subject is the path each closed-loop pole traces in the complex plane as a single gain runs from zero to infinity.
Two conditions, and everything follows from them
Closed-loop poles are the roots of 1 + K G(s) = 0, that is, K G(s) = -1. A complex number equals -1 when two separate things are true, and splitting them is the whole trick.
- Angle condition:
angle of G(s) = 180 degrees + 360k. This does not contain K at all, so it defines the entire locus by itself. - Magnitude condition:
K = 1/|G(s)|. This labels each point of the locus with the gain that puts a pole there.
The angle of G(s) at a test point is the sum of angles from the zeros to that point minus the sum of angles from the poles. So the question is purely geometric: for which points in the plane do those angles add up to 180 degrees? The construction rules are the answers for the easy cases.
| Rule | Statement |
|---|---|
| Branches | n branches, one per open-loop pole, starting at the poles at K = 0 and ending at the m zeros or at infinity as K grows. |
| Real axis | A real point is on the locus if the number of real poles and zeros strictly to its right is odd. |
| Asymptotes | The n - m branches going to infinity leave along angles (2k+1)180/(n-m), from a centroid at (sum of poles - sum of zeros)/(n - m). |
| Breakaway | Points where branches leave or rejoin the real axis satisfy d/ds [1/G(s)] = 0. |
| Axis crossing | Found from the Routh array, which gives both the gain and the frequency. |
| Departure angle | From a complex pole: 180 + (angles from zeros) - (angles from the other poles). |
Two of these deserve a sentence of justification. The real-axis rule works because a real test point sees zero degrees from everything to its left and 180 degrees from everything to its right, and complex pairs contribute equal and opposite angles that cancel; so the total is 180 times an odd number exactly when an odd count sits to the right. The asymptote centroid is the average pole position adjusted for zeros, because far from the origin the whole cluster looks like a single pole of multiplicity n - m.
Locus one: the motor axis
The loop is L(s) = 2K/(s(s+2)(s+10)). Three poles at 0, -2, -10, no zeros, so n = 3, m = 0.
- Real-axis segments. Between 0 and -2, one pole lies to the right: odd, so on the locus. Between -2 and -10, two lie to the right: even, so off. Left of -10, three lie to the right: odd, so on.
- Asymptotes. Three branches to infinity at 60, 180 and 300 degrees, from the centroid
(0 - 2 - 10)/3 = -4. - Breakaway. Set
d/ds [s(s+2)(s+10)] = 3s2 + 24s + 20 = 0, givings = -0.945ands = -7.055. Only -0.945 lies on a locus segment, so that is the breakaway; the gain there is2K = 0.945 x 1.055 x 9.055 = 9.03, soK = 4.51. - Axis crossing. From Lesson 6, at
K = 120andw = 4.472rad/s.
The picture, which you should draw before reading on: two branches start at 0 and -2, run toward each other along the real axis, collide at -0.945, and turn off into the upper and lower half-planes; they curve outward and eventually run away along the 60 and 300 degree asymptotes, crossing the imaginary axis at +/- j4.472. The third branch starts at -10 and runs left forever along the 180 degree asymptote.
What matters here: the poles never come back. Once the pair has broken away at K = 4.51, every further increase in gain moves them right as well as up, so damping falls monotonically. There is no gain that makes this loop both fast and well damped, and the locus shows it at a glance in a way no amount of Routh testing would.
Reading a gain off the locus
A line through the origin at angle arccos(zeta) from the negative real axis is the locus of constant damping ratio. For zeta = 0.5 that is 60 degrees. Find where the branch crosses it.
Put s = wn(-0.5 + j0.866) into s3 + 12s2 + 20s = -2K. Since s has magnitude wn and angle 120 degrees, s3 is real and equal to wn3. Collecting the imaginary part gives -10.392 wn2 + 17.32 wn = 0, so wn = 1.667 rad/s. The real part is then wn3 - 6wn2 - 10wn = 4.63 - 16.67 - 16.67 = -28.70, so 2K = 28.70 and K = 14.35.
The closed-loop poles are -0.833 +/- j1.443, and since the three poles must sum to -12, the third is at -10.33. That third pole sits 12 times further left than the dominant pair, so the second-order formulas of Lesson 3 should apply. They predict 16.3 percent overshoot, a peak at pi/1.443 = 2.18 s and settling at 4/0.833 = 4.80 s.
Simulated, the actual step response overshoots 16.1 percent, peaks at 2.28 s and settles at 4.94 s. The predictions are good to about 3 percent, and every error is in the direction the extra pole would push them: slightly slower, slightly less overshoot.
Locus two: a spring, a damper, and a zero that changes everything
Now the mass-spring-damper with proportional-plus-derivative control, C(s) = K(s + 5), so L(s) = K(s+5)/(s2 + 4s + 100). Two poles at -2 +/- j9.798, one zero at -5, so n = 2, m = 1.
- Real axis. Only the zero is real, so everything to the left of -5 is on the locus and nothing to its right is.
- Asymptote. One branch to infinity, at 180 degrees.
- Break-in.
d/ds[(s2+4s+100)/(s+5)] = 0givess2 + 10s - 80 = 0, sos = -15.25or+5.25. Only -15.25 is on the locus. The gain there isK = 271.5/10.25 = 26.5. - Departure angle from the pole at
-2 + j9.798:180 - 90 + 72.98 = 163degrees, where 90 is the angle from the conjugate pole and 72.98 is the angle from the zero.
When there are two poles and one zero the off-axis part of the locus is always a circle centred on the zero, and here its radius is |(-5) - (-2 + j9.798)| = sqrt(105) = 10.25. So the two branches leave the complex poles at 163 degrees, swing around that circle, meet the real axis at -15.25, and then split, one running left to infinity and the other back rightward to end on the zero.
Design on it. The closed-loop polynomial is s2 + (4 + K)s + (100 + 5K), so zeta = (4+K)/(2 sqrt(100+5K)). Setting that to 0.6 gives K2 + 0.8K - 128 = 0 and K = 10.92, putting the poles at -7.46 +/- j9.95 with wn = 12.43 rad/s. Table 3 says 9.5 percent overshoot.
The simulated overshoot is 75.7 percent.
Why the prediction failed, and the second run that fixes it
Nothing is wrong with the locus or with the gain. The poles really are at -7.46 +/- j9.95 with a damping ratio of exactly 0.600. What the locus never showed is that the closed-loop transfer function also has a zero, at -5, inherited from the controller. Table 3 was derived for a second-order system with no zeros, and a zero that close to the poles adds a large derivative term to the response.
The useful measure is the ratio of the zero's distance from the origin to the real part of the poles: 5/7.46 = 0.67. Below about 4, the zero matters; below 1 it dominates. Move the derivative zero out to -20 and repeat: zeta = 0.6 now needs K2 - 20.8K - 128 = 0, so K = 25.77, poles at -14.89 +/- j19.84, and the ratio becomes 20/14.89 = 1.34. Simulated overshoot: 26.1 percent. Still above 9.5, still explained by the zero, but a third of what it was.
| Design | K | Poles | zeta | Predicted overshoot | Actual | ts (2 percent) |
|---|---|---|---|---|---|---|
| Open loop | 0 | -2 +/- j9.80 | 0.20 | 52.7 percent | 52.7 percent | 1.96 s |
| PD, zero at -5 | 10.92 | -7.46 +/- j9.95 | 0.60 | 9.5 percent | 75.7 percent | 0.60 s |
| PD, zero at -20 | 25.77 | -14.89 +/- j19.84 | 0.60 | 9.5 percent | 26.1 percent | 0.28 s |
The upshot: root locus places poles. It does not place zeros, and the closed-loop zeros come from wherever the controller and the plant put them. Any design read off a locus has to be checked against a simulated or measured step response, and if the two disagree, look for a zero before you doubt the arithmetic.
Common misconceptions
- "The locus shows the closed-loop response." It shows closed-loop pole locations as a function of one gain. The response also depends on the closed-loop zeros, which the locus does not draw, as the 9.5 against 75.7 percent above demonstrates.
- "Branches always move left as gain rises." They move away from poles and toward zeros. With three poles and no zeros, as in the motor, two branches move steadily rightward once they break away, which is exactly why that loop eventually goes unstable.
- "A breakaway point is where the response changes from overdamped to underdamped." It is where the closed-loop poles stop being real, which is that change, but only for the poles on those two branches. The third pole of the motor loop is real at every gain, and the response is a mixture.
- "Cancelling a plant pole with a controller zero removes it." It removes it from the loop transfer function, not from the physical system. Any mismatch leaves a nearly cancelled pole-zero pair, and if that pole was unstable, the closed loop is unstable no matter how good the cancellation looked on paper. Never cancel a right half-plane pole.
The takeaway
The angle condition draws the locus and the magnitude condition labels it with gains. Six rules cover the sketching: branches from poles to zeros or infinity, real-axis segments by odd count to the right, asymptote angles and centroid, breakaway from d/ds[1/G] = 0, axis crossings from Routh, and departure angles from the angle condition applied at a pole.
On the motor axis those rules gave a breakaway at -0.945 at K = 4.51, asymptotes from -4 at 60, 180 and 300 degrees, an axis crossing at K = 120 and 4.472 rad/s, and a design gain of K = 14.35 for a damping ratio of 0.5, whose predicted 16.3 percent overshoot came out as 16.1 percent in simulation. On the spring with derivative control the rules gave a circle of radius 10.25 centred on the zero, a break-in at -15.25 and a departure angle of 163 degrees, and a design at K = 10.92 whose predicted 9.5 percent overshoot came out as 75.7 percent, because of a closed-loop zero the locus never drew.
You now have a controller with a derivative term and a reason to be careful with it. The next lesson adds the integral term, tunes all three on the oven by the oldest recipe in the field, and finds out how good that recipe actually is.
Sources
- Cheever, E. (n.d.). Root locus. Linear Physical Systems Analysis, Swarthmore College. lpsa.swarthmore.edu
- Wikipedia contributors. (n.d.). Root locus. Wikipedia. en.wikipedia.org
- Evans, W. R. (1948). Graphical analysis of control systems. Transactions of the AIEE, 67(1), 547-551.
- Nise, N. S. (2019). Control systems engineering (8th ed.), Chapters 8 and 9. Wiley.
- Ogata, K. (2010). Modern control engineering (5th ed.), Chapter 6. Prentice Hall.
- Key terms
- Angle condition
- The angle of G(s) equals 180 degrees plus multiples of 360; it contains no gain and therefore defines the entire locus on its own.
- Magnitude condition
- K = 1/|G(s)|, which labels each point of the locus with the gain that places a closed-loop pole there.
- Asymptote centroid
- (sum of poles minus sum of zeros)/(n - m), the point from which the branches heading to infinity appear to radiate.
- Breakaway point
- A real-axis point where branches leave the axis into the complex plane, found by solving d/ds[1/G(s)] = 0 and keeping roots on the locus.
- Break-in point
- The mirror case, where complex branches rejoin the real axis; on the spring example it is at -15.25 with K = 26.5.
- Departure angle
- The direction a branch leaves a complex pole, computed as 180 plus zero angles minus the angles from the remaining poles.
- Constant damping line
- A ray from the origin at arccos(zeta) from the negative real axis; where the locus crosses it, the design gain gives that damping ratio.
- Closed-loop zero
- A zero of the closed-loop transfer function, often inherited from the controller; it changes the response without appearing anywhere on the locus.
Tuning the Oven by the 1942 Rules, and Then Doing Better
- Identify a first-order-plus-dead-time model from an open-loop step test and from a sustained-oscillation test.
- Compute Ziegler-Nichols PID settings by both methods and predict the resulting closed-loop behaviour.
- Compare that tuning with a model-based rule on the same plant, and explain why the aggressive tuning wins on load rejection and loses on setpoint tracking.
Put the oven controller in manual. Step the heater from 40 percent to 60 percent, so an extra 40 W goes into the block, and start a stopwatch. For fifteen seconds the thermocouple does not move. Then it climbs, and after about twenty minutes it has settled 20 degrees higher. Lay a ruler along the steepest part of that curve and extend it in both directions: it meets the old temperature at t = 15 s and the new one at t = 265 s.
Those three readings are all a 1942 tuning rule needs. This lesson runs that rule end to end, watches the result overshoot by 83 percent, works out exactly why, and then tunes the same plant a second way that overshoots by 15. Both tunings are defensible, and the reason they differ is not that one is wrong.
Step one: read the model off the curve
The three numbers from the reaction curve are the parameters of a first-order-plus-dead-time model.
- Static gain
K = (change in output)/(change in input) = 20 K / 40 W = 0.5K/W. - Dead time
L = 15s, where the tangent meets the starting value. - Time constant
T = 265 - 15 = 250s, the tangent's run from start to final value.
So G(s) = 0.5 e-15s/(250s + 1), the oven of Lesson 1, recovered from a measurement rather than from physics. The ratio L/T = 0.06 is what tuning rules key on: it says how much of the plant's slowness is delay, and delay is the part feedback cannot help with.
Step two: the three terms and what each one answers
A PID controller in the standard, or ideal, form is
u(t) = K_p [ e(t) + (1/T_i) integral of e dt + T_d de/dt ].
Each term answers a different question about the error. The proportional term asks how big is it now. The integral term asks how long has it been wrong, and it is the only term that can drive the error to exactly zero, as Lesson 5 showed. The derivative term asks which way is it going, and its contribution is K_p T_d times the current slope, which is a linear extrapolation Td seconds ahead.
Two notations coexist and cause endless confusion. The standard form uses K_p, T_i, T_d in seconds; the parallel form uses K_p, K_i, K_d with K_i = K_p/T_i and K_d = K_p T_d. Always check which one a controller's front panel is asking for, because entering 30 where 1/30 is expected is a common and expensive mistake.
Step three: the Ziegler-Nichols reaction-curve rule
John Ziegler and Nathaniel Nichols, both at the Taylor Instrument Companies in Rochester, published two tuning tables in 1942. The first uses the reaction curve you just measured.
| Controller | Kp | Ti | Td | Our oven |
|---|---|---|---|---|
| P | T/(KL) | - | - | Kp = 33.3 |
| PI | 0.9T/(KL) | L/0.3 | - | 30, 50 s |
| PID | 1.2T/(KL) | 2L | 0.5L | 40, 30 s, 7.5 s |
Compute the PID row: K_p = 1.2 x 250/(0.5 x 15) = 300/7.5 = 40, T_i = 30 s, T_d = 7.5 s. In parallel form that is K_i = 40/30 = 1.33 and K_d = 40 x 7.5 = 300.
Load it and step the setpoint by 1 degree. The block overshoots to 1.833 degrees, peaks 39 seconds in, dips back to 0.889, and takes 151 seconds to stay inside 2 percent. That is an 83.3 percent overshoot, and it is not a mistake in the arithmetic.
Step four: why the first tuning overshoots
Two reasons, and both are about what the rule was designed to do.
First, Ziegler and Nichols were tuning for quarter-amplitude decay in response to a load disturbance, not for a clean setpoint change. In 1942 a process controller's setpoint was moved by an operator turning a dial slowly; step changes in setpoint were not the normal duty. The successive peaks in our simulation, 0.833 above target then 0.111 below, are a decay ratio of about 0.13, which is in the family the rule aims at. Judged against its own target, the tuning worked.
Second, the rule is aggressive. The proportional term alone is 40, and Step five shows that sustained oscillation begins at 53.6. That leaves only 34 percent of gain headroom on the proportional path before the loop rings forever, which is a thin margin for a plant whose delay you fitted with a ruler.
Remember: a tuning rule is an answer to a question somebody else asked. Before adopting one, find out which closed-loop behaviour it was optimising, and whether that is the behaviour you want.
Step five: the closed-loop method, as a cross-check
The second Ziegler-Nichols method needs no model at all. Switch off integral and derivative action, raise the proportional gain until the loop oscillates with constant amplitude, and record two numbers: the ultimate gain Ku and the oscillation period Pu.
You can predict them for this plant. Sustained oscillation happens where the loop phase reaches -180 degrees, so arctan(250w) + 15w = pi. Solving numerically gives w_u = 0.1072 rad/s, hence P_u = 2 pi/0.1072 = 58.6 s. The gain that makes the magnitude exactly 1 there is K_u = 1/|G(j w_u)| = 26.82/0.5 = 53.6.
| Controller | Kp | Ti | Td | Our oven |
|---|---|---|---|---|
| P | 0.5Ku | - | - | 26.8 |
| PI | 0.45Ku | Pu/1.2 | - | 24.1, 48.8 s |
| PID | 0.6Ku | 0.5Pu | 0.125Pu | 32.2, 29.3 s, 7.33 s |
Two completely different experiments, one on the open loop and one on the closed loop, produced 40, 30, 7.5 and 32.2, 29.3, 7.33. The integral and derivative times agree to within 2 percent and the gains to within 20. That agreement is worth doing as a sanity check on the model: if the two methods disagree badly, the reaction curve was misread or the plant is not really first order plus dead time. Simulated, the ultimate-method PID overshoots 66.1 percent, a little gentler than the reaction-curve version and still far from quiet.
Step six: a better tuning, and the price of it
Sixty years of practice later, model-based rules do better on setpoint changes by being explicit about the closed-loop speed you are asking for. Skogestad's SIMC rule for a first-order-plus-dead-time plant sets
K_p = T/(K(tau_c + L)) and T_i = min(T, 4(tau_c + L)),
where tauc is the closed-loop time constant you choose. The natural default is tau_c = L: ask for a closed loop as fast as the delay allows and no faster. For the oven that gives K_p = 250/(0.5 x 30) = 16.67 and T_i = min(250, 120) = 120 s.
| Tuning | Kp | Ti | Td | Setpoint overshoot | Settling (2 percent) | Peak error after a 0.2 load step |
|---|---|---|---|---|---|---|
| ZN reaction curve, PID | 40 | 30 s | 7.5 s | 83.3 percent | 151 s | 0.0063 |
| ZN ultimate, PID | 32.2 | 29.3 s | 7.33 s | 66.1 percent | 153 s | not computed |
| ZN reaction curve, PI | 30 | 50 s | - | 79.1 percent | 232 s | not computed |
| SIMC PI, tauc = L | 16.67 | 120 s | - | 15.3 percent | 255 s | 0.0107 |
| SIMC PI, tauc = 2L | 11.11 | 180 s | - | 4.1 percent | 303 s | 0.0136 |
Read the last two columns together, because that is where the honesty lives. SIMC at tau_c = L cuts the setpoint overshoot from 83 percent to 15, and pays for it by letting a load disturbance push the temperature 70 percent further off target before recovering. Ziegler-Nichols is not a worse tuning; it is a tuning for the job Ziegler and Nichols had, which was rejecting load changes on a distillation column, not chasing setpoints.
If you want both, the answer is not a different tuning but a different structure. Tune for load rejection, then soften what the setpoint does to the controller by applying the proportional term to a weighted setpoint and the derivative term to the measurement alone. That is a two-degree-of-freedom controller, and Lesson 9 builds one while fixing three other things.
Common misconceptions
- "Derivative action predicts the future." It extrapolates the current slope linearly, Td seconds ahead. On a real signal that slope is dominated by noise, and the extrapolation is then a prediction of the noise. There is no model inside a derivative term and nothing that could anticipate anything.
- "Ziegler-Nichols gives the right settings." It gives 1942 settings for quarter-amplitude load rejection with a pneumatic controller. It is a fine starting point and a poor destination, and the authors said as much.
- "Shorter integral time is always better, since offset vanishes faster." Integral action adds phase lag, so reducing Ti eats phase margin. Compare 30 s against 120 s in the table: the fast integrator settles sooner but overshoots five times as far.
- "The ultimate-gain test is harmless." It deliberately drives a real plant to sustained oscillation, which for a reactor, a compressor or an aircraft is unacceptable. The relay-feedback method of Astrom and Hagglund gets Ku and Pu from a small controlled limit cycle instead, which is why almost every self-tuning industrial controller uses it.
Summing up
The procedure is fixed. Measure the reaction curve and read K, L and T off it. Choose a tuning rule and know what it optimises. Compute the settings. Simulate or test. Adjust for the behaviour you actually want.
On the oven the readings were K = 0.5 K/W, L = 15 s, T = 250 s. Ziegler-Nichols by reaction curve gave 40, 30 s and 7.5 s, and 83.3 percent overshoot. The closed-loop method independently gave 32.2, 29.3 s and 7.33 s from K_u = 53.6 and P_u = 58.6 s, agreeing closely enough to validate the model. SIMC with tau_c = L gave 16.67 and 120 s, and 15.3 percent overshoot, at the cost of 70 percent worse load rejection.
Bottom line: there is no best tuning, only a tuning matched to a disturbance you expect and a response you can live with. Say which before you compute.
Every controller in this lesson was simulated with unlimited heater power, a perfectly noiseless thermocouple and a setpoint that never moved abruptly. The next lesson removes all three assumptions, and watches what breaks.
Sources
- Wikipedia contributors. (n.d.). Ziegler-Nichols method. Wikipedia. en.wikipedia.org
- Woolf, P. (n.d.). Proportional-integral-derivative (PID) control. Chemical process dynamics and controls. Engineering LibreTexts. eng.libretexts.org
- Ziegler, J. G., and Nichols, N. B. (1942). Optimum settings for automatic controllers. Transactions of the ASME, 64, 759-768.
- Skogestad, S. (2003). Simple analytic rules for model reduction and PID controller tuning. Journal of Process Control, 13(4), 291-309.
- Astrom, K. J., and Hagglund, T. (2006). Advanced PID control, Chapters 6 and 7. ISA.
- Key terms
- Reaction curve
- The open-loop step response of a process, from which the static gain, dead time and time constant of a first-order-plus-dead-time model are read.
- Dead time ratio L/T
- The fraction of a plant's slowness that is pure delay; 0.06 for the oven, and the number every process tuning rule keys on.
- Standard PID form
- u = Kp[e + (1/Ti) integral e + Td de/dt], with Ti and Td in seconds; the parallel form uses Ki = Kp/Ti and Kd = Kp Td.
- Ultimate gain
- Ku, the proportional gain at which the closed loop oscillates with constant amplitude; 53.6 for the oven.
- Ultimate period
- Pu, the period of that oscillation; 58.6 s for the oven, from an ultimate frequency of 0.1072 rad/s.
- Quarter-amplitude decay
- The closed-loop behaviour Ziegler-Nichols was designed to produce under load disturbances, each oscillation peak about a quarter of the one before.
- SIMC rule
- Skogestad's model-based tuning: Kp = T/(K(tauc + L)) and Ti = min(T, 4(tauc + L)), with tauc the closed-loop time constant you choose.
- Relay feedback test
- Replacing the controller with an on-off relay to induce a small controlled limit cycle, giving Ku and Pu without driving the plant to sustained oscillation.
It Worked in Simulation: Windup, Kick, and a Derivative Full of Noise
- Diagnose integrator windup from a saturated actuator and quantify the overshoot it adds.
- Implement conditional integration and back-calculation anti-windup, and compare their recovery.
- Explain derivative kick and derivative noise amplification numerically, and fix both with derivative-on-measurement, a filter and setpoint weighting.
The tuning from Lesson 8 went onto the real oven on a Monday morning. Setpoint 50 degrees above ambient, cold start. The block passed 50 degrees after about five minutes, kept going, and peaked at 80.1 degrees before coming back. Fourteen minutes later it was finally inside two percent of target. In simulation the same controller had overshot 83 percent on a one-degree step; on the plant it overshot 60 percent of a fifty-degree step and took five times as long to settle.
Nothing changed in the controller. What changed is that the real heater cannot deliver more than 200 watts, the real thermocouple has noise on it, and the real setpoint was moved in one jump by a person. This lesson takes those three differences one at a time, finds which part of the controller each one breaks, and fixes it.
Fault one: the integrator kept counting while the heater was flat out
At the instant of the step, the error is 50 degrees. With the SIMC gain of 16.67 W per degree, the proportional term alone asks for 833 watts. Including the integral term, the peak demand in simulation reaches 938 W. The heater delivers 200. For the next 297 seconds the controller is asking for something it cannot have, and the actuator sits pinned at its limit.
The proportional term does not mind. It computes a number, the number is clipped, and when the error falls the number falls with it. The integral term does mind, because it is still adding e dt/T_i every step, and the error is large. By the time the block reaches 50 degrees the integrator holds an enormous stored value, and the only way to discharge it is to run a negative error for a long time. So the temperature must go well past the setpoint and stay past it until the integral unwinds. That is integral windup.
The numbers, all for the same 50 degree cold start with a 200 W heater:
| Controller | Peak temperature | Overshoot | Time saturated | Settling (2 percent) |
|---|---|---|---|---|
| SIMC PI, unlimited heater | 57.7 degrees | 15.3 percent | 0 s | 255 s |
| SIMC PI, 200 W, no anti-windup | 70.3 degrees | 40.6 percent | 297 s | 643 s |
| ZN PID, 200 W, no anti-windup | 80.1 degrees | 60.3 percent | 773 s | 846 s |
What matters here: windup is not a tuning problem and no choice of Kp, Ti and Td removes it. It is a structural problem caused by a controller that does not know its actuator has a limit. The fix is to tell it.
Two ways to tell it
Conditional integration is the simpler: compute the unclipped demand v, clip it to get u, and if u differs from v, skip the integral update this step. The integrator freezes at whatever it held when saturation began and resumes the moment the demand comes back inside the limits.
Back-calculation is the better behaved: instead of freezing, feed the saturation error back into the integrator through a tracking time constant Tt,
dI/dt = e/T_i + (u - v)/(K_p T_t).
When the actuator is not saturated, u = v and the extra term vanishes. When it is, the term is negative and drags the integrator down toward the value that would exactly produce the saturated output. Astrom and Hagglund recommend T_t somewhere between Td and Ti, geometric mean if you want a rule.
| Anti-windup on the SIMC PI, 200 W heater | Peak | Overshoot | Time saturated | Settling |
|---|---|---|---|---|
| None | 70.3 degrees | 40.6 percent | 297 s | 643 s |
| Conditional integration | 50.0 degrees | 0.0 percent | 135 s | 319 s |
| Back-calculation, Tt = 120 s | 53.2 degrees | 6.4 percent | 175 s | 339 s |
| Back-calculation, Tt = 30 s | 50.0 degrees | 0.0 percent | 95 s | 395 s |
The aggressive Ziegler-Nichols PID benefits even more dramatically: with conditional integration its overshoot falls from 60.3 percent to 1.6 percent and its settling time from 846 s to 184 s. It is now the fastest controller in this lesson. The tuning that looked reckless was mostly being punished for a fault that had nothing to do with tuning.
Fault two: the derivative term saw a vertical wall
A person typed 50 into the setpoint field. To the controller, the reference jumped from 0 to 50 in one sample. If the derivative term is computed on the error, de/dt for that one sample is 50/h, and with a 0.1 second sample the derivative contribution is
K_p T_d (50/0.1) = 40 x 7.5 x 500 = 150,000 watts.
This is derivative kick. On a heater it is merely clipped and wasted. On a valve, a servo amplifier or an aircraft actuator it is a violent transient that wears mechanisms and, on a motor drive, trips overcurrent protection.
The fix is one line. Since a setpoint step has no physical meaning as a rate of change of anything, compute the derivative from the measurement rather than the error:
D = -K_p T_d dy/dt instead of +K_p T_d de/dt.
The two are identical whenever the setpoint is constant, which is most of the time, and they differ only at the instant of a setpoint change, which is exactly the instant that caused the trouble. Derivative on measurement is the default in essentially every industrial controller sold since the 1980s.
Fault three: the derivative amplified the thermocouple
A pure derivative has a magnitude that rises without bound with frequency, so it multiplies high-frequency noise without limit. Take a thermocouple with 0.05 degrees of RMS noise and a controller sampling at 0.1 s. A plain backward difference gives a derivative gain of K_p T_d/h = 40 x 7.5/0.1 = 3000 watts per degree, so 0.05 degrees of noise becomes 150 watts RMS of heater dither on a plant whose steady demand is 100 W and whose heater tops out at 200. The actuator would spend its life slamming between limits, and the block would not notice, because thermal mass filters it out. The heater relay would notice, for about a week.
The remedy is to make the derivative proper by adding a pole:
D(s) = K_p T_d s/(1 + (T_d/N) s),
with N typically between 8 and 20. At low frequency this is the derivative you wanted. Above N/T_d its gain flattens at K_p N. With N = 10 the noise gain becomes 40 x 10 = 400 W per degree, so the dither falls from 150 W RMS to 20 W RMS, and no design decision anywhere else changed.
Choosing N is a real trade and not a formality. Small N filters more noise and destroys more of the phase lead you added the derivative to get; large N keeps the lead and passes the noise. If you find yourself needing N below about 5 to make the noise tolerable, the honest conclusion is that this loop should not have derivative action at all, which is why most process loops in service are PI.
One more improvement: stop asking for the impossible
Look again at the peak demand column. With derivative on measurement, anti-windup on, and a 50 degree setpoint step, the Ziegler-Nichols controller still asks for 2000 watts at the first instant, because the proportional term sees the full 50 degree error. Setpoint weighting softens that by applying the proportional term to a weighted setpoint:
u = K_p(b r - y) + integral term + derivative term, with 0 <= b <= 1.
The integral term still uses the true error, so the steady state is untouched, and only the transient response to a setpoint change is altered. Feedback against disturbances is completely unaffected, since a disturbance does not move r.
| Setpoint weight b | Peak demand | Overshoot | Settling |
|---|---|---|---|
| 1.0 (conventional) | 2000 W | 1.6 percent | 184 s |
| 0.5 | 1000 W | 1.6 percent | 184 s |
| 0.0 | 201 W | 1.6 percent | 186 s |
Peak demand fell by a factor of ten, and the closed-loop behaviour that anyone measures did not move. That is what a second degree of freedom buys: tune the feedback path for the disturbance rejection you need, then shape the setpoint path separately for the response you want.
Common misconceptions
- "Windup only matters if the actuator saturates for a long time." The integrator accumulates from the first saturated sample, and on a cold start it accumulates for minutes. But even a two-second saturation on a fast servo puts a stored value in the integrator that has to be paid back, and the payback is always an overshoot.
- "A better tuning would avoid saturation." A 50 degree step on a plant with 0.5 K/W static gain requires 100 W in steady state and would need 833 W to close the error in one time constant. No gain avoids saturation; a lower gain simply saturates later and for longer.
- "Derivative action is too noisy to use." Unfiltered derivative action is. Filtered at N = 10 with derivative on measurement it is usable on most mechanical loops, and it is what allows the aggressive Ziegler-Nichols PID above to settle in 184 s against the PI controller's 319.
- "Setpoint weighting is just a slower setpoint ramp." A ramp changes the reference signal; setpoint weighting changes the controller structure. With b = 0 the loop still reacts to a step immediately through its integral and derivative paths, and it still rejects disturbances at full gain, neither of which a ramped setpoint would give you.
Pulling it together
Three faults, three fixes, and none of them a tuning constant. A saturating actuator winds up the integrator, turning 15.3 percent overshoot into 40.6 and 60.3 percent into a fourteen minute recovery; conditional integration or back-calculation removes it, taking the Ziegler-Nichols PID down to 1.6 percent overshoot and 184 seconds. A stepped setpoint differentiated on the error demands 150 kW for one sample; computing the derivative on the measurement instead removes the kick entirely without changing anything else. An unfiltered derivative multiplies 0.05 degrees of sensor noise into 150 W of actuator dither; a first-order filter with N = 10 cuts that to 20 W.
The core of it: every one of these is a mismatch between the ideal controller in the equations and the physical system it is wired to. Before retuning a loop that misbehaves, check the actuator limits, check where the derivative is taken, and look at the raw sensor signal.
Module 3 has designed and debugged a controller entirely in the time domain and the s-plane. Module 4 starts again in the frequency domain, where the delay that has been quietly setting the oven's limits becomes something you can read off a graph.
Sources
- Wikipedia contributors. (n.d.). Integral windup. Wikipedia. en.wikipedia.org
- Wikipedia contributors. (n.d.). PID controller. Wikipedia. en.wikipedia.org
- Astrom, K. J., and Hagglund, T. (2006). Advanced PID control, Chapter 3 (Actuator saturation and setpoint weighting). ISA.
- Astrom, K. J., and Murray, R. M. (2021). Feedback systems: An introduction for scientists and engineers (2nd ed.), Chapter 11. Princeton University Press.
- Franklin, G. F., Powell, J. D., and Emami-Naeini, A. (2019). Feedback control of dynamic systems (8th ed.), Section 4.3. Pearson.
- Key terms
- Integral windup
- Continued accumulation in the integral term while the actuator is saturated, which must later be unwound by a sustained error of opposite sign.
- Conditional integration
- Anti-windup that freezes the integrator whenever the clipped and unclipped demands differ, resuming when the actuator comes off its limit.
- Back-calculation
- Anti-windup that feeds (u - v)/(Kp Tt) into the integrator, driving it toward the value that would exactly produce the saturated output.
- Tracking time constant
- Tt in back-calculation; small values unwind the integrator faster, and Astrom and Hagglund suggest a value between Td and Ti.
- Derivative kick
- The impulse in control effort caused by differentiating a stepped setpoint; 150 kW for one sample on the oven with Td = 7.5 s and h = 0.1 s.
- Derivative on measurement
- Computing the derivative term from -dy/dt rather than de/dt, which is identical for a constant setpoint and removes the kick entirely.
- Derivative filter
- The pole in Kp Td s/(1 + (Td/N)s) that caps the high-frequency gain at Kp N; N between 8 and 20 trades noise rejection against lost phase lead.
- Setpoint weighting
- Applying the proportional term to b r - y with b between 0 and 1, which shapes the setpoint response without touching disturbance rejection or steady state.
Module 4: Frequency Response
Draw the loop as a function of frequency. Bode magnitude and phase built from straight-line asymptotes, gain and phase margins computed on the motor and the oven, the Nyquist criterion stated with its encirclement count and applied to a case Bode cannot handle, and lead and lag compensators designed on the plot to a written specification.
Four Straight Lines and Two Margins: Bode Plots You Draw by Hand
- Construct straight-line magnitude and phase asymptotes for constants, integrators, real poles and zeros, complex pairs and pure delays.
- Draw the Bode plot of the motor plant by hand and correct it at the corners.
- Compute gain and phase margins for the motor position loop and for four oven tunings, and connect the margins to the overshoots measured in Lesson 8.
Hendrik Bode's contribution was not a new theory. It was a change of axes. Plot magnitude in decibels against frequency on a logarithmic scale, and every factor of a transfer function turns into a straight line, because the logarithm of a product is a sum of logarithms. A cascade of six elements becomes six straight lines added together, and you can draw the result with a ruler before you have found a single pole.
This lesson is that procedure, run end to end on the motor, and then the two numbers it exists to produce.
Step one: the six building blocks
Every transfer function in this course is a product of these, so learn each one's magnitude slope and phase and you can draw anything.
| Factor | Magnitude asymptote | Phase |
|---|---|---|
| Constant K | Flat at 20 log|K| dB | 0 degrees, or 180 if K is negative |
| Integrator 1/s | -20 dB/decade, passing 0 dB at w = 1 | -90 degrees at every frequency |
| Real pole 1/(1 + s/a) | 0 dB below a, then -20 dB/decade | 0 to -90, passing -45 at w = a |
| Real zero (1 + s/a) | 0 dB below a, then +20 dB/decade | 0 to +90, passing +45 at w = a |
| Complex pair, damping zeta | 0 dB below wn, then -40 dB/decade | 0 to -180, passing -90 at wn |
| Delay e-Ls | Exactly 0 dB everywhere | -Lw radians, without limit |
Three corrections turn asymptotes into the real curve. A single real pole is 3 dB below its corner, not on it. A complex pair peaks at 1/(2 zeta) near wn, which for zeta = 0.2 is a factor of 2.5, or 8 dB. And the straight-line phase approximation, which ramps from a decade below the corner to a decade above, is off by about 6 degrees at its worst.
The last row is the one that decides this course. A delay costs nothing in magnitude and unbounded phase. At 0.1 rad/s the oven's 15 second delay costs 1.5 radians, which is 86 degrees, more than a whole extra pole would.
Step two: draw the motor plant
Put G(s) = 2/((s+2)(s+10)) into the form where every factor reads as one row of the table. Divide each factor by its own corner frequency:
G(s) = 2/(2 x 10 x (1 + s/2)(1 + s/10)) = 0.1/((1 + s/2)(1 + s/10)).
Now read it off. The constant 0.1 is 20 log(0.1) = -20 dB. There are corners at 2 and 10 rad/s, both poles. So the magnitude asymptote is flat at -20 dB up to 2 rad/s, falls at 20 dB per decade from 2 to 10, and falls at 40 dB per decade above 10.
| w (rad/s) | Asymptote (dB) | Exact (dB) | Exact phase |
|---|---|---|---|
| 0.2 | -20.0 | -20.0 | -6.9 degrees |
| 2 | -20.0 | -23.2 | -56.3 degrees |
| 10 | -34.0 | -37.2 | -123.7 degrees |
| 20 | -40.0 | -46.2 | -147.9 degrees |
| 100 | -68.0 | -74.1 | -172.6 degrees |
Check one entry by hand so you trust the rest. At w = 10, |G| = 0.1/(sqrt(1 + 25) x sqrt(1 + 1)) = 0.1/7.211 = 0.01387, which is 20 log(0.01387) = -37.2 dB, and the phase is -arctan(5) - arctan(1) = -78.7 - 45 = -123.7 degrees. The asymptote said -34.0, so the error is 3.2 dB, which is the two corner corrections partly overlapping. Away from the corners the straight lines are excellent.
Key idea: the phase plot is not independent of the magnitude plot. For a minimum-phase system, one determines the other through Bode's gain-phase relation, and the practical shorthand is that a slope of -20 dB/decade corresponds to about -90 degrees and a slope of -40 corresponds to about -180. That shorthand is the whole of loop shaping, and Lesson 12 uses it constantly.
Step three: the two margins
Instability means the loop reproduces its own signal exactly after one trip around: magnitude 1 and phase -180 degrees at the same frequency. The margins measure how far a loop is from that coincidence, in each of the two directions separately.
- Gain crossover wgc: where
|L| = 1, or 0 dB. The phase margin is180 + angle of L(j w_gc), the extra phase lag the loop could absorb before going unstable. - Phase crossover wpc: where the phase is exactly -180 degrees. The gain margin is
1/|L(j w_pc)|, the factor by which the gain could rise before going unstable.
Take the motor position loop, L(s) = 2K/(s(s+2)(s+10)), at the design gain K = 14.35 from Lesson 7. Written in Bode form it is 0.1K/(s(1+s/2)(1+s/10)).
The phase crossover is available in closed form. The phase is -90 - arctan(w/2) - arctan(w/10), and this reaches -180 when arctan(w/2) + arctan(w/10) = 90 degrees, which happens when (w/2)(w/10) = 1, so wpc = sqrt(20) = 4.472 rad/s. That is the number Routh produced in Lesson 6 and the root locus produced in Lesson 7, arrived at a third way.
The magnitude there is 1.435/(4.472 x 2.449 x 1.095) = 0.1196, so the gain margin is 1/0.1196 = 8.36, or 18.4 dB. And 8.36 is exactly 120/14.35: since the loop is stable up to K = 120, the gain margin of any proportional design is just the ratio of the ultimate gain to the design gain, and you did not need the plot to know it.
Gain crossover needs a numerical solve: |L| = 1 at wgc = 1.217 rad/s. The phase there is -90 - arctan(0.608) - arctan(0.122) = -128.3 degrees, so the phase margin is 51.7 degrees.
| K | wgc | Phase margin | wpc | Gain margin | Closed-loop zeta |
|---|---|---|---|---|---|
| 14.35 | 1.217 rad/s | 51.7 degrees | 4.472 rad/s | 18.4 dB | 0.50 |
| 60 | 3.104 rad/s | 15.6 degrees | 4.472 rad/s | 6.0 dB | 0.17 |
| 120 | 4.472 rad/s | 0 degrees | 4.472 rad/s | 0 dB | 0 |
Notice the last two columns of the first row. A phase margin of 51.7 degrees and a damping ratio of 0.50: the rule of thumb zeta = PM/100 is exact to two figures here, and it is the single most useful approximation in classical design. Notice also that wpc never moves, because changing a gain shifts the magnitude plot vertically and leaves the phase plot alone.
Step four: reading Lesson 8 in the frequency domain
The four oven tunings can now be explained rather than merely observed. Each row is the same plant with a different controller.
| Tuning | wgc (rad/s) | Phase margin | Gain margin | Step overshoot from Lesson 8 |
|---|---|---|---|---|
| ZN PI | 0.0628 | 22.0 degrees | 3.7 dB | 79.1 percent |
| ZN PID | 0.0855 | 32.6 degrees | 2.4 dB | 83.3 percent |
| SIMC PI, tauc = L | 0.0341 | 53.7 degrees | 9.7 dB | 15.3 percent |
| SIMC PI, tauc = 2L | 0.0225 | 66.9 degrees | 13.4 dB | 4.1 percent |
Both Ziegler-Nichols rows have a gain margin under 4 dB, meaning a 55 percent gain increase would make the plant oscillate. A fouled heater element, a change in insulation, a batch of thermocouples with a different sheath: any of these could deliver that. The SIMC rows sit at 9.7 and 13.4 dB, comfortably inside the conventional design targets of 45 to 60 degrees of phase margin and 6 to 12 dB of gain margin.
The zeta = PM/100 rule works for the SIMC rows, predicting 13 and 6 percent overshoot against 15.3 and 4.1 measured. It fails badly on the ZN PID row, predicting 33 percent against 83 measured. Be honest about why: the rule was derived for a second-order system with no delay, and by 0.0855 rad/s the oven's delay is contributing 73 degrees of lag that no second-order model contains.
Common misconceptions
- "A large gain margin means a robust loop." Both margins can be large while the Nyquist plot passes close to the critical point at some intermediate frequency, so the loop is fragile in a direction neither margin measures. The honest single number is the peak of the sensitivity function; a peak below 2, or 6 dB, is the usual target, and it guarantees a gain margin of at least 6 dB and a phase margin of at least 29 degrees at once.
- "Phase margin is a property of the plant." It is a property of the loop at the gain you chose. The motor plant's phase crossover is fixed at 4.472 rad/s, but its phase margin ran from 51.7 to 0 degrees as the gain went from 14.35 to 120.
- "Adding a pole always helps, since it rolls off noise." It rolls off magnitude at 20 dB/decade and costs up to 90 degrees of phase, which comes straight out of the phase margin. Every element you insert has to justify its phase cost, and this is what makes lead compensation a genuine design problem rather than a lookup.
- "You cannot Bode-plot a system with dead time." You can, easily; the delay simply adds
-Lwradians of phase and nothing to the magnitude. What you cannot do is draw a delay on a root locus or write it as a finite-order transfer function, which is exactly why the frequency domain is the natural home for process control.
What to remember
Bode's change of axes turns multiplication into addition and every factor into a straight line: flat for a gain, -20 dB per decade for an integrator, a corner at each real pole or zero, -40 dB per decade above a complex pair, and nothing at all in magnitude for a delay, which pays entirely in phase. Correct 3 dB at each simple corner and 20 log(1/2 zeta) at a resonance, and the hand sketch matches the computed curve within a few dB everywhere.
On the motor plant the asymptotes gave -20 dB flat to 2 rad/s and corners at 2 and 10; the exact value at 10 rad/s was -37.2 dB against an asymptote of -34.0. On the position loop at K = 14.35 the margins came out at 51.7 degrees of phase margin at 1.217 rad/s and 18.4 dB of gain margin at 4.472 rad/s, the latter being simply 120/14.35.
The upshot: margins turned Lesson 8's four tunings from a table of overshoots into an explanation. Ziegler-Nichols sits at 22 to 33 degrees of phase margin and under 4 dB of gain margin; SIMC sits at 54 to 67 degrees and 10 to 13 dB. The rule zeta = PM/100 connects the two domains, and it fails exactly where a delay dominates.
Both margins measure distance from one point, minus one, in one direction each. The next lesson asks what that point really is, and produces a criterion that works on plants where the Bode margins do not.
Sources
- Cheever, E. (n.d.). Bode plots. Linear Physical Systems Analysis, Swarthmore College. lpsa.swarthmore.edu
- Wikipedia contributors. (n.d.). Bode plot. Wikipedia. en.wikipedia.org
- Bode, H. W. (1945). Network analysis and feedback amplifier design. Van Nostrand.
- Franklin, G. F., Powell, J. D., and Emami-Naeini, A. (2019). Feedback control of dynamic systems (8th ed.), Chapter 6. Pearson.
- Nise, N. S. (2019). Control systems engineering (8th ed.), Chapter 10. Wiley.
- Key terms
- Decade
- A factor of ten in frequency; Bode magnitude slopes are quoted in decibels per decade, and 20 dB per decade is equivalent to 6 dB per octave.
- Corner frequency
- The frequency of a pole or zero, where the asymptote changes slope by 20 dB per decade and the exact curve sits 3 dB away.
- Gain crossover frequency
- wgc, where |L| = 1; it approximates the closed-loop bandwidth and, roughly, the natural frequency of the dominant closed-loop pair.
- Phase margin
- 180 degrees plus the loop phase at gain crossover; the extra lag the loop can absorb before instability, and about 100 times the closed-loop damping ratio.
- Phase crossover frequency
- wpc, where the loop phase is -180 degrees; it does not move when only the gain changes.
- Gain margin
- The reciprocal of the loop magnitude at phase crossover; for a proportional design it equals the ultimate gain divided by the design gain.
- Gain-phase relation
- Bode's result that for a minimum-phase system the phase is determined by the magnitude slope; -20 dB per decade corresponds to about -90 degrees.
- Sensitivity peak
- The maximum of |S(jw)|; a value below 2 guarantees at least 6 dB of gain margin and 29 degrees of phase margin simultaneously.
Nyquist at Bell Labs: One Point, One Contour, One Count
- State the Nyquist stability criterion precisely, including the contour, the encirclement count and the sign convention.
- Construct the Nyquist plot of the motor position loop and use the criterion to recover the gain limit found by Routh.
- Explain why the criterion succeeds on open-loop unstable plants where Bode margins are meaningless.
By 1931 Bell Laboratories had a problem it did not understand. Harold Black's feedback amplifiers, described in Lesson 4, worked beautifully in the laboratory and sang in the field. Some installations oscillated at a few kilohertz. Others were fine. Nobody could predict which. Adding more feedback, which was supposed to make an amplifier better in every respect, sometimes made it howl.
Harry Nyquist, a Swedish-born engineer who had joined the company's research department in 1917, published the answer in the Bell System Technical Journal in January 1932, in a paper called Regeneration Theory. It runs to twenty-six pages, and its central result is one sentence long once you have the machinery. The machinery is a contour, a mapping and a count.
The one point that matters
Closed-loop poles are the roots of 1 + L(s) = 0. So everything about stability is a question about where 1 + L(s) vanishes, and equivalently about where L(s) equals -1. Nyquist's move was to stop looking for roots and start counting how many times a curve wraps around that single point.
The tool is Cauchy's argument principle: if F(s) is analytic on and inside a closed contour except for poles, and has no zeros or poles on it, then as s traverses the contour once clockwise, the image F(s) encircles the origin exactly Z - P times clockwise, where Z and P are the numbers of zeros and poles of F inside the contour.
Apply it to F(s) = 1 + L(s), with the contour taken to be the whole right half-plane: up the imaginary axis from -j infinity to +j infinity, then closed by an infinite semicircle to the right, indented by small semicircles around any poles that sit on the axis itself. Two identifications finish it:
- The zeros of
1 + Linside the contour are the unstable closed-loop poles: that is Z, and you want it to be zero. - The poles of
1 + Lare the poles of L, so P is the number of unstable open-loop poles, which you know before you start. - Encirclements of the origin by
1 + Lare encirclements of -1 byL, so you can plot L itself and watch the point -1.
The core of it: the Nyquist stability criterion is Z = N + P, where N is the number of clockwise encirclements of -1 by the Nyquist plot of L, P is the number of open-loop poles in the right half-plane, and Z is the number of closed-loop poles there. The closed loop is stable exactly when Z = 0, which means the plot must encircle -1 exactly P times counterclockwise.
Applying it to the motor axis
Take L(s) = 2K/(s(s+2)(s+10)) at the design gain K = 14.35. There are no right half-plane poles, so P = 0 and stability requires N = 0: the plot must not encircle -1 at all.
Build the plot in three pieces.
The indentation at the origin. The pole at s = 0 sits on the contour, so the contour bulges into the right half-plane around it: s = epsilon ej theta with theta running from -90 to +90 degrees. There L is approximately 0.1K/s = (0.1K/epsilon) e-j theta, an arc of enormous radius whose angle runs from +90 down to -90 degrees. So the plot opens with a giant clockwise sweep through the right half of the L-plane, from +j infinity round to -j infinity.
The positive imaginary axis. Substitute s = jw and tabulate.
| w (rad/s) | |L| | Angle | Real part | Imaginary part |
|---|---|---|---|---|
| 1.000 | 1.277 | -122.3 degrees | -0.682 | -1.080 |
| 1.217 | 1.000 | -128.3 degrees | -0.620 | -0.785 |
| 2.000 | 0.498 | -146.3 degrees | -0.414 | -0.276 |
| 4.472 | 0.120 | -180.0 degrees | -0.120 | 0 |
| 10.00 | 0.020 | -213.7 degrees | -0.017 | +0.011 |
The curve comes in from infinity in the fourth quadrant, sweeps left through the third, crosses the negative real axis at exactly -0.120, and finishes in the second quadrant approaching the origin at an angle of -270 degrees.
The negative imaginary axis gives the mirror image, because L(-jw) is the complex conjugate of L(jw) for a real system. The infinite semicircle maps to the origin, since L has more poles than zeros.
Now count. The point -1 lies to the left of the crossing at -0.120, so the closed curve does not enclose it. N = 0, P = 0, therefore Z = 0: stable.
Raise the gain. The crossing point is always at -2K/240 = -K/120, so it reaches -1 exactly when K = 120, and beyond that it sits to the left of -1. At K = 200 the crossing is at -1.667, the curve now wraps around -1 once from the upper branch and once from the lower, so N = 2 and Z = 2. Two unstable closed-loop poles: precisely what the Routh array reported in Lesson 6 and precisely the two roots at 0.264 +/- j5.65.
Why this is more than a repackaged Routh test
Three things the criterion gives that the Bode margins cannot.
It works when the plant is already unstable. Take L(s) = K/(s - 1), a plant with one right half-plane pole, so P = 1. Its Nyquist plot is a circle: at s = jw, L = K(-1 - jw)/(1 + w2), which traces a circle of radius K/2 centred at -K/2, passing through -K at w = 0 and the origin as w tends to infinity. Traversed in the direction the contour dictates, that circle encircles -1 once counterclockwise whenever K > 1, so N = -1 and Z = -1 + 1 = 0. The loop is stable for K > 1 and unstable below. Check it directly: the closed-loop pole is at s = 1 - K. Reading a phase margin here would be meaningless, and the instinct to turn the gain down would be exactly wrong.
It handles multiple crossings. A plot that crosses the negative real axis more than once has more than one candidate gain margin, and a Bode reading picks one arbitrarily. Loops of this kind can be stable only inside a band of gains, unstable both above and below it, which is why they are called conditionally stable. The encirclement count settles them without ambiguity.
It measures robustness properly. The shortest distance from the point -1 to the Nyquist curve is 1/M_s, where Ms is the peak of the sensitivity function. For the motor at K = 14.35, M_s = 1.55, so the curve never comes closer to -1 than 0.645. That single number bounds both margins at once, guaranteeing at least 6 dB and 29 degrees whenever it stays below 2, and it catches the case a pair of separate margins misses: a plot that passes close to -1 diagonally while crossing both axes far away.
Common misconceptions
- "Any encirclement of -1 means instability." Only if P = 0. The correct statement is that
Z = N + P, and an unstable plant requires counterclockwise encirclements to be stabilised. The K/(s-1) example needs exactly one. - "The Nyquist plot is just the Bode plot in polar form." The two carry the same data for
s = jwwith w positive, but the criterion also needs the conjugate branch, the indentations around axis poles, and the closure at infinity, and it needs the count of open-loop unstable poles. Those extras are exactly what makes it a theorem rather than a rule of thumb. - "Bigger margins always mean a safer loop." Gain margin measures distance along one ray and phase margin along one arc. A curve can pass within 0.2 of -1 diagonally while showing 10 dB and 50 degrees. Quote Ms as well, and the ambiguity disappears.
- "You can read stability off the plot without knowing P." You cannot. The same picture means stable for one plant and unstable for another, and the difference is a fact about the open-loop poles that no amount of staring at the curve will reveal.
Looking back
Nyquist's 1932 paper answered a question Bell Labs had been unable to answer for four years: given an amplifier, will it sing? The answer is a count. Map the boundary of the right half-plane through L(s), look at the point -1, count the clockwise encirclements as N, add the number of unstable open-loop poles P, and the sum is the number of unstable closed-loop poles.
On the motor position loop the plot came in from infinity after a clockwise sweep, crossed the negative real axis at -K/120, and returned to the origin at -270 degrees. That crossing point reaching -1 at K = 120 is the same stability boundary Routh found by arithmetic and the root locus found by geometry, and above it the count becomes 2, matching the two unstable roots exactly. On the open-loop unstable plant K/(s-1) the criterion delivered a result no margin reading could: stability requires more gain, not less.
Worth holding on to: the closest approach of the curve to -1 is 1/M_s, and quoting Ms is the honest one-number summary of how close a loop is to trouble. For the motor at its design gain it is 1.55.
The next lesson stops asking whether a loop is stable and starts reshaping one until it meets a specification written in advance.
Sources
- Wikipedia contributors. (n.d.). Nyquist stability criterion. Wikipedia. en.wikipedia.org
- Wikipedia contributors. (n.d.). Harry Nyquist. Wikipedia. en.wikipedia.org
- Nyquist, H. (1932). Regeneration theory. Bell System Technical Journal, 11(1), 126-147.
- Astrom, K. J., and Murray, R. M. (2021). Feedback systems: An introduction for scientists and engineers (2nd ed.), Chapter 10. Princeton University Press.
- Ogata, K. (2010). Modern control engineering (5th ed.), Section 7.4. Prentice Hall.
- Key terms
- Nyquist contour
- A closed path enclosing the entire right half-plane: the imaginary axis plus an infinite semicircle, indented around any poles that lie on the axis.
- Argument principle
- Cauchy's result that the image of a closed contour under F encircles the origin Z - P times, counting zeros and poles of F inside the contour.
- Encirclement count N
- The number of clockwise wraps of the Nyquist plot of L around the point -1; counterclockwise wraps count negative.
- The criterion Z = N + P
- Unstable closed-loop poles equal clockwise encirclements plus unstable open-loop poles; stability means Z = 0.
- Indentation
- The small semicircle taken into the right half-plane around a pole on the imaginary axis, which maps to a large arc on the Nyquist plot.
- Conditionally stable loop
- A loop whose plot crosses the negative real axis more than once, so it is stable only within a band of gains and unstable above and below it.
- Sensitivity peak Ms
- The maximum of |S(jw)|; its reciprocal is the shortest distance from -1 to the Nyquist curve, 0.645 for the motor at K = 14.35.
- Regeneration
- Nyquist's term for the positive feedback condition in which a loop reproduces its own signal, the phenomenon that made Bell's amplifiers sing.
A Specification in Three Lines, and the Compensators That Chase It
- Convert a written specification into numerical requirements on velocity constant, phase margin and gain crossover frequency.
- Design a lead compensator by the maximum-phase formulas and verify the resulting margins and step response.
- Design a lag compensator to raise low-frequency gain without moving crossover, and identify the slow tail it introduces.
Here is the specification, written before any design begins, as it should be.
- Accuracy. While the axis tracks a 1 rad/s slew, the position lag must not exceed 0.1 rad. From Lesson 5 that is
K_v >= 10. - Damping. Phase margin at least 45 degrees, which by the rule of thumb of Lesson 10 means a closed-loop damping ratio of about 0.45 or better.
- Speed. A step must settle within 2 percent in 3 seconds, which given
ts = 4/(zeta wn)andwnnear the gain crossover meanswgcof roughly 3 rad/s.
The plant is the motor axis, G(s) = 2/(s(s+2)(s+10)). Two proportional designs bracket the problem. At K = 14.35 the phase margin is 51.7 degrees and the settling time 4.94 s, but Kv is only 1.435. At K = 100, Kv is exactly 10 and the phase margin collapses to 3.9 degrees with a sensitivity peak of 15.7. No single gain works, which is the entire reason compensators exist.
The lead compensator, and the one formula that sizes it
A lead compensator is a zero followed by a faster pole:
C(s) = K_c (1 + s/w_z)/(1 + s/w_p), with alpha = w_p/w_z > 1.
Its phase is positive everywhere, peaking at the geometric mean of the corners:
w_m = sqrt(w_z w_p), sin(phi_max) = (alpha - 1)/(alpha + 1), and the magnitude at wm is sqrt(alpha).
| alpha | 2 | 3 | 4 | 5 | 10 | 20 | 100 |
|---|---|---|---|---|---|---|---|
| Maximum phase lead | 19.5 | 30.0 | 36.9 | 41.8 | 54.9 | 64.8 | 78.6 |
| Gain at wm, dB | 3.0 | 4.8 | 6.0 | 7.0 | 10.0 | 13.0 | 20.0 |
Read that table before designing anything. Going from alpha = 4 to alpha = 100 costs 14 dB of extra high-frequency gain, which lands directly on your sensor noise, and buys only 42 more degrees. Beyond about alpha = 10 a single section stops being worth it, and two cascaded sections of alpha = 4 each give 74 degrees for 12 dB.
Designing the lead, step by step
Step 1. Pick the crossover. Aim for w_gc = 2.5 rad/s, twice the present value.
Step 2. Find the phase deficit there. The plant phase at 2.5 rad/s is -90 - arctan(1.25) - arctan(0.25) = -155.4 degrees. For 45 degrees of margin you need -135, so the deficit is 20.4 degrees. Add 5 degrees of insurance, because inserting the lead will nudge the crossover to the right where the plant has more lag: call it 25.4 degrees.
Step 3. Size alpha. sin(25.4) = 0.4289, so alpha = 1.4289/0.5711 = 2.50 and sqrt(alpha) = 1.581.
Step 4. Place the corners. Put wm at the target crossover: w_z = 2.5/1.581 = 1.58 and w_p = 2.5 x 1.581 = 3.95. Round to 1.6 and 4.0, which are perfectly ordinary component values.
Step 5. Set the gain. The magnitude of 0.1K/(s(1+s/2)(1+s/10)) at 2.5 rad/s is 0.02424 K. Multiply by the lead's 1.581 and set equal to 1: K = 26.07.
Check it. The compensated loop has w_gc = 2.49 rad/s, phase margin 50.2 degrees, gain margin 13.9 dB, and M_s = 1.69. Simulated, the step overshoots 17.4 percent, peaks at 1.11 s and settles in 2.50 s. Speed and damping are met. Kv is 2.61, so accuracy is not.
The lag compensator, which solves the other half
A lag compensator is the same structure with the corners exchanged, w_p < w_z. Its purpose is the opposite: not to add phase where you are working, but to add gain far below where you are working, and then get out of the way.
Step 1. Set the gain purely from the accuracy requirement: K_v = 0.1K = 10, so K = 100.
Step 2. That is 100/14.35 = 6.97 times too much gain at the crossover you want to keep. So the lag must attenuate by 6.97 at high frequency, which fixes the ratio w_z/w_p = 6.97.
Step 3. Place wz about a decade below the intended crossover so its phase lag has died away by the time it matters: w_z = 0.12 rad/s, hence w_p = 0.12/6.97 = 0.01722 rad/s.
Check it. Crossover barely moves, to 1.221 rad/s, the phase margin is 46.8 degrees, the gain margin 17.9 dB, M_s = 1.62, and Kv is exactly 10. Accuracy and damping are met.
Now simulate the step, and be prepared for the number. Overshoot 25.0 percent, and settling to 2 percent takes 11.24 seconds, more than twice as long as the plain proportional design it was built on.
Where the eleven seconds came from
The lag put a pole at -0.0172 and a zero at -0.12 into the loop. Closing the loop leaves a closed-loop pole trapped between them, close to the zero but not on it, and a pole that near the origin decays with a time constant of several seconds. The transient is dominated by the fast pair, which is why the peak still arrives at 2.3 s, but the last 2 percent of the error crawls in on that slow mode. Practitioners call it the lag tail, and it is the price of using a nearly cancelling pole-zero pair to buy low-frequency gain.
Why this matters: a compensator that cancels a plant pole, or nearly cancels its own zero, does not delete the corresponding mode from the closed-loop system. It only removes it from the loop transfer function. The mode is still there, still excited by initial conditions and by disturbances, and still visible in a settling-time measurement.
Both at once, and an honest failure
Cascade them: K = 100, lead corners at 1.6 and 4.0, lag corners at 0.12 and 0.01722. That is a lead-lag compensator, and it is the natural conclusion.
| Design | Kv | wgc | PM | GM | Ms | Overshoot | ts (2 percent) |
|---|---|---|---|---|---|---|---|
| Proportional, K = 14.35 | 1.44 | 1.22 | 51.7 | 18.4 dB | 1.55 | 16.1 percent | 4.94 s |
| Proportional, K = 100 | 10 | 4.08 | 3.9 | 1.6 dB | 15.7 | unusable | unusable |
| Lead, K = 26.07 | 2.61 | 2.49 | 50.2 | 13.9 dB | 1.69 | 17.4 percent | 2.50 s |
| Lag, K = 100 | 10 | 1.22 | 46.8 | 17.9 dB | 1.62 | 25.0 percent | 11.24 s |
| Lead-lag, lag zero 0.12 | 10 | 1.46 | 63.8 | 18.8 dB | 1.38 | 7.0 percent | 11.47 s |
| Lead-lag, lag zero 0.5 | 10 | 1.53 | 51.3 | 17.8 dB | 1.48 | 23.7 percent | 5.55 s |
| Lead-lag, lag zero 0.8 | 10 | 1.62 | 42.9 | 16.9 dB | 1.61 | 34.1 percent | 3.62 s |
Read the last three rows as one experiment. Sliding the lag section upward shortens the tail from 11.47 s to 3.62 s, and pays for it in phase margin, 63.8 degrees down to 42.9, and in overshoot, 7 percent up to 34. Nothing in that sweep meets all three original requirements at once. The 3 second settling target and the demand for a sevenfold increase in low-frequency gain are pulling against each other, and no placement of two corner frequencies resolves it.
That is not a failure of ingenuity, and it is worth saying so plainly rather than quietly relaxing the spec. The honest engineering options are three: accept about 5.5 s of settling with a 51 degree margin, relax Kv to 5 and re-run the design, or change the hardware so the plant's pole at -2 moves. Lesson 16 shows why constraints of this shape are structural, and what quantity is being conserved when you push one specification and another gives way.
Common misconceptions
- "Lead compensation is just derivative action." A PD controller is a bare zero, with gain rising forever and no roll-off. A lead compensator adds a pole above the zero, capping the high-frequency gain at alpha, which is what makes it usable on a real noisy sensor. The pole is the whole difference and it is not optional.
- "A lag compensator slows the system down." It leaves crossover almost untouched, by design; that is the point of placing its corners a decade below. What it adds is a slow closed-loop mode that shows up in a settling-time measurement, which is a different complaint and one you should measure rather than assume.
- "Bigger alpha is better, since more phase is always welcome." Phase lead comes with a matching gain increase, sqrt(alpha) at the peak and alpha above it. That gain multiplies sensor noise into the actuator, and the table shows the returns diminishing sharply past alpha = 10.
- "Meeting the margins means meeting the specification." The lag design has a 46.8 degree phase margin, a 17.9 dB gain margin and a sensitivity peak of 1.62, all excellent, and it fails the settling requirement by a factor of nearly four. Margins are frequency-domain summaries; a settling time is a time-domain measurement, and the last step of any design is to simulate the response you actually promised.
Putting it together
Lead adds phase where you are working, at the cost of high-frequency gain. Lag adds gain where you are not working, at the cost of a slow closed-loop mode. The sizing formulas are two lines: sin(phi_max) = (alpha - 1)/(alpha + 1) with the peak at sqrt(w_z w_p) for lead, and w_z/w_p equal to the required attenuation for lag.
On the motor axis the lead came out as 26.07(1 + s/1.6)/(1 + s/4.0), giving 50.2 degrees of margin at 2.49 rad/s and a 2.50 s settle. The lag came out as 100(1 + s/0.12)/(1 + s/0.01722), giving K_v = 10 and 46.8 degrees at 1.22 rad/s with an 11.2 s tail. Combined they gave 63.8 degrees and K_v = 10, and still an 11.5 s tail, which moving the lag section up traded away against margin.
So what?: the specification as written cannot be met on this plant with this structure, and finding that out with three simulations is worth more than a design that quietly meets two of three requirements and mentions neither.
Everything in Modules 3 and 4 has moved one loop transfer function around with one or two knobs. The next module changes the description of the plant itself, and with it the number of knobs.
Sources
- Wikipedia contributors. (n.d.). Lead-lag compensator. Wikipedia. en.wikipedia.org
- Cheever, E. (n.d.). Bode plots. Linear Physical Systems Analysis, Swarthmore College. lpsa.swarthmore.edu
- Franklin, G. F., Powell, J. D., and Emami-Naeini, A. (2019). Feedback control of dynamic systems (8th ed.), Section 6.7. Pearson.
- Nise, N. S. (2019). Control systems engineering (8th ed.), Chapter 11. Wiley.
- Ogata, K. (2010). Modern control engineering (5th ed.), Chapter 7. Prentice Hall.
- Key terms
- Lead compensator
- Kc(1 + s/wz)/(1 + s/wp) with wp above wz; it supplies phase near sqrt(wz wp) and caps its own high-frequency gain at alpha.
- Lag compensator
- The same form with wp below wz; it raises low-frequency gain by wz/wp while leaving the crossover region almost untouched.
- Alpha
- The corner ratio wp/wz of a lead section; it sets the maximum phase through sin(phi) = (alpha - 1)/(alpha + 1) and the gain at the peak as sqrt(alpha).
- Maximum-lead frequency
- wm = sqrt(wz wp), the geometric mean of the corners, where the phase contribution peaks and the gain is sqrt(alpha).
- Phase deficit
- The difference between the phase the plant has at the intended crossover and the phase the margin requires, plus a few degrees of insurance.
- Lag tail
- The slow closed-loop mode left behind by a lag section's nearly cancelling pole-zero pair, visible only in a settling-time measurement.
- Velocity constant Kv
- lim s L(s) for a type 1 loop; the ramp tracking lag is 1/Kv, and here Kv = 0.1K for the motor axis.
- Lead-lag compensator
- A lead and a lag section in cascade, buying phase near crossover and gain below it with a single controller.
Module 5: State Space
Change the description of the plant. State equations and the two rank tests that say whether feedback and estimation are possible at all, pole placement by Ackermann's formula, a full-order observer with the separation principle, and a linear quadratic regulator solved by hand on a two-state plant.
Two Descriptions of One Motor, and the Mode the Transfer Function Hides
- Write state-space models for the motor and the mass-spring-damper, and recover their transfer functions by C(sI - A) inverse B.
- Compute controllability and observability matrices and interpret their rank and conditioning physically.
- Explain, with a worked two-state example, how a transfer function can conceal an unstable internal mode.
Here are two descriptions of the same motor. The first is from Lesson 1:
Omega(s)/V(s) = 2/(s2 + 12s + 20.02).
The second keeps the two physical equations separate rather than eliminating between them. Take the state to be the pair (speed, current). From the torque balance, domega/dt = (K i - b omega)/J = -10 omega + i. From the armature circuit, di/dt = (V - Ri - K omega)/L = -0.02 omega - 2i + 2V. In matrix form, with x = [omega, i] and the output being speed:
A = [[-10, 1], [-0.02, -2]], B = [0, 2], C = [1, 0], D = 0.
These are not two theories. They are two descriptions, and the point of this lesson is what each one lets you see. Confirm first that they agree: det(sI - A) = (s+10)(s+2) + 0.02 = s2 + 12s + 20.02, exactly the denominator above, and C(sI - A)-1B works out to 2/(s2 + 12s + 20.02), exactly the numerator and denominator above.
What each description is good at
| Question | Transfer function | State space |
|---|---|---|
| Steady-state gain | Set s = 0, read it off | Compute -CA-1B + D |
| Frequency response | Substitute jw directly | Requires a matrix inverse at each w |
| Two inputs, three outputs | A six-entry matrix of ratios | One equation, B and C simply get wider |
| Nonlinear or time-varying plant | Does not exist | x' = f(x, u, t) is the natural form |
| Internal variables | Invisible | Every state is named and available |
| Cancelled modes | Silently deleted | Still in A, still in the eigenvalues |
| Initial conditions | Assumed zero | x(0) is an explicit input to the solution |
Row six is the one that costs money. Take a two-state system with
A = [[1, 0], [0, -3]], B = [0, 1], C = [1, 1].
Its eigenvalues are +1 and -3, so one internal mode grows as et, doubling every 0.69 s. Now compute its transfer function. The matrix (sI - A)-1 is diagonal, so C(sI-A)-1B = [1, 1] diag(1/(s-1), 1/(s+3)) [0, 1]T = 1/(s + 3).
A stable first-order lag with a time constant of a third of a second. Nothing in that expression mentions the mode at +1, because the input cannot reach it: B has no component along the first state. Build this plant, close whatever loop you like around its transfer function, and the hidden state runs away regardless.
Key idea: a transfer function describes the input-output behaviour of a system. A state-space model describes the system. When they disagree, the state-space model is right.
The two rank tests
Rudolf Kalman, at the first IFAC Congress in Moscow in 1960, asked the two questions the example above makes urgent. Can the input reach every mode? Can the output see every mode? Both turn into rank conditions on a matrix you can build in a minute.
Controllability. Form W_c = [B, AB, A2B, ..., An-1B]. The pair (A, B) is controllable when rank(W_c) = n, and then any state can be driven to any other in finite time.
Observability. Stack W_o = [C; CA; CA2; ...; CAn-1]. The pair (A, C) is observable when rank(W_o) = n, and then the initial state can be reconstructed from a finite record of the output.
Run them on the failing example. AB = [[1,0],[0,-3]][0,1]T = [0, -3]T, so W_c = [[0, 0], [1, -3]], whose determinant is zero: rank 1, not controllable. Meanwhile CA = [1, -3], so W_o = [[1, 1], [1, -3]], determinant -4: rank 2, observable. The mode is visible and unreachable, which is the worst combination, because you would see the plant diverging and be unable to do anything about it.
The motor and the spring, tested
For the motor, AB = [[-10,1],[-0.02,-2]][0,2]T = [2, -4]T, giving
W_c = [[0, 2], [2, -4]], determinant -4. Rank 2: controllable.
Measuring speed, C = [1, 0] and CA = [-10, 1], so W_o = [[1, 0], [-10, 1]], determinant 1. Rank 2: observable, and comfortably so.
Now change the sensor. Suppose you measure armature current instead, so C = [0, 1]. Then CA = [-0.02, -2] and
W_o = [[0, 1], [-0.02, -2]], determinant 0.02.
Still rank 2, so still observable, and the theorem is satisfied. But the determinant has fallen by a factor of fifty, and that number has a physical meaning you can state in a sentence: the only route by which shaft speed influences armature current is the back electromotive force, and Lesson 1 established that in this motor the back-EMF term is one part in a thousand of the dynamics. So estimating speed from current works in arithmetic and fails on a real current sensor, because a 1 percent measurement error is amplified fiftyfold in the estimate.
In short: rank is a yes or no answer, and engineering lives in how nearly the answer is no. Compute the determinant or the smallest singular value, not just the rank.
The mass-spring-damper, for completeness. With x = [position, velocity], A = [[0, 1], [-100, -4]], B = [0, 1], and position measured so C = [1, 0]: W_c = [[0, 1], [1, -4]] with determinant -1, and W_o is the identity. Both tests pass cleanly, which is why Lesson 14 uses this plant for pole placement.
Two more facts worth carrying
Duality. (A, C) is observable exactly when (AT, CT) is controllable. Every result about steering has a mirror image about estimating, which is why Lesson 14 designs an observer with the same formula it uses for a controller, applied to the transposed system.
Non-uniqueness. Change coordinates with any invertible T, setting z = Tx, and you get A_new = TAT-1, B_new = TB, C_new = CT-1. The matrices all change; the eigenvalues, the transfer function, and the controllability and observability ranks do not. There are infinitely many state-space models of one motor and exactly one transfer function, which is the honest trade for the extra information.
Common misconceptions
- "State space is a different notation for the same content." It carries strictly more. The example with eigenvalues at +1 and -3 has the transfer function
1/(s+3), and no amount of work on that expression will ever reveal the diverging mode. - "A minimal realisation loses nothing important." It loses exactly the uncontrollable and unobservable modes. That is harmless when they are stable and well damped, and fatal otherwise, so the question to ask about any cancellation is not whether it is legal but where the cancelled pole sits.
- "Controllable means you can hold the state anywhere you like." It means you can move between any two states in finite time using an unbounded input. It says nothing about how much actuator you need, or whether the state can be held once reached. A satellite with a one-newton thruster is controllable and still cannot dodge quickly.
- "The states have to be physical quantities." They often are, and it helps, but any n independent quantities that summarise the past will do. The controllable canonical form used in Lesson 14 has states with no physical meaning at all, and it is the easiest form in which to place poles.
Where this leaves us
One motor, two descriptions. The transfer function 2/(s2 + 12s + 20.02) answers questions about input and output quickly and says nothing about what is happening inside. The state-space model A = [[-10, 1], [-0.02, -2]], B = [0, 2], C = [1, 0] names both internal variables, generalises to many inputs and outputs, survives nonlinearity, and exposes modes the transfer function deletes.
Two rank tests decide whether control and estimation are possible at all. The motor passed both with determinants of -4 and 1. Swapping the speed sensor for a current sensor left the rank unchanged and dropped the observability determinant to 0.02, which is the arithmetic saying what the physics already knew: back-EMF is a weak channel in this machine.
The upshot: before designing any state feedback, run both tests and look at the numbers, not just the ranks. A plant that fails one of them cannot be fixed by a cleverer controller, only by moving an actuator or a sensor.
The motor and the spring both passed. The next lesson uses that permission and places their poles wherever it likes.
Sources
- Wikipedia contributors. (n.d.). State-space representation. Wikipedia. en.wikipedia.org
- Wikipedia contributors. (n.d.). Controllability. Wikipedia. en.wikipedia.org
- Kalman, R. E. (1960). On the general theory of control systems. Proceedings of the First IFAC Congress, Moscow, 1, 481-492.
- Franklin, G. F., Powell, J. D., and Emami-Naeini, A. (2019). Feedback control of dynamic systems (8th ed.), Chapter 7. Pearson.
- Ogata, K. (2010). Modern control engineering (5th ed.), Chapters 9 and 11. Prentice Hall.
- Key terms
- State vector
- A minimal set of n quantities that, with the future input, determines the future of the system completely.
- State equations
- x' = Ax + Bu and y = Cx + Du; A holds the internal dynamics, B the actuator's reach, C the sensor's view.
- Transfer function from state space
- G(s) = C(sI - A) inverse B + D, whose denominator is det(sI - A) before any cancellation.
- Controllability matrix
- Wc = [B, AB, ..., A^(n-1)B]; full rank means any state can be reached from any other in finite time.
- Observability matrix
- Wo stacked from C, CA, ..., CA^(n-1); full rank means the initial state can be reconstructed from the output record.
- Hidden mode
- An eigenvalue of A that is uncontrollable or unobservable and therefore absent from the transfer function, while remaining present in the plant.
- Duality
- (A, C) is observable exactly when (A transpose, C transpose) is controllable, so every steering result has an estimation mirror image.
- Similarity transformation
- z = Tx, giving TAT inverse, TB and CT inverse; eigenvalues, transfer function and both ranks are unchanged.
Placing Every Pole, Then Building the States You Cannot Measure
- Design a state feedback gain by matching coefficients and by Ackermann's formula, and confirm the two agree.
- Design a full-order observer by placing the error dynamics, and quantify the noise cost of making it faster.
- State and use the separation principle, and identify what state feedback does not provide.
Every design so far has had one or two knobs. Proportional gain moved three poles along fixed paths and you took whatever came. A lead compensator gave you a zero and a pole to place, and the closed-loop poles still landed where the algebra put them. State feedback is different in kind: if the plant is controllable, you may put every closed-loop pole exactly where you want it, and there is a formula that tells you the gains.
Work it on the mass-spring-damper, whose ringing has been a complaint since Lesson 1. In state form, with x = [position, velocity]:
A = [[0, 1], [-100, -4]], B = [0, 1], C = [1, 0].
Its eigenvalues are -2 +/- j9.798: wn = 10 rad/s, zeta = 0.2, 52.7 percent overshoot, 2 second settle. Suppose the specification is zeta = 0.707 with a settling time of 0.4 s. That means a real part of 4/0.4 = 10, so the desired poles are -10 +/- j10, whose characteristic polynomial is s2 + 20s + 200.
Step one: state feedback by matching coefficients
Let u = -Kx + r with K = [k_1, k_2]. Then
A - BK = [[0, 1], [-100 - k_1, -4 - k_2]], with characteristic polynomial s2 + (4 + k_2)s + (100 + k_1).
Match: 4 + k_2 = 20 and 100 + k_1 = 200, so K = [100, 16]. That took one line because this A and B are already in controllable canonical form, where the last row of A holds the characteristic polynomial coefficients with signs reversed and feedback simply adds to them.
Read the two gains physically. k_1 = 100 N per metre of position is a synthetic spring, added in parallel with the real 100 N/m one and doubling the stiffness, which is why wn rose from 10 to sqrt(200) = 14.14 rad/s. k_2 = 16 N per m/s is a synthetic damper, added to the real 4 N s/m and quintupling it. State feedback on a mechanical plant is exactly the act of installing springs and dampers in software.
Step two: the same answer from Ackermann's formula
Most plants do not arrive in canonical form, and Ackermann's formula handles the general case:
K = [0 0 ... 0 1] W_c-1 phi_d(A),
where phi_d is the desired characteristic polynomial and phi_d(A) means substituting the matrix A into it. Work it through as a check.
W_c = [B, AB] = [[0, 1], [1, -4]], determinant -1, so W_c-1 = [[4, 1], [1, 0]].
A2 = [[-100, -4], [400, -84]], so phi_d(A) = A2 + 20A + 200I = [[100, 16], [-1600, 36]].
[0, 1] W_c-1 = [1, 0], and [1, 0] phi_d(A) = [100, 16].
The same K. Ackermann is not a shortcut, it is the general statement of what matching coefficients does, and it makes plain why controllability is the precondition: the formula inverts Wc, and a singular Wc has no inverse.
Step three: what state feedback does not give you
Two omissions, both easy to miss and both expensive.
First, the DC gain. The closed loop from r to position is 1/(s2 + 20s + 200), so its steady-state gain is 1/200 = 0.005 m per newton of reference, half the open-loop value. Ask for 10 mm and you get 5. The standard remedy is a feedforward scale factor, u = -Kx + N r with N = 200 here, computed from the model.
Second, and worse, there is no integrator anywhere in that loop. A constant force disturbance leaves a permanent position error, and a 5 percent error in the modelled stiffness leaves the reference scaling wrong by 5 percent. The remedy is to augment the state with the integral of the tracking error, giving a three-state model and a three-element gain, and everything in this lesson then applies unchanged. Nothing about state feedback removes the lesson of Module 2: if you want zero steady-state error, some integrator has to be in the loop, and you have to put it there.
The point: pole placement is a statement about the homogeneous response. Reference tracking and disturbance rejection are separate questions and need separate machinery.
Step four: the states you do not have
u = -100x - 16v requires knowing v. Most machines measure position and not velocity, and differentiating a position signal reproduces the noise problem of Lesson 9. The alternative is to run a model of the plant alongside the plant and correct it with whatever you do measure. That is a state observer, and Luenberger's 1964 form is:
x_hat' = A x_hat + B u + L(y - C x_hat).
The first two terms are the model running open loop. The third is the correction: the difference between what the sensor says and what the model predicted the sensor would say, multiplied by a gain L you choose. Subtract this from the true dynamics and the estimation error e = x - x_hat obeys
e' = (A - LC)e.
So designing an observer is placing the eigenvalues of A - LC, which by duality is the pole placement problem for (AT, CT). Nothing new is needed.
How fast? The convention is 2 to 5 times faster than the controller poles, so the estimate has converged before the controller has done much. Controller real part -10, so take observer poles at -40 +/- j40, giving s2 + 80s + 3200.
With C = [1, 0] and L = [l_1, l_2],
A - LC = [[-l_1, 1], [-100 - l_2, -4]], characteristic polynomial s2 + (4 + l_1)s + (4l_1 + 100 + l_2).
Match: 4 + l_1 = 80 gives l_1 = 76, and 304 + 100 + l_2 = 3200 gives l_2 = 2796. So L = [76, 2796].
Step five: what the fast observer costs
Suppose the estimator starts 10 mm wrong in position and correct in velocity, so e(0) = [0.01, 0]. Both error components obey s2 + 80s + 3200, and with e_2(0) = 0 and e_2'(0) = -2896 x 0.01 = -28.96, the velocity error is
e_2(t) = -0.724 e-40t sin(40t).
Its peak is at 40t = pi/4, that is t = 19.6 ms, where it reaches -0.233 m/s. Through the gain k_2 = 16 that is 3.7 N of spurious control effort from a 10 mm estimation error, and it is gone within 100 ms.
Now make the observer four times faster still, poles at -160 +/- j160. Matching gives l_1 = 316 and l_2 = 49836. The gain that multiplies your position sensor's noise has risen by a factor of 17.8. If the encoder has 10 micrometres of noise, the velocity estimate carries 49836 x 10-5 = 0.50 m/s of it continuously, against 0.028 m/s for the slower observer.
| Observer poles | l1 | l2 | Error settles in | Velocity noise from 10 micrometre encoder noise |
|---|---|---|---|---|
| -40 +/- j40 | 76 | 2796 | 0.10 s | 0.028 m/s |
| -160 +/- j160 | 316 | 49836 | 0.025 s | 0.50 m/s |
Remember: an observer trades estimation speed against noise exactly as a derivative filter does, and for the same reason. Choosing L is choosing a bandwidth, and the honest version of that choice is what a Kalman filter computes from the measured noise statistics rather than from a rule of thumb.
Step six: why the two designs do not interfere
Run the controller on the estimate, u = -K x_hat + N r, and the combined system has four states. Change coordinates to (x, e) and the dynamics become block triangular:
[x'; e'] = [[A - BK, BK], [0, A - LC]] [x; e].
The eigenvalues of a block triangular matrix are the eigenvalues of its diagonal blocks. So the four closed-loop poles are exactly the two you placed with K and the two you placed with L, and neither design shifted the other. That is the separation principle, and it is what makes the whole approach practical: design the controller assuming perfect measurements, design the observer ignoring the controller, then bolt them together.
The separation is exact for the poles and not for anything else. The transfer function from a disturbance to the output, and the transfer function from sensor noise to the actuator, both depend on K and L together. Two designs with identical closed-loop poles can differ enormously in noise rejection, which is why the poles are the beginning of the argument and not the end.
Common misconceptions
- "Pole placement means you can have any performance you want." You can have any pole locations you want. Placing them far to the left demands gains that scale like the distance to a power, and the actuator saturates, at which point Lesson 9 applies with full force. Poles at
-10 +/- j10neededk_1 = 100; poles at-100 +/- j100would needk_1 = 19900. - "An observer removes the need for good sensors." It reconstructs states from the sensors you have, and it is only as good as the model and the measurement. On the motor of Lesson 13, estimating speed from current is observable on paper and useless in practice, because the observability determinant is 0.02.
- "The separation principle means the observer does not affect performance." It means the observer does not move the poles. It certainly affects the response to disturbances, to noise and to model error, none of which the pole locations describe.
- "State feedback makes the steady-state error zero, since it uses all the states." It does not. The closed loop above has a DC gain of 0.005 rather than 1, and a constant disturbance leaves a permanent offset. Integral action is a separate ingredient and must be added as an extra state.
The short version
If (A, B) is controllable, state feedback places every closed-loop pole. On the mass-spring-damper, moving from zeta = 0.2 at 10 rad/s to zeta = 0.707 at 14.14 rad/s took K = [100, 16], obtained in one line by matching coefficients and confirmed by Ackermann's formula through W_c-1 = [[4, 1], [1, 0]] and phi_d(A) = [[100, 16], [-1600, 36]].
If (A, C) is observable, an observer reconstructs the states you cannot measure, and its error dynamics A - LC are placed the same way. Poles at -40 +/- j40 gave L = [76, 2796] and an error that dies in 0.10 s, at a cost of 0.028 m/s of velocity noise from a 10 micrometre encoder; four times faster raised that to 0.50 m/s.
The separation principle guarantees the four closed-loop poles are the union of the two sets, because the combined dynamics in error coordinates are block triangular.
Which leaves one question this lesson has dodged. Where should the poles go? The specification said zeta = 0.707 and 0.4 seconds because a specification said so. The next lesson asks a machine to answer instead.
Sources
- Wikipedia contributors. (n.d.). Ackermann's formula. Wikipedia. en.wikipedia.org
- Wikipedia contributors. (n.d.). State observer. Wikipedia. en.wikipedia.org
- Luenberger, D. G. (1964). Observing the state of a linear system. IEEE Transactions on Military Electronics, 8(2), 74-80.
- Franklin, G. F., Powell, J. D., and Emami-Naeini, A. (2019). Feedback control of dynamic systems (8th ed.), Sections 7.5 to 7.8. Pearson.
- Ogata, K. (2010). Modern control engineering (5th ed.), Chapter 10. Prentice Hall.
- Key terms
- State feedback
- u = -Kx + r, which replaces the plant matrix A by A - BK and therefore places every closed-loop pole when the pair is controllable.
- Controllable canonical form
- A coordinate choice in which the last row of A holds the characteristic polynomial coefficients, so feedback gains add to them directly.
- Ackermann's formula
- K = [0 ... 0 1] Wc inverse phi_d(A), the general pole-placement solution; it fails exactly when Wc is singular.
- Reference scaling
- The feedforward gain N that restores unity DC gain after state feedback has changed it; it depends on the model and provides no integral action.
- Luenberger observer
- x_hat' = A x_hat + Bu + L(y - C x_hat): a model of the plant driven by the same input and corrected by the measurement residual.
- Estimation error dynamics
- e' = (A - LC)e, whose eigenvalues are placed by choosing L, typically 2 to 5 times faster than the controller poles.
- Separation principle
- The combined controller and observer system is block triangular in (x, e) coordinates, so its poles are the union of those of A - BK and A - LC.
- Integral augmentation
- Adding the integral of tracking error as an extra state, the only way to get zero steady-state error from a state feedback design.
Where Should the Poles Go? Letting a Cost Function Decide
- State the linear quadratic regulator problem and the algebraic Riccati equation that solves it.
- Solve the Riccati equation by hand for a double integrator and show that the damping ratio is 0.707 for every choice of state weight.
- Apply Bryson's rule to weight a real design, and state the guaranteed margins of LQR and the conditions under which they are lost.
Lesson 14 placed the poles of the mass-spring-damper at -10 +/- j10 and produced K = [100, 16]. Why -10? Because a specification said settle in 0.4 seconds. Why 0.4? Somebody wrote it down.
Now suppose nobody has. The actual constraint on that machine is that the actuator can deliver 10 newtons and the position must not stray beyond 10 millimetres. Those are physical facts about hardware. Nothing in pole placement converts them into pole locations, and the honest description of what most engineers do at that point is guess, simulate, and adjust. In 1960 Rudolf Kalman proposed writing down what you want as a number to be minimised, and letting the algebra place the poles.
The problem, stated
Choose the input history u(t) that minimises
J = integral from 0 to infinity of [xT Q x + uT R u] dt,
subject to x' = Ax + Bu. Q is a symmetric positive semi-definite matrix penalising the states, R a symmetric positive definite matrix penalising the effort. Large Q relative to R says do whatever it takes; large R says take it easy.
What makes the linear quadratic regulator more than a definition is the form of the answer. It is not a schedule of inputs computed in advance; it is a constant state feedback gain:
u = -Kx, with K = R-1BTP,
where P is the unique positive definite solution of the algebraic Riccati equation
ATP + PA - PBR-1BTP + Q = 0.
An infinite-dimensional optimisation over functions collapses to a matrix equation with n(n+1)/2 unknowns. For two states that is three numbers, and you can do it on paper.
Solving it by hand on a double integrator
Take the simplest interesting plant, a mass with no spring and no damping, so A = [[0, 1], [0, 0]] and B = [0, 1]. Penalise position only, Q = diag(q, 0), and effort with R = 1. Write P = [[p_1, p_2], [p_2, p_3]] and grind out the three scalar equations.
ATP = [[0, 0], [p_1, p_2]] and PA = [[0, p_1], [0, p_2]]. Also BTP = [p_2, p_3], so PBR-1BTP = [[p_22, p_2p_3], [p_2p_3, p_32]]. Adding everything and setting each entry to zero:
- Entry (1,1):
-p_22 + q = 0, sop_2 = sqrt(q). - Entry (1,2):
p_1 - p_2 p_3 = 0, sop_1 = p_2 p_3. - Entry (2,2):
2p_2 - p_32 = 0, sop_3 = sqrt(2 sqrt(q)).
Each equation gave one unknown, in order. The gain is
K = R-1BTP = [p_2, p_3] = [sqrt(q), sqrt(2 sqrt(q))],
and the closed loop A - BK = [[0, 1], [-sqrt(q), -sqrt(2 sqrt(q))]] has characteristic polynomial
s2 + sqrt(2 sqrt(q)) s + sqrt(q).
Read the damping off it. wn = q1/4 and 2 zeta wn = sqrt(2) q1/4, so
zeta = sqrt(2)/2 = 0.7071, for every value of q.
| q | K | wn | zeta | Overshoot | ts (2 percent) |
|---|---|---|---|---|---|
| 1 | [1, 1.414] | 1 | 0.707 | 4.3 percent | 5.66 s |
| 16 | [4, 2.828] | 2 | 0.707 | 4.3 percent | 2.83 s |
| 256 | [16, 5.657] | 4 | 0.707 | 4.3 percent | 1.41 s |
| 10000 | [100, 14.14] | 10 | 0.707 | 4.3 percent | 0.57 s |
Nobody asked for 0.707. It is the answer a quadratic cost gives on a double integrator, whatever weights you choose, and it is exactly the damping ratio Lesson 3 singled out for having the flattest closed-loop frequency response and an overshoot of precisely e-pi. The single knob q buys bandwidth, as its fourth root, and does not touch the shape.
So what?: the rule of thumb that a damping ratio near 0.7 is a good default is not folklore. It is what falls out when you write down a cost that trades error against effort and solve it exactly.
Choosing Q and R without guessing
On a real plant the weights are matrices and the temptation is to fiddle. Arthur Bryson's rule turns them into engineering data: set each diagonal entry to the reciprocal of the square of the largest value of that variable you are willing to accept.
Apply it to the mass-spring-damper. Say the largest acceptable position error is 10 mm, the largest acceptable velocity 0.5 m/s, and the largest force the actuator can give is 10 N. Then
Q = diag(1/0.012, 1/0.52) = diag(10000, 4) and R = 1/102 = 0.01.
With A = [[0, 1], [-100, -4]] and B = [0, 1], the three Riccati equations become
- (1,1):
100p_22 + 200p_2 - 10000 = 0, sop_2 = 9.050. - (2,2):
100p_32 + 8p_3 - 2p_2 - 4 = 0, sop_3 = 0.4318. - (1,2):
p_1 = 100p_3 + 4p_2 + 100p_2p_3 = 470.2.
Check that P is positive definite before trusting it: p_1 = 470.2 > 0 and det P = 470.2 x 0.4318 - 9.0502 = 121.1 > 0. It is. Then
K = R-1BTP = 100 [p_2, p_3] = [905.0, 43.18].
The closed loop is s2 + 47.18s + 1005.0, giving wn = 31.70 rad/s, zeta = 0.744, poles at -23.59 +/- j21.18, an overshoot of 3.0 percent and a 2 percent settling time of 0.17 s. Compare Lesson 14's hand-placed design: 0.4 s and 4.3 percent.
Now audit the promise. Displace the mass by the full 10 mm and the commanded force is 905.0 x 0.01 = 9.05 N, just inside the 10 N actuator limit. Bryson's rule delivered what it said it would, which is the reason to use it: the weights are quantities you can defend to a mechanical engineer, not tuning constants.
What LQR guarantees, and where the guarantee stops
Three properties, and they are theorems rather than observations.
- Stability. Provided (A, B) is stabilisable and the state penalty does not hide an unstable mode, the closed loop is always stable. You cannot choose weights that produce an unstable regulator.
- Margins. For a single input, LQR state feedback always has an infinite upward gain margin, a downward gain margin of 0.5, and a phase margin of at least 60 degrees. Multiply the loop gain by 100 and it is still stable. Compare that with the lead-lag design of Lesson 12, which had 13.9 dB and 50 degrees and took a page of work.
- Optimality. No other control law, linear or nonlinear, achieves a lower J.
The catch is that these guarantees are for state feedback, meaning you measure every state exactly. Add the observer of Lesson 14, or a Kalman filter, and the combination is called LQG. In 1978 John Doyle published a two-page paper in the IEEE Transactions titled Guaranteed margins for LQG regulators, whose abstract consists of the single word None. He constructed a two-state example whose LQG loop can be destabilised by an arbitrarily small change in a single plant parameter. The separation principle preserves the poles and does not preserve the margins.
Bottom line: LQR gives you excellent margins for a controller you cannot implement, and implementing it can throw them away. Loop transfer recovery and modern robust design exist to manage that, and their existence is the honest reason a classical Bode plot is still worth drawing after the optimal gain has been computed.
Common misconceptions
- "Optimal means best." It means the minimiser of the J you wrote. Change Q and you get a different optimum, equally optimal. The engineering content is entirely in the choice of weights, which is why Bryson's rule matters more than the Riccati solver.
- "LQR eliminates tuning." It replaces tuning gains, which have no physical units you can argue about, with tuning weights, which do. That is a genuine improvement and not the same as elimination.
- "The Riccati equation has many solutions, so the answer is ambiguous." The quadratic matrix equation does have several solutions, but exactly one is positive definite, and that is the stabilising one. Checking positive definiteness is part of the method, not an optional extra.
- "LQR handles disturbances and setpoints." It is a regulator: it drives the state to zero from an initial condition. Tracking a reference and rejecting a constant disturbance need the same integral augmentation as any other state feedback design.
What to carry forward
Write the cost, solve the Riccati equation, read off the gain. On a double integrator with position weight q and unit effort weight, the algebra unwinds in three lines to K = [sqrt(q), sqrt(2 sqrt(q))], a natural frequency of q1/4, and a damping ratio of 0.707 whatever q is. On the mass-spring-damper with Bryson weights from a 10 mm error budget and a 10 N actuator, it gave K = [905.0, 43.18], poles at -23.59 +/- j21.18, a 0.17 s settle, and a peak demand of 9.05 N against the 10 N limit.
The guarantees are real: always stable, infinite upward gain margin, downward gain margin 0.5, at least 60 degrees of phase margin. They apply to the state feedback loop and not to the observer-based implementation of it, which is Doyle's 1978 point and the reason nobody stopped drawing Bode plots in 1960.
That closes the modelling and design half of this course. Everything so far has assumed a controller made of continuous mathematics. The next module puts it inside a computer with a clock.
Sources
- Wikipedia contributors. (n.d.). Linear-quadratic regulator. Wikipedia. en.wikipedia.org
- Greenfield, R., and How, J. (2012). 16.06 Principles of automatic control. MIT OpenCourseWare. ocw.mit.edu
- Kalman, R. E. (1960). Contributions to the theory of optimal control. Boletin de la Sociedad Matematica Mexicana, 5, 102-119.
- Doyle, J. C. (1978). Guaranteed margins for LQG regulators. IEEE Transactions on Automatic Control, 23(4), 756-757.
- Bryson, A. E., and Ho, Y.-C. (1975). Applied optimal control. Hemisphere Publishing.
- Key terms
- Quadratic cost functional
- J = integral of x transpose Q x plus u transpose R u; Q prices deviation of the state and R prices control effort.
- Algebraic Riccati equation
- A transpose P + PA - P B R inverse B transpose P + Q = 0; its unique positive definite solution gives the optimal gain.
- Optimal gain
- K = R inverse B transpose P, a constant state feedback matrix rather than a schedule of inputs computed in advance.
- Bryson's rule
- Set each diagonal weight to the reciprocal of the square of the largest acceptable value of that variable, making the weights engineering data.
- Butterworth damping
- zeta = 0.707, the damping ratio LQR returns on a double integrator for every state weight, with overshoot exactly exp(-pi).
- LQR guaranteed margins
- For single-input state feedback: infinite upward gain margin, downward gain margin of 0.5, and at least 60 degrees of phase margin.
- LQG
- LQR combined with a Kalman filter estimating the state; the poles separate but the guaranteed margins do not survive.
- Doyle's counterexample
- A 1978 two-state LQG design destabilised by an arbitrarily small parameter change, showing the guarantees belong to state feedback alone.
Module 6: Implementation, Limits, and a Control Room in 1979
Put the controller inside a computer with a clock and find the four traps that catch a working analogue design. Then the limits no controller escapes, argued as a dispute, and the Three Mile Island sequence read as a control problem with a corrupted state estimate.
It Ran on the Bench and Oscillates in the Product: Four Sampling Traps
- Quantify the phase lost to a zero-order hold and to computational delay, and choose a sample rate from a phase budget.
- Explain aliasing with a worked example and say why anti-aliasing cannot be done after the converter.
- Convert a continuous controller by Tustin's method, compute the frequency warp, and prewarp to correct it.
The lead compensator of Lesson 12 was built with three operational amplifiers and worked exactly as designed: 50.2 degrees of phase margin, crossover at 2.49 rad/s, a step settling in 2.50 s. Production wanted it in firmware, so somebody wrote the difference equation, ran it in a 20 Hz timer interrupt on a microcontroller, and the axis started to hunt at about half a hertz.
Nothing in the compensator changed. Its zero is still at 1.6 rad/s and its pole at 4.0. What changed is that the controller now looks at the plant twenty times a second instead of continuously, holds its output flat between samples, computes with 4.88 millivolt steps instead of a continuum, and answers a fraction of a sample late. Each of those four things costs something specific. This lesson prices them.
Trap one: the hold, which is a delay you did not put there
A digital output does not vary between samples. It steps to a value and stays there for T seconds, which is a zero-order hold. On average, the signal the plant receives is the signal the controller intended, delayed by half a sample. So the loop acquires a phase lag of
phase lost = w T/2 radians,
which is zero at DC and grows without limit, exactly like the oven's dead time in Lesson 1. Budget it at the gain crossover frequency, where phase margin is measured.
| Sample rate | T | wgcT/2 at 2.49 rad/s | Phase lost | Resulting phase margin |
|---|---|---|---|---|
| 2 Hz | 0.5 s | 0.623 rad | 35.7 degrees | 14.5 degrees |
| 10 Hz | 0.1 s | 0.125 rad | 7.1 degrees | 43.1 degrees |
| 20 Hz | 0.05 s | 0.062 rad | 3.6 degrees | 46.6 degrees |
| 50 Hz | 0.02 s | 0.025 rad | 1.4 degrees | 48.8 degrees |
Twenty hertz costs 3.6 degrees on this loop, which is not the fault. Keep the number anyway, because it is the design rule: choose T so that w_gc T is between about 0.2 and 0.5 radians, which puts the sample rate 12 to 30 times the crossover frequency, and the hold costs you 6 to 14 degrees.
Trap two: aliasing, which is not a filtering problem
Sample a signal at frequency fs and any component above f_s/2 comes back as a lower frequency. This is aliasing, and the arithmetic is that a component at f appears at |f - k f_s| for whichever integer k brings it into the band.
Here is the case that explains the half-hertz hunt. The position sensor picks up 60 Hz mains hum through its cable. Sampled at 20 Hz, that hum appears at |60 - 3 x 20| = 0 Hz. A 60 Hz interference that the mechanical system could never respond to has become a DC offset in the measurement. If the sensor cable also picks up a little 59.75 Hz from a neighbouring drive, that component aliases to 0.25 Hz, which is a slow wander the axis will faithfully chase.
No digital filter can undo this. Once the samples are taken, the 60 Hz component and a genuine DC offset are the same numbers. The only fix is an analogue filter before the converter, and here is the trap inside the trap: that filter is in the loop and costs phase too. To attenuate 60 Hz by 60 dB with a corner at 5 Hz you need three poles, and three poles at 5 Hz contribute -3 arctan(2.49/31.4) = -13.6 degrees at the crossover of 2.49 rad/s. Push the corner down to 2 Hz to filter harder and the cost rises to 34 degrees, which is most of your margin.
What matters here: anti-aliasing and phase margin pull against each other, and the way out of the squeeze is almost always to sample faster. At 200 Hz the anti-alias corner can sit at 50 Hz, where its phase cost at 2.49 rad/s is under half a degree.
Trap three: quantisation, and the integrator that stops
Quantisation appears in three places, and only one of them is the obvious one.
At the input. A 10-bit converter over 0 to 5 V has 4.88 mV steps. If 5 V represents 50 mm of travel, one bit is 48.8 micrometres, and no controller can hold position better than that.
At the output. An 8-bit output driving a 0 to 200 W heater steps in 0.78 W increments. With integral action, the loop cannot settle: the required steady power almost never lands exactly on a code, so the integrator drifts until the output flips to the next code, then drifts back. The result is a permanent limit cycle whose amplitude at the plant is roughly one output step times the plant gain, here 0.78 x 0.5 = 0.39 degrees.
In the arithmetic. This one has bitten many people. The oven PI controller has T_i = 120 s, so at a 1 s sample the integral increments by e/120 each step. In 16-bit fixed point with the integrator scaled so that one count is 0.01 degrees, an error of 1 degree adds 100/120 = 0.83 counts, which rounds to zero. The integrator stops moving, the offset never disappears, and every measurement of the controller says integral action is enabled. The remedy is to keep the integrator in wider precision than the signals it accumulates, or to carry the rounding residue forward to the next sample.
Trap four: the answer that arrives late
The interrupt fires, the converter is read, the difference equation runs, the output is written. If the write happens at the end of the computation, the loop carries an extra delay equal to the computation time. If the code is written the tidy way, reading at the top of one period and writing at the top of the next, it carries a full extra sample.
Total phase lag is then w(T/2 + tau_c). On the lead design at 20 Hz, the hold costs 3.6 degrees and a full sample of computational delay costs another 7.1, for 10.7 degrees rather than 3.6, three times the budget you allowed for.
The standard remedy costs nothing but care. Split the difference equation into the part that depends only on past values and the part that depends on the new measurement, precompute the first between samples, and on arrival of the new sample do the single multiply-add needed to finish and write the output immediately. The delay drops from a whole sample to microseconds.
Getting from C(s) to C(z), and the warp
Two routes exist. Emulation designs in continuous time, as this course has done throughout, then discretises. Direct design converts the plant to its discrete equivalent first, then designs in the z-domain, where z = esT maps the left half-plane onto the interior of the unit circle, so stability means every closed-loop pole satisfies |z| < 1. Root locus and frequency methods carry over with the unit circle in place of the imaginary axis. Direct design is the honest choice when the sample rate is slow relative to the dynamics; emulation is simpler and adequate when it is fast.
For emulation the usual substitution is the bilinear transform, also called Tustin's method:
s = (2/T)(z - 1)/(z + 1).
It maps the entire imaginary axis onto the unit circle, so it never aliases and never turns a stable filter unstable, which forward Euler cheerfully does. The price is that frequencies are compressed. Putting z = ejwT into the substitution gives s = j(2/T)tan(wT/2), so a feature designed at analogue frequency wa shows up in the digital filter at
w_d = (2/T) arctan(w_a T/2).
Work an example. Design a corner at 10 Hz, that is 62.83 rad/s, and discretise at 50 Hz so T = 0.02 s. Then w_d = 100 arctan(0.6283) = 56.10 rad/s, which is 8.93 Hz. The corner has moved down 10.7 percent, and near half the sample rate the compression becomes severe.
Prewarping fixes it exactly. Before substituting, replace the design frequency by w_a' = (2/T) tan(w_a T/2) = 100 tan(0.6283) = 72.65 rad/s, and the discretised filter lands precisely at 10 Hz. You can prewarp exactly one frequency, so choose the one that matters: a crossover, a notch centre, or a resonance.
Common misconceptions
- "Sampling faster is always safer." Three counterexamples, all real. A derivative computed as a difference has gain
K_p T_d/h, which in Lesson 9 was 3000 W per degree at h = 0.1 s and would be 30,000 at h = 0.01. A fixed-point integrator increments bye h/T_i, which rounds to zero sooner as h shrinks. And a faster loop leaves less time per sample, so the computation delay grows as a fraction of T. Faster sampling with unchanged word length and unchanged code is not automatically better. - "The sampling theorem says twice the highest frequency is enough." It says that for perfect reconstruction of a signal, with an ideal filter and no causality requirement. For a control loop the relevant criterion is phase, and the working range is 12 to 30 times the crossover frequency, an order of magnitude above the reconstruction bound.
- "Anti-aliasing can be done in software." Not after the converter. The 60 Hz hum and a DC offset produce identical sample sequences at 20 Hz, so no algorithm can separate them. The filter has to be analogue and it has to be upstream.
- "The z-transform is the Laplace transform with a different letter." The map
z = esTis not one to one: every s differing byj 2 pi/Tlands on the same z, which is aliasing expressed as geometry. That is why the stability boundary changes from a line to a circle and why the whole left half-plane compresses into a disc of radius 1.
What you now know
A continuous design becomes a digital one at four prices. The hold costs w_gc T/2 radians of phase, 3.6 degrees at 20 Hz on the lead design and 35.7 degrees at 2 Hz. Aliasing folds anything above half the sample rate into the band, turning 60 Hz mains hum into a DC offset at 20 Hz, and the analogue filter that prevents it costs 13.6 degrees at a 5 Hz corner. Quantisation limits resolution at the input, creates limit cycles of about 0.39 degrees at the output, and can silently stall a fixed-point integrator. Computational delay adds up to a full extra sample unless the code is split so the output is written immediately.
Converting the controller itself is done by Tustin's substitution, which never aliases and compresses frequencies by w_d = (2/T)arctan(w_a T/2): a 10 Hz corner discretised at 50 Hz lands at 8.93 Hz unless you prewarp the design frequency to 72.65 rad/s first.
In short: a sample rate is not a computing decision. It is a phase budget, and it should be chosen on the Bode plot before anyone writes a line of firmware.
The remaining lessons stop adding machinery. The next one asks what no amount of it can achieve.
Sources
- Wikipedia contributors. (n.d.). Zero-order hold. Wikipedia. en.wikipedia.org
- Wikipedia contributors. (n.d.). Bilinear transform. Wikipedia. en.wikipedia.org
- Cheever, E. (n.d.). The forward Z transform. Linear Physical Systems Analysis, Swarthmore College. lpsa.swarthmore.edu
- Franklin, G. F., Powell, J. D., and Workman, M. (1998). Digital control of dynamic systems (3rd ed.). Addison-Wesley.
- Astrom, K. J., and Wittenmark, B. (1997). Computer-controlled systems: Theory and design (3rd ed.). Prentice Hall.
- Key terms
- Zero-order hold
- The digital output staying constant between samples; on average it delays the signal by T/2 and costs wT/2 radians of phase.
- Sample rate rule
- Choose T so that wgc T lies between 0.2 and 0.5 radians, putting the sample rate 12 to 30 times the gain crossover frequency.
- Aliasing
- A component at frequency f reappearing at |f - k fs| after sampling; 60 Hz hum sampled at 20 Hz becomes a DC offset.
- Anti-aliasing filter
- An analogue low-pass filter placed before the converter; it must be upstream, and its phase lag lands inside the control loop.
- Quantisation limit cycle
- The persistent hunt caused by an integrator chasing a steady value that falls between two output codes; about one code times the plant gain.
- Computational delay
- The lag between reading the sensor and writing the actuator, up to a full sample if the code writes at the start of the next period.
- Bilinear transform
- s = (2/T)(z - 1)/(z + 1), which maps the imaginary axis onto the unit circle, so it never aliases and preserves stability.
- Prewarping
- Replacing a design frequency by (2/T)tan(wT/2) before applying Tustin, so that exactly one chosen feature lands where intended.
Can Anything Be Controlled? The Waterbed, the Wrong-Way Zero and the Delay
- State Bode's sensitivity integral and verify the waterbed effect numerically on the motor position loop.
- Compute the bandwidth ceilings imposed by a right half-plane zero and by a time delay, and compare them with achieved designs.
- Distinguish limits that bind any feedback loop from limits that bind only one architecture, and say which techniques escape which.
Two engineers, both experienced, disagree about what control can do.
The first says the limits are engineering, not physics. Her evidence is a list. The F-16 and the X-29 are aerodynamically unstable and fly, because the flight control computer stabilises them forty times a second. A Falcon 9 first stage lands on a barge. A Segway balances a person on two wheels. Every one of these was declared impractical by somebody, and the objection was answered by faster sensors, faster computing and better actuators. Give her enough of those and she will control anything.
The second says three quantities in a plant set ceilings that no controller can lift: unstable poles, right half-plane zeros, and time delay. His evidence is a set of integrals proved in the 1940s and sharpened in the 1980s, which say nothing about how clever the designer is. On his account, the flight computer did not defeat a limit; it paid the price the limit demanded, in bandwidth and in sensor quality, and the aircraft would be uncontrollable if the price had been higher than the hardware could pay.
Both are right about something, and separating the two claims is worth the lesson, because a designer who cannot tell a hard ceiling from a hard problem will either give up too early or promise something that cannot be delivered.
The evidence for the second engineer: Bode's integral
Take a loop whose open-loop transfer function is stable and rolls off with a relative degree of at least two, which describes almost every real plant. Then Bode's sensitivity integral says
integral from 0 to infinity of ln|S(jw)| dw = 0.
Sensitivity measures disturbance rejection: |S| < 1 is rejection, |S| > 1 is amplification. The integral being zero means the area of log-rejection below the axis must be exactly repaid by an equal area of log-amplification above it. Push the sensitivity down at one frequency and it rises somewhere else. This is the waterbed effect, and the name is honest.
Verify it on the motor position loop, integrating numerically from 0 to 400 rad/s.
| K | Rejection area (below 0 dB) | Amplification area (above) | Integral | Ms | at frequency |
|---|---|---|---|---|---|
| 14.35 | -1.27 | +1.28 | 0.002 | 1.55 (3.8 dB) | 1.89 rad/s |
| 40 | -2.77 | +2.77 | 0.003 | 2.72 (8.7 dB) | 2.80 rad/s |
| 60 | -3.70 | +3.70 | 0.003 | 4.21 (12.5 dB) | 3.32 rad/s |
| 100 | -5.23 | +5.23 | 0.003 | 15.74 (23.9 dB) | 4.13 rad/s |
The two areas track each other to three decimal places at every gain, which is the theorem being obeyed rather than approximated. And notice what raising the gain bought and cost: four times more rejection area at low frequency, and a sensitivity peak that went from 1.55 to 15.74. At K = 100 there is a band of frequencies near 4 rad/s where this loop makes disturbances almost sixteen times worse than no control at all.
For an open-loop unstable plant the integral is not zero but positive:
integral of ln|S| dw = pi times the sum of the real parts of the unstable poles.
The inverted pendulum of Lesson 2 has a pole at +4.43, so any controller that stabilises it must produce at least pi x 4.43 = 13.9 units of amplification area. That is not a design flaw to be engineered away; it is the entry fee for stabilising the thing at all.
The wrong-way zero
A plant is non-minimum phase when it has a zero in the right half-plane, and the symptom is an output that initially moves the wrong way. A boiler drum's water level rises when cold feedwater is added, because the colder water collapses steam bubbles later but shrinks them first. An aircraft loses altitude in the first moment after the elevator commands a climb. A car reversing turns the wrong way at first.
The constraint is exact and short. At a right half-plane zero z, the loop transfer function vanishes, so S(z) = 1 regardless of the controller. Sensitivity is pinned at unity at a point in the right half-plane, and by the Poisson integral this forces |S| to be large near frequencies around z. The working rule is that the achievable gain crossover satisfies
w_gc < z/2 roughly.
The oven's 15 second delay, approximated by a first-order Pade term, contributes a right half-plane zero at 2/L = 0.1333 rad/s, so the ceiling is about 0.067 rad/s. The SIMC design of Lesson 8 achieved 0.0341 rad/s, close to half the ceiling, and Lesson 12's honest failure to meet its three-part specification was this ceiling asserting itself.
The delay
A pure delay costs nothing in magnitude and -w tau radians of phase, without limit. Since the phase margin has to survive that, the crossover is bounded by roughly w_gc < 1/tau, which for the oven is 0.067 rad/s, exactly agreeing with the Pade estimate.
Where delay becomes dramatic is in combination with an unstable pole. The result to know is that a plant with a single unstable pole p and a delay tau can be stabilised only if
p tau < 1,
and robust designs need considerably less than that. You have tested this yourself. Balancing a stick on your palm is an inverted pendulum with your visuomotor loop closing at a delay of roughly 0.1 s.
| Object | Length | Unstable pole p | p tau at tau = 0.1 s | Everyday verdict |
|---|---|---|---|---|
| Broom | 1.5 m | 2.56 per second | 0.26 | Easy |
| Metre rule | 0.5 m | 4.43 per second | 0.44 | Possible, needs attention |
| Pencil | 0.15 m | 8.09 per second | 0.81 | Essentially impossible |
The order in that last column is not about skill. It is p tau approaching 1, and it is why nobody balances a pencil and everybody can balance a broom.
Why this matters: these three quantities are properties of the plant together with the choice of sensor and actuator. They are fixed before a controller exists, which means the most valuable control engineering often happens in the mechanical design review, not afterwards.
The evidence for the first engineer
Now the other side, which is stronger than it first appears. Every integral above constrains S, the sensitivity function of one feedback loop with one measurement. Three routine techniques do not live in S.
- Feedforward. If a disturbance can be measured before it reaches the output, it can be cancelled by a path that never goes round the loop. Boiler drum level control uses three-element control, feeding forward both steam flow and feedwater flow, and it beats the shrink-and-swell zero for exactly this reason. No sensitivity integral is violated, because the improvement does not appear in S.
- Two degrees of freedom. Lesson 9's setpoint weighting cut the peak demand tenfold without moving the disturbance response. Tracking and rejection are separate transfer functions and can be shaped separately.
- The Smith predictor. Wrap a model of the delay-free plant around the controller so that the delay leaves the characteristic equation. On the oven this permits a much faster setpoint response than 0.067 rad/s would suggest.
But look closely at each escape. Feedforward needs the disturbance measured and the model accurate, and does nothing for disturbances you cannot see. Two-degree-of-freedom design improves tracking and leaves disturbance rejection exactly where the integral put it. The Smith predictor moves the delay out of the setpoint response and leaves it in the disturbance response, and it degrades sharply when the assumed delay is wrong, which is why it is rare in plants whose delay varies with flow rate.
What would settle it
The dispute resolves once the question is stated precisely, and the precise question is: a limit on what?
| Claim | Binds | Escapable by |
|---|---|---|
| Bode integral, area conservation | S, for any linear controller on that plant and sensor | Nothing in the loop; only a different plant or sensor |
| RHP zero, wgc below z/2 | S and T together | Moving the sensor or actuator so the zero disappears |
| Delay, wgc below 1/tau | S; and T unless a model is used | Smith prediction for tracking, never for rejection |
| Tracking a known reference | Nothing fundamental | Feedforward and two-degree-of-freedom design |
| Rejecting a measured disturbance | Nothing fundamental | Feedforward from the measurement |
So the first engineer is right that most tasks declared impossible were merely expensive, and right that architecture beats cleverness. The second is right that when the limit does bind, no amount of sensing or computing lifts it, because the constraint is on a function of the plant rather than on the controller. The X-29 did not repeal Bode's integral. It paid pi times the sum of its unstable poles in amplification area, and its designers made sure the amplification landed at frequencies where the airframe had nothing to excite.
Common misconceptions
- "The waterbed effect means feedback cannot help." It means the help has to be paid for somewhere in frequency. At K = 14.35 the motor loop rejects disturbances well below 1 rad/s and amplifies them slightly near 1.9 rad/s, and that is an excellent trade if the disturbances you care about are slow.
- "A non-minimum-phase plant just needs a compensator with a matching pole." Cancelling a right half-plane zero requires a right half-plane pole in the controller, which makes the controller unstable and the closed loop internally unstable, exactly as Lesson 7 warned about cancelling right half-plane poles. There is no cancellation route out.
- "Faster computing solves a delay." The delay is in the plant, not the controller. Making the controller instantaneous removes the computational part of the loop delay, which Lesson 16 priced, and does nothing about the 15 seconds heat takes to reach the thermocouple.
- "These limits are theoretical." They are the reason the Lesson 12 specification failed, the reason the oven cannot be tuned faster, and the reason a long broom is easier to balance than a pencil. Every one of those is a measurement you can make this afternoon.
Looking back
Three quantities in the plant set the ceilings. Unstable poles force a minimum amplification area of pi times the sum of their real parts, 13.9 for the inverted pendulum. Right half-plane zeros pin S to 1 at the zero and hold the crossover below roughly z/2. Delay holds it below roughly 1/tau, and combined with an unstable pole demands p tau < 1, which is why a broom at 0.26 is easy and a pencil at 0.81 is not.
Verified numerically on the motor, the sensitivity integral came out at 0.002 to 0.003 at every gain from 14.35 to 100, while the sensitivity peak grew from 1.55 to 15.74. The areas balanced exactly, as they must.
The core of it: the limits bind the feedback loop, not the control system. Feedforward, two-degree-of-freedom structures and prediction escape the tracking constraints and never escape the rejection ones, and the honest first question about any control problem is which kind of constraint you are up against.
One case is worth carrying out of this course with you. At Three Mile Island on 28 March 1979 the plant had good sensors, competent operators and a working control system, and for roughly two hours the measurement everyone trusted told them the opposite of the truth: the pressuriser level read high and rising while the reactor coolant was draining through a stuck relief valve. The instrument was not broken. It was answering a different question than the one the control room was asking it, and no compensator on any of these pages would have changed the outcome. Every method in this course assumes the measurement means what you think it means, which is the one assumption the methods themselves cannot check.
Sources
- Wikipedia contributors. (n.d.). Bode's sensitivity integral. Wikipedia. en.wikipedia.org
- Wikipedia contributors. (n.d.). Minimum phase. Wikipedia. en.wikipedia.org
- Freudenberg, J. S., and Looze, D. P. (1985). Right half plane poles and zeros and design tradeoffs in feedback systems. IEEE Transactions on Automatic Control, 30(6), 555-565.
- Skogestad, S., and Postlethwaite, I. (2005). Multivariable feedback control: Analysis and design (2nd ed.), Chapters 5 and 6. Wiley.
- Astrom, K. J., and Murray, R. M. (2021). Feedback systems: An introduction for scientists and engineers (2nd ed.), Chapter 14. Princeton University Press.
- U.S. Nuclear Regulatory Commission. (n.d.). Backgrounder on the Three Mile Island accident. NRC. nrc.gov
- Key terms
- Bode's sensitivity integral
- For a stable loop of relative degree two or more, the integral of ln|S| over frequency is zero, so rejection at one frequency is repaid by amplification at another.
- Waterbed effect
- The consequence of that conservation: pushing sensitivity down in one band pushes it up in another, with the log areas balancing.
- Unstable pole penalty
- For an unstable open loop the integral becomes pi times the sum of the unstable poles' real parts, a mandatory amplification area.
- Non-minimum phase zero
- A zero in the right half-plane; it pins S to 1 at that point and limits the achievable crossover to roughly half the zero frequency.
- Initial undershoot
- The visible symptom of a right half-plane zero: the output first moves opposite to the eventual direction, as in boiler drum shrink and swell.
- Delay bandwidth limit
- A delay tau holds the gain crossover below roughly 1/tau, and with an unstable pole p requires p tau below 1 for stabilisability at all.
- Smith predictor
- A structure that models the delay-free plant so the delay leaves the characteristic equation; it helps tracking, not disturbance rejection, and needs the delay known.
- Three-element control
- Boiler drum level control that feeds forward steam flow and feedwater flow, beating the shrink-and-swell zero without appearing in S at all.