State-Space
Stop chasing one output at a time. Describe the whole machine as a single vector that knows where it's going next
A transfer function is a confession that you only care about one input and one output. The moment your robot has six joints, three accelerometers, and two wheels that talk to each other, that single fraction collapses under its own algebra.
So the 1960s threw it out and started over with a sentence: here is everything the machine remembers, and here is the rule for what it does next.
That "everything it remembers" is a list of numbers (position, velocity, angle, current) stacked into one vector called the state, written . Instead of asking "what comes out when I poke this input," state-space asks a humbler, deeper question: given exactly where the system is right now, which direction is it about to move? The answer is one matrix multiply.
Watch a system decide where to go
The picture below is that rule made visible. Every tiny arrow shows the direction the state would slide from that point; long arrows mean fast motion, short ones mean slow. The four sliders are the entries of the matrix: change them and the entire arrow field re-flows. Tap anywhere to drop an initial condition, and the trajectory is integrated forward, obediently following the arrows. Drop several and watch the whole plane reveal its personality.
Tap to plant a trajectory
what to try
- Press the "damped spring" preset. Then tap a few spots far from the origin. Every trajectory spirals inward and eventually dies at . The eigenvalues in the metric row are a conjugate pair with negative real part: the classic stable-spiral signature.
- Slide A₂₂ from −0.4 toward zero. Watch the spiraling slow down. At A₂₂ = 0, trajectories are perfect closed circles, no decay, no growth. The eigenvalues just crossed the imaginary axis: real part = 0. Keep going past zero, and trajectories now spiral outward: same shape, opposite time direction. The system became unstable.
- Try the "saddle" preset. The eigenvalues are now one positive, one negative. There are two special directions (eigenvectors): trajectories along one come into the origin, along the other they run away. Generic trajectories follow a hyperbola-like path. This is the textbook unstable-equilibrium shape, like a ball on a saddle.
- Watch the metrics as you slide. Notice that and are the same numbers that decide the transfer-function pole locations.
The four presets are the canonical shapes you meet in any dynamics textbook: pure oscillation (a spring that never tires), a damped spiral (a spring with friction), a saddle (a ball balanced on a horse's saddle), and an unstable spiral (the same spring, run backward, flying apart). The eigenvalues in the metrics row are the system's fingerprint: their real part says how fast trajectories grow or decay, their imaginary part says how fast they spin.
The core idea is almost embarrassingly compact. A system is just a state vector evolving by a rule that says given where you are, here's the direction you must move. Inputs nudge that motion; outputs are whatever you happen to be able to measure. That is the entire grammar of modern control: four matrices, , , , , and a vector that remembers. It was Rudolf Kálmán who, in the 1960s, recast control around this state-vector equation.
The math: ẋ = A x + B u, eigenvalues, and the trace-determinant shortcut
A linear system is described entirely by two equations: a state equation that says how the internal state evolves, and an output equation that says what you can observe:
Here is the state vector, the inputs, the outputs, and , , , are matrices sized to fit. A second-order ODE like becomes this form by naming (position) and (velocity), giving a matrix , exactly the four sliders in the demo.
For a matrix , the eigenvalues are the roots of the characteristic polynomial
which is why the trace and determinant alone fix the dynamics: and . The real part of an eigenvalue sets how fast trajectories grow or decay; the imaginary part sets how fast they spin. So the same numbers that read "spiral inward" in this phase plane read "underdamped, stable" in the transfer-function picture. They are two languages for one elephant; we just point at different parts of it.
Once you write a system as , , , , two new questions become askable that the old fraction could not even phrase. Can my inputs actually reach every corner of the state, or are some directions locked away where no control can push them? And can my sensors actually see every corner, or do some states stay hidden no matter how long I watch the output? Kálmán gave both questions crisp yes-or-no tests, and they turned out to be mirror images of each other.
Controllability and observability: two tests that are secretly the same test
Controllability asks whether your inputs can steer the state anywhere you like. With admissible inputs you should be able to drive the system from any starting point to any target in a finite time. The test is a rank check on a matrix built from and :
If that stack of columns has full rank (the number of states), every direction is reachable.
Observability asks the opposite: watching only the output , can you back out the full internal state you never measured directly? Same flavor of test, now built from and :
The pretty part is that these two are mathematical duals. Controllability says an input exists that brings any state to any other state; observability says an output history carries enough information to reconstruct the starting state. Swap "push the state" for "read the state" and one test becomes the other. This is exactly the property a Kalman filter leans on: it can only estimate the hidden state if the system is observable, and a controller can only place the poles where it wants if the system is controllable.
Key takeaways
- State-space describes a system by a state vector that evolves as , with output : four matrices and a vector that remembers.
- It handles many inputs and outputs at once, where transfer functions get unwieldy. This was the heart of the 1960s "modern control" revolution.
- The eigenvalues of classify the behavior; for a system, the trace and determinant alone tell you the whole story.
- This is the formulation the Apollo guidance computer used, and the one the EKF / Kalman filters later in this course are built on.
A transfer function watches one door. State-space watches the entire house at once: every room, every occupant, all evolving by a single rule you can write on a napkin, .
That napkin took control theory to the Moon and gave it the vocabulary to estimate what it cannot directly see. The next time you tap the plane and watch a trajectory spiral home to the origin, remember: you are reading the same sentence Apollo read, and the same one the Kalman filter is about to whisper back.