Post · 2 min read· pp. 197–198
There are several ways to derive the one-dimensional Kalman Gain equation. I present the simplest one.
Given the measurement zn and the prior estimate x^n,n−1 we are interested in finding an optimum combined estimate x^n,n based on the measurement and the prior estimate.
The optimum combined estimate is a weighted mean of the prior estimate and the measurement:
x^n,n=w1zn+w2x^n,n−1
Where w1 and w2 are the weights of the measurement and the prior estimate.
w1+w2=1
x^n,n=w1zn+(1−w1)x^n,n−1
The relation between variances is given by:
pn,n=w12rn+(1−w1)2pn,n−1
Where:
pn,n is the variance of the optimum combined estimate x^n,n
pn,n−1 is the variance of the prior estimate x^n,n−1
rn is the variance of the measurement zn
Note: for any normally distributed random variable x with variance σ2, wx is distributed normally with variance w2σ2
Since we are looking for an optimum estimate, we want to minimize pn,n.
To find w1 that minimizes pn,n, we differentiate pn,n with respect to w1 and set the result to zero.
dw1dpn,n=2w1rn−2(1−w1)pn,n−1
Hence
w1rn=pn,n−1−w1pn,n−1
w1pn,n−1+w1rn=pn,n−1
w1=pn,n−1+rnpn,n−1
We have derived the Kalman Gain!
Since the Kalman Gain yields the minimum variance estimate, the Kalman Filter is also called an optimal filter.