Extended Kalman Filter and Vector matching code

Just put anything that is not directly related to the Gluon-specific implementation here. I will create subforums if required!

Moderator: lukasz

Extended Kalman Filter and Vector matching code

Postby Mitch » Sat Oct 02, 2010 6:35 pm

I didn't want to post these but I've had a bunch of requests for this code. I'm going to make it available because I haven't had time to do the work I wanted. Here are two MPLAB projects. They are both unfinished and not cleaned up but they should be sufficiently commented so someone could pick up where I left off or use some of the routines.

They're a good example of implementation of the methods described and both are working, but neither are optimized and have high computational overhead. The hardware platform is my old development board consisting of dsPIC33FJ256MC710 and Sparkfun razor 6dof.

The first zip is a quaternion EKF with euler updates as described Kingston and Beard Paper "Real-Time Attitude and Position Estimation for Small UAVs Using Low-Cost Sensors". GPS is not implemented.

The second zip contains a quaternion EKF method which integrates vector matching as described in Elkaim paper "MAV Attitude Determination by Vector Matching". An HMC5843 3 axis magnetometer is implemented.

If you have any questions please post them on this forum so we can start a knowledge base here.

Use the code as you please but since I'm making it available, please post anything you do with it back to the public domain! Here?

Applicable papers are all to big to post here. I will keep them online at the links below, with credit to the authors, so long as none of them have a problem with it.

EKF
http://baxtercam.no-ip.org/images/KingstonBeardfull_lowcostimu%20.pdf
http://baxtercam.no-ip.org/images/kingston%20beard%20thesis.pdf

Vector matching
http://baxtercam.no-ip.org/images/MAV_Attitude.pdf
http://baxtercam.no-ip.org/images/demozahrs.pdf
http://baxtercam.no-ip.org/images/Multi_sensor_fusion_GebreEgz.pdf
Attachments
6 dof razor Kingston and Beard method.zip
(146.78 KiB) Downloaded 1324 times
6 dof razor quaternion estimator.zip
(71.48 KiB) Downloaded 1254 times
Last edited by Mitch on Sun Oct 03, 2010 1:25 pm, edited 1 time in total.
User avatar
Mitch
 
Posts: 118
Joined: Sat Dec 05, 2009 1:59 pm
Location: Florida, USA

Re: Extended Kalman Filter and Vector matching code

Postby Tom » Sun Oct 03, 2010 9:32 am

Thanks Mitch,

I'll read it with great interest this winter :-) Could you post the papers as well?

Tom
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Extended Kalman Filter and Vector matching code

Postby aplejuce » Wed Oct 13, 2010 12:27 pm

Thank you very much for posting your code!

You talked about the arduino platform not being able to handle the math - i may implement another processor dedicated to the UAV postition sensing - pic-chip per your reference

Thanks again!
aplejuce
 
Posts: 1
Joined: Tue Sep 28, 2010 4:22 am

Re: Extended Kalman Filter and Vector matching code

Postby Mitch » Wed Oct 13, 2010 1:40 pm

Hope it's helpfull. My server will be down for several days so the papers may not be available right now. They are available online elsewhere.
User avatar
Mitch
 
Posts: 118
Joined: Sat Dec 05, 2009 1:59 pm
Location: Florida, USA

Re: Extended Kalman Filter and Vector matching code

Postby Tom » Fri Oct 14, 2011 7:01 am

Your paper using the extended kalman filter is the same as the one implemented in gluonpilot.
Only I changed the model from the paper from quaternion to euler angles. I did this because I wanted to avoid a 4x4 matrix inversion. In your code it is a 3x3 matrix inversion, so maybe I misunderstood it and it would have been a good idea to go with the original idea :-) I should study the paper again closer!
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium


Return to General

Who is online

Users browsing this forum: No registered users and 3 guests

cron