Time Series Analysis - Assignment 5: Estimation of The Trajectory of A Satellite Using The Kalman-Filter

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Time Series Analysis - Assignment 5

s121155 - Rami El-Rashid


December 11, 2014

Estimation of the trajectory of a satellite using the Kalman-filter


Task 1
In this task we have to formulate the model in the following state space form.
Xt = AXt1 + But1 + 1,t
Yt = CXt + 2,t
Here Xt is the state vector and Yt is the observation vector. It is given in the text that

rtp
p
Xt = t ,
p
v,t

rtm
tm


Yt =

500
0
0
0.0052
0 ,
1 = 0
0
0
0.0052


,


2 =

20002
0
0
0.032

1 and 2 are the covariance matrices of the state and observation noise. We have no external
input, so to complete the state space model we need the A and C matrices which can be written up
using the formula given for the evolution of the system. We obtain:



1 0 0
1 0 0
A = 0 1 1 , C =
0 1 0
0 0 1
The whole state space model is therefore:
p
p
rt
rt
r,p
1 0 0
tp = 0 1 1 tp + ,p
p
p
v,t
v,t
v,p
0 0 1
rtm
tm


 m  

1 0 0
rt1
r,m
=
+
m
0 1 0
t1
,m

Task 2
In this task we have to implement the Kalman-filter in R as written in the book. First we create container arrays for the data. For example, since we have 50 observations, here X is 50 3 dimensional,
xx is 3rd order 50 3 3 and so on. In the initialization step we assign the initial values to the
predicted state and the covariance. For the mean, taking a look at the observed values, and after a
little experimenting, we found a suitable state vector and thus we obtain the following initialization:
1

1|0
X

40000
= E[X1 ] = 0 = 0 ,
0

xx
1|0

500
0
0
0.0052
0
= V[X1 ] = 1 = 0
0
0
0.0052

The initial distance is taken to be about the mean of the observed distances; the angle is zero and
the initial angular velocity is taken to be zero, since it is unknown. We then calculate
xx T
yy
1|0 = C1|0 C + 2

The R code can be found as a separately attached file. We then iterate calculations of successive
reconstruction and prediction steps, where the reconstruction is calculated by:
yy
T
1
Kt = xx
t|t1 C (t|t1 )

t|t1 )
t|t = X
t|t1 + Kt (Yt C X
X
yy
T
xx
xx
t|t = t|t1 Kt t|t1 Kt

Here Kt is called the Kalman-gain. The prediction is calculated by:


t+1|t = AX
t|t
X
xx T
xx
t+1|t = At|t A + 1
xx
T
yy
t+1|t = Ct+1|t C + 2

Task 3
Here we apply the Kalman-filter to the state space model. First we have to check if the system is
observable, which can be checked by
.
. .
rank[C T ..(CA)T .. ..(CAm1 )T ] = m
We are expecting it to be 3, which we find, after checking the code in R, to be the case. We then
carry on with our iteration to obtain the reconstructed values. Some of these values are shown in
the following tables, first the distance values. Their uncertainties are also shown, as 95% confidence
intervals.
Time(t)

Observed distance (rtm )

Reconstructed distance (
rt|t1 )

95% confidence

1
2
3
4
..
.

38000
39140
39913
37690
..
.

39882
39802
39818
39451
..
.

950.7
1289.4
1496.8
1627.6
..
.

24
25
..
.

38475
42126
..
.

38681
39441
..
.

1841.4
1841.5
..
.

48
49
50

42515
39351
37942

40612
40334
39806

1841.6
1841.6
1841.6
2

We can see the variances settle at a fixed value, and also that the observed distances are much
more noisy than the reconstructed ones. This is also visible on the plot below, where the red line
shows the observed and the green line shows the reconstructed values.

Figure 1: Reconstruction of distance


Similarly, we can see the reconstructed angle values.
Time(t)

Observed angle (tm )

Reconstructed angle (t|t1 )

95% confidence

1
2
3
4
..
.

0
0.053
0.114
0.050
..
.

0
0.004
0.024
0.038
..
.

0.0097
0.0162
0.0245
0.0318
..
.

24
25
..
.

0.737
0.702
..
.

0.712
0.725
..
.

0.0396
0.0396
..
.

48
49
50

1.388
1.476
1.431

1.408
1.454
1.461

0.0396
0.0396
0.0396

Similarly here, we can see that the green line resembles a straight line more, which is intuitively
how the satellites orbit would be.

Figure 2: Reconstruction of angle


Finally we attach a plot of the reconstructed velocity, where it is visible that in the case when it is
initialized from 0, there is a small calibrating time in the beginning but then the velocity becomes an
approximately constant value of around 0.03. The 95% confidence interval here is 0.0188 - this remains
relatively noisy. (We found that if we reinitialize from 0.03, the stability is reached immediately but
it still remains noisy).

Figure 3: Reconstruction of velocity

Task 4
Here we have to use the Kalman-filter to predict future states. Without future observations these will
be just estimates from recursive calculations so we expect the distance and velocity to remain flat, and
the angle to increase linearly; and the standard deviations to increase. We use the following formulae
from the book for the predictions (while assuming no known future input data):
t+k+1|t = AX
t+k|t
X
t+k+1|t = At+k|t AT + 1
This calculation has been implemented in R and a table with the prediction results is shown below
with the uncertainties [note that I use but it is just for column length; in reality this is not the
standard deviation but the 95% confidence interval ]:
Time(k)

Pr. distance (rt+k|t )

Pr. angle (t+k|t )

Pr. velocity (vt+k|t )

(r)

()

(v)

1
2
3
4
5
6

39806
39806
39806
39806
39806
39806

1.4869
1.5124
1.5379
1.5635
1.5981
1.6146

0.0255
0.0255
0.0255
0.0255
0.0255
0.0255

2086.1
2304.8
2504.5
2689.4
2862.4
3025.5

0.0535
0.0705
0.0899
0.1112
0.1343
0.1589

0.0212
0.0234
0.0253
0.0272
0.0289
0.0305

The results agree with our intuition.

You might also like