Module 2 Lesson 4: An Improved Ekf: The Error-State Extended Kalman
Module 2 Lesson 4: An Improved Ekf: The Error-State Extended Kalman
• Describe the advantages of the Error-state EKF over the vanilla EKF
What’s in a State?
We can think of the vehicle state as composed of two
parts: x = x̂ + δx
Position
Error state δx
• We can continuously update the
nominal state by integrating the
True state x motion model
Nominal state x̂
Time
• Modelling errors and process noise
accumulate into the error state
The Error-State Extended Kalman Filter
The Error-State Extended Kalman Filter estimates the error state directly and
uses it as a correction to the nominal state:
xk = fk−1(x̂k−1, uk−1, 0) + Fk−1 (xk−1 − x̂k−1) + Lk−1wk−1 yk = hk(x̌k, 0) + Hk (xk − x̌k) + Mkvk
xk − fk−1(x̂k−1, uk−1, 0) = Fk−1 (xk−1 − x̂k−1) + Lk−1wk−1 yk = hk(x̌k, 0) + Hk (xk − x̌k) + Mkvk
δxk δxk−1 δxk
This could be
x̌ or x̂
k−1 k−1
The Error-State Extended Kalman Filter
Loop:
1. Update nominal state with motion model
2. Propagate uncertainty
T T
P̌k = Fk−1Pk−1Fk−1 + Lk−1Qk−1Lk−1
This could be
P̌ or P̂
k−1 k−1
The Error-State Extended Kalman Filter
Loop:
1. Update nominal state with motion model
2. Propagate uncertainty
3. If a measurement is available:
1. Compute Kalman Gain
Kk = P̌kHTk (HkP̌kHTk + R)−1
The Error-State Extended Kalman Filter
Loop:
1. Update nominal state with motion model
2. Propagate uncertainty
3. If a measurement is available:
1. Compute Kalman Gain
2. Compute error state
δx̂k = Kk(yk − hk(x̌k, 0))
The Error-State Extended Kalman Filter
Loop:
1. Update nominal state with motion model
2. Propagate uncertainty
3. If a measurement is available:
1. Compute Kalman Gain
2. Compute error state
3. Correct nominal state
x̂k = x̌k + δx̂k
The Error-State Extended Kalman Filter
Loop:
1. Update nominal state with motion model
2. Propagate uncertainty
3. If a measurement is available:
1. Compute Kalman Gain
2. Compute error state
3. Correct nominal state
4. Correct state covariance
P̂ k = (1 − KkHk)P̌k
Why Use the ES-EKF?
x = x̂ ⊕ δx
• The ES-EKF uses local linearization to estimate the error state and uses it
to correct the nominal state.
• The ES-EKF can perform better than the vanilla EKF, and provides a
natural way to handle constrained quantities like rotations in 3D.