tags:

views:

365

answers:

1

I need an explanation of advance kalman filter algorithm. Preferably a C code, but only the algorithm will work for me.

+13  A: 

Kalman filters are specialized versions of Wiener filters. Specifically, Kalman filters take information about a problem domain and enhance a Wiener filter by applying this domain specific knowledge. I've found the Wikipedia page to be an excellent reference source for understanding the particulars of the algorithm.

Without repeating the specific details here (no linear algebra imagery functions), Kalman filters estimate future state incrementally (as do Wiener filters, for that matter). In particular, we estimate the state, apply problem domain specific noise estimations and state change approximations, and then iterate. That is to say, we take current observations of state, filter those observations, predict the next state, then combine that output to produce some new next state observation.

I've found Kalman filters quite useful for predicting motion paths. Since motion paths are smooth Kalman filters work particularly well -- motion can easily be predicted using past known observations of state. So suppose you're in a car driving down the road, you'd record the current coordinates of the car as the current state. You then filter past observations of state (your previous locations) to predict the next point the car will be (in time). Note that you can apply laws of physics (say, momentum) to customize this filter and come up with quite reasonabole results. Random changes in speed or direction have some impact on the predictions.

Take a look at this C implementation you can see that we have two major functions in running a Kalman filter estimate and update (the wikipedia article talkes about these, but calls estimate "predict").

Ultimately you're going to need to determine some very specific statistics for the problem with which you wish to apply a Kalman filter. In particular, you need to generate/record/observe statistics on how the variance of the noise signal you observe evolves over time. It's assumed the process you're predicting is also stochastic, and as such you'll need to estimate its statistics as well.

Mark E
This is really just a relatively polite version of what this meta thread is about: http://meta.stackoverflow.com/questions/15650/ban-lmgtfy-let-me-google-that-for-you-links. I urge you to edit your answer. If you know what a Kalman filter then elaborate. Else if you don't then delete your answer. So, provide context and comments and some insight into the algorithm. But earning reputation points for merely providing a Google link dilutes the meaning of reputation points and ultimately decreases the value of StackOverflow.
Jason
Wow, you know how to use Google.
Greg
fwiw, my original response answers the OP's question of having the algorithm, I'm happy to provide commentary on the usage of the algorithm, but SO's support for linear algebra is lacking enough it ought to be sufficient to link to the well maintained mathematical resources of a university. I'll try to stay away from straight links in the future.
Mark E
I am happy with this answer; you provided great insight. You could turn this into an outstanding answer by walking the OP through the algorithm (one of those answers that will earn you reputations points to the end of time). Thank you for taking my comments to heart and coming back and providing this kind of answer. This is what makes StackOverflow gold. Plus one from me.
Jason
Great, great answer now in my opinion.
Jason
i already go through this page of wiki but it is really messed up info very much difficult to understand and to write a algo...some more info is required!
moon
Can you elaborat a bit more about your confusion?
Mark E