You are on page 1of 20

Process Modelling, Simulation and Control for Chemical

Engineers. Solved problems. Chapter 6: Time-domain dy-


namics: Part I.
This document contains my own solutions to the problems proposed at the
end of each chapter of the book ”Process Modelling, Simulation and Control
for Chemical Engineers” Second Edition, by William L. Luyben. As such, I
can’t guarantee that the proposed solutions are free from errors. Think about
them as a starting point for developing or as a means of checking your own
solutions. Any comments or corrections will be appreciated. Contact me at
francisco.angel.rod@gmail.com
The computer programs developed for this chapter (Matlab) are available
at:
https://www.dropbox.com/
sh/zknqiqgfynqafxj/AAB07C-RHQ J7hkUTZkDnvaTa?dl=0

Problem 1
Linearize the following nonlinear functions:
αx
1. y(x) = 1+(α−1)x where α is a constant.

2. P s (T ) = eA/T +B where A and B are constants.


3. U (v) = Kv 0.8 where K is a constant.
4. L(h) = Kh3/2 where K is a constant.

Solution
1.
dy α αx(α − 1) α
= − =
dx 1 + (α − 1)x (1 + (α − 1)x)2 (1 + (α − 1)x)2
αx̄ α(x − x̄)
y(x) = +
1 + (α − 1)x̄ (1 + (α − 1)x̄)2
2.
dP s A
= − 2 eA/T +B
dT T
 
s A/T̄ +B A
P (T ) = e 1 − 2 (T − T̄ )

3.
dU
= 0.8Kv −0.2
dv
U (v) = K v̄ 0.8 + 0.8v̄ −0.2 (v − v̄)


1
4.
dL 3
= K h1/2
dh 2
 
3/2 3 1/2
L(h) = K h̄ + h̄ (h − h̄)
2

Problem 2
Linearize the ODE describing the conical tank modeled in Problem 3.1 and
convert to perturbation variables.

Solution
The tank is shown in Figure 1, the model consist of the following equations:

dV √
= F0 − K h (1)
dt
 2
π R
V = h3 (2)
3 H

Figure 1: Conical tank.

(1) and (2) can be combined into a single differential equation for h:

2 3  2


π R dh π R dh
= 3h2 = F0 − K h
3 H dt 3 H dt
 2
R dh F0 K
π = 2 − 3/2
H dt h h

The linearized equation is:

2
 2  
R dh F0 K 3 K F0
π = 2 − 3/2 + − 2 3 (h − h̄)
H dt h̄ h̄ 2 h̄5/2 h̄
The steady state values satisfy the relation:
F0 K
− 3/2 = 0
h̄2 h̄
So, the linearized equation (in terms of perturbation variables) is:
 2  
R dh 3 K F0
π = 5/2
−2 3 h
H dt 2 h̄ h̄

Problem 3
Linearize the equations describing a variable-volume CSTR similar to the one
considered in Sec. 3.3.

Solution
The variable volume CSTR is modelled by the following equations:

dV
= F0 − F
dt
d(V C)
= F0 C0 − F C − V kC
dt
Where F0 and C0 are step inputs. The first equation is already linear, the
second equation is linearized in the following way:

d(V C)
= F0 C0 − F C − V kC
dt
dV dC
C +V = F0 C0 − F C − V kC
dt dt
dC
C(F0 − F ) + V = F0 C0 − F C − V kC
dt
dC
V = F0 C0 − F0 C − V kC
dt
dC F0 C 0 F0 C
= − − kC
dt V V
dC F0 C 0 F0 C 0 F0 C̄
= − (V − V̄ ) −
dt V̄ V̄ 2 V̄
F0 C̄ F0
+ 2 (V − V̄ ) − (C − C̄) − k(C − C̄) − k C̄
V̄  V̄ 
dC F0 V C̄ V C0
= − − C − kC
dt V̄ V̄ V̄

3
Where the last equation is in terms of perturbation variables.

Problem 4
Solve the ODEs:

1.
d2 x
 
dx dx
+5 + 4x = 2, x(t=0) = 0, =1
dt2 dt dt (t=0)

2.
d2 x
 
