Help needed: Different altitude hold behavior on ChibiOS

I have updated autopilot from 3.6.0 NuttX to 3.6.8 with ChibiOS. No changes made to drone or parameters.
Do I have incorrect parameters that happened to work on 3.6.0 or is there changes on 3.6.8 (ChibiOS) that changes the altitude hold behavior?

These are the two problems:

  1. This wasn’t apparent on 3.6.0, but happens now with 3.6.8:
    What could cause this huge spike on altitude rate value when changing flight mode from Auto to Loiter. This is visible on image 1,2 and 3. Haven’t had this problem when changing flight mode between loiter and AltHold or when changing from Loiter to Auto.

  2. Existing problem:
    Which parameter I should tune to have correct vertical velocity on auto mode. On loiter the altitude control works perfect, but on Auto the actual vertical position lags behind the desired. Visible on image 2.

Relevant images from logs.

Image1

Image2

Image3

Image4

Link to log.

Here is the log on the dron.ee web plotter. Link

I’m open for ideas how to make altitude controlling better on Auto mode.

Hi

  1. Your MOT_THST_EXPO is negative (=-0.41999998688697815).
    This value is not correct an surely affects you altitude control. The default value is 0.65. Depending on your motor and propeller size this can vary. Bigger props closer to 0.8 smaller props closer to 0.5.
    They are also some ESCs (i.e. T-Motor ESCs) which apply already thrust linearisation. In that case that value should be close to 0.
    So try once 0.65 and from that vary that value and see whether the flight performance increase or decrease

BR

Harald

Thanks for being sharp and noticing such subtle thing.
Motors and stabilization works very nicely with MOT_THST_EXPO = -0.42. It works nicely on Loiter and follows precisely the desired altitude, however not in Auto flight mode.

This MOTR+ESCs output is tested on the bench and validated. The correct value is the -0.42. The ESC tries to do linearisation for the output, but does it badly. Otherwise great ESC… Testing was done on 3.6.0 and NuttX.

Thanks for your time.

Please check
CTUN.DCRt = Desired Climb Rate
CTUN.CRt = (Actual) Climb Rate
The actual climb rate follows the desired rate nicely.
However actual vertical position does not follow the desired vertical position (altitude)

See what happens when flight mode is changed to Auto…