Obstacle avoidance problem in loiter and altitude instability

Hi. Everyone.
I’m having a log file that I’m having trouble with for help.
Thank you for your help in this matter.

  1. Altitude instability problem.
    No problem in Stabilize mode.
    The problem occurs in Althold mode and Loiter mode.
    It is also very unstable during hovering and shows an unstable appearance where the altitude rises sharply during forward flight. (pitch)
    That’s less on reverse.

There is almost no symptom when moving left and right. (roll)

After the compass / motor calibration, it became fairly stable when light, but when it is heavy, it cannot fly smoothly.

I’m currently using pixhawk4, and I used Cube before.
Both products have the same symptoms, which is probably a hardware problem.
I suspect the noise of the motor.
firmware version 3.6.10 stable.

Frame for agriculture, 1400mm.
The first log is light.
The second log is heavy.

The above problem is more severe when heavy.

  1. Obstacle Avoidance
    I’m using obstacle avoidance with the Rplidar A2 M8 lidar.

It works fine in Althold mode.
In Loiter mode, there are no obstacles, but they stop moving as quickly as they are.
The propeller was conscious and tried to mount it up, but it was the same.

Currently, dampers will be installed to reduce vibration.

I would be grateful if you could analyze the attached log and give me some advice on what to do next.

hi @JY_Visual
as my experience high z vibration could make altitude holding and position estimate problem

according to documents the Clip0, Clip1 and Clip2 values which increase each time one of the accelerometers reaches its maximum limit (16G).
check propellers and FC vibration damper you should decrease your copter vibration