Loiter - violent pitch or roll when in loiter mode

You didn’t set the initial Tuning parameters before running Auto Tune, everything is at default. This is the tuning process:
Set Initial Tuning parameters.
Configure Dynamic Notch Filter.
Run Auto Tune.

Dear @dkemxr I have set the initial Tuning parameters based on this link:
https://ardupilot.org/copter/docs/tuning-process-instructions.html
but I do not know how to configure a dynamic notch filter! Please let me know how to do it.

It’s easier if you use Mission Planners Alt>A tuning plug-in as I suggested.

Procedure for setting the notch filter is here:
Dynamic Notch Filter.

The 1st thing you will do is set the INS_LOG_BAT_MASK to 1 and make a short (~1min) AltHold hover flight for FFT analysis.