CHE517CHE517Advanced Advanced
Process ControlProcess ControlProf. Shi-Shang JangProf. Shi-Shang Jang
Chemical Engineering DepartmentChemical Engineering DepartmentNational Tsing-Hua UniversityNational Tsing-Hua University
Hsin Chu, TaiwanHsin Chu, Taiwan
Course DescriptionCourse Description• Course: CHE517 Advanced Process Control• Instructor: Professor Shi-Shang Jang• Text: Seborg, D.E., Process Dynamics and
Control, 2nd Ed., Wiley, USA, 2003.• Course Objective: To study the application of
advanced control methods to chemical and electronic manufacturing processes
• Course Policies: One Exam(40%), a final project (30%) and biweekly homework(30%)
Course OutlineCourse Outline1. Review of Feedback Control System2. Dynamic Simulation Using MATLAB
and Simu-link3. Feedforward Control and Cascade
Control4. Selective Control System5. Time Delay Compensation6. Multivariable Control
Course Outline - ContinuedCourse Outline - Continued7. Computer Process Control8. Model Predictive Control9. R2R Process Control
Chapter 1 Review of Chapter 1 Review of Feedback Control SystemsFeedback Control Systems
• Feedback Control• Terminology• Modeling• Transfer Functions• P, PI, PID Controllers• Block Diagram Analysis• Stability• Frequency Response• Stability in Frequency Domain
Feedback ControlFeedback Control
Examples:• Room temperature control • Automatic cruise control • Steering an automobile • Supply and demand of chemical engineers
Controller
Transmitter
Set point
stream
Tempsensor
Heat loss
condensate
Feedback Control-block Feedback Control-block diagramdiagram
Terminology:• Set point • Manipulated variable (MV) • Controlled variable (CV)• Disturbance or load (DV)• Process • controller
Σ Controller process
Sensor +transmitter
+
-Set point
Measured value
error
Manipulated variable
Controlled variable
disturbance
InstrumentationInstrumentation
• Signal Transmission: Pneumatic 3-15psig, safe longer time lags, reliable• Electronic 4-20mA, current, fast, easy to interface with computers, may be
sensitive to magnetic and/or electric fields• Transducers: to transform the signals between two types of signals, I/P: current to
pneumatic, P/I, pneumatic to current
Controller
Transmitter
Set point
stream
Tempsensor
Heat loss
condensate
ModelingModeling
Rate of accumulation = Input – output + generation – consumption
At steady state : let T = TS and Q = QS 0 = QS – UA(TS - T0S)
Deviation variables : let T = TS+Td , Q = QS+Qd , T0 = T0s+T0d
Then :
If system is at steady state initially Td(0) = 0
)()( 0TTUAQTMCdt
dP
Mass M Cp T
QQ=UA(T-T0)
)()( 0ddddP TTUAQTdt
dMC
Transfer FunctionsTransfer FunctionsLaplace Transforming:Laplace Transforming:
M Cp S Td(S) = qd(S) - U A (Td(S) – Tod(S))
Or
UASMC
SUAT
UASMC
SqST
p
od
p
dd
UAMsC
UA
p
UAMsCp 1
∑Td(S)
+
+
qd(S)
Tod(S)
Non-isothermal CSTR Non-isothermal CSTR
• Total mass balance:
• Mass balance :
• Energy balance :
• Initial conditions : V(t=0) = Vi , T(t=0) = Ti , CA(t=0) = CAi
• Input variables : F0 , CA0 , T0 ,F
FFVdt
d 0)(
condensate
T V ρ CA CB
F0
ρ0
CA0
T0 FρCA
T
steam
A BrA = - KCA mol/ft3
K = αe-E/RT
VKCCFCFCVdt
dAAAA )()( 00
)())(()( 00 TTsUAKCHrTCFTCFTCVdt
dAPPP
Linearization of a FunctionLinearization of a Function
X0X0 -△ X0+△
- 0 △ △
F(X)
X
aX+b
LinearizationLinearization
0 0
0 0
0 0
0 0
,
( , )
0
Laplace Transform
( )
1
x x x xu u u u
dd d
d d d
d
d
dx f ff x u x x u u
dt x u
f x u
dxax bu
dt
sx s ax s bu s
or
x s b K
u s s a s
Linearization of Non-Linearization of Non-isothermal CSTR isothermal CSTR
12
12
11 0,
,21 22 , 11 0,
31 32 , 33 31 0, 32 , 33
11 12
, 21 22 , 21 22 23
31 32 33 31 32 3
. .
0 0 0 0
0
dd d
A dd A d d d
dd A d d d A d d
d d
A d A d
d d
dVb F b F
dtdC
a V a C b F b Fdt
dTa V a C a T b F b C b Ts
dti e
V V b bd
C a a C b b bdt
T a a a T b b b
0,
3 ,
0,
,
,
1
0,
( ) ( )
0 0 1 0 0 0
( ) ( )
( ) '
d
d
s d
d d
A d d
d s d
d
p d L d L d
F
F AX s BU s
T
V F
y C F CX DU
T T
T s C sI A B D U s
G s Ts s G s F s G s F s
Common Transfer FunctionsCommon Transfer FunctionsK=Gain; τ=time constant;K=Gain; τ=time constant;
ζ=damping factor; D=delay ζ=damping factor; D=delay
• First Order System
• Second Order System
• First Order Plus Time Delay
• Second Order Plus Time Delay
1
)(
s
K
sMV
sCV
Dse
ss
K
sMV
sCV
12
)(22
Dse
s
K
sMV
sCV
1
)(
12
)(22
ss
K
sMV
sCV
Transfer Functions of Transfer Functions of ControllersControllers
• Proportional Control (P)
• Proportional Integral Control (PI)
• Proportional-Integral-Derivative Control (PID)
m(s) = Kc[ e(s) ]
e = Tspt - TKc
e(s) m(s)
t
0I
c dt)t(e1
)t(eK)t(m
)s(es
1)s(eK)s(m
Ic
e(s) m(s))s
11(K
Ic
e(s) m(s))ss
11(K D
Ic
t
0 DI
c dt
dedt)t(e
1)t(eK)t(m
s
s
11)s(eK)s(m D
Ic
The Stability of a Linear The Stability of a Linear SystemSystem
• Given a linear system y(s)/u(s)=G(s)=N(s)/D(s) where N, D are
polynomials• A linear system is stable if and only if
all the roots of D(s) is at LHS, i.e., the real parts of the roots of D(s) are negative.
Stability in a Complex Plane
Re
Im
Purdy oscillatory
Purdy oscillatory
Fast Decay Slow Decay
Exponential Decay
Exponential Decay with oscillatory
Slow growth
Fast Exponential growth
Exponential growthwith oscillatory
Stable (LHP) Unstable (RHP)
Partial Proof of the TheoryPartial Proof of the Theory• For example: y(s)/u(s)=K/(τs+1)• The root of D(s)=-1/τ• In time domain: τy’+y=ku(t)• The solution of this ODE can be
derived by y(t)=e-t/τ [∫e1/τku(t)dt+c]
• It is clear that if τ<0, limt→∞y →∞.
Transfer functions in parallel Transfer functions in parallel
X(S)= G1(S)*U1(S) + G2(S)*U2(S)
Σ
U1(S)
U2(S)
G1(S)
G2(S)
X1(S)
X2(S)
+
+
X (S)
X1(S) X2(S)
Transfer function Block Transfer function Block diagramdiagram
Σ Kc+
-
Tset
control
QS
process
1
Measuring device
Td
UASMCP 1
UASMCK
UASMCK
T
T
PC
PC
set
d
11
1
Proportional control Proportional control No measurement lagsNo measurement lags
Block Diagram AnalysisBlock Diagram Analysis
e = Xs – Xm
m = Gc (S) e(s) = Gc e
X1 = Gp m = Gp Gc e
X = GL L + X1 = GL L + Gp Gc e
Xm = Gm X = Gm GL L + Gp Gc e
X = GL L + Gp Gc[Xs – Xm]
= GL L + Gp Gc [Xs] – Gp Gc [Xm]
=GL L + Gp Gc Xs – Gp Gc Gm X
smcp
cp
mcp
L XGGG1
GGL
GGG1
GX
∑ X(S)++
GL(S)
GP(S)
Gm(S)
L(S)
mGc(S)∑+
-Xs
Xm
X1
e
Stability of a Closed Loop Stability of a Closed Loop SystemSystem
• A closed loop system is stable if and only of the roots of its characteristic equation :
1+Gc(s)Gp(s)Gm(s)=0
are all in LHP
Level SystemLevel System
11/
/11
Laplacing
2
,point reference aGiven
.
,
0
,00
00
s
K
saA
a
aAssF
sh
or
sFsah(s)Ash
hh
kFhh
h
fFF
F
f
dt
dhA
hF
hkFFFdt
dhA
din
d
dindd
ddinininin
d
in
inoutin
The jacketed CSTRThe jacketed CSTR
TRC
FC
Tc
T, Ca
W
Set Point
Wc
2A B
A Nonisothermal Jacketed CSTRA Nonisothermal Jacketed CSTR• (i) Material balance of species A
• (ii) Energy balance of the jacket
• (iii) Energy balance for the reactor
• (iv) Dependence of the rate constant on temperature
2)(
A
AAA kCV
CCW
dt
dC f
P
A
P
cf
C
HkC
VC
TTA
V
TTW
dt
dT
2)()(
c
wcc
Pc
cc
M
TTW
CM
TTA
dt
dT )(
'
)(
)273
exp(0 T
QAk
Linearization of Linearization of Nonisothermal CSTRNonisothermal CSTR
• CV=T(t)
• MV=Wc(t)
• It can be shown that
123
,
csbsas
K
sW
sT
dc
d
A Practical Example A Practical Example ––Temperature Temperature Control of a CSTRControl of a CSTR
Method of Reaction CurveMethod of Reaction Curve
τ DDead time
Maximum slope
△C
Process output
Time constant time
Ziegler-Nichols Reaction Curve Ziegler-Nichols Reaction Curve Tuning RuleTuning Rule
P only PI PID
Kc /DKp 0.9/DKp 1.2/DKp
I n.a. D/0.3 D/0.5
D n.a. n.a. 0.5D
△C
τ
D
△m
D= 1τ =13k = -0.0202
Kc= -579.2079τi =3.33
setpoint
Ziegler-Nichols Ultimate Gain Ziegler-Nichols Ultimate Gain TuningTuning Find the ultimate gain of the process Find the ultimate gain of the process Ku. The period of the oscillation is Ku. The period of the oscillation is called ultimate period Pucalled ultimate period Pu
P only PI PID
Kc Ku/2 Ku/2.2 Ku/1.7
I n.a. Pu/1.2 Pu/2
D n.a. n.a. Pu/8
Measuring Controller Measuring Controller PerformancePerformance
00
0
2
0
2
00
dttetdtyytITAE
dttedttyyISE
dttedttyyIAE
s
s
s
Upper Limit of Designed Upper Limit of Designed Controller Parameters of PID Controller Parameters of PID
ControllersControllers• Q: Given a plant with a transfer
function G(s), one implements a PID controller for closed loop control, what is the upper limit of its parameters?
• A: The upper limit of a controller should be bounded at its closed loop stability.
ApproachesApproaches• Direct Substitution for Kc• Root Locus method for Kc• Frequency Analysis for all
parameters
An ExampleAn Example
)3)(2)(1(
1
sssKc
○
-
+
1. Stability Limit by Direct 1. Stability Limit by Direct SubstitutionSubstitution
• At the stability limit (maximum value of Kc permissible), roots cross over to the RHP. Hence when Kc=Ku, there are two roots on the imaginary axis s=±iω
• (s+1)(s+2)(s+3)+Ku=0, and set s= ±iω, we have (iω+1)(iω+2)(iω+3)+Ku= 0, i.e. (6+Ku-6ω2)+i(11ω-ω3)=0. This can be true only if both real and imaginary parts vanishes: 11ω-ω3=0→ ω= ±√11 ; 6+Ku-6×11=0 →Ku=60
2. Method of Root Locus2. Method of Root Locus
Rlocus (sys,k)
k(12) ans =69.6706
3. Frequency Domain 3. Frequency Domain AnalysisAnalysis
• Definitions: Given a transfer function G(s)=y(s)/x(s); Given x(t)=Asinωt; we have y(t) →Bsin(ωt+ψ)
• We denote Amplitude Ratio=AR(ω) =B/A; Phase Angle=ψ(ω)
• Both AR and ψ are function of frequency ω; we hence define AR and ψ is the frequency response of system G(s)
An ExampleAn Example
321
1
sssA sin(t) B = sin(t+)
Frequency Response of a Frequency Response of a first order systemfirst order system
1
22
1
22
22
22
tan1
tan);sin(1
)(
1)(
)(sin)(;1
)()()(
KAR
tKA
ty
sK
sA
sy
sA
sxtAtxsK
sGsxsy
Basic TheoremBasic Theorem• Given a process with transfer function
G(s);• AR(ω)= ︳ G(iω) ︳• φ(ω)=∠ G(iω)• Basically, G(iω)=a+ib
ab
baAR
/tan 1
22
Example: First Order SystemExample: First Order System
90lim
0lim
thatNote
tantan
1
11
)(
1
1
1
)(1
1
11
1)(
11
22
22
222222
AR
a
b
baAR
ibaii
iiG
ssG
CorollaryCorollary
• If G(s)=G1(s)G2(s)G3(s)
• Then AR(G)=AR(G1) AR(G2) AR(G3)
• φ(G)=φ (G1) +φ (G2)+φ (G3)
• Proof: Omitted
ExampleExample
2
11
121
222
2
221
121
212
2
1
1
tantan
11
11)(
KKARARAR
sGsGKK
sG
Bode Plot: An exampleBode Plot: An exampleG(s)=1/(s+1)(s+2)(s+3)G(s)=1/(s+1)(s+2)(s+3)where db=20logwhere db=20log1010(AR)(AR)
Nyquist PlotNyquist Plotsys=tf(num,den)sys=tf(num,den)
NYQUIST(sys,{wmin,wmax}))NYQUIST(sys,{wmin,wmax}))
Nyquist Stability CriteriaNyquist Stability Criteria• Given G(iω), assume that at a
frequency ωu, such that φ=-180° and one has AR(ωu), the sufficient and necessary condition of the stability of the closed loop of G(s) is such that: AR(ωu) ≦1
The Extension of Nyquist The Extension of Nyquist Stability CriteriaStability Criteria
• Given plant open loop transfer function G(s), such that at a frequency ωu, the phase angle φ(ωu)=-180°. At that point, the amplitude ratio AR= | G (ωu) | , then the ultimate gain of the closed loop system is Ku=1/AR, ultimate period Pu=2π/ ωu.
Simulink ExampleSimulink Example
time
Resp
on
s
e
D1.4 3.7-1.4=2.3
sP e
sG 5.0
15.2
165.0
Simulink Example - Simulink Example - ContinuedContinued
>> sys=tf(1,[1 6 11 6])
Transfer function:
1
----------------------
s^3 + 6 s^2 + 11 s + 6
>> bode(sys)
u=3.5ARu=-38db=10-38/20
=0.0162
Ku=1/ARu=80
Simulink Example - Simulink Example - ContinuedContinued
1. Reaction Curve Approach: KC=1.2/DKp=1.2*2.5/(0.5*0.165)=36; I=D/0.5=1;D=D*0.5=0.25
0 1 2 3 4 5 6 7 8 9 100
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
Simulink Example - Simulink Example - ContinuedContinued
1. Ultimate properties Approach: Ku/1.7=80/1.7=47;I=Pu/2= 2* / 2U =0.9;D=Pu/8=0.22