Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
24
CHAPTER 2
MODELING OF CSTR PROCESS
2.1 INTRODUCTION
The CSTR process model is needed to understand the dynamic
characteristics and for design a proper control scheme. In CSTR, irreversible
exothermic reactor concentration and temperature is to be maintained at
desired range through inlet coolant flow rate manipulation. The CSTR has
either constant or variable mixing condition inside the reactor. In order to
identify the model of CSTR, the mass, energy and component balance
equation must be properly explained. The derivation of these balance
equations needs a background study about the process parameters and their
chemical reactions during the mixing.
The following section explains the CSTR linear and nonlinear
modeling techniques.
2.2 PROCESS DESCRIPTION (LINEAR CONDITION)
The schematic diagram of the CSTR is shown in Figure 2.1. The
reactant ‘A’ is fed to the reactor with volumetric flow rate qf , molar
concentration (or composition) Cf and temperature Tf. The components inside
the reactor are well mixed with a motorized stirrer. Both the reactant A and
product B are withdrawn continuously from the reactor with a flow rate,
concentration C and a temperature T. To remove the exothermic heat that is
25
generated due to the chemical reaction, coolant is circulated at outer side of
the reactor. A inlet coolant stream with a volumetric flow rate qc , and an inlet
temperature Tcf continuously take out the heat to maintain the desired reaction
temperature.
Figure 2.1 CSTR Process setup
The objective of the controller design is to keep the concentration
(C) and temperature (T) of the product into desired range by adjusting the
inlet coolant flow rate qc(t). The nominal initial parameter settings of the
process considered in this study are given in Table 2.1.
Table 2.1 CSTR Parameters
Process parameter Initial operating condition Inlet feed flow rate (qf) 100 l/min Inlet feed temperature (Tf) 350 K Inlet coolant temperature (Tcf) 350 K Inlet concentration (Cf) 1 mol/l Volume of the tank (V) 100 l Activation energy (E/R) 1104 K Reaction rate constant (Ko) 7.21010 min-1 Heat reaction -2105 cal/mol Liquid density (ρ) 1103 g/l
26
2.3 MATHEMATICAL MODELING (LINEAR MODEL)
The following assumptions are made to the linear CSTR process.
1. Exothermic reaction
2. Constant mixing inside the reactor
3. Constant volume and constant parameters
The mass balance equation of the CSTR is expressed in Equation (2.1)
Vdt
dFF inin (2.1)
In flow mass – Out flow mass = Rate of change of mass
Where, Fin - Inlet flow rate,
F - Outlet flow rate,
ρ - Density of the reactor,
ρin - Density of inlet stream and
V - Volume of the tank.
The change of individual components inside the reactor with
respect to time during reaction is identified to find CSTR model. The
component balance equation of the ith component is expressed as in Equation
(2.2)
AAAAinin Cdt
dVKVCFCCF (2.2)
ith component in flow – ith component outflow + ith component value = Rate
of change of ith component
27
Negative sign indicates that the CA decreases during reaction.
Assuming that the reaction is BA , i.e., component ‘A’ reacts irreversibly
to form component ‘B’ and the heat generated during reaction is removed
through the coolant flow (qc). The energy balance equation of the reactor is
expressed in Equation (2.3)
( )P in A c P
dTC F T T kVC H q C V
dt (2.3)
where k = /
0
E RTk e
k0 is a pre-exponential factor, E/R is the activation energy, T is the reaction
temperature and R is the gas law constant.
From the mass, energy and component balance equations, the
model describing the rate of change of concentration and temperature in the
system is then given by Equation (2.4) and Equation (2.5)
))((
)(exp1)(
))(
exp()())((
3
2
1
tTTtq
KtqK
tRT
EtCKtTT
V
q
dt
dT
cf
c
c
f
f
(2.4)
)(exp)())(( 0
tRT
EtCKtCC
V
q
dt
dCf
f (2.5)
The CSTR process model derived from Equation (2.4) and
Equation (2.5) shows that, it has exponential terms and product terms. The
derived equations are implemented in MATLAB Simulink to perform open
loop and closed loop analysis. The simulink model of the CSTR process is
shown in Figure 2.2.
28
Figure 2.2 Simulink model of CSTR process
The open-loop response of the temperature and concentration when
the inlet coolant flow rate (qc(t)) varies from 85 l/min to 110 l/min is obtained
as given in Figure 2.3 and Figure 2.4 respectively. From the responses, it is
observed that the parameters vary from over-damped to underdamped, which
clearly shows the nonlinear dynamic behavior of the CSTR process.
0 10 20 30 40 50 60 70 800.09
0.1
0.11
0.12
0.13
0.14
0.15
Time in Seconds
Con
cent
rati
on i
n m
ol/l
Concentration in CSTR
Figure 2.3 CSTR Concentration – open loop response
29
0 10 20 30 40 50 60 70 80431
432
433
434
435
436
437
438
439
Time in seconds
Tem
pera
ture
in K
Reactor Temperature
Figure 2.4 CSTR Temperature – open loop response
2.3.1 Linearization
The objective of the linearization is to get the model of the process
with the form expressed in Equation (2.6)
DuCxY
BuAxX
(2.6)
The input, output and state of the system are expressed as deviation variable
form given in Equation (2.7) and Equation (2.8)
s
AsA
TT
CC
x
xx
2
1 (2.7)
sTTy
s
AfsAf
fsf
jsj
FF
CC
TT
TT
u
u
u
u
u
4
3
2
1
(2.8)
30
Where Tj is the jacket temperature and Tf , CAf , F are the inputs. The jacobian
matrix parameters A, B, C and D are derived as in Equation (2.9) – (2.11)
1
1
2
2
1
2
2
1
1
1
2221
1211
)(sAs
PP
s
P
sAss
KCC
H
CV
UA
V
FK
C
H
KCKV
F
x
f
x
f
x
f
x
f
aa
aaA
(2.9)
Where
s
s
s
s
os
T
KK
RT
EKK
1
exp
PCV
UA
u
f
u
f
b
bB
0
1
2
1
1
12
11 (2.10)
The output matrices are:
C = [0 1]
D = 0 (2.11)
From the initial parameters and state space model, five linear
operating regions are identified around the steady state and the Eigen values
of the each regions are derived to find the stability condition and is shown in
Table 2.2.
31
Table 2.2 CSTR Stable operating regions
Operating region Eigen values Stability
CA = 0.0795, T=443.4566, qc= 97 λ1 = -1.0 ; λ2 = 1.5803 Saddle point
CA = 0.0885, T=441.1475, qc= 100 λ1 = -2.3899 ; λ2 = -1.0 Stable
CA = 0.0989, T=438.7763, qc= 103 λ1 = -7.7837 ; λ2 = -1.0 Stable
CA = 0.1110, T=436.3091, qc= 106 λ1 = -24.9584 ; λ2 = -1.0 Stable
CA = 0.1254, T=433.6921, qc= 109 λ1 = -59.8325 ; λ2 = -1.0 Stable
Where CA, T, qc are the linearization points of the CSTR. The
transfer function of the linear regions and its open loop poles are derived and
listed in Table 2.3.
Table 2.3 Open loop poles _ Stability Analysis
Operating region Transfer function Location of
Poles Stability
1 42.15188.5
04351.0882.82
66.0
SS
e s
-2.59±j3.31 Stable
2 22.13931.3
04237.02 SS
-1.97±j3.96 Stable
3 15.11779.2
04118.0665.22
15.0
SS
e s
-1.39±j3.12 Stable
4 205.9728.1
03988.022.22
16.0
SS
e s
-0.864±j3.12 Stable
5 352.77632.0
03844.0221.12
15.0
SS
e s
-0.382±j3.03 Stable
32
For qc=113.25, CA=0.1425 and T=460.125, the transfer function
and poles are obtained as G(s) =69.22948.5
1915.02 SS
and 2.97±j3.79
respectively and system attains unstable state. The result clearly shows that
the system attains unstable state when the coolant flow and concentration
raises above 110 l/min and 0.13 mol/l respectively. From the step input
responses and stability analysis, it is observed that the stable operating region
of the CSTR falls in C(t) - (0,0.13566 ) mol/l & qc (t ) - (0,110.8) l/min.
In CSTR process linear modeling, the operating regions for stability
are selected through the local model networks i.e., work region of the CSTR
divided into N small regions based on state space model, each of which
linearly approximates the local property of the assigned region.
2.4 PROCESS DESCRIPTION (NONLINEAR CONDITION)
The CSTR presented in literatures for control purposes have been
modelled as linear. But in real time most of the reactors are nonlinear in
nature which has high dynamic characteristics. For nonlinear CSTR, mixing
of reactants inside the reactor is non-uniform, resulting that the concentration
at different points are not uniform. The inlet coolant flow passes into the
reactor quickly as a result the concentration changes rapidly than the linear
condition. The temperature inside the reactor varies continuously and
provides high dynamic output characteristics. Hence, the entire CSTR plant
model should be identified for proper control.
2.4.1 Takagi-Sugeno Fuzzy Model
Takagi & Sugeno (1985) introduced a modeling technique to
represent the nonlinear system using local linear models. The linear model of
CSTR is used in each fuzzy rule to describe the nonlinear behavior. The
33
overall multi model network is formulated (Tan W et al 2004) by blending the
local linear models through the gating system. Moreover, global performance
of the Local Model Network (LMN) highly depends on the performance of
the local controllers. The gating system, acts as a weighting function and
smoothes the transient response when the set-point changes. The rule
associated with particular local model of the system can be defined as given
in Equation (2.12),
)()(
)()()(
)(.....)(: 1111
txCty
tuBtxAtxTHEN
isMtandZisMtIFZiRule
i
ii
ii
(2.12)
i = 1, 2, ..., r
where {z1(t), z2(t),…,zp(t)} are premise variables, nRtx )( is the state vector, mRtu )( is the input vector, nn
i RA , mn
i RB , nq
i RC are the system
matrices for rule ‘i’, y(t) is the output and ‘r’ is the rule number. The center of
gravity defuzzification method is used to derive the output of the fuzzy model
which can be expressed as in Equation (2.13),
r
i
i
r
i
ii
txCzhty
tuBtxAzhx
1
1
1
1
)()()(
)]()()[(
(2.13)
Where,
i
j
jij
r
i
ZMzw
zw
zwzh
1
1
1
1
11
)()(
)(
)()(
34
Mij(Zj) is the fuzzy membership grade of Zj in Mj1. It is assumed
that Wi(z(t))≥0, i=1,2,…,r and for
r
i
i tzw1
0))(( all ‘t’. Therefore, grade of
membership function is expressed as
N
i
i
i
zh
andzh
1
1)(
];1,0[)(
for all ‘t’
The output of T-S model provides the information about the
nonlinear process from the linear models.
2.4.2 Neural Network Model Identification
Soft computing techniques such as fuzzy based and Neural
Network based nonlinear model identification studied by Anna Jadlovska et al
(2008) and Rankovic et al (2012) are widely preferred to identify nonlinear
process dynamic behavior. These techniques identify the input-output data of
the process where the state equations of the process are indefinite, and the
states are unattainable. The performance of Nonlinear Autoregressive models
with eXogenous input (NARX) model is experimented by Eugen Diaconescu
(2008) and from the results it is concluded that NARX model is able to
capture the nonlinear dynamics of any process. The single input - single
output nonlinear process is described by NN model expressed as in Necla
Togun et al (2012) and is shown in Equation (2.14).
)()](),....,2(),1(),(),....,2(),1([)( kemkykykynkukukufky (2.14)
Where ‘n’ and ‘m’ are the maximum input and output with n≥0, m≥1 and f is
a nonlinear function. The implementation of NN model identification is
explained in Figure 2.5.
35
[
Figure 2.5 Neural Network based nonlinear model identification
The unknown function ‘f’ is approximated by the regression model
shown in Equation (2.15)
m
i
m
ij
n
i
m
j
n
i
m
j
n
i
n
j
kejkyikujicjkyikyjib
jkuikujiajkyjbikuiaky
1 0 1
1 1 0 1
)()()(),()))(),(
)()(),()()()()()( (2.15)
Where, a(i) and a(i,j) are coefficients of exogenous terms, b(i) and b(i,j) are
autoregressive terms, c(i,j) is the nonlinear cross terms. Equation (2.15) can
be written in the following matrix form as shown in Equation (2.16).
TTTTT XCYBUAbyua
mky
ky
ky
][][][.
)(
...
)1(
)(
(2.16)
The output can be expressed as in Equation (2.17)
CUY (2.17)
The flow of NARMA model identification is explained in Figure 2.6
y(k-n)
y(k-1)
y(k-1)
u(k-n)
u(k-2)
u(k-1) y(k) u(k)
y’(k)
Nonlinear plant
Z-1
Z-1
Z-n
NN MODEL
Z-1
Z-1
Z-n
36
Figure 2.6 Nonlinear model identification
The neural network models derived from the input and output data
of the process has poor generalization, over-fitting issues and requires more
training data.
2.4.3 LSSVM Based Model Identification
The LSSVM based on SVM is presented by Suykens (1999) to
eliminate the complex quadratic programming solving procedure. The
LSSVM model uses the following function given in Equation (2.18) to
approximate the unknown function
bxwxy T )()( (2.18)
Where ɸ(x) is a nonlinear mapping from the input space x to a higher
dimensional feature space, w is the weight vector and b is the bias. In LSSVM
the optimization function can be obtained by using the squared loss function
37
and equality constraints, which gives the following optimization function as
in Equation (2.19)
2
1
1 1min ( , )
2 2
NT
k
k
J w e w w C e
(2.19)
subject to the equality constraints as given in Equation (2.20)
( ( ) ) 1 0, 1,...,T
k k ky w x b e k N (2.20)
Where Ke is the training error and C is the regularization parameter. The
Lagrangian function given in Equation (2.21) is constructed to solve the
optimization problem
1
( , , ; ) ( , ) { ( ( ) ) 1 }N
T
k k k k
k
L w b e J w e y w x b e
(2.21)
Where αkand b are the Lagrange multipliers to be estimated based on the N
training data set. Optimal condition for the Equation (2.21) can be obtained
through the solution of partial derivatives of L(w,b,e;α) with respect to
w,b,e;α as in the form Equation (2.22)
N
K
N
k
kkkK xCexww
L
1 1
)()(0 (2.22)
Substituting ek and w with αk and b, we can get the following Equation (2.23)
N
k
Kkk bxxKy1
),( (2.23)
Where K and b are the solutions to the linear system and K is the kernel
function satisfying the mercer condition, i.e., represents the mapping of input
38
space x with high dimensional feature space. The solution of the above linear
equation is given in Equation (2.24) and Equation (2.25)
1
0
0
0
0
00
000
00
e
b
w
IYP
IC
Y
PI
I
T
T
(2.24)
Where P=[ φ(x1)Tyl…….φ(xN)TyN ], and Y=[ y1…yN]
1
001
b
ICPPY
YT
T
(2.25)
The classification or regression can be done through LSSVM by
solving the linear equation instead of complex quadratic programming
method. LSSVM uses less training samples, so that it can solve over-fitting
issues and according to finite samples and provides better model performance
with better generalization. In this work, LSSVM based nonlinear model
identification with MLP and linear kernel function is proposed for CSTR
process.
2.5 SUMMARY
In this section, the local linear model of an exothermic CSTR with
a first order reaction is considered for simulation studies. The linear model of
the CSTR is formulated by assuming a constant reactor volume and perfect
mixing in the reactor. The mathematical model of the CSTR under nonlinear
condition is obtained by considering non-uniform concentration and mixing
inside the reactor. The nonlinear model of the CSTR is derived by two
methods viz., T-S multi model from local linear models and second approach
using neural networks and LSSVM based identification. The second one
eliminates the issues involved in local linear models.
39
In the following chapter, the adaptive N-PID control design for a
CSTR using GA, SA, PSO, ABC and their hybrid approaches are discussed
briefly.