Tuning PID loops is an art, not a science. So don’t get too frustrated.
First, a little talking about what p, i, d do and don’t do.
P is the natural one. If you’re under your goal by some amount, you push harder. The amount you push is proportional to how far away you are from your goal. If your Part gain is too low, you will give up too early. If it’s too high, and you have some delay, you will blow right past your goal.
D gets bigger the faster you move towards your goal. As you push towards your goal, this is the voice in your head saying, “whoa”. If D is too low, you blow past your goal. If it’s too high, you slow down too early while making progress towards your goal. IMHO, D gain is the hardest to tune. I would expect it to be much lower than P for this system, because it has a pretty fast response. I imagine it has a fast response, maybe it doesn’t. P and D are very coupled. They work against each other so whenever you change one, you’ll probably move the other. If you’re seeing a lot on ringing, then you can either increase D or decrease P. So it’s easy to get way out of whack.
I accounts for systematic error. You’ve got your p and d tuned. You’re headed to your goal, you’re almost there, but there’s a headwind. You’re just a little short, and you stop. Since you are close to your goal, your effort is small, and it’s matching the effort of the headwind. You aren’t getting closer to the goal, so D is doing nothing. This error is called the steady state error. The I will add up the amount of time and how far away you are from your goal and add in more effort, which will compensate for that headwind, eventually. The trouble with I is that it has a memory. When the wind dies, you’ll take off past the goal and the I has to “unwind” (wind, like a yo-yo, not wind like a breeze). The winding/unwinding is why we have a max I term. If your I gain is too low, you won’t quite be able to reach speed, especially during some external force, like when you’re cutting. I is really the icing on the cake, not the main strength. If I is too high, it can cause you to compensate with I while still approaching the goal with P. That will lead to going too far, and then it has to unwind, while the P is pulling back… You’ll end up with more ringing. A very experienced controls engineer told me I is the devil, and he was absolutely right.
I think there’s something wrong with the system and I have a guess, but I’ll put it in the next post.