CHEE3367 – Process Dynamics and Control
M. Nikolaou, University of Houston
Case Study: CSTR Dynamics via Linearization1
1. Representation of multivariable systems
1.1. Time-domain representation
- Linear models needed. If nonlinear model available from first principles, linearize around steady-state (if dealing with
continuous process): System equations:
dx(t )
= f (x(t ), u(t ))
dt (1)
y (t ) = h(x(t ), u(t ))
where
⎡ x1 (t ) ⎤ ⎡ u1 (t ) ⎤ ⎡ y1 (t ) ⎤
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
x(t ) =ˆ ⎢ # ⎥ , u(t ) =ˆ ⎢ # ⎥ , y (t ) =ˆ ⎢ # ⎥ (2)
⎢⎣ xn (t ) ⎥⎦ ⎢⎣um (t ) ⎥⎦ ⎢ yq (t ) ⎥
⎣ ⎦
⎡ f1 ( x1 (t ),..., xn (t ), u1 (t ),..., um (t )) ⎤
f (x(t ), u(t )) =ˆ ⎢⎢ # ⎥
⎥ (3)
⎢⎣ f n ( x1 (t ),..., xn (t ), u1 (t ),..., um (t )) ⎥⎦
⎡ h1 ( x1 (t ),..., xn (t ), u1 (t ),..., um (t )) ⎤
⎢ ⎥
h(x(t ), u(t )) =ˆ ⎢ # ⎥ (4)
⎢ hq ( x1 (t ),..., xn (t ), u1 (t ),..., um (t )) ⎥
⎣ ⎦
and at steady state
0 = f (x s , u s )
(5)
y s = h( x s , u s )
Linearization of the state and output equations around a steady state yields the following equations
d ∆x
= A N ∆N x(t ) + B N ∆N u(t )
dt ⎛ ∂f ⎞ x (t ) − x ⎛ ∂f ⎞ u (t ) −u
⎜ ⎟ s ⎜ ⎟ s
⎝ ∂x ⎠xs ,u s ⎝ ∂u ⎠x s ,u s
(6)
∆
Ny (t ) = N ∆x(t ) +
C N ∆u(t )
D
y (t ) − y s ⎛ ∂h ⎞ ⎛ ∂h ⎞
⎜ ⎟ ⎜ ⎟
⎝ ∂x ⎠xs ,u s ⎝ ∂u ⎠xs ,u s
∂f
where is the Jacobian matrix of the vector-valued function f of the vector x defined as
∂x
⎡ ∂f1 ∂f1 ⎤
⎢ ∂x " ∂x ⎥
∂f ⎢
1 n ⎥
=ˆ # % # ⎥
⎢ (7)
∂x ⎢ ⎥
⎢ ∂f n " ∂f n ⎥
⎢⎣ ∂x1 ∂xn ⎥⎦
1
Calculations were done in Mathematica.
CHEE 3367 Lecture Notes Michael Nikolaou
∂f ∂g ∂g
and similarly for , , ; and the deviation variables are defined as
∂u ∂x ∂u
∆
N x(t ) , ∆
N u(t ) , ∆
N y (t ) (8)
x (t ) − xs u (t ) −us y (t ) − y s
and A, B, C, D are (Jacobian) matrices of appropriate dimensions defined in eqn. (6).
1.2. Laplace domain representation
To find the transfer matrix between input and output, Eqn. (6) ⇒
∆Y( s ) = ( C[ sI − A]−1 B + D ) ∆U( s ) + C[ sI − A]−1 ∆x(t = 0) (Why?)
G ( s)
with
G( s ) = C[ sI − A ]−1 B + D (9)
1.3. Connecting Laplace and time domains
adj(sI − A)
G ( s ) = C[ sI − A]−1 B + D = C B+D⇒ (10)
det( sI − A)
Poles of G ( s ) are roots of det( sI − A) ⇒
Poles of G ( s ) are eigenvalues of A .
EXAMPLE 1 – DEVELOPMENT OF TRANSFER MATRIX FOR CSTR FROM FIRST PRINCIPLES
Consider a jacket-cooled continuous stirred-tank reactor (CSTR) in which the exothermic reaction AÆB takes place.
F, CAi, Ti
At V
Tc
AÆB
F, CA, T
Figure 1 – Continuous stirred-tank reactor (CSTR).
Assuming that the volume of the liquid in the reactor remains constant, the reactor can be modeled as
dC A F (t ) ⎛ −E ⎞
= ( C Ai − C A (t ) ) − k0 exp ⎜ ⎟ C A (t )
dt V ⎝ RT (t ) ⎠
(11)
dT F (t ) ⎛ −E ⎞ UAt
= (Ti − T (t ) ) + Jk0 exp ⎜ ⎟ C A (t ) − (T (t ) − Tc (t ) )
dt V ⎝ RT (t ) ⎠ ρc pV
where
Manipulated inputs: F, Tc
-2-
CHEE 3367 Lecture Notes Michael Nikolaou
Measured outputs: CA, T
States: CA, T
and parameter values are as follows.
CASE I (Single steady state):
V = 1.36 m3 (volume of liquid in reactor)
k0 = 7.08 × 107 1/h (reaction rate constant)
J = 0.02775 m3 K/mol (heat of reaction per mole per density per specific heat)
E / R = 8375 K (activation energy over gas constant)
UAt
= 2.8 m3 /h (heat transfer coefficient x heat exchange area per density per specific heat)
ρc p
C Ai = 8008 mol/m3 (inlet concentration of A)
Ti = 373.3 K (inlet temperature)
The steady state corresponding to the input values for flowrate and coolant temperature
Fs = 1.133m3 /h
(12)
Tcs = 532.6 K
is
C As = 393.2 mol/m3
(13)
Ts = 547.6 K
for concentration of A and temperature in the CSTR.
(HWNTHI: Verify the above steady state. Is it unique? Combining eqns. (11) at steady state yields a single eqn. for Ts :
Fs
C Ai
Fs ⎛ −E ⎞
0 = ( C Ai − C As ) − k0 exp ⎜ ⎟ C As ==> C As =
V
V ⎝ RT (t ) ⎠ Fs ⎛ −E ⎞
+ k0 exp ⎜ ⎟
V ⎝ RT (t ) ⎠
(14)
Fs
⎛ −E ⎞ C Ai
Fs UAt
0 = (Ti − Ts ) + Jk0 exp ⎜ ⎟
V − (Ts − Tc s )
V ⎝ RTs ⎠ Fs + k exp ⎛ − E ⎞ ρc pV
0 ⎜ ⎟
V ⎝ RT (t ) ⎠
Fs
Jk0 C Ai UAt
+ (Ti − Ts ) − (Ts − Tcs ) = 0
V Fs
(15)
Fs
exp ⎡⎣ E/R ⎤ + k0
V
ρC pV
V Ts ⎦
Fs
Jk0 C Ai UAt
and − Vs (Ti − Ts ) + (Ts − Tcs ) vs. Ts ; find
V F
To visualize the solution of eqn. (15) for Ts , plot Fs
exp ⎡⎣ E/R ⎤ + k0 ρC pV
V Ts ⎦
intersection. See Figure 2.)
-3-
CHEE 3367 Lecture Notes Michael Nikolaou
Heat rate
200
547.6
100
T HK L
450 500 550
-100
-200
-300
Fs
Jk0 V C Ai
Figure 2 – Plot of heat generation rate (S-curve, ) and heat input minus output
Fs
V exp ⎡⎣ ET/sR ⎤⎦ + k0
UAt
rate ( − (Ti − Ts ) + (Ts − Tcs ) )for the continuous stirred-tank reactor (CSTR) studied.
Fs
V
ρC pV
Therefore
⎡ Fs −
E
k E −
E
⎤
⎢ − − k0 e − 0 2 e RTs C As ⎥
RTs
⎢ V RTs ⎥ ⎡ −16.974035 −177.2558⎤
A=⎢ E E ⎥=⎢ ⎥ (16)
−
⎢ Jk e RTs Fs Jk0 E − RTs UAt ⎥ ⎣ 0.4479112 2.0269367 ⎦
− + e C As −
⎢ 0
V RTs2 ρc pV ⎥⎦
⎣
⎡ C Ai − C As ⎤
⎢ 0 ⎥
⎥ = ⎡⎢
V 5599.118 0 ⎤
B=⎢ ⎥ (17)
⎢ i s
T − T UA t ⎥ ⎣ −128.162 2.05882 ⎦
⎢ V ⎥
ρc pV ⎦
⎣
⎡1 0⎤
C=⎢
1 ⎥⎦
(18)
⎣0
⎡0 0⎤
D=⎢
0 ⎥⎦
(19)
⎣0
Therefore, for the specific system, we have
⎡ s − 2.02505 −177.188 ⎤
⎢ ⎥
⎡1 0 ⎤ ⎣ 0.447697 s + 16.9663⎦ ⎡ 5599.11 0 ⎤ ⎡0 0⎤
G (s) = ⎢ ⎥ ⎢ ⎥+⎢ ⎥
⎣ 0 1 ⎦ s + 14.9413s + 44.9689 ⎣ −128.162 2.05882 ⎦ ⎣0 0 ⎦
2
⎡ 5599.11s + 11368 −364.798 ⎤ (20)
⎢ s 2 + 14.9413s + 44.9689 s 2 + 14.9413s + 44.9689 ⎥
=⎢ ⎥
⎢ −128.149 s + 332.485 2.05882s+34.9307 ⎥
⎢⎣ s 2 + 14.9413s + 44.9689 s 2 + 14.9413s + 44.9689 ⎥⎦
i.e.
⎡ ∆C A ( s ) ⎤ ⎡ G11 ( s ) G12 ( s ) ⎤ ⎡ ∆F ( s ) ⎤
⎢ ∆T ( s ) ⎥ = ⎢G ( s ) G ( s ) ⎥ ⎢ ∆T ( s ) ⎥ (21)
⎣ ⎦ ⎣
21 22 ⎦⎣ c ⎦
G (s)
or
-4-
CHEE 3367 Lecture Notes Michael Nikolaou
∆C A ( s ) = G11 ( s )∆F ( s ) + G12 ( s )∆Tc ( s )
(22)
∆T ( s ) = G21 ( s )∆F ( s ) + G22 ( s )∆Tc ( s )
• Note that poles of G ( s ) = eigenvalues of A = −10.76, −4.178 .
548.4
430
548.2
C A Hmolêm3L
548.0 420
547.8
T HK L
547.6 410
547.4
547.2 400
547.0
0.0 0.5 1.0 1.5 2.0 2.5 3.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0
Time HhL Time HhL
Figure 3 – Temperature and concentration response of CSTR to step change in inlet flow rate
by +10% of its steady state value (dashed line = approximately linearized system; continuous
line = nonlinear eqns. (11)). Note the inverse response of temperature to flowrate, Figure
3, due to right half-plane zero (=?) in G21 ( s ) .
CASE II (Multiple steady states):
V = 1.36 m3 (volume of liquid in reactor)
k0 = 7.08 × 107 1/h (reaction rate constant)
J = 0.02775 m3 K/mol (heat of reaction per mole per density per specific heat)
E / R = 8375 K (activation energy over gas constant)
UAt
= 0.5 m3 /h (heat transfer coefficient x heat exchange area per density per specific heat)
ρc p
C Ai = 8008 mol/m3 (inlet concentration of A)
Ti = 373.3 K (inlet temperature)
The steady states for concentration of A and temperature in the CSTR corresponding to the input values for flowrate and
coolant temperature
Fs = 1.133m3 /h
(23)
Tcs = 400 K
are multiple (Figure 4):
-5-
CHEE 3367 Lecture Notes Michael Nikolaou
Heat rate
200
150 519.3
100
459.
50
T HK L
386.4 450 500 550
Fs
Jk0 V C Ai
Figure 4 – Plot of heat generation rate (S-curve, ) and heat input minus output
Fs
V exp ⎣⎡ ET/sR ⎦⎤ + k0
UAt
rate ( − (Ti − Ts ) + (Ts − Tcs ) )for the continuous stirred-tank reactor (CSTR) studied.
Fs
V
ρC pV
• Steady state 1 (Stable)
C As = 7754 mol/m3
(24)
Ts = 386.4 K
⎡ −0.8604 −11.88 ⎤ ⎡ 186.8 0 ⎤ ⎡1 0 ⎤ ⎡0 0⎤
A=⎢ ⎥ B=⎢ ⎥ , C=⎢ ⎥ , D=⎢ ⎥ (25)
⎣ 0.0007575 −0.8712 ⎦ ⎣ −9.608 0.3676 ⎦ ⎣0 1 ⎦ ⎣0 0⎦
⎡ 276.9 + 186.89s 4.366 ⎤
⎢ 0.7587 + 1.732s + s 2 − 0.7587 + 1.732 s + s 2 ⎥
G (s) = ⎢ ⎥ (26)
⎢ −8.125 − 9.608s 0.3676(0.8604 + s ) ⎥
⎢⎣ 0.7587 + 1.732s + s 2 0.7587 + 1.732s + s 2 ⎥⎦
Eigenvalues of A = −0.8658 ± j 0.09469 (both in the left half-plane).
2π
Period of CSTR-induced oscillations is = 66 h , too long to observe before decay due to exp[−0.8658t ] .
0.09469
386.4
386.2 7790
C A Hmolêm3L
386.0
7780
T HK L
385.8
385.6 7770
385.4
7760
385.2
0 2 4 6 8 10 0 2 4 6 8 10
Time HhL Time HhL
Figure 5 – Temperature and concentration response of CSTR to step change in inlet flow rate
by +10% of its steady state value (dashed line = approximately linearized system; continuous
line = nonlinear eqns. (11)).
(HWNTHI: Verify the above.)
-6-
CHEE 3367 Lecture Notes Michael Nikolaou
• Steady state 2 (Unstable)
C As = 3983 mol/m3
(27)
Ts = 459.0 K
⎡ −1.675 −133.3⎤ ⎡ 2959 0 ⎤ ⎡1 0 ⎤ ⎡0 0⎤
A=⎢ ⎥ , B=⎢ ⎥ , C=⎢ ⎥ , D=⎢ ⎥ (28)
⎣ 0.02336 2.498 ⎦ ⎣ −62.99 0.3676 ⎦ ⎣0 1 ⎦ ⎣0 0⎦
⎡ 1002 + 2959s 49.01 ⎤
⎢ −1.071 − 0.8237 s + s 2 − −1.071 − 0.8237 s + s 2 ⎥
G (s) = ⎢ ⎥ (29)
⎢ −36.37 − 62.99 s 0.3676(1.675 + s) ⎥
⎣⎢ −1.071 − 0.8237 s + s 2 −1.071 − 0.8237 s + s 2 ⎦⎥
Eigenvalues of A = 1.525, −0.7019 (one in the right half-plane).
500
8000
450 7000
C A Hmolêm3L
T HK L
6000
400
5000
350
4000
0 2 4 6 8 10 0 2 4 6 8 10
Time HhL Time HhL
540
4000
520
C A Hmolêm3L
3000
500
T HK L
2000
480
460 1000
440
0
0 2 4 6 8 10 0 2 4 6 8 10
Time HhL Time HhL
Figure 6 – Temperature and concentration response of CSTR to step change in inlet flow rate
by +10% (top row) and -10% (bottom row) of its steady state value (dashed line =
approximately linearized system; continuous line = nonlinear eqns. (11)). The CSTR escapes
either towards steady state 1 or 3.
(HWNTHI: Verify the above.)
-7-
CHEE 3367 Lecture Notes Michael Nikolaou
• Steady state 3 (Stable)
C As = 850.7 mol/m3
(30)
Ts = 519.3 K
⎡ −7.842 −185.2 ⎤ ⎡ 5262 0 ⎤ ⎡1 0 ⎤ ⎡0 0⎤
A=⎢ ⎥ , B=⎢ ⎥ , C=⎢ ⎥ , D=⎢ ⎥ (31)
⎣ 0.1945 3.938 ⎦ ⎣ −107.3 0.3676 ⎦ ⎣0 1 ⎦ ⎣0 0⎦
⎡ −848.6 + 5263s 68.09 ⎤
⎢ 5.135 + 3.903s + s 2 − 5.135 + 3.903s + s 2 ⎥
G (s) = ⎢ ⎥ (32)
⎢ 181.8 − 107.3s 0.3676(7.842 + s) ⎥
⎢⎣ 5.135 + 3.903s + s 2 5.135 + 3.903s + s 2 ⎦⎥
Eigenvalues of A = −1.952 ± j1.151 (both in the left half-plane).
2π
Period of CSTR-induced oscillations is = 5.5 h , too long to observe before decay due to exp[−1.952t ] .
1.151
523
940
522
C A Hmolêm3L 920
521
T HK L
900
520 880
519 860
518 840
0 2 4 6 8 10 0 2 4 6 8 10
Time HhL Time HhL
Figure 7 – Temperature and concentration responses of CSTR to step change in inlet flow rate
by +10% of its steady state value (dashed line = approximately linearized system; continuous
line = nonlinear eqns. (11)). Note the inverse responses of both temperature and
concentration (associated with the right half-plane zeros of the corresponding transfer
functions).
(HWNTHI: Verify the above.)
-8-