You are on page 1of 14

Case Study 2

Isothermal CSTR
Objectives:
• Develop the dynamic model of an isothermal CSTR
• Determine the steady-state behavior
• Find the state-space form of a linearized CSTR model
• Use MATLAB for simulations and compare the dynamic responses
of the nonlinear and linear models at different operating points
Process Description
• Chemical reactors are generally the most important unit operations in a
chemical plant. The CSTR is often used in dynamic modeling studies,
because it can be modeled as a lumped parameter system
• Consider a CSTR which is operating at a constant temperature (it is
isothermal). The volume is also assumed constant. The reaction scheme
consists of the following irreversible reactions. The feedstreamcontains
only component A
1 2
3
2
→ →

k k
k
A B C
A D
C
C
D
C
(Van de Vusse reaction)
• The CSTR is isothermal, so we do not need a energy balance (and can
assume that the reaction rate parameters are constant)
• Overall material balance
• Component material balance
– Component A
– Component B
– Component C
– Component D
( )
ρ
ρ ρ = −
i
d V
F F
dt
⇒ =
i
F F
constant density and volume
Developing the Dynamic Model
( )
( )
2
1 3
= − − −
A
Af A A A
d V C
F C C Vk C Vk C
dt
( )
2
1 3
= − − −
A
Af A A A
dC F
C C k C k C
dt V
1 2
= − + −
B
B A B
dC F
C k C k C
dt V
2
= − +
C
C B
dC F
C k C
dt V
2
3
1
2
= − +
D
D A
dC F
C k C
dt V
Steady-State Behaviors
• If we are only concerned about C
A
and C
B
, we only need
• Assume that F/V (space velocity) is the input variable of interest
( V/F is known as the “residence time” or “space time” )
• Solving for the steady-state for C
A
( )
2
1 3
= − − −
A
Af A A A
dC F
C C k C k C
dt V
1 2
= − + −
B
B A B
dC F
C k C k C
dt V
2
3 1
0
| |
− + − − + =
|
\ ¹
s s
As As Afs
F F
k C k C C
V V
2
1 1 3
3
4
2
| | | | | |
− + + + +
| | |
\ ¹ \ ¹ \ ¹
⇒ =
s s s
Afs
As
F F F
k k k C
V V V
C
k
(using the positive root)
• Solving for the steady-state for C
B
• Parameter values
1
2
=
+
As
Bs
s
k C
C
F
k
V
1 2 3
5 5 1
, , , 10
6 3 6
= = = =
Afs
k k k C
0 1 2 3 4 5 6 7 8 9
0
1
2
3
4
5
6
7
8
9
F
s
/ V
C
A
s
0 1 2 3 4 5 6 7 8 9
0
0.2
0.4
0.6
0.8
1
1.2
1.4
F
s
/ V
C
B
s
C
As
as function of the space velocity C
Bs
as function of the space velocity
1.292 =
s
F
V
(maximum)
• Linearize the nonlinear modeling equations to find the state-space form
where the state, input, and output vectors are in deviation form
• Two dynamic functional equations
State-Space Model
x = Ax Bu
y = Cx
+ ɺ
state variables
output variables
x
y =

