Research Robots Applications Industries Technology Contact
← Back to Technology
Robotics Core

Extended Kalman Filter (EKF)

The gold standard for non-linear state estimation in mobile robotics. The EKF enables AGVs to fuse noisy sensor data with motion models to precisely determine position and orientation in complex environments.

Extended Kalman Filter (EKF) AGV

Core Concepts

State Estimation

Calculates the robot's hidden variables—usually X, Y coordinates and Yaw (heading)—which cannot be measured directly by a single sensor.

Non-Linearity

Unlike the standard Kalman Filter, EKF handles non-linear motion (like curving AGVs) by linearizing systems locally using Taylor Series expansion.

Sensor Fusion

Combines high-frequency inputs (Wheel Odometry, IMU) with low-frequency corrections (LiDAR, GPS) to reduce overall drift.

Jacobian Matrix

The mathematical tool used to approximate non-linear functions as linear models at the current state estimate, allowing standard matrix math to apply.

Covariance

Tracks the uncertainty (confidence) of the robot's position. EKF maintains a covariance matrix that shrinks when sensors agree and grows during drift.

Prediction & Correction

The two-beat algorithm rhythm: Predict where the robot moved based on wheel speed, then Correct that guess using external sensor data.

How It Works

The Extended Kalman Filter operates in a continuous recursive cycle. In the Prediction Step, the AGV estimates its new position based on control inputs (e.g., velocity commands sent to the wheels). This estimate is inherently "noisy" due to wheel slippage or uneven floors.

Next, in the Update (Correction) Step, the AGV receives data from exteroceptive sensors like LiDAR or Cameras. The EKF compares the predicted measurement against the actual received measurement.

Using the Kalman Gain, the filter decides how much to trust the prediction versus the measurement. If the LiDAR is highly accurate, the state is pulled closer to the LiDAR reading, resulting in a refined pose estimate with reduced uncertainty.

Technical Diagram

Real-World Applications

Warehouse AMRs

Used in differential drive robots to fuse wheel encoder data with 2D safety LiDARs, ensuring precise navigation in narrow aisles.

Outdoor Agricultural Robots

Critical for fusing GPS/RTK data with IMU sensors to handle uneven terrain where wheel odometry is unreliable due to slippage.

Hospital Delivery Units

Allows robots to maintain localization in long, featureless corridors by relying on IMU predictions when visual features are sparse.

Automated Forklifts

Provides the high-precision orientation estimation required to align forks with pallets, fusing visual SLAM data with steering encoders.

Frequently Asked Questions

What is the main difference between a Kalman Filter (KF) and an EKF?

The standard KF assumes the world is linear (straight lines, constant velocity changes). The EKF allows for non-linear systems—like a robot turning in a circle—by calculating the Jacobian matrix to linearize the system at the current state estimate.

Why are Jacobians necessary in EKF?

Since Gaussian distributions (the math behind the uncertainty) remain Gaussian only after linear transformations, we cannot pass them directly through non-linear functions. Jacobians provide the first-order linear approximation (slope) of the function, preserving the Gaussian properties required for the filter to work.

What happens if the initial state guess is very wrong?

EKF is sensitive to initialization. If the initial estimate is too far from reality, the linearization (Jacobian) will be calculated at the wrong point, leading to divergence where the filter becomes confident in a wrong position. This is a key disadvantage compared to Particle Filters.

What is the "Process Noise" (Q) matrix?

The Q matrix represents uncertainty in your motion model. It accounts for things you can't model perfectly, like wheel slip, uneven floors, or wind. Tuning this tells the filter how much to "mistrust" the robot's own calculation of its movement.

What is the "Measurement Noise" (R) matrix?

The R matrix represents sensor noise. It is usually derived from sensor datasheets (e.g., a LiDAR might be accurate to ±2cm). If R is high, the filter will rely less on the sensor and more on the motion prediction.

Is EKF computationally expensive?

EKF is relatively efficient (O(k^2.4) to O(k^3)) and is much lighter than Particle Filters (MCL). It is the industry standard for embedded microcontrollers on AGVs because it can easily run in real-time (e.g., 50Hz-100Hz).

How does EKF compare to Unscented Kalman Filter (UKF)?

UKF avoids calculating Jacobians by using "sigma points" to sample the distribution. UKF is generally more accurate for highly non-linear systems and easier to implement (no derivatives needed), but EKF remains more popular due to legacy codebases and slightly lower computational load in simple scenarios.

Can EKF solve the "Kidnapped Robot" problem?

No. EKF is a local localization method. If an AGV is picked up and moved to a different room, the EKF cannot "teleport" its belief; it will try to correct the position smoothly, likely failing. Global localization requires Monte Carlo Localization (Particle Filters).

What sensors are typically fused in an AGV EKF?

A standard stack includes Wheel Encoders (for velocity), an IMU (for rotational velocity/gyro), and absolute positioning sensors like LiDAR (AMCL output), GPS, or Visual Odometry.

How do I tune an EKF for a new robot?

Start by recording sensor data. Tune the Measurement Noise (R) based on static sensor variance. Then, tune Process Noise (Q) by driving the robot; if the estimated path lags behind reality, trust the sensors more (increase Q). If the path is jittery, trust the model more (decrease Q).

Ready to implement Extended Kalman Filter (EKF) in your fleet?

Explore Our Robots