Autotune guidance

I didn’t do any real work - It’s all Leonards hard work, I reproduced his graphs in Excel to derive the formulas.

Ok, according to what you say, I will consider steps 7 & 8 as being optional steps then. I just tuned my Roll axis, skipped the Autotune documentation steps 7 & 8 and it did save the new values. Thanks.

1 Like

After a successful roll autotune and an aborted Autotune pitch only attempt, I just checked my parameters and see that my ATC_ACCEL_P_MAX changed from “108700” to “0”. I got the value 108700 from the spreadsheet priveded by @xfacta - Should I change this back before attempting Autotune on the pitch again? When compare parameter from before the roll autotune and after the roll autotune, I see it was thesuccesful roll autotune which changed it, but that seems odd because in the roll autotune, it got a precise value for the ATC_ACCEL_R_MAX, and I don’t think the ATC_ACCEL_P_MAX should’ve changed… Am I correct that ATC_ACCEL_P_MAX being the maximum pitch angle, is the reason Shawn’s spreadsheet gives a value to limit the amount of tilt angle allowed?

I also noticed as I was flying it out to autotune the pitch that it was pitching very hard, like looked like it was about to flip if I was hard on the sticks, so I think this is related.

Yes, change it back.

Send a log of that flight if you can.

1 Like

Just to be clear, I know the wiki is a bit out of date on this. The only thing required to save gains is to disarm in autotune mode. You can switch into whatever other modes you like but it is not a requirement. Switching out and back lets you try out the new gains but it is not required. If its all going well just land and disarm in autotune, other wise you can land in stabalize and switch to autotune with minimum throttle then disarm.

1 Like

This is the log from my successful roll autotuning:

And this is my aborted autotune of pitch:

The reason I aborted was I decided to yaw by 90 degrees so that the pitch wasn’t affected by the breeze as much, as in, turned it into a crosswind instead of a tailwind. Then the breeze picked up and blew it kind of far away and I nearly lost track of the drone’s heading, so it got a little scary watching the drone drift away and not being able to see which way it was headed. Oterwise, the pitch autotune was going as planned other with the exception of the fact that the when I’d go full pitch forward or back, it was really harsh looking.

The other parameter that changed was ATC_RATE_FF_ENAB. It changed from “1” to “0” after successful roll autotuning. I figure it’s supposed to have changed, but if I’m wrong, will you please let me know?

On a separate note, you might notice in my log file that after all that flying, I got it landed and my battery still showed as having 98% on QGroundControl. My battery monitor has been working fine otherwise, but when I went to arm it again, it still showed 98% full and at the same time failed a pre-arm check due to low battery failsafe. I figure it was a glitch or problem with QGroundControl, battery or telemetry but I’ll deal with that bit next attempt at autotuning my pitch since I don’t see any changes in my battery related parameters and the failsafe still seems to work (plus I am only flying short flights.)

Actually… I went to upload a short clip of the extreme tilt angle I saw, and when I did, I see in at least one place where the roll is also pitching so extreme:

And I think this is because I also reverted my PSC_ACCZ_I & MOT_THST_HOVER back to defaults… I think I will tone those down a bit from defaults, maybe to values given by the Tuning Process Instructions. and with accordance to your advice:

So… Maybe the pitch thing is not related afterall.

I am still not sure if I should revert ATC_RATE_FF_ENAB back to “1” (is at “0” now after successful roll autotune, which is when it changed) …?

I’m sorry if this wasted your time but thanks again for your help.

Out of curiosity. If you have retractable landing gear. Should you autotune gear up or gear down?

1 Like

I will have this question too when I get ready to tune my s1000, which will be when I am done setting up the X8. My plan is to start with the X8 as practice, then do the s1000 since it’s going to carry some expensive filming gear.

Ha. This is directly related to my X8. Lol

1 Like

Tarot TL65B44? or…? I didn’t even know I could add retractable landing gear for it… Oh the possibilities… Don’t get me started… :money_mouth_face:

Oh wait… mine is 3DR X8. Yours might be different x8…

Mine is the Tarot X8 V2

1 Like

You started the tune with ATC_RATE_FF_ENAB set to 0. Probably after doing the stability check.

This should be set to 1 after a successful autotune.

Yeh it is working correctly in the log.

1 Like

Upon double checking, I see you’re right. What I do is “save to file” in Mission Planner after I make any changes. That is how I compare changes and am able to revert back at any time or see what changed, etc. I should probably look into how to analyze the log files…

Ok, so I will set this back to “0” for now, since I’ve only tuned one axis successfully (Roll). After successful pitch autotuning, I’ll set it back to zero again before I autotune the yaw, since any successful autotune seems to change it.

That makes me feel better. THANKSx1,000,000

