Kalman filter
Compare a hidden signal or moving target with noisy measurements and a Kalman estimate.
About this tool
A linear Gaussian Kalman filter combines a prediction with each noisy position measurement. Distances use model units u; one observation advances model time by Δt = 1. Playback changes only the display speed.
1D is a random walk: x′ = x + w, Var(w) = q. In 2D each axis tracks position and velocity: p′ = p + v + a/2, v′ = v + a, Var(a) = q. Thus q is an increment variance in 1D and an acceleration variance in 2D. R is position-measurement variance in both modes; random noise uses its square root. The axes are independent, without walls. The initial prior is N(0,1) in 1D; in 2D positions have mean 0, velocities have means 2.2 and 1.2, and each axis has covariance I. The true initial state is drawn from this prior; the filter receives only its mean and covariance.
The shaded 1D region is m ± 1.959964√P, a pointwise 95% state interval. The current 2D ellipse is the joint 95% position region, with radii √(5.991465 Pxx) and √(5.991465 Pyy). Equal variances give a circle. These describe state uncertainty under the model, not measurement noise or a guarantee for the whole path. Zero variance collapses the region. Missing measurements in the numerical core use prediction only; contradictory deterministic measurements stop the run. Tiny floating-point comparison errors do not add variance.
RMSE uses only processed observations; in 2D it is √mean((x̂−x)² + (ŷ−y)²). A particular run need not improve on measurement RMSE. Seed, q, R, length and model edits clear the run; reset repeats the same seed and pauses at the prior. With reduced motion, the first Start also prepares a paused prior. Hidden pages pause observation time; large frame delays slow playback. Input drafts survive navigation; drafts larger than the platform cookie limit are not saved over reload. This is a teaching model, not a calibrated real-sensor tracker.