Appearance
Extended Kalman Filter (EKF)
Problem Statement
The EKF estimates nonlinear UAV state with Gaussian uncertainty when direct closed-form Bayesian updates are unavailable. It is commonly used for tightly-coupled inertial and positional sensing in real-time flight stacks.
Model and Formulation
Nonlinear system:
$$ x_k = f(x_{k-1}, u_k) + w_k,\quad z_k = h(x_k) + v_k $$
Linearization around the current estimate yields Jacobians F_k = \partial f/\partial x, H_k = \partial h/\partial x. The covariance recursion is:
$$ P_{k|k-1} = F_k P_{k-1|k-1} F_k^\top + Q_k $$
$$ K_k = P_{k|k-1}H_k^\top(H_kP_{k|k-1}H_k^\top + R_k)^{-1} $$
Algorithm Procedure
- Predict state with nonlinear process model
f. - Propagate covariance using local Jacobian
F_k. - Compute innovation
y_k = z_k - h(\hat{x}_{k|k-1}). - Update state and covariance with Kalman gain
K_k.
Tuning Guidance
- Start with conservative
Qto avoid overconfident predictions. - Increase
Rfor noisy GPS updates in urban or multipath environments. - Validate filter consistency using normalized innovation squared (NIS).
Failure Modes and Diagnostics
- Linearization error can destabilize updates during aggressive maneuvers.
- Unmodeled bias states produce persistent innovation drift.
- Divergence often appears as shrinking covariance but rising position error.
Implementation and Execution
bash
python -m uav_sim.simulations.estimation.ekfEvidence

References
- Julier and Uhlmann, New Extension of the Kalman Filter to Nonlinear Systems (1997)
- Maybeck, Stochastic Models, Estimation, and Control, Volume 1