Documentos de Académico
Documentos de Profesional
Documentos de Cultura
u
u = + . (6-59)
If we include range rate as a measurement, the appropriate equation would be
( )
( ) ( ) ( ) ( )
( ) ( )
( )
r
2 2
r v
x k x k z k z k
k k
x k z k
+
= +
+
(6-60)
The reader can substitute the elements of the appropriate x k ( ) vector (for the
constant velocity or constant accretion system model) into the above equations
to express them in terms of their elements. As an example of one of the vector
forms, the measurement vector for the case of range and angle measurement
with the constant velocity system model is
( ) ( ) ( ) ( )
( ) ( )
( ) ( ) ( )
( )
( )
2 2
1 1 3
1
2
3 1
v x x
v
tan x x
k k k
k k k
k
k k
(
+ (
( = + = +
(
(
y x v h (6-61)
where ( ) ( )
1 r
v v k k = and ( ) ( )
2
v v k k
u
= .
Recall that, for purposes of building the Kalman filter we need to
generate the ( ) 1 k + H matrix. For the tracking filter formulation this equation
is as defined in Equation 6-49. For the specific case associated with Equation
6-61 the ( ) 1 k + H becomes
( )
1 1 1 2 1 3 1 4
2 1 2 2 2 3 2 4
1
h x h x h x h x
k
h x h x h x h x
c c c c c c c c (
+ =
(
c c c c c c c c
H (6-62)
where the elements of the matrix are defined by
( ) ( )
( )
( )
( )
( ) ( )
2 2
1 3 1
1 1
2 2
1
1 3
1
x 1 x 1 x 1
x 1
x 1 x 1
k k
k k k k
h x
k
k k k k
+
c + + + +
c c = =
c +
+ + +
x
, (6-63)
( ) ( )
( )
( )
( )
( ) ( )
2 2
1 3 3
1 3
2 2
3
1 3
1
x 1 x 1 x 1
x 1
x 1 x 1
k k
k k k k
h x
k
k k k k
+
c + + + +
c c = =
c +
+ + +
x
, (6-64)
( ) ( ) ( )
( )
( )
( )
( ) ( )
1
3 3 1
2 1
2 2
1 1 3
1
-x 1 tan x 1 x 1
x 1 x 1 x 1
k k
k k k k
h x
k k k k k
+
+ c + +
c c = =
c + + + +
x
, (6-65)
102
( ) ( ) ( )
( )
( )
( )
( ) ( )
1
1 3 1
2 3
2 2
3 1 3
1
x 1 tan x 1 x 1
x 1 x 1 x 1
k k
k k k k
h x
k k k k k
+
+ c + +
c c = =
c + + + +
x
, (6-66)
and the rest of the terms are zero. With the above, we can rewrite ( ) 1 k + H as
( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
( )
( ) ( )
1 3
2 2 2 2
1 3 1 3
3 1
2 2 2 2
1 3 1 3
x 1 x 1
0 0
x 1 x 1 x 1 x 1
1
-x 1 x 1
0 0
x 1 x 1 x 1 x 1
k k k k
k k k k k k k k
k
k k k k
k k k k k k k k
( + +
(
+ + + + + + (
+ =
(
+ + (
(
+ + + + + +
(
H . (6-67)
The derivation of the other forms of ( ) ( )
k x h and ( ) 1 k + H are left as exercises
for the reader.
With the above we are in a position to proceed to the next phase of
designing the Kalman filter. We will consider this through a specific example.
6.3.2 Example 2: Application to a Ballistic Missile Tracking Problem Purely
Ballistic Trajectory
We now want to apply some of the developments of the previous
subsection to the development of a Kalman filter that can be used to estimate
the states of a ballistic missile based on measurements of range and angle. We
will start with the unrealistic, but instructive, case where the missile is flying a
purely ballistic trajectory across a non-rotating, flat earth. Consistent with the
developments in subsection 6.3.1, we will assume that the trajectory lies in the
x-z plane to simplify the system model and measurement equations. In this
coordinate system, the origin is located at the radar, which generates the range
and angle measurements, and includes the Kalman filter.
The continuous-time equations of motion for this ideal trajectory are
( ) ( ) ( ) ( )
( ) ( ) ( )
0
0
0 0 , 0 0
0 0, 0
x t x x x x
z t g z z z
= = =
= = =
(6-68)
where g is the acceleration of gravity (9.8 m/s
2
), ( )
0
, 0 x is the launch position
of the missile and ( )
0 0
, x z is the launch velocity.
Figure 6-4 contains a plot of the missile trajectory for the case where
0
100 Km x = and ( ) ( )
0 0
, 775, 632 m/s x z = . In the figure, the solid red curve
denotes the portion of the trajectory over which the radar (and Kalman filter)
tracks the target. Track is initiated when the missile is at a range of about 43
Km and an angle of about 27.
We will start with the system model of Equation 6-57. We deduce that
this model is representative in the x coordinate because we know that our
real system has a constant velocity in this coordinate (see Equation 6-68).
103
However, the model is not good in the z coordinate because we know that the
real system has a constant acceleration, and not a constant velocity, in this
coordinate. We will try to account for the inaccuracy of the model through the
( ) k Q matrix.
Since we are measuring range and angle the appropriate measurement
model is specified in Equations 6-58 and 6-59; and Equation 6-61 if we use the
state assignment of Equation 6-57. The appropriate ( ) 1 k + H matrix is given by
Equation 6-67.
In general, the range and angle measurement errors, ( )
r
v 1 k + and
( ) v 1 k
u
+ , will depend on signal-to-noise ratio (SNR), the radar compressed
pulse width,
p
t , and the radar antenna beam width,
B
u . There will also be a
lower limit on these errors that depends upon various radar design parameters.
The measurement error model we will assume is
2
2 2
r
2
2 2
1 1
20
1 1
20
p
B
SNR
SNR
o t
o u
u
(
| |
= +
(
|
\ .
(
(
| |
= +
(
|
\ .
(
. (6-69)
The terms
2
p
SNR t and
2
B
SNR u were obtained from Skolniks radar text (with
r
1 k k
u
= = see Skolnik). The ( )
2
1 20 factor limits the minimum errors to
1/20
th
of the pulse width and beam width. We will assume a pulse width of
1 s
p
t = (150 m) and a beam width of 2
B
u = (0.0349 rad).
The SNR would be obtained from the radar range equation (see Skolnik
reference) and is inversely proportional to
4
R , where R is the range from the
Figure 6-4 Ballistic Target Trajectory
104
radar to the target. For this example we will assume that the radar range
equation results in a SNR given by
20
4
10
SNR
R
= . (6-70)
This provides an SNR of about 15 dB at the start of tracking.
To implement the Kalman filter we need to specify ( )
0 x , ( ) 0 P , ( ) k Q
and ( ) 1 k + R . The system model matrices, ( ) k F and ( ) k G have been
specified. We will also need to discuss the computation of ( ) 1 k + H .
We know that tracking starts at a missile range of approximately 43 Km
and an angle of about 27. From this we can compute the initial position as
( ) ( ) ( )
( ) ( ) ( )
1
3
0 0 43000cos 27
0 0 43000sin 27
x x
y x
= =
= =
. (6-71)
We assume that we dont know the initial velocity but we assume it is in the
order of 1000 m/s. With this we let
( ) ( )
( ) ( )
2
4
0 0 1000
0 0 1000
x x
y x
= =
= =
. (6-72)
We reflect our uncertainty in these initial estimates by using
( )
2
2
2
2
200 0 0 0
0 200 0 0
0
0 0 500 0
0 0 0 500
(
(
(
=
(
(
P . (6-73)
This selection of the ( ) 0 P matrix says that we know the position to within
about 200 m and the velocity to within about 500 m/s. These are guesses.
Although we know we shouldnt, we will start with a ( ) k Q of all zeros.
This says that we believe that our system model is perfect, which we know it is
not.
We will assume that the range and angle measurements are
independent, which is a reasonable assumption. With this we get
( )
2
r
2
0
1
0
k
o
o
u
(
+ =
(
R (6-74)
where the range and angle variances are as defined in Equations 6-69. We note
that the measurement covariance matrix is not constant since the variances
depend upon target range, which varies with time. This means that ( ) 1 k + R
must be computed inside of the Kalman filter loop. Furthermore, to compute
105
( ) 1 k + R we will need to use a prediction of target range based on the predicted
state estimate.
Since ( ) 1 k + H depends upon the predicted states, it must also be
computed inside of the Kalman loop. It should be initialized to
( )
1 0 1 0
0
1 0 1 0
(
=
(
H (6-75)
or a 2X4 matrix of zeros outside of the Kalman filter loop.
The MATLAB script entitled MissileKfilt1.m contained in the Program
Files folder contains a script that implements the Kalman filter. The script is
well commented and should be easy to follow. The script reads a file entitled
Missile1.txt
1
that contains the true state. The data in the file is stored at
intervals of 0.1 seconds. We must down sample the data because we want the
update period of the Kalman filter to be 0.2 s T = .
The results of a simulation run are shown in Figures 6-5 through 6-9.
Figure 6-5 contains a plot of actual and estimated y position vs. x position.
This plot seems to indicate that the filter is working well. However, the scale
makes the errors difficult to see. More specific information on the errors is
provided in Figures 6-6 and 6-7. Figure 6-6 contains plots of x and y position
errors between the estimates and actual values (top plot) and the measured
and actual values (bottom plot). The measured x and y positions were obtained
from
( )
( )
cos
sin
meas meas meas
meas meas meas
x r
y r
u
u
=
=
. (6-76)
It will be noted that the errors between the estimated and actual positions is
large, and much larger than the measured values. This tells us that the filter is
not working very well. In fact, direct use of the measurements provides better
position estimates!
Figure 6-7 shows that the errors between the estimated and actual
velocities are also large. There is no curve of errors between measured and
estimated velocities because the measured velocities were not computed.
Figure 6-8 contains plots of what the Kalman filter thinks the rms
position and velocity errors are. These curves were obtained by plotting the
square root of the diagonal terms of the covariance matrix ( ( ) k P ). As we have
previously discussed, the rms errors indicated in these curves should be in
agreement with the actual errors of Figures 6-6 and 6-7. As can be seen, they
are not. The Kalman filter thinks it is doing a good job of estimating the
positions and velocities and is thus assigning small rms errors to them. This is
a clear indication of the fact that we have not provided the Kalman filter with
1
The file Missile.txt is a MATLAB .mat file. The .txt extension is used because many e-mail
programs will not allow down load of files with a .mat extension because they often contain
harmful viruses.
106
an adequate system model; and we have lied to the filter by telling it that the
model is good my setting the ( ) k Q matrix to zero.
Figure 6-5 Plot of Estimated and Actual Positions
Figure 6-6 Plot of Position Errors
107
Figure 6-7 Plot of Velocity Errors
Figure 6-8 Plot of RMS Position and Velocity Error from Covariance
108
The curves of Figure 6-9 contain plots of the eight Kalman gains. The
top two curves are the gains that are applied to the range measurement error
(difference between the actual range measurement and the estimated range
measurement) to update the position estimates. The second two curves are the
gains that are applied to the angle measurement error to update the position
estimates. The third two curves are the gains that are applied to the range
measurement error to update the position estimates and the fourth two curves
are the gains that are applied to the angle measurement error to update the
velocity estimates. It will be noted that all of the gains tend toward zero. This
is expected and means that the Kalman filter is de-emphasizing the
measurements and emphasizing the previous state estimates. This is the
reason the position and velocity errors increase with time: the estimates are
poor but the filter is not making use of the measurements to try and improve
the estimates. The reason we expect the gains to go to zero is that we have told
the Kalman filter that the system model is good and that it can rely on the
system model more than on the data, once the filter has been initialized by the
first few measurements.
Figure 6-9 Plot of Kalman Gains
109
As we learned with the Humvee tracking problem, we can probably
improve the performance of the missile tracking Kalman filter by choosing a
non-zero ( ) k Q matrix. This is left as a homework exercise.
Another alternative is to include acceleration as a state and attempt to
estimate it. This will also be considered as a homework problem. We will note
that this approach will be of considerable help when the trajectory is not purely
ballistic but includes atmospheric drag.
Still another way of improving the performance of the Kalman filter for
the ballistic missile case is to recognize that the trajectory is influenced by
gravity and include gravity in the system model by considering it as a known
input. This is discussed in Chapter 8.
It should be noted that there are many other ways to improve the
performance of the Kalman filter. As examples:
- For the trajectory with atmospheric drag, we could include the drag term
in the system model.
- For both trajectories we may be able to improve performance by
including the measurement of range-rate.
- We could use the combined continuous-time, discrete-time Kalman filter
discussed in Chapter 8.
In all cases, a critical factor affecting the performance of the filter is a proper
selection of the ( ) k Q matrix.
110
PROBLEMS
1. Derive the control theoretic form of the extended Kalman filter presented in
Equations 6-50 through 6-54.
2. Derive the Cartesian coordinate, constant acceleration system model
defined by the matricies and vectors above Figure 6-3.
3. Show that ( ) 0 o x is uncorrelated with ( ) k w and ( ) k v .
4. Derive Equation 6-60.
5. Derive the ( ) 1 k + H matrix given by Equations 6-62 through 6-67.
6. Derive the ( ) 1 k + H matrix for the six-state, Cartesian-coordinate system
model.
7. Extend the measurement model and ( ) 1 k + H matrix of Section 6.2.1 to
include Doppler.