@vyoufinder as a side note, QGC doesn’t pick up the voltage if you disconnect the battery and re-connect it. I now know that whenever I pull the plug I need to disconnect also QGC. A bug or limitation in QGC. It pulls all params from fc but power values are stuck. Are you connected thru Bluetooth

1 Like

I Autotuned the pitch today, so that makes Roll and Pitch both Autotuned now.

Again, I got some unexpected results. The unexpected changes are:
ATC_ACCEL_R_MAX changed from “45237.83” to “0”
ATC_RATE_FF_ENAB changed from “1” to “0”

and the expected changes for pitch:
ATC_ANG_PIT_P changed from “2.68013548851013” to “4.5”
ATC_RAT_PIT_D changed from “0.00100000004749745” to “0.0036”
ATC_RAT_PIT_I changed from “0.039913285523653” to “0.09”
ATC_RAT_PIT_P changed from “0.039913285523653” to “0.135”

I am wondering why my ATC_ACCEL_R_MAX would change?

Then I assume I should set my ATC_RATE_FF_ENAB back to “1” before I Autotune the Yaw?

I think it was set to 0 to start with.

I think you got the from and too mixed up. If ATC_ANG_PIT_P goes small that is a sign of a bad tune.

It was… But I changed it from “0” to “1” before I did the pitch tuning. Should I not have done this?
See:

You’re right… Looks like it didn’t tune well then. I’ll try again tomorrow if the wind cooperates.

Is it also true that if ATC_ANG_RLL_P goes small, then this is also a sign of a bad tune? Because that happened when I tuned my roll.

When I went to tune today, the copter was acting weird too. When I took off, it took off to one side and then whenever I’d pull back on the the aileron and release it, it would always yaw counterclockwise. I thought it was the battey maybe not being centered on the roll axis, so I adjusted it, and continued on. To be honest, it handled great before I started autotuning. Better than it handles now, but I’m hoping after I Autotune the yaw, it fixes it.

Is it normal that my ATC_ACCEL_R_MAX changed while doing pitch only Autotune?

…Actually… I think I’ll just load my parameters from before I started Autotuning and start the entire process over since I am thinking my roll tuning didn’t go as well as I had thought… It handled great before I started Autotuning it. It will probably save us both some trouble. You’ve taught me a lot, but I’ll take less of your time starting over I think, and my time too. Thanks for all the help.

Not connecting through bluetooth. I’m using a micro usb male to micro usb male wire. My battery acts eird I think because restarting QGroundControl as well doesn’t fix it. Not even forcing the app to stop and deleting the cache files helps. No big deal though, the battery failsafes work, and powers fine, charges fine. I’ll just use a plug on battery monitor with alarm.

Started fresh and tuned my Roll only… I think I am getting a bad tune (again):

ATC_ACCEL_R_MAX changed from “108700” to “19890.041015625”
ATC_ANG_RLL_P changed from “4.5” to “1.7825129032135”
ATC_RAT_RLL_D changed from “0.0036” to “0.0029322225600481”
ATC_RAT_RLL_I changed from “0.09” to “0.0424908101558685”
ATC_RAT_RLL_P changed from “0.135” to “0.0424908101558685”

I think it my ATC_ANG_RLL_P changes from bigger to smaller then this is a sign of a bad tune? If so… What would cause this (second time.) I had almost no winds, and was setup properly according to the Tuning Process Instructionshttps://ardupilot.org/copter/docs/tuning-process-instructions.html.

Here’s my log file in case it helps: https://drive.google.com/open?id=1ZK31MEip9Z07cfTBpZdxIodvTRxfKJy3

I suspect it could have something to do with my MOT_THST_HOVER being very low. I get a warning message in Mission Planner when I set my

PSC_ACCZ_I & PSC_ACCZ_P that PSC_ACCZ_P it is out of range (should be between .5 & 1.5), but I am setting it based on the Tuning Process Instructions, as such:

PSC_ACCZ_I to “0.3547712”
PSC_ACCZ_P to “0.1773856”

My MOT_THST_HOVER is set to learn, and is currently: 0.1821767 It learns and varies slightly, It stays around this level.

My motors spinning parameteres are as such:
MOT_SPIN_ARM: “0.1”
MOT_SPIN_MIN: “0.15”
MOT_THST_EXPO: “0.65”
ATC_THR_MIX_MAN: “0.1”
AUTOTUNE_AGGR: “0.05”
and I have 10" propellers and a 4 cell LiPo battery.

This is on a 3DR X8 octoquad.

My full .params before tuning:
Autotune6-StartingOver_r2MOT_THST_HOVERCHANGEautotuneready.param (17.3 KB)
and my full .params after tuning Roll only:
Autotune6-StartingOver_r3autotunePITCHready.param (17.3 KB)

I really want to figure this out. I’ve tried Autotune 5 times, and each time, I get a bad tune, but each time is setup the same so I suppose I should not expect a different result. What am I doing wrong?