0% found this document useful (0 votes)
5 views2 pages

Discrete Kalman Filter

The document discusses the discrete Kalman filter for state estimation in linear time-invariant systems, highlighting the role of process and measurement noise. It details the observer dynamics, the minimization of the mean square error, and the recursive relationship for the covariance matrix. The optimal gain and the discrete algebraic Riccati equation are also presented, along with MATLAB commands for solving the equations.

Uploaded by

innoodira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Discrete Kalman Filter

The document discusses the discrete Kalman filter for state estimation in linear time-invariant systems, highlighting the role of process and measurement noise. It details the observer dynamics, the minimization of the mean square error, and the recursive relationship for the covariance matrix. The optimal gain and the discrete algebraic Riccati equation are also presented, along with MATLAB commands for solving the equations.

Uploaded by

innoodira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

4.5.

1 Discrete Kalman Filter


Consider the discrete-time LTI system with the disturbance vector w and the noise vector v:

x[k + 1] = Ax[k] + Bu[k] + w[k] (4.20)


y[k] = Cx[k] + v[k] (4.21)

in which w is called process noise or disturbance, v is called measurement noise, these signals are
uncertainties (we don’t know the values, even after they have appeared).
Due to the uncertainties, the output that we measured, denoted ŷ is not the true output
y, hence the job of state observation - computing the estimated state x̂ - depends also on the
characteristic of w and v.
We assume that w and v are independent zero-mean, Gaussian white noise, with covariances:
E(w[k]w[k]T ) = Qw [k], E(v[k]v[k]T ) = Rv [k]. In case of stationary noises, Qw and Rv are
constants.
We use the Luenberger observer for estimating states:

x̂[k + 1] = Ax̂[k] + Bu[k] + L[k](y[k] − Cx̂[k]) (4.22)

The estimation error e[k] = x[k] − x̂[k] has the dynamics

e[k + 1] = (A − LC)e[k] + w[k] − Lv[k] (4.23)

In 1961, Kalman has published his work on state estimation, which is then named Kalman
filter, the target is to minimize the mean square error:
n
X
J[k] = E(e1 [k]2 + · · · + en [k]2 ) = E(ej [k]2 ) (4.24)
j=1

This corresponds to the sum of diagonal entries of the covariance matrix:

P[k] = E(e[k]e[k]T ) = E (x[k] − x̂[k])(x[k] − x̂[k])T




Note that the sum of diagonal entries of a square matrix is called the trace of the matrix, and
it is a linear operator on the matrices, i.e. following properties hold:

tr(A + B) = tr(A) + tr(B)


tr(cA) = ctr(A)

Some other properties of the trace operator:

tr(A) = tr(AT )
Xn
tr(A) = λi ,
i=1

where λi are eigenvalues of A ∈ Rn×n .


In summary, the observer needs to minimize tr(P[k]) for each time step k. 
We want to find P in a recursive manner, given P[0] = E (x[0] − x̂0 )(x[0] − x̂0 )T .
With P[k] available, we want to find the relation between P[k + 1] and P[k]:
P[k + 1] = e[k + 1]e[k + 1]T = E (A − LC)e[k] + w[k] − Lv[k])(A − LC)e[k] + w[k] − Lv[k])T


= (A − LC)E(e[k]e[k]T )(A − LC)T + E(w[k]w[k]T ) + LE(v[k]v[k]T )LT


= (A − LC)P[k](A − LC)T + Qw [k] + LRv [k]LT
= AP[k]AT + Qw [k] − AP[k]CT LT − LCP[k]AT + L(Rv [k] + CP[k]CT )LT

Note that w, v and e are uncorrelated, hence the covariances of cross-terms are zeros.
Denote R [k] = (Rv [k] + CP[k]CT ), we obtain further:

P[k + 1] = AP[k]AT + Qw [k] − AP[k]CT LT − LCP[k]AT + LR [k]LT


= AP[k]AT + Qw [k] + (L − AP[k]CT R−1 T T T
 )R (L − AP[k]C ) − AP[k]C R [k]
−1
CP[k]AT

Hence:

trP[k + 1] = tr AP[k]AT + tr (Qw [k]) + tr L − AP[k]CT R [k]−1 )R [k](L − AP[k]CT )T


 

− tr AP[k]CT R [k]−1 CP[k]AT



(4.25)

Since the matrix in the third term is positive semidefinite, its mininum trace would be 0 when
we choose L = AP[k]CT R [k]−1 . This leads to the recursive Kalman filter:

Recursive discrete Kalman filter


The optimal gain at time step k is

L[k] = AP[k]CT (Rv + CP[k]CT )−1 (4.26)

where

P[k + 1] = (A − LC[k])P[k](A − LC[k])T + Qw [k] + LRv [k]LT , (4.27)


P[0] = E (x[0] − x0 )(x[0] − x0 )T

(4.28)

When the system is invariant, the noises are stationary, and if P[k] converges, the observer gain
is constant:

L = APCT (Rv + CPCT )−1 , (4.29)

where P satisfies:

P = APAT + Qw − APCT (Rv + CPCT )−1 CPAT (4.30)

Equation (4.30) is the discrete algebraic Riccati equation (DARE), see (3.62). In MATLAB,
the command dlqe will solve this DARE and also computes the gain L as in (4.29).

You might also like