Developer

Loiter PIDs

I built a quick sim today to look for the optimum PIDs for Loiter:

 

What's looking good is 

 

Loiter_P = .5 or .6  (more = some overshoot, but not much)
Loiter_I  = zero       (Just say no)
Nav_P    = 4   (Higher than I thought, What will it do to navigation?)
Nav_I  = .25         (Higher than I though, but still large like it should be)
Let me know if anyone proves this out!
Jason
 

http://wiki.ardupilot-mega.googlecode.com/git/images/copter_wp.swf


 

Here's why Loiter_I is a bad idea. It just ends in overshoot.
3690892552?profile=original

 

 

Here is Loiter_P from  .5 to 1.8 (lower looks better)3690892493?profile=original

This is Loiter kp 1, Loiter kI 0, Nav_kP 2 through 10, Nav_kI .2 

3690892565?profile=original

 

Here it is in action:

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

Join diydrones

Email me when people reply –

Replies

  • on the 93 version, NAV_LOITER_I = 0 and its still overshoots, the must be a finer range parameters

  • flew four waypoints last night.  After hitting #4 would not RTL.  Planned new mission with two waypoints, same thing.  Attempted auto takeoff, copter speeded to waypoint 1,  i flipped to stabalize but couldnt recover.  throttle was set at minimum (my fault). flying Y6 with 750kv motors, running 2.0.47. stabilize great,  alt hold so so,  loiter radius too big and fast.  

    2011-10-13 12-34 1.log

    2011-10-13 12-34 1.kmz

  • There can be integral windups.

    This occurs if a disturbance such as a wind gust occurs and the steering pressure against it cannot overcome to reach a waypoint. I am not sure of the pid method used with the arducopter. I presumed that the Imax is the limit that stops integral windup?

    Here is a video if two different pid methods.

    The disturbance would be interpreted as the wind pressure in the copters case.

    http://www.online-courses.vissim.us/Strathclyde/WindupMovie.wmv

     

    http://www.online-courses.vissim.us/Strathclyde/WindupMovie.wmv
  • Hi Jason, I don't suppose I can get you to answer my question at this post?

    Sonar attitude compensation

    Thanks man, your work is awesome, and we all appreciate your efforts

    regards,

    Owen

  • There were some great flights today under Auto mode.

    Integrals on both Nav and Loiter were set to .001 There was no wind.

    What I observed was each time the copter began its approach to the next waypoint once it hit the maximum speed it rolled back to a stop. Then forth again in a wave like motion. Once at the derived waypoint it stopped pointed to the next waypoint with the same approach speed going up and down. Is there a derivative toward the speed m/sec, mph?  The waypoint distances are small 100 m point to point. Possibly the GPS is not accurate. However i've found a garmin handheld accurate with groundspeeds. Also the IMU had to be rebooted after configuration changes were sent from MP otherwise the sonar was disabled. Attached is the log done today.  MP 1.0.79  w Arducopter 2.0.46

    Flying with no wind is enjoyable.

    2011-10-08 1.log

    https://storage.ning.com/topology/rest/1.0/file/get/3692282751?profile=original
  • On the 47 ver i have set the compass to the north, but when i rotate it 180 to the south there is 20 deg differences for the real south.

     

    Any clue?

     

  • Jason,

    It have problem last code 2.0.47 . when i will change mode (ALT or Loiter) and I change back to Stabilize mode. I can't Throttle control and slow down on ground (No crash). and I down throttle and up again. I just normal control. Now it's problem about throttle when I will change mode to ALT or Loiter ..... Edit Now!! Please........

    thank you , Balloon

  • Developer

    I updated the simulation to include all of the PIDs, motor Kv, and thrust. 

    It's a bit of a hack, but seems to work well.

    enjoy

    Jason

  • I tried (2.0.46) Loiter_P=.6, Loiter_I=0, Nav_P=4, Nav_I=.25 last night in 9 to 10 mph gusty winds and performance seemed pretty good, but it got dark too quickly to really flesh it out.  I noticed much less oscillation about the set point though and the log definitely look better.

     I flew multiple flights (10 or so) at dusk earlier this  week (Monday, Tuesday, Wednesday) with no wind (much better weather) before your sim came out  and tried varying Loiiter_P and Nav_P with chn 6 but never got above 3.0 for Nav_P and  below .9 for Loiter_P and always had some oscillation. Your sim is very much agreeing with what I saw and it is really helpful. Now I have a better feel for the parameters and I will be out all day on Saturday in the wide open spaces to flesh out - although the wind forecast is creeping up to 10 to 20mph for Saturday.

  • Thanks Jason

    I think this is exactly what I want to start.

     

    Problem is night time now and rainy. Hopefully tomorrow early I will have a go at this and advise.

This reply was deleted.

Activity

Jose Araujo liked Jose Araujo's profile
Aug 29
spencer harvey liked spencer harvey's profile
Jul 9
More…