This is a classical example of control system with a PID, regulating the water level to reach the setpoint level.

More:

https://en.wikipedia.org/wiki/PID_controller