You are on page 1of 15

Designing a system of 3 interconnected

tanks to control water level

Team members
Ajay Victor (PES1201701170)
Prashanth B (PES120170 )
Suyash (PES1201700486)
Abstract
The control of liquid level in an interconnected system of 3 tanks and flow between tanks is main problem in process
industries like petroleum refineries, chemical, paper industries, water treatment industries. The control of liquid level and
flow between tanks must be controlled to ensure that the ratio of various components is accurate and to efficient use of
resources available and reduce waste generated.
The control of level of tank in the interacting system is the major task. As in the interacting process dynamics the
dynamics of tank 1 affects the dynamics of tank 2 and that of tank 2 affects tank 3 and vice versa.
Approach
1) We decided to start off with a simple mathematical model of our system and calculate theoretical values for the
variation of liquid level in each individual tank based on the flow rate of liquid entering each tank, the pressure of
liquid flow and the flow resistance offered to the flow of liquid via the interconnecting pipes between each tank.
2) The flow rate of a specific submersible pump would then be practically determined with the help of a flow meter and
we would also decide on the height and volume of the tanks to be used and resistance per unit area of the connecting
pipes to be used
3) These values would then be used along with the calculated equations to realize a transfer function for the system to
be designed and the obtained transfer function would be used to model Simulink model to obtain a expected output
behavior of the system.
4) A physical 3 tank system is then constructed as per the parameters considered to find the simulated output and this
model is used to practical verify the output obtained from the simulation. In case practical output is not the same as
that obtained form Simulink model necessary adjustments are made to the modelled system to ensure that the outputs
are similar.
5) The modelled system is now practically designed based on the transfer function obtained above.
Mathematical modelling of the 3 tank
system
 Let q(t) be the inflow rate for the system.
 h1 h2 h3 represent the heights at which it should be maintained.
 q1 q2 q3 are the flow out rate from the tanks T1 T2 T3.
 R1 R2 R3 denote the resistance offered to the flow of water by the
interconnecting pipes. The cross section of the pipe is circular.
 The cross section of the tanks is circular and the respective areas of the tank
is represented by A1 A2 A3 .
 τ1 τ2 τ3 are the time constants for the respective tanks, where
τ=RA(resistance*Area)
 The respective flow out rates from T1 T2 T3 are
ℎ1−ℎ2
 𝑞1 =
𝑅1
ℎ2−ℎ3
 𝑞2 =
𝑅2
ℎ3
 𝑞3 =
𝑅3

 Writing the mass balance equation for tank 1.


𝑑ℎ1
 𝑞 𝑡 − 𝑞1 = 𝐴1
𝑑𝑡
ℎ1−ℎ2 𝑑ℎ1
 𝑞 𝑡 − = 𝐴1 …… (a)
𝑅1 𝑑𝑡

 At steady state let h1s and h2s be the hight levels in the tank. At steady state
𝑑ℎ
there is no flow of water from one tank to another. i.e 𝐴1 1=0
𝑑𝑡

 At steady state the equation is


ℎ1𝑠−ℎ2𝑠
 𝑞𝑠 − = 0…… (b)
𝑅1

 Taking the difference between equation a and b and rearranging the terms we get
ℎ1−ℎ2 ℎ1𝑠−ℎ2𝑠 𝑑(ℎ1−ℎ1𝑠)
 𝑞 𝑡 − − 𝑞𝑠 − = 𝐴1
𝑅1 𝑅1 𝑑𝑡

 Rearranging terms
ℎ1−ℎ1𝑠 ℎ2−ℎ2𝑠 𝑑(ℎ1−ℎ1𝑠)
 𝑞 𝑡 −𝑞 𝑠 − − = A1
𝑅1 𝑅1 𝑑𝑡

 (h1 –h1s) is called the deviation variable and can be represented as H1(t)
 Mass balance equation for tank1 is
𝐻1 𝑡 −𝐻2 𝑡 𝑑𝐻1(𝑡)
 𝑄 𝑡 − = A1
𝑅1 𝑑𝑡

 Taking laplace transform of the equation


