โ† Wiki Index / Computation & Algorithms / Kalman Filter
๐Ÿ’ป Computation & Algorithms

Kalman Filter

The Kalman filter is a recursive linear-quadratic state-space estimation algorithm that infers the hidden state of a dynamical system from sequential noisy measurements by minimizing the posterior mean-squared estimation error.

The Kalman filter (also known in control theory as Linearโ€“Quadratic Estimation, or LQE) is a recursive mathematical algorithm in computation and algorithms that estimates the internal state vector of a time-evolving dynamical system from a time series of indirect, noise-corrupted measurements. Published in discrete-time form by Hungarian-American electrical engineer Rudolf E. Kรกlmรกn in 1960โ€”and extended to continuous-time differential systems by Kรกlmรกn and Richard S. Bucy in 1961, building on earlier statistical foundations by Thorvald Nicolai Thiele (1880) and Peter Swerling (1958)โ€”the filter operates in a two-phase predictโ€“update cycle. Unlike Wiener filtering, which requires storing the entire historical observation record, the Kalman filter summarizes all past history within a sufficient statistic consisting of the current state estimate xฬ‚k|k and its n ร— n error covariance matrix Pk|k. When process disturbances and sensor errors follow Gaussian distributions, the Kalman filter implements recursive Bayesian Inference in closed form; when noise distributions are non-Gaussian with finite second moments, it remains the Best Linear Unbiased Estimator (BLUE).

Linear State-Space Model and Noise Assumptions

State-Transition and Observation Equations

Consider a discrete-time linear dynamical system whose hidden state at time step k โˆˆ N is represented by xk โˆˆ Rn. The state transition from step k โˆ’ 1 to k and the generation of an m-dimensional sensor measurement zk โˆˆ Rm follow the coupled linear stochastic difference equations:

  • State-Transition Equation: xk = Fk xkโˆ’1 + Bk uk + wk
  • Observation Equation: zk = Hk xk + vk

where Fk โˆˆ Rnร—n is the state-transition matrix, Bk โˆˆ Rnร—l is the control-input matrix acting on deterministic control vector uk โˆˆ Rl, and Hk โˆˆ Rmร—n is the observation matrix. The vectors wk โˆผ N(0, Qk) and vk โˆผ N(0, Rk) represent mutually independent, zero-mean white Gaussian process noise (covariance Qk โ‰ฅ 0) and measurement noise (covariance Rk > 0).

Recursive Predict-and-Update Cycle

Phase 1: A Priori Time Update (Prediction)

Given the previous posterior state estimate xฬ‚kโˆ’1|kโˆ’1 and error covariance Pkโˆ’1|kโˆ’1 = E[(xkโˆ’1 โˆ’ xฬ‚kโˆ’1|kโˆ’1)(xkโˆ’1 โˆ’ xฬ‚kโˆ’1|kโˆ’1)T], the filter projects the state and uncertainty forward across timestep k:

  • Prior State Estimate: xฬ‚k|kโˆ’1 = Fk xฬ‚kโˆ’1|kโˆ’1 + Bk uk
  • Prior Error Covariance: Pk|kโˆ’1 = Fk Pkโˆ’1|kโˆ’1 FkT + Qk

Phase 2: A Posteriori Measurement Update (Correction)

When measurement zk arrives, the filter compares it against the predicted observation Hkxฬ‚k|kโˆ’1 to form the innovation (measurement residual) แปนk and its covariance Sk:

  • Innovation Vector: แปนk = zk โˆ’ Hk xฬ‚k|kโˆ’1, with Sk = Hk Pk|kโˆ’1 HkT + Rk
  • Optimal Kalman Gain: Kk = Pk|kโˆ’1 HkT Skโˆ’1
  • Posterior State & Covariance: xฬ‚k|k = xฬ‚k|kโˆ’1 + Kk แปนk, and Pk|k = (I โˆ’ Kk Hk) Pk|kโˆ’1

Optimal Gain Derivation and Joseph Stabilized Form

For any gain matrix Kk, expanding the covariance of the posterior error ek = (I โˆ’ KkHk)(xk โˆ’ xฬ‚k|kโˆ’1) โˆ’ Kkvk yields the symmetric Joseph stabilized covariance form:

Pk|k = (I โˆ’ Kk Hk) Pk|kโˆ’1 (I โˆ’ Kk Hk)T + Kk Rk KkT

