Kalman filter · Interactive demo

Motion Tracking Demo

Can position readings alone reveal velocity?

The filter sees only noisy position readings but estimates both position and velocity. The dashed navy line is true position; the solid teal line is the estimate. Estimated velocity appears below the chart.

Try it:Playto an acceleration or deceleration segment. Lower and raise Q to compare position lag and the velocity estimate below the chart.

┄Ground truth●Noisy measurement━Filtered estimate
Use a browser with Canvas support to view the chart.

Enable JavaScript to view the animation.

How does the model work?

The state contains position and velocity. Every 0.25 seconds, the filter predicts with a constant-velocity model and corrects both states using a position measurement. The simulated target speeds up and slows down; Q controls how much unmodeled acceleration the filter allows. The motion is along one axis.

Continue reading:Prediction and measurement update in the standard Kalman filter

Scroll to Top