Toolgeist › Developer
Kalman Filter Visualizer — See It Beat a Noisy Sensor
A working 1D constant-velocity Kalman filter with the matrix algebra written out by hand — predict, then update, with P = FPFᵀ + Q and K = PHᵀ/(HPHᵀ + R) exactly as specified. The sensor only ever reports position, so the velocity you see the filter converge on is genuinely inferred, not supplied. The RMSE figures compare the estimate and the raw readings against the known ground truth, which means "the filter beats the sensor" is a number measured on this page rather than a claim in a textbook.
How to use Kalman Filter Visualizer — Watch It Beat the Sensor
- Drag sensor noise σ up and watch the amber measurement scatter widen while the blue estimate stays smooth.
- Drag it to the minimum — the Kalman gain approaches 1 and the filter simply trusts the sensor.
- Drag process noise q to its extremes and watch the ±2σ confidence band inflate and collapse.
- Hit "New noise sample" to confirm the improvement is not a fluke of one random draw.
Frequently asked questions
- What is the Kalman gain, intuitively?
- K = P/(P + R) is a ratio between how uncertain the filter is about its own prediction and how noisy the sensor is. At K near 1 the filter believes the measurement; at K near 0 it coasts on its motion model and ignores the readings. Everything in between is an optimally weighted average of prediction and measurement.
- How can it estimate velocity if velocity is never measured?
- Through the motion model. The filter predicts where the target should be one step ahead given its current velocity estimate, and the mismatch between that prediction and the next measurement is evidence about velocity. Accumulate that evidence over many steps and the velocity estimate converges — which is why the inferred velocity readout above lands near the true value you set.
- In what sense is a Kalman filter "optimal"?
- For a linear system with Gaussian noise, it is the minimum mean-squared-error estimator — that is a theorem, not a marketing claim. The important caveat is the premise: if your system is meaningfully nonlinear or the noise is not Gaussian, optimality no longer holds and people reach for an extended or unscented Kalman filter, or a particle filter.
- What does the process noise q actually control?
- How much you believe the target can deviate from constant velocity. Too low and the filter becomes overconfident and lags real manoeuvres; too high and it chases sensor noise. Tuning q against R is most of the practical work in deploying a Kalman filter, which is why both are sliders here.
- Why does the confidence band start wide and then narrow?
- The filter is initialised with a deliberately large covariance because it knows nothing yet. Each update reduces P through P = (I − KH)P, so uncertainty shrinks until it reaches a steady state where new information exactly balances the uncertainty added each step by the process noise.
- Where are Kalman filters used in practice?
- GPS and inertial navigation, robot and drone state estimation, radar and object tracking, sensor fusion in self-driving cars, and financial time-series smoothing. Anywhere you have a noisy sensor and a usable model of how the thing you are tracking moves.
Related Developer tools
Also searched for: kalman filter explained visually · kalman gain intuition · sensor fusion noise filtering demo · constant velocity kalman filter example · state estimation tutorial interactive
Browse all 738 free tools on Toolgeist →