Kalman Filter

Deriving the Kalman Gain

State Estimate:

Where:

  • is the weight of the measurement
  • is the weight of the prior state estimate

If means that we are 100% certain that the measurement is trustworthy. Therefore, , which means that the probability of is the probability of not happening.

Therefore,

Accounting for relation between variances,

Where:

  • is variance of the optimum combined estimate
  • is the variance of the prior estimate
  • is the variance of the measurement

Note

Recall that for any normally distributed random variable with variance , is distributed normally with variance .

We have to minimize in order to get the optimum estimate, therefore, we have to find such that it minimizes .

This is achievable by differentiating with respect to and setting the result equal to zero.

Solving,

Substituting the result back into the current state estimation,

Here we can see that is the Kalman Gain .