The Kalman Filter, Linear-Quadratic-Gaussian Control, and the Separation Principle
Anchor (Master): Anderson & Moore 1979 Optimal Filtering (Prentice-Hall) Ch. 4-7 (innovations, the algebraic Riccati equation for the steady-state filter, the duality with the regulator, and the Kalman-Bucy filter); Kwakernaak & Sivan 1972 Linear Optimal Control Systems (Wiley-Interscience) Ch. 4-5 (the LQG problem and the separation theorem); Doyle 1978 'Guaranteed Margins for LQG Regulators' IEEE Transactions on Automatic Control 23 (the absence of robustness margins)
Intuition Beginner
You are tracking something that moves — a plane on radar, a phone in your pocket guessing where you walked. Two sources of information disagree. One is a prediction: you know roughly how the thing moves, so from where it was you can guess where it is now. The other is a measurement: a sensor reading of where it is right now. Both are wrong. The prediction drifts because motion is never exactly known; the measurement jitters because sensors are noisy. The Kalman filter is the recipe for blending the two into a single best guess that is steadier than either alone.
The blend is a weighted average, but a smart one. If your prediction is trustworthy and the sensor is junk, lean on the prediction. If the sensor is sharp and your motion model is shaky, lean on the measurement. The filter keeps a running sense of how trustworthy its own guess is — a spread, a margin of error — and uses that to set the weights automatically at every step.
The loop is short and repeats forever. Predict where the thing went, then look at the new measurement and correct the prediction toward it by an amount set by the trust weights. The corrected guess becomes the starting point for the next prediction. Because the blend always lands between the two inputs and discards the noise pulling each way, the running guess is calmer and closer to the truth than the raw sensor ever is.
The same idea closes a bigger loop. If you are also steering the thing, you steer using your best guess of where it is, computed by the filter, and you compute the steering exactly as if the guess were the true position. Estimating and steering, designed apart, snap together.
Visual Beginner
The picture shows the two-step cycle the filter runs and where the trust weight sits.
Read the table top to bottom as one cycle, repeated every time a new measurement arrives. The filter holds a current best guess and a margin of error. First it predicts: it pushes the guess forward by the known motion and widens the margin because prediction adds uncertainty. Then it corrects: it compares the prediction to the fresh measurement, and nudges the guess toward the measurement by the trust weight, shrinking the margin because a measurement adds information.
| stage | what happens | effect on the margin |
|---|---|---|
| predict | move the guess forward by the known motion | margin grows (uncertainty added) |
| measure | read the noisy sensor | a new clue arrives |
| weigh | set the trust weight from the two margins | bigger sensor noise means smaller weight |
| correct | nudge the guess toward the measurement | margin shrinks (information added) |
The takeaway: the filter is just predict-then-correct, with a single trust weight deciding how much of the new measurement to believe. When you also steer, you feed the best guess into the steering rule and treat it as if it were exact — that swap is the whole separation idea.
Worked example Beginner
Track one number — say a temperature that holds roughly steady. The motion model is "it stays the same," so the prediction is just the old guess. We track a guess and its error spread (a variance, the square of the margin).
Start with guess and error spread . The sensor has noise spread as well. A new measurement reads .
Step 1. Predict. The model says it stays put, so the predicted guess is still . Predicting adds a little uncertainty; take the added spread to be here for a steady value, so the predicted spread stays .
Step 2. Set the trust weight. The weight is the prediction's spread divided by the total spread: . Half-trust each, since both spreads are equal.
Step 3. Correct. Nudge the guess toward the measurement by the weight times the gap. The gap is . New guess .
Step 4. Shrink the spread. A measurement always sharpens the guess: new spread .
What this tells us: the blended guess sits between the prediction and the measurement , and the spread fell from to — the blend is more certain than either input. If the sensor had been noisier, say spread , the weight would be , the guess would move only to , and the filter would lean on its prediction. The trust weight does the balancing on its own.
Check your understanding Beginner
Formal definition Intermediate+
Consider the discrete-time linear-Gaussian state-space model
with state , control , measurement , and matrices of compatible size. The process noise and measurement noise are independent zero-mean Gaussian white-noise sequences with covariances and , mutually independent and independent of the initial state — the multivariate normal and covariance structure of 26.03.01. Write for the observations through time .
Definition (filtered and predicted estimates). The filtered estimate is the conditional mean with error covariance . The one-step predicted estimate is with predicted covariance .
Definition (Kalman filter recursion). Given , , the Kalman filter alternates two steps. The measurement update (correct), using the innovation , is
with the Kalman gain. The time update (predict) is
Definition (error-covariance Riccati recursion). Eliminating gives the predicted-covariance recursion
a matrix Riccati recursion that runs forward and depends on no measurements — the covariances are deterministic.
Definition (steady-state filter and filter algebraic Riccati equation). When is detectable and stabilisable, as , where is the stabilising solution of the filter algebraic Riccati equation (FARE)
with steady gain and a Schur (asymptotically stable) error dynamics .
Definition (continuous-time Kalman-Bucy filter). For , with white noises of spectral densities , the estimate obeys with and solving the filter Riccati differential equation .
Definition (LQG problem). Combine the model above with the quadratic cost , , , where may depend only on . The linear-quadratic-Gaussian problem is to minimise over such output-feedback policies.
Notation: the system matrices; the process and measurement noise covariances; the filtered and predicted error covariances; the Kalman gain; the innovation; the steady filter covariance; the continuous-time gain; the LQG cost weights; (below) the regulator Riccati solution; the observation history; the Loewner order. These are recorded in _meta/NOTATION.md.
Counterexamples to common slips
The Kalman gain is not the ratio of covariances written naively. The gain maps measurement space to state space and inverts the innovation covariance , not the state covariance. Treating it as is correct only in the scalar single-output case.
The filter covariances are not random. Because obey a recursion driven only by , they can be precomputed offline before any data arrives. The measurements move the estimate ; they do not move its covariance. This is what makes the steady-state filter a fixed linear system.
LQG separation is not "estimation and control are unrelated." The two designs are computed independently — one Riccati for the regulator, one for the filter — but the closed loop couples them: its poles are the union of the regulator poles and the filter poles, and the achieved cost carries an irreducible estimation-error term. Independence of design does not mean independence of performance.
Key theorem with proof Intermediate+
Theorem (the Kalman filter is the recursive MMSE estimator; Anderson-Moore Ch. 3-5 [source pending]; Bertsekas Ch. 5 [source pending]). For the linear-Gaussian model, the conditional distribution of given is Gaussian, , with mean and covariance produced by the Kalman recursion. The filtered mean is the minimum-mean-square-error estimator of from , that is over all measurable ; in the non-Gaussian case with the same first two moments it remains the best linear unbiased estimator.
Proof. The argument is Gaussian conditioning 26.03.01 applied recursively. Suppose inductively (the base case is ). Stack and the next measurement . Conditioned on , the pair is jointly Gaussian with means and and, using independence of from ,
The Gaussian conditioning formula gives the law of given (hence given ): the conditional mean is
and the conditional covariance is the Schur complement
the measurement-update equations. For the time update, with independent of and of ; a linear image of a Gaussian plus an independent Gaussian is Gaussian, so , which is the predict step and closes the induction.
MMSE optimality: for any joint distribution the conditional mean minimises mean-square error, since for any estimator ,
the cross term vanishing because is orthogonal to every function of . In the Gaussian case the conditional mean is the linear expression above, so the Kalman filter attains the global MMSE optimum; with only the first two moments specified the same linear expression is the orthogonal projection of onto the span of the observations, the best linear unbiased estimator.
Bridge. This Schur-complement covariance update builds toward the steady-state theory of the Advanced results, where the predicted covariance converges to the stabilising solution of the filter algebraic Riccati equation, and the same recursion appears again in the LQG separation theorem, where the filter supplies the state estimate that the regulator gain multiplies. The foundational reason the filter is recursive is that Gaussianity is preserved under linear maps and conditioning, so the entire posterior collapses to its mean and covariance — this is exactly the finite-dimensional sufficiency that turns an estimation over the whole observation history into a two-line update. The construction generalises the scalar trust-weight blend of the Beginner example to a matrix gain, and the error-covariance recursion is dual to the cost-to-go Riccati of the regulator 44.07.02: transposing , swapping and turns one Riccati equation into the other. The central insight is that the innovation is a white-noise sequence carrying exactly the new information in , so the filter is the device that whitens the observations; putting these together, the bridge is the recognition that optimal estimation and optimal control are the same quadratic problem read forward and backward in time, the filter ARE and the regulator ARE being transposes of one another.
Exercises Intermediate+
Advanced results Master
Theorem (steady-state filter and the filter algebraic Riccati equation; Anderson-Moore Ch. 4-7 [source pending]). Let be detectable and stabilisable, with , . Then the predicted error covariance converges, from any initial , to the unique stabilising positive-semidefinite solution of the filter algebraic Riccati equation . The steady gain makes the error dynamics Schur (spectral radius below one), and the resulting time-invariant filter is the optimal stationary estimator; the innovations sequence is zero-mean white with covariance .
Detectability of is what forces the error covariance to stay bounded — an undetected unstable mode would let the prediction error grow without correction — while stabilisability of rules out a noise-free unstable mode that the recursion could not regularise, exactly the dual hypotheses to the regulator's stabilisability of and detectability of .
Theorem (estimation/control duality; Anderson-Moore Ch. 4 [source pending]; Kwakernaak-Sivan Ch. 4 [source pending]). The filter algebraic Riccati equation for is the regulator algebraic Riccati equation for the transposed data in place of . Consequently every theorem about the regulator Riccati equation of 44.07.02 — existence and uniqueness of the stabilising solution, the Hamiltonian / stable-invariant-subspace construction, Newton-Kleinman iteration as repeated Lyapunov solves — transfers verbatim to the Kalman filter by transposition. In particular the Kalman gain is the dual of the LQR gain, and the filter's error poles are the regulator poles of the dual system.
The duality is not a formal coincidence but the statement that optimal estimation runs the optimal-control machinery backward: the regulator propagates a cost-to-go covariance backward in time toward the present, the filter propagates an error covariance forward in time from the past, and the two propagations solve the same quadratic matrix equation under transposition. This is the production route for filter design: a single algebraic-Riccati solver — Laub's ordered Schur reduction of the Hamiltonian, built on the real Schur form of [43.06] — serves both control and estimation.
Theorem (LQG separation / certainty equivalence; Bertsekas Ch. 5 [source pending]; Kwakernaak-Sivan Ch. 5 [source pending]). For the LQG problem the optimal output-feedback control is , where is the deterministic LQR gain solving the regulator Riccati equation for and is the Kalman estimate solving the filter Riccati equation for . The two designs are independent — the regulator gain does not depend on the noise covariances and the filter gain does not depend on the cost weights — and the optimal cost is the deterministic LQR cost plus an irreducible estimation-error term (equivalently a term in the filter covariance and the regulator Riccati solution). The closed-loop spectrum is the union of the regulator eigenvalues and the filter eigenvalues .
Certainty equivalence is the assertion that the controller acts on the estimate exactly as it would on a known true state: the optimal stochastic policy is the optimal deterministic policy with replaced by , with no extra caution term despite the uncertainty. This holds because the LQG cost is quadratic and the estimation error is independent of the control's effect on the estimate — the cross terms vanish, decoupling the two optimisations.
Theorem (LQG has no guaranteed stability margins; Doyle 1978 [Doyle 1978]). There exist LQG designs whose loop transfer function has arbitrarily small gain and phase margins; the phase margin and infinite gain margin guaranteed for the full-state-feedback LQR are destroyed by the insertion of the Kalman filter in the loop.
The separation principle guarantees nominal optimality and nominal stability, but the cascade of an optimal estimator and an optimal regulator carries none of the robustness of either piece alone: a small modelling error can destabilise the loop. Doyle's counterexample ended the presumption that LQG inherited LQR's margins and motivated loop-transfer recovery and, ultimately, the and -synthesis robust-control theory that designs directly for stability margins rather than for nominal optimality.
Synthesis. The Kalman filter and the LQR are one quadratic problem viewed from two ends of time, and the Riccati equation is the central insight uniting them: the regulator's cost-to-go Hessian and the filter's error covariance solve algebraic Riccati equations that are transposes of one another, so existence, the Hamiltonian stable-invariant-subspace construction, and the Newton-Kleinman Lyapunov-solve route of 44.07.02 transfer by duality and a single solver serves both. This is exactly why Gaussian conditioning produces a recursion identical in form to dynamic programming: conditioning on a new measurement is the estimation analogue of one Bellman backup, and the innovation is the new information just as the running cost is the new expenditure. The foundational reason the LQG controller decomposes is certainty equivalence — the quadratic cost and the independence of estimation error from the control's action on the estimate force the cross terms to vanish, so the optimal output-feedback law is the LQR gain on the Kalman estimate, designed independently.
Putting these together, the closed-loop poles are the disjoint union of regulator poles and filter poles, the achieved cost is the deterministic optimum plus an irreducible estimation penalty, and the bridge from full-state to output feedback is the recognition that the filter manufactures the state the regulator needs. That bridge is not free: the construction generalises the deterministic regulator but is dual to it only in nominal performance, and Doyle's result is the statement that the duality does not extend to robustness — the very independence that makes separation elegant is what voids the margin guarantees, the point where optimal control hands off to robust control.
Full proof set Master
Proposition 1 (Gaussian-conditioning measurement update). If and with independent of , then with and .
Proof. Conditioned on , the pair is jointly Gaussian with mean and covariance blocks , , (using independence of ). The standard Gaussian conditional law 26.03.01 gives mean and covariance .
Proposition 2 (time update preserves Gaussianity). If and with independent of and , then .
Proof. A linear image of a Gaussian is Gaussian, and the sum of two independent Gaussians is Gaussian. The conditional mean is . The conditional covariance is , the cross term vanishing by independence of .
Proposition 3 (MMSE optimality of the conditional mean). For any random vector and -algebra , minimises over all -measurable square-integrable .
Proof. Let and be any -measurable estimator. Then . The cross term vanishes: is -measurable, and for any -measurable since . Hence , with equality iff almost surely.
Proposition 4 (innovations are white). Under the linear-Gaussian model the innovation sequence is zero-mean Gaussian with and for .
Proof. Write with prediction error , which has mean zero and covariance and is independent of ; this gives the mean and covariance. For whiteness take . The estimate is a function of , and . Since is -measurable, . The innovations are thus an orthogonal (white) Gaussian sequence — the filter whitens the observations.
Proposition 5 (filter/regulator duality of the algebraic Riccati equations). The map , , , carries the discrete regulator algebraic Riccati equation into the filter algebraic Riccati equation, and the stabilising solution of one maps to the stabilising solution of the other.
Proof. The discrete regulator DARE is . Apply the substitution: , (so ), , . The right-hand side becomes , which is the FARE with renamed . Stabilisability of — i.e. detectability of — and detectability of — i.e. stabilisability of — are the hypotheses that, under the regulator existence theorem of 44.07.02, yield a unique stabilising solution; transporting that theorem across the substitution gives the unique stabilising with Schur.
Proposition 6 (LQG separation / certainty equivalence). For the finite-horizon LQG problem the optimal control is with the deterministic LQR gain, and the optimal cost is the deterministic LQR cost plus (plus filter-covariance terms from the process noise).
Proof. Solve by dynamic programming on the information state, which for the linear-Gaussian model is the pair ; the covariances are deterministic (Definitions above), so the only stochastic state is . Posit the value function . The Bellman step minimises over . Decompose with (Proposition 3), so ; the estimate evolves as with the innovation zero-mean and independent of and (Proposition 4). Substituting and taking the expectation, the innovation contributes only an additive constant independent of , while the -dependent terms reproduce exactly the deterministic LQR Bellman recursion. Minimising over therefore yields with the LQR gain and the regulator Riccati solution, and accumulating the constants gives the cost , the deterministic optimum plus the estimation-error penalty.
Connections Master
The filter Riccati equation is the transpose-dual of the regulator Riccati equation of 44.07.02: substituting , , , carries the algebraic Riccati equation for control into the one for estimation, so the existence-uniqueness theory, the Hamiltonian stable-invariant-subspace construction, and the Newton-Kleinman iteration of that unit transfer verbatim, and a single algebraic-Riccati solver designs both the optimal regulator and the optimal filter; the LQG controller is literally their cascade.
The Gaussian-conditioning derivation rests on the multivariate-normal and covariance theory of 26.03.01: the measurement update is the conditional law of one Gaussian block given another, its mean the regression and its covariance the Schur complement , so the entire filter is the recursive bookkeeping of conditioning a jointly Gaussian state-observation vector, with the finite-dimensional sufficiency of the Gaussian family the reason a two-line update suffices.
The information-form measurement update and the square-root filter forward-link to the factorisation-updating numerics of 43.04.08: propagating a Cholesky factor of rather than itself guarantees a positive-definite covariance at every step, the measurement update is a QR row-append, and the recursive-least-squares information filter is the same update applied to the inverse covariance, the route that made the Kalman filter reliable in single-precision aerospace hardware.
The LQG framework is the linear-Gaussian, partially-observed instance of the stochastic dynamic programming of this chapter (44.08.01 finite-horizon DP and 44.08.03 Markov decision processes): the separation proof is dynamic programming on the information state , where the deterministic covariance reduces the sufficient statistic to the conditional mean and the Bellman recursion collapses to the deterministic LQR recursion plus an estimation-error constant, exhibiting certainty equivalence as the special structure of the linear-quadratic-Gaussian information state.
The continuous-time Kalman-Bucy filter connects to the stochastic-calculus and martingale theory of 37.06.01: the innovations process is a Brownian motion in the filtered probability space, the filter is the projection of the signal onto the observation filtration, and the Riccati differential equation governs the conditional covariance of the diffusion, the linear-Gaussian special case of the general nonlinear filtering (Zakai/Kushner-Stratonovich) equations.
Historical & philosophical context Master
The recursive linear filter was introduced by Rudolf Kalman in 1960, recasting the Wiener-Kolmogorov filtering theory of the 1940s — which solved the stationary, infinite-history estimation problem by spectral factorisation — into a finite-dimensional state-space recursion suited to digital computation [Kalman 1960]. The continuous-time companion, the Kalman-Bucy filter, followed in 1961 with Richard Bucy, casting the conditional covariance as the solution of a matrix Riccati differential equation and exposing the duality with the linear-quadratic regulator that Kalman had formulated the same year [Kalman Bucy 1961]. The filter's first decisive application was the Apollo program: the onboard navigation of the command and lunar modules used a Kalman filter, and the square-root reformulation by James Potter restored numerical reliability on the spacecraft's single-precision hardware.
The separation theorem — that the optimal stochastic controller for the linear-quadratic-Gaussian problem is the deterministic optimal feedback applied to the Kalman estimate — was established for the discrete and continuous cases by Joseph and Tou and by Wonham in the early-to-mid 1960s and consolidated in the monographs of Kwakernaak and Sivan and of Anderson and Moore [Wonham 1968]. The presumption that the resulting LQG controllers were as robust as their full-state LQR counterparts was overturned by John Doyle in 1978, whose two-line counterexample exhibited LQG regulators with vanishing gain and phase margins [Doyle 1978]; the result redirected control theory toward loop-transfer recovery and the robust-control program of and -synthesis that designs for stability margins rather than nominal optimality.
Bibliography Master
@article{Kalman1960Filter,
author = {Kalman, Rudolf E.},
title = {A New Approach to Linear Filtering and Prediction Problems},
journal = {Journal of Basic Engineering},
volume = {82},
number = {1},
year = {1960},
pages = {35--45}
}
@article{KalmanBucy1961,
author = {Kalman, Rudolf E. and Bucy, Richard S.},
title = {New Results in Linear Filtering and Prediction Theory},
journal = {Journal of Basic Engineering},
volume = {83},
number = {1},
year = {1961},
pages = {95--108}
}
@book{AndersonMoore1979,
author = {Anderson, Brian D. O. and Moore, John B.},
title = {Optimal Filtering},
publisher = {Prentice-Hall},
address = {Englewood Cliffs, NJ},
year = {1979}
}
@book{KwakernaakSivan1972LQG,
author = {Kwakernaak, Huibert and Sivan, Raphael},
title = {Linear Optimal Control Systems},
publisher = {Wiley-Interscience},
address = {New York},
year = {1972}
}
@book{Bertsekas2017DPv1,
author = {Bertsekas, Dimitri P.},
title = {Dynamic Programming and Optimal Control, Volume I},
edition = {4th},
publisher = {Athena Scientific},
address = {Belmont, MA},
year = {2017}
}
@article{Doyle1978,
author = {Doyle, John C.},
title = {Guaranteed Margins for {LQG} Regulators},
journal = {IEEE Transactions on Automatic Control},
volume = {23},
number = {4},
year = {1978},
pages = {756--757}
}
@article{Wonham1968,
author = {Wonham, W. Murray},
title = {On the Separation Theorem of Stochastic Control},
journal = {SIAM Journal on Control},
volume = {6},
number = {2},
year = {1968},
pages = {312--326}
}
@article{Potter1963Kalman,
author = {Potter, James E. and Stern, Robert G.},
title = {Statistical Filtering of Space Navigation Measurements},
journal = {Proceedings of the AIAA Guidance and Control Conference},
year = {1963}
}