Visual walkthrough — Unscented Kalman Filter (UKF) — sigma points, better for nonlinear
Step 1 — What is "uncertainty" as a picture?
WHAT. Before we transform anything, we must agree on what we are transforming. In filtering, we never know a quantity exactly — we know a best guess and a spread of doubt around it.
- The best guess is the mean, written (read "x-bar"). It is the point you'd bet on.
- The doubt is the covariance, written . In one dimension , where ("sigma") is how far a typical sample strays from . In two dimensions is a little table of numbers that describes an ellipse of doubt — long in directions we're unsure about, short where we're confident.
WHY. A Kalman filter only ever tracks these two things: where (mean) and how sure (covariance). So the entire game is: given a mean and a spread coming in, what mean and spread come out after a nonlinear map?
PICTURE. The blue dot is ; the shaded ellipse is — one standard deviation of doubt in every direction.

Step 2 — Why not just push the whole cloud through ?
WHAT. We have a nonlinear function . "Nonlinear" means: its graph is a curve, not a straight line — equal steps in do not give equal steps in .
WHY. The honest answer to "what happens to the cloud?" would be: take infinitely many points from the cloud, send each through , and look at the resulting cloud. That is a Particle Filter — correct but expensive. The Extended Kalman Filter (EKF) goes to the opposite extreme: it replaces the curve with its tangent line at (a Taylor Series Expansion cut off after the linear term) and pushes the ellipse through the line. Fast, but the curvature is thrown away.
PICTURE. Watch the curved orange function bend a symmetric input cloud into a lop-sided output cloud. The dashed grey tangent line — the EKF's world — keeps it symmetric and puts the mean in the wrong place.

Step 3 — The clever points: choosing sigma points
WHAT. We replace the whole cloud with a tiny, hand-picked set of points called sigma points, written (script-X, index ). In dimensions we use of them:
- one at the center, ,
- and a matched pair along each principal axis of the ellipse — one on the side, one on the side.
Term by term:
- is the matrix square root of the covariance (usually the Cholesky Decomposition factor with ). It is the object that turns "size of doubt" into "how far to step." In 1D it is just .
- means "the -th column" — one direction of the ellipse.
- is a scale dial ( = "lambda"): bigger dial ⇒ points sit further out. We meet properly in Step 6.
WHY. Symmetric pairs guarantee the point cloud's mean stays exactly at (a step is cancelled by its twin). Stepping along the axes of makes the cloud's spread match . Two moments matched, by construction.
PICTURE. The five red dots for a 2D ellipse: center plus two symmetric pairs, each pair straddling the ellipse along one of its axes.

Recall Why
and not more? Why is a deterministic minimal set enough? ::: Because a Kalman filter only cares about two moments (mean + covariance); points is exactly enough to pin both down. More points would only add sampling noise.
Step 4 — Meet the tuning knobs
WHAT. Before we can weight the dots, we must name the three little numbers that shape the scale dial and one more that tunes the spread. They are:
- ("alpha", a small positive number, e.g. ): controls the spread — how far the outer dots sit from the mean. Small ⇒ dots hug the center.
- ("kappa", a secondary knob, usually or ): a second lever on the scale, kept for legacy reasons.
- ("beta"): folds in prior knowledge of the shape of the distribution. For a Gaussian input the optimal value is .
WHY name them now. The covariance weight below uses and directly, and the worked example uses — so we must have them defined before we write those formulas. No symbol before its picture.
PICTURE. The knobs on a "spread panel": slides dots in/out, re-shapes the doubt, trims the scale — all feeding into the single dial .

Step 5 — The weights: making the dots reproduce mean and covariance
WHAT. Each sigma point carries a weight, written ("W" for weight). There are two weight lists: for reconstructing the mean, and for reconstructing the covariance.
- is the fat weight on the center point.
- Every outer point shares the small weight — the same on both sides of a pair (symmetry again).
WHY two lists? The covariance list differs from the mean list only at the center:
This lets us inject a distribution-tuning term — built from the and we just defined in Step 4 — into the spread without moving the mean. Pure bookkeeping.
Sanity check the mean weights sum to 1 (an unbiased average must). The mean list has one center weight plus equal outer weights:
PICTURE. The same five dots, now drawn as circles whose area is the weight — a big central disk, four small satellites.

