The Kalman filter for a curved world: when the motion f and the measurement h are nonlinear, the EKF linearizes them at the current estimate through their Jacobians F, H, then runs the ordinary Kalman predict and update on that local linear model. Rendered, not quoted — the engine below computes every gain and covariance live.
source Schmidt, S. F. — Application of State-Space Methods to Navigation Problems, Advances in Control Systems, Vol. 3 (1966), pp. 293–340; the EKF that flew the Apollo onboard navigator. Semantic Scholar amber · book chapter, no open DOI
State x = [px, py, vx, vy]. Motion is linear constant-velocity f(x)=F·x; the measurement is nonlinear: the range to a fixed beacon, h(x)=√((px−bx)²+(py−by)²).
F = ∂f/∂x and H = ∂h/∂x are the Jacobians evaluated at the current estimate — that single linearization is the whole idea. The update uses the Joseph form, which keeps P symmetric and positive-semidefinite by construction.
Neighbour: the-kalman — the linear filter, optimal when f and h are already straight lines. The EKF is that same recursion wrapped around a moving tangent plane: linearize at the estimate, then filter.
On a genuinely linear system the Jacobians are the constant system matrices and the EKF collapses exactly back onto the Kalman filter — the Witness checks this to 1e−9. Downstream it is the workhorse behind GPS, inertial navigation, and every robot pose estimator.
Live re-check of the running engine — re-runs the invariant proof and inspects the current filter state. It confirms in accent, and flips red the instant the Tamper (window 6) swaps the true Jacobian for the identity.
A prior estimate x₀ and covariance P₀, the process/measurement noise Q, R, and a stream of noisy range readings z from four beacons that surround the target at the corners of a 10×10 field. Truth follows a slow constant-velocity path inside that field. Noise is drawn from a fixed-seed PRNG (mulberry32, seed 12345) so every run is identical.
The EKF running live — the two Jacobians it forms this step, the gain that weighs them, and the tracked state against the hidden truth.
What the engine proves, not asserts: on a linear system EKF ≡ KF to 1e−9; the covariance stays symmetric and positive-semidefinite; the gain trusts the measurement fully as R→0 and ignores it as R→∞; and on the nonlinear range problem the estimate tracks truth with bounded error.
The EKF keeps only the first-order term of f and h. It carries no optimality guarantee — that belongs to the linear Kalman filter alone.
Where the truth curves faster than the tangent plane can follow — sharp turns, large covariance, a bad initial guess — the linearization error feeds back and the filter can diverge and never recover. A collapsing P (too little Q) makes it smug: it stops listening to measurements and coasts on a stale velocity. These are the walls the UKF and particle filter were built to climb.
Disclosed planted void: replace the measurement Jacobian H with the identity on px — skip the linearization entirely. The innovation still uses the true range, but the gain now corrects the wrong states, so the estimate diverges. The Witness (7) catches it live.