Kalman filter and processing power?

Hello all
I’m working on a quad copter and I’m at the filtering gyro and accelerometer data stage, I’m currently using the complimentary filter and am very happy with the result but I’m still curious about the Kalman and whether it’s worth trying to implement it.
I’ve been told that the Kalman in full is too processor heavy for a normal Uno or even Mega and that even simple versions lag behind the real world data being inputted into the system; is this because of the use of matrices taking up too much of the arithmetic processing part of the microcontroller or some other reason? Sorry for being dense if it’s obvious.
The other question was that if the Kalman is too much for the Arduino is there some sort of measure of required computing power for particular programs so I can get an idea of whether something will work on a particular microcontroller before buying?

Thanks in advance for any answers and all the best

This sounds like an interesting project to do Kalman filtering on Arduino. I haven't done this before so I can just post my opinion rather than experience.
First, generally spoken, it should be possible to do that. The two big limitations you have is memory and speed. For your case the memory might be sufficent, since the matrices are quite small (Of course this depends also on the kind of kalman filter you want to use like plain, extended or unscented).
Secondly, the speed might be a problem. It all depends on how many calculations you have to do per second and this might be dependant on the size of the matrices again.
So I would give it a try. And if it does not work you got at least the experience :wink:

Apart from issues of processing power, you run into a fundamental problem with Kalman because the Kalman method is based on some assumptions about the linearity of the problem, which do not apply to the flight dynamics problem in three dimensions, except in a limited sense, such as only processing a single input, or reducing the problem to one dimension.

There are methods to handle non-linear systems. This includes the extended and unscented kalman filter. The results are good enough for satellites and space rockets, why should it not work for a quad-copter?

According to jremington in this thread the Arducopter project uses a DCM algorithm rather than Kalman. I don't know why that algorithm was chosen, but the decision wouldn't have been taken lightly.

Unless you have a sound understanding of the maths involved and lots of time to devote to it, it would be sensible to start with one of the existing open source autopilots rather than try to create your own from scratch.

The Arducopter developers chose the Direction Cosine Matrix (DCM)/complementary filter method of attitude estimation for precisely the reason that it is an order of magnitude less computationally intensive than the Kalman filter approach. Kalman Filter vs DCM - Discussions - diydrones

Here is a collection of discussion and papers on the topic. See this early paper "Bizard, Paul, William Premerlani. DIRECTION COSINE MATRIX IMU: THEORY. 17 May 2009. " (linked below). *-References to Control Algorithms for Existing Open Source Code - Fall 2011 ENGR697 Arducopter

As far as I know, most self-contained attitude estimation units, like the UM6 from CHRobotics, use dedicated, fast processors like the 32 bit ARM to implement Kalman filters. These units are becoming so inexpensive that it makes no sense to write your own, unless you want the (painful) learning experience. http://www.chrobotics.com/products/inertial-and-orientation-sensors