Chapter two The Kalman filter: the exact case
Suppose the world is kind. Suppose \(f\) and \(h\) are linear, and every noise is Gaussian. Then something remarkable happens: a Gaussian pushed through a linear map is still exactly Gaussian, and the product of two Gaussians is exactly Gaussian. The belief never leaves the family, no approximation is ever made, and the Kalman filter is not a heuristic — it is the exact optimal solution.
You must understand this chapter before the next two, because the EKF and the UKF are both nothing more than "the Kalman filter, but with a trick for handling the curve."
In the linear case the models become matrices:
2.1 · Predict
Push the mean through the model, and push the covariance through it twice — once on each side, because covariance is quadratic in the state:
2.2 · Update
Now a measurement arrives. Compute what you expected to see, \(H\hat{x}_k^-\), and subtract it from what you did see. The difference is the innovation, and it is the only new information in the world:
\(S_k\) is the innovation covariance: how surprised you were entitled to be. The Kalman gain then decides how much of that surprise to believe:
Look at (2.5) and read it as a ratio. If \(P^-\) is large (you are lost) and \(R\) is small (the sensor is crisp), \(K\) tends toward \(H^{-1}\) and you snap onto the measurement. If \(P^-\) is tiny and \(R\) is huge, \(K \to 0\) and you ignore the sensor entirely. The gain is an automatic, optimal trust dial, and nobody has to tune it — it falls out of the covariances you declared.