Stability: BIBO, Poles and the Routh–Hurwitz Criterion
Turn up the gain of the heater loop far enough and the block's temperature starts to swing, each swing larger than the last, until the heater is slamming between off and full power. Every feedback loop that has more than a little lag can do this, and a control engineer's first duty is to know the limit before the hardware finds it. This lesson defines stability properly, ties it to the closed-loop poles, and introduces the Routh–Hurwitz criterion, which finds the gain limit with pencil and paper, without computing a single root.
What stable means
A system is BIBO stable (bounded input, bounded output) if every bounded input produces a bounded output. For an LTI system with transfer function (no hidden cancellations) this is equivalent to:
- every pole of has a negative real part (strictly left half-plane);
- equivalently, the impulse response is absolutely integrable, .
| Poles | Classification | Impulse response |
|---|---|---|
| all with | asymptotically stable (BIBO stable) | decays to zero |
| simple poles on the axis, none in the RHP | marginally stable | stays bounded (constant or a sustained sine) but a matching input makes it grow: not BIBO |
| any pole with , or a repeated pole on the axis | unstable | grows without bound |
An integrator is the standard marginal case: its impulse response is a constant, but its step response is a ramp. The theory, for discrete time too, is in System Properties and Transfer Functions and Stability. For a feedback loop the poles of interest are the roots of the characteristic equation , i.e. the zeros of the closed-loop denominator.
Pole–zero cancellation can hide instability: if cancels an unstable plant pole with a zero, looks stable but internal signals (the control effort, for instance) still grow. Stability of a loop means internal stability: every transfer function between any two points in the loop is stable.
The Routh–Hurwitz criterion
For with :
- Necessary: all coefficients exist and are positive. A missing or negative coefficient already means at least one root in the closed right half-plane.
- Routh array: write the coefficients in two rows, alternating, then build each following row from the two above it:
- Result: the number of roots in the right half-plane equals the number of sign changes in the first column. No sign changes: stable.
For a cubic (all positive) the array reduces to one condition worth memorising: .
Special cases. A zero in the first column (other entries non-zero): replace it by a small and continue; count sign changes as . A whole row of zeros: the polynomial has roots symmetric about the origin (often a pair on the axis). Form the auxiliary polynomial from the row above, replace the zero row by its derivative's coefficients, and continue; the auxiliary polynomial's roots are the symmetric roots, and on the stability boundary they give the frequency of oscillation.
Worked example: how much gain can the heater take?
Given: the heater block with a sensor lag and a lag in the driver and heater element, , under P control .
Find: the range of for stability and the frequency at which the loop oscillates at the limit.
Solve:
- Characteristic polynomial: .
- Routh array:
- Stability needs , i.e. , so (the lower limit is irrelevant for a heater).
- At the row is zero. The auxiliary polynomial from the row is : , an oscillation with a period of .
These two numbers, the ultimate gain and the ultimate period , are exactly what the Ziegler–Nichols closed-loop tuning method measures on a real plant. Note that without the two small lags (a first-order plant) no gain would ever make the loop unstable: the small lags the model is tempted to drop are what set the limit.
Check: a Routh routine with the rule, compared with numerically computed roots.
import numpy as np
def routh_first_column(coeffs, eps=1e-9):
"""First column of the Routh array (zero pivots replaced by eps)."""
n = len(coeffs)
cols = (n + 1) // 2
rows = [np.zeros(cols), np.zeros(cols)]
rows[0][: len(coeffs[0::2])] = coeffs[0::2]
rows[1][: len(coeffs[1::2])] = coeffs[1::2]
for _ in range(n - 2):
a, b = rows[-2], rows[-1]
if abs(b[0]) < eps:
b = b.copy(); b[0] = eps
rows[-1] = b
new = np.zeros(cols)
for j in range(cols - 1):
new[j] = (b[0] * a[j + 1] - a[0] * b[j + 1]) / b[0]
rows.append(new)
return np.array([r[0] for r in rows])
def report(name, coeffs):
col = routh_first_column(np.array(coeffs, dtype=float))
changes = int(np.sum(np.diff(np.sign(col)) != 0))
rhp = int(np.sum(np.roots(coeffs).real > 1e-9))
print(f"{name:28s} sign changes {changes}, roots in RHP {rhp}")
for Kp in (10.0, 23.0, 24.0, 40.0):
report(f"heater, Kp = {Kp:4.1f} W/K", [15000, 4550, 315, 1 + 4 * Kp])
report("s^4 + s^3 + 2s^2 + 2s + 3", [1, 1, 2, 2, 3]) # zero in the first column
Ku = (4550 * 315 / 15000 - 1) / 4
w = np.sqrt((1 + 4 * Ku) / 4550)
print(f"ultimate gain {Ku:.2f} W/K, oscillation {w:.4f} rad/s, period {2 * np.pi / w:.1f} s")heater, Kp = 10.0 W/K sign changes 0, roots in RHP 0
heater, Kp = 23.0 W/K sign changes 0, roots in RHP 0
heater, Kp = 24.0 W/K sign changes 2, roots in RHP 2
heater, Kp = 40.0 W/K sign changes 2, roots in RHP 2
s^4 + s^3 + 2s^2 + 2s + 3 sign changes 2, roots in RHP 2
ultimate gain 23.64 W/K, oscillation 0.1449 rad/s, period 43.4 s
The fourth polynomial has all coefficients positive and still two right-half-plane roots: the coefficient test is necessary, not sufficient. Its Routh array hits a zero in the first column at the row; the rule finds the two sign changes.
In the lab: watch a loop go unstable
The PID lab tests stability with Routh–Hurwitz on every slider move. Use the default plant with , : the characteristic polynomial is , and the cubic condition gives . At the lab shows a stable but violent response (overshoot , settling ); at it reports "unstable". At exactly the poles are and : a sustained oscillation with period .
Guided lab: find the ultimate gain of a real loop
Hand calculation. For your rig, estimate the lags (main time constant, sensor, actuator) and compute and with the cubic condition, as in the worked example.
Simulation. Enter your polynomial in the program and sweep .
What you would measure. On the heater rig (P control from a microcontroller, supply current-limited to ), raise in steps around the operating temperature and wait for a small sustained oscillation. Expect within a factor of about 1.5 of the model (the lags are poorly known) and within . The oscillation may not be sinusoidal: once the heater saturates at 0 or , the loop is nonlinear and the amplitude stops growing (a limit cycle, see Nonlinearities). For a faster demonstration, a small DC motor speed loop shows the same behaviour in milliseconds.
Hazards and safe setup. An oscillating heater loop drives the block hotter than its setpoint: keep the software limit and the thermal cut-out active, run at a low setpoint, stop as soon as the oscillation is clear. On a motor rig, an unstable loop can slam the motor between full forward and reverse: clamp it, current-limit the supply, keep the amplitude small.
Pitfalls
- Declaring a loop stable because all coefficients are positive (only sufficient up to second order).
- Trusting a transfer function in which an unstable pole was cancelled.
- Treating a marginally stable system as stable: an integrator alone is not BIBO stable.
- Forgetting that Routh–Hurwitz says nothing about how stable a loop is: a loop just inside the limit rings for a long time; margins measure the distance (Stability Margins).
Practice
- Is stable? How many roots are in the right half-plane?
- For , find the range of for stability and the oscillation frequency at the limit.
- Why is a pure first-order plant under P control stable for every ?
Answer
- : unstable. First column : two sign changes, two roots in the RHP.
- : , so ; at : , .
- The closed loop is first order with pole , always in the left half-plane.
Test yourself
An integrator is
- BIBO stable
- marginally stable, not BIBO stable
- unstable with a right-half-plane pole
- stable only with feedback
For a cubic with all coefficients positive, stability requires
- nothing more
The heater with lags of 300, 10 and 5 s under P control becomes unstable above
- never
A row of zeros in the Routh array indicates
- a computation error
- roots symmetric about the origin, often a pair on the imaginary axis
- a double pole at the origin
- that the system is stable