175
XYStt???t
I. IKTRODCCTIOX
+
+
= cpzi
rui
(1)
HE OPTIMUM filtering result,s of Kalman a.nd B U C ~
[l], [ a ] for linear dynamic systems require an exact
zi = HZ; ~i
(2)
knowledge of the process noise covariance matrix Q and
the measurement noise covariance ma,trix R. I n a number where x, is 7% X 1 state vector, 9 is n X n nonsingular
of practical situations, Q and R are either unknown or are transition matrix, r is n X q const.ant input matrix, zi
is T X 1 measurement vector, and H is r X 77. constant
knownonlyapproximately.Heffes
[3] andKishimura
[4] have considered the effect of errors in Q and R on the output matrix.
The sequences ui(q X 1) and vi(r X 1) are uncorreperformance of the optimal filter. Several other investilated
Gaussian white noise sequences n-ith means and cogators [5+[9] have proposed on-line schemes to identify
variances
as follows :
Q a.nd R. Most of these schemes do well in identifying R
but run into diaculties in ident.ifying Q. Moreover, their
E ( u ; ) = 0; E(uiujT]= Q S ,
extension to continuous cases is not clear. A different
E { v ~=) 0; E ( v , v , ~ =
] R&j
approach ha.s been taken in this paper. It is assumed that
the system under consideration is time invariant, comE (u,$'} = 0, for all i,j
pletely controllable, and observable [a]. Both the system
andthe filter (optimal or suboptinlal)areassumed
to where E { denotes the expectation, and 6 i j denotes the
have reached steady-state conditions. First, a correla.tion Kronecker delta function.
Q and R are bounded positive definite matrices (Q > 0,
test is performed on the filt.er to check whether it is workR
> 0). Initial state zo is normally distributed with zero
ing optimally or not. The t.est is based on the innovation
property of an optimal filter [lo]. If the filter is subopti- mean and covariance Po.
The system is assumed to be completely observable and
mal, the auto-correlation function
of the innovationprocess
controllable,
i.e.,
is used to obtain asymptotically unbiased and consistent
estimates of Q and R. The met,hod hasthe linut,a.tionthat
rank CHT,( H @ T,
)
(Han-')'1 = 72
a }
--
e,
rank Lr,@r,-.,cpn-lr]
= n.
Filter
Let
(Qo
Qo
of
steadythe let
and R
176
KO
matrix)'
+ Bo)-'
&IoHT(HIWd2T
1970
E(vivjTj
(3)
&lo = @
- A ~p
J P (l
Ho
M ~ H T+ R ~ ) - ~ H M ~ +
] WrQorT.
(4)
M o may be recognized as the steady-state solution to the
covariance equations of Kalman [ l ] .
+ vj)'l
E[Hei(He,
T}.
(5)
= Cp&
--
s , ~ } .
E [ v s i _ k T }= HE(eiei-t}HT
+ HE(eivi-;,T), f o r k > 0.
@ ( I- KH)ei-l
+Kuidl
(9)
a OPTIMALF'ILTER~
ei
noise sequence.
proof; A direct proof is obta.ined using the orthogonality
principle of linear estimation C10].3 Let ei = xi - &-I
denote the error in estimating the state.
Then
V ; = Hei
vi
(8)
[ @ ( I- KH)]j-l@Kvi.-J
[ @ ( I- KH)]Iseei-~:
i-1
Statenwnt
For an optimal fdter, the sequence vi = (zi - H&-d,
k0n.n as the innovation sequence, is a Gaussian white
+ vi
Hei
E{vivjT}= E [ (Hei
- H2ili-1
Is
[ @ ( I- K H ) ] i - l I h - (j 1. 0 )
i=l
E { e i e i A T }= [ @ ( I- K H ) Y N
where iil is the steady-stat,e error covariance ma.tri.. An
expression for $1 is obtaineddirectlyfrom
(9) orfrom
(7) :
iif = $ ( I
- K H ) M ( I - K H ) T @ T+ @KRKTQT+ rQP.
(11)
E(eai-kT} = -[+(I - K H ) I b l @ K R .
177
Therefore,
E(vpi--kT) = H[@((IT- K H ) Y -
- @[,.MHT - K ( H X H T + R )1,
> 0.
When k = 0, E ( v i v i T j = H M H T R.
It. is seen that the autocorrelation funct,ion of v i does
not dependon i. Therefore, vi is ast.ati0na.n.Gaussian
random sequence (Gaussian because of linearity) and we
can define
Ck = E { V i V i A * } .
Then
C/: = H N H T
=
+ R,
h:
Furthermore,
c-, =
> 0.
(12)
( 1 3 ) Fig.
CkT.
Kotice thatthe
opt,imal choice of K , viz. K =
3 f H T ( H 3 f H T I?)- makes Cc vanish for all k # 0 (the
innovation property).
el:,
N
t k =
( l / N ) 2 YjVi-kT
(14)
i=k
pe
( 1 - J;/NJc~.
0. (17)
E{C,I
eo,
r.r.
(15)
fik
l/N
+ 0 ( 1 / N ?()1. 9 )
cov ([l+t:]ij,[?l]pq)e
([~tlip[~t+l-.ljq
Test
Look at a set of values for [&Iij, k > 0 and check the
[ C t + ~ l d C t ~ l j p )( 1 6 ) number of times they lie outside the band f( 1.96/N12).
where [(?kIij denotes the element in the ith row and t,he If this number is less than 5 percent of the total, the
j t h column of the matrix tkand cov (a.,b) denotes the sequence v i is white. (Examples of a nonlvhite and a white
covariance of a and b ; viz.
&
- m
COY
(a$)
E ( [ u- E ( a ) ] [ b- E ( b ) ] } .
178
If the test of Section Tr revea.ls that the filter is suboptimal, the next step will be to obtain better estimates
of Q and R. This can be done using Ck computed ea.rlier.
The method proceeds in t.hree steps.
1) Obtain an estimate of MHT using (13). Rewriting
(13) explicitly,
C1
Therefore
H@'MHT- H@KCo
rcl
+ H@KCo
H@KC1+ HWKCo
LC,
+ H@KC,-1+
M H T = B" Cp
+ H@,"KCo]
I-@.
where
= @X@T
= @[
rank ( B ) = n
and
B + = (BTB)-lBT.
+ n + rQrT
(24)
= @w(@)T
of (X),
+ Q + @rQrTQT
+ rQF.
T
(25)
Repeating the sa.me procedure n times and separating the
terms involving Q on the left-hand side of the equation,
we obtain
k-1
k-1
@jrQrT(@j)T
=M -
@M(@k)T
i=O
@jn(@j)T,
j=O
for k
1
.
(23)
-K H M - &IHTKT + KC&']@'.
Substituting back
for
rel + H @ K ~ ,
80- H ( & f i T ) .
myhere
f2
LH@~-~J
Denoting5 bytheestimate
we can write
B =@ ;
1970
l,...,n . (26)
H @ T Q r T( W
An alternate form for MHT can be obta.ined directly
from (13):
k ) THT =
Hill ( W k ) ' H T
- H@klt;HT
i
d
(22)
k
A
The s ~ m b o -23
l always implies AB
FS B
single symbol.
l,-..,n. (27)
179
Mi) =
@( I -
K1H) (
M 2
simplifying
-
AI,) ( I - K1H)T@T
- @(K1- KO)(HM1HT
+ R )(K1-
Ko)T@T.
(32)
t :LTER
lW2
-x
<0
or
<MI.
M z
we obtain
M 3
B-1
- H@:,$IBT
H@frQrT(@.j--k)THT
= fi$l(@-k)THT
i=O
--
IC-1
H@jfj(@i-k)
THT,
j=O
1,"',12
(28)
where
8&T1 = @ ( I- klH)8.&1(1- I Z I H ) ~ @ ~
If the number of unknowns in Q is more than n X r,
- a(& - Ko)(?o(kl- Ko.!T@T.(34)
or thestructure of Q isunknown, themethod of the
previous section for estimating Q does not work. However,
it is still possible to estimate the opt.ima1 gain KO,by a.n 8.&, can be calcula.ted recursively in the same manner as
JIo is calculated for a Kalnlan filter. For convergence, it
iterative procedure.
Following the notation of Section 11, let KOdenote the is sufficient tha,t @ ( I- k 1 H ) be stable, i.e., all eigenvalues
be inside the unit circle.
initialgain of theIialman filter. L,et M 1 be theerror
3) Obtain &f2fiT a.nd k2 as follows:
covariance mat,rix corresponding to KO.Then 311 sat,isfies
the following equation [cf., (7)]:
&2AT = &lAT
&f41HT
(35)
AI1
K1 3 AIIHT(HXIHT R)-'.
Let the error covariance matrix corresponding to gain
Kl be called &I2.Then
+ K1(H$lzHT + R ) K I ~ ]+@rQrT.
~
(31)
2 2 =
&2BT(HM2BT
(36)
180
1970
For
of
cov
(:YfiP) w K var
+ -4::cov
A?aTfor large N is
( ~ O ) K T
(* [?j)
cn
+ rQrTj
,)I:[(
Expressions for
[ @ ( I- KoH)]j(@K&KoT@T
]=o
C,
+ K cov eo,
@ ( I- KOH)Ml(I - K o H ) T @ T
M1HT =
etc.
cov
5 [@(I
([q ) P
Cn
(I@@)
K a ) ] j r Q r T [ ( I- KJI)TPI~HT.
i=O
+-
JffiT,e0).
00
cov
($k,$d
(l/lV)
pjpj+a-a.
m
-,
or
r 1
(1/2h7)
BjJj+l-.s
j=-(X-l)
cov (I?)
181
I 1,
QO
0.5 0
RO=
lo
0.4 0 ;
o.6] .
0.75
sequence
vi = (2, -
eo,el,- -
.,6k
of the autocorrelation are calculated using
(14). For a typical sample of 950 points, Fig. 1(a) ahom
a plot of the first diagonal element, of fik for k = 0>40.
The 95 percent confidence limits are +0.0636 and four
points lie outside this band (i.e., 10 percent of the tota.1).
Therefore, we reject the hypot.hesis t,hat v i is n-hite. The
E. ,4NUMERICAL
EXAMPLE
FROM
same conclusion is reached by looking at the second diagINERTIAL
KAVIGATION
onal element of PI;.
The results of Sections T and VI are
applied toa da.mped
We now proceed to the ident,ification of Q and R. Since
Schuler loop forced by an exponentiallycorrelated sta- t,he number of unknowns in Q is less than n X r = 10,
tionary random input. Two measurements a.re made on we can identify Q completely. The set of equat,ions (28)
thesystem, bot,h of which arecorruptedby
exponen- gives us alargenumber
of linear equa.tions for G1, &,
tially correlated as well a.s white noise t,ype errors. The and G3. However, the most important of these occur along
state of the syst,em is augment,ed to include all the cor- the diagonal for k = 1 and k = 5.
relat,ed random input,sso that the augmented &ate vector
For k = 1 t.he left-hand side of (28) is
z is 5 x 1, the ra.ndom input vector u is 3 X 1, a.nd the
measurement noise vector v is 3 X 1. The sgstem is
discretized using a timestep of 0.1 andthe result.ant
system mat.rices are
p.73
- 1.74
0.09
0.91
0.95
0.55
0.905
+=
-0.3
-0.0016 0
-0.15
5 the left,-ha.ndside of ( 2 8 ) is
-- 0.008
R = r
0
For k
1.
T2
The actual values of ql, q2, qa, rl, and r2 are unity, but
t.hey are assumed unknown. It is required to identify these
values using n1easurement.s { z i , i = l,Ar].
[12]:
L(Q,R)
s
- ( l / S ) i=l
Z:
viT(HXHT
+ R)
by SchwePPe
- 111 I H M H T
+ R I.
182
1970
IEXE TMSACTIONS
TABLE I
ESTIUTESO F Q -am R BASEDOK A SETOF 950 POINTS
Percentage of
Points Lying
Outside the 95 Percent
Con6dence Limits
Number of
Iterations
?1
0 0.5
!73
71
72
0.25
0.75
0.7310.i761.31
1.444 0.867
1
2
3
0.87
fi
1.40
1.41
1.0
0.91
0.92
1.O
4
Check case
* Estimate of
0.776
0.i7
1.0
0.4
1.565
1.5i3
1.o
Second
h.1easul.e-
First
Likelihood
MeasureFunc$on
Square
Square ment ment
L (Q,R)
(percent)
(percent)
0.6
-5.17
10
-4.67B
10
2.5
0.765
0.7646
1.o
-4.67%
-4.671
-4.669
2.5
2.5
2.5
5 2390
2725
5
5
5
Estimat,e
of -4ctual
h*.lean-
Calculat.ed
h,lean-
Error*
Errori
2915
2755
2720
2714
2712
2720
902
2814
x
4
4
0
2900
mean-square error is
K
(l/lv) z
i-1
(Xi
- .;i i-l)T(Zi - G , L I )
tainedwhere zi is
by actual simulation.
h
t Calculated mean-square error is t r (AT,) There X, is obtained from the variance equation using Q and R [cf. (4)].
h
1.5
Similarly,
q;
J.
........L.....:..................-.
=-.
-. ......;i-""t 0
h : z
0.5
Rb+l
T7
EP + C l l ( k + 1 ) ] ( 2 M l , k
0.d
X. CONTINUOUS
SYSTEM
1.5
..... ........
......9
c. 01
0.d
System
......
1.0
*=Fx+Gu
-..-
0.5
z =
2
Hx+v.
(
4
8
)
Filter
%tch h'.xzber
:
(47)
FP
+ Ko(z - HP)
(49)
where
We now check the optimality of the filter after i d e n a KO = PdY'R0-l
(50)
cation. Fig. 1(b) shows a plot of the &st diagonal element and
of p k , for k = 0140. It is seen that only one point lies
FPo PoF'
GQoG' - P&'Ro-'HPo = 0. (51)
outside the band of 95 percent confidence limits (2.5 percent of the total). This supports the hypothesis that
vi The error covariance P1 is given as
is white.
GQG'
K8KoT = 0.
The a,symptotic convergence of Q and R towards their (8' - K J I ) Pi+ PI( F - KdY)
actual values is s h o r n in Fig. 3. The estimates of Q and
(52)
R are updated after every batch of N points ( N = 950).
In the absence of any knowledge about the variances of Innovation Process
v=z-HP
the estimates, a simple averagingof all the previous values
is performed. This is equiva.lent to the following stochastic
=He+v
(53)
approximation scheme[5] :
where e = ( x - 2 ) . For an optimal filter, v is white with
the same covariance as 4) [lo]. For a suboptimal flter,
'+
d=
(F - Ka)e
+ Gu - Kov
(54)
problem
and
c(T)= E{V(t)VT(t-
183
FILTERlNG
K 2
T)
HE{e(t)eT(t
- T ) )HT
+R ~ ( T ) , > 0
HePtr[PIHT- K&] + R ~ ( T
, ) F f F - KJl.
+ HE{e(t)vT(t-
7))
+ (HP1- RKoT)
- (-iw - FIT)--IHT + R. (56)
S ( W )= H ( ~ w
- Ff)-'(PIHT - K&)
(- l)jHFjGQGTFk-jHT, for
0,1,
j=O
XI. SUMMARY
AND COXCLUSIOKS
The problem of optimal filtering for a linear timeinvariant system with unknown Q (process noise covaria.nce ma.trix) and R (measurement noise covariance mat.rix) is c.onsidered. Ba.sed on the innovation property of
an optima.1filter, a statistical testis given t.0 check whether
a part.icula.r filter is working optimally or not. I n case the
filter is suboptimal, a.n identification scheme is given to
obtain asymptotically unbiased and consistent est.imates
of Q and R. For the case in which the form of Q is unknown ort,he number of unknowns in Q is more than n X P
(nis the dimension of the state vector andr is the dimension of t'he mea.surement vector), the preceding scheme
fails and an a1ternat.e scheme is given to obtain an estimatmeof the optimal ga.in directly without identifying Q.
A numerical example is given t,o illustrate the result,s and
to show the usefulness of the approach. The results a.re
first derived for a discrete system. They are then extended
to continuous systems.
XOMENCLATURE
Matrices
@,I',H,F,G,B,A
K1 = PIHTR-l.
(57)
Q,R,N,P,M1,Pl
Qo,Ro,Jfo,Po
Let PP be the error cova.riance corresponding to K1.
Then it canbe shown that
K,K@l$op, * *
Q,&w,K,.
+ (P2 - P I )( F - K I H )
- ( K I - Ko)R(Kl-
0.
(58)
Therefore
P,
(F - k1H)
(59)
+ 8$1HT
(60)
Then
F,BT = fill?'
System matrices
covariance matrices
initial values of Q,R,M,P
Kalman filter gains
estimated values of Q,R,M,K (caret
over any quantity denotes an
estimate)
autocorrelation function
normalized
autocorrelation
function
power spectral density
increment matrices.5
Vectors
ui,vi
--
8@1+
8~1,8~,8.ii?1,8P
xi,ii+~
( F - &H)
Ck,&,C(T)
S(W)
P3
..
Pkrh
< P1.
(61)
(55)
Let, S ( w ) denote the Fourier t.ransform of C ( T )
( F - K1H) (Pz - P I )
= I;,BT&l
zi
Vi
ei
Scalars
n,q,r
N
Dimension variables
sample size
[Ck]ij
element in the ith row and the jth column of
the matrix Ck
6 ..
i d (. r.) Kroneckerdeltaand the delta function
L(&,R) likelihood function.
184
Operations
E(.)
Expected
value
operator
cov ( ) covarisnce operator
variance operator
var ( - )
( jT
transpose of a matrix
( )
pseudo-inverse ofmatrix
a
a ,
>-
II-II
inverse of a matrix
norm of a mat.rix.
ACKNOTTZEDGMENT
The a,uthor wishes to thank all his colleagues a t The
Anal\-tic Sciences Corporation for their help during the
course of this
research,
and C. L. Bradleyinparticular
.
~.
many stimulating discussions and ideas.
1970
REFERENCES
R.E. Kalman, Kern met.hods and results in linear prediction
and filtering theory, PTOC.Symp. on Engineering Applications
of Random Function Theory
and
Probability. New York:
IViley, 1961.
R. E. Kalmsn and R. S. Bucy, K e a results in linear filtering
and prediction theory, Trans. A S X E , J . BasicEngrg., ser.
I), vol. 8 3 , pp. 95-108, March 1961.
El. Heffes, The effects of erroneous models on the Ihlman
filter response, IEEE Trans. Autmm~icControl (Short Papers),
V O ~ .AC-11, pp. 541-543, July 1966.
T. Sishimura,Error bounds of continuousKalnlan filters
and t.he application to orbit det.erminat,ion problems, IEEE
Trans. Automatic Control, vol. -kc-12, pp. 268-5, June 19ti7.
R. C. K. Lee, 0pt.imal estimation, identificat,ion and cont.lol,
Massachusetts
1nst.itute
of Technology, Cambridge, l h .
?rlono. 28, 1961.
D. T. McGill, 0pt.imal adaptive estimation of sampled
stochast.ic process, St,anford Electronics Labs., Stanford,
Calif., Tech. Rept. SEL-63-143(TR 6 3 0 7 3 ) : December 19ti3.
J. S. Shellenberger, A multivarianceIesrninutechnique
for
improved dynamic system performance, 15& Proc. _\-EC,
vol. 23, pp. 146-151.
G. L. Smit.h, Sequentialestimation
of observation
error
variances in a trajectory est.imat.ionproblem, SldA J., vol.
5, pp. 1964-1970, yovember 19Gi.
R. L. Kashyap, hIaximum likelihood identification of stochastic linearsystems, Purdue University: Lafsyette,Ind.,
Tech. Rept.. TR-EE 68-28, August 1968.
T. Kailath,An innovationsapproach to least-squares estimat.ion, pt. I : linear filtering in additive white noise,! ZEEE
Trans. rlufornatic Coonfrol, vol. AC-13, pp. 646-655,1)ec.ember
1968.