C9 · Lesson 45 · State-space models
Systems as first-order matrix equations
Transfer functions describe a system from the outside: input in, output out. A state-space model describes it from the inside, with a short list of numbers, the state, that captures everything about the system's past that matters for its future: a capacitor's voltage, an inductor's current, a motor's position and speed. The state changes by a first-order matrix equation, which is how simulators step systems forward in time, how controllers estimate what they can't measure, and the natural way to handle several inputs and outputs at once. The poles turn out to be the eigenvalues of a matrix.
- A damped oscillator, and , drawn as a phase portrait: the state moves along the arrows, and the curves are paths from two starting states.
- With small ζ the path spirals in slowly: an underdamped ringing. Raise ζ past 1 and the spiral straightens: no oscillation.
- Set ζ to 0: the paths are closed loops, oscillating forever. The readouts are the eigenvalues of the matrix, the system's poles.
Predict
A system has . What are its poles?
−2, twice. The eigenvalues solve . That's critical damping, ζ = 1: the fastest response with no overshoot.
Name it
The model
The state has one entry per energy store (capacitor voltages, inductor currents, positions and velocities), so its length is the system's order.
From a differential equation. with , :
From a circuit. A series RLC driven by , with states and : and .
Poles and transfer function
The poles are the eigenvalues of A, the roots of . For a 2 × 2 matrix that's
so the eigenvalues add to the trace and multiply to the determinant. The transfer function is , and its DC gain is .
Discrete time and simulation
is stable when every eigenvalue of A has magnitude below 1. Simulating the continuous model with Euler's method, , is a discrete system with matrix ; for that's , stable only if , which is why stiff systems need small steps or implicit methods (A8).
Worked example
Write in state space and find its poles and DC gain.
Show the solution
- State matrices. with and .
- Poles. Trace −3, determinant 2: gives −1 and −2.
- DC gain. Set y' = y'' = 0, so y = u/2: a DC gain of 0.5.
Answer poles at −1 and −2, and a DC gain of 0.5.
Worked example
A series RLC has R = 2 Ω, L = 1 H, C = 0.5 F. Find A and its eigenvalues.
Show the solution
- State equations.
- The A matrix.
- Eigenvalues. Trace −2, determinant 2: so s = −1 ± j.
- Natural frequency and damping. So and .
Answer A has rows [0, 2] and [−1, −2], and its eigenvalues are −1 ± j.
Worked example
, , with . Find the eigenvalues and .
Show the solution
- Eigenvalues. A is upper triangular, so the eigenvalues are its diagonal: −1 and −2.
- The second state.
- The first state. With , the solution of is
- At t = 1. The slower mode, , dominates after a second.
Answer the eigenvalues are −1 and −2, and = 0.600.
Check
is written in state space with , .
(a)
What is the bottom-left entry of A?
(b)
What is the damping ratio of its poles?
Check
.
(a)
What do its eigenvalues add up to?
(b)
What do they multiply to?
Check
What is the DC gain of ?
Check
A series RLC (R = 1 Ω, L = 0.5 H, C = 0.01 F) has states and .
(a)
What is the entry of A giving 's dependence on itself?
(b)
What is ?
Write units the way you normally would: 1.5 rad/s and 1500 mrad/s are the same answer.
Check
A discrete system has (real eigenvalues). What is its larger eigenvalue?
Check
Euler's method simulates with step h. Above what h does the simulation blow up?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
How many state variables does a circuit with two capacitors and one inductor (no loops of only capacitors, no cutsets of only inductors) need?
Check
A 2 × 2 matrix A has trace −7 and determinant 2.
(a)
What is its eigenvalue nearer zero?
(b)
And the other?
Check
, .
(a)
What is its DC gain?
(b)
What is its time constant?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Explain why
Why are a state-space model's poles the eigenvalues of A?
With no input, the state obeys . If the state starts along an eigenvector v of A with eigenvalue λ, then and the solution is just : that direction grows or decays on its own as . Any starting state is a combination of eigenvectors, so the free response is a sum of such exponentials, one per eigenvalue. Those are exactly the system's natural modes, which is what poles are; equivalently, in the transfer function blows up when .
Practice
Keep practicing
11 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.