Arducopter 2.3 tuning Stab_P for Nav video scenarios

Hello again everybody,

Round two of "organized testing"...today I decided to keep my Nav settings from last time(see previous blog post) and only play around with the Stab PID parameters to see what kind of effect they have on Loiter. I started off by increasing my Stab_P from 3.5 to 5, then to 6, and finally to 7. I noticed a significant improvement overall ability to loiter(no random motion) but there is still quite a bit of drift, which I believe improved as the P term increased. Now when I look at the videos I took this morning, I realize the major problem  with Loiter is that it seems to drift the first time you enter from stabilize, then depending on the P value, it will stop faster(high P) or slower(lower P) and attempt to loiter. You can see that all 3 attempts in the video start off with a drift(because I had just entered loiter from stabilize) and then loiter starts happening. As you can see there is some twitching especially around the Stab_P=7, so I did some more aggressive tuning of Stab_P/D as well as Rate_P indoors after I came back which not only eliminated most of the twitching but also made the copter more solid in stabilize mode in terms of it's tendency to drift...unfortunately I ran out of batteries before I could test these new Stab/Rate settings with Loiter...will work on them a bit more indoors and try again by the next post.

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • I see what you mean...however I don't think it's really unexpected given the nested control loop of engine power proportionality(the Stab_P) and the Rate of angle change(the Rate_P). Basically you can alter the feel of the copter by either changing how much power to apply to correct for angle error or by saying how fast that error should be corrected(at least this is how I understand it). Play around with the flash demo on this page  http://code.google.com/p/arducopter/wiki/AC2_Tweaks (zero out the Nav and Loiter terms to basically have it fly in stabilize) you'll notice that there are more than one way to get the copter to correct for angle errors, but only a few combinations that will actually achieve stability.

  • Hi Ihab,

    Recently, I tried using the tuning process shown for a different platform (openpilot). See the second video on this page:

    http://www.openpilot.org/getting-started/

    The idea is to fly it in rate (ACRO) mode and tune the gyro parameters (i.e. Rate_P) and then go to stabilize mode and tune Stab_P values.

    Previously, for Arducopter, I had tuned it entirely in Stabilize mode. I had kept the Rate_P around default and had to increase the Stab_P values a bit.

    So the confusing thing is that with one method I have to increase Rate_P by 4x and decrease Stab_p by about .67x. Or I can keep Rate_P at 1x and increase Stab_P by 1.5x and in both cases it flies about the same. Strange.

  • Hi Ihab,

    Thanks its one of mine ;-)

    http://www.quadframes.co.uk/index.php?page=shop.product_details&amp...

  • Hi Sanjaya,

    My initial "soft" configuration was basically the same as you described except that with the default Stab_P rate I found that it's impossible to get rid of the fast oscillations without dropping the Rate_P value below .1(I had it set at .063...after doing channel 6 tunning). With that the copter was little bit uncomfortable to control(would change directions fast, but recover slowly...kind of like a fixed pitch helicopter)...so I had to drop the Stab_P term even more to even things out.

    Yesterday and today, and after reading some of the other posts on tuning for navigation, I decided to make the settings on the high side(more aggressive immediate control) to see if my loiter and RTL functions would improve...and they actually did.

    Did you try leaving Stab_P at default and drop Rate_P until oscillations are eliminated? I basically got this idea from the tuning wiki which says the main term to tune is Rate_P and to drop the term if there are 5-10Hz oscillations.

     

  • Nice y-6 Graham, what frame are you using?

  • Ihab, how did you determine the Rate P values? In my case I found that I had to increase Rate P (to 0.6) and decrease Stabilize P (to 3.0). That's totally the opposite of what you are doing for your quad.

    To determine Rate P values, I went into ACRO mode (which, I believe, doesn't use the accelerometer) and found I had to increase the Rate P values by quite a bit. Then I went to STABILIZE mode and had to substantially decrease the Stabilize P values to stop it from wobbling.

    Now I wonder if I went about it all wrong ...

  • Hi Ihab,

    Thank you that will help me when I get some better weather to try out the new code 2.3 on my Y-6

    3692351867?profile=original

  • Hi Graham,

    Yes absolutely and sorry I didn't include it to start with! Here are the last parameter sets used for this test.

     

    3692352081?profile=original

  • Hi Ihab,

    can you please take a screen shot off your settings and post under the text next time please? this would help...

This reply was deleted.