Perfect Autotune but oscillations are visible in Loiter Mode

My setup:
Hexacopter 16in prop weighing 6kg on take-off with a gimbal hanging below, CubeOrange running Copter-4.1.5. Dynamic Notch is enabled. This drone doesn’t have Dshot, it uses standard PWM at 400Hz.
The PID tuning was amazing after Autotune, the movements are rock solid and crisp. However, as soon as I switched to Loiter mode, the drone starts oscillating at high frequency and low amplitude (mainly on the roll axis). I tried lowering the ATC_ANG_P for pitch and roll from 9.5 to 4.0. It helped very little and the oscillations are still visible. You can find the flight log in this link.
The next thing I was thinking of tunning is filter cut-off and Loiter PIDs, but that’s something I don’t know how to mess around with. Hope anyone can give me a hand here!
Thanks

Clearly oscillation in the outputs driven by oscillation in the loop on roll.


I would set the Angle P&I’s back to the Auto Tuned value, drop the Roll Rate P&I’s to equal Pitch and see where you are at. If there is still oscillation put Rate P&I on a Tune pot and do some live tuning.

Vibe levels are a bit high.

BTW-Is this a custom version of Arducopter?

1 Like

Thanks for the recommendations! I’ll try this tomorrow. Yes, this is a custom version of Copter-4.1.5. I made a few changes in the gimbal code and also added temperature and humidity sensor drivers. These are simple low rate tasks, the impact on the main loop should be minimal.

Hi @dkemxr
I flew my drone yesterday and I followed your suggestion. I set the ATC_ANG_Ps close to the autotune result and lowered the ATC_RAT_P&I. It worked for removing the oscillations! However, I miss the responsive and rock-solid movements in ALT_HOLD when those values were high. The drone now seems a bit sluggish (slightly overshooting when tilting) but still very stable. Check out the flight log here.
Thanks for your help!

Oscillation problem solved. Your vibration levels could be better. I suppose you have the Cube hard mounted with the foam tape it comes with? FFT driven notch filter is working good.

Increase ANGLE_MAX. Put Stabilize kP on a Tune pot with the current value at the low end (7.5) and increase this incrementally for better responsiveness.

Also, instead of AltHold try flying and tuning Loiter for more responsiveness. There are several useful parameters LOIT_x_x.

Correct! The Cube is hard mounted with the original foam tape. I just made a thorough inspection of the drone and found that the retractable landing gear is missing a few screws (!!!). The legs are a bit loose as a result and very likely to be the main source of vibrations. I’ll fix this asap and do more test flights later this week. I’ll keep you posted!
Thank you!