https://www.youtube.com/watch?v=cipTQAUM-v4

Note** these are 100meter orbits with really strong winds to provide a setting for this test. Hence the reason why the autopilot has a hard time holding a perfect circle. However the improved algorithm is holding so much better in the high wind scenario than the original algorithm!

This is an example of how to eliminate the oscillation in ground track using a heading error>bank angle type proportional controller. The groundspeed of the vehicle determines its turn rate for a given bank angle. Typically you tune the PID (only P is needed) for a given trim airspeed and assume that the ground speed is fairly constant and something close to the airspeed. However when there is high winds, this isn't the case. The ground speed can change +-50% in some cases in and out of phase with the wind if not more.

This causes oscillations on the "upwind" side because the turn rate is so much higher. To take this nonlinearity out of the system, I added the turn rate equation into the mix and solved this problem. The largest contributor to this problem is the GPS lag. So using this turn rate equation in the middle, it makes the controller more predictable with the changing ground speed.

I made an attempt at a video so hopefully it will better explain what is going on here. Especially beings a lot of people are having this problem!

-Beall

Views: 501


Developer
Comment by Ryan Beall on March 31, 2010 at 11:46pm
Sorry the sound is so bad on the video, Youtube really pulled a fast one on the "processing" phase!

Developer
Comment by Doug Weibel on April 1, 2010 at 5:40am
Hey Ryan,

Did the "old" algorithm in the simulation have the de-weighting? IE something like

nav_gain_scaler = ground_speed / TARGET_AIRSPEED;
nav_gain_scaler = constrain(nav_gain_scaler,0.6,1.3);

I assumed from the oscillation pattern that it did not or was turned off, but in the video you said it was used. If the old one did have the de-weighting scheme in place then this is a fantastic improvement ;)

It would be interesting, since you now have an easy tool to see it, what effect changing the constraint values would have on the old algorithm and the new algorithm.
Comment by Paul Bizard on April 2, 2010 at 1:07pm
Pretty interesting study. Did you model your own airplane ?

Developer
Comment by Ryan Beall on April 2, 2010 at 9:02pm
No it was your stock airplane P.m

Developer
Comment by Jason Short on August 31, 2010 at 8:33pm
Hi Ryan,
Checking this out again and I still don't follow it. Do you have any code or pseudo code?

Developer
Comment by Ryan Beall on August 31, 2010 at 8:39pm
I thought I hadn't actually done any documentation here.....Sorry, I'll write it up here soon and send it your way.

Developer
Comment by Ryan Beall on September 12, 2010 at 1:18am
Here is the quick documentation I came up with today. Hopefully this helps.

http://dl.dropbox.com/u/2884350/Improved%20Heading%20Hold%20Control...

-Beall

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