Should PID Constants Remain the Same for all Targets?

I have always had a problem with my PID where if I tune the constants to make the robot turn 90 degrees, it works well, but only for 90 degrees. If I run the same program but command the robot to turn 180 degrees, it overshoots and oscillates because of the extra momentum it has from turning farther. Then, if I tune the constants for 180 degrees, the robot undershoots when commanded to turn 90 degrees.

I apologize if this is a basic question, but should kP, kI, and kD have different ideal values for different setpoints, or have I not tuned them properly and they should be the same? I have already searched the forum, but I haven’t found an answer yet.

They should be the same.
However, I would remove kI altogether. Dealing with the integral is super wonky, which is why most PID algorithms end up just being PD.
Try it out without kI (aka, set kI to zero) and see if you can tune it so that its consistent for all targets, like it should be.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.