Stuff related to MAV's (and UAV's) from a hobbyist's point of view. Info

Testing Kalman filters

A lot of people think they need great electronics skills, a lot of time, and embedded programming skills to experiment with Kalman filtering of IMU-data. Think again! The key to all your success stories is simulation!

One of the easiest tools that can help you with those simulations, is a great flight sim called Flight gear. It uses advanced aerodynamics simulation libraries, among which some were created by the NASA. Good enough for our purposes! On top of that, you can easily configure Flightgear to log all the data you need. I updated my config file to log the following variables:

  • Roll
  • Pitch
  • Acceleration along the 3 axis
  • Gyro reading along the 3 axis
  • Heading
  • Airspeed
  • ...

All the available fields can be found in FlightGear\docs\
I added the following lines to the configuration xml:

  <log n="0">
   <entry n="0">
   <entry n="1">
   <entry n="2">
   <entry n="3">
   <entry n="4">
   <entry n="5">
   <entry n="6">
      <entry n="7">
   <entry n="8">

Then I created a small VB tool (Yeah, kalman filters in VB ;-) ) to filter the data. This is the result:

One thing you can see, is that if I calculate the centripetal acceleration, and substract it from my y and z acceleration, the resulting roll angle has a standard deviation of only 2 degrees. Not bad!

Files for you download pleasures:

20 November 2007, 21:55 | Link |