Kalman filter

A Kalman filter is a kind of Bayesian filter that uses Gaussians. Instead of using discrete pdfs to represent measurement data, we use Gaussians.

Working

Prediction using process model

The process model or the system model, is what is used for the prediction step. For the rest of the document, we will assume that we are measuring a one dimensional value. The process model provides a means of predicting this value. But we will not be working with the value itself, but with a Gaussian that represents it. If our process model predicts as the prediction, but has a high degree of uncertainty, we will represent the prior (the prediction) as a Gaussian centered at having high variance.

The bar "" is used to denote that the value being talked about is a prior.

Updation using measurement

The measurement from the sensors is also taken as a Gaussian, centered around the reported value with the variance representing the inaccuracies in the sensor. This is called the likelihood function. The product of the likelihood function and the prior (normalized) yields us the posterior, or the filter's output.

Kalman gain

Looking at the above equation, we can deduce

Clearly, . Let .

This looks an awful lot like the math behind the g-h filter, where we use and as scale lerp factors between the prediction and the measurement.