T3

robust estimator of the direction cosine matrix

If you downloaded MatrixNav from this page before 4/29/2009, you should be aware that there is a newer version of the firmware, MatrixNavRv2, that reduces the GPS latency, and will perform much better than the first version.I have been working with Paul Bizard on something we call the "Premerlani-Bizard robust direction cosine matrix estimator". It is based on the work of Mahony et al. The idea is to continuously update the 3X3 matrix that defines the relative orientation of the plane and ground reference frames, using GPS and 3 gyros and accelerometers. The basic idea is to use gyro information as the primary link between the two reference frames, and to use GPS and accelerometer information to compensate for gyro drift. We are working on the theory together. Paul is performing simulations. I am testing ideas in my UAV DevBoard. We have made a great deal of progress. There are demos available, and control and navigation firmware is available. The steps of the algorithm are:1. Use the gyro information to integrate the nonlinear differential equations for the time rate of change of the direction cosines.2. Renormalize the matrix to guarantee the orthogonality conditions for a direction cosine matrix.3. Use speed and gyro information to adjust accelerometer information for centrifugal effects.4. Use accelerometer information to cancel roll-pitch drift.5. Use GPS information to cancel yaw drift.By the way, the algorithm should work in any GPS, gyro, accelerometer nav system on a plane. Without magnetometer information, it will not work on a helicopter.This discussion will provide progress reports from time to time. At this point we have completed all steps. Firmware and documentation for various demos and flight firmware are available on the UAV DevBoard main page.Firmware and documentation of a roll-pitch-yaw demo program are available. There is also a first draft of an explanation of the algorithm.If you have a UAV DevBoard, I highly recommend that you try the demo program, it is very easy to use, and runs without a GPS. During its development, I found that the gyro drift was much less than I thought it would be. After I added the drift compensation, the resulting roll-pitch peformance is nothing less than astounding.Flight testing of "MatrixNav" is also complete. Firmware and documentation are available on the UAV DevBoard main page for stabilization and return-to-launch functions for inherently stable aircraft that are controlled by elevator and rudder. MatrixNav is implemented with a direction cosine matrix, and supercedes GentleNav. Anyone who has GentleNav should replace it with MatrixNav. Pitch stabilization is excellent under all conditions. Return to launch performance is excellent under calm conditions, and good under windy conditions. If you have the UAV DevBoard and an inherently stable plane, you will definitely want to try out MatrixNav.Finally, AileronAssist, for the stabilization and RTL aircraft that have ailerons, is available.What Paul and I are going to tackle next is altitude control.Bill Premerlani

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

Join diydrones

Email me when people reply –

Replies

  • Hi William, the work you have done looks very promising. I have your board and I am uploading the code later this week to test. I would very much like to dig into the Mahony, Cha, Hamel paper but have problems to understand the jargon and terminology used. It would be very helpful if you (or other members of the group) could try to explain some of the terms in an understandable way. Below is my question list. Any help with questions in that list would be very much appreciated.

    -What is a quaternion and why do we use that instead of vector notation?

    -What is meant by a rotation group?

    -What is a rotation matrix?

    -What does it mean to maintain orthogonality of the rotation matrix?

    -What is an anti symmetric matrix?

    -Can you briefly explain kinematics in this rotation matrix context

    -Can you briefly explain dynamics in this rotation matrix context

    UFO-MAN
  • Awesome work Bill and Paul! Is there any possibility or plans to get the "Premerlani-Bizard robust direction cosine matrix estimator" working on an Arduino chip as opposed to the dsPIC? It would be great if people could "upgrade" from IR thermopiles to a full IMU while keeping the same board and just attaching the sensors and uploading new firmware. That way people would remain within their Arduino "comfort zone".

    Would the ATMega 168 be powerful enough / have enough memory / have enough IO ports, or would this need an ATMega 328, or even the Illuminato?
  • T3
    This is an update. Implementation of the "Premerlani-Bizard robust direction cosine matrix estimator" is complete. The firmware that I used to develop and test the algorithm, as well as demo documentation, are now available. Performance is solid, to say the least. Those of you who have purchased a UAV development board are definitely going to want to try out this demo to gauge the possibilities for the board and the firmware. Here is what is planned next:
    1. Documentation of the theory.
    2. Simulation results.
    3. Revision of the GentleNav firmware to take full use of direction cosines for performance that is more accurate, responsive, and stable than the present revision.
    4. New firmware that will stabilize an aerobatic plane using ailerons, rudder, and elevator. The functions (stabilization and return to launch) will be the same as those in the GentleNav firmware, except they will work for a high performance plane that need not be inherently stable. The author plans to use this firmware in the spring to fly a plane that he crashed 5 times last summer, hopefully without ever crashing again.

    Bill Premerlani
  • What a great job!

    Now I´m working in a similar project. Few diferences, like that I´m using ARM Cortex M3 micricontroller (STM32-H103), SparkFun 5DOF IMU plus other gyro from ST for yaw (I can´t remenber his name, LYS..). a 3 axis magnetormenter with tilt compensation, with 3 axis accelerometers inside (HMC6342) and a 5Mz GPS (LS20031). This is a expensive part list...
    I´m working in PCB design, setup of simulators, etc...and studing, researching... findding and reading a lot of documentation about this problem. Attitude stimate...
    I was thinking about a Sigma Point Kalman Filter making sensor fussion betwen IMU, Magnetometer and GPS. But, for me, this is like to build the Chinesse Wall. When I´ll have the PCB made and software analysis implemented, probably, there will be more light in my mind, at this moment, is a good practice to read and study what you have made, perhaps, I´ll improve my mathematical profile.
    Sorry for my bad english, I´m spanish!

    Saludos desde Madrid,
    Álvaro Alonso
This reply was deleted.

Activity