-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dans98 klipper velocity pid #47
Conversation
Signed-off-by: Daniel Sherman <[email protected]> Signed-off-by: Vinzenz Hassert <[email protected]>
5da4f9b
to
2f2a79f
Compare
@bwnance do you want me to directly submit a pr here for fixing the calibration code? I'm pretty much done with upstream at this point. |
@dans98 that would be awesome :) |
@bwnance i'm working on converting over to dangerklipper but i hit an error that makes no sense to me. |
I will have a pr ready tonight or tomorrow for the updates for pid_calibration, do we need to follow this commit format/policy here? |
@dans98 ah, we should update that. We've been pretty lax with it, so don't worry about it :) |
@bwnance It's been submitted, sorry it took so long! |
This is convoluted way of limiting the integral term. |
The velocity algorithm is pretty much a standard in the motion control industry. you can see an example of it derived here. |
Indeed this originates from motor control where second derivative of the desired position corresponds directly to commanded torque (or current) and thus useful. Statements that this PID form is more susceptible to noise is wrong as the integration at the end removes the second derivative. This again probably stems from confusing this with motor control. In practise, all this controller adds is a rudimentary anti-windup (which could have been added in normal PID form as well). This is nice, but not well communicated. Instead there is this false claim:
Aside from filtering you added, mathematically both PID forms are the same. This sounds like misinterpretation of https://www.controleng.com/articles/the-velocity-of-pid/ . Oh indeed @dans98, seems that companies like Rockwell call this a Velocity Form and explain well the benefits of the implementation. But I think in the software like this a single implementation is enough and the end user should not care. Instead of switching between implementations, the user could just have a choice to "Saturate integral term". Also "Derivative kick" prevention on P term doesn't make sense for the heater control and I think it should be removed for the faster response. Just my 2cents. |
upstream PR: Klipper3d/klipper#6272