The Kalman Filter

The article by R. Frühwrith can be found at http://physics.lbl.gov/patrecog/images/FruhwirthNIM87.pdf.

Extrapolation

If $ x_{k-1} $ is the state of the system at layer (k-1) and $ C_{k-1} $ is the covariance matrix of $ x_{k-1} $ at layer (k-1), then the extrapolated state at $ x^{k-1}_k $ at layer (k) is given by $$ x^{k-1}_k = F_{k-1} x_{k-1}, $$ where $ F_{k-1} $ is the propagation matrix between site (k-1) and (k). The extrapolated covariance matrix $ C^{k-1}_k $ is given by $$ C^{k-1}_k = F_{k-1} C_{k-1} F^T_{k-1} + Q_{k-1}, $$ where $ Q_{k-1} $ is the covariance matrix of the noise that occurs between site (k-1) and (k).

Comparison to measurement

Using the measurement projection matrix at site (k), $ H_k $, we can compare the extrapolation to the actual measurement. The residual $ r^k_{k-1} $ is then given by $$ r^{k-1}_k = m_k - H_k x^{k-1}_k, $$ where $ m_k $ is the measurement at site (k).

A. Estimation using the Kalman gain matrix

The Kalman gain matrix at site (k), $ K_k $, is given by $$ K_k = C^{k-1}_k H^T_k \left[ V_k + H_k C^{k-1}_k H^T_k \right]^{-1}, $$ where $ V_k $ is the covariance matrix of the measurements at site (k).

The Kalman gain matrix yields the estimated state and covariance matrix at site (k) through the following equations: $$ x_k = x^{k-1}_k + K_k r^{k-1}_k $$ and $$ C_k = \left( I - K_k H_k \right) C^{k-1}_k $$ where $ I $ is the identity matrix.

The $ \chi^2_k $ value at site (k) is $$ \chi^2_k = \chi^2_{k-1} + r^T_k \left[ R_k \right]^{-1} r_k $$ where $$ R_k = V_k - H_k C_k H^T_k $$ is the covariance matrix of the estimated residuals and $$ r_k = m_k - H_k x_k $$ is the estimated residuals.

B. Estimation using the weighted means formalism

The estimated parameters can be obtained from the two following equations: $$ C_k = \left( \left[ C^{k-1}_k \right]^{-1} + H^T_k \left[ V_k \right]^{-1} H_k \right)^{-1} $$ and $$ x_k = C_k \left( \left[ C^{k-1}_k \right]^{-1} x^{k-1}_k + H^T_k \left[ V_k \right]^{-1} m_k \right). $$

The $ \chi^2_k $ value at site (k) is $$ \chi^2_k = \chi^2_{k-1} + r^T_k \left[ V_k \right]^{-1} r_k + \left( x_k - x^{k-1}_k \right)^T \left[ C^{k-1}_k \right]^{-1} \left( x_k - x^{k-1}_k \right) $$ where $$ r_k = m_k - H_k x_k $$ is the estimated residuals.

Smoothing

The smoother gain matrix $ A_k $ is given by $$ A_k = C_k F^T_k \left[ C^k_{k+1} \right]^{-1} $$ which yields the smoothed state vector $ x^n_k $ and smoothed covariance matrix $ C^n_k $ as followw: $$ x^n_k = x_k + A_k \left( x^n_{k+1} - x^{k+1}_k \right) $$ and $$ C^n_k = C_k + A_k \left( C^n_{k+1} - C^k_{k+1} \right) A^T_k. $$