MatrixPilot precision navigation algorithms

The above flight track highlights the performance of the latest version of the navigation algorithms in MatrixPilot. Flight tracks are from a flight that Peter Hollands conducted. (Thank you, Peter.) The red and the green tracks represent flight segments in opposite directions between the same pair of waypoints. The tracks are nearly perfect straight lines 243 meters long, with deviation between the two tracks of no more than 3 meters, in heavy winds. You will have to look closely at the picture, the two tracks are nearly on top of each other.

Winds are shown in the following picture.

This precision navigation is the result of several recent innovations in the MatrixPilot algorithms. The main innovation is from Paul Bizard, and has to do with using IMU course over ground instead of heading for navigation. (Thank you Paul.) Paul has taken us full circle on this:

1. The first version of MatrixPilot used GPS course over ground for navigation. This had the advantage of not needing wind information, but suffered from GPS latency.

2. The next version of MatrixPilot used IMU heading for navigation. This eliminated GPS latency effects, but required wind to be included in navigation computations.

3. The next version of MatrixPilot used IMU for position estimation.

4. Recently, Paul pointed out that the MatrixPilot IMU furnishes course over ground, and that would be much better than heading for navigation. So we went full circle, we are back to course over ground. But now it comes from the IMU, not GPS, so there are no latency effects.

We also made several other improvements to the navigation algorithms:

1. We totally eliminated the use of angles in the navigation computations, everything is now based on vectors or matrices.

2. We are using 32 bit integer arithmetic in several places. This combines ultra-fine resolution with wide range.

3. We added a cross-track velocity damping term. This allows the cross tracking gains to be turned up without inducing a "dutch roll".

For more information on MatrixPilot, see its diydrones page, or its website.

Best regards,

Bill Premerlani

Views: 2566


T3
Comment by William Premerlani on June 20, 2013 at 2:39pm

I forgot to mention...

There are two hardware platforms that support MatrixPilot, AUAV3 and UDB5. AUAV3 is available from Nick Arsov. UDB5 will be on sale soon at SparkFun.


Developer
Comment by Tom Pittenger on June 20, 2013 at 2:48pm

Great work Bill, UDB is looking better and better!


Developer
Comment by Andrew Tridgell on June 20, 2013 at 2:51pm

Hi Bill,

Interesting! ArduPlane has also recently switched to IMU course over ground, which is the basis for the "L1" navigation code in recent releases. We've also found it improves things a lot, especially in high wind. Perhaps the biggest advantage is that it is much easier for users to tune, as there is just one key parameter.

One thing we haven't done yet is made the navigation code smarter about the waypoint after the current one, so it comes into the waypoint at the right angle so it can transition to the next track smoothly. Brandon Jones has done some work towards that, but we haven't integrated it yet. Have you looked at that for MatrixPilot?

The other thing we haven't looked at yet, but would like to solve, is 3D waypoints, especially for landing. We'd like to automatically choose a spiral descent when needed to line up correctly for a landing approach. That would also be useful when climbing over steep terrain. I recently lost a plane in very steep terrain, which has focused attention on that problem.

Cheers, Tridge


T3
Comment by William Premerlani on June 20, 2013 at 3:00pm

Hi Tridge,

Regarding smart turns, Matt Coleman has done some work on that, its not yet been integrated into trunk.

Regarding 3D waypoints, that is on my list of things to do. I think the "full Mahony" approach should solve that. Not sure when I will get to it.

What about cross tracking? What is your experience with that?

We found that cross tracking based on cross track error only did not work so well. Adding a damping term based on cross track velocity helped a lot. So we routinely use cross tracking now.

Best regards,

Bill


T3
Comment by William Premerlani on June 20, 2013 at 3:06pm

Hi Tridge,

By the way, MatrixPilot does a fair job of 3D waypoints right now. Altitude control works pretty good, especially if you use sonar. Target altitude is interpolated, so there is a glide slope that gets defined. There are enough tuning parameters in MatrixPilot that you can get the plane to go where you want it to during a turn. The only issue, really, is that the glide slope is defined in terms of distance to the waypoint rather than path length.

Best regards,

Bill


T3
Comment by William Premerlani on June 20, 2013 at 3:09pm

Hi Tridge,

Regarding MatrixPilot's course over ground navigation, there are no parameters to set. None are needed.

For waypoint triggering, there is a waypoint radius, which is distance to waypoint to start the turn for the next waypoint.

For cross tracking, the only parameter is "look ahead distance".

Best regards,

BIll


Developer
Comment by Andrew Tridgell on June 20, 2013 at 3:17pm

Hi Bill,

We're finding that L1 handles cross-tracking quite well and it works a lot better now we are using IMU ground track. We have a damping term users can tune, but we regard it as an advanced parameter, as the default works well over a wide range of conditions.

For 3D waypoints, right now ArduPlane just uses a simple system of climbing/descending at a constant rate between waypoints at different heights. Paul Riseborough is working on a new altitude controller based on TECS that makes that a lot smarter, with defined maximum climb and sink rates. That is not yet combined with navigation however, so if the height differential to the next waypoint is more than is possible with the maximum climb rate of the plane then it will just end up with an altitude offset when it gets to the waypoint, and will consider that waypoint complete. We'll need some logic in there to spiral up/down as needed to hit a waypoint if the user marks the waypoint altitude as critical (a 3D waypoint).

For a recent flight in steep terrain what I did was to use a script to re-write the waypoints to take account of a maximum climb rate, and adjust waypoint altitudes (and add new waypoints) to ensure the mission didn't ask the plane to do something it couldn't do. I'd much rather that happened automatically in the nav controller, instead of being done before hand by the operator.

Related to this is taking into account the decreased lift and thrust at high altitudes, and using true vs apparent airspeed in all the right places. Some ArduPlane users are dropping planes from high altitude balloons, which really tests the code well!

Cheers, Tridge


T3
Comment by William Premerlani on June 20, 2013 at 3:45pm

Hi Tridge,

I almost forgot, MatrixPilot has an option that both provides 3D waypoints (spirals) and smooth turns: Ben Levitt's LOGO impelementation!!

So, if you want to define a 3D landing spiral with MatrixPilot, use the LOGO editor. The controls will guide the plane along the spiral, adjusting throttle and pitch to maintain actual height to match the height defined by the location of the plane along the spiral.

Here is Ben's posting on the subject in 2011.

Best regards,

Bill


T3
Comment by William Premerlani on June 20, 2013 at 3:55pm

Hi Tridge,

The basic altitude/speed control in MatrixPilot is an integrated throttle/elevator control that is based on total energy, with user specified limits on maximum pitch. The controls attempt to fly the plane along the 3D line defined by the waypoints, at the specified speed. It works quite nicely, even if you ask the plane to climb faster than it can. The controls will arrange for the plane to climb as fast as it can manage, without stalling.

Matt Coleman has gone way beyond that, with a rather sophisticated speed/altitude control that is especially suited to sailplanes

Best regards,

Bill


T3
Comment by William Premerlani on June 20, 2013 at 3:57pm

Hi Tridge,

Have you done anything yet with 4D waypoints?

Bill

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service