Source-linked AI summary

A simple derivation of the Kalman filter

Marco Chiani, Giovanni Petris, Moe Z. Win

arXiv:2609.02332v1math.OCeess.SPeess.SYmath.STstat.ME

TL;DR

The note addresses estimating the internal state of a discrete-time linear system, responding to expositions that omit detailed derivations. It presents a concise, self-contained derivation of the Kalman filter equations using least-squares estimation while preserving rigor and generality, yielding BLUE state estimates that incorporate observed data.

Abstract

from arXiv · show

In this lecture note, we present a concise and self-contained derivation of the discrete-time Kalman filter equations that requires only a basic understanding of least squares estimation. The treatment is designed to minimize mathematical overhead while preserving both rigor and generality.

SCOPE

The note builds the Kalman filter from least-squares estimation and standard linear-algebra identities, emphasizing a concise treatment that preserves rigor and generality.

  • The presentation minimizes mathematical overhead while preserving rigor and generality.Source: SCOPE · p. 1

PREREQUISITES

  • The Gauss–Markov theorem identifies ordinary least squares as the best linear unbiased estimator under white noise.Source: PREREQUISITES · p. 2
  • For general noise covariance, the BLUE is obtained through generalized least squares, including a whitening step.Source: PREREQUISITES · p. 2
  • The Gauss–Markov estimator has the smallest error variance for each component and minimizes the sum of variances.Source: PREREQUISITES · p. 3
  • The derivation uses least-squares tools alongside the Woodbury matrix inversion identity and related matrix identities.Source: PREREQUISITES · pp. 2–3

A + UCV

The Kalman filter estimates a discrete-time linear system’s current state from noisy observations and controls. The note formulates the estimation problem and develops iterative state estimation using prior estimates and covariances.

KALMAN FILTER: PROBLEM STATEMENT

SOLUTION: DERIVATION OF THE KALMAN EQUATIONS

  • The resulting equations provide the BLUE of the current state using both the prediction and observed data.Source: Goal · p. 4

SOLUTION: DERIVATION OF THE KALMAN EQUATIONS

The derivation starts from a stacked linear model and least-squares estimation, then uses matrix identities to obtain the standard Kalman equations. The resulting formulation also extends to correlated process and measurement noise.

Generalization: correlated process and measurement noise

Generalization: correlated process and measurement noise

0 R −C⊤e Q−1C

The interpretation section presents the Kalman filter as prediction followed by measurement-based correction, with uncertainty-weighted estimation and several practical computational and modeling consequences.

  • The Kalman filter is the least squares estimator of the state and becomes the Maximum Likelihood estimator for normally distributed noise.Source: INTERPRETATION · p. 7
  • The estimate combines a model-based prediction with a correction driven by the observed measurement.Source: INTERPRETATION · p. 7
  • Prediction and observation residuals are weighted according to their uncertainties, so greater uncertainty has less influence on the estimate.Source: INTERPRETATION · p. 8
  • Without Gaussian assumptions, the variational formulation remains an alternative characterization under the stated second-order assumptions.Source: INTERPRETATION · p. 8

Sequential Kalman filtering

  • When m = 1, the required m×m inversion reduces to scalar division, while block-diagonal R permits sequential block updates.Source: INTERPRETATION · pp. 8–9
  • At time k, the new estimate requires only the previous estimate and covariance, the current measurement, and the model matrices at time k.Source: INTERPRETATION · p. 8
  • Tuning Q and R affects filter behavior: Q controls responsiveness to dynamics, whereas R governs sensitivity to measurement noise.Source: INTERPRETATION · p. 8

Sequential Kalman filtering

  • Sequential Kalman filtering avoids matrix inversions for uncorrelated measurements by updating independent sensors one at a time.Source: INTERPRETATION · pp. 8–9

WORKED NUMERICAL EXAMPLE (KALMAN FILTERING)

A two-dimensional constant-velocity robot example shows how sequential Kalman filtering combines position measurements with model predictions to estimate position and infer velocity. Measurement updates reduce covariance, reflecting increased confidence.