Differentiating the mean-squared error E[โ€–ekโ€–22] = Tr(Pk|k) with respect to Kk and setting โˆ‚Tr(Pk|k)/โˆ‚Kk = โˆ’2(HkPk|kโˆ’1)T + 2KkSk = 0 yields Kk = Pk|kโˆ’1HkTSkโˆ’1. When sensor noise is large (Rk โ†’ โˆž), Kk โ†’ 0 and the filter trusts its dynamical prediction; when prior uncertainty dominates (Rk โ†’ 0), Kk โ†’ Hkโˆ’1 and the filter trusts the sensor measurement. To prevent floating-point loss of positive-definiteness, spacecraft navigation software uses the Joseph form or Potter's square-root filter, which propagates the Cholesky Decomposition factor P = LLT.

Nonlinear Extensions and Scientific Applications

Extended, Unscented, and Ensemble Kalman Filters

Physical systems in orbital mechanics, robotics, and geophysical fluid dynamics follow nonlinear state transitions xk = f(xkโˆ’1, uk) + wk and observation mappings zk = h(xk) + vk:

Filter VariantNonlinearity HandlingState ScalingPrimary Scientific & Engineering Applications
Linear Kalman Filter (KF)Linear matrices Fk, HkO(n3)Radar tracking, inertial navigation, state-space econometrics
Extended Kalman Filter (EKF)1st-order Taylor Jacobians F = โˆ‚f/โˆ‚x, H = โˆ‚h/โˆ‚xO(n3)Apollo cislunar navigation, GPS/INS fusion, SLAM
Unscented Kalman Filter (UKF)Deterministic Unscented Transform (2n + 1 sigma points)O(n3)High-angle attitude control, nonlinear chemical reactors
Ensemble Kalman Filter (EnKF)Monte Carlo ensemble of Nens โ‰ˆ 50โ€“100 realizationsO(Nens2 n)Numerical weather prediction, General Circulation Model assimilation

Apollo Navigation and Geophysical Data Assimilation

The first operational deployment of the Kalman filter occurred at NASA's Ames Research Center under Stanley F. Schmidt in 1960โ€“1961 for the Apollo Guidance Computer (AGC), fusing onboard sextant star-landmark angles with ground radar along the nonlinear Earthโ€“Moon trajectory via the Extended Kalman Filter (EKF). In contemporary atmospheric and ocean sciences, Geir Evensen's Ensemble Kalman Filter (EnKF) (1994) assimilates millions of satellite radiance and ocean float observations into global forecast models with n > 108 state variables.

Frequently Asked Questions

Why is the Kalman filter called a recursive estimator?

Because the prior estimate xฬ‚k|kโˆ’1 and covariance Pk|kโˆ’1 form a sufficient statistic for all past measurements z1:kโˆ’1, raw historical observations can be discarded after each update, keeping memory and CPU cost constant per timestep.

How does the Unscented Kalman Filter (UKF) improve upon the Extended Kalman Filter (EKF)?

The EKF linearizes f(x) via first-order Taylor Jacobians at the mean, which can underestimate covariance and diverge under strong curvature. The UKF (Julier and Uhlmann, 1997) propagates 2n + 1 deterministic sigma points through the true nonlinear function f, capturing the posterior mean and covariance to third order without Jacobians.

What is the difference between Kalman filtering and Kalman smoothing?

Filtering estimates the current state xk given measurements up to the present (z1:k), whereas smoothing (such as the Rauchโ€“Tungโ€“Striebel smoother) runs a backward pass over a recorded trajectory z1:T to estimate xฬ‚k|T using both past and future observations.

References

  1. Kรกlmรกn, R. E. (1960). A new approach to linear filtering and prediction problems. Journal of Basic Engineering, 82(1), 35โ€“45. https://doi.org/10.1115/1.3662552
  2. Kรกlmรกn, R. E., & Bucy, R. S. (1961). New results in linear filtering and prediction theory. Journal of Basic Engineering, 83(1), 95โ€“108. https://doi.org/10.1115/1.3658902
  3. Rauch, H. E., Tung, F., & Striebel, C. T. (1965). Maximum likelihood estimates of linear dynamic systems. AIAA Journal, 3(8), 1445โ€“1450. https://doi.org/10.2514/3.3166
  4. Evensen, G. (1994). Sequential data assimilation with a nonlinear quasi-geostrophic model using Monte Carlo methods to forecast error statistics. Journal of Geophysical Research: Oceans, 99(C5), 10143โ€“10162. https://doi.org/10.1029/94JC00572
  5. Julier, S. J., & Uhlmann, J. K. (2004). Unscented filtering and nonlinear estimation. Proceedings of the IEEE, 92(3), 401โ€“422. https://doi.org/10.1109/JPROC.2003.823141
๐Ÿงฌ Support Open Science
Explore interactive science games on LowKey Games or browse scientific apparel & accessories in the CRV Science Shop.
๐Ÿ’ก Spot an inaccuracy or have primary literature to expand this article?
Submit a citation or revision note using your shared CRV Science / LowKey Games profile ID.
Suggest Revision