You are on page 1of 4

EE 433: Applied Control Engineering Name: Ahmed Sarawi

HW#4 ID# 201961270


Simulate Tank process in SimulinkTM (General Energy Sec# 02
Balance)
232

Introduction
Given a process below as Figure 1 shows that need to be tested in SimulinkTM
to justify if lim 𝑇(𝑡) < ∞ for the differential equation below:
𝑡→∞

𝑑𝑇 𝑤1 𝑄 𝑑𝑉 1
= ( ) (𝑇1 − 𝑇) + , 𝑎𝑠 𝑤1 > 𝑤 & = (𝑤 − 𝑤) , 𝑎𝑠 lim 𝑉(𝑡) 𝑖𝑠 ∞
𝑑𝑡 𝜌𝑉 𝜌𝑉𝐶 𝑑𝑡 𝜌 1 𝑡→∞

where 𝑇 is the temperature inside the tank, 𝑤1 is the liquid mass flow-rate to the tank, 𝑤
is the liquid mass flow-rate out of the tank, 𝑇1 is the disturbance temperature added to
the tank, 𝑄 is the amount of heat absorbed by a system, where 𝐶 specific heat capacity
and 𝑉 is the total volume of the liquid inside, 𝜌 is the measure of density of the of the
liquid inside . The simulate will be with these various inputs along with time axis to
have better grasp to what process is.

𝒘𝟏
𝑽(𝒕)

𝑻(𝒕)

𝑻𝟏

Figure 1 (Tank process and its BD representation)


Simulating Tank process with different using SimulinkTM
After building the exact BD in SimulinkTM and run for certain seconds with these
chosen parameters:
200𝑘𝑔 150𝑘𝑔 𝑘𝑔 𝐽
{𝑤, 𝑤1 , 𝑇1 , 𝑇(0), 𝜌, 𝐶, 𝑄} = { , , 90℃, 0℃, 0.5 , 0.1 , 2000 𝐵𝑇𝑈}
𝑚𝑖𝑛 𝑚𝑖𝑛 𝑚3 𝑘𝑔 °𝐶

Also noted that, an error happened due division by zero (𝑉(0) = 0 𝑚3 ). So, the
initial value of 𝑉 will be changed to (𝑉(0) = 1 𝑚3 ) to keep running the simulation
and stop terminated it. Figure 2 below will demonstrate T vs time for this process.

Figure 2 (Generated plot by simulation for the given equation using the above values)

As the simulation runs for infinite time, 𝑇(𝑡) will reach to a steady−state of a value
of 190℃. Also shown that 𝑇(𝑡) reached the steady−state value in very short time
which seems that 𝑇(𝑡) do not relay in time and only other parameters
Solving the linear 1st−Order differential equation in 𝑻(𝒕)
𝑑𝑇(𝑡) 𝑤1 𝑄 1
=( ) (𝑇1 − 𝑇(𝑡)) + 𝑎𝑛𝑑 𝑉(𝑡) = (𝑤1 − 𝑤)𝑡
𝑑𝑡 𝜌𝑉(𝑡) 𝜌𝑉(𝑡)𝐶 𝜌
𝑑𝑦
𝐹𝑜𝑟 𝑠𝑖𝑚𝑝𝑙𝑓𝑖𝑐𝑎𝑡𝑖𝑜𝑛, 𝑇(𝑡) = 𝑦 𝑎𝑛𝑑 = 𝑦′ 𝑎𝑛𝑑 𝑡=𝑥
𝑑𝑡
𝑤1 1 𝑤1 𝑇1 𝑄 1
𝑡ℎ𝑒𝑛, 𝑦′ + ( )𝑦 = ( + )
𝜌(𝑤1 − 𝑤) 𝑥 𝜌(𝑤1 − 𝑤) 𝜌𝐶(𝑤1 − 𝑤) 𝑥
𝑤1 1 𝑤1 𝑇1 𝑄
𝑆𝑜, 𝑃(𝑥) = ( ) 𝑎𝑛𝑑 𝑄(𝑥) = ( + )
𝜌(𝑤1 − 𝑤) 𝑥 𝜌(𝑤1 − 𝑤) 𝜌𝐶(𝑤1 − 𝑤)
𝑤1 1 𝑤1 𝑤1 𝑤1
∫𝑥 𝑑𝑥 ln|𝑥| ln(𝑥)𝜌(𝑤1−𝑤)
𝜇(𝑥) = 𝑒 𝜌(𝑤1 −𝑤) = 𝑒 1 −𝑤)
𝜌(𝑤 =𝑒 = 𝑥 1 −𝑤)
𝜌(𝑤

𝑎𝑛𝑑 𝜇′ (𝑥) = 𝑃(𝑥)𝜇(𝑥), 𝜇(𝑥)𝑦 ′ + 𝜇(𝑥)𝑃(𝑥)𝑦 = 𝜇(𝑥)𝑄(𝑥)

𝑑𝜇(𝑥)
𝜇(𝑥)𝑦 ′ + 𝑦 = 𝜇(𝑥)𝑄(𝑥) → (𝜇(𝑥)𝑦)′ = 𝜇(𝑥)𝑄(𝑥)
𝑑𝑥

∫(𝜇(𝑥)𝑦)′ = ∫ 𝜇(𝑥)𝑄(𝑥) → 𝜇(𝑥)𝑦 = ∫ 𝜇(𝑥)𝑄(𝑥)

𝑤1 𝑤1 𝑤1 𝑇1 𝑄 1
(𝑥 1−𝑤) ) 𝑦
𝜌(𝑤 = ∫ 𝑥 1−𝑤) (
𝜌(𝑤 + )
𝜌(𝑤1 − 𝑤) 𝜌𝐶(𝑤1 − 𝑤) 𝑥
𝑤1 𝑇1 𝑄
𝑤1 ( + ) 𝑤1
𝜌(𝑤1 − 𝑤) 𝜌𝐶(𝑤1 − 𝑤)
(𝑥 1−𝑤) ) 𝑦
𝜌(𝑤 = 𝑤1 𝑥 1 −𝑤)
𝜌(𝑤

𝜌(𝑤1 − 𝑤)
𝑤1 𝑇1 𝑄
( + ) 𝑄 2000
𝜌(𝑤1 − 𝑤) 𝜌𝐶(𝑤1 − 𝑤)
𝑇(𝑡) = 𝑦 = 𝑤1 = 𝑇1 + = 90 + = 190℃
𝐶𝑤1 (0.1)(200)
𝜌(𝑤1 − 𝑤)

𝑆𝑜, 𝑇 𝑖𝑠 𝑖𝑛𝑑𝑒𝑝𝑒𝑛𝑑𝑒𝑛𝑡 𝑜𝑓 𝑡𝑖𝑚𝑒 𝑎𝑛𝑑 𝑜𝑛𝑙𝑦 𝑐ℎ𝑎𝑛𝑔𝑒 𝑎𝑡 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡 𝑟𝑎𝑡𝑒


𝑏𝑦 {𝑇1 , 𝑄, 𝐶}
With using graphical website (Desmos), it shows in Figure 3 that how 𝑇 behave in
the graph verse time

Figure 3 (2D graph of T vs time using the main equation)

Observation
As the analysis above imply that 𝑇 will goes to steady−state after a short time
of running and at 190℃. In addition, 𝑇 is independent of time and only depend of
{𝑇1 , 𝑄, 𝐶 } and other parameter will not affect the time it needs to reach the steady−state
value. The reason why Simulation takes very little time and it should be with not time
is due the time of execution and delayed within the simulation.

You might also like