Model setup

  • The example models a robot moving along a straight line with position and velocity as the state variables.It uses a constant-velocity model over sampling interval ∆t, with Bu = 0.Source: WORKED NUMERICAL EXAMPLE (KALMAN… · p. 9

Numerical settings

  • The example uses process-noise covariance Q = 0.01 I, measurement-noise covariance R = 0.04, and measurements z1 = 1.8 and z2 = 4.3.The initial estimate and covariance are specified at k = 0.Source: WORKED NUMERICAL EXAMPLE (KALMAN… · pp. 9–10

Filtering steps

  • Sequential filtering repeats prediction, Kalman-gain and innovation computation, and data-fusion updates for each measurement.The no-data prediction is corrected using the observed measurement.Source: WORKED NUMERICAL EXAMPLE (KALMAN… · p. 10

Model setup

Interpretation

  • The filter combines model-based prediction with noisy measurements to improve both estimated position and inferred velocity.Because m = 1, the innovation covariance is scalar and the gain computation requires only scalar divisions.Source: WORKED NUMERICAL EXAMPLE (KALMAN… · p. 10
  • The decrease of Pk from P0 to P2 reflects increased confidence after incorporating measurements.The covariance reduction is the numerical example’s stated interpretation of the updates.Source: WORKED NUMERICAL EXAMPLE (KALMAN… · p. 10

SEQUENCE OF OBSERVATIONS AND KALMAN: FILTERING AND SMOOTHING

The note extends a single least-squares/BLUE prediction–update step to sequences of observations. Iterating the equations gives filtering with past and current data, while future measurements support smoothing.

Filtering

Smoothing

Model and estimation tasks

The discrete-time linear model supports two estimation tasks: filtering the final state from measurements through time n and smoothing earlier states using the full observation sequence. The note identifies classical Kalman filtering as the recursive solution to the first task.

Model assumptions

  • The state-evolution equations are written as linear constraints involving F, xk−1, xk, and process noise wk.The model is specified for k = 1, 2, …, n.Source: Model and estimation tasks · p. 11
  • The model assumes zero-mean, mutually independent noise terms and an unbiased prior (bx0, P0).Noise covariances are part of the stated model assumptions.Source: Model and estimation tasks · p. 11

Estimation tasks

  • Problem 1 estimates the final state xn using all measurements available at time n, denoted bxn|n.The available data are z1:n.Source: Model and estimation tasks · p. 11
  • Problem 2 estimates an intermediate state xk or the whole trajectory using all measurements through time n, denoted bxk|n.This is the smoothing task.Source: Model and estimation tasks · p. 11
  • Classical Kalman filtering solves Problem 1 recursively, while Problem 2 is addressed through smoothing.The note distinguishes filtering from estimation that uses future observations.Source: Model and estimation tasks · p. 11

Batch (whole-sequence) least squares

Stacking the dynamics and measurements converts whole-sequence estimation into a block-structured least-squares system. Gaussian elimination yields a forward recursion equivalent to filtering and a backward recursion for smoothing.

Batch formulation

Forward recursion

  • Gaussian elimination avoids directly inverting the large matrix M and transforms the system through a forward recursion.The forward sweep determines the final filtered estimate bxn|n.Source: §1 · pp. 12–13

Backward recursion

  • A backward back-substitution recursion recovers the remaining smoothed state estimates bxk|n.After the forward sweep, the system is upper block-bidiagonal.Source: §1 · p. 13

Filtering and smoothing

  • The forward recursion computes the least-squares estimate of the current state from past information and the current measurement.The backward recursion refines past-state estimates through smoothing.Source: §1 · p. 13

Forward recursion (Kalman filtering)

The Kalman filter forward recursion is obtained by solving a structured least-squares problem, while backward substitution yields smoothing recursions for past states and covariances.

Forward recursion (Kalman filtering)

  • Kalman filtering implements the forward recursion used to solve the block-structured least-squares system.The derivation connects the standard filter equations with forward elimination of the associated linear system.Source: Forward recursion (Kalman filtering) · p. 13, §1 · p. 14
  • The filter output at time k is the filtered estimate x̄_k = x̂_k|k based only on measurements through time k.At time n, this estimate is the least-squares/BLUE estimate of x_n given z_1:n.Source: §1 · p. 14
  • Backward substitution recovers the remaining state variables after the block Gaussian elimination and produces the smoothing recursion.Equation (34) is identified with the Rauch–Tung–Striebel smoother.Source: §1 · pp. 14–15
  • Smoothed covariances P_k|n are computed recursively backward from P_n|n = P_n and incorporate information from future measurements.Typically, P_k|n ≼ P_k, so smoothing reduces uncertainty at time k.Source: §1 · p. 15
  • The backward recursion can refine past filtered state estimates using measurements collected after those states.This refinement applies to both state estimates and their covariances.Source: §1 · pp. 14–15

WORKED NUMERICAL EXAMPLE (CONTINUED): SMOOTHING

The numerical example illustrates smoothing as a backward refinement of earlier states using later measurements and the system dynamics.

WORKED NUMERICAL EXAMPLE (CONTINUED): SMOOTHING

  • Smoothing improves estimates of past states x_0 and x_1 by exploiting all available measurements z_1 and z_2.The smoother recursion is applied to obtain smoothed states and covariances at k = 1 and k = 0.Source: WORKED NUMERICAL EXAMPLE (CONTINUED):… · p. 16
  • The future measurement z_2 refines x̂_1|1 and x̂_0|0 through the innovation at k = 2 propagated backward through the dynamics.The example highlights how later observations affect earlier estimates.Source: WORKED NUMERICAL EXAMPLE (CONTINUED):… · p. 16
  • The update is especially visible in the velocity component, which is inferred through the state model rather than measured directly.This provides a concrete illustration of how dynamics transmit future measurement information to an earlier unmeasured component.Source: WORKED NUMERICAL EXAMPLE (CONTINUED):… · p. 16

WHAT WE HAVE LEARNED?

The note derives the Kalman filter from least squares and presents filtering and smoothing as consequences of a unified state-estimation formulation. It also emphasizes generality beyond Gaussian disturbances and compatibility with correlated errors.

WHAT WE HAVE LEARNED?

  • The Kalman filter is fundamentally the least-squares estimator of a discrete-time linear system’s internal state.The formulation combines state prediction and measurements in a block-structured least-squares problem.Source: WHAT WE HAVE LEARNED? · p. 17
  • The derivation requires no assumption of Gaussian disturbances.Gaussian optimality appears as a special instance of the least-squares perspective.Source: WHAT WE HAVE LEARNED? · p. 17
  • Correlations between process and measurement errors are accommodated without structural changes to the equations.The note presents this as a generality of the same formulation.Source: WHAT WE HAVE LEARNED? · p. 17
  • When measurement-noise covariance is diagonal, sequential scalar updates avoid explicit matrix inverses and can improve numerical implementation.This is presented as an implementation option for the sequential formulation.Source: WHAT WE HAVE LEARNED? · p. 17
  • The least-squares viewpoint leads directly to both the Kalman filter and backward recursions for smoothing.This gives a unified interpretation of forward filtering and backward trajectory estimation.Source: WHAT WE HAVE LEARNED? · p. 17
Loading 2609.02332v1…