Airmode not keeping quad stable for flips/rolls w/throttle low

The fact is that I was looking for help here. I have quite some experience with AP but I really not yet get why all this settings are needed.
On INAV for instance there is not such distinction of mixer settings. The motors aways get the authority the need to keep the machine attitude as requested by the FC without much trouble other than indeed bounces on landing, expecially for little machine like the one you say to have.
I’m running a 450mm sized copter now just do some testing and improvement before loading the firmware on a bigger machine.

What really bothers me is that if you are let’s say in STAB at like 50m elevation. You cut the throttle to zero, the machine starts to fall and after some instants it completely loose attitude unless you patch the code (or use your PR) and force MAN mixer to high values (which I don’t still get the meaning of it).

What does setting ATC_THR_MIX_MAN to 3 mean for instance?

1 Like

I think @Leonardthall will need to chip in here - I am unclear on the exact specifics.

But I think it’s safe to say that high mix man is not great for large copters where bouncing is probably unacceptable.

1 Like

Bouncing is not indeed acceptable, but I don’t get why ATC_THR_MIX_MIN is forced to be so low, basically during landing if the copter needs for some reason to respond to some external influence its ability to keep the attitude is strongly reduced. Just to say one of the issues I can foreseen

1 Like

The code will use MIX_MAX for auto maneuvers that require it (high lean etc) - so its not always set to MIX_MIN.

The difficulty is landing - detecting landing is very hard and you don’t want it set when you land

1 Like

But it is set to MIX_MIN doing automatic descends right?

1 Like

the ATC_THR_MIX_MAN param, what it does, & why its used was explained earlier in this thread by @Leonardthall

Blockquote
When you pull the throttle all the way to minimum, throttle wants all motors to go to minimum. Zero throttle, zero motors, zero thrust. But also zero roll, pitch and yaw.
If we want to control the aircraft in roll, pitch, and yaw while you have the throttle at zero we must give permission to the motor mixers to prioritise roll, pitch, and yaw over the throttle. We do this with ATC_THR_MIX_MAN. If we set it to 1 the aircraft can increase the thrust to hover thrust momentarily to control the other axis. If we set it to 2 we can use up to twice hover throttle to control the other axis.
So why do we set it to 0.1. This make it easy to land and prevents bounce caused by the aircraft aggressively pushing the first contact point back as it touches down. Instead the low throttle takes the athority away from roll and pitch letting the aircraft settle flat on the ground.

1 Like

Actually, if I got it right, this is true if you apply @andyp1per PR since otherwise when you put your throttle low the MIX_MIN will apply and it is not able to keep the attitude since it is forced very low

1 Like

Not exactly. The value being used slides to MIX_MIN over a second or so when:

  • a decent is being commanded
  • the target lean angle is less than 15 degrees
  • the target lean angle error is less than 30 degrees
  • the acceleration is less than 3m/s2

This is to try to really squeeze the change to MIX_MIN to just trying to land.

Trust me, we don’t add parameters in the control and navigation code without a really good reason to do so. The main focus of these three parameters are:

  • get full control authority during normal flight
  • prevent roll, pitch yaw inputs from causing the aircraft to climb or jump during aggressive maneuvers
  • enable the aircraft to relax onto the landing surface during touchdown (prevent jumping or balancing on one leg)
  • prevent fly away during oscillation of roll, pitch or yaw.
1 Like

Thanks for the reply! @Leonardthall
Far from me saying you add features without any good reason! :slight_smile:

Beside that, do you mind clarifying what a copter is supposed to do when have you a good amount of ground clearance, you are in STABILIZE, and you cut the throttle to zero?
Mine, with default settings, starts to descend and after a while (resonably that “second or so”) it looses its attitude badly and I immediately throttle back up.
Shouldn’t it just descend keeping level?

1 Like

Don’t worry, I am just emphasising that we do our best to minimise additional parameters and complexity unless they are really needed and provide value to the community.

Before I answer your question I want to point out that the autopilot does not know if you have