dx dx
+2 + 2x = 1, x(t=0) = 2, =1
dt2 dt dt (t=0)

Solution
1. Characteristic polynomial:

s2 + 5s + 4 = 0

The roots are:

s1 = −1 s2 = −4

The particular solution is xp = 1/2, so the total solution is:

1
x = C1 e−4t + C2 e−t +
2
The constants are determined from the initial conditions:

1
C1 + C2 + =0
2
−4C1 − C2 = 1

The values of the constants are C1 = − 61 and C2 = − 26 . The total solution


is then:

1 2 1
x = − e−4t − e−t +
6 6 2
2. Characteristic polynomial:

s2 + 2s + 2 = 0

The roots are:

4
s1 = −1 + i s2 = −1 − i

The particular solution is xp = 1/2, so the total solution is:

1
x = e−t (C1 cos(t) + C2 sin(t)) +
2
The constants are determined from the initial conditions:

1
C1 + =2
2
−C1 + C2 = 1
3
The values of the constants are C1 = 2 and C2 = 25 . The total solution is
then:
 
3 5 1
x = e−t cos(t) + sin(t) +
2 2 2

Problem 5
Show that the linearized system describing the gravity flow tank of Example
6.4 is a second-order system. Solve for the damping coefficient and the time
constant in terms of the parameters of the system.

Solution
The system is shown in Figure 2, and is modelled by the following equations:

Figure 2: Gravity flow tank.

dh
At = F0 − F (1)
dt
dF Ap ρh KF F 2
= − (2)
dt L ρA2p

5
Where KF is a friction factor, F0 is a step input, and At and Ap are the
transversal area of the tank and pipe, respectively. Taking the derivative of the
second equation, and after replacing the value of dh
dt from (1) we obtain:

d2 F
 
Ap g F0 − F 2KF F dF
= −
dt2 L At ρA2p dt
d2 F
 
Ap g F0 − F 2KF F̄ dF
2
= −
dt L At ρA2p dt
LAt d2 F 2KF F̄ At L dF
F0 = + +F
gAp dt2 ρA3p g dt

Comparing with the standard form of the second order equation we have:

s s
LAt KF F̄ LAt
τp = ζ= 5/2
gAp ρAp g

Problem 6
Solve the second-order ODE describing the steadystate flow of an incompressible
newtonian liquid through a pipe:
   
d dv̄r ∆P gc
r =
dr dr µL
What are the boundary conditions?

Solution
The differential equation is solved by direct integration:

 
d dv̄ ∆P gc
r =
dr dr µL
dv̄ ∆P gc
r = r + C1
dr µL
dv̄ ∆P gc C1
= +
dr µL r
∆P gc
v̄ = r + C1 ln(r) + C2
µL
The boundary conditions are the no-slip condition at the surface of the pipe
and the symmetry condition at the center of the pipe:

6
 
dv
=0
v(r=R) = 0 dr (r=0)

Problem 7
Find the responses of general first and second order systems given below to the
following forcing functions:

dx
τp + x = m(t)
dt
2
d x dx
τp2 2 + 2τp ζ + x = m(t), 0 < ζ < 1
dt dt
1. m(t) = δ(t)
2. m(t) = sin(wt)

Solution
1. The response for m(t) = δ(t) can be obtained by taking the derivative of
the unit step response.
For the first order system, the unit step response is:

x(t) = C1 e−t/τp + 1

so the response to the unit impulse is:

x(t) = M1 e−t/τp

For the second order system, in the underdamped case, the unit step
response is:
p ! p !!
−ζt/τp 1 − ζ2 1 − ζ2
x(t) = e C1 sin t + C2 cos t +1
τp τp

so the response to the unit impulse is:


p ! p !!
1 − ζ2 1 − ζ2
x(t) = e−ζt/τp M1 sin t + M2 cos t
τp τp

2. The response for m(t) = sin(wt) is the same as for m(t) = δ(t), except
that the particular solution is different.
For the first order system the response is:

7
1
x(t) = C1 e−t/τp + (sin(wt) − τp cos(wt))
τp2 w2 + 1

For the second order system the response is:

p ! p !!
−ζ/τP t 1 − ζ2 1 − ζ2
x(t) = e M1 sin t + M2 cos t
τp τp
1
(1 − τp2 w2 )sin(wt) − 2τp wζcos(wt)

