Unit content
The Kalman filter
The Kalman filter estimates the hidden state of a linear dynamical system by alternating between prediction from the state model and correction from a noisy measurement.
Assume the model
$$\mathbf x_k=A\mathbf x_{k-1}+B\mathbf u_k+\mathbf w_k,$$
$$\mathbf z_k=H\mathbf x_k+\mathbf v_k,$$
with Gaussian process and measurement noise.
Predict
From the previous estimate,
$$\hat{\mathbf x}{k|k-1}=A\hat{\mathbf x}{k-1|k-1}+B\mathbf u_k,$$
and the covariance is propagated as
$$P_{k|k-1}=AP_{k-1|k-1}A^T+Q.$$
The prediction generally becomes more uncertain because process noise $Q$ is added.
Compare with the measurement
The innovation is
$$\mathbf y_k=\mathbf z_k-H\hat{\mathbf x}_{k|k-1}.$$
It measures the disagreement between what the model predicted and what the sensor observed.
Correct
The Kalman gain is
$$K_k=P_{k|k-1}H^T(HP_{k|k-1}H^T+R)^{-1}.$$
The state estimate becomes
$$\hat{\mathbf x}{k|k}=\hat{\mathbf x}{k|k-1}+K_k\mathbf y_k.$$
When measurement uncertainty $R$ is small relative to prediction uncertainty, the update trusts the measurement more strongly; when measurements are noisy, it relies more heavily on the model.
The filter is not merely smoothing data. It propagates both a state estimate and a quantified uncertainty, then combines model and measurement according to their relative uncertainty.