Advanced Filtering: Unscented Kalman vs Standard Kalman

Kalman FilterUKFEKFEstimationRobotics

The Kalman filter is a recursive algorithm that combines noisy measurements with a system model's prediction to give the best estimate of states that are noisy or cannot be measured directly (position, velocity, weight trend and so on). The Extended (EKF) and Unscented (UKF) Kalman filters carry the same idea over to non-linear systems.

How does the standard Kalman filter work?

Two stages repeat at every step:

  1. Predict: the model projects the previous state forward; the uncertainty (P) grows by the process noise (Q).
  2. Update: a new measurement arrives; the difference between prediction and measurement is weighted by the Kalman gain (K) and added to the state.

The standard Kalman filter gives the optimal estimate when the model is linear and the noises are Gaussian. "Linear" here does not mean moving at constant speed; it means the state transition and measurement relationship can be written as matrices.

Worked example (one-dimensional)

In a weighing system the previous estimate is 100.0 kg with uncertainty P = 4 kg²; a new measurement reads 102.0 kg with measurement noise variance R = 1 kg²:

  • K = P / (P + R) = 4 / 5 = 0.8
  • New estimate = 100.0 + 0.8 × (102.0 − 100.0) = 101.6 kg
  • New uncertainty = (1 − K) × P = 0.8 kg²

Because the measurement is more trustworthy than the prediction (R < P), the result sits close to the measurement. Increase R and the filter trusts measurements less, giving a smoother but slower response.

EKF vs UKF

EKFUKF
Handling non-linearityLinearizes the model at the operating point with Jacobian (derivative) matricesPropagates 2n + 1 sigma points through the model for an n-dimensional state
Needs derivativesYesNo
Under strong non-linearityLinearization error can growOften more accurate mean and covariance
Computational loadSame orderSame order, more model evaluations as n grows

For example, with a 3-state system the UKF uses 7 sigma points per step. The UKF is often more stable on strongly non-linear systems, but it is not better in every case. For multi-modal or non-Gaussian distributions, methods such as particle filters may be needed.

Common mistakes

  • Picking Q and R by trial and error instead of basing them on measured noise.
  • Using a Kalman filter on steady signals where a simple moving average would do.
  • Not checking numerical stability (keeping the covariance positive definite) on an embedded processor.

Where is it used?

Robotics and position estimation, sensor fusion (IMU + GNSS), dynamic weighing and condition tracking for predictive maintenance are typical applications. Running these algorithms on a microcontroller is a matter of embedded systems design. For Amazeng's model development work on sensor data, see Industrial AI; for on-device inference, see Predictive Maintenance with NPU MCUs.

Related Terms