Interactive demo · Bayesian and Probabilistic Machine Learning · Chapter 13

Linear dynamical systems: Kalman filter and smoother

An object moves in the plane with nearly constant velocity (blue); we see only noisy measurements of its position (green). The latent state zn holds position and velocity, zn = Azn−1 + noise of covariance Γ, and xn = Czn + noise of covariance Σ. The Kalman filter (red) predicts each new state and corrects the prediction by the gain times the measurement error, using the data up to time n; the smoother (pink) uses all the data, so it is never less certain. Ellipses: one standard deviation.

Show

Process noise q (acceleration)

Measurement noise sd r

Time steps N

Try these

Model (time step 1): A adds the velocity to the position; Γ = q[[⅓I, ½I], [½I, I]] is the covariance of a random acceleration of strength q over one step; C picks the position; Σ = r2I. Prior: position (0, 0) and velocity (1, 0.6), standard deviations 0.71 and 0.32. The filter uses the same q and r as the simulation. The random numbers are seeded, so a class sees the same pictures.

In the lecture notes