𝐻1 𝑠 −𝐻2 𝑠
 𝑄 𝑠 − = A1sH1 s
𝑅1
𝐻1 𝑠 −𝐻2 𝑠
 𝑄 𝑠 = A1sH1 s +
𝑅1
𝑅1𝐴1𝑠𝐻1 𝑠 +𝐻1(𝑠)−𝐻2(𝑠)
 𝑄 𝑠 = substitute R1A1 as 𝜏1
𝑅1
(𝜏𝟏𝒔+𝟏)𝑯𝟏(𝒔)−𝑯𝟐(𝒔)
 𝑸 𝒔 = ……(1)
𝑹𝟏
 Mass balance equation for tank 2
𝑑ℎ2
 𝑞1 − 𝑞2 = 𝐴2
𝑑𝑡
ℎ1−ℎ2 ℎ −ℎ 𝑑ℎ2
 − 2 3 = 𝐴2 …..(c)
𝑅1 𝑅2 𝑑𝑡
𝑑ℎ2
 at steady state there will be no change in height in the tank i.e(𝐴2 =0)
𝑑𝑡
ℎ1𝑠−ℎ2𝑠 ℎ2𝑠−ℎ3𝑠
 − = 0 …… (d)
𝑅1 𝑅2

 Taking difference between equation c and d and rearranging terms we get


ℎ1−ℎ1𝑠 ℎ2−ℎ2𝑠 ℎ2−ℎ2𝑠 ℎ3−ℎ3𝑠 𝑑(ℎ2−ℎ2𝑠)
 ( − ) −( − ) = 𝐴2
𝑅1 𝑅1 𝑅2 𝑅2 𝑑𝑡

 In terms of deviation variable


𝐻1(𝑡)−𝐻2(𝑡) 𝐻 𝑡 −𝐻3 𝑡 𝑑𝐻2 𝑡
 − 2 = 𝐴2
𝑅1 𝑅2 𝑑𝑡

 taking the Laplace transform of the above equation we get


𝐻1(𝑠)−𝐻2(𝑠) 𝐻2 𝑠 −𝐻3 𝑠
 − = 𝐴2𝑠𝐻2(𝑠)
𝑅1 𝑅2
𝐻1(𝑠)−𝐻2(𝑠) 𝐻2 𝑠 −𝐻3 𝑠
 = + 𝐴2𝑠𝐻2(𝑠)
𝑅1 𝑅2
𝐻1(𝑠)−𝐻2(𝑠) 𝐻2 𝑠 +𝑅2𝐴2𝑠𝐻2(𝑠) −𝐻3 𝑠
 =
𝑅1 𝑅2
𝐻1(𝑠)−𝐻2(𝑠) (τ2𝑠+1)𝐻2(𝑠) −𝐻3 𝑠
 =
𝑅1 𝑅2
𝑹𝟏
 𝑯𝟏 𝒔 − 𝑯𝟐 𝑺 = ((𝝉𝟐𝒔 + 𝟏)𝑯𝟐(𝒔) − 𝑯𝟑 𝒔 )……(2)
𝑹𝟐
 Mass balance equation for tank 3
𝑑ℎ3
 𝑞2 − 𝑞3 = 𝐴3
𝑑𝑡
ℎ2−ℎ3 ℎ 𝑑ℎ3
 − 3 = 𝐴3 … .(e)
𝑅2 𝑅3 𝑑𝑡
𝑑ℎ3
 At steady state 𝐴3 =0
𝑑𝑡
ℎ2𝑠−ℎ3𝑠 ℎ3𝑠
 − = 0 … …(f)
𝑅2 𝑅3

 Taking difference between e and f and rearranging terms


ℎ2−ℎ2𝑠 ℎ3−ℎ3𝑠 ℎ3−ℎ3𝑠 𝑑(ℎ3−ℎ3𝑠)
 ( − −( )) = 𝐴3
𝑅2 𝑅2 𝑅3 𝑑𝑡
𝐻2(𝑡)−𝐻3(𝑡) 𝐻3(𝑡) 𝑑𝐻3(𝑡)
 i.e − = 𝐴3 taking the Laplace transform
