v. Calculating the Kalman gains

This portion of the system model design will require far more math then any of the other sections. If you haven't been exposed to linear algebra or probability, you might want to jump to the bottom 4 equations. These equations can be programmed into any computer in order to obtain the Kalman gain.

What is a Gaussian distribution?

This algorithm assumes that v and w are additive Gaussian white noise. That means that the probability density of these random signals are normal or Gaussian. To understand what a normal distribution is, let's take an unfixed coin and flip it 10 times. There are 1024 (or 2^10) possible permutations of heads and tails. There is 1 possible permutation of all heads.

There is 1 possible permutation of all tails.

There are 10 possible permutations of 1 head and 9 tails.

There are 10 possible permutations of 1 tail and 9 heads.

The most permutations there are involves an equal number of heads and tails (252).

Now, look at the figure on the left. This shows a probability distribution graph of the results if you flip an unfixed coin 100 times. The x-axis represents the number of heads in a permutation. The y-axis represents the number of possible permutations you can get. As the number of trials increase, the probability distribution graph resembles a normal distribution. This is more colloquially called a bell curve.

The method to calculating the Kalman gains was delineated by Rudolf Kalman in his 1960 paper. [8] This algorithm will employ the following matrix quantities.

The algorithm involves recursively computing these four equations. [9]

This web page does not do justice to how a Kalman filter really works. Reference [7] has a very good beginner's explanation. Kudos to Tim Babb for the easy-to-understand explanation. If you are feeling brave, read the original paper by Rudolf Kalman at [8]. Thanks to John Lukesh for his work in re-formatting this important paper. Finally, the formulas used above came from [9]. Please note that [8] and [9] are very difficult reads.

[7] T Babb, "How a Kalman filter works, in pictures." BZARG [Online]. Available: https://www.bzarg.com/p/how-a-kalman-filter-works-in-pictures/ . [Accessed 28 September 2019].

[8] R. Kalman, "A New Approach to Linear Filtering and Prediction Problems," ASME–Journal of Basic Engineering, vol. 82, no. March, pp. 35-45, 1960. Available: https://www.cs.unc.edu/~welch/kalman/media/pdf/Kalman1960.pdf

[9] S. Haykin, "Chapter 10: Kalman Filters," in Adaptive Filter Theory, Upper Saddle River, New Jersey, Prentice Hall, 2002, p. 474 ~ 479.