3D Robotics
Matt Chave's CUAV project is a great example of custom autopilot building, but one of the most interesting parts about it is that it uses magnetometers--digital compasses--in addition to the regular accelerometers and gyros. In the second part of our interview (the first part is here) I asked him to explain why:

Q: Can tell us a bit more about why you chose magnetometers and what you've learned working with them?

A few reasons:

We chose magnetometers because the earth's magnetic field is well modeled and provides a very good inertial reference to the aircraft.

We believed that the world magnetic model would provide sufficient coverage and accuracy for us to use for the inertial references. So far we've found it acceptable.

The magnetometers available are capable of detecting rotations to hundredths of a degree. We're not that accurate but we only need a few degrees accuracy for the current airframe.

We didn't believe it would be possible to calculate the attitude using a kalman filter with gyros and accelerometers because of the clock cycles this would consume and without floating point maths the solution could become to inaccurate.

We were concerned with the possible noise issues, however we found that most of the noise was high frequency and easily filtered out.

Since we're concerned with the frequencies below 50Hz the main problem is calibration for soft iron effects in the aircraft. These are calibrated by rotating the aircraft (easy while its this small) and recording the results then applying the appropriate bias' and offsets.

The magnetometers provide highly repeatable results with a long lifetime, they're very small, consume little power and perhaps could allow us to fabricate a 'system on a chip' solution.

They're also successfully proven on LEO (low earth orbiting) satellites.

Q: Why couldn't you use the magnetometer for roll, too? Indeed,with enough processing power could you imagine a full-featured autopilot with magnetometers alone?

Unfortunately, a single measurement of a vector can only provide two axis of information. There are papers out there which describe using Kalman filters to include dynamics and capture multiple measurements to resolve the third axis without requiring another sensor however as far as I'm aware these algorithms are only used on LEO satellites and require the collection of data from a complete orbit to provide a solution. We also don't have a gravity gradient stabilized airframe which they rely on, so we choose a roll stabilized airframe and assumed that the roll would be zero (of course that's not true but it helps to make it possible).

A good place to read more about the many different attitude determination algorithms is some of the papers available through Google scholar.

To explain it for those of us who are more visual the image shown here [at the top of the page] shows a single vector measurement viewed in the inertial frame. You can imagine the x,y and z field measurements which the plane would make in the body frame.

If you imagine the airframe glued to a cone shape centered around the vector with its apex at the tail of the airframe. Then if you were to rotate that cone about the axis (the vector), the measurements of the vector in the aircraft's reference frame would be identical. So there is mathematically no unique solution for the attitude without further information (eg. zero roll). If we add in another vector we are able to remove this dilemma.

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Gravity gradient stabilization uses the difference between the center of mass and the center of gravity to create a torque on the spacecraft to point it towards the earth. The gravitational pull acts at the center of gravity and rotates the spacecraft around the center of mass. These to points are not the same thing..normally only something like 10^-5 inches apart on a large spacecraft, however. It's completely useless with aircraft since the aerodynamic forces are much larger.
  • Assuming "gravity gradient stabilized" means the satellite always points up.
This reply was deleted.