1

I would like to implement a Kalman filter to estimate the velocity and position of an object. I have an accelerometer, therefore the acceleration is known. The approach is same as:

Kalman filter for position and velocity: introducing speed estimates

however, I don't understand well, how I should define the measurement model:

$\hat{X}(k+1) = \hat{X}(k) + K * ( y(k) - H*\hat{X}(k) );$

K is the kalman gain and is calculated in every step, but What is my "y" here, i know it is called the observations, but how i have my observations ? should i calculate the:

$v(k+1) = a(k)*t + v(k);$

$x(k+1) = 0.5*a(k)*t^2 + v(k)*t +x(k);$

Thank you!

  • This might help http://dsp.stackexchange.com/questions/3292/estimating-velocity-from-known-position-and-acceleration?lq=1 – Rhei Apr 21 '15 at 09:53
  • @Peter K would you please take a look at my question ? thank you – user3506463 Apr 23 '15 at 08:50
  • $y$ is given by this equation: $y_k = H*x_k + v_k$. Therefore you need to define the matrix $H$ first, which is the observation matrix. In the wikipedia example (http://en.wikipedia.org/wiki/Kalman_filter#Example_application.2C_technical) your $y_k$ is called $z_k$. So I suggest you to have a look at that example – Rhei Apr 23 '15 at 08:59
  • @Rhei thank you very much, my problem is exactly here, i defined H, but i have some doubts to use the x. Are they my own measurements ? as an example here i have the acceleration from accelerometer and from this acceleration i can calculate the velocity and distance. Therefore, the measurements/observations would be velocity and distance by the mentioned formulas ? Im so confused at this point – user3506463 Apr 23 '15 at 09:15
  • No, the observation is what you know of your system, therefore it is the acceleration since you measured it. Velocity and position are what you are trying to estimate – Rhei Apr 23 '15 at 09:36
  • @Rhei ok in that case what will be ( y(k) - HXhat(k) ) because HX will be equal to y ? am i right ? – user3506463 Apr 23 '15 at 10:50
  • 1
    When you compute $y_k-H\hat{x}_k$ you are actually computing the difference between your observation (i.e. mesurements) and an estimate of the observation...in other words, you are updating the estimate using the measurements $y_k$. It is a sort of correction of your estimate based on your measurements – Rhei Apr 23 '15 at 11:58
  • @Rhei you taught me kalman filter :) thank you very much, i appreciate very much – user3506463 Apr 23 '15 at 12:22

1 Answers1

3

Your observation are the $y_k$ your observation model is defined by $Y_k=HX_k+\eta_k$, where $\eta_k$ if a sample from a normal distribution.

If you want your kalman filter to estimate position, velocity and acceleration your state vector is : $X_k=[x_k,\dot{x}_k,\ddot{x}_k]^T$ and therefore your observation matrix is : $H=[0,0,1]$.

As stated by Rhei, your observations are what you get from the system at each time step, i.e. the measured acceleration.

Antoine Bassoul
  • 444
  • 2
  • 8