Kalman-filter equations when trying to predict object that change direction in one dimension

kalman filter

I'm trying to implement Kalman-filter to predict position of an object moving between to points back and forth in constant velocity.

While the velocity is constant between the points, since it's moving back and forth between two points the velocity does change direction when the object enters the point.

I only get data on position of the object. And the data is not accurate. It's noisy and normally distributed where standard deviation is 300.

I have these equations:

State Extrapolation Equations (prediction):

enter image description here

State update equations:

enter image description here

How do I write the Covariance Update Equations, Covariance Extrapolation Equations?

Should alpha, beta and gamma values be computed same as "Kalman gain" is computed?

Best Answer

I would try to formulate the problem for the Kalman algoithm as follows first:

$X_k$ = $A$$X_k$ $_-$ $_1$ $+ Bu_k$ $_-$ $_1 +$ $w_k$ $_-$ $_1$

After that you can implement the filter using the following time update and mesurement update equations like described in chapter 4.1. (pages 20 to 24) in the link below: https://www.cs.unc.edu/~tracker/media/pdf/SIGGRAPH2001_CoursePack_08.pdf

I hope this helps!

Related Question