Figure 7.18 shows a liquid-level system in which two tanks have cross-sectional areas A1 and A2, respectively. The volume flow rate into tank 1 is qi. A pump is connected to the bottom….

## Derive the differential equations in terms of the liquid heights h1 and h2

Figure 7.43 shows a liquid-level system in which two tanks have hydraulic capacitances

*C*_{1} and *C*_{2}, respectively. The volume flow rate into tank 1 is *q*_{i}. The liquid flows from tank 1 to tank 2 through a valve of linear resistance *R*_{1} and leaves tank 2 through a valve of linear resistance *R*_{2}. The density ρ of the liquid is constant.

a. Derive the differential equations in terms of the liquid heights *h*_{1} and *h*_{2}. Write the equations in matrix form.

b. Assume that the volume flow rate *q*_{i} is the input and the liquid heights *h*_{1} and *h*_{2} are the outputs. Determine the state-space form of the system.

c. Construct a Simulink block diagram to find the outputs *h*_{1}(*t*) and *h*_{2}(*t*) of the liquid-level system. Assume that ρ = 1000 kg/m^{3}, *g *= 9.81 m/s^{2}, *C*_{1} = 0.15 kg・m^{2}/N, *C*_{2} = 0.25 kg・m^{2}/N,

*R*_{1} = *R*_{2} = 100 N・s/(kg・m^{2}), and initial liquid heights *h*_{1}(0) = 1 m and *h*_{2}(0) = 0 m. The volume flow rate *q*_{i} is a step function with a magnitude of 0 before *t *= 0 s and a magnitude of

0.25 m^{3}/s after *t *= 0 s.