This repository revisits Professor Gregory L. Plett’s Adaptive Extended Kalman Filter (AEKF) implementation [2] and removes a common steady‑state simplification that many papers apply to the process‑noise covariance adaptation. By restoring the full expression the filter delivers tighter uncertainty bounds and lower state‑estimation error. To regain numerically stability the positive‑definiteness can be ensured with the nearest symmetric positive‑definite (SPD) matrix using Higham’s method.
Adaptive EKF literature assumes that the process noise covariance has reached steady state and therefore drop the term that captures the change in a‑posteriori process noise covariance between consecutive steps [^1].
Although this avoids negative‐definite updates, it also under‑estimates process noise and widens the confidence bounds.
Symbol | Meaning |
---|---|
Kalman gain | |
Innovation vector | |
Discrete state‑transition matrix | |
A‑posteriori process noise covariance |
This simplification likely serves to preserve the positive definiteness of the process noise covariance matrix.
The full update for the process noise covariance matrix is:
However, that “steady-state difference”, exposed with parenthesis, usually stabilize at an application-specific value greater than zero.
Both expressions include a N-size moving average
The key update was benchmarked with the nonlinear spring mass damper system:
Designed and simulated by Prof. Plett in Simulink as:
with m=50, b=2, k1=4, k2=60 and d=0.25.
Test Case | RMS Error | Time Outside ±2σ |
---|---|---|
Baseline – steady-state (A) | 9.69 × 10⁻³ | 0.15 % |
Full |
2.35 × 10⁻³ | 0.30 % (B) |
Full |
4.26 × 10⁻³ | 0.35 % (B) |
(A): The “cumulative-sum instead of moving-average” hot-fix is used for better performance.
(B): The time-error-outside-bounds metric is most informative here, because the width of the confidence band is set by the state-error covariance
As expected, the covariance matrix occasionally lost positive definiteness, likely due to the subtractive term.
Restoring the complete covariance adaptation renders the AEKF more truthful to the underlying theory and, for the test problem, materially improves estimation accuracy. Future work includes:
-
Explore a Kalman Filter expression that avoids the subtractive term of the process covariance update to maintain numerical stability without the Highman projection safeguard.
-
Investigating adaptive measurement‑noise tuning in parallel.
[1] Fraser, C. T., & Ulrich, S. (2021). Adaptive extended Kalman filtering strategies for spacecraft formation relative navigation. Acta Astronautica, 178, 700–721. https://doi.org/10.1016/j.actaastro.2020.10.016
[2] Nonlinear Kalman Filters and Parameter Estimation, Coursera. Offered by the University of Colorado Boulder. Retrieved from https://www.coursera.org/learn/nonlinear-kalman-filters-parameter-estimation
The original source code was developed by Prof. Gregory L. Plett and is reproduced here with proper attribution for academic and educational use.
All updates and modifications are made in good faith to support the research community.
If you are the original author and would prefer different credit or removal, please open an issue or contact me directly.