Quest for the perfect flight path...

After some decent results described in my previous post regarding PID tuning for high winds: http://www.diydrones.com/profiles/blogs/pid-tuning-for-high-winds, I wanted to see what it would take to get the best possible flight path with the least amount of flight planning possible. The end result was a three waypoint 90degree corner, as shown below.

 

3689430254?profile=original

 

The problem of course is wind... The above path was with no wind whatsoever, as soon as high winds are added the entire thing falls apart completely, as the plane often missed the last waypoint in the downwind turns and has to circle back.

 

I figured that if I could get a near perfect flight path with just three waypoints on each corner, what if I went back to using a single waypoint, but simply increased the waypoint radius such that the plane had enough room to make a perfect turn. In theory this should at least be flyable in high winds without having to circle back to hit any of the waypoints...

 

Unfortunately this failed as well, due to what I think is the Xtrack entry angle, and possibly a bug, or at least odd behavior from my understanding.

 

It appears that the plane always tries to approach the path at the Xtrack entry angle after a turn, but it also always overshoots the track by a similar angle then has to correct itself. I created the following path by starting with a 90degree Xtrack entry angle at waypoint #2, then cutting that in half for each subsequent waypoint until waypoint #5 where it was 11degrees:

3689430176?profile=originalI can understand some overshoot after waypoint #2 (90degree entry angle), and even #3 (45degree), but #4 (22.5degree) makes no sense to me. Its such a shallow angle there should be no problem whatsoever straightening out at the track and following it right on, especially with a Xtrack gain of 225 as shown below, but Ardupilot is still pointing the plane *off* the track (based on the green line) until its well past, then it finally corrects and gets it right.3689430213?profile=original

 

 

Can anyone explain why the Xtrack entry angle causes the track overshoot after every waypoint, regardless of how low the entry angle is set? Of course the major problem here is that if there is any wind at all this angle needs to be set sufficiently high enough for it to correct for the wind, otherwise the plane is hopelessly lost. 

 

Something seems strange to me...

 

 

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Mike,

    Remember, those flights were probably made with the small WP Radius and the higher Xtrack gain.

    The airframe is a Telemaster.  We will fly tomorrow. 

     

    Squalish, You are right.  A new navigation schema may be needed for the landing task.

    Even if you do get the plane going "straight" in a cross wind, the aircraft heading on touchdown will be off and there is a lot of wing rocking as the plane flies down the "streight" path.

  • For an auto-land, at minimum with a flat field you're going to have to be able to tell it "After this point, minimize roll at all costs, but reduce altitude steadily despite missing waypoints".  A landing strip is a more complex extension of that, with a horizontal boundary component that cannot be exceeded.

  • We've also experimented with high winds, and found that downwind is particularly challenging because of overshoot problems and speed differentials.

    I think Irvin has the right idea for low-wind situations right now, but it seems like this is something that should be handled by extending the concept of point-to-point navigation, to include 'Turning zones' or 'Waypoint Areas' that integrate exit directions, or a point with a narrow 'Aim here' circle, but a wider 'Don't turn back' circle, or perhaps something that varies roll angle with wind.  It should be relatively transparent to the user what is happening.


    Think of what you actually need to do with a medium-FL side-looking camera to circle a ground target and maintain camera-on-target, with realistic wind conditions.  Hundreds of manually-selected waypoints?

    Before tackling that, I would just like to be able to tell APM "I need this line, this line, and this line to be flown very precisely beginning to end with a low yaw/pitch/roll variance & no loops, and I don't care what the autopilot does to in order to get at that angle, measure/correct for the wind, or navigate itself from the end of line A to the beginning of line B".  Is this codable?

  • Irvin: I can definitely land the plane in those conditions manually, as I have had to many times in the past when my Ardupilot attempts failed. They definitely weren't all pretty landings though, thats for sure. In theory Ardupilot should be able to land (and fly) the plane better than most pilots, as I don't know many pilots with a constant 10hz response rate. ;)

     

    I've tried multiple waypoints all the way to the final landing waypoint, no more than 100m or so apart and even moderately gusty wind foiled my plan everytime.

     

    As mentioned above in this blog post, setting so many way points like that *especially on final approach* is a recipe for disaster in high winds, because when your 10-20m off the ground with trees near by, and the plane misses a waypoint, it can often try to circle directly into a tree, or even small hills at that altitude. Or even worse it doesn't have the altitude or airspeed to circle at all. Increasing the waypoint radius also doesn't help, as that introduces potential error, 30m radius on your waypoints is already wider than most places I have available for landing.

     

    Having less waypoints and better track following is much safer way to go... If it can work...

     

    The screenshots of your flight path, what airframe were you using?

  • Mike,

    How about multiple WPs in line even before you start the decent.

    Can you land the plane manually under the conditions you described?  If so - APM should be able to too.

    A very interesting project.  We will be flying the Telemaster along a cliff edge with the runway 90` to the prevailing wind.  It would be nice to "AutoLand it.

     

    Here are my PIDs:

    3692293664?profile=original

  • Irvin: See my previous blog post about high winds: http://www.diydrones.com/profiles/blogs/pid-tuning-for-high-winds

     

    Its highly unlikely that you would be able to land your plane in those winds as your track error is wider than the airport runway in your screenshots. My eventual goal is to be able to auto land my plane on a dirt road, much narrower than any runway, with trees on either side, but still easily doable with decent track following. This is not a problem at all with no wind, but in the mountains having no wind is like finding a pot of gold at the end of a rainbow. ;)

     

    Lowering the Xtrack gain doesn't appear to be the solution to my problem... Though I would be curious to see your PIDs either way.

  • Mike,

    Assuming the Servo and Nav PIDs are adjusted good HIL flight paths can be achieved if you adjust the WP Radius to the turn radius of the aircraft, and reduce the Xtrack gain to 10 or below.

    Here are my results:

    3692293497?profile=originalI then set the wind to be 12K from the Northwest, adjusted the Xtrack gain to 2 with this result:

    3692293430?profile=originalThe bigger WP Radius and much lower Xtrack gain made all the difference for me.

    Hope this helps.

  • You can start from k1 = 0.3 and k2 = 3. Roll limit = 30°. Xte limit = 500m.

  • You should think about throwing heading loop out. Best result gives navigation loop over roll loop. Navigation loop is roll_setpoint = xte * k1 + dxte * k2, where "xte" is crosstrack error (should be limited to avoid circling far from path), "dxte" is xte derivative. You can also substitute "dxte" by a * w, where "a" is angle in radians between path vector and ground speed vector, "w" is ground speed module. Then tune k1 and k2. And of course use turn prediction.

  • Is the heading loop measuring heading or track made good?  If it's heading, then the heading loop and all loops inside that will be operating with respect to an air-fixed coordinate frame.  Assuming a uniform wind field then these loops (and all longitudinal loops as well) would be unaffected by ground speed or wind speed and their dynamics would only vary with airspeed.  The crosstrack loop is referenced to the ground coordinate frame and therefore its dynamics will change with ground speed.

This reply was deleted.