The Kalman filter (WB95) estimates, in the presence of disturbances, the inaccessible internal state
of a discrete-time system whose model is completely known.
In fact, the Kalman filter is the optimal recursive estimator: if the problem noise is Gaussian, the Kalman filter provides the minimum-mean-square estimate of the system's internal state.
For historical reasons, the Kalman filter properly refers only to filtering a system in which state transition and observation are linear functions of the current state.
According to linear systems theory, the dynamics of a continuous-time “linear” system are represented by a differential equation of the form
| (3.11) |
| (3.12) |
The discrete-time Kalman filter is useful for real systems in which the world is sampled at discrete intervals, transforming the continuous-time linear system into a linear system of the form
The variables and
represent process and observation noise, respectively, with zero mean
and known covariance matrices
and
, respectively (white Gaussian noise is assumed).
is a
state-transition matrix,
is a
matrix that connects the optional control input
to the state
, and finally
is a
matrix that connects the state to the measurement
.
All these matrices, which represent the system model, must be known with absolute precision; otherwise, systematic errors are introduced.
The Kalman filter is a recursive state estimator and requires, at each iteration, knowledge of the state estimated at the previous step
and the current observation
, which is an indirect observation of the system state.
Let
be the a priori estimate of the system state, based on the estimate obtained at time
and on the system dynamics, and let
be the a posteriori state estimate based on the observation
.
These definitions allow the a priori and a posteriori estimation errors to be defined as
| (3.14) |
| (3.15) |
The objective of the Kalman filter is to minimize the a posteriori error covariance and provide a method for obtaining the estimate of
given the a priori estimate
and the observation
.
The Kalman filter provides an a posteriori state estimate through a linear combination of the previous state estimate and the observation error:
In the first phase, the a priori estimate of both
and the covariance
is obtained.
The a priori estimate
follows from knowledge of the system dynamics (3.13):
| (3.18) |
These are the best a priori estimates of the state and covariance at time that can be obtained before observing the system.
In the second phase, the gain is computed:
Using this value for the gain , the a posteriori estimate of the covariance matrix becomes
To unify the different variants of Kalman filters, these equations can be rewritten using the variance-covariance matrices
As can readily be seen, the covariance matrix and the Kalman gain depend neither on the state nor on the observations, and even less on the residual; instead, they have an independent history.
Kalman filtering nevertheless requires an initial value for the state variable and the covariance matrix: the initial state value must be as close as possible to the true value, and the degree of similarity to this value must be encoded in the initial covariance matrix.