[Advanced] — The modern representation. Why matrices instead of transfer functions, what “state” really means, and how the two views connect.

The representation

Instead of one th-order differential equation, write first-order ones and stack them:


SymbolNameSizeMeaning
stateeverything you need to know about now
inputwhat you command
outputwhat you measure
system / dynamics matrixhow the state evolves on its own
input matrixhow inputs push the state
output matrixwhat the sensors see
feedthroughdirect input→output; usually 0

for almost every physical system, because a real plant can’t respond instantaneously.

What “state” means

The definition worth internalising:

The state is the minimum set of variables such that, knowing and for , you can determine all future behaviour.

The state is a complete summary of the past. Nothing about the history before matters beyond what’s in — which is the same Markov property that shows up in reinforcement learning and in queueing theory, and for the same reason.

Choosing states — usually the energy-storing elements, because energy can’t change instantaneously:

  • Mechanical — positions and velocities (potential and kinetic energy)
  • Electrical — capacitor voltages, inductor currents
  • Thermal — temperatures
  • Chemical — concentrations

The number of states equals the system order, which equals the number of independent energy stores.

Example: mass–spring–damper

Pick (position), (velocity):

The first row says — position’s derivative is velocity, definitionally. The second row is the physics. That pattern (trivial rows plus one real row) is what a state-space model of a mechanical system looks like.

State representations are not unique. Any invertible gives with

Different coordinates, same system. Eigenvalues are invariant under this transformation — which is why they, and not the matrix entries, are the physically meaningful thing.

Why bother

Transfer functions work fine for SISO systems. The case for state space:

MIMO is natural. is just wider and taller. Transfer functions become matrices of transfer functions and the algebra gets painful fast. → SISO and MIMO

Internal behaviour is visible. A transfer function only describes input→output. State space shows you states that are internally unstable but invisible at the output — exactly the pole–zero cancellation trap from note 05, now expressible.

It handles time-varying and nonlinear systems. is no harder to write than . Nonlinear systems generalise to , and much of the theory carries over.

Initial conditions are explicit. Transfer functions assume they’re zero.

Numerically better. Matrix computations on are far better conditioned than root-finding on high-order polynomials. For , transfer-function methods are numerically unreliable and state-space methods are routine.

It’s what the algorithms want. LQR, Kalman filtering, MPC, and every modern synthesis method are stated in state space.

The solution

The matrix exponential is the state transition matrix — it propagates the state forward:

Don’t compute it that way. The series converges slowly and badly for stiff systems. Use the eigendecomposition when is diagonalisable, or a scaling-and-squaring Padé method (what expm does) otherwise. It’s a genuinely delicate numerical problem — the classic paper on it is titled “Nineteen Dubious Ways to Compute the Exponential of a Matrix”.

Eigenvalues are the poles

The connection to everything in notes 02–07:

Because is the characteristic equation.

So stability is a linear-algebra statement:

Everything from the classical notes transfers directly. Complex eigenvalue pairs are oscillatory modes; the rightmost eigenvalue dominates; and are read off the same way. → Time Response

Eigenvectors are the mode shapes — the direction in state space along which that mode acts. In a building model, an eigenvalue tells you the frequency and damping of a vibration mode; the eigenvector tells you what the building looks like while doing it. → Linear Algebra

Modal form: transform to (diagonal, eigenvalues on the diagonal) and the modes fully decouple — independent first-order systems. That’s the cleanest way to see what a system is doing.

Converting between representations

State space → transfer function:

Unique, and always exists.

Transfer function → state space: not unique — infinitely many realisations. Standard ones:

Controllable canonical form — the coefficients of the denominator appear directly in the bottom row of . Always controllable, which makes pole placement trivial. → note 09

Observable canonical form — the dual. Always observable.

Modal form — diagonal. Best numerical conditioning and the clearest physical reading.

The conversion can lose information. If the transfer function has a pole–zero cancellation, the minimal realisation has fewer states than the original system — and the cancelled mode still exists in the real hardware. The transfer function genuinely cannot see it, which is the sharpest argument for state space: the hidden mode is a real thing that can grow without bound while the output looks perfect. → Controllability and Observability

MIMO

Where state space pays for itself.

Nothing about the notation changes. has a column per actuator, a row per sensor. All the analysis — stability, controllability, LQR — applies unmodified.

Coupling is what makes MIMO hard in classical terms: input 1 affects outputs 1 and 2, so you can’t tune two SISO loops independently. Classical approaches to this are painful (relative gain array, decoupling networks, sequential loop closing). State-space methods simply don’t have the problem — a full state-feedback gain is a matrix, and it handles all the coupling at once.

A quadcopter is the standard example: 12 states, 4 inputs, and the couplings (roll affects lateral position, thrust affects everything) are the entire difficulty. Cascaded PID does work in practice, but the design is much cleaner in state space.

Discrete time

For implementation, the same structure with a difference equation:

Exact discretisation with a zero-order hold:

Stability moves from the left half plane to the unit disc: . The mapping is , which sends the imaginary axis to the unit circle. → Digital Control

Practical notes

Scale your states. A model mixing metres and microradians has a badly conditioned , and every subsequent computation suffers. Non-dimensionalise or scale to comparable magnitudes.

Sanity-check by eigenvalue. eig(A) immediately tells you stability, natural frequencies, and time constants. It’s the first thing to run on any model.

Check the rank of and . Rank-deficient means an actuator or sensor is redundant — often a modelling error.

Watch stiffness. Eigenvalues separated by many orders of magnitude make simulation slow and discretisation delicate. Consider model reduction: if a mode is 1000× faster than your bandwidth, it’s a constant as far as the controller is concerned.

Balanced truncation is the principled way to reduce order — it ranks states by how much they contribute to input–output behaviour (Hankel singular values) and discards the ones that don’t. Far better than deleting states by intuition.


↑ Back to Control Theory