+
4τp2 w2 ζ 2 + (1 − w2 τp2 )

Problem 8
Solve for the unit step response of a general second-order system for:

1. ζ = 1
2. ζ > 1

Solution
1. In the critically damped case, there are two identical solutions to the
characteristic polynomial:

ζ
s1 = s2 = −
τp
So the homogeneous solution is:

− τζp t
xh (t) = (C1 + C2 t)e

The particular solution is xp (t) = 1, so the complete solution is:

− τζp t
x(t) = (C1 + C2 t)e +1

2. In the overdamped case, there are two different solutions to the charac-
teristic polynomial:

p p
−ζ + ζ2 − 1 −ζ − ζ2 − 1
s1 = s2 =
τp τp

The particular solution is xp (t) = 1, so the complete solution is:


√ √
−ζ+ ζ 2 −1 −ζ− ζ 2 −1
x(t) = C1 e τp
+ C2 e τp
+1

8
Problem 9
A feedback controller is added to the CSTR of Example 6.6. The inlet concen-
tration CA0 is now changed by the controller to hold CA near its setpoint value
set
CA .

CA0 = CAM + CAD


where CAD is a disturbance composition. The controller has proportional
and integral action:
 Z 
1
CAM = C̄AM + Kc E + Edt
τI
where Kc and τI are constants, C̄AM = steadystate value of CAM and E =
set
CA − CA .
Derive the second-order equation describing the closedloop process in terms
of perturbation variables. Show that the damping coefficient is:
1 + kτ + Kc
ζ= p
2 Kc τ /τI
What value of Kc will give critical damping? At what value of Kc will the
system become unstable?.

Solution
The differential equation for concentration in Example 6.6 is:
 
dCA 1 CA0
+ + k CA =
dt τ τ
Replacing the expression for CA0 we obtain:

    Z  
dCA 1 1 1
+ + k CA = C̄AM + Kc E + Edt + CAD
dt τ τ τI

Taking the derivative with respect to time:

d2 CA
 
1 Kc dCA Kc dCAD
2
+ +k+ + CA =
dt τ τ dt τI τ dt
τI τ d2 CA
 
τI kτI τ dCA dCAD τI τ
+ + + τI + CA =
Kc dt2 Kc Kc dt dt Kc

Comparing with the standard form for the second order equation we have:
r
τI τ
τp =
Kc

9
τI + kτi τ
2τp ζ = + τI
Kc
From the last equation:
r
1 τI
ζ= (1 + kτ + Kc )
2 Kc τ
The system response is critically damped is ζ = 1:

p rτ
2 Kc = 1 + kτ + Kc
τI
p rτ
Kc − 2 Kc + (1 + kτ ) = 0
τI

This is a second order equation for Kc , which has two solutions:

r r
τ τ
s1 = + − (1 + kτ )
τI τI
r r
τ τ
s2 = − − (1 + kτ )
τI τI

The system response is unstable if ζ < 0. For Kc > 0, ζ > 0, so a necessary


condition for Kc in order to have ζ < 0 is that Kc < 0. A negative value of
Kc is unreasonable in this situation because errors in concentration would be
reinforced instead of attenuated. Also, a detailed analysis of the values of the
roots of the characteristic polynomial would be required in order to determine
the boundary for instability, because both τp and ζ would be complex numbers.

Problem 10
Combine the three first-order ODESs describing the three-CSTR system of Sec.
3.2 into one third-order ODE in terms of C3 . Then solve for the response of C3
to a unit step change in C0 , assuming all k’s and τ 0 s are identical.

Solution
The model for the CSTR system is:

dC1
τ = C0 − (1 + kτ )C1 (1)
dt
dC2
τ = C1 − (1 + kτ )C2 (2)
dt
dC3
τ = C2 − (1 + kτ )C3 (3)
dt

10
dC2
With Ci (0) = 0. From (3) we can obtain expressions for C2 and dt (after
taking the derivative with respect to time):

