complete example of using kalman filter with autoregressive model

Hi I am trying to apply a kalman filter to a set of data. I know the basics, but I just need one complete example to follow. assume a data set,
data = [143.850000000000 141.950000000000 141.450000000000 142.300000000000 140.600000000000 140 138.400000000000 137.100000000000 138.900000000000 139.850000000000 138.750000000000 139.850000000000 141.300000000000 139.450000000000 140.150000000000 140.800000000000 142.500000000000 143 142.350000000000 143 142.550000000000 140.500000000000 141.250000000000 140.550000000000 141.450000000000 142.050000000000]
(assume this is the real data, with no noise. so I guess I would need to add white Gaussian noise to it to verify the performance of the filter?)
Now I need to calculate the optimal AR order to determine the values for matrix A in the time update equations. 1) how do you determine the optimal order, using matlab functions? 2) once you find the order (lets say 5), I use aryule(data,5) to obtain the coeff. So is the matrix A these coefficients? 3)how to transform this linear model into the state space representation? 4) what is matrix H?
Basically I want to be able to see the result of the kalman filtering vs raw data, and to how it improves the result.
A simple and compete example is appreciated! :)

Answers (0)

Asked:

g
g
on 5 Aug 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!