The Extended Kalman Filter (EKF) is a nonlinear variant of the Kalman filter that estimates the state of a dynamic system by linearizing its nonlinear process and measurement models around the current mean and covariance. It performs a predict-update cycle: first predicting the state forward using a motion model, then correcting the prediction with incoming sensor data. This allows robots to fuse data from sources like IMUs, cameras, and LiDAR for tasks such as localization and visual-inertial odometry (VIO) in real-time.
Glossary
Extended Kalman Filter (EKF)

What is Extended Kalman Filter (EKF)?
The Extended Kalman Filter is the cornerstone nonlinear state estimator for robotics, enabling real-time sensor fusion and localization where linear assumptions fail.
The EKF's core mechanism is the first-order Taylor expansion, which approximates nonlinear functions as linear at the current estimate. This introduces linearization error, making the filter suboptimal but computationally efficient for many robotic applications. It assumes noise is Gaussian and is foundational for algorithms like SLAM. For highly nonlinear or non-Gaussian problems, the Unscented Kalman Filter (UKF) or Particle Filter are often preferred alternatives.
Key Features of the Extended Kalman Filter
The Extended Kalman Filter (EKF) is the foundational algorithm for nonlinear state estimation in robotics and autonomous systems. It extends the classic Kalman Filter by linearizing nonlinear models around the current estimate, enabling real-time tracking in complex, dynamic environments.
Local Linearization via Jacobians
The core mechanism of the EKF is the first-order Taylor expansion of nonlinear system and measurement models. It calculates Jacobian matrices—partial derivatives of the models with respect to the state and noise variables—at the current state estimate. This linearization approximates the nonlinear functions as linear for a single prediction-update cycle, making the Kalman filter's mathematics applicable.
- Process Model Jacobian (F): Linearizes the state transition function.
- Measurement Model Jacobian (H): Linearizes the function that maps the state to sensor observations.
- This approximation is valid only locally, around the current estimate, and must be recomputed at every time step.
Two-Step Predict-Update Cycle
The EKF maintains a Gaussian belief over the system state, characterized by a mean vector and a covariance matrix. It operates in a rigorous two-step recursive cycle:
1. Prediction (Time Update):
- Projects the state mean and covariance forward using the nonlinear process model.
- The covariance is propagated using the linearized Jacobian
Fto approximate how uncertainty grows due to system dynamics and process noise.
2. Update (Measurement Update):
- When a sensor measurement arrives, the EKF computes the Kalman Gain, which optimally weights the confidence in the prediction versus the new observation.
- The state and covariance are corrected using the innovation (the difference between the actual and predicted measurement), linearized via the Jacobian
H.
This cycle runs continuously, fusing noisy sensor data with model predictions.
Handling Nonlinear Dynamics & Sensors
The EKF's primary utility is estimating state in systems where motion or observations are not straight-line relationships. Common robotics examples include:
- Robot Pose Estimation: Tracking
[x, y, theta]where the motion model involves trigonometric functions (sin,cos) for rotation. - Sensor Fusion: Combining data from inherently nonlinear sensors like a monocular camera (perspective projection), radar (range and bearing), or an IMU (orientation via quaternions or Euler angles).
- Landmark-Based Navigation: Updating a robot's position based on measuring the angle and distance to known landmarks, a nonlinear function of the robot's
(x, y)pose.
The EKF provides a mathematically sound framework to unify these diverse, nonlinear data sources into a single consistent state estimate.
Computational Efficiency for Real-Time Use
Despite its approximations, the EKF is favored in embedded and robotic systems for its predictable computational footprint. Its complexity is O(n^3) where n is the state dimension, which is often manageable for typical state vectors (e.g., 6-15 dimensions for a robot's pose, velocity, and sensor biases).
- Deterministic Runtime: The number of matrix operations is fixed per cycle, crucial for real-time operating systems (RTOS) where deadline guarantees are required.
- Comparison to Alternatives: It is significantly less computationally intensive than the Particle Filter, which requires maintaining and updating hundreds or thousands of samples, especially in high-dimensional state spaces.
- This efficiency enables deployment on onboard computers in drones, autonomous vehicles, and mobile robots.
Assumptions and Limitations
The EKF's performance is bounded by its underlying assumptions. Violations can lead to divergence (the filter becoming wildly inaccurate). Key limitations include:
- First-Order Approximation Error: The Taylor expansion truncates higher-order terms. If system nonlinearities are severe or uncertainty is large, this linearization error can be significant, causing the filter to become inconsistent (underestimating its own error).
- Gaussian Noise Assumption: The EKF assumes all process and measurement noises are Gaussian. It struggles with multi-modal distributions or heavy-tailed noise.
- Susceptibility to Initialization: A poor initial guess can cause the filter to linearize around the wrong point, leading to divergence.
- These limitations motivate more advanced filters like the Unscented Kalman Filter (UKF) or Particle Filter for highly nonlinear or non-Gaussian problems.
Core Applications in Robotics
The EKF is a workhorse algorithm in several foundational robotics perception and control stacks:
- Visual-Inertial Odometry (VIO): Fusing camera features with IMU data to track a robot's 6D pose and velocity. The IMU dynamics and camera projection models are nonlinear.
- Sensor Fusion for Localization: Combining wheel odometry (which drifts), IMU data, and occasional absolute measurements from GPS or LiDAR scan-matching within a single EKF framework.
- Simultaneous Localization and Mapping (EKF-SLAM): Maintaining a joint state vector containing both the robot's pose and the positions of observed landmarks in the map, with nonlinear relationships between them.
- Target Tracking: Estimating the state (position, velocity) of other moving objects from sensor data, using nonlinear motion models like coordinated turn.
EKF vs. Other Estimation Filters
A technical comparison of the Extended Kalman Filter against other common state estimation algorithms, highlighting their mathematical foundations, computational characteristics, and suitability for different robotic perception problems.
| Feature / Metric | Extended Kalman Filter (EKF) | Linear Kalman Filter (KF) | Unscented Kalman Filter (UKF) | Particle Filter (PF) |
|---|---|---|---|---|
Core Mathematical Approach | First-order Taylor series linearization of nonlinear models | Optimal recursive estimator for linear Gaussian systems | Deterministic sampling (unscented transform) to propagate mean & covariance | Sequential Monte Carlo sampling of the posterior distribution |
Handles Nonlinear Models | ||||
Handles Non-Gaussian Noise | ||||
State Representation | Single Gaussian (mean & covariance) | Single Gaussian (mean & covariance) | Single Gaussian (mean & covariance) | Set of weighted particles (arbitrary distribution) |
Computational Complexity | O(n³) for covariance update, n = state dimension | O(n³) for covariance update | O(n³), similar to EKF but often more function evaluations | O(N·n), N = number of particles, can be very high |
Typical Real-Time Performance | < 1 ms to ~10 ms (for moderate state dimensions) | < 1 ms | ~1.5x to 2x slower than equivalent EKF | 10 ms to seconds, highly particle-dependent |
Jacobian Calculation Required | ||||
Dimensionality Curse Impact | High - covariance matrices scale quadratically | High - covariance matrices scale quadratically | High - covariance matrices scale quadratically | Extreme - particle count grows exponentially with state dimension |
Typical Use Case in Robotics | Sensor fusion (e.g., Visual-Inertial Odometry), GPS/INS, robot arm state estimation | Simple linear dynamic systems, textbook examples | Highly nonlinear systems where Jacobians are costly/unsuitable (e.g., certain orientation representations) | Non-Gaussian, multi-modal estimation (e.g., global localization, SLAM with loop closures) |
Implementation & Tuning Difficulty | Medium - requires careful Jacobian derivation and validation | Low - well-defined, simple equations | Medium - simpler than EKF but requires tuning of sigma point parameters | High - requires careful design of proposal distribution, resampling, and particle management |
Theoretical Guarantee | Suboptimal approximation; can diverge with strong nonlinearities | Optimal for linear Gaussian case | Better approximation than EKF for moderate nonlinearities; no formal optimality | Asymptotically optimal as particle count → ∞ |
Frequently Asked Questions
The Extended Kalman Filter (EKF) is a cornerstone algorithm for state estimation in nonlinear systems, such as robotics and autonomous vehicles. These questions address its core mechanics, applications, and limitations.
The Extended Kalman Filter is a nonlinear state estimation algorithm that linearizes a system's dynamics and measurement models around the current state estimate to recursively predict and update the state of a system.
It works in a two-step recursive cycle:
- Prediction Step: The filter uses a nonlinear process model,
f(x), to project the current state estimate and its uncertainty (covariance) forward in time. Sincef(x)is nonlinear, the EKF uses a first-order Taylor expansion (the Jacobian matrix,F) to linearize the model around the prior estimate for covariance propagation. - Update Step: When a new sensor measurement arrives, the filter uses a potentially nonlinear measurement model,
h(x), to predict what the measurement should be. This model is also linearized via its Jacobian,H. The difference between the actual and predicted measurement (the innovation) is then used to correct the state prediction, weighted by the Kalman Gain. The Kalman Gain optimally balances the uncertainty in the prediction with the uncertainty in the new measurement.
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 (EKF) is a cornerstone of nonlinear state estimation. These related concepts form the core mathematical and algorithmic toolkit for building robust, real-time perception systems in robotics and autonomous vehicles.
Kalman Filter
The foundational optimal recursive estimator for linear systems. It operates in a two-step cycle:
- Prediction: Projects the current state forward using a linear motion model.
- Update (Correction): Fuses the prediction with a new, noisy measurement.
The Kalman filter is optimal for linear systems with Gaussian noise, providing the minimum mean square error estimate. It is the direct linear predecessor to the EKF, which linearizes nonlinear models to apply the same core recursive framework.
Sensor Fusion
The algorithmic process of combining data from multiple, disparate sensors (e.g., camera, LiDAR, IMU, GPS) to produce a state estimate that is more accurate, complete, and reliable than any single sensor could provide. The EKF is a primary fusion engine within this paradigm. Key fusion levels include:
- Low-Level (Raw Data): Fusing signals before feature extraction.
- Feature-Level: Fusing extracted features like positions or velocities.
- Decision-Level: Fusing high-level object classifications or tracks. EKF excels at feature-level fusion, integrating heterogeneous asynchronous measurements into a unified state.
Particle Filter
A sequential Monte Carlo method for state estimation that represents the posterior probability distribution using a set of random samples (particles). Unlike the EKF's single Gaussian approximation, a particle filter can model arbitrary, multi-modal distributions, making it robust for highly nonlinear systems or non-Gaussian noise. However, this comes at a high computational cost (particle degeneracy), often requiring thousands of samples versus the EKF's single state vector and covariance matrix. It is used when linearization fails or precise uncertainty shape is critical.
Visual Inertial Odometry (VIO)
A specific sensor fusion application that tightly couples visual data from a camera with inertial data from an IMU to estimate a platform's 6-degree-of-freedom pose and velocity. The EKF (and its iterative variant, IEKF) is a classic algorithm for implementing VIO. The IMU provides high-frequency, drift-prone motion estimates, while the camera provides lower-frequency, absolute but sometimes unreliable visual constraints. The EKF's prediction step is driven by the IMU, and the update step occurs when visual features are successfully matched, correcting the accumulating IMU drift.
Simultaneous Localization and Mapping (SLAM)
The core challenge of building a map of an unknown environment while simultaneously tracking the agent's location within it. EKF-SLAM was a seminal approach, where the filter's state vector contained both the robot pose and the estimated positions of all observed landmarks. The covariance matrix captured correlations between the robot and every landmark. While limited by computational complexity (O(n²) in landmarks), it established the probabilistic foundation for modern SLAM. It demonstrates the EKF's role in jointly estimating a large, correlated state from sparse, noisy observations.
Jacobian Matrix
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 Jacobian linearizes the nonlinear motion model around the current state estimate.
- The observation Jacobian linearizes the nonlinear measurement model. These Jacobians are recalculated at every filter step to produce the local linear approximation. The accuracy of this first-order Taylor expansion directly determines the filter's performance; large errors or high nonlinearity cause linearization error, which can lead to filter divergence. Understanding Jacobians is essential for implementing a correct EKF.

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