𝑅2 𝑅3 𝑑𝑡
𝐻2(𝑠)−𝐻3(𝑠) 𝐻3 𝑠
 − = 𝐴3𝑠𝐻3 𝑠
𝑅2 𝑅3
𝑅2
 𝐻2 𝑠 − 𝐻3 𝑠 = 𝑅3𝐴3𝑠𝐻3 𝑠 + 𝐻3 𝑠
𝑅3
𝑹𝟐
 𝑯𝟐 𝒔 − 𝑯𝟑 𝒔 = 𝝉𝟑𝒔 + 𝟏 𝑯𝟑 𝒔 ….. (3)
𝑹𝟑
 taking H3(s) from LHS to RHS
𝑹𝟐
 𝑯𝟐 𝒔 = (𝝉𝟑𝒔 + 𝟏)𝑯𝟑 𝒔 + 𝑯𝟑 𝒔
𝑹𝟑
𝑹𝟐𝝉𝟑𝒔 𝑹𝟐 𝑹𝟐𝝉𝟑𝒔+𝑹𝟐+𝑹𝟑
 𝑯𝟐 𝒔 = + + 𝟏 𝑯𝟑 𝒔 = ( )H3(s)….(4)
𝑹𝟑 𝑹𝟑 𝑹𝟑
 Substituting the value of H2(s) from equation 4 in equation 2 we get
𝑅1
 𝐻1 𝑠 = 𝐻2 𝑠 + ((𝜏2𝑠 + 1)𝐻2(𝑠) − 𝐻3 𝑠 )
𝑅2
𝑅1𝜏2𝑠 𝑅 𝑹𝟏
 𝐻1 𝑠 = (1 + + 1)𝐻2(𝑠) − 𝐻 𝑠 )
𝑅2 𝑅2 𝑹𝟐 3
𝑅1𝜏2𝑠 𝑅 𝑅2𝜏3𝑠+𝑅2+𝑅3 𝑹𝟏
 𝐻1 𝑠 = (1 + + 1)( )H3(s) − 𝐻 𝑠 )
𝑅2 𝑅2 𝑅3 𝑹𝟐 3
𝑹𝟏𝝉𝟐𝒔 𝑹𝟏 𝑹𝟐𝝉𝟑𝒔+𝑹𝟐+𝑹𝟑 𝑹𝟏
 𝑯𝟏 𝒔 = ((𝟏 + 𝑹 + )( ) − )H3(s)…….(5)
𝟐 𝑹𝟐 𝑹𝟑 𝑹𝟐
 All the equations for modelling the system are
(𝜏1𝑠+1)𝐻1(𝑠)−𝐻2(𝑠)
 𝑄 𝑠 = ……(1)
𝑅1
𝑅1
 𝐻1 𝑠 − 𝐻 2 𝑆 = ((𝜏2𝑠 + 1)𝐻2(𝑠) − 𝐻3 𝑠 )……(2)
𝑅2
𝑅2
 𝐻2 𝑠 − 𝐻 3 𝑠 = (𝜏3𝑠 + 1)𝐻3 𝑠 ….. (3)
𝑅3
𝑅2𝜏3𝑠 𝑅2 𝑅2𝜏3𝑠+𝑅2+𝑅3
 𝐻2 𝑠 = + + 1 𝐻3 𝑠 = ( )H3(s)….(4)
𝑅3 𝑅3 𝑅3
𝑅1𝜏2𝑠 𝑅 𝑅2𝜏3𝑠+𝑅2+𝑅3 𝑅1
 𝐻1 𝑠 = ((1 + + 1)( ) − )H3(s)…….(5)
𝑅2 𝑅2 𝑅3 𝑅2

 Substituting the values of H1(s) and H2(s) from 4 and 5 in equation 1 and simplifying we get
𝑯𝟑(𝒔) 𝑹 𝑹
 = 𝑹 𝝉 𝝉 𝝉 𝒔𝟑+ 𝑹 𝝉 𝝉 +𝑹 𝝉 𝑨 𝑹 +𝑹 𝝉 𝝉 +𝑹 𝝉 𝝉 +𝑹 𝟏𝝉 𝟑𝝉
