Unstable position hold

Dear Ardupilot community,
in the past days I tested a new quadcopter custom built: Cube Orange, 12kg weight, approx 90cm motor to motor, using as propulsion TMotor MN605S 170kV @ 12S and 22" propellers.

Although the UAV flies “ok”, I notice that both the vertical and horizontal position hold accuracy is low. Especially the vertical position. When left hovering in position mode, the vehicle continues to “bounce” around.

At this link I uploaded two logs that I hope will be relevant:
“5_Stress-Test.BIN” → a flight where I pushed a bit the UAV
“12_Hovering.BIN” → a flight where the UAV was mostly left hovering without RC inputs
“pixhawk_params_07-04-2023.param” → vehicle’s parameters

Is anyone able to get some hints on the possible cause of this? :thinking: :thinking: :thinking:

Thank you very much for your support and time guys, really appreciate your fantastic support!

You have a physical yaw bias from twisted motor mounts, see if you can better align the motors so all the props spin in exactly the same plane.
I’ve found these can be set to improve various things

ATC_THR_MIX_MAN,0.5
BATT_FS_CRT_ACT,1
INS_ACCEL_FILTER,10
INS_HNTCH_ENABLE,1  // set this then refresh params to see the rest
INS_HNTCH_MODE,1
INS_HNTCH_REF,0.18
INS_HNTCH_FREQ,40
INS_HNTCH_BW,20
INS_HNTCH_FM_RAT,0.7
INS_LOG_BAT_MASK,1
INS_LOG_BAT_OPT,4
MOT_BAT_VOLT_MAX,50.40
MOT_BAT_VOLT_MIN,39.60
PSC_ACCZ_I,0.5
PSC_ACCZ_P,0.25

I think your MOT_THST_EXPO is wrong. If you had a T-Motor Alpha ESC “straight out of the box” or almost any other ESC that wasnt built into the motor mount, I would say you need
MOT_THST_EXPO,0.76
but if you have the T-Motor integrated motor/mount/ESC then this seems to work well with those:
MOT_THST_EXPO,0.40
After changing this you will have to

  1. use MissionPlanner motor test to check MOT_SPIN_ARM is still valid
  2. hover for a while in AltHold or Loiter to allow MOT_THST_HOVER to relearn
  3. read the new MOT_THST_HOVER value from the log and adjust as per below
INS_HNTCH_REF = MOT_THST_HOVER x 0.7
PSC_ACCZ_I = MOT_THST_HOVER x 2
PSC_ACCZ_P = MOT_THST_HOVER

For your position hold and altitude problems
You can see in logs that GPA.Delta updated rate is all over the place trying to use all available constellations. Adjust this
GPS_GNSS_MODE,5 or 65
whichever gives you most stable HDOP and a good solid GPA.Delta of 200ms
It looks like you are already using the 2nd baro as primary, so that is good.
Maybe protect the flight controller from prop wash and wind with a cover if you havent already.

Ciao Shawn! First of all, wow, thank you so much for your time and efforts reviewing the logs and sending your suggestions. Really really really appreciate! :pray:

About the “physical yaw bias from twisted motor mounts”, I forgot to mention what is probably a very important detail of this vehicle configuration: each motor has a 3° inclination, in an attempt to increase it’s yaw stability.
First of all, do you agree the tilted motor mounts makes sense? If so, does this need to be “set” in Ardupilot?

Thank you so much, :raised_hands:
Albert

The twisted motor mounts could make sense but you might have them twisted wrong or by the wrong amounts. I’d expect the motor outputs would be approximately equal when hovering.

Hello @xfacta

This huge difference in the MOT_THST_EXPO values is due to the difference in the 3-phase wiring length?

Best Regards,
Bruno Bagarini

The difference is because T-Motor is very mysterious in their ways and configures ESCs differently depending on if they are part of the integrated series or bought as a standalone model.

1 Like

Ciao @xfacta !
Another thought, on our quad we have the two front motors facing down, and the two rear motors facing up. This results in the propellers having an approximately 5cm difference in height. Could this be the source of the issue you can see on the logs? :thinking:

But have someone ever tried to read the Firmware Version via datalink to check if they are really different?