/knowledge/kalman-filter
State-Space Models & the Kalman Filter
Behind every noisy measurement is a true value you can't see directly. The Kalman filter recovers it in real time — blending what you predicted with what you measured, each weighted by how much it deserves to be trusted.
- Studied
- State-Space Models & the Kalman FilterAdvanced · recursive estimation
- When
- Statistics & signals
- Applied in
- Online tracking & smoothing
- Read / Refreshed
- ~15 min read2026-06-26
Every sensor lies a little. A GPS reading, a thermometer, a noisy estimate of a moving object's position — each is the true value plus some measurement error. The Kalman filter is an elegant, hugely influential algorithm for recovering the true, hidden value from a stream of noisy measurements in real time — and it does it by a beautiful idea: at every step, it blends what it predicted would happen with what it actually measured, weighting each by how trustworthy it is.
It's the engine behind GPS, spacecraft navigation, object tracking, and sensor fusion, and it's a distinct tool from the ARIMA-style time series page — that one models a single observed series; this estimates a hidden state as data streams in. This page builds it from the state-space idea, through the predict-update loop, to the intuition that makes it click. It ties to Bayesian updating and streaming.
01
The hidden true state
The core framing is the state-space model, and it cleanly separates two things we usually muddle: the true state of the world, and our noisy glimpses of it. There is a hidden state — an object's real position and velocity, say — that we cannot observe directly. It evolves over time according to some dynamics. All we get are observations: measurements that are the true state, corrupted by noise.
The task is to estimate the hidden state from the noisy observations, as they arrive, one at a time. That word "recursive" is key — the filter doesn't reprocess all history at each step; it carries forward a running best estimate and updates it with each new measurement, which is exactly what makes it work on a live stream with tiny memory.
02
Two equations: dynamics and measurement
A linear state-space model is just two equations. The state-transition equation says how the hidden state evolves from one step to the next:
And the observation equation says how a measurement relates to the (unseen) state:
Here encodes the dynamics (how the state moves — e.g. position updates by velocity), maps state to measurement, and the two noise terms , are the process and measurement uncertainty. The whole filter's job is to estimate given all the noisy 's so far — and crucially, to track how uncertain that estimate is, because that uncertainty is what drives the whole thing.
03
The recursion: predict, then update
The Kalman filter cycles through two steps for every new measurement — a rhythm of guess-then-correct:
- Predict — use the dynamics () to project the current estimate forward to the next time step. The estimate moves, and — because the world is uncertain — its uncertainty grows. This is the filter's best guess before seeing new data.
- Update — a new measurement arrives. Correct the prediction toward it, by an amount that depends on the relative uncertainties, and the estimate's uncertainty shrinks(you've learned something). This corrected estimate becomes the starting point for the next predict.
Predict-then-correct, forever. The result is a continuously updated best estimate that's smoother and more accurate than the raw measurements — and it's optimal, in a precise sense, for linear-Gaussian systems.
04
The Kalman gain: who to trust
The heart of the update is one quantity: the Kalman gain . It decides how much to move the prediction toward the new measurement — i.e. how much to trust the measurement versus your own prediction. The corrected estimate is essentially:
That bracket — measurement minus prediction — is the innovation, the surprise. The gain scales how much of the surprise you absorb, and it's set by the relative uncertainties:
05
Where it's used
The Kalman filter is one of the most deployed algorithms in engineering — it literally helped land Apollo on the Moon. Its homes:
- Tracking & navigation — estimating the position and velocity of a moving object (aircraft, missiles, your phone's location) from noisy, intermittent fixes.
- Sensor fusion — optimally combining multiple noisy sensors (GPS + accelerometer + gyroscope) into one coherent estimate, each weighted by its reliability. This is its killer application — it's how a phone or drone knows where it is.
- Smoothing noisy signals — anywhere you have a real-time signal buried in noise and want a clean running estimate (finance, control systems, biomedical signals).
06
Beyond linear-Gaussian
The classic Kalman filter is provably optimal under two assumptions: the dynamics are linear and the noise is Gaussian. The real world often breaks both — so the family has extensions:
- Extended / Unscented Kalman filters (EKF/UKF) — handle nonlinear dynamics by linearising (EKF) or cleverly sampling (UKF) around the current estimate.
- Particle filters — drop the Gaussian assumption entirely, representing the state's uncertainty with a cloud of weighted samples (the Monte Carlo idea applied to filtering). More flexible, more expensive.
Underneath, all of these are doing recursive Bayesian estimation — the filter's predict-update is exactly the Bayesian prior→posterior cycle, run once per measurement. The Kalman filter is the special, beautifully closed-form case where everything is linear and Gaussian.
07
Where it shows up in my work
08
Refresh in 60 seconds
The state-space formulation, the predict-update recursion, the Kalman-gain intuition, and the nonlinear extensions reflect current estimation/sensor-fusion references alongside coursework.