1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Kalman filter - help me with the state space equation

  1. Dec 3, 2014 #1
    I want to get the distance between points. I have a measurement of latitude, longitude and height from GPS/barometer systen (which I converted into north east down coordinates) and I have another measurement of the vehicle's velocity in the north east and down direction. To find the distance, I want to set up the state space equation for a Kalman filter. I attached a picture of my attempt. In the picture, Ts is the sample period, v_k is the magnitude of the velocity, p_k is the position and D is the distance. Please correct my program.
     

    Attached Files:

    Last edited: Dec 3, 2014
  2. jcsd
  3. Dec 3, 2014 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    Explain your notation or give a link to an example that explains it. You also need to explain the problem completely in words. All that's clear from your verbal description is that there is a moving object. The Kalman filter requires that you specify the physical dynamics of a situation not merely the set of measurements. Is this a falling object? - a projectile? - something self propelled?

    I can't interpret your state variables. Are you using the magnitude of velocity, but not it's 3 component vectors? Do you mean p_k to be a scalar? Or does it stand for 3-D column vector with 3 entries? What distance is "the distance"?

    Since your matrix implies D[k] = D[k-1] + P[k-1], perhaps the coordinates of the object are D[k] and P[k] is a displacement vector instead of a vector of giving the coordinates of the object.?

    My recollection of questions about Kalman filters in the math sections is that they often go unanswered and I myself don't claim to be an expert on them. You might have better luck in the engineering sections of the forums. But even there, you have to explain enough so the physical dynamics are known. Just listing your set of measurements isn't sufficient.
     
  4. Dec 3, 2014 #3
    I posted this in the General Engineering forum without my state space equation (which is wrong anyway)
     
  5. Dec 3, 2014 #4

    Stephen Tashi

    User Avatar
    Science Advisor

    Explain the physics and your notation and I'll do what I can.
     
  6. Dec 4, 2014 #5

    Stephen Tashi

    User Avatar
    Science Advisor

    I'll suggest a simple approach. Something is changing the car's velocity, but you haven't mentioned any control inputs. So assume the accelerations are from random noise. That would explain the velocity changes.

    Let [itex] \triangle t [/itex] be the time interval between measurements.

    State variables:

    Let the cars position coordinates be [itex] (X[k],Y[k],Z[k]) [/itex] at measurement [itex] k.[/itex]

    Let [itex] V_x [k-1] [/itex] be the average x-velocity of the car between the [itex] k-1 [/itex] and [itex] k [/itex] measurements.
    Let [itex] A_x[k-1] [/itex] be the average x-acceleration of the car between the [itex] k-1 [/itex] and [itex] k [/itex] measuremens.


    Dynamics:

    [itex] X[k] = X[k-1] + V_x[k-1] * \triangle t + (1/2) * A_x[k-1] * (\triangle t)^2 [/itex]

    [itex] V_x[k] = V_x[k-1] + A_x[k-1]*\triangle t [/itex]

    Similarly, for the other coordinates:

    [itex] Y[k] = Y[k-1] + V_y[k-1]* \triangle t + (1/2)* a_y[k-1] *(\triangle t)^2 [/itex]

    [itex] Z[k] = Z[k-1] + V_z[k-1] *\triangle t + (1/2)*a_z[k-1] *(\triangle t)^2 [/itex]

    [itex] V_y[k] = V_y[k-1] + A_y[k-1]*\triangle t [/itex]

    [itex] V_z[k] = V_z[k-1] + A_z[k-1]*\triangle t [/itex]
     
  7. Dec 7, 2014 #6
    Hi. Thanks for your advice. I posted something very similar to this in the general engineering forum where I explained my notation:
    https://www.physicsforums.com/threads/kalman-filter-help-me-to-set-up-a-state-equation.785573/
    My version is slightly different because I assumed constant Jerk. I also integrated to get velocity and position, but I used the magnitudes as it was only important to find the magnitude of distance.
    Since the object is a car, the accelerations are from putting the pedal down and braking is from using the brakes. How would you model that? Do you think my model is OK?
     
  8. Dec 7, 2014 #7

    Stephen Tashi

    User Avatar
    Science Advisor

    You still haven't defined what you mean by "distance". Do you mean distance to be what the odometer on the car measures? -, which is the length of the possibly curved path the car has followed..
     
  9. Dec 7, 2014 #8
    Yes that is what I want to measure
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Kalman filter - help me with the state space equation
  1. Kalman filter (Replies: 8)

Loading...