AI Glossary / Time series and signal processing / Intermediate
Extended Kalman filter
Definition
An extended Kalman filter, or EKF, estimates the evolving hidden state of a system whose dynamics or measurements are nonlinear. It predicts the state, compares predicted measurements with incoming observations, and corrects the estimate. It uses local derivatives to approximate uncertainty propagation, retaining a state estimate and an associated covariance matrix.
What it means
A robot's position is not observed perfectly. Its motion model predicts where it should be, while sensors provide noisy evidence about where it is. When a sensor measures distance or angle, the relationship between those readings and Cartesian position is nonlinear.
The EKF combines model and sensor information sequentially. It is an approximation to nonlinear probabilistic state estimation, not a guarantee that every possible state distribution can be summarized accurately by one estimate and covariance.
How it works
Start with an estimated state and covariance. Apply the nonlinear transition function to predict the next state. Evaluate its Jacobian, the matrix of local derivatives, near the current estimate to propagate covariance, adding process-noise uncertainty.
Next, apply the nonlinear measurement function to the predicted state. Subtract this predicted measurement from the actual observation to obtain the innovation. Use the measurement Jacobian and noise covariance to calculate a Kalman gain, then adjust the state and covariance. The nonlinear functions themselves supply predictions; their derivatives support the local uncertainty calculation. Correct handling of angles, timing, and measurement units matters alongside the equations.
Three practical examples
- A mobile robot combines wheel-motion estimates with range measurements. The EKF can reduce drift when the models and sensor associations are suitable.
- An industrial team estimates an internal process state from indirect measurements, using a nonlinear relationship between that state and the instrument output.
- A vehicle tracker represents motion in map coordinates while a sensor reports bearing and range. The measurement transformation motivates nonlinear filtering even if the chosen motion model is linear.
Think of it this way
Think of navigating a curved road using a short straight tangent at your present location. That local approximation can guide a small step well, but it becomes unreliable when the curve is sharp or your location estimate is badly wrong. Recomputing the tangent helps, yet does not make a distant or ambiguous situation automatically simple.
Worked example
Consider an original scalar measurement-update example. A dimensionless hidden state has predicted mean 2 and predicted variance 0.25. A fictional sensor measures z = x squared plus independent, zero-mean noise of variance 1. The observed reading is 5. These values are stipulated; the prediction step has already occurred.
The predicted measurement used by this first-order EKF is h(2) = 4. The derivative is H = 2x = 4 at the predicted mean. Innovation variance is S = H squared × P + R = 16 × 0.25 + 1 = 5. The gain is K = P × H / S = 0.25 × 4 / 5 = 0.2.
The innovation is 5 − 4 = 1, so the updated estimate is 2 + 0.2 × 1 = 2.2. The scalar covariance update gives (1 − 0.2 × 4) × 0.25 = 0.05. Independently, the Joseph-form calculation gives (0.2 squared × 0.25) + (0.2 squared × 1) = 0.05.
This is an approximate update, not an exact posterior calculation. Even the true expected squared measurement differs from the square of the mean when state variance is positive. A squared sensor also cannot distinguish positive and negative states by itself.
Illustrative case study
Illustrative fictional case: Alder Robotics tests a cart tracker using a motion model and an angle-reporting sensor. It initially subtracts angles as ordinary numbers, producing a large apparent error when a reading crosses the angle boundary.
The team corrects the angular residual convention, checks time alignment, and replays recorded trajectories. It compares predicted uncertainty with actual errors and includes deliberately poor initial positions. A better-looking path is treated as preliminary evidence, while systematic inconsistency triggers model review. This fictional example illustrates an implementation issue; it does not establish a certified navigation system.
Common misconceptions and mistakes
Extended does not mean exact for nonlinear systems. Strong curvature, poor initialization, unobserved state directions, or multiple plausible states can invalidate a local Gaussian approximation. An apparently small covariance can accompany a wrong estimate.
Do not replace the nonlinear prediction by a Jacobian multiplication without the corresponding offset. A derivative is a local sensitivity, not generally the original function. Also distinguish measurement noise from process noise: they describe different uncertainties. Ignoring correlations or assigning unjustifiably tiny noise values can make the filter overconfident.
Business use
Organizations use EKFs where timely state estimates support tracking, monitoring, and control. Their appeal includes sequential updates and a compact representation, especially when a credible physical model already exists.
Before deployment, test representative trajectories, sensor outages, outliers, and initialization errors. Record calibration assumptions and coordinate conventions. Compare with simpler linear filtering when appropriate, and with alternative nonlinear filters when local linearization is inadequate. Operational decisions should consider uncertainty quality as well as average estimation error.
People also ask
Does an EKF require a neural network?
No. Its transition and measurement functions may come from physical equations.
Is it the same as an unscented Kalman filter?
No. The latter propagates selected representative points instead of relying on the same first-order Jacobian approximation.
Can it recover an unobservable state?
Not merely by running longer; the available model and measurements must provide information about that state.
Check your understanding
In the example, why is the innovation 1 rather than 3?
Answer: The observation is compared with predicted sensor output 4, not directly with state estimate 2.
Is updated variance 0.05 proof of actual error variance?
Answer: No. It is the filter's approximate uncertainty under its assumptions.
What happens to the squared sensor's derivative at state zero?
Answer: It is zero, exposing a case where first-order sensitivity misses information in the nonlinear measurement.
Related terms
- Kalman filter
- Jacobian
- Covariance
- Observability (software)
- Unscented Kalman filter
- state-space model
- innovation
- process noise
- measurement noise
- observability
- particle filter
Learn next
work through a linear Kalman update, then derive a measurement Jacobian from a simple nonlinear sensor. Examine innovation diagnostics and numerical covariance updates before attempting multidimensional tracking.
More in Time series and signal processing
- Exogenous variable - An exogenous variable is a variable whose value is treated as determined outside the model or system being analyzed.
- Exponential growth - Exponential growth is growth in which a quantity increases by a constant proportion over equal time intervals.
- Exponential smoothing - Exponential smoothing is a family of methods that updates estimates of a time series as new observations arrive.
- Fast Fourier transform - A fast Fourier transform, or FFT, is an algorithm for computing a discrete Fourier transform efficiently.
- Filter - A filter is a rule or system that transforms a sequence of observations to retain, suppress, or reshape particular features.
- Filter Design - Filter design is the process of choosing a filter structure and parameters to meet specified requirements for transforming a signal.
Sources
Sources: MathWorks, Extended Kalman Filters, official nonlinear tracking formulation: https://www.mathworks.com/help/radar/ug/extended-kalman-filters.html . Antonio Sala, Universitat Politècnica de València, Extended Kalman filter for nonlinear state estimation: https://personales.upv.es/asala/YT/V/ekfteoEN.html . Primary documentation and university overview consulted. The numerical example and fictional case are original.
Previous: Extended Boolean model Next: Extended Kalman smoother