Expose outputSum for monitoring and userspace anti-windup by drf5n · Pull Request #65 · Dlloydev/QuickPID
This PR moves the outputSum variable from public to private.
While the same functionality might be provided by a GetIntegral() and SetIntegral(value) or a user-space myPID.SetMode(myPID.Control::manual);Output=value;myPID.SetMode(myPID.Control::automatic); trick, moving the variable up to Public is a minimal change.
Why I think it is an important change is it helps for understanding the trickiest parts of PIDs: the behavior of the integral term. Good explanations of the functionality of PIDs often include graphs of the behavior of the components. Without access to the internal outputSum, it is impossible to see what is going on in the black box.
I've been experimenting with simulating a 1-D heat transfer problem controlled by a PID:
https://wokwi.com/projects/359818835102393345
Note that it shows the exposed integral on the LCD and the time-series, which I think is very helpful for understanding the interactions of the tuning parameters.
