TL;DR
A system has a hidden state that moves by a linear rule, and you see only its outputs. The system is observable when those outputs, watched for enough steps, determine the whole hidden state, so nothing about the state stays secret. The test is a rank check on one stacked matrix, and the check says in advance whether any estimator, such as a Kalman filter or an observer, can recover every part of the state.
Builds on: Linear Dynamical System, Matrix Rank · Leads to: Controllability (its dual), Kalman Filter
Where it's used
Battery packs. A battery's state of charge cannot be read off a meter, so a model with a hidden charge state is run alongside the measured voltage and current. Before trusting such an estimate, the designer checks that the chosen sensors actually reveal every hidden part of that model. A part that no measurement reveals cannot be corrected by feedback.
Spacecraft attitude. An attitude estimator tracks orientation and spin rate, which are hidden inside the state. A star tracker measures orientation directly, and a gyro measures spin rate. Engineers confirm that the combined sensors observe every component of the state. A component that no sensor reveals drifts unchecked, however good the filter is.
Power-grid state estimation. Operators estimate the voltage angle at every bus of a grid from a sparse set of meter readings. Whether the readings make the whole state observable decides where meters must be placed.
How it works
Take the simplest setting: no input, a state with numbers, and an output with numbers, where the state moves by . The question is whether the outputs determine .
Here is one tiny instance. The state is a cart: , one second per step, so . The sensor reads position only, . The true starting state is .
- The cart starts at position 2 with velocity 1. Nobody sees the velocity. Check: the hidden state is .
- The sensor reads , the position. Check: the first entry of is 2.
- One step later the state is , and the sensor reads . Check: .
- Now the two readings differ by . A change in position over one step is the velocity, so the velocity is revealed even though no sensor measures it. The starting position is . Both starting numbers are recovered from the outputs. Check: running the model from reproduces and .
- Conclusion: the outputs over two steps determine the state, so this pair is observable. The rank test in the next section does the same reasoning for any size of system.
flowchart LR
S[hidden state x0] --> M[step the model: A]
M --> O[sensor reads C x]
O --> R[stack the readings over n steps]
R --> T{rank of the stacked matrix equals n?}
T -->|yes| Y[state is recoverable: observable]
T -->|no| N[some direction is invisible]
Now the contrast. Keep the same but let the second state component be a slower-moving quantity, , with the same kind of sensor . Two different starting states, and , give the same readings. Both read , then , then , and so on forever. The second component is multiplied by zero in every reading, so it never appears. This system is not observable.
- error factor 0.5 per step
- error factor 0.9 per step
The math
Take a linear system with , and an output with an matrix. The pair is observable when two different starting states always produce different output sequences. Equivalently, the only starting state that gives all-zero outputs is the zero state.
Here is the state at step , is the dynamics matrix, and is the readout matrix. "Different output sequences" means that for some step the readings differ.
Step 2 in symbols: the outputs are a stacked product
Iterating the dynamics gives , so the output at step is . Stack the first outputs:
The matrix is the observability matrix. It has rows and columns. Each block row is the readout after some number of steps, so it is the readout matrix seen through the dynamics.
Step 3 in symbols: the rank decides
Call the stacked outputs . The equation has a unique solution for exactly when the columns of are independent, which is when . If so, is an invertible matrix and
If the rank is less than , some nonzero vector satisfies . Then and give identical outputs for the first steps. By the Cayley-Hamilton theorem, is a combination of lower powers of . Then every later power is also a combination of , so every later block row is a combination of the first block rows. If , the outputs of and agree at every step, not just the first . Only the first powers ever need checking.
Step 4 in symbols: the observer
Observability is what makes an observer possible. An observer is a copy of the model that is corrected by the readings:
The gain is a matrix you choose. Let the error be . Subtracting the two updates gives . The error shrinks at each step by the eigenvalues of (see Eigenvalues and Eigenvectors). A standard result says that the eigenvalues of can be placed anywhere, by a suitable , exactly when is observable.
Worked examples
Let with . The observability matrix is just .
- Take . Then has rank 1, which equals . The system is observable.
- Check: the reading is , so is recovered exactly.
- Take . Then has rank 0, which is less than 1. The system is not observable.
- Check: the reading is for every , whatever is. Any two starting states look the same.
Interpretation: observability is not about how big the measurement is. It is about whether the measurement carries the state at all. A sensor with gain 2 sees the state fully, and one with gain 0 sees nothing.
Use from the walkthrough, and compare two sensors.
- Position sensor, . Compute .
- Stack: . Its Determinant is , which is not zero, so the rank is 2.
- Velocity sensor, . Compute .
- Stack: . Both rows are equal, so the rank is 1.
- Interpretation: the velocity sensor reads the same number at every step, because velocity does not change. The starting position never appears in any reading, so it cannot be recovered. The position sensor is observable and the velocity sensor is not, for the same dynamics.
The cart has and only a position sensor, . Pick a gain so that both eigenvalues of equal , which makes the estimate converge quickly.
- Compute , so .
- The trace is , and the determinant is .
- Two eigenvalues both equal to means the characteristic polynomial is . So the trace is and the determinant is .
- From the trace, , so . From the determinant, , so .
- Check: has trace and determinant . Both match.
- Try it: what happens to the error if you use no correction at all, ? Answer: then has both eigenvalues equal to 1, so the error never shrinks. With no correction term, nothing reduces the velocity error either, so the velocity estimate never converges.
Interpretation: the position reading corrects both the position estimate, with gain , and the velocity estimate, with gain . The velocity is never measured, yet the observer recovers it, because observability guarantees that the correction reaches the hidden component.
Common mistakes and tradeoffs
It is tempting to think that observable means every state variable is measured. In fact observability only requires that the state can be inferred from the outputs over time. The cart's velocity is never measured directly, yet it is observable, because a change in position reveals it.
It is tempting to think that observability is a property of the sensor alone. In fact it depends jointly on and . The same velocity sensor is useless on the cart and useful on a system where velocity changes the readings in a different way.
It is tempting to think that a full-rank observability matrix guarantees a good estimate. In fact a matrix can have full rank and still be nearly singular, with a tiny smallest singular value. The hidden direction is then seen only very weakly, so the estimate needs very large gains and amplifies sensor noise. Check the singular values of (see Singular Value Decomposition (SVD)), not only whether the rank is .
It is tempting to think that the rank test can be run in floating-point arithmetic with exact zeros. In fact rounding makes exact zeros rare (see Floating-Point Numbers), so software counts singular values above a tolerance instead.
Use the rank test when you have a linear model and want to know in advance whether an estimator can work. Do not rely on it alone for nonlinear systems: the nonlinear version is a local property, checked at an operating point, and a linear test there is only an approximation. An alternative for hand work is the Popov-Belevitch-Hautus test: the system is unobservable exactly when some eigenvector of satisfies . Each eigen-direction is checked in turn, which is often quicker than stacking a large matrix.
| Situation | What goes wrong | Better choice |
|---|---|---|
| Sensor noise is large | A nearly unobservable direction is buried in noise | Check singular values, add a sensor that sees that direction |
| The model is nonlinear | A linear rank test may not describe the true behaviour | Test the linearisation at the operating point, or use a nonlinear observability test |
| The system is large | Stacking and inverting is slow and rounding-prone | Use a numerically stable factorisation, or reduce the model |
| The dynamics change over time | One fixed test can pass or fail at different times | Test observability over a sliding window of recent steps |
History
Rudolf Kalman's work on linear systems in the early 1960s, the same work that produced his filter, introduced controllability and observability as a dual pair of properties. Controllability asks whether the input can steer the state anywhere. Observability asks whether the output reveals the state. The two are linked by a duality that lets a result about one be read as a result about the other.
David Luenberger published the observer in 1964. It is a deterministic version of the same idea: a copy of the model corrected by the output, with its error dynamics placed by the gain. The Kalman filter is the stochastic counterpart, which chooses the gain from the noise statistics. Both need observability to be sure the error can be made small in every direction. The concept caught on because a single rank test answers, before any data is collected, whether a sensor layout can support an estimator at all.
Recap
- The state is hidden, the outputs are the only evidence, and observability asks whether the evidence pins the state down.
- Stacking the readings , , up to gives the observability matrix . The state is recoverable exactly when .
- Only the first powers are needed, by the Cayley-Hamilton theorem. A nonzero vector in the null space of is a difference between two states that stays invisible forever.
- An observer's error follows , and observability is what lets you place its eigenvalues.
- Next: Controllability is the dual question about the input, and Kalman Filter shows how the same structure is used with noise. The State Space Model lesson gives the wider setting.
Check yourself
QuestionRecall: what does it mean for a pair (A, C) to be observable?Show answer
It means that two different starting states always produce different output sequences. Equivalently, the only starting state whose outputs are all zero is the zero state. The hidden state can then be determined from the outputs.
QuestionComputation: for A = (1 1; 0 1) and C = (0 1), find the observability matrix and its rank.Show answer
First compute . The observability matrix is . Both rows are equal, so the rank is 1, which is less than . The system is not observable: the position never appears in any output.
QuestionWhy: why does the rank of the stacked matrix decide whether the starting state can be recovered?Show answer
The stacked outputs equal . If the columns of are independent, this linear equation has exactly one solution for , so the outputs determine the state. If the rank is less than , there is a nonzero vector with , and and produce the same outputs. Rank is therefore exactly the condition for unique recovery.
QuestionApplied: a sensor reads only the first of two independent processes that do not interact. Can the second process be estimated from the readings?Show answer
No. Since the processes do not interact, the second state never affects the readout, in the same way that the second component of the diagonal example never appeared. The readings carry no information about it, so the observability matrix has rank 1 and the second process is invisible. A second sensor on that process, or a coupling that lets the first process reveal it, would be needed.