Autotune P and I Values the Same (?)

Need some advice: I’m running ArduCopter v3.6.8 on a 680 H4 frame with PixHawk4 (https://rotorbuilds.com/build/18468).

Maiden Flight: I used default PIDs and it flew well. Downloaded and looked at logs as described in the “First Flight with Copter” section of the doc (LOG_BITMASK set to default+IMU). All looked good (response, vibration, etc).

Second (Autotune) Flight: I ran the Autotune (grit my teeth with aggressiveness set to 0.1). Autotune completed successfully for Pitch and Roll. I flew the default vs. autotune PIDs at the end of the flight and the autotune PIDs seemed similar but somewhat tighter overall as expected.

When I looked at the default vs autotune PIDs in Mission Planner, I noticed something strange:

Autotune PIDs (with default values in parentheses):

* Stabilize Roll (Error to Rate) = 8.840641 (default was 4.50)
* Rate Roll, P = 0.09606013 (default was 0.135)
* Rate Roll, I = 0.09606013 (default was 0.090)
* Rate Roll, D = 0.00527265 (default was 0.0036)
* Rate Roll, IMAX = 0.5
* Rate Roll, FILT = 10

* Stabilize Pitch (Error to Rate) = 11.78815 (default was 4.50)
* Rate Roll, P = 0.1167617 (default was 0.135)
* Rate Roll, I = 0.1167617 (default was 0.090)
* Rate Roll, D = 0.00824510 (default was 0.0036)
* Rate Roll, IMAX = 0.5
* Rate Roll, FILT = 10

The P and I values are EXACTLY THE SAME! This is true for both Pitch and Roll. It’s as if the value of one of the parameters got stored for both the P and I values (?)

I thought I could maybe figure this out by looking at the log file, but I had set the LOG_BITMASK back to “default” (830 -> ATTITUDE_MED, GPS, PM, CTUN, NTUN, CMD, and CURRENT) before the autotune flight and no ATUN or ATDE parameters were captured. I assumed that the ATUN and ATDE would be logged since there was no reminder in the “Dataflash logging” section of the doc under autotune to set the LOG_BITMASK to anything besides default - I should have researched further.

So, my questions are:

  1. Is it typical to have the P and I values be the exact same after autotune (as above)?

  2. How should I set the LOG_BITMASK to capture the autotune (ATUN and ATDE) parameters? Is it the PID (12) bit that I need to set? Is there a better description of what is captured for each of the mask bits (i.e., what does setting bit 12, the “PID” bit log?)

Thanks!

I dont know enough to say whether or not that is expected behavior, but I can tell you that my auto tune resulted in the same - P & I were equal.

I had to return my Cube for the service bulletin, and im just now setting up my replacement. Havent flown autotune on the new cube yet.

1 Like

P and I are always the same in auto tune… It’s always ‘good enough’. You’re certainly able to fine tune your copter and adjust those values from what you get in auto tune.

1 Like

Thanks for the insight. I just found it odd – at first glance, it appears that one of the values is getting copied to the wrong parameter. I guess setting the two values to be equal a good starting place to start fine tuning (?) Since this is my first time tuning a big quad, I am looking for good ‘rules of thumb’ or some additional steps to check/improve the tuning. Such as the comment in the doc that says something like, “When D is too low, you will experience the worst prop wash oscillations in vertical descents” – something I can test and relate one to one.

Oh, also, what is the best way to turn on the ATUN and ATDE parameters in the log with LOG_BITMASK? I don’t want to bog down the processor unnecessarily, but want to capture the tuning details. What bits should be on? Is there a good reference for this?