← back to Control Theory

Kalman Filter

Wikipedia · wpKalman filter · CC BY-SA 4.0

The Kalman filter estimates the state of a linear system from noisy measurements. Each step has two phases: predict (use the model to forecast the next state) and update (correct the forecast using the measurement). It is optimal in the least-squares sense for Gaussian noise.

Prediction and update

Predict: propagate the state estimate forward using the system model. The uncertainty grows. Update: incorporate the new measurement. The Kalman gain weights how much to trust the measurement versus the prediction. If the measurement is precise (low noise), the gain is high and you trust the sensor. If the model is precise (low process noise), the gain is low and you trust the prediction.

t x true noisy estimate uncertainty

The Kalman gain

K = P_predicted * H' * (H * P_predicted * H' + R)^(-1). Here P is the error covariance, H is the measurement matrix, and R is the measurement noise covariance. When R is large (noisy sensor), K is small and the filter mostly trusts the model. When P is large (uncertain model), K is large and the filter mostly trusts the measurement. Over time, P shrinks and the estimate converges.

Scheme
Neighbors