Nonlinear Systems and Linearization
Nonlinear systems are the rule rather than the exception in realistic simulation. Friction changes sign, actuators saturate, valves have square-root flow laws, biological populations grow with limiting effects, and chemical reaction rates multiply concentrations. Linear tools are still valuable, but only after the modeler recognizes where the nonlinearities enter and what operating region is being studied.
Linearization builds a local linear approximation around an equilibrium or trajectory. It does not make the original system linear; it gives a model that predicts small deviations near the chosen point. This is especially useful for controller design, small-signal frequency response, and quick stability checks before running large nonlinear simulations.
Definitions
A nonlinear state model has the form
An equilibrium satisfies
Deviation variables measure small changes from the operating point:
The first-order Taylor approximation gives
where the Jacobian matrices are evaluated at the operating point:
Common nonlinear elements include saturation, dead zone, relay, Coulomb friction, backlash, hysteresis, quantization, square-root flow, and products of states.
Key results
Linearization is a local approximation. For a scalar function ,
At an equilibrium, , so the constant term disappears in deviation coordinates. Away from equilibrium, the constant term must be retained or the system must be linearized along a trajectory.
For a nonlinear scalar first-order model
an equilibrium is locally stable if
unstable if , and inconclusive by first-order linearization if .
Saturation changes effective system behavior. A commanded input passed through saturation is
Inside the linear range, the slope is one; outside, the slope is zero. A linearization taken in saturation therefore may predict loss of control authority.
The operating point must be stored together with the linear model. The matrices , , , and describe deviations, not absolute variables, unless the model has been written in absolute affine form. For example, a tank linearized at meters and another tank linearized at meter can have different outlet slopes. If their matrices are saved without the corresponding equilibrium heights and inputs, later comparisons can be misleading.
For simulation studies, a useful workflow is to run the nonlinear model and the linearized model side by side under the same small perturbation. Agreement near the operating point verifies the Jacobian and confirms that the perturbation is small enough. Disagreement under a larger perturbation is not necessarily a failure; it is often the expected evidence that nonlinear behavior is important. The time-response plot should therefore be read as an operating-range test, not only as a prediction.
Linearization can also be performed numerically when symbolic derivatives are inconvenient, but the perturbation size must be chosen carefully. Too large a perturbation measures curvature rather than local slope; too small a perturbation can be dominated by roundoff or solver noise. MATLAB and Simulink linearization tools automate much of this process, yet the resulting matrices still need physical review: signs, units, equilibrium values, and expected mode locations should all be checked.
Visual
| Nonlinearity | Mathematical feature | Simulation effect | Linearization warning |
|---|---|---|---|
| Saturation | Clipped input/output | Limited response and windup risk | Slope may become zero |
| Dead zone | No output near zero | Delayed response | Linear slope depends on operating point |
| Coulomb friction | Sign function | Stick-slip and discontinuity | Not differentiable at zero velocity |
| Square-root flow | State-dependent time constant | Derivative large near zero | |
| Product term | or | Coupled gain changes | Jacobian depends on both variables |
Worked example 1: Linearize a nonlinear tank outlet
Problem: A tank obeys
with , , and nominal inflow . Find the equilibrium height and the linearized model in deviation variables.
- Write the scalar state equation:
- Find equilibrium by setting :
- Solve for :
- Compute the Jacobian with respect to :
At ,
- Compute the input Jacobian:
- Write deviation model:
Checked answer: the local time constant is . The time-response plot for a small inflow step should resemble a first-order exponential around . For a large step, the nonlinear square-root law changes the effective slope and the linear approximation becomes less accurate.
Simulink description: the nonlinear model uses a Sqrt block in the outlet feedback. The linearized model uses a Sum, Gain on , Gain on , and an Integrator for . Plot both absolute height responses using .
Worked example 2: Linearize a pendulum near downward equilibrium
Problem: A damped pendulum satisfies
Let , , and input . Linearize about , , .
- Write the state equations:
- Compute partial derivatives for the first equation:
- Compute partial derivatives for the second equation:
- Evaluate at :
- Assemble matrices:
Checked answer: the small-angle approximation gives the same result. The nonlinear and linear time-response plots should agree for small initial angles such as , but diverge for large angles such as because the sine curve is no longer close to its tangent.
Simulink description: create the nonlinear pendulum with a Trigonometric Function block for sin, damping feedback, torque input, and two integrators. The linear model can use a State-Space block. Scope both angles on the same plot.
Code
clear; clc; close all;
% Nonlinear tank versus local linear model
A = 2; k = 0.6; qbar = 1.2; hbar = (qbar/k)^2;
dfdh = -k/(2*A*sqrt(hbar));
dfdq = 1/A;
qstep = 0.1;
nonlinear_tank = @(t,h) (qbar + qstep - k*sqrt(max(h,0)))/A;
linear_tank = @(t,dh) dfdh*dh + dfdq*qstep;
[tn, hn] = ode45(nonlinear_tank, [0 80], hbar);
[tl, dhl] = ode45(linear_tank, [0 80], 0);
figure;
plot(tn, hn, 'b-', tl, hbar + dhl, 'r--', 'LineWidth', 1.4);
grid on; xlabel('Time (s)'); ylabel('Height (m)');
legend('Nonlinear', 'Linearized', 'Location', 'best');
title('Nonlinear tank and local linear approximation');
% Pendulum nonlinear versus linear for small initial angle
m = 1; ell = 1; b = 0.1; g = 9.81;
x0 = [5*pi/180; 0];
pend_nl = @(t,x) [x(2); -(b/(m*ell^2))*x(2) - (g/ell)*sin(x(1))];
Apend = [0 1; -g/ell -b/(m*ell^2)];
pend_lin = @(t,x) Apend*x;
[t1, xnl] = ode45(pend_nl, [0 10], x0);
[t2, xlin] = ode45(pend_lin, [0 10], x0);
figure;
plot(t1, xnl(:,1), 'b-', t2, xlin(:,1), 'r--', 'LineWidth', 1.4);
grid on; xlabel('Time (s)'); ylabel('\theta (rad)');
legend('Nonlinear', 'Linearized', 'Location', 'best');
title('Small-angle pendulum comparison');
The tank plot should show close agreement for the small inflow perturbation. The pendulum plot should show nearly identical small-angle motion; increasing the initial angle reveals the limits of linearization. These comparisons are stronger than simply deriving a Jacobian because they show the operating range over which the approximation is useful.
Common pitfalls
- Linearizing before finding a valid operating point. The constant term will not vanish unless the point is an equilibrium.
- Applying a small-signal model to a large transient, especially through saturation or dead-zone regions.
- Differentiating discontinuous nonlinearities as if they were smooth. Friction, relays, and quantizers need special treatment.
- Forgetting to convert deviation outputs back to physical variables before comparing with nonlinear simulation.
- Assuming stability of the linearized model proves global nonlinear stability. It only gives local information under appropriate conditions.
- Ignoring units in Jacobians. Each matrix entry has units determined by the derivative it represents.