Professional Documents
Culture Documents
Part 2 Block Diagram Simulation 2022
Part 2 Block Diagram Simulation 2022
2
𝑑𝐶𝐴
𝐹𝐶𝐴0 − 𝐹𝐶𝐴 − 𝑉𝑘𝐶𝐴,𝑆𝑆 + 2𝑉𝑘𝐶𝐴,𝑆𝑆 ∙ 𝐶𝐴 − 𝐶𝐴,𝑆𝑆 =𝑉
Linearize Non-linear Terms 𝑑𝑡
𝐹
𝐾𝑝 ′ 𝑑𝐶𝐴′ 1 ′ 𝐾𝑝 = 𝐹 + 2𝑉𝑘𝐶𝐴,𝑆𝑆
Express in Deviation Variables 𝜏
𝐶𝐴0 =
𝑑𝑡
+ ∙ 𝐶𝐴
𝜏 𝑉
𝜏=
𝐹 + 2𝑉𝑘𝐶𝐴,𝑆𝑆
𝐾𝑝
Take the Laplace Transform 𝐶𝐴′ (𝑠) =
(𝜏𝑠 + 1)
′
𝐶𝐴0 (𝑠)
Linearization plays a major role in Process Control as Laplace domain requires all
equations in linear form
Definition of a linier system
Linearization
𝐹𝑜𝑢𝑡 = 𝐾 ℎ
𝐾
The linearization result is: 𝐹𝑜𝑢𝑡 = 𝐹𝑜𝑢𝑡,𝑠𝑠 + (ℎ − ℎ𝑠𝑠 )
2 ℎ𝑠𝑠
Let us define: ′
𝐹𝑜𝑢𝑡 = 𝐹𝑜𝑢𝑡 − 𝐹𝑜𝑢𝑡,𝑆𝑆 ℎ′ = ℎ − ℎ𝑆𝑆
𝐾
Thus: ′
𝐹𝑜𝑢𝑡 = ∙ ℎ′
2 ℎ𝑠𝑠
Express Deviation Variable
In process control, we are interested to see the dynamic of the system when the
system encounters a small deviation/perturbation. Hence, most of the time, we work
on deviation variable that originates from Taylor Series
F’(x)=F(x)-F(xs)
x’=x-xs
Express Deviation Variable
Example: mole balance of component A in a CSTR that reacts with 2nd order
kinetics can be expressed as below:
𝑑𝐶𝐴
𝐹𝐶𝐴0 − 𝐹𝐶𝐴 − 𝑉𝑘𝐶𝐴2 = 𝑉
𝑑𝑡
Input Output variables: CA0 and CA
Under Steady-State Condition: 2
𝐹𝐶𝐴0.SS − 𝐹𝐶𝐴,𝑆𝑆 − 𝑉𝑘𝐶𝐴,𝑆𝑆 =0
′
𝐶𝐴0 = 𝐶𝐴0,𝑆𝑆 + 𝐶𝐴0 𝐶𝐴 = 𝐶𝐴,𝑆𝑆 + 𝐶𝐴′ 𝐶𝐴2 = 𝐶𝐴,𝑆𝑆
2
+ 2𝐶𝐴,𝑆𝑆 ∙ 𝐶𝐴′
′
𝑑𝐶𝐴
𝐹(𝐶𝐴0,𝑆𝑆 + 𝐶𝐴0 ) − 𝐹(𝐶𝐴,𝑆𝑆 + 𝐶𝐴′ ) − 𝑉𝑘(𝐶𝐴,𝑆𝑆
2
+ 2𝐶𝐴,𝑆𝑆 ∙ 𝐶𝐴′ ) = 𝑉
𝑑𝑡
Express Deviation Variable
Mole balance of component A after linearization:
′
𝑑𝐶𝐴
𝐹(𝐶𝐴0,𝑆𝑆 + 𝐶𝐴0 ) − 𝐹(𝐶𝐴,𝑆𝑆 + 𝐶𝐴′ ) − 𝑉𝑘(𝐶𝐴,𝑆𝑆
2
+ 2𝐶𝐴,𝑆𝑆 ∙ 𝐶𝐴′ ) = 𝑉
𝑑𝑡
=0
(look at under steady state condition in previous slide)
𝑑𝐶𝐴′
Thus, we obtain: ′
𝐹𝐶𝐴0 − 𝐹𝐶𝐴′ − 2𝐶𝐴,𝑆𝑆 ∙ 𝐶𝐴′ 𝑉𝑘 =𝑉
𝑑𝑡
′
𝑑𝐶𝐴′
𝐹 𝐶𝐴0 − 𝐹 + 2𝑉𝑘𝐶𝐴,𝑆𝑆 𝐶𝐴′ =𝑉
𝑑𝑡
Express Deviation Variable
Method 2: Short Cut method by taking derivative with respect to variables
The mole balance of component A:
𝑑𝐶𝐴
𝐹𝐶𝐴0 − 𝐹𝐶𝐴 − 𝑉𝑘𝐶𝐴2 = 𝑉
𝑑𝑡
Let, 𝑃 = 𝐹𝐶𝐴0 − 𝐹𝐶𝐴 − 𝑉𝑘𝐶𝐴2
Since the variable here are CA0 and CA , thus:
′
𝜕𝑃 ′
𝜕𝑃 𝑑𝐶 𝐴
ቤ 𝐶𝐴0 + ቤ 𝐶𝐴′ = 𝑉
𝜕𝐶𝐴0 𝑆𝑆 𝜕𝐶𝐴 𝑆𝑆 𝑑𝑡
Thus, we obtain:
′
′
𝑑𝐶 𝐴
𝐹 𝐶𝐴0 − 𝐹 + 2𝑉𝑘𝐶𝐴,𝑆𝑆 𝐶𝐴′ = 𝑉
𝑑𝑡
Taking Laplace Transform
The linearized form of mole balance component A in deviation variable can be
described as:
′ ′
𝑑𝐶𝐴′
𝐹 𝐶𝐴0 − 𝐹 + 2𝑉𝑘𝐶𝐴,𝑆𝑆 𝐶𝐴 = 𝑉
𝑑𝑡
Input Output variables: CA0 and CA
∞
Basic formula of Laplace transform: ℒ 𝐹 𝑡 = 𝐹 𝑠 = න 𝐹 𝑡 . 𝑒 −𝑠𝑡 𝑑𝑡
0
𝑑𝐹 𝑡
ℒ = 𝑠 ∙ 𝐹 𝑠 − 𝐹(𝑡)ቚ
𝑑𝑡 𝑡=0
If we use deviation variable and the system is initially in steady state condition which
is common for process control case, then F=Fss at t=0, thus: F’=F-Fss= 0
→ wonderful !
Typically, we want to get the response of CA’ by taking a step change in input (CA0’)
′ 𝐾𝑝
𝐶𝐴0 (𝑠) 𝐶𝐴′ (𝑠)
(𝜏𝑠 + 1)
input output
Gp(s)
′ 4
𝐶𝐴0 (𝑠) 𝐶𝐴′ (𝑠)
(2𝑠 + 1)
input output
Matlab code: Gp(s)
%Program to compute step response of 1 unit step change of input
clear all
clc
close all
Kp=4;
taup=2;
t=0:0.5:10;
G1=tf(Kp,[taup 1]);
Y=step(G1,t);
plot(t,Y,'LineWidth',4)
grid on
Open-Loop Simulation
Method 2: Running the simulation in SIMULINK
′ 4
𝐶𝐴0 (𝑠) 𝐶𝐴′ (𝑠)
(2𝑠 + 1)
input output
Gp(s)
Blok: Source
Blok: Continuous
→Transfer Fcn Blok: Sinks →To Workspace
Revisit time to drain a tank (2022)
Source:
https://www.thechemicalengineer.com/feat
ures/rules-of-thumb-time-to-drain-a-tank/
TERIMA KASIH