Sensor Fusion algorithms

Hello everyone,

I’ve been using Navio2 on a Quadcopter but right now I need to write a report for my project.

One of the topics required is to describe the Algorithms used for sensor fusion. From the code I can conclude that there are 3 main filters (DCM, EKF1, EKF2).

I would like to ask which of these are used (or which combination of them). I use ArduPilot 3.5.

I would also like to ask if there are any references for each of them, i.e., papers or technical reports. I’ve already found “Direction Cosine Matrix IMU: Theory” by Premerlani and Bizard (that describes most of the DCM filter), but haven’t found anything on EKF1 and EKF2.

I understand that these are Extended Kalman Filters and I have already implemented Extended Kalman Filters for orientation estimation before, but it didn’t have the complexity as EKF1 and EKF2. Is there any references that explain what was done on this filters?

Thanks for the attention,

Best regards!

Hello there!

Right now the default algorithm is EKF2. AFAIK, EKF1 is enabled but not used. DCM is disabled, deprecated and soon to be removed. EKF3 is something that is master but I don’t believe it’s used now. But you can check the parameter list for your build.

You’re flying off beta-branch?

I suppose you can look into this repository which is the one Paul Risenborough (he’s the guy behind the whole EKF algorithms) used for development. I’m not an expert on the topic but I remember I glanced over this IPython book a couple of years back. It seems like it is still maintained. If you want to know how EKF2 works in ArduCopter I guess there’s no other way other than read through the code! I guess, Paul won’t be opposed answering questions like where to get the resources on the topic.

Hello George Staroselskiy, thanks for the reply!

Although I’ve seen on the version.h file that the version I was using was Copter 3.5, I didn’t see any EKF3 in my code. However I’ve updated the code from the repository with the latest version available and now I see the following lines at the AP_AHRS_NavEKF::update function.

update_DCM();
update_EKF2();
update_EKF3();

So, I believe that this means DCM, EKF2 and EKF3 are used sequentially to update AHRS data.
Am I wrong?

Once again thanks for the reply!

Best regards!