How good is your baro signal? Sometimes the air pressure drops when the copter stops moving horizontally, causing the baro to tell that the copter is rising. Of course the altitude controller counter acts that by reducing the altitude, hence the effect you see. This is not improved by increasing the controller gains, that will only make it sink faster.
The solution is to either address the cause and put the baro in a better location, or tell the EKF to thrust the baro less and the accel/GPS more. But if you do that it might cause that the accel vibration gets amplified by the rate PID loops and your motors will run hot. This can therefore only be done if your frame does not vibrate. And the notch filters do not help you here, they only apply to the gyros, you need to solve the problem at the source of the vibrations.
So it is a non-trivial balance act. Between different altitude sensor sources and their noise.
RTK GPS height (when there is no glitches) might help you there.
I have been told by Copting GmbH personal that PX4 does not have this problem at all, so I would like @dagar to comment how this issue is solved in PX4 firmware.
Fascinating. Thank you amilcarlucas, for your detailed response. It sounds like the behaviors I’m observing aren’t unique.
I don’t know how to determine how “good” is my baro signal. I have two copters - a Hexsoon EDU-450 and a Hexsoon TD-650. Both use an Orange Cube mounted on the top plate. Both exhibit this behavior.
I’m just now testing and tuning the TD-650. FFT done - and AutoTune to go. The EDU-450 has been done for a while - and now that I think of it, it didn’t used to experience this “sink” quite so much - I wonder if it has anything to do with 4.1.1.
This morning I took the TD-650 out - it was too breezy to AutoTune - but I though might be a good opportunity to see how the copter handled the winds.
The first thing I noticed was that the hover thrust was too low - you can see in the BIN file that it’s notched up early in the flight by hover thrust “learn.” Yesterday in calm conditions, hover thrust was fine.
I spent about 5 minutes just in Loiter - with slow horizontal transitions around the field. Even without having done an AutoTune, I though it did a remarkable job staying stationary. But when I did horizontal transitions, this is where I observed the sink. Then I switched on AutoTune - wanting to see how it worked in Loiter - and in the winds. It was sort of the “dancing bear” phenomena - it wasn’t how well it did it - but that it did it at all!
I charted some of the baro parameters - desired alt, actual alt, and one other - I forget which. I’m still too much a rookie to understand the data.
I’ve uploaded the BIN for this flight - in case you or anyone else wanted to take a peek.
I’ve considered relocating the Orange Cube to the lower deck plate - so that it’s covered by the top plate. I wonder if this might help if the problem has to do with airflow around the OrangeCube. But for what it’s worth - the EDU-450 didn’t seem to exhibit this sink behavior.
Thanks for sharing your thoughts on the subject. I’m curious now about your mentioning that the PX4 “fixed” this. That seems to imply that I’m not alone with this problem.
James - thanks for the video link. I’ll look forward to watching it. Regarding the parameters for correcting the baro due to mounting position - perhaps you could point me to where to find them. Many Thanks!