Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help with understanding kalman filter

  1. Jun 8, 2010 #1
    I am trying to implement a kalman for use in sensor data fusion, for 3 axis accelerometers, 3 axis gyros, and 3 axis magnetometers for a helicopter UAV project.
    The roll, pitch, and yaw need to be known. Gyros do a great job of doing this, but the problem is that they drift of the zero value. Accelerometers are used to correct the roll and pitch values as they don't drift, and a magnetometer corrects yaw based on the magnetic north reference point.
    Kalman filters are the most effective way to combine these. There are simpler ways such as a PID loop, but helicopters are very complex, and I do not want to take a chance.
    My math is not nearly good enough to go and code a kalman filter, but I found kfilter:
    http://kalman.sourceforge.net/doc/example.html
    I have some questions in using this.
    1) What is the difference between the state vector and measure vector? Is measure what the sensor data shows and state the current position?
    2) What does the subscript 'k' represent?
    3)what does 'x' with the two dots over it mean? What about the single dot?
    4) In the link I posted, in this equation:
    form_15.png
    where does the part before the parenthesis come from? Why are there two for x and two for y?

    Any advice on how to use this in this application/ broken down steps is welcome.
     
  2. jcsd
  3. Jun 8, 2010 #2

    berkeman

    User Avatar

    Staff: Mentor

    Welcome to the PF.

    It looks like there are a number of fundamental math subjects that you would have to learn before attempting this project. Is there a simpler project that you could do, that is more in line with your math abilities at the moment?

    I'm not that familiar with Kalman filters, but it looks to be for discrete time systems (the "k" values are the sample numbers, I would think), and the dot notation refers to differentiation in Calculus. Have you had Calculus yet? How about digital filters? Those would seem to be prerequisite courses for tackling this UAV control project....
     
  4. Jun 8, 2010 #3
    Hey,
    Thanks for the reply.
    The filter is models a continuous time model, but yes, it is discrete to enable coding for it.

    Calculus next year. I was hoping the libraries would eliminate some of the math clearly out of my understanding.

    Right now, I am going to take a look at Directional Cosine Matrices, I am able to understand the math for that, so I am going to put a hold on the kalman filter.

    BTW, if you are interested, project progress is here:
    http://rp181.fortscribe.com [Broken]
     
    Last edited by a moderator: May 4, 2017
  5. Jun 8, 2010 #4

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    To be brutally honest, a Kalman filter is well beyond what someone who has yet to take calculus. You need to know calculus plus real analysis, probability theory, signal processing, and control theory to understand how Kalman filters work. You need to learn to walk before you learn to run.
     
  6. Jun 8, 2010 #5
    I certainly agree with DH - that Kalman filters are far too complex for someone who has not taken a calculus course. Out of interest though - whats the real analysis needed for Kalman filters ?
     
  7. Aug 9, 2011 #6
    i agree. without a special course,you cannot get a basic understanding of Kalman Filtering and assumptions. tutorials do not always work.
     
  8. Aug 9, 2011 #7

    Stephen Tashi

    User Avatar
    Science Advisor

    Yes
    The material treats the process as having discrete steps. 'k' refers to the k th step.
    The acceleration in the x coordinate
    The velocity in the x coordinate
    I think the 'T' is the elapsed time between two consecutive steps. The expressions in the matrix look like truncated Taylor expansions that give the coordinates of the k th step in terms of data for the previous step. A Taylor expansion (in this case) would be a power series in the variable 'T' so it it weren't truncated, it would have all the integer powers of T in it.

    The other posters are correct about that fact that it would take considerable study to understand the Kalman filter. I've looked at the so-called simple tutorials about it on the web and never had the patience to slog my way through them, so I can't recommend any. However, you seem to have an unreasonable amount of ambition. Don't give up yet.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Help with understanding kalman filter
  1. Kalman Filter Help (Replies: 5)

  2. Kalman filter (Replies: 8)

Loading...