.MagLev.Control.Functions.piStep

Information

This is the algorithm of one step of a PI-controller with feed-forward and limited output. The anti-windup measure (either back-calculation or clamped) is formulated straight-forward to avoid iteration. Therefore the code can be:

Integration is replaced by an explicit forward Euler.

Anti-Windup measure: A prediction of the output is calculated without limitation is calculated. If there is a difference between unlimited and limited result (i.e. protected variable cropped):