The formula
The filter runs two steps per cycle, forever. First the predict step — push the state forward through the model:
x̂_k⁻ = F·x̂_(k−1) + B·u_k
P_k⁻ = F·P_(k−1)·Fᵀ + Q
First line: the new state guess is the old estimate propagated through the dynamics F, plus whatever your known control input u did. Second line: your uncertainty P grows — propagation stretches it through the dynamics and the process noise Q adds the model error you're honest enough to admit.
Then the update step — fold in the measurement z_k:
K_k = P_k⁻·Hᵀ · (H·P_k⁻·Hᵀ + R)⁻¹
x̂_k = x̂_k⁻ + K_k·(z_k − H·x̂_k⁻)
P_k = (I − K_k·H)·P_k⁻
First line: the Kalman gain K is the trust ratio — prediction uncertainty over total uncertainty, where R is the measurement noise covariance and H maps state to measurement. Second line: correct the prediction by the gain times the innovation (z_k − H·x̂_k⁻), the part of the measurement the model didn't expect. Third line: uncertainty shrinks, because you learned something.
The scalar case makes the machinery obvious. Prior estimate 10.0 with σ = 2 (so P = 4); measurement reads 12.0 with σ = 1 (so R = 1). Gain is K = 4/(4+1) = 0.8. Updated estimate: 10.0 + 0.8·(12.0 − 10.0) = 11.6 — most of the way toward the better sensor. Updated variance: (1 − 0.8)·4 = 0.8, so σ ≈ 0.89, tighter than either input alone. That variance combination is the same harmonic rule as parallel resistors: 1/(1/4 + 1/1) = 0.8.
Where you meet it
- GPS/INS fusion on anything that flies out of Redstone. The inertial unit drifts smoothly; GPS is noisy but doesn't drift. The Kalman filter inside the navigation computer is the referee — the IMU carries the state between fixes, GPS corrections rein in the drift. When a review board asks why the trajectory reconstruction disagrees with telemetry, the filter's tuning is where the argument starts.
- Radar and EO tracking loops. Every tracker that turns raw detections into a smooth track with velocity — missile seekers, range instrumentation radars, test-range cinetheodolite fusion — is running a Kalman filter or one of its descendants per target.
- Test cell sensor fusion. Combining a fast, drifty sensor with a slow, accurate one — thermocouple lag versus RTD accuracy, or accelerometer-derived velocity versus a position encoder — is a two-line Kalman problem, and it beats the hand-rolled complementary filter most benches start with.
- Post-test data reconciliation. Run the filter forward, then smooth backward through the same data (Rauch-Tung-Striebel), and you get the best estimate of what the article actually did — the standard move when the flight data has dropouts and the board wants one authoritative trajectory.
How it works
The filter is doing exactly one thing: maintaining a Gaussian belief about the state and updating it optimally. If the dynamics are linear, the noise is white and Gaussian, and F, H, Q, R are correct, no estimator does better — that's the theorem. Everything practical about Kalman filtering lives in the gap between that sentence and your hardware.
The gain is the whole story. Large Q or small R pushes K toward 1 — the filter chases the measurements and gets jittery. Small Q or large R pushes K toward 0 — the filter trusts its model and goes smug, gliding past real maneuvers because it has decided the sensor is lying. A target tracker with Q set too low will follow a straight-line prediction right through a hard turn and take seconds to recover. That's not a bug in the filter; that's the filter doing what you told it.
The classic failure is divergence through overconfidence. P only knows about the errors you declared in Q and R. Unmodeled dynamics, sensor bias, a misaligned mounting bracket — none of that is in the covariance, so P shrinks toward zero, the gain follows it, and the filter stops listening to measurements entirely while its estimate walks away from reality. The standard countermeasures are honest process noise, and watching the innovation sequence: if the innovations aren't zero-mean white noise sized like H·P⁻·Hᵀ + R predicts, the filter is mis-tuned and its reported covariance is fiction. Check that on the bench, not at the review.
Nonlinear systems break the assumptions, and almost every real system is nonlinear — orbital mechanics, radar range and bearing, quaternion attitude. The extended Kalman filter linearizes about the current estimate each cycle and runs the same equations on the Jacobians. It works remarkably well and carries no optimality guarantee at all; a bad initial estimate hands the EKF a linearization point in the wrong neighborhood, and it can diverge without complaint. The unscented Kalman filter and particle filters exist for exactly the cases where that bites.
Two implementation notes that cost real programs real time. The covariance update (I − K·H)·P⁻ is numerically fragile in single precision — P loses symmetry, picks up a negative eigenvalue, and the filter dies quietly; the Joseph form or a square-root/UD factorized filter fixes it, which is why Apollo-era and modern flight code both use factorized forms. And the filter is only as good as its clock: mis-timestamped measurements in a fusion system are indistinguishable from lag in the state, and no amount of tuning recovers a sloppy timestamp.
History
Rudolf E. Kálmán — born in Budapest in 1930, trained at MIT and Columbia — worked out the discrete-time recursive filter while at the Research Institute for Advanced Studies in Baltimore, and published it in 1960 as "A New Approach to Linear Filtering and Prediction Problems" [1][2]. The venue was the ASME Journal of Basic Engineering — a mechanical engineering journal, an odd home for a piece of electrical-engineering estimation theory, and a hint at how unfamiliar the state-space viewpoint was at the time [2][3]. The continuous-time version followed in 1961 with Richard Bucy, and carries both names [1][3].
The reason the filter conquered aerospace instead of staying a journal curiosity is a specific visit. In the fall of 1960, Kálmán arranged to visit Stanley F. Schmidt at NASA Ames Research Center and presented the paper to the staff of Schmidt's Dynamics Analysis Branch [2][4]. That group had already picked midcourse navigation for a circumlunar mission as its research problem — a nonlinear problem the linear theory didn't cover. Their answer was to relinearize about the current best estimate each cycle, the modification now called the extended Kalman filter, and it went into the Apollo navigation work; the filter was later specified for the C-5A aircraft navigation system as well [1][4]. Nearly everything flying today runs a descendant of that Ames adaptation.
Kálmán collected the field's major hardware over the following decades — the IEEE Medal of Honor in 1974, the Kyoto Prize in 1985, the Draper Prize in 2008, and the National Medal of Science, presented in 2009 [2][3]. He died in Gainesville, Florida in 2016 [3].
Related tools
- /tools/rc-filter — the analog low-pass a Kalman filter often replaces or follows
- /tools/adc-resolution — quantization noise feeds straight into your
R - /tools/snr-enob — sizing measurement noise from datasheet SNR
- /tools/thermal-noise-floor — the physics floor under any RF measurement covariance
- /tools/doppler-shift — the classic radar measurement a tracker's Kalman filter consumes