X8 Attitude-Altitude conflict... Safe to set MOT_THR_MIX_MAX above 0.9?

I’ve posted on github about this in an existing topic, but not sure if it’s been seen ([issue #1971]).

To describe it simply:

Copter is in stabilize mode, with significant horizontal velocity (>10m/s) and is also climbing at a significant rate.

RTL is then engaged, which causes huge instability in the attitude of the copter.

It seems to me this is caused by the RTL attempting to stop climbing (with very low motor output) whilst also attempting to yaw to home direction and simultaneously attempting to move horizontally to the home position.

In my case, this caused the copter to almost rotate upside down momentarily when RTL was engaged.
It recovered from this but I suspect others might not be so lucky.

My flight logs are attached in the github post.Flight Log

Running AC 3.4.5 Octaquad

I can definitely see this happening. Perhaps the RTL execution can be modified to include doing a “brake” first. That would allow it come to a less violent stop first. Then once it’s stopped and stable, proceed with the RTL to include the yaw behavior.

I’m wondering if there is simply a parameter that can be adjusted to prioritise attitude over altitude in this scenario, or whether this is something that needs to be address in the code.

Brake before RTL could be the answer, but I don’t know if the logic is that different in brake mode and whether the instability would happen anyway. I’m not about to test this on my X8 but I might do some experiments with an F450 clone if I have time to put it back together.

Really, we need one of the devs to kindly take a look in case I’ve simply got this all wrong and have done something stupid with my setup.

I’ve just tried as hard as could to replicate the issue with a 450 sized quad with 9" props, but no matter how hard I try, it won’t overshoot by more than 5-10 degrees when entering RTL at speed, so this seems to only be an issue with larger machines / props.

I just found this in the Copter documentation:

After you have a good tune, you may wish to increase ATC__THR__MIX__MAX (or MOT__THR__MIX__MAX in Copter-3.3) to 0.9 (default is 0.5) to increase prioritisation of attitude control over throttle. This can reduce the pitch overshoot sometimes seen (especially on copters with large propellers) in AltHold if the vehicle suddenly slows after performing fast forward flight.

Seems to be exactly what I’m looking for!

If anybody has experience with this setting on a large X8 / Octo I’d be interested to hear from you…

I changed MOT_THR_MIX_MAX to 0.9 on my X8 and the overshoot is much smaller but still there.

There’s a slightly cryptic note in a commit from AC3.4.3:

'The parameter description maximum of 0.9 should keep most users from setting this parameter above 0.9 but there are rare cases for very high powered copters with low hover-throttle values where setting as high as 2.0 improves attitude control

Does my setup qualify for going above 0.9?
(X8, 6s, 5208-340kv, 17" props, 10Kg AUW. Hovers with CTUN.ThH of 0.17.)

@Pedals2Paddles not sure if you’re flying anything of this size / power but your insight is much appreciated.