5. Properties of Kalman Filtering
Orthogonality Principle
The Kalman filter is a special case of the mean-square estimator, that is, the Kalman estimates are the conditional mean estimates, viz.,
ˆKF { | }
x = E x z . (5-1)
Now, we want to show that the Kalman filter satisfies the orthogonality principle. Let RVs x and z be jointly distributed. Then for any function g(⋅),
{ ( )( { | }) }T 0 E g z x −E x z = .
That is, any function of z is orthogonal to x once the conditional mean has been subtracted out. To show this, write
{ ( )( { | }) } { ( ) } { ( ) { | }}
{ ( ) } { { ( ) | }}
{ ( ) } { ( ) } 0
T T T
T T
T T
E g z x E x z E g z x E g z E x z E g z x E E g z x z E g z x E g z x
− = −
= −
= − =
We used the fact that
( ) { T | } ( ( ) T | } g z E x z = E g z x z
for any function since g(z) is deterministic if z is fixed. The orthogonality principle says that the RV
( ) g ⋅ { | x= −x E x z},
which is the estimation error, is orthogonal to all other RVs g(z). It has the following implication for estimation theory. If g( )⋅ is any function (or filter), then
{ | } ( )
E x −E x z ≤E x −g z ,
( ) ( )
( ) ( )
( )
2 2
2 2
2
Proof: ( ) { | } { | } ( )
{ | } { | } ( ) (orthogonality principle applied)
{ | }
E x g z E x E x z E x z g z E x E x z E E x z g z
E x E x z
⎛ − = − + − ⎞
⎜ ⎟
⎜ = − + − ⎟
⎜ ⎟
⎜ ≥ − ⎟
⎝ ⎠
where ⋅ denotes the Euclidean norm. Thus no other function of z provides a “closer approximation to x” in a probabilistic sense than does the Kalman filter which estimates x as E x z{ | }.
White Gaussian Residual
The residual is defined by ) ( ˆ −
−
= k k k
k z H x
r , (5-2)
which can be expressed
k t
t k
k k
k k
k k k k
t
t k
k k k
k k k
k k k
v d
G t
H x
H
x H
v d
G t
x H
x H v
x H r
k k k
k
+ Φ
+ + Φ
=
+ Φ
− + Φ
+ Φ
=
−
− +
=
∫
∫
−
−
−
−
−
−
−
−
−
−
1 1
) ( ) ( ) , ( )
~ (
) ( ˆ ]
) ( ) ( ) , ( [
) ˆ (
1 1
1
1 1 1
1 1
τ β τ τ
τ β τ
τ (5-3)
where β(τ) is the Brownian motion, i.e., dβ τ( )= w( )τ τd .
Let’s investigate the right-hand side terms in Eq. (5-3). Notice that the unconditional density
( )
{ }
1 1 1
1 1 1
1 1
( ) ( ) 1 1
( )| 1 1
1/ 2 1
/ 2 1
( )| 1 1 1
( ) ( , )
( ) ( )
(Note that ( | ) 2 ( ) exp 1 ( )
2
k k k
k k k
k k
k
x x z k k
x z z k k
n T
x z k k k
x
f f z dz
f f z dz
f z P P
f
ξ ξ
ξ
ξ π ξ ξ
− − −
− − −
− −
∞
+ + − −
−∞
∞
+ − −
−∞
− −
+ − − −
=
=
⎡ ⎤
= ⎢⎣ + ⎥⎦ − +
=
∫
∫
1 1
1 1 1
1 1
( )| 1 1
( )| 1 1
( )|
( ) since ( ) is independent of .)
( ) ( )
( )
k
k k k
k k
z k k
x z z k k
x z
P z
f f z dz
f
ξ ξ
ξ
− −
− − −
− −
+ − −
∞
+ − −
−∞
+
+
=
=
∫
This equation indicates that ~ 1
−
xk
−
zk
is independent of . The second term of the right-hand side of Eq. (5-3) is also independent of since it involves only transition matrix and process noise.
Finally, is independent of because it is white. Therefore, we can say that is independent of . On the other hand, we can notice that is a linear function of . Therefore, we can conclude that is a white sequence.
−1
zk
−1
zk
vk 1 rk
−1
zk rk zk
rk
Eq. (5-3) also tells us that since is Gaussian, is Gaussian with the following mean and variance.
zk rk
0 } { )}
, ( { )}
~ ( { }
{rk = HkΦk−1E xk−1 + + HkE I ⋅⋅ + E vk =
E (5-4)
k T
k k
k
T k k
k k k k
k k T
k k
R H
P H
v x
x H v x
x H E r
r E
+
−
=
+
−
− +
−
−
=
) (
} ) )]
( ˆ [
)(
)]
( ˆ [
{(
}
{ (5-5)
This verifies that the residual rk is a white Gaussian sequence. This property is useful:
(1) to verify a design of Kalman filter, (2) to detect a sensor failure or bad data.
Stability
Consider the following time-invariant system and the deterministic asymptotic estimation
xk+1 = Axk +Buk (5-6a)
zk = Hxk (5-6b)
where state xk ∈Rn, control input uk ∈Rm, output zk ∈Rp; and A, B, and H are known constant matrices of appropriate dimension. All variables are deterministic, so that if initial state x0 is known then Eq. (5-6) can be solved exactly for xk, zk for k ≥0.
Deterministic asymptotic estimation problem: Design an estimator whose output ˆxk converges with k to the actual state xk of Eq. (5-6) when the initial state x0 is unknown, but uk and zk are given exactly.
An estimator of observer which solves this problem has the form
( )
ˆ 1 ˆ ˆ
xk+ = Axk +L zk −Hxk +Buk, (5-7)
as shown in Fig. 5-1.
Figure 5-1 State Observer
B z-1 H
A
z-1
A
L B H
measurement
PLANT
residual -
zk
u
k xk zkestimate ˆx k ˆx k
OBSERVER
ˆzk
To Choose L in Eq. (5-7) so that the estimation error xk = xk −xˆk goes to zero with k for all x , it is 0 necessary to examine the dynamics of xk. Write
( )
( ) ( )
1 1 ˆ 1
x x x
ˆ ˆ
x u x z x u
ˆ ˆ
x x x x
( )x
k k k
k k k k k k
k k k k
k
A B A L H B
A L H H
A LH
+ = + − +
= + −⎡⎣ + − + ⎤⎦
= − − −
= −
It is now apparent that in order that xk go to zero with k for any x0, observer gain L must be selected so that (A− LH) is stable. L can be chosen so that xk →0 if and only if ( ,A H) is detectable which is defined in the sequel.
(1). (A, H) is observable if the poles of (A-LH) can be arbitrarily assigned by appropriate choice of the output injection matrix L.
(2). (A, H) is detectable if (A-LH) can be made asymptotically stable by some matrix L. (If (A, H) is observable, then the pair is detectable; but the reverse is not necessarily true.)
(3). (A, B) is reachable if the poles of (A-BK) can be arbitrarily assigned by appropriate choice of the
feedback matrix K.
(4). (A, B) is stabilizable if (A-BK) can be made asymptotically stable by some matrix K. (If (A, B) is reachable, then (A, B) is stabilizable; but the reverse is not necessarily true.)
Now, consider the following stochastic system
1 0 0 0
xk+ = Axk +Buk +Gw , x ~k N(x ,P ), w ~k N(0, )Q zk = Hxk + v , v ~k k N(0, )R .
The stability of the Kalman filter designed for this system is presented by two theorems.
Theorem 5-1. (Sufficient condition for a Kalman filter to be stable)
Let (A, H) be detectable. Then for every choice of P0 there is a bounded limiting solution P to
T T
k T
k T
k k
k A P P H HP H R HP A GQG
P+1(−) = [ (−)− (−) ( (−) + )−1 (−)] + . (5-8) Furthermore, P is a positive semidefinite solution to the algebraic Riccati equation
T T
T
T HPH R HP A GQG
PH P
A
P = [ − ( + )−1 ] + . (5-9)
(Proof)
(A, H) detectable means that there exists an L that makes (A-LH) asymptotically stable.
Construct a suboptimal xˆk using the L
1 ( )ˆ
L L
k k
x + = A LH x− +Buk +Lzk
. (This is a state observer.) The estimation error in this case is given by
[ ]
1 1 1
1 1
ˆ
( )ˆ
( )ˆ
( )
L L
k k k
L
k k k k k k
L
k k k k k k k
k k k
x x x
Ax Bu Gw A LH x Bu Lz
Ax Bu Gw A LH x Bu L Hx v A LH x Gw Lv
+ + +
+ +
= −
= + + − − − −
= + + − − − − +
= − + −
The estimation error covariance is
T T
T k
k A LH S A LH LRL GQG
S +1 = ( − ) ( − ) + + .
If (A-LH) is asymptotically stable, has a finite steady-state value according to the Lyapunov theorem.
Sk
Since the Kalman is optimal, Pk(−) < Sk, where Pk(−) satisfies Eq. (5-8).
From the above rationale, if (A, H) is detectable, P
P
Pk k k
k→∞ + (−) = lim →∞ (−) =
lim 1
and P is the solution of the algebraic Riccati equation, Eq. (5-9).
Theorem 5-2: (Necessary and sufficient condition for a Kalman filter to be stable)
Let Q be a square root of the process noise covariance so that Q = Q QT ≥ 0, and let the measurement noise have R>0. Suppose (A,G Q) is reachable. Then (A, H) is detectable if and only if
a. There is a unique positive definite limiting solution P to Eq. (5-8) which is independent of . Furthermore, P is the unique positive definite solution to the algebraic Riccati equation.
P0
b. The steady-state error system defined by Kalman filter, viz.,
k k k
k k
k A I K H x Gw AK v
x + (−) = ( − )~ (−)+ −
~ 1 (5-10)
with steady-state Kalman gain ) 1
( + −
= PH HPH R
K T T (5-11)
is asymptotically stable.
(Proof)
Define D by R = DDT .
R>0 implies that D ≠ 0. Then, there exists an M that holds H=DM.
) ,
(A G Q reachable implies n Q G A zI
rank[ − ]= . (5-12)
(Suppose that rank[zI − A G Q]≠ n, then there exists an n-dimensional non-zero vector q such that q[zI − A G Q]= 0, that is, qA=zq and qG Q = 0. These equations may be expanded to
2 2
0
0 qAG Q zqG Q
qA G Q zqAG Q z qG Q
= =
= = =
⋅
⋅ resulting in ⋅
0 ] ,
, ,
[ ) ,
(A G Q = q G Q AG Q ⋅⋅⋅ A −1G Q =
qC n .
This contradicts to the assumption that (A, G Q) is reachable.) Eq. (5-12) may be expanded to
].
, ,
[
0 0 0
0 0 ]
, ,
[
] , ,
[
LD Q G LH A
zI rank
I M
I I LD Q G A zI rank
LD Q G A zI rank n
+
−
=
⎥⎥
⎥
⎦
⎤
⎢⎢
⎢
⎣
⎡
−
=
−
=
This implies that ((A− LH),[G Q, LD]) is reachable.
To prove necessity, let gain L define a suboptimal estimate as in the proof of Theorem 5-1, with (A-LH) asymptotically stable. By Theorem 5-1, (A, H) detectable implies
ˆkL x
P
Pk(−) → with P bounded and at least positive semidefinite. But E xk( )− 2 ≤E xkL 2 for all L because of the optimality of the Kalman filter. Hence, system A(I-KH) is also asymptotically stable with
) 1
( + −
= PH HPH R
K T T .
Define L′= AK. Then we can write the algebraic Riccati equation as
. ] ][
[ ) (
) (
) ( )
( ) (
T T
T T T
T T
D L Q G D L Q G H
L A P H L A
G Q Q G L
DD L H
L A P H L A P
′ + ′
− ′
− ′
=
′ + + ′
− ′
− ′
= (5-13)
We know that P is an at least positive semidefinite solution of Eq. (5-13). But Eq. (5-13) is also a Lyapunov equation, for which we know that (A− L′H) is stable (according to the Lyapunov Theorem) and also that the pair ((A−L′H),[G Q, L′D]) is reachable (shown above). So the solution P is also unique and positive definite, and the gain K = PHT(HPHT + R)−1 is uniquely defined.
(Lyapunov Theorem: (Ref. Panos J. Antsaklis and Anthony N. Michel, Linear Systems)
If there is a positive definite and symmetric matrix X and a positive definite and symmetric matrix Q satisfying ,
T 0
A XA− + =X Q , (Lyapunov Equation)
then the matrix A is stable. Conversely, if A is stable, then, given any symmetric matrix Q, the above Lyapunov equation has a unique solution, and if Q is positive definite then X is positive definite.)
To show sufficiency, note that if A(I-KH) is asymptotically stable, there is an L=AK for which the
system (A-LH) is stable and hence the pair (A, H) is detectable. Q.E.D.
In summary, Theorem 5-2 says that if the state is reachable by the process noise, so that every mode is excited by , then the Kalman filter is asymptotically stable if (A, H) is detectable.
Thus, we can guarantee a stable filter by selecting the measurement matrix H correctly and ensuring that the process model is sufficiently corrupted by noise!
wk