dC3
C2 = τ + (1 + kτ )C3 (4)
dt
dC2 d2 C3 dC3
=τ + (1 + kτ ) (5)
dt dt2 dt
After replacing (4) and (5) in (2) we obtain an expression for C1 (which is
also a second-order equation for C3 ):

d2 C 3 dC3
C1 = τ 2 + 2τ (1 + kτ ) + (1 + kτ )2 C3 (6)
dt2 dt
Taking the derivative with respect to time of (6) we obtain an expression for
dC1
dt :

dC1 d3 C3 d2 C3 dC3
= τ 2 2 + 2τ (1 + kτ ) 2 + (1 + kτ )2 (7)
dt dt dt dt
Replacing (6) and (7) in (1) we obtain a third-order differential equation for
C3 :

d3 C3 d2 C3 dC3
τ3 + 3τ 2
(1 + kτ ) + 3τ (1 + kτ )2 + (1 + kτ )3 C3 = C0 (8)
dt3 dt2 dt
The characteristic polynomial is:

s3 τ 3 + 3s2 τ 2 (1 + kτ ) + 3sτ (1 + kτ )2 + (1 + kτ )3 = 0

It has three identical roots:

(1 + kτ )
s1 = s2 = s3 = −
τ
The homogeneous solution is then:
 
2 (1 + kτ )
C3,H = (M1 + M2 t + M3 t )exp − t
τ
Where M1 , M2 and M3 are constants. The particular solution corresponds
to:
1
C3,P =
(1 + kτ )3
The total solution is then:

11
 
(1 + kτ ) 1
C3 (t) = (M1 + M2 t + M3 t2 )exp − t +
τ (1 + kτ )3
The values of the constants can be determined from the initial conditions
for C3 :

C3 (t = 0) = 0
 
dC3
=0
dt (t=0)
 2 
d C3
=0
dt2 (t=0)

Where the initial values for the first and second derivative can be obtained
by looking at (3) and (5), respectively. From the values of the initial conditions
we get the following system of equations for the Mi constants:

1
M1 + =0
(1 + kτ )3
(1 + kτ )
M2 − M1 =0
τ
(1 + kτ ) (1 + kτ )2
2M3 − 2M2 + M1 =0
τ τ2
Whose solution is:

1
M1 = −
(1 + kτ )3
1
M2 = −
τ (1 + kτ )2
1 1
M3 = − 2
2τ (1 + kτ )

The complete solution is then:

t2
   
1 1 t 1 (1 + kτ )
C3 (t) = − + + 2 exp − t
(1 + kτ )3 (1 + kτ )3 τ (1 + kτ )2 2τ (1 + kτ ) τ

A numerical solution of the original system of equations is shown in Figure


3. A plot of the analytical solution for the same values of the parameters is
shown in Figure 4, together with the numerical solution for comparison.
Code(s) used: P10 series CSTR.m

12
Figure 3: Numerical solution for k=0.5, τ =1.2 and C0 =1.

Problem 11
Consider the second-order underdamped system:

d2 x dx
τp2
+ 2τp ζ + x = Kp m(t)
dt dt
where Kp is the process steadystate gain and m(t) is the forcing function.
The unit step response of such a system can be characterized by rise time tR ,
peak time tP , settling time tS , and peak overshoot ratio POR. The values of
tR and tP are defined in Figure 5. The value of tS is the time it takes the
exponential portion of the response to decay to a given fraction F of the final
steadystate value of x, xSS . The POR is defined:
xtP − xSS
P OR =
xSS
Show that
√ 
−ζt/τp 1−ζ 2
1. x
xSS =1− e√
sin τp + φ , where φ = cos−1 ζ
1−ζ 2

tR π−φ
2. τp = sinφ

tS ln(1/(F sinφ))
3. τp = cosφ

4. P OR = e−πcosφ

13
Figure 4: Analytical solution for k=0.5, τ =1.2 and C0 =1.

Figure 5: Response of the system.

Solution
The two roots of the characteristic polynomial are (0 < ζ < 1):

p
ζ 1 − ζ2
s1 = − + i
τp τp
p
ζ 1 − ζ2
s2 = − − i
τp τp

The homogeneous solution is:


p ! p !!
1 − ζ2 1 − ζ2
xh = e−ζt/τp C1 cos t + C2 sin
τp τp