𝑸(𝒔) 𝟏 𝟏 𝟐 𝟑 𝟏 𝟏 𝟐 𝟏 𝟏 𝟐 𝟑 𝟏 𝟏 𝟑 𝟐 𝟏 𝟑 𝟏 𝟐 𝟑 𝒔𝟐+ 𝑹𝟏+𝑹𝟐+𝑹𝟑 𝝉𝟏+𝑹𝟏𝝉𝟐+𝑹𝟏𝝉𝟑+𝑹𝟏𝑹𝟑𝑨𝟐 𝒔+𝑹𝟏

 Substituting value of H1(s) from equation 5 in equation 1 then substituting value of H3(s) from equation 4
in equation 1 and simplifying we get
𝑯𝟐(𝒔) (𝑹𝟐𝝉𝟑𝒔+𝑹𝟐+𝑹𝟑)
 =
𝑸(𝒔) (𝝉𝟏𝒔+𝟏)( 𝑹𝟏+𝑹𝟐+𝑹𝟏𝝉𝟐𝒔 𝑹𝟐+𝑹𝟑+𝑹𝟐𝝉𝟑𝒔 −𝑹𝟏𝑹𝟑)
 Substituting the value of H2(s) from equation 4 in 1 and then substituting value of H3(s) from
equation 5 in 1 we get
𝑯𝟏(𝒔) 𝑹𝟏( 𝑹𝟏+𝑹𝟐+𝑹𝟏𝝉𝟐𝒔 𝑹𝟐+𝑹𝟑+𝑹𝟐𝝉𝟑𝒔 − 𝑹𝟏𝑹𝟑)
 =
𝑸(𝒔) 𝝉𝟏𝒔+𝟏 𝑹𝟏+𝑹𝟐+𝑹𝟏𝝉𝟐𝒔 𝑹𝟐+𝑹𝟑+𝑹𝟐𝝉𝟑𝒔 −𝑹𝟏𝑹𝟑 −𝑹𝟏𝑹𝟐((𝑹𝟐+𝑹𝟑+𝑹𝟐𝝉𝟑𝒔)

 We consider all the interconnecting pipes of the same material and same length hence
R1=R2=R3=R
 And all the cross section areas equal i.e. A1=A2=A3=A
 Which implies all the time constants τ1 = τ2 = τ3 = τ
 Substituting these values in the transfer function we get a simplified transfer function having 2
parameters (τ and R)
𝑯𝟏 (𝒔) 𝝉𝟐𝒔𝟐+ 𝟒−𝑹 𝝉𝒔+(𝟑−𝟐𝑹)
 =
𝑸(𝒔) 𝝉𝟑𝒔𝟑+ 𝟓−𝑹 𝝉𝟐𝒔𝟐+ 𝟕−𝟑𝑹 𝝉𝒔+(𝟑−𝟐𝑹)
𝑯𝟐(𝒔) 𝑹𝝉𝒔+𝟐𝑹
 =
𝑸(𝒔) 𝝉𝟑𝒔𝟑+𝟓𝝉𝟐𝒔𝟐+𝟔𝝉𝒔+𝟏
𝑯𝟑(𝒔) 𝑹

𝑸(𝒔)
= 𝝉𝟑𝒔𝟑+𝟓𝝉𝟐𝒔𝟐+𝟔𝝉𝒔+𝟏
 Values used for simulation
𝑙
 Resistance = ρ = 642.86 sec/m2
𝐴

 Cross section Area of tank = 0.0314 m2


 Simulink model
Outputs of height from the tanks
Further work

 After finishing the Matlab model we were supposed to make the hardware
model of the system but dur to the lock down we couldn't proceed any
further.
Industrial applications

 Liquid level tanks are employed in many industrial and chemical areas. Their
level must be keep a defined point or between maximum-minimum points
depending on changing of inlet and outlet liquid quantities.
 Liquid level tanks are employed in many industrial and chemical areas. Their
level must be keep a defined point or between maximum-minimum points
depending on changing of inlet and outlet liquid quantities.

You might also like