The Extended Kalman Filter, or EKF, is a state estimation algorithm used when the system or the sensor model is nonlinear. It is a natural extension of the standard Kalman Filter, which assumes linear dynamics and linear measurements.
Why do we need EKF?
In robotics and autonomous driving, many important relationships are nonlinear. For example, a radar sensor may measure range, angle, and radial velocity instead of simple Cartesian coordinates. A robot may also rotate while moving, which creates nonlinear motion equations.
Main idea
EKF still follows the same two-step structure as the standard Kalman Filter:
- Prediction: estimate the next state based on the motion model
- Update: correct the estimate using the sensor measurement
The difference is that EKF linearizes the nonlinear functions around the current estimate by using Jacobian matrices.
Where EKF is used
- Robot localization
- Sensor fusion with radar, lidar, and IMU
- Mobile robot tracking
- Autonomous vehicle state estimation
A simplified workflow
1. Predict x(k|k-1) using the motion model
2. Predict covariance P(k|k-1)
3. Compute Jacobian matrices
4. Compare expected measurement with real measurement
5. Update the state and covariance
Strengths and limitations
EKF works well when the system is only mildly nonlinear and the estimate remains close to reality. However, if the model is strongly nonlinear or the initial estimate is poor, EKF may diverge.
Final thoughts
EKF remains one of the most important filters in robotics and autonomous systems because it provides a practical compromise between mathematical tractability and real-world usefulness.