D3 · Lesson 9 · State space
Describing a system by its state vector and first-order equations ẋ = Ax + Bu, a mass on a spring as the example, the eigenvalues of A as the poles, the trace and determinant of a 2 × 2 system, and state feedback u = −Kx that places the closed-loop poles wherever you choose
Transfer functions describe one input and one output. A rocket has several engines and dozens of sensors, and a battery's state of charge isn't directly measurable at all. State space describes a system by a list of numbers, its state, that captures everything about its past that matters for its future (a mass's position and velocity, a circuit's capacitor voltages and inductor currents) and a set of first-order differential equations for how they change. Feeding back the whole state lets a controller put the closed-loop poles anywhere, and it's the language of modern control, from the Apollo guidance computer to a drone's flight controller.
- A unit mass driven by a force (a double integrator, like the drone of lesson 3 or a cart on a track) with state feedback on its position and velocity .
- The arrows show where the state moves from each point; the traced paths start from three different initial states.
- acts like a spring and like a damper: the closed-loop poles are the roots of , so any pair of poles is reachable by choosing the two gains.
Predict
A mass of 2 kg on a spring of 8 N/m with damping 2 N·s/m has state . What are the eigenvalues of its A matrix?
gives , , so . Its characteristic polynomial is , with roots : the same as the transfer function's poles.
Name it
The state equations
An nth-order system has n states. For a mass m on a spring k with damping b and applied force u, with :
Poles are eigenvalues
The system's poles are the eigenvalues of A, the roots of . For a 2 × 2 matrix that's , so the poles sum to the trace and multiply to the determinant. Stable 2 × 2 systems have a negative trace and a positive determinant.
State feedback
Feeding back every state, , gives : the gains change the matrix and so the poles. If the system is controllable (the input can influence every state, tested by the rank of ), any set of pole locations can be reached. For the double integrator, matching to gives
States that can't be measured are estimated by an observer, a model of the system run alongside it and corrected by the measured outputs (S9).
Worked example
Choose state-feedback gains for a unit mass so that its closed loop has = 4 rad/s and ζ = 0.7.
Show the solution
- Position gain.
- Velocity gain.
- Closed-loop poles.
Answer = 16 N/m and = 5.6 N·s/m.
Worked example
A 2 × 2 system has trace −6 and determinant 25. Where are its poles?
Show the solution
- Characteristic equation.
- Poles.
- What they mean. The system is stable, oscillating at 4 rad/s with a decay time constant of 1/3 s.
Answer the poles are at .
Worked example
The unit mass's controller has = 4 rad/s. An observer that measures position should be about four times faster. What observer gains give = 16 rad/s and ζ = 0.7?
Show the solution
- Same form as the controller. The observer's error obeys the same form as the controlled mass.
- First gain.
- Second gain.
- Settling. Its estimate settles in about well before the controller's own response.
Answer = 22.4 s⁻¹ and = 256 s⁻².
Check
A 2 kg mass on a 4 N/m spring has state (position, velocity). What's the lower-left entry of its A matrix?
Check
A 2 × 2 system has trace −4 and determinant 13, so its poles are complex. What's their real part?
Check
For a 1 kg double integrator, what position gain gives a closed-loop natural frequency of 5 rad/s?
Write units the way you normally would: 1.5 N/m, 1500 mN/m and 0.0015 kN/m are the same answer.
Check
For the same 1 kg double integrator, what velocity gain gives = 5 rad/s and ζ = 0.5?
Write units the way you normally would: 1.5 N·s/m, 1500 mN·s/m and 0.0015 kN·s/m are the same answer.
Check
A unit mass under state feedback should have = 4 rad/s and ζ = 0.5.
(a)
What is ?
Write units the way you normally would: 1.5 N/m, 1500 mN/m and 0.0015 kN/m are the same answer.
(b)
What is ?
Check
A 2 × 2 system matrix has trace −6 and determinant 29.
(a)
What is the real part of its poles?
(b)
What is their imaginary part?
Write units the way you normally would: 1.5 rad/s and 1500 mrad/s are the same answer.
Explain why
Why can full state feedback place a controllable system's poles anywhere?
A system's poles are the eigenvalues of its A matrix, and feeding back each state through its own gain adds a term to every row the input reaches, changing the matrix to A minus BK. Each gain adds an independent adjustable number to the coefficients of the characteristic polynomial, so with as many gains as states there are enough free parameters to match any desired polynomial, and hence any set of poles. Controllability is the condition that the input actually reaches every state, directly or through the dynamics; if some state can't be influenced, its pole stays where it is whatever the gains. In practice the limit is actuator effort: fast poles need large gains and large forces.
Practice
Keep practicing
9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.