Arduino + IMU 9DoF + Home made Kalman Filter (x,y)

Dear all,

I am glad to share with you my kalman filter.
I did some test to check the values of the covariance matrix, you can see it here:

You can access the code here:

Kind regards,

Hi there cherault!

Is it an "extended" kalman filter?

Is it an "extended" kalman filter?

No, it is not even a Kalman filter.

That appears to be based on some code that has been around for a long time, and has been shown to be defective as the system model is completely wrong. It does do some filtering, though. A more recent wrong implementation can be found here.

For state of the art filtering with a 9DOF or 10DOF sensor on Arduino, I recommend the open source RTIMUlib library.

Finally, if you want to learn how to write a Kalman filter, extended or "standard", I recommend Dan Simon's textbook "Optimal State Estimation" for an excellent introduction to the topic.

Thanks for those great links jremington! Really great links there. Particularly this one here..... which came from a search of Dan Simon (after you mentioned him and his book).

At the moment, I haven't yet studied or understood the extended kalman filter. So thought I'd ask the OP.

I fully understand the basic kalman filter theory from the nice tutorial from a Dr. Ramsey Faragher .... from an IEEE video tutorial. here.....

There's also a great IEEE pdf article based on that same video (available), with all the equations and mathematical details, all ordered and explained in a very nice way.

The links you provided will likely get me on my way to understanding the extended kalman filter material. Thanks again Jrem. Genuinely appreciated.

The extended Kalman filter is just a linearization of the more general nonlinear problem.

I've never studied it closely, but I have the impression that with the EKF it is even more important to have an accurate system model and that the linearization process can be verified as applicable.

Thanks jremington.

I was just taking a look at the link you provided a moment ago.... about the wrong approach. Nice details there. Minor 'typo' though. They said the state transition matrix is 'A'. But "A" is actually the 'State Matrix'. The 'state transition matrix' is: e^(At). It's ok though. I know what they mean, as the matrix for "A" is shown.

Semantics. The Kalman filter literature can be quite confusing with alternative notations and definitions.