12
$\begingroup$

I've used Kalman filters for various things in the past, but I'm now interested in using one to track position, speed and acceleration in the context of tracking position for smartphone apps. It strikes me that this should be a text book example of a simple linear Kalman filter, but I can't seem to find any online links which discuss this. I can think of various ways of doing this, but rather than researching it from scratch, perhaps someone here can point me in the right direction:

  1. Does anyone know the best way of setting up this system? For example, given the recent history of position observations, what's the best way of predicting the next point in the Kalman filter state space? What are the advantages and disadvantages of including acceleration in the state space? If all measurements are position, then if speed and acceleration are in the state space can the system become unstable? Etc ...
  2. Alternatively, does anyone know of a good reference for this application of Kalman filters?
Thanks

$\endgroup$
7
  • 1
    $\begingroup$ Wikipedia has a simple example here. It's simple enough for you to get the details. To answer your first question, you predict the next state using the current state and your dynamic model of the system's behavior. $\endgroup$
    – Jason R
    Commented Apr 24, 2013 at 20:05
  • 1
    $\begingroup$ @JasonR thanks for the comment, but I'm looking for more than what's on Wikipedia. I've used Kalman filters a lot before, so I'm looking for as much detail as possible on the best approaches and pitfalls of this particular application. $\endgroup$ Commented Apr 24, 2013 at 20:16
  • 3
    $\begingroup$ Kalman filters are a mature-enough topic that you might be hard-pressed to find a detailed contemporary example as you would like. Briefly: even if you only measure position, it is valuable to include derivatives like velocity and acceleration in your state vector. The amount of derivatives that you track is related to the polynomial order of changes in the state that your filter will be able to track with no static error. $\endgroup$
    – Jason R
    Commented Apr 24, 2013 at 20:20
  • $\begingroup$ @JasonR thanks very much, in the absence of anything else, that's certainly a very useful pointer :-). $\endgroup$ Commented Apr 24, 2013 at 20:24
  • $\begingroup$ This is not quite what you're after, but this answer to a similar question may help. $\endgroup$
    – Peter K.
    Commented Apr 25, 2013 at 1:19

1 Answer 1

6
$\begingroup$

This is the best one that I know of

Full derivation with explanation

Kalman

This is a good resource for learning about the Kalman filter. If you are more concerned with getting the smartphone app working I would suggest looking for a pre-existing implementation of the Kalman filter. Why reinvent the wheel? For example if you are developing for android, openCV has an implementation of the Kalman filter. See Android OpenCV

Bradski and Kaehler is a good resource on image processing in general and includes a section on the Kalman filter including code examples.

$\endgroup$
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.