[phosphor-pid-control] Discussion on Hysteresis Reset and Dynamic Setpoint Behavior
老蘇 粉
twpeng50606 at gmail.com
Fri Oct 31 01:58:38 AEDT 2025
Hi all,
I’d like to start a discussion about a section of code in
phosphor-pid-control/pid/pidcontroller.cpp<https://github.com/openbmc/phosphor-pid-control/blob/master/pid/pidcontroller.cpp>.<https://github.com/openbmc/phosphor-pid-control/blob/master/pid/pidcontroller.cpp>
Since it’s a bit difficult to fully explain my thoughts on Gerrit,
I’m sending this email instead.
[cid:6879d019-62da-4dcf-a821-9652adc1d422]
I believe that when the closed loop leaves the hysteresis region,
it’s better not to reset the integral term and output directly to zero.
The previous design might have intended to prevent integral wind-up,
but now that we have ILimitMax and ILimitMin,
the integration range is already well constrained.
Instead of an abrupt reset, allowing a time-based decay toward zero
better reflects the behavior of a standard PID controller
and helps avoid large output transients when the input crosses the hysteresis boundary.
Below are simulation results comparing two approaches
one using gradual decay over time, and another using a direct reset.
[cid:8a8d9d42-3b1b-42b3-8378-c43b830c7ae7]
[cid:051bfa4b-99e2-4908-937d-5baf1c9dbb7b]
________________________________
Dynamic Setpoint
I also tried a dynamic setpoint approach,
which helps reduce output variations when leaving the hysteresis region
(as can be observed around Time 7 and Time 8).
[cid:7ab3e01d-5ce5-40e5-b574-b875b63266c0]
[cid:7a99cc45-e726-4219-bfe6-afa424782829]
________________________________
References
For more detailed explanations of the PID mathematical model,
integral saturation, hysteresis behavior, and dynamic setpoint, please see:
*
PID_Control_Documentation.md<https://github.com/YouPengWu/MyMD/blob/main/docs/phosphor-pid-control/PID_Control_Documentation.md>
*
Discussion_on_PID_Hysteresis_Reset.md<https://github.com/YouPengWu/MyMD/blob/main/docs/phosphor-pid-control/Discussion_on_PID_Hysteresis_Reset.md>
The related Gerrit change can be found here:
https://gerrit.openbmc.org/c/openbmc/phosphor-pid-control/+/84144
________________________________
Best regards,
YouPeng Wu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20251030/c2b4a6c7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 149610 bytes
Desc: image.png
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20251030/c2b4a6c7/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 64470 bytes
Desc: image.png
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20251030/c2b4a6c7/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 30668 bytes
Desc: image.png
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20251030/c2b4a6c7/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 138940 bytes
Desc: image.png
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20251030/c2b4a6c7/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 64317 bytes
Desc: image.png
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20251030/c2b4a6c7/attachment-0004.png>
More information about the openbmc
mailing list