(
= =
(

¸ ¸

(
=
(

¸ ¸
A As
B Bs
A As
B Bs
C C
C C
C C
C C
input variables u =
(
− =
(
¸ ¸
s
F F
V V
( )
2
1 1 3
, ,
| |
= = − − −
|
\ ¹
A
A B Af A A A
dC F F
f C C C C k C k C
dt V V
2 1 2
, ,
| |
= = − + −
|
\ ¹
B
A B B A B
dC F F
f C C C k C k C
dt V V
• The elements of the state-space A matrix are found by
• The elements of the state-space B matrix are found by
,
i
ij
j
f
A
x

=

s s
x u
1 1
11 1 3
1
, ,
1 1
12
2
, ,
2 2
21 1
1
, ,
2 2
22 2
2
, ,
2
0
s s s s
s s s s
s s s s
s s s s
x u x u
x u x u
x u x u
x u x u
∂ ∂
= = = − − −
∂ ∂
∂ ∂
= = =
∂ ∂
∂ ∂
= = =
∂ ∂
∂ ∂
= = = − −
∂ ∂
s
As
A
B
A
s
B
F f f
A k k C
x C V
f f
A
x C
f f
A k
x C
F f f
A k
x C V
( )
( )
1 1
11
1
,
,
2 2
21
1
,
,
/
/
s s
s s
s s
s s
x u
x u
x u
x u
∂ ∂
= = = −
∂ ∂
∂ ∂
= = = −
∂ ∂
Afs As
Bs
f f
B C C
u F V
f f
B C
u F V
,
s s
x u

=

i
ij
j
f
B
u
1 3
1 2
2 0
A
(
− − −
(
=
(
(
− −
(
¸ ¸
s
As
s
F
k k C
V
F
k k
V
B

(
=
(

¸ ¸
Afs As
Bs
C C
C
( C = I )
Dynamic Behavior
• Consider several different steady-state operating points
• Case 1: F
s
/V = 4/7 (left side of the peak)
– Steady-state concentration C
As
=3, C
Bs
=1.117
– State-space model
• Case 2: F
s
/V = 2.8744 (right side of the peak)
– Steady-state concentration C
As
=6.087, C
Bs
=1.117
– State-space model
2.4048 0
0.8333 2.2381
A

(
=
(

¸ ¸
7
1.117
B
(
=
(

¸ ¸
5.7367 0
0.8333 4.5411
A

(
=
(

¸ ¸
3.913
1.117
B
(
=
(

¸ ¸
(Cases 1 and 2 are based on the same concentration of component B)
(Input Multiplicity)
• Case 3: F
s
/V = 1.2921 (optimum operating point)
– Steady-state concentration C
As
=4.4949, C
Bs
=1.266
– State-space model
• Transfer function relating input 1 (F/V) and output 2 (C
B
)
– Case 1
– Case 2
– Case 3
3.6237 0
0.8333 2.9588
A

(
=
(

¸ ¸
5.5051
1.266
B
(
=
(

¸ ¸
( )
21
2
0.5848 0.355 1
( )
0.1858 0.8627 1
− +
=
+ +
s
g s
s s
( )
21
2
0.1208 0.355 1
( )
0.0384 0.3945 1
− +
=
+ +
s
g s
s s
21
2
0.1181
( )
0.0933 0.6139 1

=
+ +
s
g s
s s
• Note: convert state-space model to transfer function model
[num,den] = ss2tf(A,B,C,D,1)
(RHP zero, positive gain)
(LHP zero, negative gain)
(zero at the origin, zero gain)
Small step change (+0.01)
in space velocity
Step Response for Case 1
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
1.115
1.116
1.117
1.118
1.119
1.12
1.121
1.122
1.123
1.124
time
C
B
nonlinear
linear
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
1.05
1.1
1.15
1.2
1.25
1.3
1.35
1.4
1.45
1.5
time
C
B
nonlinear
linear
Large step change (doubling, + 4/7)
in space velocity
Remarks: (1) with inverse response
(2) positive gain
Step Response for Case 2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
1.102
1.104
1.106
1.108
1.11
1.112
1.114
1.116
1.118
1.12
time
C
B
nonlinear
linear
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
0.7
0.75
0.8
0.85
0.9
0.95
1
1.05
1.1
1.15
1.2
time
C
B
nonlinear
linear
Small step change (+0.1)
in space velocity
Large step change (doubling, +2.8744)
in space velocity
Remarks: (1) without inverse response
(2) negative gain
Note: all operating points to the left of the peak have inverse response (RHP zeros),
while all operating points to the right of the peak do not.
Step Response for Case 3
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
1.2644
1.2646
1.2648
1.265
1.2652
1.2654
1.2656
1.2658
1.266
time
C
B
nonlinear
linear
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
1.08
1.1
1.12
1.14
1.16
1.18
1.2
1.22
1.24
1.26
1.28
time
C
B
nonlinear
linear
Small step change (+0.01)
in space velocity
Large step change (doubling, +1.2911)
in space velocity
Remarks: there is no steady-state change in C
B
for a small step change
in space velocity (gain=0)
Unforced System Responses:
Phase Plane Analysis
• The eigenvalues of the A matrix in three operating points are negative,
so that all the equilibrium point are stable nodes.
• The eigenvectors provide information about the directional
dependence of the speed of response
• The eigenvalues/eigenvectors for case 1 are
1 1
2 2
0
2.2381
1
0.1962
2.4048
0.9806
slow
fast
λ
λ
(
= − =
(
¸ ¸
(
= − =
(

¸ ¸
v
v
Unconstrained Nonlinear Minimization
• Minimization of a nonlinear function f(x):
• Using MATLAB: fminsearch
• Ex. Minimize
Step 1:
Step 2: >> x = fminsearch('fun', [2 3])
x =
1.0000 1.0000
( )
( )
( )
2
2
2
1 2 2 1 1
, 100 1 = − + − f x x x x x
x = fminsearch(‘fun’,x0)
fun: function m-file which describes the function to be minimized
x0: starting point (initial guess)
function F = fun(x)
F = 100*(x(2)-x(1)^2)^2+(1-x(1))^2;
( )
min
x
f x