Graphics Programs Reference
In-Depth Information
k 1
k 2
k 3
C 11
C 12
C 1 3
1
=
--------------------
(9.160)
σ 2
C 11
+
Eq. (9.160) indicates that the first gain coefficient depends on the estimation
error variance of the total residual variance, while the other two gain coeffi-
cients are calculated through the covariances between the second and third
states and the first observed state.
MATLAB Function Ðkalman_filter.mÑ
The function Ðkalman_filter.mÑ implements a state Singer- Kalman fil-
ter. It is given in Listing 9.4 in Section 9.11. The syntax is as follows:
αβγ
[residual, estimate] = kalman_filter(npts, T, X0, inp, R, nvar)
where
Symbol
Description
Status
npts
number of points in input position
input
T
sampling interval
input
X0
initial state vector
input
inp
input array
input
R
noise variance see Eq. (9-129)
input
nvar
desired state noise variance
input
residual
array of position error (residual)
output
estimate
array of predicted position
output
Note that Ðkalman_filter.mÑ uses MATLABÓs function Ðnormrnd.mÑ to gener-
ate zero mean Gaussian noise, which is part of MATLABÓs Statistics Toolbox.
To illustrate how to use the functions Ð kalman_filter.mÑ, consider the inputs
shown in Figs. 9.22 and 9.23. Figs. 9.29 and 9.30 show the residual error and
predicted position corresponding to Figs. 9.22 and 9.23. These plots can be
reproduced using the program Ðfig9_28.mÑ given in Listing 9.5 in Section
9.11 .
Search WWH ::




Custom Search