Dynamic Behavior of Three Tanks in Series
Dynamic Behavior of Three Tanks in Series
Consider three identical tanks in a series subject to an input function . The heights of the liquid in the three tanks (i.e. , , ) obey the following equations:
f(t)
h
1
h
2
h
3
A=f(t)-K
d
h
1
dt
h
1
A=K-K
d
h
2
dt
h
1
h
2
A=K-K
d
h
3
dt
h
2
h
3
where is the cross-sectional area of a tank and is related to the discharge coefficient for the exit pipes.
A
K
Suppose the height of tank 3 is sampled for a given input function to give the following data list: .
f(t)=10L/min
{,},{,},{,},…{,}
t
1
h
3,1
t
2
h
3,2
t
3
h
3,3
t
N
h
3,N
Then the constants and can be estimated using a least-squares optimization method. That is, we define the following objective function
A
K
S=
N
∑
i=1
2
(()-)
h
3
t
i
h
3i
Here () is the height in tank 3 predicted by the model at time , and is the value of measured at time . The goal then is to determine and such that sum of squares is minimized for spanning the duration of the experiment.
h
3
t
i
t
i
h
3i
h
3
t
i
A
K
S
t
One finds as shown in the second snapshot and . It is possible then to solve the governing equations shown above and determine the height of tanks 1 and 2. The second snapshot presents the height versus time for tanks 1, 2, and 3 in blue, magenta, and brown, respectively.
K=2
A=3
Once and have been determined, one can run simulations for various forms of the input function: impulse input, triangle input, square input, and staircase input. The subsequent snapshots show the responses for all the above mentioned special input functions, which are shown in red in a separate plot.
A
K