This blocks computes y as integral of the input u multiplied by gain Ki plus input u multiplied by Kp.
If the result reaches a given upper or lower limit, the integration is halted and only restarted if the input drives the integral away from the bounds, with a sufficient margin defined by Tol.
This margin is aimed at avoiding chattering i.e. rapid swings between frozen and unfrozen sates.
The integrator is initialized with the value Y0.