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

Views: 11267

Reply to This

Replies to This Discussion

A little addition:

I've re-read all the Introduction to DCM doc (draft 2).

The scheme provided as figure 1 does not provide any details, which is what I'm seeking and the reason why I asked for another scheme.

The general approach is quite clear to me, but still I fail to understand how white-noise gaussian processes are removed (or at least an attempt is made to) from the sampled signals.

And there is no detail on how the actual merging of acceleration and rotation information is done.

The document itself is a very clear explanation of the geometry of different reference frames and related interconnections, but I miss a more technical analisys of the innards on the algorithm.

I hope not to sound too pretentious.

Best regards

HI,

I'm using the DCM code as provided with the CK devices "mongoose" as the starting basis for an opens-source wifi AHRS for real aircraft. (That means some of the difficulties of UAVs don't occur: no continuous high-speed rotations for a Cessna 182, or else you've got other problems...)

Comparing the Mayhony algorithm with the Madgwick algorithm they're very similar except in the function for the error vector.

One uses a linear combination of the magnetic and gravitational cross products, and the other uses the first iteration of a steepest descent estimation, based on the Jacobian of an error function yada yada yada.

Is there any significant difference in the performance?

I also think there are two simplifications that can be made in the algorithm:

Don't compute the Z (third) row of the R matrix in Eqn. 17 - just set it to the cross product of the X and Y rows. That removes any requirement ever to renormalize the third row.

Alec,
At this stage I am not in a position to help but I am doing something similar for my own real aircraft. It is an RV-6 experimental see some details here:

http://bypass.dyndns-free.com/

I am working with the 9dof board from Sparkfun and am currently trying to solve the error correction issues in a sustained turn. This is difficult solve without flight testing so I am not sure how the UAV guys have handled the problem. I havn't seen anything helpful.

Would you be kind enough to post references to the algorithms and too the CK DCM code.

Doug Gray

Doug,

I don't know if you've looked into the maths but you either need to stabilize the magnetic information so you can use the whole magnetic vector (magnetic heading + angle of dip) as a reference vector during a turn, and/or differentiate the GPS velocity to give you a frame acceleration to correct the measured acceleration.

There's no reliable and easy way as far as I can see yet.

Send me a message on this site and we can compare notes.

Doug, et. al. 

I've written up the project (so far) here:

http://myahrs.wordpress.com/?order=asc

Hi Alec,

In the implementation of MatrixPilot, we do take advantage of the fact that the third row of the R matrix is the cross product of the first two rows. Glad to see that you noticed that.

Best regards,

Bill

I’m confused with the effectiveness and accuracy of the proposed direction cosine matrix method.

Without doubt, if the UAV is not aclinic(level), the forward acceleration is measured by accelerometer, together with the gravity component. Unless the UAV is stationary, The horizontal attitude angle determined by the output of accelerometer is not believable. Of course, the azimuth angle obtained by GPS is also not believable. You known, the frequency of GPS signal is low, the azimuth will be vibrated, and the accuracy is too low to use.

I guess the core of this method is using the attitude reference to compute the gyro errors. So, I think it is better to equip a magnetometer.

The IMU computed attitude is limited by IMU errors(Gyro errors bias and Accelerometer bias errors). During motion, these errors can be estimated and compensated by EKF. I’d like to know the accuracy of the proposed method with attitude reference obtained by GPS and accelerometer. Of course, the accuracy equipped a magnetometer.

Hi Wuxuheu,

Since the first introduction of this idea, I have made many refinements to improve effectiveness and accuracy. There are links to the discussions on the UDB page. You might want to read a few of them, including the discussions on removing magnetometer offsets, self-aligning magnetometerself-calibrating gyros, for example. And recently, I have made a major advance in the area of accounting for acceleration. At this point, the direction cosine matrix method is highly accurate and effective, if you incorporate the various improvements that I have published.

Best regards,

Bill Premerlani

Hi,

In the DCM, the accelerometers used for the pitch-roll compensator, and the GPS used for the roll compensator. Does anyone know why the GPS did not use for the pitch-roll compensator?

Best regards,

Don

Hi Don,

There have been several improvements to the basic algorithm since the original discussion. For more information, take a look at the blogs and discussions listed here.

The latest version of MatrixPilot uses the following approaches for gyro drift compensation, depending on whether or not a magnetometer is used.

A. No magnetometer. Accelerometers are used for roll-pitch compensation. GPS velocity is used for yaw compensation.

B. With magnetometer. Accelerometers are used for roll-pitch compensation. Magnetometer is used for yaw compensation.

In either case, in the latest version of MatrixPilot, change in GPS velocity is used to adjust the roll-pitch compensation to take into account acceleration. This is a new method that is particularly well suited for multicopters and VTOLS.

Best regards,

Bill Premerlani

Hi Don,

Typically, gravity is used as a reference vector for the "down" direction, that is why accelerometers are used for roll-pitch compensation. However, gravity does not tell you which way is north, so you need something else for for yaw compensation.

In fixed-wing aircraft, the air velocity vector is approximately parallel with the fuselage, so if you can somehow figure out the wind vector, you can use GPS velocity plus wind to determine the direction the plane is pointing and do yaw compensation.

For aircraft that hover, you need a magnetometer for yaw.

Regarding using the GPS for roll-pitch for fixed-wing, it cannot help you with roll, because the roll axis is approximately parallel with the air velocity. In principle you might use air velocity vector to help with pitch, but that requires that you know both the angle of attack and the vertical wind accurately. Typically, for pitch, you get better accuracy from accelerometer information.

Best regards,

Bill

Hi William,

I REALLY thank you very much. I hope to not disturb you much.

Best regards,

Don Kim

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service