QAUTOTUNE - VTOL autotune for quadplanes

Thank you for the detailed response and tuning clarifications.

Didn’t realize QHover was the quadplane version of althold until now.

This helps a lot! Looking forward to testing it tomorrow.

1 Like

Hi @Leonardthall ended up with a successful day and got AUTOTUNE to work with pitch and roll successfully.

We ended up using an aggressiveness of 0.05 and was wondering if increasing the aggressiveness tends to provide significant stability improvements, or if 0.05 is suitable for larger frames.

Also would increasing the minimum autotune D value decrease the time spent in autotune mode?

Thanks to you and Leonard for all the info in this post. Most helpful. I’ve had some issues using Autotune with my Skywalker and found this info most interesting.

1 Like

In general you should always start with AUTOTUNE_AGGR set to 0.1. This is a conservative value and there is no reason to go lower here. This value defines the overshoot plus noise. In a perfectly clean aircraft the ideal value for disturbance rejection is 0.1 but 0.05 is ever so slightly faster. So when you factor in a little noise you get a nice safe range. The risk to going lower is any noise on your system can quickly cause autotune to fail so 0.1 or 0.15 for a noisy aircraft are good. (fix noise if you have it use 0.1).

2 Likes

We have a large VTOL aircraft that can only hover for 4 minutes, while attempting to autotune roll axis it took too long and we had to land before it was complete. Landed in Autotune mode and disarmed but the tune seems to have not saved. Is there a way to complete it faster or land and continue after a battery swap?

Tried Qautotune in pitch to see what sort of improvement could be made to the aircraft but kept getting the ‘failed to level’ message. Could having a q_trim_pitch offset be an issue?

You need to do a manual tune. Autotune requires your tune is good enough to effectively level the aircraft and recover from a disturbance disturbance.

Okay I’ll have to give it more attention - thanks for the quick reply. I just assumed it was able to handle autotune because I was pretty happy with the responsiveness after setting the params outlined in Tuning Process Instructions — Plane documentation.

What is the tolerance on that levelling requirement out of curiosity?

Also while letting the autotune run, it was moving around a bunch ~10 m radius circle (no wind, engaged from QLoiter). Do you think that is related, expected, or a separate issue?

It could be your position control tune too if you are using Loiter. You could try from Alt_Hold. The aircraft will drift but there is less going on.

Okay worth trying thanks - It does hold position really well generally in Qloiter but it will be easy enough to give it another shot from Qhover. I know for certain the Yaw tune is poor (still transitions fine) but does that need to be good for Qautotune in Pitch to succeed?

No, as long as the reaction in Yaw isn’t large enough to mess up the pitch measurement. So I don’t expect so.

I am trying to qautotune a tailsitter and after about 6 minutes or so, it stops twitching. When I land without changing mode, and then disarming, I do not see any of the PIDs changed. I am basically saving the parameters to a file and looking for changes. Is there an indication that qautotune finished or has not (something in the log/visual on mission planner)?

I’ve been trying for a few days without any success.

https://ardupilot.org/plane/docs/logmessages.html?highlight=autotune#atun

Thanks, I don’t have ATUN in my report, but I have QTUN (which I guess makes sense since it’s a qautotune).

I am not sure how to know if tuning is complete.

I just checked an old log with qautotune, and it is full of messages like

2019-09-05 08:51:57.830 AutoTune: Twitch
2019-09-05 08:51:58.357 AutoTune: (R) Rate D Down
2019-09-05 08:51:58.357 AutoTune: WFL (Angle(R)) (6.557760 > 5.000000)
2019-09-05 08:51:58.357 AutoTune: p=0.108072 d=0.011298
2019-09-05 08:51:58.357 AutoTune: success 2/4

and in addition to QTUN, it has ATUN records that look like this:

2019-09-05 08:54:51.94: ATUN {TimeUS : 446577116, Axis : 0, TuneStep : 4, Targ : 10.340813636779785, Min : 8.9099998474121
1, Max : 9.59000015258789, RP : 0.21025855839252472, RD : 0.007890054024755955, SP : 12.53683090209961, ddt : 89641.609375
}

TuneStep runs from 0 to 4

So I expect you should have ATUN records in your log too.

Unfortunately, I don’t these messages. Here is a link to my bin:

https://drive.google.com/file/d/1Keqi5GvqoCajovFoEpYCpL1hW6RrUuSl/view?usp=sharing

You never entered QAUTOTUNE mode in that log, which explains the lack of ATUN records.

My bad… That was the wrong log :slight_smile:

I do see similar messages:

MSG, 1633952310, AutoTune: (R) Rate D Down
MSG, 1633952391, AutoTune: Leveling (Angle(Y) 6.5 > 5.0)
MSG, 1633952491, AutoTune: p=0.176930 d=0.022348
MSG, 1633952545, AutoTune: success 2/4

What indicates the completion of qautotune? And, is it possible to get the tune results from the log since it was not saved?

Update: It’s all clear now. Thanks for pointing me in the right direction.

What does the last value in ATUN (ddt) stand for?

That would be the maximum angular acceleration during a “twitch” in deg/sec/sec