Search code examples
kalman-filter

Defining a kalman filter and its application ( Concept)


I have a simple problem. I am tracking an object and getting its position in non-uniform time intervals. Velocity and accelration of object are not constant.

data_=[time x,y,z]

To design a kalman filter, I need to define

z=[x;y;z] % observation

% Estimation vector
xt=[xt;yt;zt;x't;y't;z't]  % ' first derivative



P=Covariance matrix of estimation vector 
R=Covariance matrix of measurement 
Q= covariance of noise

Question1: What is difference between these two R & P If measurment accuracy is 1mm what would be P? Question2: What is benefit of using this Kalman filter in post processing. It it to get smoth trajectory if yes why we need it.

Hope I will get enough information from you people.


Solution

  • Question 1

    R is the covariance matrix of the measurement. It has nothing to do with your model and your estimations.

    P is the covariance matrix of the errors in your estimations. It is totally realted to your model and the way you estimate the state. P has nothing to do with your accuracy on measurements. You have to compute it every iteration with update equations.

    Question 4

    Kalman's goal is filtering noisy measurements of the state you want to track, so you can get a result more similar to the real state without noise (noise is uncertainty in your measurements).