MATLAB: How to configure the PID controller block for anti-windup in the “Prevent Block Windup in Multiloop Control” model

anti-winduppidsaturationsimulink

According to the documentation in the link below:
“If the PID controller tracks the output of the inner loop, then its output never exceeds the saturated inner-loop output. To achieve this tracking, connect the Saturation block output to the tracking input of the PID Controller." 
When I connect a sine wave input, the output of PID block exceeds the saturated output of Inner Loop block.
Why is this model not behaving according to the documentation? Am I doing something wrong?

Best Answer

In order to observe such behavior, you need to configure the block for anti-windup. This can be achieved by setting the output saturation limit of the PID controller to match the inner-loop saturation limits and activate an anti-windup mechanism. Further details on how to do this can be found in the documentation link below:
Note: Instead of going to the PID Advanced tab, go to the Output Saturation tab and apply the changes there.
After enabling the anti-windup mode, you should be able to observe the expected behavior where the output of the PID never exceeds the saturated output of the inner-loop.
Related Question