HuntsvilleEngineers mark
HE Reference Shelf — huntsvilleengineers.com
The Reference Shelf · Applied Engineering Math

State-space representation

A way to write a system's dynamics as one first-order matrix equation for how its internal state changes, plus a second one for what you actually measure.

Also known as: state variable model · A B C D matrices · state equations

The formula

Continuous-time, linear, time-invariant:

x'(t) = A·x(t) + B·u(t)      (state equation)
y(t)  = C·x(t) + D·u(t)      (output equation)
  • x is the state vector — the minimum set of numbers that, with the future input, fully determines the future. Reading: the rate of change of state is a linear mix of the current state and the current input.
  • y is what your sensors report. Reading: the output is a linear mix of state and a direct feedthrough of the input.

The four matrices and their shapes, for n states, p inputs, q outputs:

A : n×n   state (dynamics) matrix   — how the states drive each other
B : n×p   input matrix              — how inputs push the states
C : q×n   output matrix             — which states the sensors see
D : q×p   feedthrough matrix         — input that appears instantly at the output

Discrete-time (a sampled controller running in a loop):

x[k+1] = A·x[k] + B·u[k]
y[k]   = C·x[k] + D·u[k]

Same structure; the state at the next sample is a linear function of this sample's state and input. Caution: the discrete A and B are not the continuous ones — for a zero-order hold and sample period T, A_d = e^(A·T) (MATLAB c2d, scipy cont2discrete), not the continuous A. And the stability test changes with it: the discrete form is stable when every eigenvalue has magnitude less than 1 (inside the unit circle), not negative real part — λ = −1.2 passes the negative-real-part test and is still unstable in discrete time.

The bridge back to the classical single-input/single-output world is the transfer function:

G(s) = C·(s·I − A)⁻¹·B + D

Reading: invert (s·I − A), sandwich it with C and B, add the feedthrough, and you have the same system in Laplace form. For a minimal realization — one that is both controllable and observable — the eigenvalues of A are exactly the poles of G(s); in general every pole of G(s) is an eigenvalue of A, but uncontrollable or unobservable modes drop out of G(s), so a clean-looking transfer function can sit on top of a state matrix with extra (even unstable) eigenvalues. See the hide-poles gotcha below. Either way, the state matrix already contains the system's natural frequencies and damping.

Where you meet it

  • Any MIMO control design. The instant a system has more than one actuator or more than one sensor — a gimbaled thrust-vector stage with pitch and yaw, a six-axis motion table, a flight control law coupling roll and yaw — the tidy H(s) transfer function stops scaling. Every modern toolbox (MATLAB ss(), Python control, Simulink) carries the plant as A, B, C, D because that form handles two inputs and five outputs as easily as one of each.
  • A design review, on the projector. Someone puts up the A matrix and reads its eigenvalues off a slide. For the continuous-time A, positive real part on any eigenvalue means an unstable mode, full stop — no Bode plot needed (for a discrete-time A, the line is the unit circle instead). The review board looks at eigenvalues the way a structures board looks at margins of safety.
  • A Kalman filter on a test stand. State estimation lives natively in state-space. You cannot write a Kalman filter as a transfer function; it needs A, B, C plus the process- and measurement-noise covariances to blend a model prediction with noisy sensor data.
  • Modal test data reduction. A vibration rig gives you natural frequencies and mode shapes. Each mode becomes two states (position and velocity), and the assembled A matrix is the reduced model handed to the controls group for a notch or active-damping design.

How it works

The move that makes it work is order reduction by bookkeeping. A single n-th order differential equation — say a mass-spring-damper, m·x'' + c·x' + k·x = F — becomes a stack of first-order equations by naming intermediate quantities as states. Let x1 = position, x2 = velocity. Then x1' = x2, and x2' = (−k·x1 − c·x2 + F)/m. Written as matrices:

A = [  0      1   ]     B = [ 0   ]     C = [ 1  0 ]     D = [ 0 ]
    [ -k/m  -c/m  ]         [ 1/m ]

That is the whole trick, scaled up: any n-th order system, or any pile of coupled equations, collapses into one first-order vector equation. Computers love first-order vector ODEs; that's why every integrator and every solver speaks this language.

