Skip to main content

Interactive demo

Kalman tracker stress test

A noisy complex tone, live. The two-state filter with a wrapped innovation, the same filter with MHT over 2π, the 3-sigma gate, and Kay's estimator over a sliding window all track it sample by sample. Push the SNR down, move the frequency, and watch who slips.

By Nir Regev. Lab tool for the lecture "Tracking a Tone's Frequency Sample by Sample" in Regev's Kalman Filter Academy. More courses at Regev's Radar and AI Academy.

Frequency, last 480 samples

The thick white line (black in light mode) is the true ω. An estimate that leaves the plot is pinned to its edge.

Error: running RMSE of ω (log scale)

Solid lines: measured RMSE over about the last 64 samples. Dashed blue: what the Kalman filter thinks its own error is, √P₂₂. When the two part, the filter is wrong about itself. While nothing slips, the thin orange MHT line runs inside the wide blue Kalman filter line. Untick a method to hide it. Dotted gray (white in dark mode), labeled "bound": the posterior Cramér-Rao bound, the smallest RMSE any tracker can reach for this drift and this SNR. It needs a random walk or a constant tone, so it is hidden for a ramp or a wobble. With q matched to the truth and no burst, the dashed blue line sits on it.

SNR per sample
Filter q
MHT hypotheses
Kay window N
True motion
Motion strength
Speed

Presets

A noise burst drops the SNR by 15 dB for 30 samples. The filters are not told.

Readouts

RMSE over the last 256 samples, and over all samples since you pressed Restart or changed the true motion, skipping the first 200 so the start-up transient does not dominate. The Bound row is the posterior CRLB averaged the same way. A short window can dip under it by luck; with q matched, the Kalman filter's "all" value settles onto it. Slips count 2π jumps of the phase estimate against the truth. NIS is the average of ν²/S; near 1 means the filter's model fits the data.

Innovation ν, last 200 samples

ν = wrap(angle(x) − φ̂), the phase the Kalman filter is corrected by, always between −π and +π. Blue dots are normal samples. A red ring is where noise pushed the true innovation past +π or below −π; the wrap moved it to the red dot on the other side, so the filter is corrected the wrong way, by its gain times 2π. With a small gain one of these barely moves it. While the gain is large, at start-up, a few of them can drag the filter off the tone: that is a slip, whichever cut it crosses.

Batch test: final estimate after N = 16 samples, constant tone

Press Run to sweep the SNR from −2 to 16 dB, 2,000 trials per point, with the MHT size set above. The dashed line at 1 is the CRLB.

Variance divided by the CRLB. Same case as the lecture's Section 9.7.

Runs entirely in your browser. Nothing you set here is sent anywhere.

Start a conversation

Have a sensing, AI or chip problem worth solving?

Tell us about the product, where it runs and what has to work. We will come back with the next practical step.

AlephZero updates

Get new demos, papers and posts by email

We write when we publish something new in edge AI, radar and signal processing. Unsubscribe anytime.