Вы находитесь на странице: 1из 5

An introductionto Kalmanfilters

by G GDean
Establishment,
Malvern, Worcs
RoyalSignalsResearch

Kalmanfilters are a powerful toolfor reductngtheeffectsof noisein


measurements.This paper gives a no-nonsenseintroduction to the
subjectfor peoplewith A'level maths.The basicideasof Settingbetter
aresimply introduced.Thereafter,
esti'mates
from many measurements
gralually
developed,
ustng worked examples,to a full
are
the basiu
Kaltnan filter. Whereverpossible, variations, simplifications,and
to
applicqtionsareBivenin thehopethat the readerwill be encouraged
techniques.
isi Kalmanfilter
A Kalman fiiter is a method of
estimating the true value of a set of
vanablesfrom a set of noisy measure_
ments. (Although continuoustime Kalman filters are possible, the sampled
signal - or discrete Kalman filter is
eisier both to understand and implement). Let me start with a simple
exampie.
Supposeyou have a set of voltage
ofa DC voltagelevelwith
measurements
noise, and that you wish
suDerimposed
to determinethe tlue DC level.
Let the measurementof the unknown
voltageat time i be ),.
Now, assumethat Youalreadyhave a
goodestimateofwhat the DC levelis at
aimei - this is i'.
Ir can be shownthat the bestestimate
of the variable(i e, our D C level)at time
(i+1) is given by a weightedmean:
iia=(l-

nii+ Kyi+t

'

where K is some constant,


digitalfiltersFi8 I
lI you understand
may be of someassistance
This meansthat the new estimateof
the variable at time (t+1) is made up
partly from the previous estimate of
whai the value should be, and partly
from the measuredvalue at time (l+1).

The constant, K, tells us how much


notice to take of the new estimates
compared with the old estimate. If we
think the old estimatewas rather poor
then we would wish to take more notice
In thiscaseKwill be
ofthe newestimate.
closeto 1. Alternately we may consider
the new estimate to be Poor and
consequently( wiil be very small. (This
technique was actually known before
Kalmanandis calleda weightedmean.)
Kalmangivesusa methodforcalculating l(. Note that K is not a true constant
as it can changefrom measutementto
measurement-However. to avoid complication,we shalljust considerconstant
i: filteis (sometimesknown as wiener
filters).
The Wiener filter for the noisy D!
level turns out to act rather like a single
capacitor-rcsistorsmoother, whele K
determines the time constant. If you
wishedto buiid such a filter K could be
found by trial and error. The smallet K
is. the larqer the (ime constant.
A note

complicated

track. What would be the best way of


estrmatinqits speedand Position?
To designa Kalman filter, we first of
all need to rnodel the physicalprocess
This is to enable us to
mathematicaLly.
estimatewhat the valuesof the required
variableswill be. basedupon our estimatesof their current valuesIn the example.supposethe estimates
of the train's posiiion and velocity are i
andi respectively.From our knowledge
of the equationsofmotion we expectthe
positronat rhenexl inslantto be i ii Al
(re. new position = 01d position +
velocity x time). If .-we qs-s!ms,no
accelera(ionin this model rhen the
wtll be the
velociivrt the new Dosttron
.,-e i's itrai at ttie ii-d-- i.
For Kalman filters this is usually
written io matrix form:

l;l. li il[;],

Rewriting this. using capital letters to


deno{evectorsor matrices:
*i*t,,-QiXi,i

case

Now considera slightly more complicated case. Suppose you .have noisy
of the speedand position
measurements
of a train travelling along a straight

Garlield Deai'was educated at Oueen's Coliege,


Taunton before winning a scholarship 1o Jes!s
College. Cambridge from which he graduated in
E l e c t r i c a lE n g i n e e r i n gi n 1 9 8 3 . D u r i n g t h e n e x t y e a r
h e w o r k e d f o r G E CA v i o n i c s o n a c o m p l e x s i m u l a t i o n
.eqliring Kalman filters. He now works as a iunior
researchfellow for the Civil Aviation Authority at
R S R E ,G t M a l v e r n , a n d i s p u r s u i n g a p a r t t i m e P h D
w i t h B r u n e l U n i v e r s i t yi n A r t i f i c i a lI n t e l l i g e n c ea p p l i e d
to air traffic control.

.*;*17,is the (i+l)rh estimateof all the


variables we are interested in, using
info'rmationup to time i. Thesevariables
are called the state variables as they
describethe state of the systemwe are
interestedin. Xis calledthe statevector.
Oi is calledthe StateTransitionMatrix
and this describesthe way we expectthe
state variables to change from time
instant; to (i+1).
Next we get some measurementsat
time (i+1). Call thesemeasurementli+r
and ir+l (measuremencof the train's
position and velocity respectively),
which haveto be in the samedirectionas
our estimatesof position and velocity.

lil,.,

can now be consideredasa singlevector


Y,+1. In a similar way to the single
tvteasurement ' Contror. Voluie

r9. rvlarch 1986

69

Dean
the true voltagecan be obtained by
Ti.rt
K is someconstantto be decided.
The vilrirnce P,*' of the new estimateii+r is then givenby
4*r:E'[(i,*
FiBI

Digitalfiher lom oJ simpleKalman fiher

variable case we can use a weighted


meanioget the bestestimateoftbe stat
variablesup to time l+1:
tl

1r
I
i

'

*i* tli. F U - K) ni

it+tlt=iiliill+iiti

r'itla+2"

it*r,,=ir,+in

i+lii+KY i*l

ii*ui=iiti

where 1 is the identity matix


K is a 2x2 matrix
It may help at this stageto write out
the matdcesin full in order to seewhat
is going on. If the measurementof
speed and position are independent,
you find that the 1< matrix is of the
form:

ft ,(, ' o ll
Lo KzJ
In this casethe equationslook rather
like two sets of those derived in the
voltage problem describedearlier:
ii+r/,+r = (1-K1)(ii+ii
i4111*1= (I-K2)ii
Estrmate
of
variable
using

Estimateof
variables
using old
values

L,

+ KJi*l
* Kzii*t
Measurement
of new
variable

fr rr rarr'r:l [r]
Q - l o 1 ^ t I x , = l rI
Loo l
I,
Lil,
70

Lt

This allowsfor the effectsofconstant


accelerationon the position and velocity of the train.
Unforrunately we
only have
measuremenrs
oI posrtionano velocltvso we need to denve a measureof
acceleratioo. This is easilv done bv
taking diffe.encesof the best estimates
of velocities.
ln some caseswe will not be able to
measure values of the state va ables
directly. However, we will have sufficient measurementsto allow the values
of the state va ables to be indirectly
calculated.
To allow for this Kalman introduced
a measurementmatrix, I{. This converts statevariable data into equivalent
valuesof rneasureddata, ie llx has the
sameunits and form as Y.
Also in lhis case you find rhe Kalman saln malllx /( ts no lonqersouare.
* ia ti+F X i* vi + K(Y i* r H,, tX i * u,)

you
state variables themselves and how
they behave before wondering what the
matdces do,

When,(is not conslar


So far r( has been assumedto be
constant.For a full Kalman filter this is
not really true. Consider voltage
measurementagain. Supposethere are
two independentestimatesof the vol
tage, ii and ]!rt and these estimates
have variances4 and Rr+I. (Perhapsii
is the result of previous experiments
and yi+l is a cudent measuredvalue.)
As stated earlier, a better estimate of

Msasurement+ Control,Volume19,Ntarch1986

+K:E[(],-E(tr* r))rl
+2Q- rqKE[(it-E(i))
x (-v,*, -E(1,* r))j

(&)'
2

values
Theoretically,ii+t/r+r will be a better
estimate of ii+1, the true value, than
the measutement);+1.
At this point you might wonder how
we get the first estimateof positionand
velocity. It is noimally just the first
measuredvalues.afterwards,the filter
descnbed above can be used. Once
asain values for K,, K' can be-tEGF
mrneoDv exDenmenl.
Returning to the State Tnnsition
Matrix, C, we can consider a more
advancedcase.For the caseof the train
we could assumein our model that the
train can accelerateuniformly.
In this case/i and X, will changeto:

This is the standard formula for the


varianceof.\'i+r. where E(ii+r) is the
expectedvllue. or mean of,ir*t. ExpandingP,*1gives
pr+r=(t,/()rE[(ir-E(ii):]

Now:

i,*11;*y= *,* n1 K(Y 1*r- *,* r)


"^.

I - Efr'* r) ):]

If ii and ,r'rare independent.the cross


conelationterm is zero. Then:
4*r=(l-K)rpi+(:R,r

for ii+r, find


To get the best e^stimate
the minimlm of Pi*r by setting
dPi+r _o
AK
TU!{r,/s-----.-r
r
l

l._ P, I

l ' ' - p , + n , * ,I
and

",.,=j'R:.' =1t-*)",
ln other words, if tr is given the value

F,
4+R,*t'
the varianceof the new estimateii+l is
minimised. We know the variance of
this estimateto be P,*,=(1-lr.')fl, so if
anothei measurement.yi+r, is made
this pan be combined with ,t,+r to give
ri+2; an even better esiimate of the
volmge.
When the statevector has more than
one term, the maths is essentiallythe
same, but trickier. Without going into
details, it can be shown that for best
results1( variesand is given by:
Kur,*r= P,*rfllr,
x (rI,+1Pi*r/i4,1r+R,+r)-'

,(, P, H and R are matrices


( )r meansmatrix transposition
( ) I meansmatrix inversion
If 11 is the identity matrix this simplifies to
K,rv,*r:P,*r/l(Pi*ri+R,rr)-r
This was the value given tor r( in rhe
voltageexample.
As can be seentwo more matrices.P
and R, have been introduced. R is a

?ri +lrn <aWA++0.,x445. h.i|.q aoucrirrr(r M4l.)X

Dean
c o - v l r i i u r c c m r L t r i xo f t h e l i k e l v
i n t h c r r e i r : J L l r e dv u l u e s l i
other

Liinedby

1:;"lt*t

worls. thc leudirgditgonalof R contrins tha vlrfiilncc of the mcasured


values. Tcrms off the leading cliilgontl
i r e c o - v i r r i a n c e \b e l \ r c e n t h e m e a s u r e d

lerl.
lerv esti-

vaiucs.
For crilmplc. if I itnd .t were meitsured n \\'ould hc
R.l
fR,
t
l
Rr
LR,
I

r fof lhe
L )i s t h e

\ o^a,s rr;s.,
*-.\t
r-t*;\"

R r i s I h c v a r i u n clen t b e . ! r e a d i n g
=E{(-r-.)r}
Rr is the variilncein-the j readins

=E1ri i)ri

R. is fhc covrrianccof the _r and i


readrngs

ie R: is the extentto whicherrorsin r


effecterrorsin i and viceversa.
In an ideal system P is the best
estiI'lateol thc co varianceof the state
variables.lf H is the identitv nrarrix
then the r.rtioof vxluesin the F matrix
to the lillues in the R matrix is lhe
riLtioof inlprovcnlentin variancethat
the Kalmln filter hasmade.For exilmp l e ,i f

find
,,1.

^=
lf:f:I '=li: ;il
ie for the original tmin example
j

r rliuc

Rl

Fig 2

Fitter h.ith the wriable

withlelli: {From 40r,,4r ,, rnd rhcn PLr


is Lirri\ed..From Pr r. P: I rnd then P,,
is derived... eIc.) Using the valueof
the inrrrJl.n m.rtn\ \il ofi;n .iTtice
srncerne r m tfl\ uJuillv converBes
to
It5 true Jequence.ot
\alues.\ef\ quickl!. 11o\{ever,
rt toe 'l- matnx ts not the
same.size.as
the R matrix (becausell is
not.theidentitymatrix).the.[u:iryi
#]v

Forrunately.
thiseffectis very rare and
ersy to c;rrect by increasingthe e
mxtrix coefficients.
pleasedo not let rhe aboveproblems
put you otT too rnuch,For most cases
the limitationsonly resultin a slightly
degradedp.,rf,rrmrrceof a rdthergood
filtler: howr.-ver.orher tvpes of filt;ring
should not be forgorien. To ctarif!
\r,hathas beenstatedso far therenow
followsa workedexample:analvsing
a
chemicalreactionA first orderchenicalreactionis one
thilt obeysthe equation

Althoughvaluesin the P matrix are


lree to cbange with time. in manv
situationsthcy se le down and are
almost constant.If the P matrix is
constantthen the ( matrixwill elsobe
c o n \ r r n irl ( J \ i s r . u . r l l vr h ec l s ( ) t h cl /
r n J R m r t r i r e :r r ( ( , , ; . l . l n r .
This justifies the use of consrant (
filters(ixplaiuedelrlier) for manv aoplcrrrons.
A block diagram of rhe filrer with
the variable ,( matrix is shown in
Fig. ?.

i=-kx
wherer is the amount-of unreacted
chemical
i is the rate of reaction
k is the .rateconstant'

ls roe lmprovemenr lo 'I vanance

E
Rr,
;_ ls Ine lmprovement tn.r varlaDce

j ' . _ . 1 5

tc: ol
l'..oii

rR;can be quessed from our knorvledse


ol th sYstem.
P,+ri is actuaily propagated from previous P v.llucs usinq the equations:

r. give

ie than
rllv the
ng into
or best

Q o +ur-

P,,,.,,; (l - K1*1H
;,1)P,a,;

t)li'l
1''i',;..,
ton

simpli-

ln the

' i c e sP
.
R i s a

P,,,,,:Q,P,,,Q,r+e,

t,qt

th-rr hr\'c b!'cn lrureLl bv ., nor h-in


c
trul) rctlr(iLntrlr\c ul tJl(,r.Lunl. Irr
the ..rmpl. c.r\( ot !ulri,:e m<.tjul;
mc1I. oc\cfrDqd c.rrllcL. u \t,h (l he
c : 1 . . ( l h . , ! . t ( r n \ v 1 \ r n o d e i ' e dD ( r l c c r .

I_llt"-@

LnJ-?-G, (lq;ia

r q . , l r i c c .\ i r ) , J t l r ( m ( . r . J r e m i n l r L l \
' : n p l c : , r r Jt h r \ y \ t e m J r J n o r c h r g e
s lh rrm(. Wirh rrrr rr:ir <rrmole r.r
m ' v r e l r r " \ r I l l h C u n c < r t d l n t \r n r h ,

"r ldelncss,rTlFliiiillT
itr.1ir]hrne\s
n.p! P (and dicriiurc A) trom rending
torrJrdr lurlr rlrrn. mlqy rg,"surei
ntcnlsnJve oeenDlade
The P ntatri{ has to be inrtixliscd

k rutrbi.

some timitations

T h < s o l u t i o nt o t h L e q u a t r o ni s
-r=,li) exp (-ft)
,Y,r is the initial
amoun!of chemical (This is a similar
equation to discharginga capacitor,
where-r is voltrge and t is CR )
Assumethar onlv noisy valueso{ .r
can be measuredat regularintervais
but estimltesof -i are also fequiredat
each inleryal (perhapsto get valuesfor

To form a Kalman filter for this


At thisstagesomelimitationsshould
systemit is first necssary
to decidethe
be pointed 6ut. Firstly, the noise on
strte v,rii,bler'In thiscr.e
the me_r,ured
-ignrr ind
llrr 1-.re-r-r;
noireJ-rercrumedlo be lppro\i-n.rrel\
|r I
Jnd /ero meJn. [t d con:rJnt
_eJu\stJn
L
| ' rI
error rs prc\enlon the m<Jsrrred
,ign!
(or slstem model) tlten nu amounrof
monitorsall the essentiaifeaturesot
filtering will reduce this fixed err'or.Tn
the system, and is therefore the obpracticethe noise is assumedto be
viouschoice.
gaussian
whetherit is or not. Secondly.
Next the svstemequationhas to be
the systemshouldbe linear,ie ifall the
linearised.The equationfor the chesYstenlnputsdouble.then all the outmical reactionis definitelynot linear;
p u l . d o u b l e :h o w e \ e f .m J n y s \ , r e m . h o u e r e r . t h c I i n e r L r 5 d r i onne c e < r a rf ,yr -r - ' , 1\
''tn br 3ppro)irmrre
Ld
oJ i r n e , r . \ . r e m l o r i r K r . m r n a i l t e rc r n b e r c n i e v e i\
o\cr rh< rJngeor intcre,r.I-;ri-;f
u.rng ( Firsf 5,.1st0y,v.ont*'/ ) ,
hrrd.v.-;;
rr r.
t4etsl'a4^'t
assunred thit y.; i;;;
l/.Ctoc,i tV
co-vilflrnces of errors rn the svstem, ir"+l=t,+i,, Ar and -i.+l=-(,
"
which
this
modcls the
system u,
.you almost tertarnh do not_

'.j1.:ir!1. (or pesrimrsric)ir=xo(l-k4, ie as a tinJa.syst.m.

g!.Y!;:
u e \ .o r t n e c o . \ l l r n c c \ c . r nb < u . e d .
f i n J I l t . i t i ( f ' o . \ i b l ef o r r h c t r l l e r r o
becomeunstable.In this case the P
matrix has some negativeterms that
\rcep inrJ ir. OJireor,(n rhi\ r. b.-c . r r r sreh e Q m . r r r r rh r . n u r h : d t c r c e
enuugh \rlUe\. or beL.rU.ec|mpul;r
r ' . r l c u l u t r ohn. r. r en o r b e e n . r r t i i i c n t l v
accurate(too ferv bits have been used
to describea floatingpoint nuober).

1 N B f h e e x p r n s i o ro l e , < p{ j t r r
I tr rt(r is.mrli.1
Expressing
thisxs matrices:

rs

f- | - i t ar'l f.,l
I.tl
lO r I l.]
^t')-u
t ^t
A better system model allows j ro"
chinge. Srncei is proportionalio _r

f v l e a s u r e m e n+t C o n v { t , V o t l m e 1 9 , M a r c h 1 9 8 6

\ /

J]fu|.d X

= -K1,

7i

Dean
Art o- =

itr ^t)1'

_ t t : _ '+- 4 + t \ ^ Lu
;

\'4

l'\

t4'

* l-n, Av
7,1
7-

ttme
Fig J,

x " - . - - v " - 5 5h,tded


u 7 e d ar,
a n ,t. t of
o l the
t l t e era])h)
grapnt
,
i

then:

tlecausethen
It i
'-."=
'"
Ii|

It folLowsthat:

( x ) ' " , , = ( " . j x1


"

&.*,*'s,.ti,+t^-

Sincei hds been improved. rhe model

?67f-rn-Ee--impro' eA. craphice)'


QtSt",LSl^a*
i" r=(I - |1)j, mighrlooktikeiig l.
-usrng-1be-trdpczum
/"1 1o
t
+le-.s.!j:l!!!ls
/ \ -Sl_!Ierrea is ( I +F 2)l{t(more rccur;le ;a-eia6lrate-menres can m.rke
{
"*r
|
useof J exp(-tr) dt). Puftinsrhis
\
\

.:\

extended model in terms or mafflces:

f'],- _
- f L i r + s r : )l t I [ x " l

't
T

Q s
J r
irli'

:".,/.j

Ltl

l o 1 r + p r J L r "l

Even thoughonly y,+j, the amountof


chemical,is measureda 'measurement
value' for the rate can be deived as

. .=; -.J::tar-Ll
AI

This means that the rate observed is


the best estimate of the rate plus an
'efror velocity'whichis the difference
between the measured and expected
values,dividedby time.
with measured' vaiues for both _!
and i then the F1matrix becomes

'

fr ol
l0 1l

Sincethe 0 matrix is a co-variance


s i l lb e
m a t r i xi t sv r l u e w

L_r
l

r,,

I
V

;i1t2.

tn D .71
'

vector
o ' ) ' . =( + r " ! ! J * . measurement
xn '
y=|.'l

r,Af

set (,. **)

which has rhe same units as the

=(1+p).r,

t lod-!J,-

n:r i.i (the .rccurrc)in me3\u ng'


rhe-r.rtr oi_rmctron)'.lts v.,lue-can
6-.
found approxim.ltelyfaom the vadance
of (.r,,rl-.r,,)/A/in experiments.
R', crn be set to any vahe between
Oft;n there is lirtle
o ani.v?"lTaco-variance between measurements
will be
and 0 is used.This assumption
usedhcre,despiteits inaccuracy.
ln the chemicalexampleR11and Rr2
would stay constantwith time if the
accuracyof measuringthe amount of
chemical..r, staYsconstant.
.
The O matrix is used to determine
br h,'w-mucii-rhani6dei
mi.rioresenr:
rhe s!\tem. Wirh a pertecrmodel ?
be zero,but in praccouldtheofetically
tice it is srill best to have some small
values present to prevent the filter
./ beconringunclible ln the,firstsvsLeln
j is
! I I model there ts tnaccuractbecause
/ con\linl ano ine rale ot cnangeot
rate (acceleralton)has not been
I -tn6fiAfi6i-Oier-rie-fiiF-nErl5-d-?
/
l
' the exrent of the error in rate will
be

For a wiener filter a fixed value K


matrix could no* u".troien uy
"*l"ri'action
mentation. lf this course of
is
chosen a usetul technique is to vary
only one K matrir vai""1"tr " i""pi"!
the others set to one, and then to
repeat this procedure for all the K
values. (In the case of large marrices
o n l y t e r m s o n t h e l e a d i n qd i a s o n r l
need ro be looked at. This sihoutdsave
time. usuaily at little cost in terms of
performanie.)
This procedure allows each K value
to be optimised and helps to show the
important or sensitiveparts of the
systetumodelling.
A wiener filler rs usedwhen the 0
and R malrix vilues do nol chanee
signifn'anit1-with
rimT.ln 'freche-"il6
e\perrmenl e\dmple (, and R do
change.bu( a Wienerlilreris srill likel\
to be e{fective. For the full Kalman
filter the q and R matricesneed to be
found as functionsoftime.
R in this exampie has four componenrs
lR,,
|"

R,,l
"' I

by symmetry Rlz=R:r
Rx !q-(tb-e,.4qqurqcy
i{r.Fq49ullgthe
amount of chmicary ie ir is the
varianceofy iihd itriiild be knorvn by
experiment.

, r -^<l

o= I ( ?)

I o

?"ttnY

0 /1"

vLLo;1

(aAr)' 1

k\Pl2)2.is the variancein.t causedby


mismatchingthe systempropagationof
x'
(44': is the variance in i causedby
mismatchingin the systemmodel of-i;
a is given by
'. *
-:..1,l d,
la".
ad\
;-*
(
f
x
)
=
/
(
:
r
k
r
r
| :.=
. += .
I
o,
0,
,1,
I
l:-.
_0,
*
|
,
If k is approximately
known (either
from previous knowledge, or from
,i(=-il-t) then so is 0 at any instant.
with time, sowillthe 0
Asa decreases
matrx values.
As well 3. needtngthe 0 and R \
mtrrices. some inirialisarionis re- \
quired. r,i , and .r,, sill be fou;d fro;r I
lhe tlrst lwo mrasuremenL\
a\4 tw I
\rill be .er t9_&. unlessprior intorma./
tion is availtble to give the 't and .
v-aiuesat the start of measurements.
P676would then be set to the covariance of the values found from tbe
pnor inlofmrtion.
The filter will now work simply by
putting the matrix and vector values
i n r o t h e K a l m a ne q u a l i o n s .
The type of Katman filter descdbed
here is oflen used, and a computarionally more etficient and simpler way
of implemenring it is calied rhe a-f
filter. A furrher exrensionto the a-l
filter which nllows for uniform accet"
eration is called the a-d-], filter.

,Dean
n . measunng'
i viilue can be
lt the variance
,ments,
value between
there is little
measulements
mption will be
'le Rrr and R22
th time iI the
rhe amount of
lnt,
.i to determine
I misrepresenls
.tect model 0
'ro, but rn Prac_
:rve some small
!en! the filter
rhe tlrst system
cv becausei is
' of change of
ras not been
lime period Al
in rate will be
rs a co-vanance
.-l

I
.r: I

e in it causedbY
L1propagationof
in -r causedbY
:em modelof i;

l) known (eilher
ledge, or from
? at any instant
me, so will the I
lg the O and fi
ialisation is re'
.iLl be found fiom
rements and Po/o
.ss prior infsmasive the i and 'i
Jf measurements.
r set to the cois found from the
v work simplY bY
.lnd vector values
rtions.
irn filtet described
ancl a comPulan rnd simPlerway
i\ called the 4-p
rensionto the a-P
ior uniform accel_
irl-7 filter.

The adaptive Kalman tilter


There ilte several extensionsto the
Kalman filter: ooe of these is the
adaptivc Killmiln tilter.
Supposc you are trviog to track an
aircraft which suddenlystartsand stops
manoeuvring.How can you besttrack
the aircrafl? More generally, if you
hrve a systemwhich can unexpectedly
change in some way (eg the measurenoisieror
mentsbecomeunpredictably
the systcmmodel becomesmismatched
from rerlity) then some method for
rapidly adaptingthe K matrix to the
new situntionis needed.even though
the exact nature of ,ahesystemchange
may not be known.
In the adaptive filter. the O matrix
valuesare increasedat times of greater
uncertaintyin the situation.The times
at which the O matrix shouldbe increased,can be found by examiningthe
(Y-HX) tern (known as the innovations term). When the svstemis well
matched the ( Y-FlXl values shouiq
have a distribution that approximates

]F-l.ffidirtr.relmd

variance,when this variancestarlsto


worse it indicates that the
Gi66i
systemis being mismodelledand so O
should be increased.This should improve the Kalman filter performance
whilst the system is uncertain (the
aircraft is manoeuvring).UnfortunateIv, high Q metrix valuesgive poorer
resultswrtn a well Xnown svstemOf
arrcrartr,
equalrons(non-manoeuvrrng
idi6mE-riethod of reducing O matrix
values is also required. This is trickier
since the innovations term will stay
high in value with a large O matrix
whether the systemis well matchedor
not. In this case some other aspectof
the systemwill have to be examinedto
determine when the P matrix can be
decreased.For example, a time Iimit
can be placed on the system change
(manoeuvre). (In the case of a manoeuvring aircraft if the last few points
have been roughly on a straight line
then the aircraft is deemed to have
stoppedmanoeuvringand the 0 matrix
can be reducedaccordingly.)

Some examples of Kalman filtering


in useare: the trackingof manoeuvring
aircraft and satellites. riLnging of
targets from aircraft and the improvement of Inertial Navigation Systems
(lNS) in aircraft where raw INS data
and doppler velocity measurementsare
combined.
Eibliography
Lastly, for those that may have been
encouragedto look for more information, a shortbibliography.
7 ?ractical Computing. April 1983.
This is a very simpleintroduction,but
worth reading. It also gives a BASIC
Kalman filter program.
2 Technica[Memo Awl8. Royal AirEstablishment, Farnborough,
cnft
Hants. This has an excellentexposition
of ihe Kalman filter and clearly derives
and shows how to use an alpha beta
tracker.
3 Optimal Fike nB by Ande$on and
I\,toore.This is a university mathematician s guide to Kalman filters, and
therefore gives far more detail than
many may want, A good referenc
book.

4 'New Res lts in Linear Filtering


and Prediction bY Kalman and BucY
(1961). Jounntl of BtLsic Engineering
(ASME) Vol tl3-D PP 95-108.This is
the original(inlrrclabte?)mathematics
and is best avoided.
5 'PerformnnceAnalysis of a Particu_
larly Simple Kalman Filter' by Peter
M^ibeck. Jouna! of Guidance and
ControlVol l. No 6, Nov-Dec 1978 A
reasonableintroduction to real applications of Kalman Filters.
6 'The trackingindex'bYP R Kalata.
IEEE Transaclionson Aerospaceand.
Electronic Swte,ls Vol AES20, No 2,
March 1984.Although a little tricky to
follow, this introduces some cunning
adviceto help with an a-P tr^cker.

Acknowledgements
t would like to thank CEC Avionics
who taught me the basicsof Kalman
filtering, and in particular Glyn Thomas,my mentor.Also I would like to
thank Bill Strettonof the Civil Aviation Authority and RSRE for encouragingme to publish this article.

APPEIIDIXA
Collectionof the Kalman filrer equations:
Prediction;

Pi*ui=QiPttiQtr+Qi
Measurementl
K,, t,i*,= F,*,H i*tr(Hi*,4*r,H,*,r+R,*,)-I
F;, n1,;Q - K,* y,* rH1*)F ;* y1
Predictionstagesestimatethe fufure valuesof the statevector,Measurcment
stagesestimatethe current valuesof the statevector.
If a measurement
is missedrhenin place;f the measuremenl
equalions
-f,+t/,+tis set to i,+ui
f*,,r*, is set to P,*,r,

InstitutePublications
A wide range of monographs and conferenceproceedingsis published by
The Institute of Measurement and Control.
A publications list, or detailed contents of particular titles, can be obtained trom
the PublicationsDepartmentat 87 Gower Street, London WClE 644 (Tel: 01-3874949)

Meassrement + Conlrol, Volume 19, Ma.ch 1986

73

Вам также может понравиться