You are on page 1of 58

Process Control

Chapter 2: Theoretical Modeling


Contents
2.1 Introduction
2.2 Model‘s Basic Elements
2.3 Process Variables Identification
2.4 Mathematical Model
2.5 Degrees of Freedom Analysis
2.6 Linearization
2.7 Process Simulation

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 2


2.1 Introduction
 A process model is a mathematical abstraction of a real
process.
 The model reflects the actual process with main features that
need to analyze

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 3


Model Categories
 Model categorizing:
– Graphical Model: Block Diagram, P&ID Diagram, Algorithm
Flowchart
– Mathematical Model: ODE, Transfer Function, State Space Model
– Computerized Model: Software,…
– Inferential Model: Knowledge, Principles
 In this chapter, we only consider how to modelling
Mathematical Models for Processes

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 4


Modeling purposes
1. Improve the understanding of the process
2. Training operators, engineers
3. Develop a suitable control strategy for the new process
4. Optimize process operating conditions
5. Simulation, verification

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 5


What is a good model?
 Model quality:
– Model accuracy and complexity
– The expected benefits from use of the model
– Model simplification
 “All models are not exact, but some are useful”
 The model should incorporate all of the important dynamic
behavior while being no more complex than is necessary.

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 6


Types of Mathematical Models
 Linear models/Non-linear models:
– Linear models: Linear differential equations, transfer function,
linear state space, transient response, frequency response…
– Non-linear models: Non-linear differential equations, state space
 SISO models/MIMO models:
– SISO models: consist of a input manipulated variable and an output
controlled variable, both are scalar.
– MIMO models: consist of many input manipulated variables and/or
many output variables. Variables can represent in vector form.

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 7


Types of Mathematical Models
 Time-Invariant/Time-Varying Model:
– Time-Invariant Model: the parameters do not change over time
– Time-Varying Model: has at least a parameter that changes over time
 Lumped/Distributed Parameter Model:
– Lumped Parameter Model: the output variables are functions of
time, not position; can be expressed by ODEs (Ordinary
Differential Equation)
– Distributed Parameter Model: the output variables are functions of
both time and position, can be expressed by PDEs (Partial
Differential Equation)
 Continuous model/Discrete model

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 8


Mathematical Models Categories
 Classification: based on how they are obtained
a) Theoretical Models are developed using the principles of
chemistry, physics, and biology
b) Practical Models are obtained by fitting experimental data (system
identification)
c) Combined Method are a combination of the models in categories
(a) and (b); the numerical values of one or more of the parameters
in a theoretical model are calculated from experimental data.

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 9


2.2 Model‘s Basic Elements
 Base on 3 basic quantities:
– Amount
– Potential
– Current
 We can define 4 basic elements:
– Resistance
– Capacitance
– Inductance
– Delay

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 10


Three Process’ Basic Quantities

Process Amount Potential Current

Electricity Electric charge Q Electric Voltage U Electric Current I

Liquid Volume V Pressure P Flow F

Gas Mass M Pressure P Flow W

Thermal Enthalpy H Temperature T Heat flow Q

Mechanical Length D Force f Velocity v

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 11


Four Process’ Basic Elements
Process Resistance Conductance Inductance Delay

U dQ dI D
Electricity R= C= U =L T=
I dU dt v

∆P dV A dF D
Liquid RL = C=
L = P = IL T
F dP ρ g dt v

∆P dM
Gas RG = CG =
W dP

∆T dH
Thermal RT = CΤ =
Q dT

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 12


2.3 Process Variables Identification
 Study process flowchart, specify the purpose of model, then
determine the level of details and the accuracy of the model.
 Divide to smaller sub processes, identify and name process