The autopilot can’t even tell if you are on the ground. We need to make educated guesses based on our observations of the aircraft. For example, it is impossible to tell the difference between hovering flying at 1m and landed with the throttle at 3/4 hover. This is why the landing detector is one of the trickiest parts of the code to get right, despite being so simple to write.

To answer your question the “default” behaviour of stabilize is that the throttle has a dead zone at the bottom of the range. When the pilot enters this range the aircraft will move to “Spin When Armed” state. In this state the motors are below minimum throttle and no stabilization is done. If you have set MOT_SPIN_ARM to zero, this will mean the motors completly shut down. The aircraft will disarm a short time later depending on your DISARM_DELAY parameter.

Other behaviours are available with different settings as has been discussed above but this is the default behaviour and goes back to the beginning of the project.

1 Like

Thanks for you detailed answer!

In my case I don’t have MOT_SPIN_ARM at zero, so the copter, in case I cut the throttle during flight, ideally should try to keep its attitude and eventually crash to ground almost leveled if I got it right, indipendently of its initial altitude

1 Like

I have observed that during descends lasting longer than few seconds the drone seems to have lower ability to stabilize pitch and roll. I have wondered a lot why I can’t make a tune that is able to be stable during descends, thought it could be the caused high turbulence. The drone is flown in AltHold or Loiter in these cases.

Based on your comment below, made me think should I adjust the MIX_MIN a bit higher than the default 0.1. The drone has typically >2 thrust to weight ratio with typical payload and with minimum take off weight its >3. Max thrust is ~13kg, MTOM 6,5kg. Thus the hover thrust is always quite low.

By manual PID tuning I have caused some bad, but controllable oscillation, but then the drone was descending, not ascending.

I would like to know what behavior and data I should look into when making a decision to adjust MIX_MIN higher.

May I jump in here too.
I did some testing with MIX_MIN today in ACRO and experienced the same thing (I went up to MIX_MIN: 1.3). If I push throttle to min the quad is stable for a few seconds and than loses its stability like with MIX_MIN=0.1.
From racequads I am used to be able to cut throttle completely for as long as I like and the quad stays stable in the air what ever position it has. I added also the bin file if someone would like to look into it: https://www.swisstransfer.com/d/f54acb3f-8844-4276-b43c-0e8ae6e2f5a2(see pic).


Questions:
I do not understand the answer from Leonardhall: Not exactly. The value being used slides to MIX_MIN over a second or so when:

  • Does that mean after a few seconds with min throttle and the quad being for example upside down control is lost?
  • What is your suggestion for my quad; should I continue to ramp MIX_MIN from 1.3 up further?
  • Is having higher MOT_SPIN_MIN values helping MIX_MIN since the min rotation speed of the motors is higher?

Thanks a lot for your help

If you are in ACRO then you want to use MIX_MAN. Mine is set to 4

ok than I will try tomorrow to ramp it up
thanks

Am I correct to have ATC_THR_MIX_MIN< MOT_SPIN_ARM & MOT_SPIN_MIN?

As far as I know, in manual modes (the _MAN bit), MIX_MIN and MIX_MAX are not used.

They’re not really related. Also, the MOT_SPIN parameters are expressed as a fraction of maximum thrust (actually a fraction of configured PWM range), while the THR_MIX parameters are a fraction of hover throttle, so we can’t equate them like that anyways.

I made some tests.
With ATC_THR_MIX_MAN: 1.8 I had a similar feeling with throttle cut as with Kiss hardware. But once I tried a bit slow take off in ACRO the quad flipped up side down.
I than did a take off in Loiter and it flipped too.
Is MIX_MAN active in all modes?

It should only be active in manual modes - stabilise and acro. The flip is likely caused by stabilisation occurring while you are still in contact with the ground. This is why it’s important to take off quickly and when you come in to land better to have airmode disabled otherwise you will tend to bounce and flip. I enable airmode using ACRO_OPTIONS and that way I can land in stabilise.