This is a component based model of the following one-tank system with a PID controller:
The input flow is given by the LiquidSource component and is constant the first 150 seconds and then triples. By controlling the output flow from the tank with a PID controller the tank level is held at a desired reference value ref.
We simulate for 350 seconds again and compare with the results from the PI controlled system:
For a step by step tutorial see Hierarchical Model—Tank System.