Inferensys

Glossary

Extended Kalman Filter (EKF)

The Extended Kalman Filter (EKF) is a nonlinear state estimation algorithm that linearizes a system's process and observation models around the current state estimate to handle real-world nonlinearities.
Developer building agentic RAG system, retrieval pipeline diagram on laptop, technical workspace with notes.
SENSOR FUSION ARCHITECTURES

What is Extended Kalman Filter (EKF)?

A core algorithm for state estimation in nonlinear dynamic systems, widely used in robotics, aerospace, and autonomous navigation.

The Extended Kalman Filter (EKF) is a nonlinear state estimation algorithm that linearizes the system's process and observation models around the current mean and covariance to apply the standard Kalman filter equations. It recursively fuses noisy sensor data with a predictive motion model to produce an optimal estimate of a system's hidden state, such as a robot's position and velocity, under the assumption that errors are locally Gaussian. The EKF is a foundational tool in sensor fusion for handling moderate nonlinearities.

The algorithm operates in a two-step predict-update cycle. The prediction step uses the nonlinear process model to project the state and its uncertainty forward. The update step linearizes the observation model to compute the Kalman gain, which optimally weights the new sensor measurement against the prediction. While powerful, the EKF's first-order linearization can introduce significant error for highly nonlinear systems, leading to the development of alternatives like the Unscented Kalman Filter (UKF) and particle filters.

CORE MECHANICS

Key Features of the EKF

The Extended Kalman Filter (EKF) is the workhorse algorithm for nonlinear state estimation in robotics and autonomous systems. Its power lies in a specific set of mathematical adaptations to the classic Kalman filter.

01

Local Linearization via Jacobians

The EKF's defining mechanism is its use of first-order Taylor expansion to linearize nonlinear process and observation models around the current state estimate. This is done by calculating the Jacobian matrices—the matrices of all first-order partial derivatives—of these functions. The Jacobian of the process model (F) linearizes how the state evolves, and the Jacobian of the observation model (H) linearizes how the state maps to measurements. This local approximation allows the EKF to apply the standard Kalman filter equations in a locally valid region.

02

Recursive Predict-Update Cycle

Like the standard Kalman filter, the EKF operates in a two-step recursive loop:

  • Prediction (Time Update): Uses the nonlinear process model f(x) to project the state estimate and its covariance forward in time. The covariance is propagated using the linearized Jacobian F.
  • Update (Measurement Update): When a new sensor measurement arrives, the EKF computes the Kalman Gain—a weighting factor that balances the predicted state with the new observation. The state and covariance are then corrected. This cycle runs continuously, fusing predictions with asynchronous sensor data.
03

Explicit Covariance Propagation

The EKF maintains and propagates a covariance matrix (P) that represents the estimated uncertainty of the state. This matrix is crucial because:

  • It quantifies confidence in the estimate.
  • It dictates the Kalman Gain, determining trust in the model vs. the sensor.
  • It grows during prediction (due to process noise) and shrinks during a measurement update (as uncertainty is reduced). The EKF's linearization directly affects how this covariance is transformed, making accurate Jacobians critical for valid uncertainty bounds.
04

Handling of Nonlinearities

The EKF is designed for mild nonlinearities. Its performance is best when the system's dynamics and sensor models are smooth and the linearization point (the current estimate) is close to the true state. For systems with high nonlinearity (e.g., aggressive vehicle dynamics) or highly non-Gaussian noise, the linearization error can cause the filter to diverge. This limitation is why alternatives like the Unscented Kalman Filter (UKF) or Particle Filter are used for more severe nonlinearities.

05

Multi-Sensor Fusion Architecture

The EKF provides a natural framework for sensor fusion. Different sensor measurements (e.g., IMU, GPS, lidar) are incorporated sequentially in the update step, each with its own observation model h(x) and Jacobian H. The filter's state vector can be extended to include calibration parameters (like sensor biases), enabling online estimation of these parameters alongside the primary state. This makes the EKF a cornerstone of Visual-Inertial Odometry (VIO) and Lidar-Inertial Odometry systems.

06

Computational Efficiency

For many real-time applications, the EKF strikes a favorable balance between accuracy and computational cost. Its complexity is O(n^3) where n is the state dimension, primarily due to the matrix inversion in the Kalman Gain calculation. This is often manageable for state vectors in robotics (e.g., pose, velocity, biases). Engineers use techniques like state cloning for sliding window filters or Schur complement tricks to maintain real-time performance in systems like SLAM.

FILTER COMPARISON

EKF vs. Other Nonlinear Filters

A technical comparison of the Extended Kalman Filter against other prominent nonlinear state estimation algorithms, highlighting core mechanisms, performance characteristics, and ideal use cases for robotics and autonomous systems.

Feature / MetricExtended Kalman Filter (EKF)Unscented Kalman Filter (UKF)Particle Filter (PF)

Core Estimation Method

First-order Taylor series linearization

Deterministic sampling (unscented transform)

Sequential Monte Carlo sampling

Handles Non-Gaussian Noise

Computational Complexity

O(n³) for covariance updates

O(n³), similar to EKF

O(N * n), scales with particle count N

Typical Real-Time Performance

< 1 ms for moderate state dimensions

1-5 ms, slightly higher than EKF

10-1000 ms, highly variable

Memory Footprint

Low (stores mean & covariance)

Low (stores sigma points & covariance)

High (stores N particle states & weights)

Handles Severe Nonlinearities

Theoretical Guarantee

Optimal for linearized Gaussian model

Captures mean & covariance to 3rd order

Converges to true posterior as N → ∞

Common Use Case

GPS/IMU fusion, basic robot odometry

High-fidelity inertial navigation, attitude estimation

Visual SLAM, non-Gaussian tracking, robot localization

SENSOR FUSION ARCHITECTURES

Frequently Asked Questions

The Extended Kalman Filter (EKF) is a cornerstone algorithm for state estimation in nonlinear systems, widely used in robotics, autonomous vehicles, and aerospace. These questions address its core mechanisms, applications, and trade-offs.

The Extended Kalman Filter is a nonlinear state estimation algorithm that linearizes a system's process model and observation model around the current state estimate to recursively estimate unknown variables from noisy sensor data. It works in a two-step recursive cycle: a prediction step and an update step. In the prediction step, the filter uses the nonlinear process model to forecast the next state and its associated covariance matrix (uncertainty). Because the model is nonlinear, the EKF linearizes it by computing the Jacobian matrix of the model's partial derivatives at the current state estimate. In the update step, when a new sensor measurement arrives, the filter linearizes the observation model similarly, computes the Kalman gain to weight the prediction against the new measurement, and fuses them to produce an updated, optimal state estimate and a reduced covariance. This linearization allows it to handle mild nonlinearities where the standard Kalman filter fails.

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.