The Extended Kalman Filter (EKF) is a nonlinear state estimation algorithm that linearizes a system's dynamics and measurement models around the current state estimate to apply the standard Kalman filter equations. It recursively predicts a system's future state using a motion model and corrects that prediction by fusing incoming sensor data, all while maintaining a Gaussian approximation of the estimation uncertainty. This makes it a core tool for sensor fusion and localization in Simultaneous Localization and Mapping (SLAM) and robotic navigation.
Glossary
Extended Kalman Filter (EKF)

What is Extended Kalman Filter (EKF)?
The Extended Kalman Filter (EKF) is a foundational algorithm in robotics and autonomous systems for estimating the state of a nonlinear dynamic system from noisy sensor measurements.
The EKF operates in a two-step predict-update cycle. The prediction step uses the nonlinear process model to project the state and its covariance forward. The update step linearizes the measurement model at the predicted state to compute the Kalman gain, which optimally weights the new sensor observation against the prediction. While powerful, its reliance on first-order Taylor expansion for linearization can introduce significant error for highly nonlinear systems or poor initial estimates, leading to filter divergence—a limitation addressed by more advanced filters like the Unscented Kalman Filter (UKF).
Key Characteristics of the EKF
The Extended Kalman Filter (EKF) is the de facto standard for real-time state estimation in nonlinear systems, such as robotics and autonomous vehicles. It extends the classical Kalman Filter by linearizing the system's dynamics and measurement models around the current state estimate.
First-Order Taylor Expansion
The core mechanism of the EKF is the linearization of nonlinear functions via a first-order Taylor expansion. For a nonlinear state transition function f(x) and measurement function h(x), the EKF computes Jacobian matrices F and H. These matrices, which contain the partial derivatives of the functions with respect to the state, are evaluated at the current state estimate (x̂). This linear approximation allows the filter to propagate the Gaussian uncertainty through the nonlinear models, a process the standard Kalman Filter cannot perform.
- State Transition Jacobian (F):
Fₖ = ∂f/∂x |ₓ=ₓ̂ₖ₋₁ - Measurement Jacobian (H):
Hₖ = ∂h/∂x |ₓ=ₓ̂ₖ₋
Predict-Update Cycle
The EKF operates in a recursive two-step cycle, maintaining a state estimate x̂ and its associated error covariance matrix P.
1. Prediction Step:
- Projects the state forward using the nonlinear model:
x̂ₖ₋ = f(x̂ₖ₋₁, uₖ). - Projects the covariance forward using the linearized model:
Pₖ₋ = Fₖ Pₖ₋₁ Fₖᵀ + Qₖ.Qis the process noise covariance.
2. Update (Correction) Step:
- Computes the Kalman Gain Kₖ, which weights the confidence between the prediction and the new measurement
zₖ. - Updates the state estimate by incorporating the measurement residual:
x̂ₖ = x̂ₖ₋ + Kₖ (zₖ - h(x̂ₖ₋)). - Updates the covariance to reflect the reduced uncertainty:
Pₖ = (I - Kₖ Hₖ) Pₖ₋.
Applications in SLAM & Robotics
The EKF is a foundational algorithm in Simultaneous Localization and Mapping (SLAM) and robotic state estimation. Its ability to fuse asynchronous, multi-modal sensor data into a single consistent state estimate is critical for autonomy.
- Visual-Inertial Odometry (VIO): Fuses camera features with IMU data to estimate 6-DOF pose.
- LiDAR Odometry: Estimates robot motion by matching consecutive LiDAR scans.
- Sensor Fusion: Integrates GPS, wheel encoders (odometry), and IMU data for robust localization.
- Landmark-based SLAM (EKF-SLAM): Maintains a joint state vector containing both the robot pose and the estimated positions of observed landmarks in the map, updating them simultaneously.
Limitations and Failure Modes
While powerful, the EKF has well-understood limitations that engineers must design around.
- Linearization Error: The first-order approximation is only valid locally. For highly nonlinear systems or large uncertainties, the linearization can introduce significant error, causing filter divergence.
- Computational Cost: The need to compute Jacobians analytically or via numerical differentiation at each step adds overhead. The covariance update is
O(n²)in the state dimensionn. - Gaussian Assumption: The EKF assumes all uncertainties are Gaussian. It cannot represent multi-modal distributions, which can occur during data association ambiguity or symmetric environments.
- Susceptibility to Outliers: The filter relies on correct data association. Incorrect matching of sensor observations to map landmarks can catastrophically corrupt the state estimate.
Comparison to Other Filters
The EKF sits within a family of Bayesian filters, each with different trade-offs.
- vs. Kalman Filter (KF): The KF is optimal for linear Gaussian systems. The EKF is a heuristic but effective extension for nonlinear systems.
- vs. Unscented Kalman Filter (UKF): The UKF uses a deterministic sampling approach (the unscented transform) to propagate uncertainty through nonlinear functions, often providing better accuracy than the EKF's Jacobian-based linearization, especially for strong nonlinearities.
- vs. Particle Filter: Particle filters represent the state distribution with a set of samples, making them capable of modeling non-Gaussian, multi-modal distributions. However, they are typically far more computationally expensive than the EKF, making the EKF preferable for high-frequency, embedded real-time systems where the Gaussian assumption holds.
Practical Implementation Notes
Successfully deploying an EKF requires careful engineering beyond the core algorithm.
- Jacobian Computation: Use automatic differentiation (e.g., via
ceres-solverorjax) for reliability and to avoid manual derivation errors. - Tuning Noise Covariances (Q, R): The process noise
Qand measurement noiseRmatrices are critical tuning parameters. They are often determined empirically or via system identification. - Numerical Stability: Use the Joseph form for the covariance update (
Pₖ = (I - Kₖ Hₖ) Pₖ₋ (I - Kₖ Hₖ)ᵀ + Kₖ Rₖ Kₖᵀ) to ensurePremains symmetric positive definite. - Initialization: The filter requires a good initial state estimate
x̂₀and covarianceP₀. Poor initialization can lead to slow convergence or divergence.
EKF vs. Other State Estimation Filters
A technical comparison of the Extended Kalman Filter (EKF) against other common state estimation algorithms used in robotics and SLAM, highlighting their mathematical foundations, performance characteristics, and suitability for different system dynamics.
| Feature / Metric | Extended Kalman Filter (EKF) | Kalman Filter (KF) | Unscented Kalman Filter (UKF) | Particle Filter (PF) |
|---|---|---|---|---|
Core Mathematical Approach | First-order Taylor series linearization of nonlinear models around the current estimate. | Optimal linear estimator for systems with Gaussian noise. | Uses deterministic sigma points to propagate mean and covariance through nonlinear functions (unscented transform). | Sequential Monte Carlo method using a set of weighted samples (particles) to represent the posterior distribution. |
Handles Nonlinear System Dynamics | ||||
Handles Non-Gaussian Noise | ||||
Computational Complexity | O(n³) for covariance update, where n is state dimension. | O(n³), but typically with smaller matrices for linear models. | O(n³), similar to EKF but often requires more sigma point propagations. | O(N·n), where N is the number of particles (can be very high). |
Typical State Dimensionality | Medium (e.g., 6-15 DOF for robot pose + landmarks). | Low to Medium (linear systems). | Medium (similar to EKF). | Low to Medium (high dimensionality leads to particle depletion). |
Representation of Posterior Distribution | Single Gaussian (mean and covariance). | Single Gaussian (mean and covariance). | Single Gaussian (mean and covariance). | Arbitrary distribution (approximated by particle set). |
Primary Use Case in SLAM/Robotics | Feature-based Visual SLAM, sensor fusion for moderately nonlinear systems. | Linear tracking problems, basic sensor fusion (e.g., fusing GPS + IMU with linear models). | Highly nonlinear sensor fusion where derivative calculation is difficult (e.g., certain orientation estimations). | Global localization, non-Gaussian tracking problems (e.g., kidnapped robot problem). |
Susceptibility to Linearization Error | High - Performance degrades with strong nonlinearities or poor initial estimates. | Not Applicable - Assumes linearity. | Low - More accurate mean/covariance propagation than EKF for strong nonlinearities. | None - Does not rely on linearization. |
Real-Time Performance | Good for moderate state sizes. | Excellent. | Good, slightly heavier than EKF due to sigma point propagation. | Poor to Fair, heavily dependent on particle count; often not used for high-rate SLAM front-ends. |
Frequently Asked Questions
The Extended Kalman Filter (EKF) is a cornerstone algorithm for state estimation in nonlinear robotic systems. These questions address its core mechanics, applications, and trade-offs within the context of Simultaneous Localization and Mapping (SLAM) and embodied intelligence.
An Extended Kalman Filter (EKF) is a nonlinear state estimation algorithm that linearizes a system's dynamics and measurement models around the current state estimate to recursively compute optimal predictions and updates. It works by maintaining a Gaussian belief over the system's state (e.g., a robot's pose and velocity), characterized by a mean vector and a covariance matrix. The process follows a two-step cycle:
- Prediction Step: The filter uses the nonlinear motion model to predict the next state mean and propagates the uncertainty (covariance) forward in time.
- Update (Correction) Step: When a new sensor measurement arrives, the filter linearizes the nonlinear measurement model around the predicted state. It then computes the Kalman gain, which optimally weights the prediction against the new measurement to produce a corrected state estimate with reduced uncertainty.
This linearization via a first-order Taylor expansion is the core extension that allows the classic Kalman filter to handle nonlinearities inherent in robotics, such as rotational motion or perspective camera models.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The Extended Kalman Filter is a cornerstone of nonlinear state estimation. These related concepts form the theoretical and practical ecosystem for tracking dynamic systems in robotics and autonomous navigation.
Kalman Filter (KF)
The Kalman Filter is the foundational recursive algorithm for optimal state estimation in linear dynamic systems with Gaussian noise. It operates in a two-step predict-update cycle: predicting the next state using a motion model, then correcting it with a new measurement. Its optimality is mathematically proven for linear systems, making it the benchmark for sensor fusion and tracking. The EKF is a direct nonlinear extension of this core algorithm.
Unscented Kalman Filter (UKF)
The Unscented Kalman Filter is an alternative to the EKF for handling nonlinearities. Instead of linearizing models with a Jacobian, the UKF uses a deterministic sampling technique called the Unscented Transform. It selects a minimal set of sigma points that capture the mean and covariance of the state distribution, propagates these points through the nonlinear functions, and then reconstructs a new Gaussian estimate. This often provides more accurate covariance estimates than the EKF, especially for highly nonlinear systems, without the need to compute Jacobians.
Particle Filter
A Particle Filter is a sequential Monte Carlo method for state estimation that does not assume Gaussian distributions or linear models. It represents the posterior probability distribution with a set of discrete samples called particles, each with an associated weight. It is exceptionally powerful for multi-modal distributions (e.g., global localization) and highly nonlinear/non-Gaussian problems. However, it is computationally more expensive than Kalman-type filters. The trade-off is flexibility vs. computational cost.
Sensor Fusion
Sensor Fusion is the broader process of combining data from multiple, often heterogeneous, sensors to produce a state estimate that is more accurate, complete, and reliable than could be obtained from any single sensor. The EKF is a primary algorithmic tool for probabilistic sensor fusion. It fuses measurements by weighting them according to their covariance matrices (uncertainty). Common fusion pairs in robotics include Visual-Inertial Odometry (VIO), which uses cameras and IMUs, and LiDAR-inertial systems.
Jacobian Matrix
The Jacobian Matrix is the mathematical linchpin of the EKF. It is the matrix of all first-order partial derivatives of a vector-valued function. In the EKF:
- The process model Jacobian linearizes the motion model around the current state estimate.
- The observation model Jacobian linearizes the measurement model. These Jacobians are recalculated at every filter step to create a local linear approximation, which is then used in the standard Kalman filter equations. Computing accurate Jacobians is critical for EKF performance.
Covariance Matrix
The Covariance Matrix is the core representation of uncertainty within the Kalman filter framework. In the EKF, this matrix quantifies the estimated error covariance of the state. It is propagated through the linearized models during the prediction step and updated during the correction step. The matrix's diagonals represent the variance (uncertainty) of each state variable (e.g., x-position, yaw), while off-diagonals represent the correlations between state variables (e.g., how an error in x relates to an error in velocity).

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us