UAV Systems Engineering · Interactive simulation · M3-L2
EKF Simulator
Step through every prediction and correction of an EKF, watch the covariance ellipse grow and shrink, and diagnose mistuning with NIS and NEES.
What you are looking at
A ground station at the origin measures the range and bearing of a manoeuvring UAV. An EKF with a constant-velocity model tracks position and velocity. Between measurements the filter only predicts: the dashed orange ellipse (2σ) grows. When a measurement arrives, the filter corrects: the solid blue ellipse shrinks.
Use “Next update” to jump from correction to correction, or scrub the time slider. The panels report the innovation, the Kalman gain on x from range, the NIS of each update (expected mean 2, with 95% bounds), and NEES against the truth (expected mean 4).
Try this
- Lower process noise σa to 0.2 m/s². The filter now trusts its constant-velocity model too much and lags the manoeuvre: NIS leaves its upper bound and NEES explodes.
- Raise “measurement noise scale” to 10. NIS drops below 2: the filter is underconfident and ignores useful data. Set it to 0.1: overconfident, NIS too high.
- Set the initial position error to 30 m with initial σ of 1 m, then with 30 m. A filter that is told it is certain cannot correct a large initial error.
- Reduce the update rate to 0.3 Hz. Watch the sawtooth in the uncertainty plot get deeper between updates.
- In zoomed view press “Next update” repeatedly and compare the innovation’s size with the ellipse: updates that land inside the ellipse produce small corrections.
Model and its limits
Included: the standard EKF equations with analytic Jacobians for the range-bearing measurement, a continuous-white-noise-acceleration process model, angle wrapping in the bearing innovation, Joseph-form covariance update, NIS (χ² with 2 degrees of freedom, 95% interval 0.05 to 7.38) and NEES (4 degrees of freedom).
Not included: a 3-D vehicle, sensor biases, correlated noise or non-Gaussian errors. The truth manoeuvres by sine-wave heading changes, so a constant-velocity model is deliberately wrong; process noise is the tuning knob that absorbs that mismatch.
Saved in this browser and synced to your account when you are signed in.