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

Following this interesting discussion and I am still a bit confused.
Expecially the @Leonardthall explanation of the ATC_THR_MIX_MAN parameter:

Lower value:

  • Bouncing on touch down
  • Aggressive control inputs can cause pulses in thrust

Shouldn’t it be the opposite?

Furthermore, if I want to increase the stability in an automated mode, like LOITER, should I increase ATC_THR_MIX_MAX parameter a bit?

I had a situation where I disturbed my loitering copter by pushing up with my hand an arm. When I removed my hand, the quad started to wooble towards the ground and “crashed”.
I guess increasing ATC_THR_MIX_MAX should solve this matter, right?

1 Like

Higher value causes bouncing on touchdown.

2 Likes

I did some experiments with the code. Basically patching it like @andyp1per “airmode PR” is always active.
Like this pushing the ATC_THR_MIX_MAN to 3 and my 450mm if able to keep the attitude even when I let it fall in STABILIZE. Still I don’t get why I need to run such a high value.

Now I am wondering why ATC_THR_MIX_MIN is hard limited to 0.25 since it would be better during descends in automatic mode to have more attitude control trying to avoid “woobling” when descending into the copter air wash.

1 Like

Not quite sure whether you are saying there is a problem with the PR or a problem in general? I was noticing some issues yesterday with not being able to switch it off.

1 Like

I’ve just taken your PR as base for my local patching, AKA always keep MAN mixer setting active at every throttle level when manual throttle is used.

Other then than, they are general considerations / discussion I would like to deep into

1 Like

My patch is a little more subtle than that - it’s supposed to allow you to switch off the MAN mixer setting via a switch so that you can land and takeoff without bouncing

1 Like

yes, indeed, i’m not questioning your patch. It is a good work.
I’ve seen that I get no bounces keeping the MAN mixer active all the time and this will allow me not waste an RC channel.

But other than this, is it possible to clarify all this ATC_THR_MIX_xxx settings usage and values? It seems, to say the least, a very confusing part of copter firmware

1 Like

Cool.

By all means do a PR for suggested doc changes.

What size copter do you have? I get pretty much zero propwash on my 4" whether I have this setting or not.

1 Like

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.