Hunting problem on Yaw axis

Hi
Nowadays, I am working hard for the stable flight of my helicopter.

I think my helicopter does not match the PID value.

When the helicopter ascends, the tail swings greatly.
It moves like the weight of a clock.
After two to three bumps, hold back.

Roll also shakes violently.
I ran confidently because I had experienced PID tuning, but moving the values ​​did not change the motion.

I think there is an attitude control parameter that I do not know.

What parameters do you modify to control your posture when your helicopter is in bad flight?

you have access to the open source code. It would be best to figure out on your own and report back on what you learned/fixed to meet your application. Maybe the people in your company can help too!