14
The particular solution corresponds to the steady state value xSS , so the
complete solution of the problem is:

p ! p !!
−ζt/τp 1 − ζ2 1 − ζ2
x=e C1 cos t + C2 sin + xSS
τp τp

The constants C1 and C2 are determined from the initial conditions:

x(t = 0) = 0
 
dx
=0
dt (t=0)

The results are:

C1 = −xSS
xSS ζ
C2 = − p
1 − ζ2
The complete solution is then:

p ! p !!!
e−ζt/τp 1 − ζ2 p 1 − ζ2
x = xSS 1− p ζsin t + 1 − ζ 2 cos t
1 − ζ2 τp τp

At this stage, we assume that the sinusoidal part of the solution is of the
form:
p !
1 − ζ2
sin t+φ
τp
From the properties of trigonometric functions, we have:

p ! p ! p !
1 − ζ2 1 − ζ2 1 − ζ2
sin t + φ = sin t cos(φ) + cos t sin(φ)
τp τp τp

Comparing with the expression for the complete solution, φ must satisfy the
following relations:

cos(φ) = ζ
p
sin(φ) = 1 − ζ 2

With this change in notation, the solution is written as:

15
p !!
e−ζt/τp 1 − ζ2
x = xSS 1− p sin t+φ
1 − ζ2 τp

1. The first relation is obtained by dividing the previous expression by xSS :


p !
x e−ζt/τp 1 − ζ2
=1− p sin t+φ
xSS 1 − ζ2 τp

2. When t = tR , x = xSS , then:

p !
e−ζtR /τp 1 − ζ2
1− p sin tR + φ =1
1 − ζ2 τp
p !
e−ζtR /τp 1 − ζ2
p sin tR + φ =0
1 − ζ2 τp
p !
1 − ζ2
sin tR + φ = 0
τp
p
1 − ζ2
tR + φ = π
τp
tR π−φ
=p
τp 1 − ζ2
tR π−φ
=
τp sin(φ)

3. When t = tS , the exponential part of the solution is equal to F xSS , then:

e−ζtS /τp
p =F
1 − ζ2
ζtS p
− = ln(F 1 − ζ 2 )
τp
p
tS ln(F 1 − ζ 2 )
=−
τp ζ
tS ln(1/(F sin(φ)))
=
τp cos(φ)

4. The derivative with respect to time of x is:

p ! p ! !!
dx xSS − τζp t 1 − ζ2 p 1 − ζ2
= p e cos t+φ 1 − ζ 2 − sin t+φ ζ
dt τp 1 − ζ 2 τp τp

16
At t = tP the derivative of the the solution is zero:

p ! p ! !!
x − τζp tP 1 − ζ2 1 − ζ2
p SS
p
e cos tP + φ 2
1 − ζ − sin tP + φ ζ =0
τp 1 − ζ 2 τp τp
p ! p !
1 − ζ2 p 1 − ζ 2
cos tP + φ 1 − ζ 2 − sin tP + φ ζ = 0
τp τp

p p !
1 − ζ2 1 − ζ2
= tg tP + φ
ζ τp
p !
sin(φ) 1 − ζ2
= tg tP + φ
cos(φ) τp
p !
1 − ζ2
tg(φ) = tg tP + φ
τp

We are looking at a solution for t > 0, from the identity tg(φ + π) = tg(φ),
we have:

p
1 − ζ2
tP = π
τp
πτp
tP = p
1 − ζ2

Now we can obtain an expression for POR:

√ 2
e−ζπ/ 1−ζ
P OR = − p sin (π + φ)
1 − ζ2
√ 2
e−ζπ/ 1−ζ
P OR = p sin (φ)
1 − ζ2
√ 2
P OR = e−ζπ/ 1−ζ
P OR = e−cos(φ)π/sin(φ)

This result is in disagreement with the one proposed in the book. But
according to other sources, it is correct.1
1 https : //en.wikipedia.org/wiki/Overshoot% 28signal%29

17
Problem 12
1. Linearize the two ODEs given below that describe a nonisothermal CSTR
with constant volume. The input variables are T0 , TJ , CA0 , and F.

