Clear Filters
Clear Filters

Set PID integrator to saturation value

42 views (last 30 days)
Stefan Th.
Stefan Th. on 15 May 2023
Answered: Sayan on 15 Sep 2023
I have a PID controller that controls a valve between 0 and 1 (0% and 100%). I have set the output limits in the PID block to 0 (lower limit) and 1 (upper limit) and I have set the anti-windup method to "clamping".
When the PID's output saturates at 1, the integrator stops (as expected). I want to set the integrator's value to 1 when the integration resumes again to avoid larger steps in the controller's output.
I looked at the documentation and found the "back-calculation" method for integrator anti-windup. It looks like exactly what I need, but it does not seem to have any effect? I don't get it. I tried rebuilding it myself by deactivating the controller's output limit, including a saturation block manually, and then have the controller track the saturated signal, but that did not work either.
The only thing that worked was when I included a logic that reset the integrator when the output reached 1, but that does not feel like a good solution. It also creates an algebraic loop.
Does anybody know a solution? Thanks
Sam Chak
Sam Chak on 21 May 2023
Have you tried using a nonlinear PID controller?
Stefan Th.
Stefan Th. on 22 May 2023
No, I don't see how that would help. I'm rebuilding an actual system and it only uses regular PIDs as well. It's super easy to do realize this functionality in the process control system, but not in Simulink for some reason. I still don't understand why signal tracing doesn't work, it should be exactly what I need, but it has no effect whatsoever.

Sign in to comment.

Answers (1)

Sayan on 15 Sep 2023
I understand from your query that it is required to keep the PID Controller output to 1 when it reaches the saturation limit rather than clamping to 0 to make the tracking faster in next time steps, and the "Anti-Windup" methods are not working for the model. The most probable solution for the query is mentioned below.
  • Enable the "Tracking mode". You can do that by going to the "Initialization" tab and finding the checkbox "Enable tracking mode".
  • Specify the "Tracking coefficient (Kt)". The inverse of "Kt" determines the time constant of the tracking loop.
  • Connect the "TR" port with the output of your plant.
Alternatively, if you are building a "PI" controller manually with an "Inetegrator" block and facing an algebraic loop while resetting the integrator externally, you can use the below steps to remove that.
  • Use the Unit Delay block (available in Simulink/Discrete) which provides the output of the previous step.
  • Connect the block between the reset signal and the Integrator's "External reset" port.
Further details on "Anti-Windup" control using PID and an integrator can be found in the following MATLAB documentation.
  1. "Anti-Windup" :
  2. Integrator:
Hope this helps in answering the query.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!