State Estimation & Filtering

extended Kalman filter

The extended Kalman filter, or EKF, is the version of the Kalman filter you reach for when the world bends rather than runs in straight lines. The plain Kalman filter assumes everything is linear: drive twice as long and you go twice as far, in a perfectly predictable straight relationship. But a robot that turns its wheels follows a curve, and a sensor that reports an angle or a distance mixes its inputs in a curvy, nonlinear way. Feed those curves to a plain Kalman filter and its tidy math breaks. The EKF is the fix.

Its trick is to pretend the curve is a straight line — but only over a tiny stretch right around the robot's current best guess. Picture standing on a hill: zoom in close enough to your feet and the ground looks flat, even though the whole hill is curved. The EKF does exactly that with the robot's motion and sensor equations. At each step it measures the local slope of those curves — a quantity called the Jacobian, which is just the rate of change at that one spot — and uses that flat-looking approximation to run the ordinary Kalman prediction and correction. Then it moves to the new best guess and re-measures the slope, over and over.

This makes the EKF the long-standing workhorse for real robots — drones tracking their tilt, cars fusing GPS with wheel sensors — because most real systems are nonlinear. Its weakness is the very approximation that powers it: if the curve is sharp or the current guess is far off, treating it as locally flat introduces error, and the filter can drift or even fall apart. When that becomes a problem, engineers reach for filters that handle curves more faithfully.

A car estimating its heading from a turning rate faces a nonlinear relationship (the heading wraps around a circle). An EKF flattens that relationship near the car's current heading at each tick, so it can keep using simple Kalman math.

The EKF turns a curved problem into a straight-line one, but only in a small neighborhood that it refreshes every step.

The local slope it computes — the Jacobian — must be re-derived for each system, which is why setting up an EKF takes more hand-work than a plain Kalman filter.

Also called
EKF扩展卡尔曼滤波擴展卡爾曼濾波