Autotune failed / Pixracer / overpowered

Hi Leonard and all,

I am building a new quad based on the PixRacer. The copter is a little overpowered, vibrations are very low, and it flies stable and quite ok after some manual tuning. Now I tried Autotune and for the first time I am having problems with it. After Autotune the copter was more than sluggish and crashed because it was not controllable (nothing broke so all fine).
What is strange is that the manual tuning values acutally look too high to me for a 400mm copter with 900kv motors and 1.2kg (without payload). Yet, it flies ok. In contrast the Autotuning PIDs are very low. When tuning it manually I had to increase the ATC_ACCEL_P/R_MAX values to >=100000. Then it was responsive and not sluggish. Autotune returned ATC_ACCEL_P/R_MAX values around 13000.

Question: do you have any ideas or recommendations I should try? The copter drifted a bit and there might be a small COG imbalance. However, both pitch and roll failed pretty much the same way. So it seems tuning was somehow successful. But since it is unflyable I am wondering what went wrong.
I’ll try an autotune again with payload the next days (after it stopped raining…).
You find the log file at:

Thanks and best regards,

Same here, autotuning a 360mm quad. Also I had to reduce AUTOTUNE_MIN_D to 0.001 to get a working tune.

Hi fnoop,
I’ll try to set AUTOTUNE_MIN_D to 0.001 as soon as the weather permits.

I just saw that there might be some problem “with over powered copters taking off with less than 21% throttle”. This seems to be the case with that copter - at least Auto Analysis reports: "Test: Empty = FAIL - Empty log? Throttle never above 20%
However, it flies. So I am wondering about the implications?

Auto analysis report the same for me and autotune not working yet, I have to do more tests, please share results if you find solution.

Just to be clear: that issue is not having a proper THR_MID, you can know more reading Randy’s answer at Problems with 3.4-rc1 on 250 quad

Hi Francisco,
thanks for your reply. However, I do not have any of the probalems listed there, i.e. “no roll, pitch or yaw control in Loiter, the inability to switch back to stabilize and the sudden drop in Land mode”

I looked at your log:

  • it detected that you took off
  • you had THR_MID set to 303, which is almost at the minimum 300

So, yes, it is expected that you didn’t have that issue. I only wanted to mention that the problem you posted isn’t exactly a firmware issue but an improper configuration.

The issue you have is related to tuning and that’s something I can’t help you with. I hope @rmackay9 or @Leonardthall can look at this and help.

Thanks Francisco for looking into this! Greatly appreciated!
I also think it is not a firmware issue because it flies quite ok in all modes. Not really sure what is. It is not my first copter - but the first small one, the first with the Pixracer, AC3.4 and which is overpowered. Since I never had problems with autotune I started this discussion.
What is most interesting is ATC_ACCEL_P/R_MAX. The defaults do not work. It seems the higher the better. In contrast, Autotune returns ~1/3rd of the default.

After a series of autotunes attempts I got one reasonable pitch tune with values 5-10 times higher compared to the failed ones. After transferring these values to the roll axis and lowering them a bit it flies almost perfect.
It seems 0m/s windspeed is required for autotuning such systems. This was unfortunately not the case. So I’ll try again under better conditions. I’ll also make some tests with hardmounted payload dummies.

Hi Thorsten,

Sorry it took me a while to get back to you. Are you sorted would you still like me to have a look at something?

Hi Leonard,
thanks for your reply!
I saw your latest PRs… lots of work… and looking forward to test them. So no problem at all for not replying to this small issue immediately.
Maybe this autotune “issue” is expected as the system is overpowered. However, I was/am a little confused because I never had any problems with autotune. On this copter it works in one out of five cases and only on one axis (so far). I am just wondering if there are some settings worth trying to make it more consistent/stable.
But most probably the problem is pilot interaction. So maybe, as mentioned at DIYD, it might help to pause autotune for about 2-3 seconds after the pilot released the sticks.
Thanks again!

Hi Thorsten,
Has nothing to do with overpowered Racers.
My setup: F550, Mots 2212/920, 3S, 1.8 kg hoover at 45%
Autotuning does not work with AC 3.4-rc1.
Just a small twitch at the beginning and another 30sec after.
Thats all.

I guess what you and @cala2 are experiencing is something different.

I have no problems with running autotune, i.e. it does the dance as expected, but the resulting PIDs are not correct. As mentioned it works in some rare cases. So in my case it has most probably something to do with throttle at hover (which is low), the power of the system (which is high), wind as well as pilot input (which is required to keep the copter within LOS).

I am not sure what might be the problem in your case. It sounds a little strange to me. Maybe you can try to increase the throttle dead band - or adjust throttle slightly after starting autotune. If it then proceeds as expected Throttle Mid is not set properly.

Best regards,

Hi Thorsten,
Thank your for your answer. Throttle Mid ist 500.
Hoovering (Throttle Out) at 400 according to the battery voltage.
I will check with Throttle Mid 400.
Throttle dead Zone is 100. RC3_In is 1494 during Autotune

I am running master, and used its auto thr_mid detection. Still can’t auto-tune… Same… Couple small twitches… No other indication it is working or has finished, etc. (In my case, it is a small 250 size quad).

And about the thr_mid detection, it appears to have worked, and my thr_mid was set to about 260 which is what the old method by looking at the logs was telling me to use. But, alt_hold is still not as good as 3.3.
In 3.3, on this same copter, it maintains altitude… maybe a few inches of drift up and down… W/ 3.4, it’s always drifting up and down by about a meter.

same behaviour on my quad as well, thr_mid is set to 300 but still drifts up and down in alt hold. in autotune it also just twitches a little bit… worked flawless in 3.3.3

Hi everyone,

Please post logs, without that is hard to discover possible bugs. I’ll try to ask @Leonardthall to look at this when you have posted the logs.

Thanks for your testing, it really helps us getting ArduPilot better.

This post was redundant, so I’ve edited it to remove it… All my info and logs already in this and the “what has changed w/ auto-tune” threads.
(So the post below makes sense w/out referencing that other thread, before I edited this I mentioned I have 2 identical copters, other than the flight controllers, auav-x2 w/ 3.3 works perfectly, pixracer w/ 3.4 does not)

Has anyone tried turning off oneshot and then auto-tuning to see if that’s the issue? That’s the biggest configuration change I can think of between the two copters I’ve been playing with… Otherwise the settings are just minorly tweaked (like the PID adjusted by 10%, etc).

(unfortunately raining here for the next couple days, so I can’t try it)