variables and parameters. List modelling assumptions to
simplify models
– Distinguish between process parameters and process variables
– Identify the controlled variables based on control objectives,
generally are: pressure, level, concentration,…
– Identify potential manipulated variables, usually are: flow, thermal
power (can be changed by control valves, by adjusting voltage,…
– Identify disturbances

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 13


Example: Liquid Storage Systems

 Assume that ρ0 has no significant change → ρ = ρ0 and be


regarded as a process parameter
 V is an output variable, F & F0 are input variables
 Analyze control objectives → the controlled variable is V
 F0 depends on the precede process → disturbance
 F must be the manipulated variable
10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 14
Example: Stirred-tank Blending Process

Disturbances Disturbances
Manipulated Controlled Manipulated
Controlled
Variables Variables Variables
Variables

BLENDING BLENDING
PROCESS PROCESS

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 15


Example: Heat Exchanger
Steam
Steam

Process Fluid

Disturbances

Manipulated HEAT Controlled


Controlle d
Ma nipula te d
Variables
Va ria ble s EXCHANGE Variable
Va ria ble s

Uncontrolled
Uncontrolle d
Variables
Va ria ble s

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 16


Example: A Distillation Column
Gas

Coolant
Reflux

Feed

Gas
Gas
Top Product

Steam

Bottom Product
10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 17
Control Objectives Analyzing
 Quality Assurance: maintain the top product composition
(xD) and the bottom one (xB) at a desired set point.
 Productive Assurance: Assure top product flow rate (D) và
the bottom one (B) at a desired set point
 Safety and stability operating ensuring: maintain the column’s
temperature and pressure, the liquid levels in the column
base and the reflux drum (MB) (MD) in allowed range.
 Based on specific problem requirements, we need to choose
appropriate controlled

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 18


Process Variables
 Controlled Variables
y = [ xD P]
T
xB MD MB

 Manipulated Variables

u =[ L V ] T
D B W

 Disturbance Variables

d =[ F ... ]
T
xF TF VF

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 1


9
2.4 Mathematical Modeling
 Write down equilibrium equations and constitutive
equations
– Equilibrium equations are expressed by differential or algebra
equations; they were build base on the Conservation of Mass,
Conservation of Energy and other conservation equations
– Constitutive equations concern the process disturbances and usually
are expressed by algebra equations
 Simplify model by substituting, simplifying and transform to
normal form of Differential Equations.
 Calculate model parameters

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 20


Conservation Laws
 Conservation of Mass
dM accumulation dM in dM out
= − =∑ ωini − ∑ ωout
i
s
dt dt dt
 At steady state

∑ in ∑ out =
ω i
− ω i
0

 Conservation of Component i

j j j
dM accumulation j
dM in j
dM out dM produced dM consumed
= − + −
dt dt dt dt dt

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 21


Example: Liquid Storage Systems

d ( ρV )
= ρ0 F0 − ρ F
dt
 Assumption:
ρ0= ρ= const
dV
= F0 − F
dt
10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 22
Example: Stirred-tank Blending Process
 Conservation of Mass:
dV
ρ = ω1 + ω2 − ω
dt
 Conservation of Component :
d (Vx )
ρ =ω1 x1 + ω2 x2 − ω x
dt
dx dV
ρV + ρx =ω1 x1 + ω2 x2 − ω x
dt dt
dx
ρV = ω1 x1 + ω2 x2 − (ω1 + ω2 ) x
dt

 dh 1
= (ω1 + ω2 − ω )
dt ρ A

dx 1 1
= (ω1 x1 + ω2 x2 ) − (ω1 + ω2 ) x
 dt ρ Ah ρ Ah

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 23


Example: Continuous Stirred-Tank Reactor

purity  Assume that mass densities are


slightly different:
ρ0 = ρ

Impurity

 Conservation of All Component  Conservation of Component


dV d ( Vc A )
= F0 − F = F0 c A 0 − Fc A − Vkc A
dt dt
d ( Vc B )
=− Fc B − Vkc A
dt
Depend on 2 above equations
10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 24
Conservation Laws
 The general law of energy conservation

 net rate of heat addition   net rate of work 


 rate of energy   rate of energy in   rate of energy out     
 =  -   +  to the system from  -  performed on the system 
 accumulation   by convection   by convection     by the surroundings 
 the surroundings   

 Assumption: Changes in potential energy and kinetic energy can be neglected


m n
dU I
dt
i i

= ωin hin − ωout hout + q j j

= i 1 =j 1
U I – System internal energy (J)
ωin – Mass flow rate in (kg/s or kg/minute)
ωout – Mass flow rate out (kg/s or kg/minute)
hin – enthalpy of the inlet stream (J/kg)
hout – enthalpy of the outlet stream (J/kg)
q – the rate of heat transfer to the system (J/s or J/minute)

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 25


Conservation Laws (Continued)
 Enthalpy is a measurement of energy in a thermodynamic system. It is the
thermodynamic quantity equivalent to the total heat content of a system. It is
equal to the internal energy of the system plus the product of pressure and
volume. The change of enthalpy associated with a particular chemical process
 Thermal energy conservation applied for liquid (simplified)

m n
dh
=∑ ωini hini − ∑ ωout
j j
hout +q
dt i 1 =j 1
=

∂h
Cp =
∂T P = const

h − href = C p ( T − Tref )
10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 26
Example: Heat Exchanger
Steam

Process Fluid

 Thermal energy conservation at steady state


ωH ( hH 1 − hH 2 =) ωC ( hC 1 − hC 2 )
 Assume as specific heat capacity is constant
ωH C ρ H ( TH 1 − T=
H 2 ) ωC C ρC ( TC 1 − TC 2 )

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 27


Example: Heat Stirred-tank System

d ( ρVh )
= F0 ρ h0 − F ρ h
dt
dT F
= =
V const & F0 F = ( T0 − T )
dt V
10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 28
Constitutive equations
 Heat transfer equations:
– Thermal conduction
– Convection
– Radiation
 Chemical Thermodynamics equations
 Phase equilibrium equations
 …

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 29


2.5 Degrees of Freedom Analysis
 The role of process model:
– Given: Model + Inputs + Initial states
– Requirements: Predict (Calculate) Output values
→ Solving the model equations in terms of the input variables
 Problem: Does the model equations have full description of
the relation between the process variables?
– If less: there are more process variables than equations, the model
equations have an infinite number of solutions
– If excess: there are fewer process variables than equations, the set of
equations has no solution

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 30


 Model degrees of freedom: the total number of process
variables subtracts the number of independent equations
– The numbers of free (unspecified) input variables in model, or
– The maximum number of single independent control loop that
can be used.
 The model is consistent: The degrees of freedome equals the
total number of input variables (included MVs and DVs)
 Example: Stirred-tank Blending Process :
– # process variables: 7 (h, w, w1, w2, x, x1, x2)
– # independent model equations: 2
– The degrees of freedom: 5 → the model is consistent

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 31


Model is inconsistent: Why?
 # Degrees of Freedom > # Input Variables:
– The model need more equations, e.g.: in the heat exchanger: lack of
a heat transfer equation
– The number of independent MVs is excess
 # Degrees of Freedom < # Input Variables:
– The model equations are not completely independent
– There is error in the model, there’s not enough variables to be able
to control the process

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 32


2.6 Linearization at a working point
 Why Linearization?
– All real processes is non-linear (more or less)
– Linear models is easy to use (satisfy the property of superposition)
– Almost control theories utilize linear model (e.g. transfer function)
 Why Linearization at a working point?
– The process is usually operated at a area around the working point
(Adjustment Problem!)
– Linearization at a working point help reduce model deviation
– Allow the use of difference variable, ensure the requirement of
Laplace Transform (initial value = 0).

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 33


Taylor theorem
=x f ( x , u ),=
x (0) x 0 x ∈ n , u ∈ m , f : n × m → n
y g( x , u ) y ∈  p , g : n × m →  p

Assume model has a steady-state ( x , u ) or =x f=


( x , u) 0
Thus:
x = x + ∆x
u = u + ∆u
We have:
∂f ∂f
x = ∆x = f ( x + ∆x , u + ∆u ) ≈ f ( x , u ) + ∆x + ∆u
 ∂x x , u ∂u x , u
0
∂g ∂g
y = y + ∆y = g( x + ∆x , u + ∆u ) ≈ g( x , u ) + ∆x + ∆u
 ∂x x , u ∂u x , u
y
10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 34
Jacobian matrix:
∂f
=A , A ∈  n×n
∂x x , u
∂f
=B , B ∈  n×m
∂u x , u
∂g
=C , C ∈  p× n
∂x x , u
∂g
=D , D ∈  p× m
∂u x , u

Change symbols: ∆x → x , ∆u → u , ∆y → y
x =
Ax + Bu , x (0) =
x0 − x
=
y Cx + Du

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 35


Example: Heat Stirred-tank System

dT F
= f ( F ,T=
,T0 ) ( T0 − T )
dt V
At working point:

F
=0 f ( F ,T=
,T 0 ) ( T 0 −T )
V
dT  ∂f ∂f ∂f
= f ( F ,T ,T0 ) ≈ f ( F ,T ,T 0 ) +  ∆F + ∆T + ∆T0 
dt     ∂F ∂T ∂T0  F ,T ,T 0
0

T 0 −T F F
= ∆F − ∆T + ∆T0
V V V
dT d ∆T d ∆T F T 0 −T F
= + ∆=
T ∆F + ∆T0
dt dt dt V V V
10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 36
We denote: y=
∆T , u =
∆F , d =
∆T0
V dy T 0 −T
= +y u+d
F dt F
Laplace transform for both side:

V T 0 −T
y ( s ) +=
s y( s ) u( s ) + d ( s )
F F
k 1
y( s )
= u( s ) + d( s )
τs +1 τs +1
Gp ( s ) Gd ( s )

V T 0 −T
τ =
= ,k
F F

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 37


Example: Stirred-tank Blending Process
 h = f = 1 (w + w − w)
 1 0 = w1 + w2 − w
ρA 1 2

 x = f 2 = 1 (w1 x1 + w2 x2 − (w1 + w2 ) x ) 0 = w1 x1 + w2 x2 − (w1 + w2 ) x
 ρ Ah

The first equation is linear, let’s rewrite in terms of difference variables:


1
∆h
= (∆w1 + ∆w2 − ∆w)
ρA
Apply Laplace transform for both sides:
1
s∆H=
( s) (∆W1 ( s ) + ∆W2 ( s ) − ∆W ( s ))
ρA
Denote kwh = ρ1A
kwh
∆H=
( s) ( −∆W ( s ) + ∆W1 ( s ) + ∆W2 ( s ) )
s
10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 38
Apply the Taylor theorem for the second equations:
∆x = ( x − x ) = x
∂f ∂f ∂f ∂f ∂f ∂f
≈  2 ∆h + 2 ∆x + 2 ∆w1 + 2 ∆w2 + 2 ∆x1 + 2 ∆x2 
 ∂h ∂x ∂w1 ∂w1 ∂x1 ∂x2 *
1 1
=− (w
2 
x
1 1 + w x
2 − (w
21 + w2) x )∆h − (w

 +
1 w
 2 )∆x
ρ Ah 0
ρ Ah w
x1 − x x −x w w
+ ∆w1 + 2 ∆w2 + 1 ∆x1 + 2 ∆x2
ρ Ah ρ Ah ρ Ah ρ Ah
1
= (−w∆x + ( x1 − x )∆w1 + ( x2 − x )∆w2 + w1∆x1 + w2 ∆x2 )
ρ Ah

Apply the Laplace transform for both sides:

ρ Ahs∆X ( s ) =
−w ∆X ( s ) + ( x1 − x )∆W1 ( s ) + ( x2 − x )∆W2 ( s ) + w1∆X1 ( s ) + w2 ∆X 2 ( s )

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 39


Divide both sides by w and transpose
ρ Ah x1 − x x −x w w
( s + 1)∆X=
( s) ∆W1 ( s ) + 2 ∆W2 ( s ) + 1 ∆X1 ( s ) + 2 ∆X 2 ( s )
w w w w w

Denote parameters

ρ Ah x1 − x x2 − x w1 w2
=τ =
, kw1 x =, kw 2 x = , kx1 x = , kx 2 x
w w w w w
We have a familiar transfer function form:

kw1 x kw 2 x kx1 x kx 2 x
∆X ( s ) = ∆W1 ( s ) + ∆W2 ( s ) + ∆X ( s ) + ∆X ( s )
τ s +1 τ s +1 τ s +1 1 τ s +1 2

Denote again (vector):


 w2 
 h   w   
x , u   ,  
d  x1 , y  x
 x   w1   
 x2 
 
10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 40
Transfer function can be write as:
=y( s ) G p ( s )u( s ) + G d ( s )d( s )

 − kwh kwh   kwh 0 0 


s s  s
=G p ( s ) = , Gd ( s)  
 0 k w1 x  k
 w 2 x k x1 x k x2x 
τ s +1  τ s +1 τ s +1 τ s +1 

From two linearization differential equations, we can have the state space model
1 0 0  1  −h h 
x = Ax + Bu +=
Ed A = 
ρ Ah  0 −w  , B  
ρ Ah  0 x1 − x 

y = Cx
1  h 0 0  1 0 
= E =  , C 0 1 
ρ Ah  2
x − x w 1 w2  

The relation between two models:

C( sI − A)−1 B, G d ( s ) =
G p ( s) = C( sI − A)−1 E

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 41


The diagram of the Transfer Function Model

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 42


 Example: Calculate with given values
=A 0.8m= 2
, ρ 1.25kg/litter
w2 = 200 kg/minute
=x =
0.4, x1 0.8,= x2 0.2
h = 1meter

From model equat ions at 0 = w1 + w2 − w



st eady-st at e: 0 = w1 x1 + w2 x2 − (w1 + w2 ) x

We det ermine t he ot her values w1 = 100 [kg/minute]


at st eady-st at e w = 300 [kg/minute]
Subst it ut e in T ransfer mat rix

 − 0.001 0.001   0.001 0 0 


 s s   s 
G p ( s ) = , G ( s)  0.000667 
0.000667  d 0.333 0.667
 0 −  − 
 3.333 s + 1   3.333 s + 1 3.333 s + 1 3.333 s + 1 

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 43


Linearization Procedure
1. If available, simplify model, if possible, break up to smaller
independent models.
2. Determine the steady state and the value of process variables to
obtain the steady-state model.
3. If linear, subtract steady-state equations and substitute
deviation variables..
4. If nonlinear, use Taylor series expansion to linearize.
5. Express model in deviation variable form.(use the vector symbol
if necessary) and simplify the model equation.
6. Re calculate all process parameter in terms of given values of
process variables at steady state.
7. Rearrange to obtain the desired form, e.g. Transfer Function or
State Space Model

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 44


2.7 Process Simulation
 Simulation is the method to recreate the behavior of a real
process base on the model to find out some concerned
behavior.
 Process Simulation serves many purposes:
– Mathematical model verifying
– Technical design verifying
– Process properties examining
– Control structure and algorithm designing
– Control software verifying
– Process behavior prediction.
– Basic and operator training

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 45


Non-linear Model simulation
dx
= f= ( x , u ), x (0) x 0
dt
t
Equation’s solution: ) x 0 + ∫ f ( x , u )dt
x (t=
0

t i +1
Discretization: x i +=
1 xi + ∫ f ( x , u )dt
ti

Euler method: x i +1 ≈ x i + (t i +1 − t i )f ( x i , u i )

Trapezoid method
1
x i +1 ≈ x i + (t i +1 − t i )[ f ( x i , u i ) + f ( x i +1 , u i +1 ) ]
2
(1)

 (1) depend on xi+ 1, but can be est imat ed using Euler Formula
(Runger-Kut t a for second degree equat ion)

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 46


Linear Model Simulation
dx
=
Ax + Bu , x (0) =
x0
dt

Discretization:
kT +T A( kT +T −τ )
+ T ) e AT x ( kT ) + ∫
x ( kT= e Bu(τ )dτ
kT
kT +T A( kT +T −τ )
= e AT x ( kT ) + ∫ e dτ Bu( kT )
kT
T At
= e AT x ( kT ) + ∫ e dtBu( kT )
0
= Φx ( kT ) + Γu( kT )

Φ =e AT
T
Γ =∫ e At dtB
0

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 47


Simulation utilizing MATLAB/SIMULINK
 Solve: Ordinary differential equation (ODE: ode23,
ode45...) and Partial Differential Equation (PDE) ⇒ Non-
linear system simulation.
 Control Toolbox ⇒ Linear system simulation
 Visual Simulation using block diagram in Simulink, allow to
combine a lot of elemental blocks and choose the suitable DE
solving method ⇒ Linear and Non-linear system simulation

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 48


Example: Stirred-tank Blending Process
Simulation (Non-linear Model)
 y1   h  1
=y = =k = 0.001[m/kg]
   ρA
 y2   x 
dy  k(w1 + w2 − w) 
f=
( y , w1 , w2 , w , x1 , x2 )  
dt  k(w1 x 2 + w2 x 2 − (w1 + w2 ) y2 ) / y1 

1. Express derivatives:

function dydt = f(t,y,k,w1,w2,w,x1,x2)


dydt = [k*(w1+w2-w)
k*(w1*x1+w2*x2-w1*y(2)-w2*y(2))/y(1)];

2. Set initial state (steady-state):


w1=100; w2=200; w =300;
x1=0.8; x2=0.2; k =0.001;

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 49


3. Solve EDs set
tspan = [0:0.1:20];
y0 = [1; 0.4];
[t y] = ode45(@f,tspan,y0,[],k,1.1*w1,w2,w,x1,x2);
%[t y] = ode45(@f,tspan,y0,[],k,w1,1.1*w2,w,x1,x2);
%...

4. Plot the simulation result graphs

plot(t,y(:,1));
title('Step change in 10% feed rate \itw_1');
xlabel('Time (min)');
ylabel('Level h (m)');
grid on
figure(2);
plot(t,y(:,2));
title('Step change in 10% feed rate \itw_1');
xlabel('Time (min)');
ylabel('Composition x');
grid on

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 50


10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 51
10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 52
Example: Stirred-tank Blending Process
Simulation (Linear Model)
% Simulation of the blending process with
linearized model
w1 = 100;
w2 = 200;
w = 300;
x1 = 0.8;
x2 = 0.2;
x = 0.4;
k = 0.001;
T = 1/(k*w);
Gw1h = tf(k,[1 0]);
Gw1x = tf((x1-x)/w,[T 1]);
t = [0:0.1:20];
y0 = [1; 0.4];
y = step([Gw1h Gw1x],t)*w1*0.1;

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 53


Plot the simulation result graphs
figure(1);
plot(t,y(:,1)+y0(1));
title('Step change in 10% feed rate w_1');
xlabel('Time (min)');
ylabel('Level h (m)');
grid
figure(2);
plot(t,y(:,2)+y0(2));
title('Step change in 10% feed rate w_1');
xlabel('Time (min)');
ylabel('Composition x');
grid

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 54


10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 55
10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 56
Summary
 Master the benefit and purpose of model in Process
Development Procedure
 Master the procedure of Mathematical Model Construction
and the purpose of each step
– Analyze problem, identify process variables (to do what?, based on
what?)
– Build model equation (Equation types? Basic?)
– Analyze the degrees of Freedom (Purpose? Detail Benefits)
– Linearization at a working point (Purpose? How? Result?)
– Simulation Principles (non-linear/linear), know how to utilize
MATLAB in process simulating

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 57


Self Study
 Book: Hoàng Minh Sơn: “Cơ sở hệ thống điều khiển quá
trình”. NXB Bách khoa Hà Nội, 2006-2010
– Chapter 2: Overview and categories of general mathematical model
in control.
– Chapter 3: Modelling examples.
 Questions/Exercises:
– Question at the end of Chapter 3
– Use MATLAB, re-run Stirred-tank Blending Process Simulation
– Practice simulate Heat Stirred-tank Process (non-linear and linear)
utilizing MATLAB with any suitable parameter.

10/18/2017 Chapter 2: Theoretical Modeling HMS 2006-2016 58

You might also like