T3

3689531408?profile=originalThe 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.

3689531081?profile=originalThis 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

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • T3

    Hi Robert,

    The change we made (using course over ground instead of heading) was trivial to make, so I do not have any documentation. The change was enabled by some previous work on using the IMU to compute position. This solved a problem we had run into earlier when trying to use GPS course over ground for navigation: the latency of the GPS created feedback instability.

    As far as the navigation algorithm itself is concerned, what we now do is to compare the course over ground needed to get to the desired location with the actual course over ground, and turn accordingly (using your favorite PID control loop.) By using course over ground, you eliminate the need to know the wind vector.

    Here is a link to the MatrixPilot navigation code.

    Best regards,

    Bill

  • Absolutely geniuses at work!

  • Moderator

    Curved approaches will add that scale effect to Spitfire landings marvelous. Putting the platform back into wind at the bottom of the circle would of course be first prize.

  • Hi Bill,

    Fantastic result of a teamwork! Thank you all guys!

    Best regards

    Nick

  • Developer

    Thanks for all the links Bill! Lots to think about. We don't have an equivalent to your LOGO scripting yet, but Kevin Hester is working on adding Squirrel to PX4 to fix that (currently codenamed "FlyingSquirrel").

    We haven't done anything with 4D waypoints yet, apart from some vague thoughts about adjusting the target airspeed based on predicted time to the next waypoint. Nothing implemented yet.

    Cheers, Tridge

  • T3

    Hi Tridge,

    Have you done anything yet with 4D waypoints?

    Bill

  • T3

    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

    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

  • Developer

    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

    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

This reply was deleted.