04. Extended Kalman Filter (EKF): Linearizing Nonlinear Systems

04. Extended Kalman Filter (EKF): Linearizing Nonlinear Systems

The extended Kalman filter (EKF) applies a Kalman-style update to nonlinear dynamics or measurements. It approximates the model locally with first-order Taylor expansions. This is useful in problems such as nonlinear navigation, where the original linear filter cannot directly represent the measurement geometry.

Nonlinear discrete-time model

\[\begin{aligned} x_k&=f_{k-1}(x_{k-1},u_{k-1},w_{k-1}),\\ y_k&=h_k(x_k,v_k). \end{aligned}\]

The noise terms have zero mean with covariances \(Q_{k-1}\) and \(R_k\). A continuous process model needs a consistent discrete transition and covariance before this recursion is applied.

1. Predict using the transition Jacobians

Evaluate \(F_{k-1}=\partial f_{k-1}/\partial x\) and \(L_{k-1}=\partial f_{k-1}/\partial w\) at the previous posterior state and zero process noise, with the known control held fixed.

\[\begin{aligned} \hat x_k^- &= f_{k-1}(\hat x_{k-1}^+,u_{k-1},0),\\ P_k^- &= F_{k-1}P_{k-1}^+ F_{k-1}^\mathsf T+L_{k-1}Q_{k-1}L_{k-1}^\mathsf T. \end{aligned}\]

2. Update using the measurement Jacobians

Evaluate \(H_k=\partial h_k/\partial x\) and \(M_k=\partial h_k/\partial v\) at \((\hat x_k^-,0)\). The innovation is computed using the nonlinear predicted measurement, not the Jacobian times the state:

\[\begin{aligned} r_k &= y_k-h_k(\hat x_k^-,0),\\ S_k &= H_kP_k^-H_k^\mathsf T+M_kR_kM_k^\mathsf T,\\ K_k &= P_k^-H_k^\mathsf T S_k^{-1},\\ \hat x_k^+ &= \hat x_k^-+K_kr_k. \end{aligned}\]

For the covariance update, let \(A_k=I-K_kH_k\) and use \(P_k^+=A_kP_k^-A_k^\mathsf T+K_kM_kR_kM_k^\mathsf TK_k^\mathsf T\). If the noise is additive in the measurement coordinates, \(M_k\) is the identity, so the projected measurement noise is simply R.

Initialization and limitations

Start with the best available prior mean and covariance. At each step: evaluate the transition Jacobians, predict, evaluate the measurement Jacobians at the prediction, then update. Strong curvature, poor initialization, or mistakes in residual definitions can degrade performance. When Jacobians are difficult or linearization is a poor fit, compare with an unscented Kalman filter.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *