3.5.24 · D5Guidance, Navigation & Control (GNC)

Question bank — Extended Kalman Filter (EKF) — linearization, Jacobians

1,706 words8 min readBack to topic

Before we start, here is every symbol this page uses, in plain words, so nothing appears unearned:

  • is the nonlinear motion function: it takes your current state guess and returns the next one.
  • is the nonlinear measurement function: it takes a state and returns what your sensor should read.
  • and are the Jacobians — the matrices of slopes (partial derivatives) of and . They are the local "straight-line stand-ins" for the curves, valid only right next to the point where you compute them.
  • is the covariance: a blob describing how uncertain (and how correlated) your state estimate is.
  • is the predicted state (after motion, before the measurement); is the previous estimate.
  • is the process-noise covariance: how much extra uncertainty the world injects each step because your motion model is imperfect. It is added to the predicted covariance.
  • is the measurement-noise covariance: how noisy your sensor is. Big means "don't trust this reading much."
  • is the innovation covariance: the total spread of the "surprise" between what you measured and what you predicted, built from the state spread pushed into sensor space plus the sensor noise, .
  • is the Kalman gain: the fraction of the surprise you actually apply to correct your estimate, . It is recomputed every step and balances trust between prediction and sensor.

True or false — justify

True: mean propagates through nonlinear f, covariance through the Jacobian
True — the best guess of the next state is of the current best guess, but spread transforms by the local sensitivity, so . Mean uses the curve, covariance uses the tangent.
True: if f is already linear, the EKF reduces exactly to the linear Kalman filter
True — the Jacobian of a linear map is the constant matrix itself, so there is no approximation left and the machinery is identical to the Kalman Filter (linear).
True: the Jacobian is the best possible constant-matrix approximation of a curve at a point
True — it is the first-order Taylor term, and no constant matrix matches the local slopes better. That is precisely why the EKF chooses it over any other matrix.
True: two different states can produce the same Jacobian
True — the slope of a curve can repeat (e.g. the pendulum's is equal at and ). The Jacobian describes local behaviour, not identity of the state.
False: because the EKF linearizes, it can only handle mildly nonlinear systems
Half-false — it handles strong nonlinearity fine as long as the curve is nearly straight over one uncertainty blob. Trouble comes from large curvature-times-uncertainty, not from nonlinearity per se.
False: making the process-noise covariance zero makes the filter more accurate
False — with the covariance shrinks and the filter grows over-confident, ignores new data, and diverges. deliberately keeps the estimate humble about model errors.
True: the EKF covariance can underestimate the true uncertainty
True — the linear tangent throws away the curvature that actually spreads a Gaussian out, so often comes out optimistically small. This is a known EKF failure mode the UKF mitigates.
False: the innovation
False — the innovation must use the nonlinear prediction . appears only inside the innovation covariance and the gain ; using would linearize the mean, which we specifically refuse to do.

Spot the error

"Compute at the previous estimate to reuse the point where you found ."
Wrong evaluation point — must be linearized at the predicted state , because that is the state the measurement is being compared against. This is the classic #1 EKF bug.
"Since the mean uses , the covariance should be for symmetry."
There is no meaningful "" — is a second-moment object, not a state, so it transforms by the linear sensitivity , never by feeding a matrix into .
"A radar bearing residual of means the filter is way off."
The residual was never wrapped — the true angular error is . Angle residuals must be wrapped to ; see atan2 & Angle Wrapping.
"My initial guess is rough but a filter always converges, so I'll trust it."
The tangent-line approximation is only valid near ; a bad linearization point yields garbage and the filter can diverge outright. Seed a good .
"The Kalman gain is a fixed tuning constant I set once."
is recomputed every step from and the measurement-noise covariance (via ); it automatically shrinks when the sensor is noisy and grows when the sensor is trusted. Hard-coding it defeats the whole filter.
"I'll use for the bearing measurement to keep it simple."
collapses quadrants II and III onto I and IV, giving the wrong angle for half the plane. Use , which reads both signs and covers all four quadrants.
" came out slightly non-symmetric, that's fine."
Numerically it drifts and can lose positive-definiteness, breaking the filter silently. Use the Joseph-form update or force symmetry — covariance must stay symmetric and positive-definite.

Why questions

Why does the mean go through but the covariance through ?
The single most-likely next state is literally of the most-likely current state; but uncertainty is about how nearby points spread, and to first order they spread by the slope matrix . Different questions, different tools.
Why is evaluated at but at ?
linearizes the motion you are about to apply, so it uses the state before motion; linearizes the sensor around the state you arrived at, so it uses the state after motion. Each tangent is taken where its curve is actually used.
Why can't we just push the whole Gaussian through the curve exactly?
A Gaussian pushed through a curve comes out skewed and non-Gaussian, and the KF equations only speak the language of means and covariances. Linearizing keeps the output Gaussian so the math stays valid.
Why does the pendulum Jacobian contain and why does that matter?
With the gravitational acceleration and the pendulum length, it is the derivative of the restoring term . Near it equals (stiff, linear oscillator), but near it vanishes — the linearized stiffness disappears, which the state-dependent Jacobian faithfully reports.
Why prefer the UKF when nonlinearity is severe?
The EKF keeps only the first Taylor term and discards curvature; the UKF instead pushes a set of sample points through the true , capturing curvature without ever forming a Jacobian.
Why is the range partial equal to a cosine?
is the cosine of the target's bearing angle, so it says "range grows fastest when you move straight toward the sensor and not at all when you move sideways" — a geometric sanity check baked into the Jacobian.
Why does a too-small measurement-noise covariance sometimes make the filter jittery?
Small means "the sensor is nearly perfect," so the gain grows large and the estimate chases every noisy reading. The filter overtrusts noise and rattles instead of smoothing.

Edge cases

What is the range Jacobian at the origin ?
Undefined — puts and in denominators, so the bearing is meaningless and the covariance update blows up. A target sitting on the sensor is a genuine singularity to guard against.
What happens to the bearing partials as the target moves far away (large )?
: distant targets barely change bearing when they move, so angle measurements become weak at long range and the filter leans on range instead.
If the Jacobian turns out to have no state-dependence, what does it tell you?
Your dynamics are actually linear and you never needed an EKF at all — the plain Kalman Filter (linear) is exact and cheaper.
What if lands exactly where is non-differentiable (e.g. a kink)?
The Jacobian is undefined there; the tangent-line premise fails outright. You must use a sub-gradient, smooth the model, or switch to a derivative-free filter.
At the pendulum's inverted point , what does the Jacobian say?
, a positive stiffness meaning the equilibrium is unstable — the linearization correctly flips sign and predicts runaway growth away from the top.
What if the innovation covariance is nearly singular?
The gain needs ; a near-singular (from tiny and a degenerate ) makes the gain explode. Regularize or check that isn't rank-deficient.