Field Guide · algorithm

Also known as: Kalman filter, KF, linear quadratic estimator, LQE, EKF, UKF

A Kalman filter is a recursive estimator that maintains a running belief about a system’s hidden state — position, velocity, frequency, phase — by alternating a predict step (project the state forward with a motion model) and an update step (correct that prediction with a new, noisy measurement).1 For a linear system driven by Gaussian noise it is the provably optimal minimum-mean-square-error estimator, and it needs to store only the current state estimate and its covariance rather than the whole measurement history.

predictx̂⁻, P⁻ updategain K · innov. measurement z corrected estimate x̂
The Kalman filter loops predict → update: each measurement nudges the projected state by an amount set by the Kalman gain, then the corrected estimate is projected forward again.

How it works

The filter carries two things: a state vector (the best estimate) and a covariance matrix P (how uncertain that estimate is). Each cycle:

  • Predict. Apply the state-transition model to advance one step, and grow P by the process-noise covariance Q — prediction always increases uncertainty.
  • Update. Compare the actual measurement z to what the model predicts; the difference is the innovation. Compute the Kalman gain K from the ratio of predicted uncertainty to measurement noise R, then correct the state by K × innovation and shrink P accordingly.

The gain is the whole story: when the sensor is trusted (small R), K is large and the filter follows the measurement; when the sensor is noisy, K is small and the filter leans on its model. It self-tunes this balance every step from the covariances.

Variants

The basic filter assumes linear dynamics and linear measurements. Real problems — range from a delay, angle from a bearing, frequency from a tone — are usually nonlinear, so practical work uses:

  • Extended Kalman filter (EKF). Linearises the model about the current estimate with a Jacobian each step. Cheap and ubiquitous, but can diverge if the linearisation is poor.
  • Unscented Kalman filter (UKF). Propagates a small set of deterministic “sigma points” through the true nonlinear model, capturing the mean and covariance to higher order without Jacobians — usually more robust than the EKF at similar cost.
  • Particle filter. Drops the Gaussian assumption entirely and represents the belief with weighted samples; handles multimodal, highly nonlinear problems at much higher compute cost.

In practice

Kalman-style recursion appears at both ends of a radio. Inside a demodulator, a tracking loop like a phase-locked loop or an automatic frequency control loop is a degenerate scalar Kalman filter: it predicts the carrier phase/frequency and corrects it from a phase-error measurement, with the loop bandwidth playing the role of the gain. Higher up, target trackers fuse successive position or Doppler fixes to smooth a track and reject outliers, and receiver clock/frequency disciplining fuses GNSS with a local oscillator the same way.

Relevance to SDR

Kalman filtering is everywhere state must be tracked through noise: INS/GNSS fusion in a GPS receiver, radar and multilateration target tracking, attitude estimation in drones, and carrier/timing tracking in modems. GopherTrunk does not run an explicit Kalman filter in its decode chain — its carrier and symbol-timing recovery use dedicated loop filters (Costas/PLL, Gardner) rather than a full covariance-propagating estimator — but those loops are close cousins, and any downstream geolocation or track-fusion layer built on GT’s detections would naturally be Kalman-based. It is worth understanding as the general theory that the specialised tracking loops in an SDR are special cases of.

Sources

  1. Kalman filter — Wikipedia, on the recursive predict/update estimator and its EKF/UKF variants. 

See also