Worked numbers, m = 2, c = 3, k = 8. The eigenvalues of A come out to −0.75 ± 1.854j, which are identical to the roots of 2s² + 3s + 8. Natural frequency ωn = √(k/m) = 2.0 rad/s, damping ratio ζ = c/(2·√(k·m)) = 0.375. Evaluate G(s) = C·(sI − A)⁻¹·B + D at s = 2j and you get −0.1667j, exactly matching 1/(m·s² + c·s + k). The two representations are the same system wearing different clothes.

Gotchas that bite people:

  • The representation is not unique. Any invertible change of variables z = T·x gives a different A, B, C, D for the identical system. Two engineers can hand in matrices that look nothing alike and both be right. Compare eigenvalues and transfer functions, not the raw entries.
  • D is almost always zero, until it isn't. A nonzero D means the input reaches the output with no lag — a pure algebraic path. Real actuators and sensors usually roll off, so D = 0. But a proportional feedforward term or a direct sensor tap puts entries in D, and forgetting it shifts your high-frequency gain.
  • State-to-transfer-function can hide poles; transfer-function-to-state can invent them. The conversion G(s) = C(sI−A)⁻¹B + D silently cancels any pole that is uncontrollable or unobservable. Go the other way and a sloppy realization can add extra states that don't correspond to anything physical. This is where controllability and observability earn their keep.
  • Controllability and observability are pass/fail. A mode you cannot excite through B cannot be steered; a mode you cannot see through C cannot be estimated or damped. The tests are rank checks: controllable if rank[ B A·B A²·B … Aⁿ⁻¹·B ] = n, observable if the stacked [ C; C·A; …; C·Aⁿ⁻¹ ] has rank n. For the mass-spring-damper above, both ranks are 2 — full — so the system is fully controllable and observable. If a rank comes up short, some internal mode is invisible or unreachable, and no amount of controller tuning fixes it.

Limits of validity: the linear form assumes constant matrices and small excursions about an operating point. Real hardware is nonlinear — actuator saturation, aero coefficients that swing with Mach and angle of attack, friction that flips sign. The standard fix is to linearize about a trim condition and re-linearize as the operating point moves (gain scheduling). The state-space model is exact for the linearized plant and only as good as that linearization for the real one.

History

State-space is old mathematics pressed into new service. The idea of describing a dynamical system by a point moving through a space of state variables goes back to the phase-space picture of classical mechanics in the 1800s. What was missing for engineers was a systematic control theory built on it, and that arrived in a rush around 1960 with Rudolf Emil Kálmán, a Hungarian-American engineer (1930–2016) [1][2].

Kálmán's 1960 filtering paper, "A New Approach to Linear Filtering and Prediction Problems," put the state-space model at the center of estimation and gave the world the Kalman filter [1][2]. He followed with the structural theory — the 1963 paper "Mathematical Description of Linear Dynamical Systems" laid out state-space rigorously, and it is Kálmán who is credited with introducing controllability and observability as the two properties that decide whether a state-space model can actually be steered and seen [1][2]. He did not work alone: R. S. Bucy co-authored the continuous-time filtering results in 1961, J. E. Bertram collaborated on stability analysis, and B. L. Ho co-developed the Ho–Kálmán realization algorithm in the mid-1960s for building minimal state-space models from data [2].

The timing mattered. The Apollo era demanded control and navigation for systems too coupled and too multi-input to handle with one-loop-at-a-time transfer-function methods, and digital computers had just become capable of inverting matrices and integrating vector ODEs at scale. State-space fit both needs, and by the late 1960s it was the backbone of what got called "modern control theory" [1][2]. Every control toolbox you touch today carries the plant in Kálmán's A, B, C, D form.

Related tools

  • /tools/vibration-natural-freq
  • /tools/spring-rate
  • /tools/series-rlc-impedance
  • /tools/rc-filter
  • /tools/lc-resonance

Sources

  1. https://en.wikipedia.org/wiki/State-space_representation
  2. https://en.wikipedia.org/wiki/Rudolf_E._K%C3%A1lm%C3%A1n

Written by HE in our own words from the cited sources — engineering judgment included, your stamp still required. All entries →

★ The Reference Shelf

Reading is free. The shelf is for cardholders.

Your library card is an email address: pin it to your shelf, print the card, take the FE/PE quick-reference pack, read the Huntsville history. The shelf remembers what you reach for.

Already on the list? Enter with your subscribed email →