You are on page 1of 1

Laboratory 2: Simulation of Hybrid System (Water Tank System)

The tank system, shown in Figure, consists of a tank containing water. The tank is drained at
a constant rate. Water is added to the system at a constant rate through a pump. Let y
denote the volume of water in the tank at any point of time and u>0 denote the constant
flow of water out of Tank. Let h>0 denote the constant flow of water into the system. The
objective is to prevent the tank from emptying or filling up. t is time variable. One can
preset the following values:

ymax= threshold value of volume of water above which pump needs to switch OFF.

ymin= threshold value of volume of water below which pump needs to switch ON.

d = delay between switching ON/OFF of the pump and water STARTS/STOPS to flow from
the input

From the state diagram, it is clear that there are four (q=1 to 4) possible state of the system:
q=1: Only emptying of tank is there, pump is OFF.
q=2: Waiting state between switching pump ON, and water starts flowing from input.
q=3: Pump ON. Both emptying and filling actions are there.
q=4: Waiting state between switching pump OFF, and water stops flowing from input.

Utilize the state diagram shown above to simulate the same in MATLAB Simulink
environment, one can experiment with the user defined values(ymax, ymin, d, h, u)

You might also like