Linearisation About an Operating Point
Almost nothing real is linear. A tank drains with the square root of its level, a pendulum's restoring torque goes with , a thermistor's resistance falls exponentially with temperature, a fan's thrust goes with speed squared. Yet every tool in this course (transfer functions, root locus, Bode plots, state-space design) needs a linear model. The bridge is linearisation: near the point where the system normally sits, a smooth nonlinear system behaves like a linear one, and a controller that keeps it near that point can be designed from the linear model. This lesson shows how, and how to tell when the approximation breaks.
Equilibrium, deviation, Taylor
Write the model as , . An operating point (equilibrium) satisfies : with the input held at , the state stays at . Define deviations , , and keep the first-order terms of the Taylor series:
For one state this is just the slope of each nonlinear term; for several states the partial derivatives form Jacobian matrices, the of a state-space model. The mathematics is in Critical Points and Linearization. Three things to remember:
- The linear model is in deviation variables. Its "zero" is the operating point, so a controller designed on it adds back (the feedforward or bias term) and compares with .
- The coefficients depend on the operating point. A tank's time constant at differs from that at .
- The model is good for small deviations; how small depends on how curved is.
Worked example: a pendulum arm held at 30 degrees
Given: a light rod of length with a mass at the end, driven by a motor torque , with viscous friction , :
Find: the holding torque at , the linear model there with its and , and the final angle for torque steps of and , linear against exact.
Solve:
- Equilibrium: .
- Slope of at : . Linear model: , so with and , very lightly damped.
- (): linear , so ; exact .
- : linear ; exact . The error grew from to .
Check: the program derives the Jacobian with SymPy, then simulates both models.
import numpy as np
import sympy as sp
from scipy.integrate import solve_ivp
m, l, b, g = 0.1, 0.2, 0.002, 9.81
th, om, tau = sp.symbols("theta omega tau")
f = sp.Matrix([om, (tau - b * om - m * g * l * sp.sin(th)) / (m * l**2)])
th0 = sp.pi / 6
tau0 = m * g * l * sp.sin(th0)
A = f.jacobian([th, om]).subs({th: th0, om: 0, tau: tau0})
B = f.jacobian([tau]).subs({th: th0, om: 0, tau: tau0})
A = np.array(A.evalf(), dtype=float)
B = np.array(B.evalf(), dtype=float)
print("A =", np.round(A, 3).tolist(), " B =", np.round(B, 1).ravel().tolist())
print("eigenvalues of A:", np.round(np.linalg.eigvals(A), 3))
tau0 = float(tau0)
for step in (0.10, 0.50):
T = tau0 * (1 + step)
nl = solve_ivp(lambda t, x: [x[1], (T - b * x[1] - m * g * l * np.sin(x[0])) / (m * l**2)],
(0, 300), [np.pi / 6, 0], rtol=1e-9, atol=1e-12)
li = solve_ivp(lambda t, d: A @ d + B.ravel() * (T - tau0), (0, 300), [0, 0], rtol=1e-9, atol=1e-12)
print(f"torque +{100 * step:.0f} %: exact {np.degrees(nl.y[0][-1]):.2f} deg, linear {30 + np.degrees(li.y[0][-1]):.2f} deg")A = [[0.0, 1.0], [-42.479, -0.5]] B = [0.0, 250.0]
eigenvalues of A: [-0.25+6.513j -0.25-6.513j]
torque +10 %: exact 33.37 deg, linear 33.31 deg
torque +50 %: exact 48.59 deg, linear 46.54 deg
The eigenvalues are the poles of the linear model: and . Repeat the calculation at and the slope turns negative: a pendulum held above the horizontal is unstable, one eigenvalue moves into the right half-plane, and only feedback can hold it there. That is the classic inverted-pendulum problem; state feedback stabilises it (Pole Placement, practice 3).
In the lab: the small-angle pendulum
The physics pendulum lab draws the linearised solution , with about the hanging equilibrium. For (its shortest setting) it shows a period of ( with ), the same at every amplitude. The exact period at is only longer, which is why the linear model is trusted up to there; at it would be longer.
Linearising a sensor: the NTC thermistor
Sensors need the same treatment. An NTC thermistor follows (temperatures in kelvin). Its sensitivity at an operating temperature is the slope . For and at (): and , i.e. . A loop tuned at room temperature (where the slope is ) has a slightly lower loop gain at , and a much lower one at . The cure is to linearise in software (a lookup table or the Steinhart–Hart equation, see Temperature Sensors) so the controller sees kelvin, not ohms.
Guided lab: measure a gain that depends on the operating point
Hand calculation. A small fan driven by PWM has thrust roughly proportional to speed squared, and speed roughly proportional to the average voltage: . The local gain doubles from to .
Simulation. In the program, change to , and and watch fall as shrinks; that is the same effect: one plant, different linear models.
What you would measure. A PC fan on a kitchen scale (blowing upward so the scale reads the thrust as a weight loss), bench supply current-limited to , voltage stepped from to in steps. Plot thrust against voltage, then the slope at each point. Expect the small-signal gain at to be roughly times that at , with scatter from airflow turbulence and the scale's resolution.
Hazards and safe setup. Finger guard on the fan, current-limited supply, nothing loose near the blades. The pendulum part is simulation only; if you build one, use a light arm, a low-voltage motor and a mechanical stop.
Pitfalls
- Linearising about a point that is not an equilibrium: the constant term is then not zero and the "linear" model drifts.
- Forgetting the bias: the linear controller outputs , the actuator needs .
- Designing at one operating point and running at another: check the linear model at the extremes (gain scheduling switches controllers between points).
- Linearising discontinuous nonlinearities (saturation, dead zone, relay, dry friction): they have no slope at the corner; see Nonlinearities.
Practice
- Linearise at . What inflow holds that level, and what is the time constant?
- Linearise about .
- At what angle does the pendulum arm's linear model have zero stiffness?
Answer
- . Slope of the outflow: , so and .
- , .
- At , where : the arm is horizontal and gravity's torque has no slope.
Test yourself
An operating point for linearisation must satisfy
The linearised pendulum at has stiffness . At the stiffness is
- the same
- zero
- negative, so the equilibrium is unstable
- infinite
For the pendulum, a torque step gave linear against exact , a step against . What does this show?
- the linear model is wrong
- the linear model is accurate for small deviations and degrades as they grow
- friction was neglected
- the exact model is unstable
A linear controller designed on a deviation model must
- be retuned every second
- add the operating-point input to its output
- use the same units as the sensor
- contain an integrator