Inferensys

Glossary

Extended Kalman Filter (EKF)

The Extended Kalman Filter (EKF) is a recursive state estimation algorithm for nonlinear systems that applies a Kalman filter by linearizing the state transition and observation models around the current state estimate using a first-order Taylor series expansion.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
NONLINEAR STATE ESTIMATION

What is an Extended Kalman Filter (EKF)?

The Extended Kalman Filter is a recursive state estimation algorithm for nonlinear dynamic systems that linearizes the current mean and covariance estimates at each time step to apply the standard Kalman filter equations.

An Extended Kalman Filter (EKF) is a nonlinear extension of the classical Kalman filter that estimates the state of a dynamic system by computing a first-order Taylor series linearization of the state transition and measurement models around the current state estimate. Unlike the linear Kalman filter, the EKF handles systems where the process dynamics or sensor observations are governed by nonlinear functions, using Jacobian matrices to propagate state estimates and covariances through these nonlinear transformations.

The EKF operates in a two-step recursive cycle: a prediction step that projects the state and error covariance forward using the nonlinear process model, and an update step that corrects the prediction using noisy sensor measurements weighted by the Kalman gain. While computationally efficient for moderately nonlinear systems, the EKF can diverge under high nonlinearity because the linearization discards higher-order terms, making alternatives like the Unscented Kalman Filter (UKF) or particle filter preferable for highly non-Gaussian or multimodal distributions.

NONLINEAR STATE ESTIMATION

Key Characteristics of the EKF

The Extended Kalman Filter is the de facto standard for state estimation in nonlinear systems. It adapts the classic Kalman filter by linearizing the system around the current estimate, making it indispensable for real-world sensor fusion where dynamics and measurements are rarely linear.

01

Local Linearization via Jacobians

The EKF handles nonlinearity by computing a first-order Taylor series expansion around the current state estimate. At each timestep, it calculates the Jacobian matrices—partial derivatives of the state transition and measurement functions. This linearizes the system locally, allowing the standard Kalman filter equations to be applied. The quality of the estimate depends heavily on the validity of this linear approximation; highly nonlinear systems may require more advanced filters like the Unscented Kalman Filter (UKF).

02

Two-Step Recursive Cycle

The EKF operates in a perpetual loop of prediction and correction. The Prediction Step propagates the state and covariance forward through the nonlinear dynamics model. The Update Step fuses a new sensor measurement by calculating the Kalman Gain, which optimally weights the prediction against the measurement noise. This recursive nature makes it memory-efficient, requiring only the previous state and covariance to process new data.

03

Core Assumptions and Limitations

The EKF assumes that process and measurement noises are additive, white, and Gaussian. It also assumes the nonlinear functions are differentiable. Key limitations include:

  • Unmodeled dynamics can cause divergence.
  • Linearization errors accumulate in highly nonlinear systems.
  • Computational cost of Jacobian calculation can be high for high-dimensional states.
  • Inconsistent covariance estimates if the true distribution is multi-modal.
04

Sensor Fusion Workhorse

The EKF is the primary engine behind many Visual-Inertial Odometry (VIO) and LiDAR-Inertial Odometry (LIO) systems. It fuses high-rate IMU data (used for prediction) with lower-rate camera or LiDAR data (used for update). This tight coupling compensates for the drift of inertial sensors and the scale ambiguity of vision, providing robust, real-time pose estimation for autonomous vehicles and mobile robots.

05

Error-State Formulation (ES-EKF)

A popular variant, the Error-State EKF, estimates the difference between the nominal state and the true state. This offers numerical stability advantages:

  • The error state is always close to zero, making linearization more accurate.
  • It avoids singularities associated with 3D orientation representations like quaternions.
  • It naturally separates the high-frequency IMU integration from the slower filter correction loop.
06

Practical Tuning and Consistency

Filter performance is critically dependent on the process noise covariance (Q) and measurement noise covariance (R) matrices. Tuning these is often a non-trivial engineering task:

  • R is derived from sensor datasheets or static characterization.
  • Q is often tuned empirically to account for unmodeled dynamics.
  • Normalized Innovation Squared (NIS) tests are used to verify filter consistency and detect divergence in real-time.
EXTENDED KALMAN FILTER

Frequently Asked Questions

Clear, technically precise answers to the most common questions about the Extended Kalman Filter's mechanism, application, and limitations in nonlinear state estimation.

An Extended Kalman Filter (EKF) is a recursive state estimation algorithm that adapts the linear Kalman filter to handle nonlinear system dynamics and measurement models by performing a first-order Taylor series linearization around the current state estimate. It works in a two-step predict-update cycle. In the prediction step, the EKF propagates the state forward using the full nonlinear process model f(x) and computes the state covariance using the Jacobian matrix F—the partial derivative of f with respect to the state. In the update step, it calculates the Kalman gain by linearizing the measurement function h(x) via its Jacobian H, then corrects the predicted state with the actual sensor observation. This local linearization allows the EKF to apply the optimal Bayesian mathematics of the standard Kalman filter to problems like radar tracking, robot localization, and visual-inertial odometry, where the underlying physics are inherently nonlinear. However, because it approximates the true probability distribution as Gaussian and relies on a first-order linearization, the EKF can diverge if the system is highly nonlinear or if the state estimate is far from the true value.

NONLINEAR STATE ESTIMATION COMPARISON

EKF vs. UKF vs. Particle Filter

A comparative analysis of the three dominant nonlinear filtering algorithms used in sensor fusion, highlighting their linearization strategies, computational complexity, and suitability for different manufacturing automation scenarios.

FeatureExtended Kalman Filter (EKF)Unscented Kalman Filter (UKF)Particle Filter (PF)

Linearization Strategy

Analytical Jacobian (1st-order Taylor)

Unscented Transform (sigma points)

Sequential Monte Carlo (sampling)

Posterior Distribution

Gaussian approximation

Gaussian approximation

Non-parametric (arbitrary)

Computational Complexity

O(d³)

O(d³)

O(N·d²) to O(N·d³)

Typical Particle Count

500–10,000

Handles Severe Nonlinearities

Handles Multimodal Distributions

Derivative-Free

Standard State Dimension

d < 50

d < 20

d < 10

Global Convergence Guarantee

Susceptibility to Linearization Error

High

Low

None

Typical Update Rate

1 kHz

500 Hz

10–100 Hz

Implementation Complexity

Moderate

Moderate

High

Memory Footprint

Low

Low

High

Tuning Parameters

Process & measurement noise covariances

Process & measurement noise covariances + sigma-point spread

Process & measurement noise covariances + resampling strategy

Ideal Manufacturing Use Case

CNC tool-wear tracking, motor state estimation

Robotic arm joint estimation, chemical process control

AGV global localization, multi-target tracking

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.