State Space

State-space models describe systems with first-order matrix equations. Learn states, the A, B, C, D matrices, conversion to transfer functions, eigenvalues and stability, controllability, observability, pole placement, observers and LQR.

A transfer function describes only input–output behaviour. A state-space model describes what's happening inside: a set of state variables (positions, velocities, currents, temperatures) whose rates of change depend on the states and inputs, ẋ = Ax + Bu.

It handles multiple inputs and outputs naturally, works directly in the time domain and is the basis of modern control: pole placement, observers, Kalman filters, LQR and MPC.

An analogy

A state vector is like a complete snapshot of a game: positions and velocities of every piece. Given the snapshot and the next moves (inputs), you can predict everything that follows.

Choosing states

States are the minimum set of variables that, with the inputs, determine the future. For a mechanical system: position and velocity. For an electrical circuit: capacitor voltages and inductor currents (the energy-storage variables). An n-th order differential equation becomes n first-order equations.

Eigenvalues are poles

The eigenvalues of A are the poles of the system. Stability requires all eigenvalues to have negative real parts, and the eigenvectors show which combinations of states each mode moves.

Controllability and observability

Controllable: the inputs can drive the state anywhere (rank test on [B AB …]). Observable: the states can be deduced from the outputs (rank test on [C; CA; …]). Uncontrollable unstable modes can't be fixed by any controller; unobservable modes can't be estimated by any observer.

Pole placement and observers

With full state feedback u = −Kx, the closed-loop matrix A − BK can have its eigenvalues placed anywhere (if controllable) — Ackermann's formula computes K. When not all states are measured, an observer (Luenberger) estimates them; the separation principle lets controller and observer be designed independently. Make observer poles 2–5× faster than controller poles.

Optimal control: LQR and Kalman

The linear-quadratic regulator chooses K to minimise ∫(xᵀQx + uᵀRu)dt, trading state error against control effort through the Q and R weights. The Kalman filter is the optimal observer under Gaussian noise. Together (LQG) they form the backbone of aerospace and robotics control.

Formulas

Worked example: Mass–spring–damper in state space

Given: m = 1, b = 4, k = 16; states x₁ = position, x₂ = velocity; input = force

Find: A, B, C and eigenvalues.

Answer: A = [[0,1],[−16,−4]], λ = −2 ± j3.46

Worked example: Pole placement

Given: Same system; Desired poles −4 ± j4 → s² + 8s + 32

Find: K = [k₁ k₂].

Answer: K = [16 4]

Common mistakes

Applications

Key takeaways

Going further