Altitude Dip of over 2m in Loiter and POS Hold

Hello, I am really struggling to solve this problem of altitude dip at the end of any pitch/roll command (copter flying over speed of 3m/s). The copter looses altitude gradually. Need help to resolve this. Please give me hints regarding the solutions that I can try.

Had seen one of the links but this too hasn’t helped much.

https://discuss.ardupilot.org/t/on-the-altitude-loss-in-forward-flight-from-aerodynamic-pressure-bubble/8440/5

Please find my logs attached.
https://drive.google.com/file/d/1z9B635MMoMcv9-iUscGYxZ2Rj_viH2NE/view?usp=sharing

Thanks

Protect the Barometer with foam. And read more about pressure bubbles.

The FC is inside a tightly screwed box with only one vent at the top, I have encircled it in red colour. That vent is also covered with a fine wire mesh.

We had earlier made hole on the side (had covered it with foam too). We doubted the setup and have closed it still the problem remains.



Will look into pressure bubbles, but I guess there is some parameter that is not good or missing in my setup

@amilcarlucas can you suggest any reference where I can explore more about pressure bubble.

There is a you tube video from Paul Riseborough explaining wind estimation at the Ardupilot Dev Conference 2021
That is a good start

Part of the problem is probably vibrations and GPS HDOP
Maybe that big canopy is increasing vibrations or there is some resonance - you can see in graphs the Z axis vibrations align with the altitude changes and increased throttle output, and are higher than ideal during those events.

You can see in the screenshot of the position on map - the two GPS positions and the calculated/IMU position rarely align.
image

Try setting these next:
GPS_GNSS_MODE,65 ← test different GNNS constellations to find what works best for you
GPS_GNSS_MODE2,65
ATC_THR_MIX_MAN,0.5
ATC_THR_MIX_MAX,0.5
INS_HNTCH_FREQ,40
INS_HNTCH_BW,20
INS_HNTCH_REF,0.255
I would tend to increase INS_ACCEL_FILTER,10 to about 15 or 20 (default)

Also a bit better tuning might help, if the position and altitude is good after addressing some of the issues then it would be good to run a new Autotune.

Use Stabilise, AltHold and Loiter flight modes. Poshold is dated and Loiter has more tuning params.

Hi Shawn,
Thanks for pointing it out. There was an update problem with HERE2 gps which led to high HDOP. Now we have updated it to latest at Software Version 1.7 and the HDOP is below 0.7.

This isn’t the problem, I am very confident with that coz its not very big in size and is just 100 grams and screwed on all sides and has foam at all joints. The Pixhawk is also mounted securely inside it.



The size of box is almost same as the size of pixhawk.

I have done this but can’t see any benefit with it. Please find the log for that flight. 2022-04-22 10-52-21.bin - Google Drive

I am not sure of this value. When I had done the Harmonic Notch setup I had got the peak freq at 78Hz so had set it up accordingly. But I don’t get why it should be 40. Please give any reference as to why you are suggesting it. The log for pre-filter hnotch is also attached for reference. 2022-04-22 16-40-55.bin - Google Drive

Thanks for the help.

Looks like 40Hz to me. Ignore the Y-axis scaling this is a MP beta thing.

Make sure the wires and the cube black do not touch the canopy, otherwise the vibrations will shake the cube.

Dave, as far as I understand from Throttle based Notch page, we are looking at Gyro noise peak rather than the Accel. noise (correct me if am wrong).

As far as I see the Gyro noise peaks at 79Hz.

I also want to understand that If I set it to 40Hz and since the HNOTCH is going to target three consecutive peaks (as far as I understand from documentation), then also I should be on safe side isn’t it. @xfacta @dkemxr Please clarify this for me.

We have verified this while putting the canopy on top, its not touching any wire or cube black for sure. We were getting serious issues with our barometer (still getting in this setup too :smiling_face_with_tear:) so had planned to do it.

It’s not the peak that we look for, it’s the first harmonic.

The highest peak happens to be the second harmonic in your case.

It looks like the fourth harmonic is also there, so if INS_HNTCH_HMNCS=3 is not enough, change it to 11.

1 Like

Sorry about that, sniped the wrong graph. It’s corrected above, same logic applies ~40Hz. As @amilcarlucas helpfully added it’s generally the 1st peak unless it’s very low. You want 40 Hz as @xfacta said.

In fact, let’s take a look at the other Flight Log you attached to another post and the Rate Controller output. If you calculate the period of this response it equates to ~40Hz.

Thanks, that’s short and to the point explanation. Will do as suggested and post a log for the same

I don’t have any knowledge of how to do that, but will for sure explore about it.

Thanks, now I am little confident with those values. Will test and post the results soon.