Step 6 — Push through, then read off the answer
WHAT. Now the payoff. Send each sigma point through the true function:
Then rebuild the output statistics as weighted sums:
- = weighted average of the transformed dots = the new mean.
- = how far a transformed dot lands from the new mean.
- = the "outer product," which turns a displacement into a little ellipse-piece; summing them rebuilds the output ellipse .
WHY. Because we used the real on each dot, the transformed dots land on the true curve — so their weighted spread captures the curvature the EKF's tangent line missed. This is accurate to 3rd order for Gaussian inputs, versus 1st order for the EKF.
PICTURE. Left: input dots on the ellipse. Middle: the curve carries each dot up to the output axis. Right: the recovered output mean (star) and spread — notice the mean has shifted away from where the tangent line would put it.

Step 7 — Edge case: what the dial does, and its extremes
WHAT. Recall the step size is , so controls how far the outer dots sit from the center — and is set entirely by the Step-4 knobs .
WHY / the cases.
- Large (points far out): the dots sample the function far from , feeling far-field curvature — good if is gently curved, risky if it bends wildly out there.
- Tiny (the "scaled UT"): , so dots sit at — hugging the mean, sampling locally. The term in re-inflates the covariance so the spread stays correct even though the dots moved in.
- Degenerate (zero uncertainty): the square root is , all dots pile onto , and the UT reduces to plain — exactly right, since a point with no doubt just gets mapped through.
- Guarding the root: if you ever pick the step becomes imaginary — never do this; keep so .
PICTURE. The same input ellipse with three settings of : wide dots, tight dots, and the collapsed case — with the covariance-correction weight shown re-inflating the tight case.

Step 8 — Edge case: the non-differentiable map (why no Jacobian)
WHAT. So far the output of was called . In a real filter the same machinery is used on the measurement function : it takes the state and predicts what a sensor should read. To keep the standard filter notation, when the function is we rename its output (the predicted measurement), its mean , and its covariance — these are exactly the of Step 6 with replaced by . Nothing new, only new letters:
- ::: the predicted measurement (plays the role of ).
- ::: its mean (the role of ).
- ::: its spread (the role of ).
- ::: the cross-covariance — brand new — measuring how the input and output move together.
Now take a 2D state and (distance from origin). Its derivative is , which blows up at the origin — division by zero.
WHY. The EKF needs that derivative to propagate uncertainty, so it fails right at . The UT never differentiates. Every term of above is a plain evaluation of at a dot — no slope, no singularity. This is exactly the ingredient the Kalman gain needs, replacing the Jacobian entirely.
PICTURE. Four sigma points around near the origin; the cone has a sharp tip (no tangent plane) at the center, yet each dot still gets a clean output value.

The one-picture summary
Everything at once: an input Gaussian → sigma points chosen along → each dot pushed through the true curve → weighted recovery of the shifted output mean and skewed output covariance, with the failed EKF tangent line shown ghosting behind for contrast.

Recall Feynman retelling — say it like a story
We start with a guess and a fog of doubt around it — a dot and an ellipse. We don't trust ourselves to bend the whole ellipse through a curvy function, so we cheat cleverly: we drop a handful of stones — one in the middle, and matched pairs stepping out along each direction the fog reaches. How far they step is set by a dial , built from small knobs (and we always keep so the step is a real distance, not an imaginary one). We weight the stones so that, together, they are the original fog (same center, same spread), and one extra knob tunes the spread weight for Gaussian fog ( is ideal). Then we throw every stone through the real curve — not a fake straight-line stand-in — and watch where they land. The weighted average of where they land is our new best guess; the weighted spread is our new fog. When the function is a sensor we just rename the output and also track how input and output move together, — and even when the sensor has a sharp tip where slopes explode, our stones don't care, they only ever evaluate, never differentiate.
Recall The whole cycle in one flow
flowchart TD
A["mean x-bar and covariance P"] --> B["build 2n+1 sigma points"]
B --> C["push each through true f"]
C --> D["weighted mean gives y-bar"]
C --> E["weighted spread gives P_y"]
D --> F["output belief"]
E --> F