Skip to content
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

Backcalculate integral sum into feasible range #116

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

drf5n
Copy link

@drf5n drf5n commented Nov 22, 2021

Remove excess integral windup per
Astrom, K.J. and Rundqwist, L. (1989). "Integrator windup and how to avoid it" (PDF). Proc. 1989 Am. Control Confi.: 1693–1698.
through using code by Will posted in Brett Beauregard's forum at
http://brettbeauregard.com/blog/2011/04/improving-the-beginner%e2%80%99s-pid-reset-windup/#comment-18721

@drf5n
Copy link
Author

drf5n commented Feb 26, 2023

In https://controlguru.com/integral-reset-windup-jacketing-logic-and-the-velocity-pi-form/ it discusses this:

One approach to creating anti-windup jacketing logic is to artificially manipulate the integral sum of error itself. With our controller properly initialized, the approach is to flip the algorithm around and back-calculate a value for the integral sum of error that will provide a desired controller output value (COdesired), or:

image

Another way to think of it is if you are operating so far from Setpoint that kp*error exceeds the limits, than you shouldn't be banking more integral to wind down in the future. Dynamically limiting the integral sum to the slack between the kP and kD contributions and the Control Output automatically inhibits integration outside the proportional region. See the refs in #76 (comment)

github-actions bot pushed a commit to arduino/library-registry that referenced this pull request Feb 26, 2023
The PID_v1_bc library is a fork of the https://github.com/br3ttb/Arduino-PID-Library /  PID / PID_v1.h library that adds the back-calculation method of integral windup control.  See https://github.com/drf5n/Arduino-PID-Library and br3ttb/Arduino-PID-Library#116 and br3ttb/Arduino-PID-Library#76 (comment) for more info.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant