This is model consists of two PI controllers to control the system both when in operation as well as when shutting down.
Because changing the controller signal from a certain value to zero is not continuous it will result in unstabilities in the simulation. Therefore, two controllers are implemented. One for the operation as a normal controller and one that change the output signal smoothly from the output of the other controller to zero.