Multicopter drops the altitude hold in POSCTL (video attached)

Problem statement:
Multicopter loses its altitude hold suddenly when it is maintaining a height. The copter is in position control mode using PX4FLOW. A teraranger sensor is used as the primary height estimation source. Tested on PX4 1.10.1 and PX4 1.9.2.

Copter took off in POSCTL mode and the throttle was kept the same.

Setup

  1. PX4 version: PX4 1.10.1 and PX4 1.9.2
  2. Multicopter: 3DR IRIS+
  3. FCU: Pixhawk 2.1
  4. EKF2_AID_MASK: Optical flow
  5. Sensors: Teraranger, PX4Flow

Logs:
https://review.px4.io/plot_app?log=ec303ab3-071c-47d3-b293-7fdc650687d7

It the logs you can see the height dropping twice. Both times, copter came down on its own and was not triggered by the pilot.

Video

Looking at Actuator Outputs (Main), Output 2 is saturated before impact both times. You can see the impact in Raw Acceleration just below it. It is prioritizing orientation before maintaining height, but without any more authority on that output giving more to the other motors would cause it to bank or yaw.

Output 2 corresponds to Motor 3, in the front left, since they’re zero-indexed here. Output 3 (Motor 4 in the rear right) is also struggling. It seems to be fighting to maintain heading and failing for some reason, either because of a general yaw authority problem or a bias for some reason.

  1. Are the propellers or motors damaged at all? If not it’s likely you just don’t have enough torque on these motors to control yaw completely with the amount of payload you have. You are hovering at 75%, which is bit on the high side, but note that thrust is basically quadratic with throttle, meaning your thrust to weight ratio is still more like 1:0.75*0.75 = 1:0.5625 = 1.778:1. 70% hover throttle is close to 2:1 T:W. I usually aim for 65% to get at least a bit more upwards acceleration than gravity can accelerate me downwards. That small difference gets one all the way to 2.4:1 T:W. You can see your MPC_THR_HOVER is set to 0.65 by default, which is what the autopilot sets to midstick in manual modes.

  2. Looking at Yaw Angle you can see it’s trying to achieve the Yaw Setpoint, but Yaw Estimated diverges right before impact. This matches the behavior in the video as it’s yawing CW (positive) as it falls, more noticeably in the first instance. It’s trying to correct this but physically can’t. (The clockwise motors spin up to generate CCW reaction torque.) Does it show the opposite motors struggling if it starts to drift CCW instead?

  3. Further, looking at Yaw Angular Rate makes me think your yaw rate gain is way too high as it’s oscillating quite a lot. This could be wasting a lot of effort. Try lowering MC_YAW_P. It’s also possible to lower MC_YAW_WEIGHT further to de-prioritize yaw with respect to pitch and roll, but that doesn’t seem to be the root problem and might cause behaviors even less desirable than an un-commanded landing.

  4. You also seem to be a bit front heavy. Sharing the positive yaw burden more evenly between Motor 3 (FL) and Motor 4 (RR) should give more total authority. Check lateral balance as well.

2 Likes

@benasena Thank you for your detailed insight.

Indeed the payload on this copter is heavy and it makes complete sense that Output 2 is saturated before impact both times.

I will change the propeller and maybe even change the motor and give it a try. :raised_hands:t2: