The state space model of an interconnected three tank water storage system is given by the following equation:
d/dt [[h1],[h2],[h3]] = [[-3, 1, 0],[2, -3, 2],[0, 1, -3]][[h1],[h2],[h3]] + [[1, 0, 0],[0, 1, 0],[0, 0, 1]][[qi1],[qi2],[qi3]] ; [[qo1],[qo2],[qo3]] = [[2, 0, 0],[0, 2, 0],[0, 0, 2]][[h1],[h2],[h3]]
The heights of water in the tanks are, respectively, h1, h2, h3. Each tank has an independent input flow; the volume flow rates of input water into the three tanks are, respectively, qi1, qi2, qi3. Each tank also has a water discharge outlet and the volume flow rates of water coming out of the tanks are, respectively, qo1, qo2, qo3.
a. Write down the state vector x, the input vector u and the output vector y. Clearly show the elements of these vectors.
b. Write down the A, B, C, D matrices.
c. What are the system poles? Compute by MATLAB.
d. Write down the matrix formula for the Laplace transform of the output Y(s) in terms of the Laplace transform of the input U(s) with state vector initial conditions x0. (Just the equation.)
e. What is the formula for the transfer function matrix? (Just the equation.)
f. Given that the initial heights of water in the three tanks are all zeros simplify the expression in part (d) to find an expression in the form Y(s) = G(s)U(s) where G(s) is the system transfer function matrix.
g. At t = 0, water begins to flow into the three tanks at constant rates of: qi1 = 1; qi2 = 2; qi3 = 1 (m^3/s) (assume step inputs). Find water flow rates out of the tanks: qo1, qo2, qo3 as functions of time by taking the inverse Laplace transform of Y(s).
h. Convert the above continuous time system into a discrete time system given sampling period T = 0.1 seconds. Use MATLAB "ss" and "c2d" commands, clearly write down or highlight the discrete time A,B,C,D matrices.