Height drop in position mode

I’m using the PX4 firmware on my F450 ,the version is V1.8.0 relase.
But i met a problem,when i’m using the position mode,and roll the multicopter,the height will be decreased in the end of the action. like the picture blow:













After asking some friends,they think may me i using the radar to measure the height of the multicopter will improve this problem,but why i see the local postion z in the log file indeed express the height of the multicopter was normal,

so i don’t think the problem was the height measurement,it should be the postion pid control of direction z.? right?
but i change the different value of MPC_Z_P and MPC_Z_VEL_D MPC_Z_VEL_I,it didn’t work.
i will do some test like
1.change the controls position ,to decrease the interference of baro like the wind created by the propeller
1.change MPC_AZZ_UP_MX, or just try some other parameters,to check if the parameter problem.
2.change the firmware to apm to check if it will have the same prolem (I heard apm have the same problem)
3.change another controler like dji or others to check if the problem is the hardware of the esc or motors and more
4.add the rader in px4 to check the height c alculation problem.

We are using the F450, it all depends on where and how your flight controller has been installed.
Do you pictures of it?
Regards,
pturcotte

It may be a saturation/mixing problem. When the machine performs aggressive angle maneuvers, the control signals sent to motors may reach their limits and then, the mixer must prioritize one of the control systems: either altitude or angle. Since angle control is more important, it compensates first the roll angle, despite losing altitude, and then recovers the right altitude.

Indeed, we can clearly observe that Output 1 (green line in Actuators Outputs) saturates sometimes. A suitable solution for this problem is to reduce pitch and roll angle control gains (angle P and angle rate PID), leading the control system to be less aggressive.

thanks for your reply.
i change the ekf2_hgt_mode from baro to gps.now the height state is good.

thanks for your reply.
i put the PX4 on the top of the f450. so it can be easily be affected by the wind of the Paddle ,and the temperature Illuminated by the sun.