Speedybee F405 V4 - Bad AltHold oscillations / Crazy PID-Alt logs

Bin attached below

Here is a screenshot of the Altitude PIDs from a test flight.

First I tried checking the barometer since the HW-ID was showing “SPL06” instead of the DPS310 baro that should be listed on the F405 V4. Either way, the baro logs seem fine enough…

Not sure how to proceed with the poor altitude performance.

First, those values are not PID. They are sensor output. The values you are looking at are correct, you are just using the wrong terminology. Technically, when evaluating altitude “performance”, it’s probably more useful to look at AHR2.Alt, which should contain the filtered/fused value from the EKF.

All that said, the fix is probably physical/mechanical. Recommend putting a piece of foam over the barometer to reduce noise generated by propwash and wind.

1 Like

I know the 1st photo is Baro sensor, but isn’t the 2nd photo PIDA.P? I figured that would be the P term for fused altitude.

Anyways, The AltHold works perfectly fine in Betaflight 4.6.0, but Ardupilot oscillates wildly. I have the ability to hotswap and flash the STM32 between Ardu and BF. Trying to troubleshoot my parameters and the default tuning to see if that might be the issue.

Sorry, yes, PIDA is for vertical acceleration - I missed that value in the pics.

I didn’t check tuning otherwise. Have you done any? ArduPilot does not provide an “out of the box” experience like Betaflight. It’s much more powerful, but also requires a bit more configuration before it’s ready for regular use.

The main thing I did was halve the PSC_VELZ_P from 5 to 2.5. Didn’t seem to make any difference.

The PSC_POSZ was already at its lowest value of 1.0

If that’s the only tuning you did, you are a long way from a truly flyable config. Plenty of documentation on the subject. Since you are familiar with that parameter, I have to assume you’re capable of following the tuning instructions.

There is also this software. It’s a work in progress but worth a try for a new guy.

The quad is currently flyable with Pitch/Roll/Yaw, but my next step was ESC telem based Harmonic notches, and then beginning Autotune flights…however the AltHold issues are keeping me from proceeding.

I wasn’t familiar with other Altitude specific tuning instructions other than tuning the Vertical controller via PSC_VELZ and POSZ. Are there any you recommend tuning? I’ll take a look at the configurator soon…

PSC_ACCZ_P > 0.2
PSC_ACCZ_I > 0.5

Try changing the above parameter values.

1 Like

Will try that and report back

Thanks BrownCat, that fixed it. Apparently, since my quad has a very low hover throttle (6%), those parameters were required to be tuned before setting them via MOT_THST_HOVER after AltHold Learn and Save.

1 Like

This is the tiny issue in the methodic configurator. It does not reduce these settings before proposing learning throttle in the althold flight even if you already know you have high powered drone. Sure, on the next step you will set them according to the learned throttle value, but during the althold flight you experience these scary 1-2Hz oscillations. I have seen them too -) on pixhawk6c. Does not related to the FC type.