dCA
V = F (CA0 − CA ) − V kCA
dt
dT
V ρCp = F Cp ρ(T0 − T ) − λV kCA − U A(T − TJ )
dt
where k = αe−E/RT
2. Convert to perturbation variables and arrange in the form

dCA
= a11 CA + a12 T + a13 CA0 + a14 T0 + a15 F + a16 TJ
dt
dT
= a21 CA + a22 T + a23 CA0 + a24 T0 + a25 F + a26 TJ
dt
3. Combine the two linear ODESs above into one second-order ODE and find
the roots of the characteristic equation in terms of the aij coefficients.

Solution
1. The linearized equations, after canceling the steady state terms are:

 
dCA F̄ k̄E
=− + k̄ (CA − C̄A ) − (T − T̄ )
dt v RT̄ 2
F̄ (C̄A0 − C̄A )
+ (CA0 − C̄A0 ) + (F − F̄ )
V  V 
dT λk̄ F̄ λk̄E UA
=− (CA − C̄A ) − + + (T − T̄ )
dt ρCp V ρCp RT̄ 2 V ρCp
F̄ (T̄0 − T̄ ) UA
+ (T0 − T̄0 ) + (F − F̄ ) + (TJ − T̄J )
V V V ρCp
The above equations can be written in terms of perturbation variables:

 
dCA F̄ k̄E F̄ (C̄A0 − C̄A )
=− + k̄ CA − 2
T + CA0 + F
dt v RT̄ V V
 
dT λk̄ F̄ λk̄E UA F̄ (T̄0 − T̄ )
=− CA − + 2
+ T + T0 + F
dt ρCp V ρCp RT̄ V ρCp V V
UA
+ TJ
V ρCp
2. Comparing the above equations with the notation proposed we have:

18
λk̄
a21 = −
F̄ ρCp
a11 = − − k̄
V 
F̄ λk̄E UA

k̄E a22 =− + +
a12 =− (T − T̄ ) V ρCp RT̄ 2 V ρCp
RT̄ 2
a23 = 0

a13 = F̄
V a24 =
a14 =0 V
(T̄0 − T̄ )
C̄A0 − C̄A a25 =
a15 = V
V UA
a16 =0 a26 =
V ρCp

3. From the energy balance equation we can obtain expressions for CA and
dCA
dt (after taking the derivative with respect to time):

dT
a21 CA = − a22 T + ...
dt
CA d2 T dT
a21 = 2 − a22 + ...
dt dt dt

Replacing the previous expressions in the mass balance we get:

dCA
a21 − a11 (a21 CA ) − a21 a12 T = ...
dt 
d2 T

dT dT
− a22 − a11 − a22 T + a21 a12 T = ...
dt2 dt dt
d2 T dT
− (a22 + a11 ) + (a11 a22 − a21 a12 )T = ...
dt2 dt

The characteristic polynomial is:

s2 − (a22 + a11 )s + (a11 a22 − a21 a12 ) = 0

The roots are:

1 p 
s1 = a22 + a11 + (a22 + a11 )2 − 4(a11 a22 − a21 a12 )
2
1 p 
s1 = a22 + a11 − (a22 + a11 )2 − 4(a11 a22 − a21 a12 )
2

19
Problem 13
The flow rate F of a manipulated stream through a control valve with equal
percentage trim is given by the following equation:

F = Cv αx−1
where F is the flow in gallons per minute and Cv and α are constants set by
the valve size and type. The control valve stem position x (fraction of wide open)
is set by the output signal CO of an analog electronic feedback controller whose
signal range is 4 to 20 milliamperes. The valve cannot be moved instantaneously.
It is approximately a first-order system:
dx CO − 4
τv +x=
dt 16
The effect of the flow rate of the manipulated variable on the process tem-
perature T is given by:
dT
τp + T = Kp F
dt
Derive one linear ordinary differential equation that gives the dynamic de-
pendence of process temperature on controller output signal CO.

Solution
The stem position as a function of time is:
CO − 4
x = C1 e−t/τv +
16
Where C1 depends on the initial position. Replacing in the differential equa-
tion for temperature gives:
dT −t/τv
+ CO−4 −1
τp + T = Kp Cv αC1 e 16
dt

20

You might also like