Process Control 4 - 2024
Process Control 4 - 2024
&
Automation
If you have a smart project, you can say "I'm an engineer“
Lecture 3
Staff boarder
Dr. Mostafa Elsayed Abdelmonem
Process Control & Automation
Lecture aims:
Development of a Control System and control strategies
Development of Dynamic Models
Understand the Degrees of Freedom Analysis
Development of Dynamic Models
d (Vρx )
= w1x1 + w2 x2 − wx (2-3)
dt
The corresponding steady-state model was derived in Ch. 1 (cf. Eqs. 1-1 and 1-2).
0 = w1 + w2 − w (2-4)
0 = w1 x1 + w2 x2 − wx (2-5)
4
Conservation Laws
Theoretical models of chemical processes are based on conservation laws.
Conservation of Mass
Conservation of Component i
rate of component i rate of component i
=
accumulation in
The total energy of a thermodynamic system, Utot, is the sum of its internal energy,
kinetic energy, and potential energy:
U tot = U int + U KE + U PE (2-9)
6
For the processes and examples considered in this book, it is appropriate to make
two assumptions:
1. Changes in potential energy and kinetic energy can be neglected because they are
small in comparison with changes in internal energy.
2. The net rate of work can be neglected because it is small compared to the rates of heat
transfer and convection.
For these reasonable assumptions, the energy balance in Eq. 2-8 can be written as
dU int
dt
= − wH + Q ( ) (2-10)
U int = the internal energy of Δ = denotes the difference between outlet
the system and inlet conditions of the flowing streams;
therefore
H = enthalpy per unit mass
−Δ wHҭ
7 w = mass flow rate = rate of enthalpy of the inlet stream(s) −
Q = rate of heat transfer to the system the enthalpy of the outlet stream(s)
The analogous equation for molar quantities is,
dU int
dt
( )
= − wH + Q (2-11)
where H is the enthalpy per mole and w is the molar flow rate.
8
The Blending Process Revisited
For constant , Eqs. 2-2 and 2-3 become:
dV
= w1 + w2 − w (2-12)
dt
d (Vx )
= w1x1 + w2 x2 − wx (2-13)
dt
9
Substitution of (2-14) into (2-13) gives:
dx dV
V + x = w1x1 + w2 x2 − wx (2-15)
dt dt
Substitution of the mass balance in (2-12) for dV/dt in (2-15) gives:
dx
V + x ( w1 + w2 − w ) = w1x1 + w2 x2 − wx (2-16)
dt
After canceling common terms and rearranging (2-12) and (2-16), a more
convenient model form is obtained:
dV 1
= ( w1 + w2 − w ) (2-17)
dt
dx w1 w2
= ( x1 − x ) + ( x2 − x ) (2-18)
10 dt V V
Stirred-Tank Heating Process
11
Stirred-Tank Heating Process (cont’d.)
Assumptions:
1. Perfect mixing; thus, the exit temperature T is also the temperature of the tank
contents.
2. The liquid holdup V is constant because the inlet and outlet flow rates are equal.
3. The density and heat capacity C of the liquid are assumed to be constant.
Thus, their temperature dependence is neglected.
4. Heat losses are negligible.
12
Model Development - I
For a pure liquid at low or moderate pressures, the internal energy is
approximately equal to the enthalpy, Uint H, and H depends only on temperature.
Consequently, in the subsequent development, we assume that Uint = H and Uˆ int = Hˆ
where the caret (^) means per unit mass. As shown in Appendix B, a differential
change in temperature, dT, produces a corresponding change in the internal
energy per unit mass, dUˆ int ,
dUˆ = dHˆ = CdT
int (2-29)
where C is the constant pressure heat capacity (assumed to be constant). The
total internal energy of the liquid in the tank is:
Suppose that the liquid in the tank is at a temperature T and has an enthalpy, Ĥ .
Integrating Eq. 2-29 from a reference temperature Tref to T gives,
Hˆ − Hˆ = C T − T
ref ( ref ) (2-32)
where Hˆ ref is the value of Ĥ at Tref. Without loss of generality, we assume that Hˆ ref = 0
(see Appendix B). Thus, (2-32) can be written as:
( )
14
Hˆ = C T − Tref (2-33)
Model Development - III
For the inlet stream
(
Hˆ i = C Ti − Tref ) (2-34)
Substituting (2-33) and (2-34) into the convection term of (2-10) gives:
( ) ( ) (
− wHˆ = w C Ti − Tref − w C T − Tref
) (2-35)
dT
V C = wC (Ti − T ) + Q (2-36)
15
dt
Continuous Stirred Tank Reactor (CSTR)
3 parameters: V , ,C
4 variables: T , Ti , w, Q
1 equation: Eq. 2-36
For temperature control purposes, it is reasonable to classify the three inputs as:
19
Assumptions for the Unsteady-state Energy Balance:
8.
9.
10.
11.
12.
20
CSTR Model: Some Extensions
21
Development of Transfer Functions
Example: Stirred Tank Heating System
22
Recall the previous dynamic model, assuming constant liquid holdup and
flow rates: V C
dT
= wC (Ti − T ) + Q (1)
dt
Suppose the process is initially at steady state:
T ( 0 ) = T , Ti ( 0 ) = Ti , Q ( 0 ) = Q ( 2)
0 = wC (Ti − T ) + Q (3)
= wC (Ti − Ti ) − (T − T ) + ( Q − Q )
dT
V C (4)
23
dt
But,
dT d (T − T )
= because T is a constant (5)
dt dt
Thus we can substitute into (4-2) to get,
dT
V C = wC (Ti − T ) + Q (6)
dt
where we have introduced the following “deviation variables”, also
called “perturbation variables”:
ሜ
𝑇 ′ ≜ 𝑇 − 𝑇, 𝑇𝑖′ ≜ 𝑇𝑖 − 𝑇ሜ𝑖 , 𝑄′ ≜ 𝑄 − 𝑄ሜ (7)
Take L of (6):
K 1
T ( s ) = Q ( s ) + Ti( s ) (10)
s +1 s +1
25
where two new symbols are defined:
1 𝑉𝜌
𝐾≜ and 𝜏 ≜ 11
𝑤𝐶 𝑤
Transfer Function Between Q and T
Ti ( t ) = Ti Ti( t ) = 0 Ti( s ) = 0.
Then we can substitute into (10) and rearrange to get the desired TF:
T ( s ) K
= (12)
Q ( s ) s + 1
26
Transfer Function Between T and Ti:
Suppose that Q is constant at its steady-state value:
Q ( t ) = Q Q ( t ) = 0 Q ( s ) = 0
Thus, rearranging
T ( s) 1
= (13)
Ti( s ) s + 1
Comments:
1. The TFs in (12) and (13) show the individual effects of Q and Ti
on T. What about simultaneous changes in both Q and Ti ?
27
• Answer: See (10). The same TFs are valid for simultaneous changes.
• Note that (10) shows that the effects of changes in both Q and Ti are additive.
This always occurs for linear, dynamic models (like TFs) because the Principle
of Superposition is valid.
28
Properties of Transfer Function Models
1. Steady-State Gain
29
will depend on the operating condition (u , y ).
Calculation of K from the TF Model:
If a TF model has a steady-state gain, then:
K = lim G ( s ) (14)
s →0
30
2. Order of a TF Model
Consider a general n-th order, linear ODE:
dny dy n−1 dy d mu
an n
+ an−1 n −1
+ a1 + a0 y = bm m +
dt dt dt dt
d m−1u du
bm−1 m −1
+ + b1 + b0u (4-39)
dt dt
Y (s)
i
b s i
G (s) = = i =0
(4-40)
U (s) n
i
a s i
31
i =0
Definition:
The order of the TF is defined to be the order of the denominator polynomial.
Note: The order of the TF is equal to the order of the ODE.
Physical Realizability:
Example:
𝑑𝑢
𝑎0 𝑦 = 𝑏1 + 𝑏0 𝑢 and step change in 𝑢 (4−41)
𝑑𝑡
32
3. Additive Property
Suppose that an output is influenced by two inputs and that the transfer
functions are known: Y (s) Y (s)
= G1 ( s ) and = G2 ( s )
U1 ( s ) U2 ( s)
Y ( s ) = G1 ( s )U1 ( s ) + G2 ( s )U 2 ( s )
U1(s) G1(s)
Y(s)
U2(s) G2(s)
33
4. Multiplicative Property
Suppose that,
Y (s) U2 ( s)
= G2 ( s ) and = G3 ( s )
U2 ( s) U3 ( s )
Then,
Y ( s ) = G2 ( s )U 2 ( s ) and U 2 ( s ) = G3 ( s )U 3 ( s )
Substitute,
Y ( s ) = G2 ( s ) G3 ( s )U 3 ( s )
Or,
Y (s)
= G2 ( s ) G3 ( s ) U3 ( s ) G2 ( s ) G3 ( s ) Y (s)
U3 ( s )
34
Linearization of Nonlinear Models
• So far, we have emphasized linear models which can be transformed into TF models.
- But over a small range of operating conditions, the behavior may be approximately
linear.
f f
f ( u, y ) = f ( u , y ) + u + y (4-61)
u s y s
𝑑𝑦 𝑑𝑦 ′
= (C)
𝑑𝑡 𝑑𝑡
Substitute (B) and (C) into (A) gives the linearized model:
dy f f
= u + y (4-62)
dt u s y s 37
Example: Liquid Storage System
A = area, Cv = constant
𝑑ℎ 1 𝐶𝑣
= 𝑞 − ℎ = 𝑓(ℎ, 𝑞𝑖 ) (3)
𝑑𝑡 𝐴 𝑖 𝐴
Eq. (3) is in the form of (4−60) with 𝑦 = ℎ and 𝑢 = 𝑞𝑖 . Thus,
we can utilize (4−62) to linearize around ℎ = ℎሜ and 𝑞𝑖 = 𝑞lj 𝑖 ,
𝑑ℎ′ 𝜕𝑓 𝜕𝑓
= ℎ′ + 𝑞𝑖′ (4)
𝑑𝑡 𝜕ℎ 𝑠
𝜕𝑞𝑖 𝑠 38
where:
𝜕𝑓 𝐶𝑣
=− (5)
𝜕ℎ 𝑠 2𝐴 ℎሜ
𝜕𝑓 1
= (6)
𝜕𝑞𝑖 𝑠
𝐴
Substitute into (4) gives the linearized model:
𝑑ℎ′ 1 ′ 𝐶𝑣
= 𝑞𝑖 − ℎ′ (7)
𝑑𝑡 𝐴 2𝐴 ℎሜ
This model can be expressed in terms of a valve resistance, 𝑅
𝑑ℎ′ 1 ′ 1 ′ 2 ℎሜ
= 𝑞𝑖 − ℎ with 𝑅 ≜ (8)
𝑑𝑡 𝐴 𝐴𝑅 𝐶𝑣
39
State-Space Models
x = Ax + Bu + Ed (4-90)
y = Cx (4-91)
40
where:
x = the state vector
u = the control vector of manipulated variables (also called control variables)
d = the disturbance vector
y = the output vector of measured variables. (We use boldface symbols to
denote vector and matrices, and plain text to represent scalars.)
• The elements of x are referred to as state variables.
• The elements of y are typically a subset of x, namely, the state variables that are
measured. In general, x, u, d, and y are functions of time.
• The time derivative of x is denoted by x ( = dx / dt ) .
41 • Matrices A, B, C, and E are constant matrices.
Example: CSTR Model
Consider the previous CSTR model. Assume that Tc can vary with time while cAi, Ti , q and
w are constant.
Nonlinear
Model:
Linearized
Model:
where:
42
Example 4.9
Show that the linearized CSTR model of Example 4.8 can be written in the state-space
form of Eqs. 4-90 and 4-91.
The linearized CSTR model in Eqs. 4-84 and 4-85 can be written in
dcA a a12 cA 0
vector-matrix form: dt 11
= + T
(4-92)
dT a
c
a22 T b2
dt 21
Let 𝑥1 ≜ 𝑐𝐴′ and 𝑥2 ≜ 𝑇 ′, and denote their time derivatives by x1 and x2 .
Suppose that the coolant temperature Tc can be manipulated. For this
situation, there is a scalar control variable, 𝑢 ≜ 𝑇𝑐′ , and no modeled
disturbance. Substituting these definitions into (4-92) gives,
x1 a11 a12 x1 0
x = a + u (4-93)
2 21 a22 x2 b2
A B
which is in the form of Eq. 4-90 with x = col [x1, x2]. (The symbol “col”
denotes a column vector.)
44
a) If both T and cA are measured, then y = x, and C = I in Eq. 4-91,
where I denotes the 2x2 identity matrix. A and B are defined in (4-93).
A number of standard types of input changes are widely used for two
reasons:
46
1. Step Input
• Special Case: If M = 1, we have a “unit step change”. We give it the symbol, S(t).
2. Ramp Input
0𝑡 <0
𝑈𝑅 𝑡 ≜ ቊ (5−7)
at 𝑡 ≥ 0
3. Rectangular Pulse
It represents a brief, sudden change in a process variable:
49
0 for 𝑡 < 0
𝑈𝑅𝑃 𝑡 ≜ ቐℎ for 0 ≤ 𝑡 < 𝑡𝑤 (5−9)
0 for 𝑡 ≥ 𝑡𝑤
XRP
Chapter 5
0 Tw Time, t
Examples:
51
4. Sinusoidal Input
0 for 𝑡<0
𝑈 𝑡 ቊ 5−14
𝐴 sin 𝜔𝑡 for 𝑡≥0
where: A = amplitude, w = angular frequency
Examples:
1. 24 hour variations in cooling water temperature.
2. 60-Hz electrical noise (in the USA)
52
5. Impulse Input
• Here, U I ( t ) = ( t ) .
• It represents a short, transient disturbance.
Examples:
Chapter 5
Y ( s ) = G ( s )U ( s ) 53
(1)
The corresponding time domain express is:
y ( t ) = g ( t − τ ) u ( τ ) dτ
t
(2)
0
u (t ) = (t )
y (t ) = g (t ) (4)
54
First-Order System
The standard form for a first-order TF is:
Y (s) K
= (5-16)
U ( s ) τs + 1
where:
Chapter 5
𝐾 ≜ steady−state gain
τ ≜ time constant
Consider the response of this system to a step of magnitude, M:
M
U ( t ) = M for t 0 U (s) =
s
Substitute into (5-16) and rearrange,
KM
Y (s) = (5-17)
s ( τs + 1) 55
Take L-1 (cf. Table 3.1),
(
y ( t ) = KM 1 − e −t / τ ) (5-18)
𝑦
t 𝑦∞
___
y 0 0
y τ 0.632
2τ 0.865
3τ 0.950
t 4τ 0.982
τ 5τ 0.993
56
τ a slow response.
Note: Large means
Integrating Process
Not all processes have a steady-state gain. For example, an “integrating process”
or “integrator” has the transfer function:
Y (s) K
= ( K = constant )
Chapter 5
U (s) s
𝐾𝑀
𝑌 𝑠 = L−1 ⇒ 𝑦 𝑡 = 𝐾𝑀𝑡
𝑠2
Thus, y(t) is unbounded and a new steady-state value does not exist.
57
Common Physical Example:
Consider a liquid storage tank with a pump on the exit line:
Chapter 5
- Assume:
1. Constant cross-sectional area, A.
2. q f (h)
dh
- Mass balance: A dt = qi − q (1) 0 = qi − q (2)
- Eq. (1) – Eq. (2), take L, assume steady state initially,
1
H ( s ) = Qi ( s ) − Q ( s ) H ( s) 1
As =
Qi ( s ) As
58
𝐾 ≜ steady−state gain
τ ≜ "time constant" [=] time
ζ ≜ damping coefficient (dimensionless)
1
• Equivalent form: 𝜔𝑛 ≜ natural frequency =
τ
Y (s) K wn2
=
U (s) s 2 + 2ζwn s + wn2 59
• The type of behavior that occurs depends on the numerical value of
damping coefficient, ζ :
It is convenient to consider three types of behavior:
61
Chapter 5
62
Several general remarks can be made concerning the responses show in
Figs. 5.8 and 5.9:
63
Chapter 5
64
1. Rise Time: tr is the time the process output takes to first reach the new steady-state value.
2. Time to First Peak: t p is the time required for the output to reach its first maximum value.
3. Settling Time: ts is defined as the time required for the process output to reach and remain
inside a band whose width is equal to ±5% of the total change in y. The term 95% response
Chapter 5
time sometimes is used to refer to this case. Also, values of ±1% sometimes are used.
6. Period of Oscillation: P is the time between two successive peaks or two successive
valleys of the response.
65
Time Delays
Time delays occur due to:
3. Chemical analysis
- Sampling line delay
- Time required to do the analysis (e.g., on-line gas chromatograph)
Mathematical description:
Y (s)
= e − θs (6-28)
U (s)
Chapter 6
67
− θs
Polynomial Approximations to e :
68
2. Padé Approximations:
Many are available. For example, the 1/1 approximation is,
θ
1− s
e − θs 2 (6-35)
θ
1+ s
Chapter 6
Time delays are very bad for control because they involve a
delay of information.
69
Interacting vs. Noninteracting Systems
• Consider a process with several invariables and several output variables.
The process is said to be interacting if:
or
o A change in one output affects the other outputs.
dh1
Mass Balance: A1 = qi − q1 (4-48)
dt
1
Valve Relation: q1 = h1 (4-49)
R1
H1 ( s ) R1 K1
= = (4-53)
Qi ( s ) A1R1s + 1 τ1s + 1
= = (4-55)
Q2 ( s ) A2 R2 s + 1 τ 2 s + 1
Q2 ( s ) 1 1
= = (4-56)
H 2 ( s ) R2 K 2
where 𝐾2 ≜ 𝑅2 and τ2 ≜ 𝐴2 𝑅2. Note that the desired transfer function relating
the outflow from Tank 2 to the inflow to Tank 1 can be derived by forming
74
the product of (4-53) through (4-56).
Q2 ( s ) Q2 ( s ) H 2 ( s ) Q1 ( s ) H1 ( s )
= (4-57)
Qi ( s ) H 2 ( s ) Q1 ( s ) H1 ( s ) Qi ( s )
or
Q2 ( s ) 1 K 2 1 K1
=
Chapter 6
(4-58)
Qi ( s ) K 2 τ 2 s + 1 K1 τ1s + 1
a second-order transfer function (does unity gain make sense on physical grounds?).
Figure 4.4 is a block diagram showing information flow for this system.
75
Block Diagram for Noninteracting Surge
Tank System
Figure 4.4. Input-output model for two liquid surge tanks in series.
76
Dynamic Model of An Interacting Process
Chapter 6
1
q1 = ( h1 − h2 ) (6-70)
R1
𝑄2′ 𝑠 1
′ = 2 2
𝑄𝑖 𝑠 τ 𝑠 + 2ζτ𝑠 + 1
Chapter 6
𝐻1′ 𝑠 𝐾1′ τ𝑎 𝑠 + 1
′ = 2 2 (6−72)
𝑄𝑖 𝑠 τ 𝑠 + 2ζτ𝑠 + 1
where
τ1 + τ2 + 𝑅2 𝐴1
τ= τ1 τ2 , ζ ≜ , and τ𝑎 ≜ 𝑅1 𝑅2 𝐴2 / 𝑅1 + 𝑅2
2 τ1 τ2
In Exercise 6.15, the reader can show that ζ>1 by analyzing the
denominator of (6-71); hence, the transfer function is overdamped,
second order, and has a negative zero. 78
Model Comparison
Noninteracting system
𝑄2′ 𝑠 1
′ = (4−59)
𝑄𝑖 𝑠 τ1 𝑠 + 1 τ2 𝑠 + 1
where τ1 ≜ 𝐴1 𝑅1 and τ2 ≜ 𝐴2 𝑅2 .
• Interacting system
𝑄2′ 𝑠 1
′ = 2 2
𝑄𝑖 𝑠 τ 𝑠 + 2ζτ𝑠 + 1
2. Which two-tank system provides the best damping of inlet flow disturbances?
Approximation of Higher-Order Transfer
Functions
In this section, we present a general approach for approximating high-
order transfer function models with lower-order models that have
Chapter 6
In Eq. 6-4 we showed that the transfer function for a time delay can be
expressed as a Taylor series expansion. For small values of s,
e −θ 0 s 1 − θ 0 s (6-57)
80
• An alternative first-order approximation consists of the transfer
function,
−θ 0 s 1 1
e = (6-58)
θ0 s 1 + θ0 s
Chapter 6
• One half of its value is added to the existing time delay (if any) and the
other half is added to the smallest retained time constant.
• Time constants that are smaller than the “largest neglected time constant”
are approximated as time delays using (6-58).
82
Example 6.4
Consider a transfer function:
K ( −0.1s + 1)
G (s) = (6-59)
( 5s + 1)( 3s + 1)( 0.5s + 1)
Chapter 6
Ke −θs
G (s) = (6-60)
τs + 1
using two methods:
(a) The Taylor series expansions of Eqs. 6-57 and 6-58.
(b) Skogestad’s half rule
and
1 1
e−3s e−0.5 s (6-62)
3s + 1 0.5s + 1
• According to his “half rule”, half of this value is added to the next largest time
constant to generate a new time constant
τ = 5 + 0.5(3) = 6.5.
• The other half provides a new time delay of 0.5(3) = 1.5.
• The approximation of the RHP zero in (6-61) provides an additional time delay of 0.1.
• Approximating the smallest time constant of 0.5 in (6-59) by (6-58) produces an
additional time delay of 0.5.
• Thus the total time delay in (6-60) is,
Ke −2.1s
GSk ( s ) = (6-64)
6.5s + 1
The normalized step responses for G(s) and the two approximate
models are shown in Fig. 6.10. Skogestad’s method provides
Chapter 6
Figure 6.10
Comparison of the
actual and
approximate models
for Example 6.4.
Example 6.5
Consider the following transfer function:
K (1 − s ) e − s
G (s) = (6-65)
(12s + 1)( 3s + 1)( 0.2s + 1)( 0.05s + 1)
Chapter 6
Ke−θs
G (s) = (6-66)
( τ1s + 1)( τ2 s + 1)
Compare the normalized output responses for G(s) and the
approximate models to a unit step input. 87
Solution
• Also, the small time constants (0.2 and 0.05) and the zero (1) are added to the
original time delay.
2
(b) An analogous derivation for the second-order-plus-time-delay
model gives:
0.2
θ = 1+ + 0.05 + 1 = 2.15
2
τ1 = 12, τ 2 = 3 + 0.1 = 3.1
Chapter 6
In this case, the half rule is applied to the third largest time constant
(0.2). The normalized step responses of the original and approximate
transfer functions are shown in Fig. 6.11.
89