The Optimal Estimator
Published by Rudolf Kalman in 1960, the Kalman filter solved one of engineering's fundamental problems: how to optimally combine noisy measurements with an imperfect model to estimate the true state of a system. It was immediately adopted by NASA for Apollo navigation and has since become the workhorse algorithm in navigation, control, robotics, economics, and signal processing. Every smartphone's GPS uses a Kalman filter.
Predict-Update Cycle
The filter operates in two alternating steps. In the prediction step, it projects the state forward using the system dynamics model: x̂⁻ = F·x̂ + B·u. The uncertainty grows because the model is imperfect (process noise Q). In the update step, a new measurement z arrives and the filter corrects the prediction: x̂ = x̂⁻ + K·(z - H·x̂⁻). The Kalman gain K determines the correction weight. The simulation visualizes both steps, showing the predicted and updated state distributions.
The Kalman Gain Intuition
The Kalman gain K is the filter's core intelligence. It answers: how much should I trust this measurement? When prediction uncertainty is high (P⁻ is large), K is large and the measurement strongly corrects the estimate. When measurement noise is high (R is large), K is small and the filter mostly trusts its model. As the filter runs, P converges to a steady state where prediction uncertainty growth (from Q) exactly balances measurement information (from R).
Sensor Fusion in Practice
The Kalman filter's real power emerges in multi-sensor fusion. A navigation system might combine GPS (accurate, low-rate, occasional dropouts), INS (smooth, high-rate, drifting), barometer (altitude), magnetometer (heading), and visual odometry (relative motion). The Kalman filter weighs each sensor according to its current reliability, automatically downweighting a degraded sensor. This simulation demonstrates the fusion concept with configurable noise parameters.