Hello everyone, I usually get quite acceptable configurations of the PID values but there are occasions in which overshooting situations occur in which the motor exceeds the position that I want and then corrects it.
Does anyone know how the PID values should be modified to remove the overshooting?
Tuning can reduce overshoot, but from what I learned about PID controllers the bottom line is some overshoot is unavoidable. That’s life for PID. It’s ultimately just a rather crude system that kind of works. Google optimally damped system.
There are some guides to PI tuning better than I can produce here. Basically you start low and increase P till it oscillates, then back it off a bit. Then if there is a static error use the I term. D term is rarely used but is actually primarily to reduce overshoot, I think caused by the I term. I don’t think it would work very well here as it tends to be sensitive to noise and I think you probably have a lot of noise, but you can try.
There is such a thing called auto tune, and there are arduino libraries for it but I could never get them working.
D is probably what you need, but as I mentioned in this post https://community.simplefoc.com/t/pid-integrator-windup-reset/3328/24 I think SimpleFOC’s D is borked due to “derivative kick” with the constantly changing setpoint. Unfortunately not easy to fix without making it more difficult to fix the angle range/accuracy problem we were discussing in that thread…
I’ve never had much luck with the D term, I have to say - its supposed to dampen things, but I’ve observed it rather to have to opposite effect and introduce more oscillation. So usually I’ve left it at 0.
I haven’t looked into the derivative kick issue, I should educate myself
I would love to fix these things, but as discussed in the other thread it’s non-trivial to do, so I prefer to think about it (collectively) until we have a viable solution…