The Kalman filter (WB95) seeks to estimate, 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 noise in the problem is Gaussian, the Kalman filter provides the least-squares estimate of the system's internal state.
For historical reasons, the term 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 “linear” continuous-time 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, converting the continuous-time linear system into a linear system of the form
The variables and
represent process noise and observation noise, respectively, with zero mean
and known variances
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
, an indirect observation of the system state.
Let
be the prior estimate of the system state, based on the estimate obtained at time
and on the system dynamics, and let
be the posterior state estimate after observation
, based on that observation.
These definitions make it possible to define the prior and posterior estimation errors as
| (3.14) |
| (3.15) |
The objective of the Kalman filter is to minimize the posterior error covariance and provide a method for obtaining the estimate of
given the prior estimate
and the observation
.
The Kalman filter provides a posterior state estimate through a linear combination of the previous state estimate and the observation error:
In the first phase, the prior estimates of both
and the covariance
are obtained.
The prior estimate
follows from knowledge of the system dynamics (3.13):
| (3.18) |
These are the best prior estimates of the state and covariance at time that can be obtained before observing the system.
In the second phase, the gain is calculated:
Using this value for the gain , the posterior estimate of the covariance matrix becomes
To unify the various Kalman-filter variants, these equations can be expressed using the variance-covariance matrices
As can easily be seen, neither the covariance matrix nor the Kalman gain depends in any way on the state, the observations, or 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 that value must be encoded in the initial covariance matrix.