TE/TT
or or
150
o
C 20 mA 5 V 100%
Chen CL 6
A Process Heat Exchanger
Four Basic Elements
Decisionmaking Element (operator or controller)
to calculate the trial corrective action
(simple to use, acceptable performance, robust, reliable)
inputs: setpoint y
sp
(mA or %), (from T
D
o
C)
measured PV y(t) (mA or %), (from T
o
C)
output: control action u(t) (mA or %)
Chen CL 7
A Process Heat Exchanger
Four Basic Elements
Final Control Element (I/P transducer + valve)
to realize operators or controllers decision
u(t) (4 20 mA)
I/P
= u
(t) (3 15 psi)
valve
= 0% 100% valve opening
= q
s
(t) (kg/sec) ( MV)
Chen CL 8
A Process Heat Exchanger
Four Basic Elements
Process
to wait for new value of CV
inputs: q
s
(kg/sec) (MV)
P
s
, T
i
, T
a
, (Disturbances)
output: T (
o
C) (PV, CV)
Chen CL 9
A Process Heat Exchanger
Four Basic Elements
Summary
Primary/Secondary Element (sensor/transmitter)
Decisionmaking Element (controller)
Final Control Element (I/P transducer/valve)
Process (the heat exchanger)
Chen CL 10
Chen CL 11
Basic Concept of Process Control
Summary
Process Control:
adjusting a Manipulated Variable ( MV)
to maintain the Controlled Variable ( CV)
at desired operating value ( Set Point) ( SP)
in the presence of output Disturbances ( Ds)
Chen CL 12
Control Strategies
Feedback Control
Adjusting MV if CV is not equal to SP
Advantage: simple, can compensate all disturbances
Disadvantage: CV is not equal to SP in most time
Chen CL 13
Control Strategies
Feedforward Control
Adjusting MV to compensate inuence of multiple Ds on CV
Advantage:
simultaneously consider inuence of multiple Ds and MV on CV
detecting Ds adjusting MV BEFORE CV deviates from SP
Disadv.s: modeling error ?; not considering ALL disturbances ?
Chen CL 14
Control Strategies
Feedforward Control with Feedback Trim
Chen CL 15
Incentives for Chemical Process Control
Safety:
temperature, pressure, concentration of chemicals
should be within allowable limits
Production Specications:
a plant should produce desired amounts and quality of nal products
Environmental Regulations:
various laws specify concentrations of chemicals of euent from a
plant be within certain limits
Chen CL 16
Incentives for Chemical Process Control
Operational Constraints:
various types of equipment have constraints inherent to their
operation
Economics:
operating conditions are controlled at given optimum levels of
minimum operating cost and maximum prot
Chen CL 17
Design Aspects of A Process Control System
Dene Control Objectives:
Q 1: What are the operational objectives that a control system is called
upon to achieve ?
Ensuring stability of the process, or
Suppressing the inuence of external disturbances, or
Optimizing the economic performance of a plant, or
A combination of the above
Select Measurements:
Q 2: What variables should we measure to monitor the operational
performance of a plant ?
Chen CL 18
Design Aspects of A Process Control System
Select Manipulated Variables:
Q 3: What are the manipulated variables to be used to control a
chemical process ?
Select Control Conguration: (control structure)
Q 4: What is the best control conguration for a given chemical
process control situation ?
Feedback control cascade ? override ?
Feedforward control feedback trim ?
Inferential control
Chen CL 19
Design Aspects of A Process Control System
Design the Controller: (control law)
Q 5: How is the information, taken from the measurements, used to
adjust the values of the manipulated variables ?
Control law (controller structure, P  PI  PID ?)
Controller tuning (K
c
,
I
,
D
?)
Chen CL 20
Why Laplace Transform
Ex: PID Controller 4 signals 2 signals
PID Controller: u(t) = K
c
e(t) +
1
T
I
t
0
e()d + T
D
de(t)
dt
+ u
b
Steady States: u = K
c
e +
1
T
I
t
0
e d + T
D
de
dt
+ u
b
[u = u
b
; e = 0]
Deviation Variables: U(t) = K
c
E(t) +
1
T
I
t
0
E()d + T
D
dE(t)
dt
U(t) u(t) u
b
; E(t) = e(t) 0)
Chen CL 21
Why Laplace Transform
PID Controller: (cont)
Laplace Transform: U(s) = K
c
E(s) +
1
T
I
E(s)
s
+ T
D
sE(s)
= K
c
1 +
1
T
I
1
s
+ T
D
s
E(s)
Transfer Function:
U(s)
E(s)
= K
c
1 +
1
T
I
1
s
+ T
D
s
G
c
(s)
Chen CL 22
Why Laplace Transform
Ex: Simple Process 3 signals 2 signals
FirstOrder Model: T
dy(t)
dt
+ y(t) = Ku(t d)
Steady States: T
dy
dt
+ y = Ku
Deviation Variables: T
d[y(t)y]
dt
+ [y(t) y] = K[u(t d) u]
T
dY (t)
dt
+ Y (t) = KU(t d)
Laplace Transform: TsY (s) + Y (s) = KU(s)e
ds
Transfer Function:
Y (s)
U(s)
=
Ke
ds
Ts + 1
G
p
(s)
Chen CL 23
Why Laplace Transform
Dynamic relation (y
sp
to y): timedomain vs. sdomain
Time domain: simultaneous dynamic equations
Sdomain:
y(s)
y
sp
(s)
=
G
c
G
p
1 + G
c
G
p
Sensors and Transmitters
(Transducer)
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Transducer
Transducer:
to convert a physical quantity into an electrical signal
The sensor produces a phenomenonmechanical,
electrical, or the likerelated to the process variable
it measures
The transmitter converts this phenomenon into a
signal that can be transmitted
Measured Quantities:
position, force, velocity, acceleration,
pressure, level, ow, temperature,
Output Signals:
current, voltage, resistance, capacitance, or frequency
Chen CL 2
Transducer Specications
Static Specications:
Accuracy
Resolution
Repeatability
Hysteresis
Linearity
Dynamic Specications
Dead time
Rise time
Time constant
Frequency response
Chen CL 3
Accuracy
Percent of Full Scale Output (%FPO)
Example:
A load cell is a transducer used to measure weight (100 kg 20
mV). A calibration record is given in table. Plot calibration curve
(skip). Determine the accuracy of the transducer. Express answer in
both %FSO (percent of full scale output) and % of reading. Assume
linear relationship between output.
v
true
=
v
full scale
load
full scale
load
=
20 mV
100 kg
load = 0.2
mV
kg
load
Chen CL 4
True output Actual output Error Accuracy
(mV) (mV) (mV) %FSO %reading
0 0 0.08 0.08 0.40 
5 1.00 0.45 0.55 2.75 55.00
10 2.00 1.02 0.98 4.90 49.00
15 3.00 1.71 1.29 6.45 43.00
20 4.00 2.55 1.45 7.25 36.25
25 5.00 3.43 1.57 7.85 31.40
30 6.00 4.48 1.52 7.60 25.33
35 7.00 5.50 1.50 7.50 21.43
40 8.00 6.53 1.47 7.35 27.01
45 9.00 7.64 1.36 6.80 15.11
50 10.00 8.70 1.30 6.50 13.00
55 11.00 9.85 1.15 5.75 10.45
60 12.00 11.01 0.99 4.95 8.25
65 13.00 12.40 0.60 3.00 2.77
70 14.00 13.32 0.68 3.40 7.14
75 15.00 14.35 0.65 3.25 4.33
80 16.00 15.40 0.60 3.00 3.75
85 17.00 16.48 0.52 2.60 3.06
90 18.00 17.66 0.34 1.70 1.89
95 19.00 18.90 0.10 0.50 0.53
100 20.00 19.93 0.07 0.35 0.35
Chen CL 5
Resolution
This optical encoder has a 90
o
resolution
Chen CL 6
Resolution: Example
A 2.5mlong vane is rotated slowly in a circle. The motor and gears
attach to the vane at its center. It is necessary to know the position
of the vane within 2 cm. What must be the resolution of the optical
encoder attached to the shaft that positions the vane ?
Solution:
c = d = (2.5 m) = 7.854 m = 785.4 cm
arc
360
o
=
2 cm
785.4 cm
arc =
(360
o
)(2 cm)
785.4 cm
= 0.917
o
360
o
0.917
o
= 392.6 ( 400 500) pulses per revolution
Chen CL 7
Repeatability
accurate repeatable both accurate
not repeatable not accurate and repeatable
Chen CL 8
Hysteresis ( Increasing= Decreasing)
Chen CL 9
Linearity
Chen CL 10
Dead Time
Chen CL 11
Rise Time
Chen CL 12
Time Constant
Chen CL 13
Settling Time
Chen CL 14
Frequency Response
Chen CL 15
Block Diagram of A Transducer
H(s) =
C(s)
PV(s)
=
K
T
T
s + 1
K
T
=
(20 4) mA
(200 0) pisg
= 0.08 mA/pisg
K
T
=
(100 0) %TO
(200 0) pisg
= 0.5 %TO/pisg
Chen CL 16
Position Transducer
Linear and Angular Potentiometers
Chen CL 17
Linear and Angular Potentiometers: Example
It is necessary to measure the position of a panel. It moves 0.8 m.
Its position must be known within 0.1 cm. Part of the mechanism
which moves the panel is a shaft that rotates 250
o
when the panel is
moved from one extreme to the other. A control potentiometer has
been found which is rated at 300
o
fullscale movement. It has 1000
turns of wire. Can this be used ?
Solution:
300
o
1000
= 0.300
o
(resolution of the potentiometer)
250
o
0.8 m
= 312.5
o
/m or 3.125
o
/cm (conversion of shaft)
0.1 cm3.125
o
/cm = 0.3125
o
(panel required resolution)
> 0.300
o
the potentiometer will work
Chen CL 18
Position Transducer
Linear Variable Dierential Transformer (LVDT)
One primary coil,
two secondary coils,
one freemoving rodshaped
magnetic core inside coil
assembly
Chen CL 19
Force Transducer
Bounded Resistance Strain Gage
Stress: =
force
area
=
F
A
Strain: =
deformation
length
=
L
L
=
Chen CL 20
Force Transducer
Bounded Resistance Strain Gage
Stress Strain Electrical Resistance
Gage Factor, GF =
fractional change in resistance
fractional change in length
=
R/R
L/L
Chen CL 21
Example:
A strain gage is bounded to a steel beam which is 10.00 cm long and
has a crosssectional area of 4.00 cm
2
. Youngs modulus (E = /)
of elasticity for steel is 20.7 10
10
N/m
2
. The strain gage has a
nominal (unstrained) resistance of 240 and a gage factor of 2.20.
When a load is applied, the gages resistance changes by 0.013.
Calculate the change in length of the steel beam and the amount of
force applied to the beam.
Chen CL 22
Solution:
L =
1
GF
L
R
R
=
1
2.20
0.1(m)
0.013
240
= 2.46 10
6
m
F
A
= = E = E
L
L
= E
1
GF
R
R
= 20.7 10
10
(N/m
2
)
1
2.20
0.013
240
F = 2.037 10
3
N
1 b
4.482N
= 454 b
Chen CL 23
Force Transducer
Two Strain Gages
Chen CL 24
Pressure Transducer
Diaphragm with Strain Gage
Chen CL 25
Pressure Transducer
Diaphragm with Strain Gage
Chen CL 26
Pressure Transducer
Capacitive AbsolutePressure Transducer
Chen CL 27
Pressure Transducer
PressuretoDisplacement Transducer
Capsule, Bellow, Bourdon tube, Spiral, Helix
Chen CL 28
Pressure Transducer
LVDT Sensing Pressure Transducer
Chen CL 29
Pressure Transducer
Potentiometer Sensing Pressure Transducer
Chen CL 30
Flow Transducer
Dierential Pressure Obstruction Flow Sensors
Orice plate, Venturi, Pitot tube
f = C
o
A
o
p
o
d
D
Chen CL 31
Flow Transducer
Deectiontype Flow Transducers
Cantilever beam, Variablearea rotameter
Chen CL 32
Flow Transducer
Spintype Flow Transducers
Paddle wheel, Flow turbine
Chen CL 33
Flow Transducer
Electromagnetic Flow Meter
Chen CL 34
Flow Transducer
Ultrasonic Flow Transducer
Chen CL 35
Flow Transducer: Characteristics
Chen CL 36
Level Transducer
Discretetype Level Transducer
Float switch, Photoelectric
Chen CL 37
Level Transducer
By Sensing Pressure with
Oset transducer, Sealed tank
Chen CL 38
Level Transducer
By Sensing dierential Pressure
Chen CL 39
Level Transducer
with Floatdriven Control System
Chen CL 40
Level Transducer
Capacitance Level Transducer
Chen CL 41
Level Transducer
Topmounted Ultrasonic Level Sensor
Chen CL 42
Common Temperature Transducers
Chen CL 43
Common Temperature Transducers
Chen CL 44
Common Temperature Transducers
Chen CL 45
Thermocouple
Seebeck Eect
Current in a closed circuit
Voltage across an open circuit
Chen CL 46
Thermocouple
Equivalent Circuits
Chen CL 47
Thermocouple
with External Reference
Chen CL 48
Thermocouple
External Reference Junction with No Ice Bath
Chen CL 49
Thermocouple
Scanning Many Thermocouples
Chen CL 50
Thermocouple
Electronic Icepoint Compensation
Control Valves
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Why Focus on Valve ?
Valves are often the least understood component of the
control loop
Valves are often the most neglected component of the
control loop
Valves are often the biggest contributor to poor control
loop performance
Chen CL 2
A Typical Globe Valve
Chen CL 3
Energy and Pressure Grades
Ideal/Real Flows Across An Ideal Restriction
Chen CL 4
Energy and Pressure Grades
A Valve or Orice Is Not Ideal
Chen CL 5
Inception of Cavitation in An Orice
Chen CL 6
Efect of Vaporization on Flow Rate
Chen CL 7
Energy and Pressure Grades Across A Valve
Chen CL 8
Valves Cost Energy
A control valve is simply an orice with a variable area of ow
all control valves and regulators cost energy
Chen CL 9
A Full Speed Pump and Throttling Valve Cost Energy
Chen CL 10
Variable Speed Drive Saves Energy
Chen CL 11
Anity Laws
Const Impeller Diameter:
Q
1
Q
2
=
_
N
1
N
2
_
H
1
H
2
=
_
N
1
N
2
_
2
bhp
1
bhp
2
=
_
N
1
N
2
_
3
Const Pump Speed:
Q
1
Q
2
=
_
D
1
D
2
_
H
1
H
2
=
_
D
1
D
2
_
2
bhp
1
bhp
2
=
_
D
1
D
2
_
3
Chen CL 12
Eciency remains virtually constant for changes in speed
and small impeller diameter changes
A 10% speed reduction (90% of nominal speed)
capacity = 90% of original operating conditions
head = 81% of original required head
bhp = 73% of nominal brake horsepower
Chen CL 13
Comparative Performances of Valve and
Variable Speed Drive
Item
Control
Valve
Variable Speed
Drive
Ease of Installation  
Equipment Eciency  Better
Motor Eciency  Better
Power Factor  Better
Operating Costs  Better
Flexibility of Location  Better
Exposure to Process  Better
Specication  Better
Ability to Control  Better
Potential for Leaks  Better
Installed Cost: small  Better
large Better 
Shuto Capability Better 
Maintenance: expertise Better 
valve/drive  Better
equipment  Better
spare parts  
Why Control Valve ?
Chen CL 14
Important Issues in Control Valves
Types
Actions: airfailureopen ( FO), airfailureclose ( FC)
Sizing
Characteristics: inherent (manufactured) and installed
Valves in common loops: ow, temperature, level,
pressure
Software characterizer
Diagnosis
Chen CL 15
Types of Control Valves
Globe Valve
A SinglePorted Two Way Valve
Chen CL 16
Types of Control Valves
Globe Valve
A DoublePorted Globe Valve
Chen CL 17
Types of Control Valves
Globe Valve
An Angle Valve and A YPattern Valve
Chen CL 18
Types of Control Valves
Globe Valve
Valves with ThreeWay Bodies
Chen CL 19
Types of Control Valves
Globe Valve
AntiCavitation Valve
Chen CL 20
Types of Control Valves
Ball Valve
Full Ball Valve
Chen CL 21
Types of Control Valves
Ball Valve
ThreeWay Ball Valve
Chen CL 22
Types of Control Valves
Ball Valve
Segmented Ball Valve
Chen CL 23
Types of Control Valves
Buttery Valve
Chen CL 24
Types of Control Valves
Diaphragm Valve
Chen CL 25
Types of Control Valves
Digital Valve
A digital valve is made up of a group of ono valve elements
installed in a common body
Each valve element has a dierent capacity
sequence of sizes form a binary series
These valves have the capability to change from one capacity to
another instantaneously
Chen CL 26
Example:
6 valve elements with capacity ratios 1, 2, 4, 8, 16, 32
Each incremental step will vary by
1
63
(1 + 2 + + 32 = 63)
Ratio of maximum to minimum capacity will be 63 : 1
8 elements 1, 2, . . . , 128 255 : 1
Limited to use with clean uids and moderate temperatures
Chen CL 27
Digital Valve Operation
A collection of individual ono valves arranged in parallel
All elements have dierent owrates
All elements are controlled by pneumatic or electrical means upon
command from a computer/controller
By adjusting the combination of open and closed valves
= desired owrate: quick, exact, high resolution
Digital Valve: adds or subtracts xed area orices
responds quickly
Analog Valve: seeks a new orice (opening) size
responds slowly with overshoot
Chen CL 28
IF increasing number of individual on/o valves, and
valve openings are sized in a binary progression (124...)
(doubling area openings doubling owrates)
THEN ow range in increased substantially
EX: 6bit = range  63 : 1; resolution 
1
63
EX: 20bit = range  1, 048, 575 : 1; resolution 
1
1,048,575
Chen CL 29
Advantages of Digital Valves
Fast Response
Analog Valve: 3 8 sec.
Digital Valve: 50 100 msec. (millisec)
Instantaneous response from zero ow to full ow
Same speed from 1 to 2, and 0 to full
Wide Rangeability
Analog valve: far less than 100 to 1
Digital valve: 7bit exceeds 100 to 1
Chen CL 30
Precise Repeatability
no position error absolutely repeatable
High Resolution
Analog valve: 1% of maximum ow
Digital valve:
6bit: r = 1 part in 63 (1.59%)
8bit: r = 1 part in 255 (0.39%)
10bit: r = 1 part in 1,023 (0.09%)
20bit: r = 1 part in 1,048,575 (0.0001%)
Flow Measurement Capability
Computer Compatibility
Chen CL 31
A Globe Valve again
Chen CL 32
Overview
Some Descriptive Terms:
singleseated, airactuated, springopposed,
failclosed with a plugandseat trim
Air pressure under the diaphragm causes the stem to rise
As stem rises, area of opening between valve plug and seat
increases
Area of opening is maximum at maximum seat position
Pressure drop across valve and valve opening determine ow rate
through valve
Chen CL 33
Valve Coecient: C
v
(gal/
psig) (C
v
max
?)
ow rate of water through the valve
in US gallons per minute at 70
o
F
when p across the valve is 1 psig
(function of valve opening)
Flow of Liquid Through Valve:
F = C
v
= C
v
max
f(m)
q
max
q
min
=
115
33.3
= 3.46 (turndown ratio)
Chen CL 41
Sizing of Control Valve
Select A Small Valve
Smaller Valve
q = 100 gpm, p
h
= 40 psi, f(x) = 0.5
p
1
= pressure after pump
p
2
= 150 psi, pressure at system output
p
t
= p
1
p
2
= f(q) (constant)
let q = q
min
at f = 0.1
Chen CL 42
Select one valve such that p
v
= 80 psi
p
1
= 150 + 40 + 80 = 270 psi pump
q = C
v
max
f(x)
_
p
v
/G
C
v
max
=
100
0.5
_
80
1
= 22.36 gpm/
_
psi valve
assume p
h
= 40
_
q
100
_
2
p
v
= p
1
p
2
p
h
= 270 150 40
_
q
100
_
2
q(x) = 22.36 f(x)
_
270 150 40
_
q(x)
100
_
2
Chen CL 43
f(x) = 1 q
max
= 22.36 1
_
270 150 40
_
q
max
100
_
2
q
max
= 141 gpm
f(x) = .1 q
min
22.36 .1
_
270 150 40
_
q
min
100
_
2
q
min
= 24.2 gpm
q
max
q
min
=
141
24.2
= 5.83 > 3.46
Chen CL 44
Control Valve Capacity
C
v
coecient: ow in US gpm of water that ows
through a valve at a pressure drop of 1 psi across valve
Liquid:
q = C
v
p
v
G
f
= C
v
max
f(vp)
p
v
G
f
(liquid ow, US gpm)
p
v
: pressure drop across valve, psi G
f
: specic gravity
w =
_
q
gal
min
_ _
60
min
h
_
_
8.33G
f
lb
gal
_
= 500C
v
_
G
f
p
v
lb/h
Chen CL 45
Compressible Flow: (Masoneilan Inst. Inc.)
q
s
= 836C
v
C
f
p
1
GT
(y 0.148y
3
)
w =
_
_
_
2.8C
v
C
f
p
1
_
G
520
T
(y 0.148y
3
) gas or vapor
1.83C
v
C
f
p
1
(1+0.0007T
SH
)
(y 0.148y
3
) steam ow
y =
1.63
C
f
_
p
v
p
1
q
s
: gas ow, scfh (ft
3
/h at standard conditions of 14.7 psia, 60
o
F)
G : gas specic gravity w.r.t. air, = MW/29
T : temperature at valve inlet,
o
R =
o
F + 460
C
f
: critical ow factor (0.6 0.95)
p
1
: pressure at valve inlet w : gas ow, lb/h
T
SH
: degree of superheat
p = p
1
p
2
pressure drop across valve
Chen CL 46
Chen CL 47
Compressible Flow: (Fisher Controls)
q
s
= C
g
_
502
GT
p
1
sin
__
59.64
C
1
__
p
v
p
1
_
rad
Note: the above sine function is basically the same
function of y
Chen CL 48
Chen CL 49
Chen CL 50
Control Valve Capacity: Example
From Fig. C101a, a 3in. Masoneilan valve with full trim has a
capacity factor of 110 gpm/(psi)
1/2
when fully opened. The pressure
drop across the valve is 10 psi.
(a) Calculate the ow of a liquid solution with density 0.8 g/cm
3
(1.0 g/cm
3
for water).
q = 110
_
10
0.8
= 389 gpm
w = 500(110)
_
(0.8)(10) = 155, 600 lb/h
Chen CL 51
(b) Calculate the ow of gas with average MW of 35 when valve inlet
conditions are 100 psig and 100
o
F.
G = 35/29 = 1.207 p
1
= 100 + 14.7 = 114.7 psia
T = 100 + 460 = 560
o
R C
f
= 0.9
y =
1.63
0.9
_
10
114.7
= 0.535
q
s
= 836(110)(0.9)
114.7
(1.207)(560)
[0.535 0.148(0.535)
3
]
. .
0.512
= 187, 000 scfh
w = 2.8(110)(0.9)(114.7)
_
1.207
520
560
(0.512) = 17, 240 lb/h
Chen CL 52
(c) Calculate the ow of gas from part (b) when the inlet pressure is
5 psig. Calculate the ow both in volumetric and mass rate units,
and compare the results for a 3in. Fisher Control valve.
p
1
= 5 + 14.7 = 19.7 psia
y = 1.290 [y 0.148y
3
] = 0.972
q
s
= 836(110)(0.9)
19.7
(1.207)(560)
(0.972) = 61, 000 scfh
= 5, 620 lb/h
Fisher: q
s
= 4280
_
520
(1.207)(560)
(114.7) sin
_
59.64
35.7
_
10
114.7
_
= 204, 000 scfh (9% higher)
q
s
= 4280
_
520
(1.207)(560)
(19.7) sin
_
59.64
35.7
_
10
19.7
_
= 68, 700 scfh (13% higher)
Chen CL 53
Sizing of Control Valves: Example
A control valve is to regulate the ow of steam into a distillation
column reboiler with a design heat transfer rate of 15 million Btu/h.
The supply steam is saturated at 20 psig. Size the control valve for
a pressure drop of 5 psi and 100% overcapacity.
H = 930 Btu/lb latent heat of cond., from steam table
q
s
= 15, 000, 000/930 = 16, 130 lb/h
p
1
= 20 + 14.7 = 34.7 (valve inlet pressure)
C
f
= 0.8
y =
1.63
0.8
_
5
34.7
= 0.773 y 0.148y
3
= 0.705
C
v
= f
_
G
f
p
v
=
16,130
(1.83)(0.8)(34.7)(.705)
= 450
gpm
psi
C
v
max
= 2.0C
v
= 900
gpm
psi
C
v
= 1000 (select a valve with this C
v
)
Chen CL 54
Fisher: G = 18/29 = 0.621 C
1
35
q
s
= (16, 130)(380)/18 = 341, 000 scfh (380 scf/lbmole)
sin
_
59.64
35
_
5
34.7
_
= sin(0.647) = 0.603
C
g
=
341,000
520
(0.621)(710)
(34.7)(0.603)
= 15, 000
C
g
= 30, 000 C
v
= C
g
/C
1
= 30, 000/35 = 856
gpm
psi
Chen CL 55
Sizing of Control Valves: Example
The following gure shows a process for transferring an oil from a
storage tank to a separation tower. The tank is at atmospheric
pressure, and the tower works at 25.9 in.Hg absolute (12, 7 psia).
Nominal oil ow is 700 gpm, its specic gravity is 0.94, and its
vapor pressure at the following temperature of 90
o
F is 13.85 psia.
The pipe is 8in. Schedule 40 commercial steel pipe, and the
eciency of the pump is 75%. Size a valve to control the ow of oil.
From liquid ow correlations, the frictional pressure drop in the line
is found to be 6 psi.
Chen CL 56
Note: the liquid may ash if we place valve at entrance of tower
(12.7 psia < 13.85 psia)
Place valve at pump discharge: hydrostatic pressure is
12.7 + (62.3 lb/ft
2
)(0.94)(60 ft)/(144 in
2
/ ft
2
)
. .
24.4 psia
= 37.1 psia
Select p
v
= 5 psi
annual oper cost =
700 gal
1 min
1 ft
3
7.48 gal
5 lbf
1 in
2
144 lbf
1 ft
2
1 kWmin
44250 ftlbf
8200 h
1 yr
$0.03
1 kWh
1
0.75
= $500/yr
C
v
max
= 2(700)
_
0.94
5
= 607
gpm
psi
select an 8in. Masoneilan valve with C
v
= 640
Chen CL 57
Valve Inherent Characteristics
Inherent Characteristics:
_
q(x)
q
max
_
p
v
=c
q(x) = C
v
max
f(x)
. .
C
v
_
p
v
G
x : 0 1 (= vp)
q
max
= C
v
max
1
_
p
v
G
(valve full open)
_
q(x)
q
max
_
p
v
=c
= f(x) (ratio of ow area)
=
_
_
x linear
R
x1
equal percentage
quick opening
Chen CL 58
Valve Inherent Characteristics
Chen CL 59
Valve Inherent Characteristics
Note: equal percentage ?
df(x)
dx
= kf(x)
df(x)
f
= kdx
a + ln[f(x)] = kx
a = k (x = 0 f = 0; x = 1 f = 1)
ln[f(x)] = k(x 1)
f(x) = e
k(x1)
= R
x1
Chen CL 60
Valve Installed Characteristics
Installed Characteristics:
_
q(x)
q
max
_
p
t
=c
q(x) = C
v
max
f(x)
_
p
v
G
x : 0 1
= C
v
max
f(x)
_
p
t
p
h
G
= C
v
max
f(x)
_
p
t
p
max
h
_
q(x)
q
max
_
2
G
q
max
= C
v
max
1
p
t
p
max
h
1
G
Chen CL 61
Valve Installed Characteristics
_
q(x)
q
max
_
p
t
=c
= f(x)
_
p
t
p
max
h
_
q(x)
q
max
_
2
p
t
p
max
h
_
q(x)
q
max
_
p
t
=c
= f(x)
p
t
p
t
[1 f
2
(x)] p
max
h
> f(x)
= f(x)
1
1 [1 f
2
(x)]
_
p
max
h
p
t
_
= f(x)
1
_
1 [1 f
2
(x)] (1 )
=
f(x)
_
+ (1 )f
2
(x)
Chen CL 62
Valve Installed Characteristics
where =
_
p
v
p
t
_
q(x)
max
=
_
p
v
p
t
_
q
max
=
=
_
p
v
p
t
_
q
note:
_
q(x)
q
max
_
p
t
=c
=
f(x)
_
1 [1 f
2
(x)]
_
1
_
q
max
q
__
Chen CL 63
Valve Installed Characteristics again
p
L
= k
L
G
f
q
2
k
L
=
p
L
G
f
q
2
p
v
= G
f
q
2
C
2
v
(C
v
= C
v
max
f(x))
p
o
= p
v
+ p
L
=
_
1
C
2
v
+k
L
_
G
f
q
2
q =
C
v
1+k
L
C
2
v
_
p
0
G
f
q
max
=
C
v
max
1+k
L
C
2
v
max
_
p
0
G
f
_
q
q
max
_
p
o
=c
=
C
v
C
v
max
. .
f(x)
_
1+k
L
C
2
v
max
1+k
L
C
2
v
Chen CL 64
Valve Installed Characteristics: Example
For last example, nd the maximum ow through the valve, the
installed ow characteristics, and the rangeability of the valve.
Assume both linear and equal percentage characteristics with
rangeability parameter of R = 50. Analyze the eect of varying the
pressure drop across the valve at nominal ow.
Chen CL 65
k
L
=
6 psi
(0.94)(700 gpm)
2
= 13.0 10
6
psi
(gpm)
2
p
o
= p
v
+ p
L
= 5 + 6 = 11 psi (constant)
q
max
=
640
1+(13.010
6
)(640)
2
_
11
0.94
= 870 gpm (< 2 700)
Linear:
q
.95
=
(640)(0.95)
1+(13.010
6
)(640)
2
_
11
0.94
= 862 gpm
q
.05
=
(640)(0.05)
1+(13.010
6
)(640)
2
_
11
0.94
= 109 gpm
rangeability =
862
109
= 7.9 (inherent range =
.95
.05
= 19)
Equal %:
q
.95
=
(640)(50
0.951
)
1+(13.010
6
)(640)
2
_
11
0.94
= 839 gpm
q
.05
=
(640)(50
0.051
)
1+(13.010
6
)(640)
2
_
11
0.94
= 53.2 gpm
rangeability =
839
53.2
= 15.8 (inherent range =
50
0.951
50
0.051
= 34.8)
Chen CL 66
valve pressure drop, psi
2 5 10
total pressure drop 8 11 16
calculated C
v
max
960 607 429
required valve size 10in. 8in. 8in.
actual C
v
max
1000 640 640
maximum ow, gpm 779 870 1049
linear rangeability 5.4 7.9 7.9
Equal % rangeability 10.8 15.8 15.8
Chen CL 67
Installed ow characteristics:
(a) linear inherent characteristics.
(b) equal percentage characteristics with = 59
Chen CL 68
Application I: Fluid Transfer
SelfRegulated Processes
Chen CL 69
Application I: Fluid Transfer
Liquid Transferred by Pressure Dierence
Chen CL 70
Application I: Fluid Transfer
Liquid Transferred by Pressure Dierence
Chen CL 71
Application I: Fluid Transfer
A FlowControlled Pump
Chen CL 72
Application I: Fluid Transfer
Steam Ejector
Chen CL 73
Application II: Heat Transfer
Steam Heaters and Dryers
Chen CL 74
Application II: Heat Transfer
Heat Exchangers
Chen CL 75
Application II: Heat Transfer
Antifreeze Applications
Chen CL 76
Application III: Chemical Reactions
A pH Control System
Chen CL 77
Application III: Chemical Reactions
Combustion Processes
Chen CL 78
Application III: Chemical Reactions
Vaporized Control for Safety
ProportionalIntegralDerivative
PID Controllers
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Outline
ProportionalIntegralDerivative Controller:
PID Control based on CurrentFuture Error with ConstantReset Bias
PID Control based on CurrentFuture Error with ConstantReset Bias
PID Control based on CurrentFuture Error with ConstantReset Bias
PID Control based on CurrentFuture Error with ConstantReset Bias
PID Control based on CurrentFuture Error with ConstantReset Bias
PID Control based on CurrentFuture Error with ConstantReset Bias
PID Control based on CurrentFuture Error with ConstantReset Bias
Chen CL 2
Steady Oset of PID when using Constant bias
Series PID Parallel PID
Response of PID Controllers to Typical Inputs
Operational Aspects of PID Controllers
problems of D action: sensitivity to noise
problems of I action: moving PB and reset windup
manual control requirement
bumpless transfer
Chen CL 3
PID Controller: A Survey
More Than 95% of Controllers Are of PID Type
Bialkowski (1993): paper mills in Canada
A typical mill has more than 2000 control loops
97% of loops use PI control
Only 20% of control loops were found to work well
and decrease process variability
Reasons for poor performance were
Poor tuning (30%)
Valve problems (30%)
Others (20%): sensor, bad sampling rates
Chen CL 4
PID Controller: A Survey
More Than 95% of Controllers Are of PID Type
Ender (1993)
30% of installed process controllers operate in manual
20% of loops use default parameters (factory tuning)
30% of loops function poorly because of equipment
problems (valves, sensors )
Chen CL 5
Why PID Controllers Are So Popular ?
Structure: simple
Easy for understanding
A few adjustable parameters, easy for tuning
Performance: good or acceptable level
Robustness: strong to uncertain operating conditions
Applicability: wide to dierent processes/industries
Chen CL 6
A Heat Exchanger with Feedback Control
Valve: AFC (ATO); Controller: Reverse Action
Chen CL 7
Simplest Controller: OnO Control
u(t) =
_
_
u
b
+ u if y(t) < y
sp
d
u
b
u if y(t) > y
sp
+ d
Problem: oscillatory response !
Ono cares about control direction only;
Ono gives same control action for dierent error magnitudes
Solution: control action considering error magnitude
Chen CL 8
CurrentErrorBased P Control
with Constant Bias (SS value)
current control corrective action, u(t)
current error magnitude, e(t) y
sp
y(t)
u(t) e(t) y
sp
y(t)
u(t) = K
c
e(t) p(t) (K
c
: adjustable proportionality)
u(t) = K
c
e(t)
. .
u(t)
+ u
b
..
SS value
for e(t) = 0
Chen CL 9
Problem of CurrentErrorBased P Control
u(t) = K
c
e(t)
. .
u(t)
+ u
b
..
SS value
for e(t) = 0
Too late to correct current error
It takes time to know eect of control on output
conservative action to guarantee stability
limited achievable control performance
Chen CL 10
Solution: FutureErrorBased P Control
Back to the Future
Control action based on future condition (error)
take control action in advance
better control performance
u(t) = K
c
e(t+T
d
)
. .
u(t)
+ u
b
..
SS value
for e(t) = 0
u(t) = K
c
e(t+T
d
)
. .
u(t)
+ u
b
..
SS value
for e(t) = 0
Chen CL 11
FutureErrorBased P Control
Gives Better Performance
HE: pulse decrease in input temperature
At t
1
: e(t
1
+ T
d
) > e(t
1
)
P control based on e(t
1
+ T
d
) has larger action
more steam smaller undershoot in T
( PreAct P)
..
K
c
e(t
1
+ T
d
) + u
b
> K
c
e(t
1
) + u
b
. .
( Normal P)
Chen CL 12
FutureErrorBased P Control
Gives Better Performance
HE: pulse decrease in input temperature
At t
2
: e(t
2
+ T
d
) < e(t
2
)
P control based on e(t
2
+ T
d
) has smaller action
less steam smaller overshoot in T
( PreAct P)
..
K
c
e(t
2
+ T
d
) + u
b
< K
c
e(t
2
) + u
b
. .
( Normal P)
Chen CL 13
Implement FutureErrorBased P Control
As CurrentErrorBased PD Control
Original P: u(t) = K
c
e(t) + u
b
PreAct P: u(t) = K
c
e(t + T
d
) + u
b
K
c
_
e(t) + T
d
de(t)
dt
_
. .
e
(t)e(t+T
d
)
+ u
b
Chen CL 14
u(t) = K
c
e(t + T
d
) + u
b
K
c
_
e(t) + T
d
de(t)
dt
_
. .
e
(t)e(t+T
d
)
+ u
b
Chen CL 15
SubSummary
P control based on current error with constant bias
e(t) e(t + T
d
)
P control based on future error with constant bias
u(t) = K
c
e(t + T
d
) + u
b
K
c
e(t) + T
d
de(t)
dt
(t)
+u
b
PD control based on current error with constant bias
Chen CL 16
Steady Oset for P (PD) Control
Nonzero Steady State Oset (I): Setpoint Change
Initial steady state: (all variables [0, 100%])
y = y
sp
= y e = 0 u = u
b
= u =
Chen CL 17
Case I: Setpoint change y
sp
: y y +
New steady state: y =?, u =?, e =?
(change in y) = K
p
{change in process input}
= K
p
{(change in CO) + (change in load)}
y y = K
p
_
_
_
u u
. .
change in CO
+
..
change in load=0
_
_
_
= K
p
_
K
c
e
..
_
_
(y + )
. .
new sp
y
_
_
+u
b
. .
u
u +
..
=0
_
_
y = y +
K
c
K
p
1 + K
c
K
p
. .
new steady state
= y +
. .
desired sp
Chen CL 18
Nonzero Steady State Oset (II): Load Change
Initial steady state: (all variables [0, 100%])
y = y
sp
= y e = 0 u = u
b
= u =
Chen CL 19
Case II: Load change : +
New steady state: y =?, u =?, e =?
(change in y) = K
p
{change in process input}
= K
p
{(change in CO) + (change in load)}
y y = K
p
_
_
_
u u
. .
change in CO
+
..
change in load=
_
_
_
= K
p
_
K
c
e
..
_
_
(y)
..
sp
y
_
_
+u
b
. .
u
u +
_
_
y = y +
K
p
1 + K
c
K
p
. .
new steady state
= y
..
desired sp
Chen CL 20
CurrentErrorBased P Control
with Reset Bias
Question:
using P or PD control with constant bias,
how to guarantee zero steadystate oset ?
(at steady state: e = 0, y = y
sp
)
Answer: u = u
b
at SS
desired: e = 0 (y = y
sp
) at SS
u = u
b
at SS
Chen CL 21
Reset Bias for Zero SS Oset
Simplest Method
Simplest method to guarantee u = u
b
at SS:
Let u
b
(t) = u(t) for all t
then u
b
= u at steady state
e = 0 y = y
sp
P control based on current error with reset bias
via a unitygain dynamics (not workable !)
Chen CL 22
Reset Bias for Zero SS Oset
Feasible Method
Feasible method to guarantee u = u
b
at SS:
desired: u
b
= u at SS
simplest method: u
b
(t) equals u(t) t
feasible method: u
b
(t) tracks u(t) t
u
b
(t) tracks u(t) with rstorder dynamics:
(use T
i
to adjust tracking velocity)
T
i
du
b
(t)
dt
+ u
b
(t) = u(t)
. .
equal
. .
tracking
Chen CL 23
P control based on current error with reset bias
via rstorder dynamics
Chen CL 24
Reset Bias Integral Action
(1) u(t) = K
c
e(t) + u
b
(t) (P with reset bias)
(2) u(t) = T
i
du
b
(t)
dt
+ u
b
(t) (u
b
(t) tracks u(t))
T
i
du
b
(t)
dt
= K
c
e(t) = p(t)
u
b
(t) u
b
=
1
T
i
_
t
0
p(t)dt
. .
change in bias
=
K
c
T
i
_
t
0
e(t)dt
. .
=u
b
(t)
Chen CL 25
(1) u(t) = K
c
e(t)
. .
p(t)
+
u
b
(t)
..
1
T
i
_
t
0
p(t)(t)dt
. .
u
b
(t)
+u
b
(PI)
= K
c
e(t) +
K
c
T
i
_
t
0
e(t)dt + u
b
= K
c
_
e(t) +
1
T
i
_
t
0
e(t)dt
_
+ u
b
Reset bias: interpreted as integral action
currenterrorbased P control with reset bias
(reseting bias according to integral of error)
= currenterrorbased PI control with constant bias
Chen CL 26
Reset Bias Integral Action
Chen CL 27
Chen CL 28
FutureErrorBased P Control with Reset Bias
P control based on future error
. .
PD
with reset bias
. .
PI
Interpreted As PD +PI (series PID ) Controller
e(t + T
d
) e(t) + T
d
de(t)
dt
e
(t)
Chen CL 29
u
b
(t) =
1
T
i
_
K
c
e
(t)dt + u
b
u(t) = K
c
e
(t)
. .
p(t)
+
u
b
(t)
..
1
T
i
_
K
c
e
(t)
. .
p(t)
dt +u
b
. .
u
b
(t)
Chen CL 30
Series PID Parallel PID
K
p
c
= K
c
_
1 +
T
d
T
i
_
K
c
= K
p
c
_
0.5 +
_
0.25
T
p
d
T
p
i
_
T
p
i
= T
i
_
1 +
T
d
T
i
_
T
i
= T
p
i
_
0.5 +
_
0.25
T
p
d
T
p
i
_
T
p
d
= T
d
/
_
1 +
T
d
T
i
_
T
d
= T
p
d
/
_
0.5 +
_
0.25
T
p
d
T
p
i
_
Chen CL 31
Series PID Parallel PID
p(t) = K
c
_
e(t) + T
d
de(t)
dt
_
u(t) = p(t) + u
b
(t)
T
i
du
b
(t)
dt
+ u
b
(t) = u(t)
P(t) = K
c
_
E(t) + T
d
dE(t)
dt
_
U(t) = P(t) + U
b
(t)
T
i
dU
b
(t)
dt
+ U
b
(t) = U(t)
P(s) = K
c
(E(s) + T
d
sE(s)) = K
c
(1 + T
d
s)E(s)
U(s) = P(s) + U
b
(s)
T
i
sU
b
(s) + U
b
(s) = U(s) U
b
(s) =
1
T
i
s+1
U(s)
Chen CL 32
U(s) = P(s) + U
b
(s) = P(s) +
1
T
i
s+1
U(s)
U(s) =
T
i
s+1
T
i
s
P(s)
=
T
i
s+1
T
i
s
K
c
(1 + T
d
s)E(s) (series PID)
=
K
c
T
i
s
_
T
i
T
d
s
2
+ (T
i
+ T
d
)s + 1
_
E(s)
= K
c
T
i
+T
d
T
i
_
1 +
1
(T
i
+T
d
)s
+
T
i
T
d
T
i
+T
d
s
_
E(s)
= K
c
_
1 +
T
d
T
i
_
_
1 +
1
T
i
1+
T
d
T
i
s
+ T
d
_
1 +
T
d
T
i
_
s
_
E(s)
= K
p
c
_
1 +
1
T
p
i
s
+ T
p
d
s
_
E(s) (parallel PID)
Chen CL 33
P Control Based on {Current, Future} Error
with {Constant, Reset} Bias
const. bias reset bias
current error P PI
future error PD PID
Chen CL 34
P Action to Step Error
Chen CL 35
PD Action to Step Error
Chen CL 36
PI (PReset) Action to Step Error
Chen CL 37
PID Action to Step Error
Chen CL 38
PD Action to Ramp Error
Chen CL 39
PID Action to Ramp Error
Chen CL 40
Problem of D Action (I):
Sensitive to HighFrequency Noise
Derivative action without lter:
Problem: sinusoidal input output mag. frequency
e(t) = Asin(t) D(t) = T
d
de(t)
dt
= T
d
A cos (t)
Chen CL 41
Solution: (rstorder) lowpass lter
T
d
N
dD(t)
dt
+ D(t) = T
d
de(t)
dt
. .
D action
. .
equal
. .
follow
Chen CL 42
Problem: (again)
derivative + ltering large inner signal (e
d
)
Solution: ltering derivative
Chen CL 43
Problem of D Action (II):
Bump Response to Step Input
Solution 1: D action on measurement
Derivative on measurement:
y(t + T
d
) y(t) + T
d
dy(t)
dt
e(t + T
d
) = y
sp
y(t + T
d
)
= y
sp
_
y(t) + T
d
dy(t)
dt
_
e(t) T
d
dy(t)
dt
For noise: ltering + derivative action
T
d
N
dy
f
(t)
dt
+ y
f
(t) = y(t) (y
f
(t) follows y(t))
D(t) = K
c
T
d
dy
f
(t)
dt
(derivative on y
f
(t))
Chen CL 44
Solution 2: ltering on setpoint signal
(use r(t) as the practical setpoint)
Solution 3: setpoint weighting (skip)
Chen CL 45
Problem of Reset (I):
Moving Proportional Band
(Reverse) P with reset bias: ([u
min
, u
max
] = [0%, 100%])
u(t) = K
c
_
y
sp
y(t)
+ u
b
(t) (K
c
> 0)
y(t) = y
max
= ? u(t) = K
c
_
y
sp
y
max
+ u
b
(t) = u
min
= 0%
y(t) = y
min
= ? u(t) = K
c
_
y
sp
y
min
+ u
b
(t) = u
max
= 100%
y(t) > y
max
u(t) < u
min
(saturation !)
y(t) < y
min
u(t) > u
max
(saturation !)
y(t) {y
min
, y
max
} u(t) {u
max
, u
min
} (normal operation)
Chen CL 46
Proportional Band: (for normal operation)
PB = [y
min
, y
max
] =
_
y
sp
+
u
b
(t)u
min
K
c
, y
sp
+
u
b
(t)u
max
K
c
_
=
_
y
sp
+
u
b
(t)0
K
c
, y
sp
+
u
b
(t)100
K
c
_
If y(t) PB, Then controller output is normal
width of PB: aected by K
c
y
max
y
min
=
u
max
u
min
K
c
=
100
K
c
%
position of PB: aected by K
c
, y
sp
, u
b
(t)
Chen CL 47
Example:
y
sp
= 50%, K
c
= 2, u
b
(t) = 50% t,
u
min
= 0%, u
max
= 100%
PB =
_
50 +
u
b
(t) 100
K
c
% , 50 +
u
b
(t) 0
K
c
%
_
= [ 25% , 75% ]
Chen CL 48
Moving PB due to Resetting Bias: Example
Process: G(s) =
_
0.016
3s+1
__
50
30s+1
__
1
10s+1
_
ZNPI tuning: K
c
= 3.40, T
i
= 37 ( PB =
100%
K
c
%/%
= 29.4%)
Chen CL 49
Moving PB due to Resetting Bias: Example
Process: G(s) =
_
0.016
3s+1
__
50
30s+1
__
1
10s+1
_
Faster reset: K
c
= 3.40, T
i
= 18.5 ( PB =
100%
K
c
%/%
= 29.4%)
Chen CL 50
Moving PB due to Resetting Bias: Example
Process: G(s) =
_
0.016
3s+1
__
50
30s+1
__
1
10s+1
_
Slower reset: K
c
= 3.40, T
i
= 74 ( PB =
100%
K
c
%/%
= 29.4%)
Chen CL 51
Problem of
Reset (II)
Reset Windup
HE Example
Chen CL 52
Anti ResetWindup:
Use A Saturation Model to Limit Control Signal
u(t) =
_
_
100% for v(t) 100%
v(t) for 0% v(t) 100%
0% for v(t) 100%
Chen CL 53
Anti ResetWindup for Parallel PID
If v > u = u
max
Then e
s
= u v < 0
1
T
t
_
e
s
dt < 0 v until v = u
max
Chen CL 54
Modication of PID (I):
HighFrequency Noise
Problem of D Action: sensitive to high frequency noise
Solution: lowpass lter on D (P & D)
Chen CL 55
Modication of PID (II):
Anti ResetWindup
Problem of Reset Action: reset windup (saturation)
Solution: limiter
Chen CL 56
Modication of PID (III):
Manual Control
Manual control: with an integrator
Chen CL 57
Modication of PID (IV):
Bumpless A/M Transfer
When in automatic control: m(t) (manual ) tracks u(t) (auto)
m(t): always ready to control
Chen CL 58
Modication of PID (V):
Bumpless M/A Transfer
Method 1: resetting bias during M/A (keep original y
sp
)
let u
b
(t) = m(t) K
c
e(t) (when M/A transfer)
thus u(t) = u
b
(t) + K
c
e(t) (auto control action)
= m(t) (nal manual action)
Chen CL 59
Method 2: setpoint tracking (y
sp
(t) tracks y(t) when manual control)
T
s
dy
sp
(t)
dt
+ y
sp
(t) = y(t) (when manual control)
Disadvantage: y
sp
moved to undesired value ?
Chen CL 60
A Complete PID Controller (I)
Automatic control
Antireset windup
Bias tracking: bias tracks nal output u(t)
Manual tracking: m(t) tracks nal output u(t)
Manual setpoint adjustment
Chen CL 61
A Complete PID Controller (II)
Manual control
Antireset windup
Bias tracking: bias tracks nal output u(t)
Manual tracking: m(t) tracks nal output u(t)
(Manual setpoint adjustment)
Chen CL 62
A Complete PID Controller (III)
External setpoint (used in Cascade Control)
Antireset windup
Bias tracking: bias tracks nal output u(t)
Manual tracking: m(t) tracks nal output u(t)
Setpoint tracking:
Chen CL 63
A Complete PID Controller (IV)
Automatic control (used in Override Control)
Antireset windup
Bias tracking: bias tracks external signal z(t)
Manual tracking: m(t) tracks nal output u(t)
Setpoint tracking:
Chen CL 64
Thank You for Your Attention
Modeling Dynamic and Static
Behavior of Chemical Processes
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
State Variables and State Equations
State Variables:
A set of fundamental dependent quantities whose values
will describe the natural state of a given system
(temperature, pressure, ow rate, concentration )
State Equations:
A set of equations in the state variables above which
will describe how the natural state of a given system
changes with time
Chen CL 2
Principle of Conservation of A Quantity S
S =
_
_
total mass
mass of individual components
total energy
momentum
Chen CL 3
accumulation of S
within a system
time period
=
ow of S
in the system
time period
ow of S
out the system
time period
+
amount of S generated
within the system
time period
amount of S consumed
within the system
time period
Chen CL 4
Total Mass Balance:
d(V )
dt
=
i:inlet
i
F
i
j:outlet
j
F
j
Mass Balance on Component A:
dn
A
dt
=
d(c
A
V )
dt
=
i:inlet
c
A
i
F
i
j:outlet
c
A
j
F
j
rV
Total Energy Balance:
dE
dt
=
d(U +K +P)
dt
=
i:inlet
i
F
i
h
i
j:outlet
j
F
j
h
j
QW
s
Chen CL 5
Mathematical Model
A Stirred Tank Heater
Mathematical model of a process
= state equations with associated state variables
Chen CL 6
Total mass in tank: V = Ah
Total energy of liquid in tank:
E = U +K +P
dU
dt
dH
dt
;
dK
dt
=
dP
dt
= 0
H = Ahc
p
_
T T
ref
_
State variables: h, T
Total mass balance:
d(Ah)
dt
= F
i
F
=c
A
dh
dt
= F
i
F
Chen CL 7
Total energy balance:
d
_
Ahc
p
_
T T
ref
_
dt
= F
i
c
p
_
T
i
T
ref
_
Fc
p
_
T T
ref
_
+Q
T
ref
=0
A
d(hT)
dt
= F
i
T
i
FT +
Q
c
p
A
d(hT)
dt
= Ah
dT
dt
+T A
dh
dt
..
=F
i
F
= F
i
T
i
FT +
Q
c
p
Ah
dT
dt
= F
i
(T
i
T) +
Q
c
p
Chen CL 8
Summary: State equations
A
dh
dt
= F
i
F
Ah
dT
dt
= F
i
(T
i
T) +
Q
c
p
Summary: variables
state variables: h, T
output variables: h, T
disturbances: T
i
, F
i
manipulated variables: Q, F
parameters: A, , c
p
Chen CL 9
Mathematical Model
A Stirred Tank Heater (cont)
Assumed initial steady states:
0 = A
dh
dt
= F
i,s
F
s
0 = Ah
dT
dt
= F
i,s
(T
i,s
T
s
) +
Q
s
c
p
Chen CL 10
Temperature response to a step decrease in inlet temperature:
Dynamic response to a step decrease in inlet ow rate:
Chen CL 11
Additional Element:
Transport Rate Equations
Transport Rate Equations:
To describe rate of mass, energy, and momentum transfer between
a system and its surroundings
Example: a stirred tank heater
heat supplied by steam:
Q = UA
t
(T
st
T)
Chen CL 12
Additional Element:
Kinetic Rate Equations
Kinetic Rate Equations:
To describe rates of chemical reactions taking place in a system
Example: a 1storder reaction in a CSTR
reaction rate equation:
r = k
0
e
E/RT
c
A
Chen CL 13
Additional Element:
Reaction and Phase Equilibrium Relationships
Reaction and Phase Equilibrium Relationships:
To describe equilibrium situations reached during a chemical
reaction or by two or more phases
Example: a ash drum
temperature of liquid phase
= temperature of vapor phase
pressure of liquid phase
= pressure of vapor phase
chemical potential of component i
in liquid phase =
chemical potential of component i
in vapor phase
Chen CL 14
Additional Element:
Equations of States
Equations of States:
To describe the relationship
among intensive variables
describing the
thermodynamic state
of a system
Example: a ash drum
Ideal gas law for vapor phase:
pV
vapor
= (moles of A + moles of B)RT
=
mass of A + mass of B
average MW
RT
=
mass of A + mass of B
y
A
M
A
+y
B
M
B
RT
vapor
=
mass of A + mass of B
V
vapor
= [y
A
M
A
+y
B
M
B
]
p
RT
liquid
= (T, x
A
)
Chen CL 15
Dead Time
Dead Time:
Whenever an input variable of a system changes
there is a time interval (short or long) during which
no eect is obsrved on outputs of the system
dead time, transportation lag, pure delay,
distancevelocity lag
Chen CL 16
Example: liquid through a pipe
A: temperature of inlet changes
B: temperature of outlet response
dead time: d
d =
volume of pipe
volumetric ow rate
=
A L
A U
av
=
L
U
av
T
out
(t) = T
in
(t d)
Chen CL 17
Modeling Diculties
Poorly understood processes
Imprecisely known parameters
Size and complexity of a model
Chen CL 18
Additional Examples of Mathematical Modeling
Continuous Stirred Tank Reactor (CSTR)
Exothermic Rx: A B
Chen CL 19
Total Mass Balance:
d(V )
dt
=
i
F
i
F 0
=c
=
dV
dt
= F
i
F
Mass Balance on Component A:
(r: rate of reaction per unit volume)
dn
A
dt
=
d(c
A
V )
dt
= c
A
i
F
i
c
A
F rV
V
dc
A
dt
+c
A
dV
dt
..
=F
i
F
= c
A
i
F
i
c
A
F k
0
e
E/RT
c
A
V
dc
A
dt
=
F
i
V
_
c
A
i
c
A
_
k
0
e
E/RT
c
A
Chen CL 20
Total Energy Balance:
total energy E = U +K +P = U H(T, n
A
, n
B
) (enthalpy)
dE
dt
=
dU
dt
dH
dt
=
i
F
i
h
i
(T
i
) Fh(T) Q (1)
also
dH
dt
=
H
T
..
V c
p
dT
dt
+
H
n
A
..
H
A
(T)
dn
A
dt
+
H
n
B
..
H
A
(T)
dn
B
dt
note
dn
A
dt
=
d(c
A
V )
dt
= c
A
i
F
i
c
A
F rV
dn
B
dt
=
d(c
B
V )
dt
= c
B
i
F
i
. .
=0
c
B
F +rV
dH
dt
= V c
p
dT
dt
+
H
A
_
c
A
i
F
i
c
A
F rV
_
+
H
B
_
c
B
F rV
(2)
Chen CL 21
(1) = (2) V c
p
dT
dt
=
H
A
_
c
A
i
F
i
c
A
F rV
_
H
B
_
c
B
F rV
+F
i
i
h
i
(T
i
)
. .
i
h
i
(T)
. .
c
A
i
H
A
(T)
+
i
c
p
i
(T
i
T)
F h(T)
. .
c
A
H
A
(T)+c
B
H
B
(T)
Q
=
H
A
c
A
i
F
i
. .
(i)
+
H
A
c
A
F
. .
(ii)
+
H
A
rV
+
H
B
c
B
F
. .
(iii)
H
B
rV +F
i
c
A
i
H
A
. .
(i)
+F
i
i
c
p
i
(T
i
T) Fc
A
H
A
. .
(ii)
Fc
B
H
B
. .
(iii)
Q
=
_
H
A
H
B
_
. .
H
r
rV +F
i
i
c
p
i
(T
i
T) Q
=
i
,c
p
=c
p
i
= V
dT
dt
= F
i
(T
i
T) +
(H
r
)
c
p
. .
J
rV
Q
c
p
Chen CL 22
Summaries:
state var.s: V, c
A
, T
state eqn.s:
dV
dt
= F
i
F
dc
A
dt
=
F
i
V
_
c
A
i
c
A
_
k
0
e
E/RT
c
A
dT
dt
=
F
i
V
(T
i
T) +Jk
0
e
E/RT
c
A
Q
c
p
V
output var.s: V, c
A
, T
input var.s: c
A
i
, F
i
, T
i
, Q, F
manip. var.s: Q, F
disturbances: c
A
i
, F
i
, T
i
const. par.s: , c
p
, (H
r
), k
0
, E, R
Chen CL 23
Additional Examples of Mathematical Modeling
An Ideal Binary Distillation Column
Chen CL 24
Assumptions:
constant vapor holdup:
equal molar heats of vaporization for A and B
negligible heat loss
constant relative volativility
100% tray eciency
V = V
1
= = V
N
y
i
=
x
i
1 + ( 1)x
i
neglect dynamics of condenser and reboiler
neglect momentum balance for each tray
leaving liquid = L
i
= f(M
i
), i = 1, , N
liquid holdup = M
i
Chen CL 25
State Equations (1): feed tray (i = f)
total mass:
dM
f
dt
= F
f
+L
f+1
+V
f1
L
f
V
f
= F
f
+L
f+1
L
f
comp A:
d(M
f
x
f
)
dt
= F
f
c
f
+L
f+1
x
f+1
+V
f1
y
f1
L
f
x
f
V
f
y
f
Chen CL 26
State Equations (2): top tray (i = N)
total mass:
dM
N
dt
= F
R
+V
N1
L
N
V
N
= F
R
L
N
comp A:
d(M
N
x
N
)
dt
= F
R
x
D
+V
N1
y
N1
L
N
x
N
V
N
y
N
Chen CL 27
State Equations (3): bottom tray (i = 1)
total mass:
dM
1
dt
= L
2
L
1
+V V
1
= L
2
L
1
comp A:
d(M
1
x
1
)
dt
= L
2
x
2
+V y
B
L
1
x
1
V
1
y
1
Chen CL 28
State Equations (4): ith tray (i = 2, , N 1; i = f)
total mass:
dM
i
dt
= L
i+1
L
i
+V
i1
V
i
= L
i+1
L
i
comp A:
d(M
i
x
i
)
dt
= L
i+1
x
i+1
L
i
x
i
+V
i1
y
i1
V
i
y
i
Chen CL 29
State Equations (5): reux drum
total mass:
dM
RD
dt
= V
N
F
R
F
D
comp A:
d(M
RD
x
D
)
dt
= V
N
y
N
(F
R
+F
D
)x
D
Chen CL 30
State Equations (6): column base
total mass:
dM
B
dt
= L
1
V F
B
comp A:
d(M
B
x
B
)
dt
= L
1
x
1
V y
B
F
B
x
B
Chen CL 31
Relationships:
equilibrium relationships:
y
i
=
x
i
1 + ( 1)x
i
i = 1, , f, , N; B
hydraulic relationships: (Francis weir formula)
L
i
= f(M
i
) i = 1, , f, , N
State Variables:
liquid holdups:
M
1
, M
2
, , M
f
, , M
N
; M
RD
, M
B
liquid concentrations:
x
1
, x
2
, , x
f
, , x
N
; x
D
, x
B
Chen CL 32
Summaries:
2N + 4 nonlinear dierential equations (state eqn.s)
2N + 1 algebraic equations (equilibrium and hydraulic)
example: N = 20 trays
2N + 4 = 2(20) + 4 = 44 nonlinear di. eqn.s
2N + 1 = 2(20) + 1 = 41 algebraic equations
Chen CL 33
Modeling Considerations
for Control Purposes
Statevariables model
inputoutput model (convenient for control)
Degrees of freedom ( df) inherent in the process
extent of control problem to be solved
Chen CL 34
InputOutput Model:
output = f(input variables)
y
i
= f(m
1
, , m
k
; d
1
, , d
t
) i = 1, , m
Chen CL 35
Example: InputOutput Model for CSTR
Assumptions: F
i
= F dV/dt = 0
Chen CL 36
Total Energy Balance:
V
dT
dt
= F
i
(T
i
T) +
Q
c
p
Q = UA
t
(T
st
T)
dT
dt
+
_
F
i
V
+
UA
t
V c
p
_
. .
a1/+K
T =
F
i
V
..
1/
T
i
+
UA
t
V c
p
. .
K
T
st
dT
dt
+aT =
1
T
i
+KT
st
SS: 0 +aT
s
=
1
T
i,s
+KT
st,s
d(T T
s
)
dt
+a (T T
s
)
. .
T
=
1
(T
i
T
i,s
)
. .
T
i,s
+K (T
st
T
st,s
)
. .
T
st
dT
dt
+aT
=
1
i
+KT
st
T
(t) = c
1
e
at
+
_
t
0
_
1
i
+KT
st
_
dt
initial: T
(t = 0) = 0 c
1
= 0
T
(t) =
_
t
0
_
1
i
+KT
st
_
dt
Chen CL 37
Block Diagram: inputs (T
i
(t), T
st
(t)) output (T
(t))
This example: output variables = state variables
Chen CL 38
Distillation: output variables = state variables!
State variables:
liquid holdups:
M
1
, M
2
, , M
f
, , M
N
; M
RD
, M
B
liquid concentrations:
x
1
, x
2
, , x
f
, , x
N
; x
D
, x
B
Output variables:
distillate rate and composition: F
D
, x
D
bottom rate and composition: F
B
, x
B
Chen CL 39
DOF: Degree of Freedom
Degrees of Freedom (DOF):
# of independent variables that must be specied in order to dene
a process completely
DOF = (# Var.s) (# Indep. Eq.s)
Chen CL 40
Example: stirred tank heater
mathematical model: # of eq.s = 2
A
dh
dt
= F
i
F
Ah
dT
dt
= F
i
(T
i
T) +
Q
c
p
# of variables = 6 (h, T
i
, T, F, F
i
, Q)
DOF = 6  2 = 4
specify T
i
, F
i
, F, Q h(t), T(t)
in order to specify a process completely
the # of DoF should be zero
Chen CL 41
Example: binary distillation column
DOF = (4N + 11) (4N + 5) = 6
Chen CL 42
Degrees of Freedom of A Process
f = DOF = V E = (# Var.s) (# Indep. Eq.s)
Case 1: DOF = 0
unique values of the V variables
the process is exactly specied
Case 2: DOF > 0
multiple solutions result from the E equations
can specify arbitrarily f of the V variables
the process is underspecied by f equations
Case 3: DOF < 0
no solution to the E equations
the process is overspecied by f equations
Chen CL 43
DOF and Process Controllers
An underspecied process with DOF = f > 0
Q: how to reduce DOF to zero
to specify system completely with unique behavior ?
from external world: disturbances
to add control loops
Control loop:
additional equation between MV and CV
additional variable: setpoint
same: DOF
dierence: specify MV specify setpoint
Chen CL 44
Example: stirred tank heater with two control loops
DOF = 4 DOF = 0 if we specify
T
i
, F
i
from external world ( disturbances)
setpoints of the two controllers
Chen CL 45
Example: binary distillation column ( DOF = 6)
specication of disturbances (external world):
feed rate (F
f
) and feed composition (c
f
)
DOF = 6 DOF = 4
specication of control objectives ( setpoints):
(I) for products:
x
D
: distillate composition
x
B
: bottom stream composition
(II) for operational feasibility:
M
RD
: liquid holdup in reux drum
M
B
: liquid holdup at base of column
four control loops
DOF = 6 DOF = 4 DOF = 0
Chen CL 46
Note: other alternative control objectives
(1) keep at desired F
D
, x
D
, M
RD
, M
B
(2) keep at desired F
B
, x
B
, M
RD
, M
B
Controller Simulation
using Simulink
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Simulation of Control Instrumentation
P Control with Reset Bias (PI)
u(t) = K
c
e(t) +u
b
(t) u(0) = u
b
(0) = u
b
u(t) = T
I
du
b
(t)
dt
+u
b
(t)
du
b
(t)
dt
=
1
T
I
[u(t) u
b
(t)]
u
b
(t) =
_
t
0
1
T
I
[u() u
b
()] d +u
b
(0)
=
_
t
0
1
T
I
[(u() u(0)) (u
b
() u
b
(0))] d +u
b
(0)
U
b
(t) =
_
t
0
1
T
I
[U() U
b
()] d
U
b
(s) =
1
s
1
T
I
[U(s) U
b
(s)]
Chen CL 2
Simulation of Control Instrumentation
Simulation of PI Controller
u(t) = K
c
e(t) +u
b
(t); u
b
(t) u
b
(0) =
_
t
0
1
T
I
[u() u
b
()] d
Chen CL 3
Simulation of Control Instrumentation
Simulation of PI Controller
% P control with reset bias
plot(tout,p,m,linewidth,2)
hold on
plot(tout,ub,b,linewidth,2)
plot(tout,u,r,linewidth,2)
ylabel(\bf PI Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(p(t),u_b(t),u(t));
hold off
Chen CL 4
Simulation of Control Instrumentation
Simulation of PI Controller
% P control with reset bias
subplot(3,1,1)
plot(tout,p,m,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(3,1,2)
plot(tout,ub,b,linewidth,2)
ylabel(\bf u_b(t),fontsize,14);
set(gca,linewidth,3);
subplot(3,1,3)
plot(tout,u,r,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 5
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
u(t) = K
c
e(t +T
D
) +u
b
K
c
_
e(t) +T
D
de(t)
dt
_
+u
b
u(t) = K
c
_
e(t) +T
D
de
f
(t)
dt
_
+u
b
e(t) = T
D
de
f
(t)
dt
+e
f
(t) T
D
de
f
(t)
dt
=
1
[e(t) e
f
(t)]
e
f
(t) =
_
t
0
1
T
D
_
T
D
de
f
()
d
_
d +e
f
(0)
. .
=0
=
_
t
0
1
T
D
_
1
[e() e
f
()]
_
d +e
f
(0)
. .
=0
or E
f
(t) =
_
t
0
1
T
D
_
1
[E() E
f
()]
_
d (deviation var.s)
E
f
(s) =
1
s
1
T
D
1
[E(s) E
f
(s)] =
1
s
1
T
D
L
_
T
D
dE
f
(t)
dt
_
Chen CL 6
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
T
D
de
f
(t)
dt
=
1
(e(t) e
f
(t)) ; e
f
(t) e
f
(0) =
_
t
0
1
T
D
_
T
D
de
f
()
d
_
d
Chen CL 7
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,efuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),e(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 8
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
subplot(5,1,1)
plot(tout,e,Color,[0,.5,0],...
linewidth,2)
ylabel(\bf e(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,2)
plot(tout,efuture,Color,[.5,0,.5],...
linewidth,2)
ylabel(\bf e(t+T_d),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,3)
plot(tout,p,r,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,4)
plot(tout,Daction,b,linewidth,2)
ylabel(\bf D(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,5)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 9
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Measurement y with A Lowpass Filter
u(t) = K
c
e(t +T
D
) +u
b
K
c
_
y
sp
_
y(t) +T
D
dy(t)
dt
__
+u
b
u(t) = K
c
_
y
sp
_
y(t) +T
D
dy
f
(t)
dt
__
+u
b
y(t) = T
D
dy
f
(t)
dt
+y
f
(t) T
D
dy
f
(t)
dt
=
1
[y(t) y
f
(t)]
y
f
(t) =
_
t
0
1
T
D
_
T
D
dy
f
()
d
_
d +y
f
(0)
=
_
t
0
1
T
D
_
1
[y() y
f
()]
_
d +y
f
(0)
or Y
f
(t) =
_
t
0
1
T
D
_
1
[Y () Y
f
()]
_
d (deviation var.s)
Y
f
(s) =
1
s
1
T
D
1
[Y (s) Y
f
(s)] =
1
s
1
T
D
L
_
T
D
dY
f
(t)
dt
_
Chen CL 10
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
T
D
dy
f
(t)
dt
=
1
(y(t) y
f
(t)) ; y
f
(t) y
f
(0) =
_
t
0
1
T
D
_
T
D
dy
f
()
d
_
d
Chen CL 11
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
% PD control
plot(tout,y,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,yfuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(y(t),y(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 12
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
% PD control
subplot(5,1,1)
plot(tout,y,Color,[0,.5,0],...
linewidth,2)
ylabel(\bf y(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,2)
plot(tout,yfuture,Color,[.5,0,.5],...
linewidth,2)
ylabel(\bf y(t+T_d),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,3)
plot(tout,p,r,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,4)
plot(tout,Daction,b,linewidth,2)
ylabel(\bf D(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,5)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 13
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error e with A Lowpass Filter
Chen CL 14
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error e with A Lowpass Filter
% Series PID control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,p,r,linewidth,2)
plot(tout,ub,b,linewidth,2)
plot(tout,u,m,linewidth,2)
ylabel(\bf Series PID Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),p(t),u_b(t),u(t));
hold off
Chen CL 15
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error y with A Lowpass Filter
Chen CL 16
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error y with A Lowpass Filter
% Series PID control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,p,r,linewidth,2)
plot(tout,ub,b,linewidth,2)
plot(tout,u,m,linewidth,2)
ylabel(\bf Series PID Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),p(t),u_b(t),u(t));
hold off
Chen CL 17
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
Chen CL 18
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,efuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),e(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 19
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
Chen CL 20
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
% PD control
plot(tout,y,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,yfuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(y(t),y(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 21
Simulation of Control Instrumentation
Simulation of Series PID Controller
Chen CL 22
Simulation of Control Instrumentation
Simulation of Series PID Controller
Chen CL 23
Simulation of PID control
PI control on A Heat Exchanger
Chen CL 24
Simulation of PID control
PI control on A Heat Exchanger
Chen CL 25
Simulation of PID control
PI control on A Heat Exchanger
Chen CL 26
Thank You for Your Attention
To Be Continued
Controller Simulation
using Simulink
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Simulation of Control Instrumentation
P Control with Reset Bias (PI)
u(t) = K
c
e(t) +u
b
(t) u(0) = u
b
(0) = u
b
u(t) = T
I
du
b
(t)
dt
+u
b
(t)
du
b
(t)
dt
=
1
T
I
[u(t) u
b
(t)]
u
b
(t) =
_
t
0
1
T
I
[u() u
b
()] d +u
b
(0)
=
_
t
0
1
T
I
[(u() u(0)) (u
b
() u
b
(0))] d +u
b
(0)
U
b
(t) =
_
t
0
1
T
I
[U() U
b
()] d
U
b
(s) =
1
s
1
T
I
[U(s) U
b
(s)]
Chen CL 2
Simulation of Control Instrumentation
Simulation of PI Controller
u(t) = K
c
e(t) +u
b
(t); u
b
(t) u
b
(0) =
_
t
0
1
T
I
[u() u
b
()] d
Chen CL 3
Simulation of Control Instrumentation
Simulation of PI Controller
% P control with reset bias
plot(tout,p,m,linewidth,2)
hold on
plot(tout,ub,b,linewidth,2)
plot(tout,u,r,linewidth,2)
ylabel(\bf PI Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(p(t),u_b(t),u(t));
hold off
Chen CL 4
Simulation of Control Instrumentation
Simulation of PI Controller
% P control with reset bias
subplot(3,1,1)
plot(tout,p,m,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(3,1,2)
plot(tout,ub,b,linewidth,2)
ylabel(\bf u_b(t),fontsize,14);
set(gca,linewidth,3);
subplot(3,1,3)
plot(tout,u,r,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 5
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
u(t) = K
c
e(t +T
D
) +u
b
K
c
_
e(t) +T
D
de(t)
dt
_
+u
b
u(t) = K
c
_
e(t) +T
D
de
f
(t)
dt
_
+u
b
e(t) = T
D
de
f
(t)
dt
+e
f
(t) T
D
de
f
(t)
dt
=
1
[e(t) e
f
(t)]
e
f
(t) =
_
t
0
1
T
D
_
T
D
de
f
()
d
_
d +e
f
(0)
. .
=0
=
_
t
0
1
T
D
_
1
[e() e
f
()]
_
d +e
f
(0)
. .
=0
or E
f
(t) =
_
t
0
1
T
D
_
1
[E() E
f
()]
_
d (deviation var.s)
E
f
(s) =
1
s
1
T
D
1
[E(s) E
f
(s)] =
1
s
1
T
D
L
_
T
D
dE
f
(t)
dt
_
Chen CL 6
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
T
D
de
f
(t)
dt
=
1
(e(t) e
f
(t)) ; e
f
(t) e
f
(0) =
_
t
0
1
T
D
_
T
D
de
f
()
d
_
d
Chen CL 7
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,efuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),e(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 8
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
subplot(5,1,1)
plot(tout,e,Color,[0,.5,0],...
linewidth,2)
ylabel(\bf e(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,2)
plot(tout,efuture,Color,[.5,0,.5],...
linewidth,2)
ylabel(\bf e(t+T_d),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,3)
plot(tout,p,r,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,4)
plot(tout,Daction,b,linewidth,2)
ylabel(\bf D(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,5)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 9
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Measurement y with A Lowpass Filter
u(t) = K
c
e(t +T
D
) +u
b
K
c
_
y
sp
_
y(t) +T
D
dy(t)
dt
__
+u
b
u(t) = K
c
_
y
sp
_
y(t) +T
D
dy
f
(t)
dt
__
+u
b
y(t) = T
D
dy
f
(t)
dt
+y
f
(t) T
D
dy
f
(t)
dt
=
1
[y(t) y
f
(t)]
y
f
(t) =
_
t
0
1
T
D
_
T
D
dy
f
()
d
_
d +y
f
(0)
=
_
t
0
1
T
D
_
1
[y() y
f
()]
_
d +y
f
(0)
or Y
f
(t) =
_
t
0
1
T
D
_
1
[Y () Y
f
()]
_
d (deviation var.s)
Y
f
(s) =
1
s
1
T
D
1
[Y (s) Y
f
(s)] =
1
s
1
T
D
L
_
T
D
dY
f
(t)
dt
_
Chen CL 10
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
T
D
dy
f
(t)
dt
=
1
(y(t) y
f
(t)) ; y
f
(t) y
f
(0) =
_
t
0
1
T
D
_
T
D
dy
f
()
d
_
d
Chen CL 11
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
% PD control
plot(tout,y,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,yfuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(y(t),y(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 12
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
% PD control
subplot(5,1,1)
plot(tout,y,Color,[0,.5,0],...
linewidth,2)
ylabel(\bf y(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,2)
plot(tout,yfuture,Color,[.5,0,.5],...
linewidth,2)
ylabel(\bf y(t+T_d),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,3)
plot(tout,p,r,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,4)
plot(tout,Daction,b,linewidth,2)
ylabel(\bf D(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,5)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 13
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error e with A Lowpass Filter
Chen CL 14
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error e with A Lowpass Filter
% Series PID control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,p,r,linewidth,2)
plot(tout,ub,b,linewidth,2)
plot(tout,u,m,linewidth,2)
ylabel(\bf Series PID Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),p(t),u_b(t),u(t));
hold off
Chen CL 15
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error y with A Lowpass Filter
Chen CL 16
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error y with A Lowpass Filter
% Series PID control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,p,r,linewidth,2)
plot(tout,ub,b,linewidth,2)
plot(tout,u,m,linewidth,2)
ylabel(\bf Series PID Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),p(t),u_b(t),u(t));
hold off
Chen CL 17
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
Chen CL 18
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,efuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),e(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 19
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
Chen CL 20
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
% PD control
plot(tout,y,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,yfuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(y(t),y(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 21
Thank You for Your Attention
To Be Continued
Controller Simulation
using Simulink
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Simulation of Control Instrumentation
P Control with Reset Bias (PI)
u(t) = K
c
e(t) +u
b
(t) u(0) = u
b
(0) = u
b
u(t) = T
I
du
b
(t)
dt
+u
b
(t)
du
b
(t)
dt
=
1
T
I
[u(t) u
b
(t)]
u
b
(t) =
_
t
0
1
T
I
[u() u
b
()] d +u
b
(0)
=
_
t
0
1
T
I
[(u() u(0)) (u
b
() u
b
(0))] d +u
b
(0)
U
b
(t) =
_
t
0
1
T
I
[U() U
b
()] d
U
b
(s) =
1
s
1
T
I
[U(s) U
b
(s)]
Chen CL 2
Simulation of Control Instrumentation
Simulation of PI Controller
u(t) = K
c
e(t) +u
b
(t); u
b
(t) u
b
(0) =
_
t
0
1
T
I
[u() u
b
()] d
Chen CL 3
Simulation of Control Instrumentation
Simulation of PI Controller
% P control with reset bias
plot(tout,p,m,linewidth,2)
hold on
plot(tout,ub,b,linewidth,2)
plot(tout,u,r,linewidth,2)
ylabel(\bf PI Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(p(t),u_b(t),u(t));
hold off
Chen CL 4
Simulation of Control Instrumentation
Simulation of PI Controller
% P control with reset bias
subplot(3,1,1)
plot(tout,p,m,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(3,1,2)
plot(tout,ub,b,linewidth,2)
ylabel(\bf u_b(t),fontsize,14);
set(gca,linewidth,3);
subplot(3,1,3)
plot(tout,u,r,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 5
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
u(t) = K
c
e(t +T
D
) +u
b
K
c
_
e(t) +T
D
de(t)
dt
_
+u
b
u(t) = K
c
_
e(t) +T
D
de
f
(t)
dt
_
+u
b
e(t) = T
D
de
f
(t)
dt
+e
f
(t) T
D
de
f
(t)
dt
=
1
[e(t) e
f
(t)]
e
f
(t) =
_
t
0
1
T
D
_
T
D
de
f
()
d
_
d +e
f
(0)
. .
=0
=
_
t
0
1
T
D
_
1
[e() e
f
()]
_
d +e
f
(0)
. .
=0
or E
f
(t) =
_
t
0
1
T
D
_
1
[E() E
f
()]
_
d (deviation var.s)
E
f
(s) =
1
s
1
T
D
1
[E(s) E
f
(s)] =
1
s
1
T
D
L
_
T
D
dE
f
(t)
dt
_
Chen CL 6
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
T
D
de
f
(t)
dt
=
1
(e(t) e
f
(t)) ; e
f
(t) e
f
(0) =
_
t
0
1
T
D
_
T
D
de
f
()
d
_
d
Chen CL 7
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,efuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),e(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 8
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
subplot(5,1,1)
plot(tout,e,Color,[0,.5,0],...
linewidth,2)
ylabel(\bf e(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,2)
plot(tout,efuture,Color,[.5,0,.5],...
linewidth,2)
ylabel(\bf e(t+T_d),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,3)
plot(tout,p,r,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,4)
plot(tout,Daction,b,linewidth,2)
ylabel(\bf D(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,5)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 9
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Measurement y with A Lowpass Filter
u(t) = K
c
e(t +T
D
) +u
b
K
c
_
y
sp
_
y(t) +T
D
dy(t)
dt
__
+u
b
u(t) = K
c
_
y
sp
_
y(t) +T
D
dy
f
(t)
dt
__
+u
b
y(t) = T
D
dy
f
(t)
dt
+y
f
(t) T
D
dy
f
(t)
dt
=
1
[y(t) y
f
(t)]
y
f
(t) =
_
t
0
1
T
D
_
T
D
dy
f
()
d
_
d +y
f
(0)
=
_
t
0
1
T
D
_
1
[y() y
f
()]
_
d +y
f
(0)
or Y
f
(t) =
_
t
0
1
T
D
_
1
[Y () Y
f
()]
_
d (deviation var.s)
Y
f
(s) =
1
s
1
T
D
1
[Y (s) Y
f
(s)] =
1
s
1
T
D
L
_
T
D
dY
f
(t)
dt
_
Chen CL 10
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
T
D
dy
f
(t)
dt
=
1
(y(t) y
f
(t)) ; y
f
(t) y
f
(0) =
_
t
0
1
T
D
_
T
D
dy
f
()
d
_
d
Chen CL 11
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
% PD control
plot(tout,y,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,yfuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(y(t),y(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 12
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
% PD control
subplot(5,1,1)
plot(tout,y,Color,[0,.5,0],...
linewidth,2)
ylabel(\bf y(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,2)
plot(tout,yfuture,Color,[.5,0,.5],...
linewidth,2)
ylabel(\bf y(t+T_d),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,3)
plot(tout,p,r,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,4)
plot(tout,Daction,b,linewidth,2)
ylabel(\bf D(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,5)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 13
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error e with A Lowpass Filter
Chen CL 14
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error e with A Lowpass Filter
% Series PID control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,p,r,linewidth,2)
plot(tout,ub,b,linewidth,2)
plot(tout,u,m,linewidth,2)
ylabel(\bf Series PID Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),p(t),u_b(t),u(t));
hold off
Chen CL 15
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error y with A Lowpass Filter
Chen CL 16
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error y with A Lowpass Filter
% Series PID control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,p,r,linewidth,2)
plot(tout,ub,b,linewidth,2)
plot(tout,u,m,linewidth,2)
ylabel(\bf Series PID Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),p(t),u_b(t),u(t));
hold off
Chen CL 17
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
Chen CL 18
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,efuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),e(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 19
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
Chen CL 20
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error y with A Lowpass Filter
% PD control
plot(tout,y,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,yfuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(y(t),y(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 21
Thank You for Your Attention
To Be Continued
Process Dynamics
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Process Dynamics
You have to understand your process
before you can control it (Luyben)
Nonlinear Dynamic Models:
No standard forms: large number of varieties
No standard solutions for control design
Linear Dynamic Models:
Standard forms: basic elements and their combinations
Typical standard solutions for control design
Additional modeling errors
Chen CL 2
Modeling A Process Dynamics: Basic Steps
Process
physical laws assumpitons
Nonlinear (Unsteady) Balance Equations
linearization (why?/how?)
Linear Dierential Equations; ICs = 0
deviation variables (why?/how?)
Linear Dierential Equations; ICs = 0
Laplace Transform (why?/how?)
Transfer
Function
Chen CL 3
Basic Dynamic Element (1):
FirstOrder Lag
One Simple Liquid Tank
Chen CL 4
Flow Through A Linear Valve
q(t) = C
v
max
x
_
p
g
r
= C
v
max
x
gh(t)
144g
c
g
r
(gpm)
C
v
max
: valve coecient (gpm/
psi)
x : valve position, x = x [0, 1]
, g
r
: density(b
m
/ft
3
); specic gravity
g, g
c
: 32.2(ft/sec
2
; b
m
ft/sec
2
/b
f
)
h(t) : liquid height in tank (ft)
p
_
lb
f
in
2
_
=
_
lb
m
ft
3
_
32.2
_
ft
sec
2
_
h(t) (ft)
. .
lb
m
ftsec
2
1 lb
f
32.2
lb
m
ft
sec
2
. .
lb
f
ft
2
1 ft
2
144 in
2
. .
lb
f
in
2
Chen CL 5
Mass Balance
dm(t)
dt
=
d(Ah(t))
dt
= q
i
(t) q(t)
= [q
i
(t) q(t)] (
gal
min
) (
b
m
ft
3
)
1 ft
3
7.48 gal
7.48A
dh(t)
dt
= q
i
(t) q(t)
= q
i
(t) C
v
max
x
_
gh(t)
144g
c
g
r
Chen CL 6
Problem: solve h(t), q(t) in response to q
i
:
Rigorous method: analytical/numerical solution
Simplied solution: linearization
Linear nature of local control system
Standard models standard solutions
Chen CL 7
Response of h(t) to Step q
i
Change
Initial steady state:
A = 30 ft
2
h
tot
= 10 ft
q
i
= 10 gpm x = 0.5
h = 5 ft
q(t) = C
v
max
x
_
gh(t)
144g
c
g
r
= C
v
_
h(t)
C
v
=
q
h
=
10
5
= 4.472
gpm
ft
C
v
max
=
q
i
x
_
gh
144g
c
g
r
= 13.6
gmp
psi
(
water
= 62.37
lb
m
ft
3
)
7.48(30)
dh(t)
dt
= q
i
(t) 4.472
_
h(t) h
ini
= h = 5 ft
Chen CL 8
Step change in input rate q
i
:
q
i
= 10 = q
i
= 10 + q
i
(q
i
= 0.1, 1.0)
Approximate step response of liquid level(s):
(numerical solution of this exact nonlinear ODE)
New steady state: h
new
=
_
q
i
new
C
v
_
2
q
i
q
i
new
h
new
+1.0 11.0 6.05
+0.1 10.1 5.10
0.1 9.90 4.90
1.0 9.00 4.05
Chen CL 9
7.48(30)
dh(t)
dt
= q
i
(t) 4.472
_
h(t)
Chen CL 10
% Response to step changes in input rate
plot(dt,h110,m,linewidth,2)
hold on
plot(dt,h101,b,linewidth,2)
plot(dt,h990,r,linewidth,2)
plot(dt,h900,Color,[0,.5,0],linewidth,2)
ylabel(\bf h(t),Fontsize,14);
xlabel(\bf t (min),Fontsize,14);
title(\bf Step Response to q_i,Fontsize,14)
set(gca,linewidth,3);
legend(q_i(t)=11,q_i(t)=10.1,q_i(t)=9.9,q_i(t)=9);
hold off
Chen CL 11
Linearize Nonlinear Term Around A Steady State:
h, x, q
i
= q
q(h(t)) = C
v
max
x
_
gh(t)
144g
c
g
r
= C
v
_
h(t) (nonlinear to h)
= q(h)
h=h
. .
point app
+
dq(h)
dh
h=h
_
h h
_
. .
linear: accuracy/simplicity compromise
+
1
2!
d
2
q(h)
dh
2
h=h
_
h h
_
2
. .
quadratic approximation: nonlinear again !
+
. .
exact equivalence
= q
..
point app
+
1
2
C
v
h
1/2
_
h h
_
. .
linear: accuracy/simplicity compromise
+
1
2!
_
1
4
_
C
v
h
3/2
_
h h
_
2
. .
quadratic approximation: nonlinear again !
+
. .
exact equivalence
q
..
point app
+
1
2
q
h
_
h h
_
. .
linear: accuracy/simplicity compromise
= q + R
_
h h
_
Chen CL 12
Linear Dynamic Balance Relation
7.48A
dh(t)
dt
= q
i
(t)
_
q +R
_
h(t) h
_
7.48A
R
dh(t)
dt
+
_
h(t) h
_
=
1
R
..
K
(q
i
(t) q) q
i
(0) = q
Chen CL 13
Exact Step Response of Liquid Level(s)
( analytical solution of the approximate linear ODE)
7.48A
R
dh(t)
dt
+
_
h(t) h
_
= K (q
i
(t) q) q
i
(0) = q
q
i
(t) = q + q
i
h(t) = h +Kq
i
_
1 e
t/(7.48A/R)
where K =
1
R
=
2h
q
=
2 5
10
= 1
ft
gpm
new steady state: h
new
= h +Kq
i
= h + 1 q
i
K
_
ft
gpm
_
: process gain
(change of level per unit change in input rate)
Chen CL 14
g110 = 5 + 1.0*(1exp(dt/7.48/30));
g101 = 5 + 0.1*(1exp(dt/7.48/30));
g990 = 5  0.1*(1exp(dt/7.48/30));
g900 = 5  1.0*(1exp(dt/7.48/30));
% Response to step changes in input rate
plot(dt,g110,m,linewidth,2)
hold on
plot(dt,g101,b,linewidth,2)
plot(dt,g990,r,linewidth,2)
plot(dt,g900,Color,[0,.5,0],linewidth,2)
ylabel(\bf h(t),Fontsize,14);
xlabel(\bf t (min),Fontsize,14);
title(\bf Step Response to q_i,Fontsize,14)
set(gca,linewidth,3);
legend(q_i(t)=11,q_i(t)=10.1,q_i(t)=9.9,q_i(t)=9);
hold off
q
i
q
i
new
h
new
h
new, true
+1.0 11.0 6.00 6.05
+0.1 10.1 5.10 5.10
0.1 9.90 4.90 4.90
1.0 9.00 4.00 4.05
Chen CL 15
Deviation Variables: (why and how ?)
Variables: q
i
(t), h(t),
dh(t)
dt
Q
i
(t), H(t),
dH(t)
dt
(1) 7.48A
dh(t)
dt
= q
i
(t) q(t)
q
i
(t)
_
q +R
_
h(t) h
_
(2) 7.48A
dh
dt
= q
i
q = 0
(1) (2) 7.48A
d(h(t)h)
dt
= q
i
(t) q
i
__
q +R
_
h(t) h
_
q
_
= q
i
(t) q
i
. .
Q
i
(t)
R
_
h(t) h
_
. .
H(t)
7.48A
dH(t)
dt
= Q
i
(t) RH(t)
Chen CL 16
(min)
..
7.48(gal/ft
3
) A(ft
2
)
R(gal/min/ft)
dH(t)
dt
+H(t) =
K (ft/gal/min)
..
1
R (gal/min/ft)
Q
i
(t)
(min)
dH(t)
dt
+H(t) = K (ft/gal/min)Q
i
(t)
Chen CL 17
Laplace Transform (another representation)
Variables: Q
i
(t), H(t),
dH(t)
dt
Q
i
(s), H(s)
dH(t)
dt
+ H(t) = KQ
i
(t)
dH(t)
dt
e
st
+ H(t) e
st
= KQ
i
(t) e
st
_
0
dH(t)
dt
e
st
dt
. .
? sH(s) ?
+
_
0
H(t) e
st
dt
. .
H(s)
= K
_
0
Q
i
(t) e
st
dt
. .
Q
i
(s)
s H(s) + H(s) = KQ
i
(s)
( s + 1)H(s) = KQ
i
(s)
H(s) =
K
s + 1
Q
i
(s)
q(t) q
. .
Q(t)
= R
_
h(t) h
_
. .
H(t)
(R =
1
K
)
Q(t) = RH(t)
R=1/K
= Q(s) = RH(s) =
1
s + 1
Q
i
(s)
Chen CL 18
Transfer Functions
G
1
(s) =
H(s)
Q
i
(s)
=
K
s + 1
G
3
(s) =
Q(s)
Q
i
(s)
=
1
s + 1
Chen CL 19
Step Response:
q
i
(t) = q
i
+ q
i
for t 0
Q
i
(t) = q
i
for t 0
Q
i
(s) =
q
i
s
H(s) =
H(s)
Q
i
(s)
Q
i
(s) =
K
s + 1
q
i
s
= Kq
i
_
1
s
s+1
_
H(t) = Kq
i
_
1 e
t/
= h(t) h
Q(s) = RH(s)
K = 1/R
=
1
s + 1
q
i
s
= (q
i
)
_
1
s
s + 1
_
Q(t) = (q
i
)
_
1 e
t/
= q(t) q
Chen CL 20
Note: K : (steadystate) gain, : time constant
t = H() = Kq
i
t = H() = Kq
i
(1 e
1
) = 0.632Kq
i
t = 2 H(2) = Kq
i
(1 e
2
) = 0.865Kq
i
t = 3 H(3) = Kq
i
(1 e
3
) = 0.950Kq
i
t = 0 H
(0) =
Kq
i
(max slope)
Chen CL 21
Pulse Response:
Q
i
(t) = AU
nit
(t) AU
nit
(t T) (two steps)
Q
i
(s) =
A
s
_
1 e
Ts
_
H(s) =
K
s + 1
A
s
_
1 e
Ts
_
=
K
s + 1
A
s
K
s+1
A
s
e
Ts
H(t) = KA
_
1 e
t/
_
U
nit
(t)
KA
_
1 e
(tT)/
_
U
nit
(t T)
Chen CL 22
Impulse Response:
Q
i
(t) = (t 0) Q
i
(s) = 1
H(s) =
K
s + 1
1
H(t) =
K
e
t/
=
1
_
K K
_
1 e
t/
_
=
1
_
K H(t)
unit step
Chen CL 23
Sinusoidal Response
Q
i
(t) = Asin(t) Q
i
(s) =
A
s
2
+
2
H(s) =
K
s + 1
A
s
2
+
2
H(t) = KA
_
2
+ 1
e
t/
+
sin(t +)
2
+ 1
_
[ = arctan()]
t
KA
2
+ 1
sin(t +)
=
KA
2
+ 1
sin[(t t)]
_
t =
arctan()
_
Amplitude Ratio (AR):
H(t)
max
Q
i
(t)
max
=
K
2
+1
Phase Lag: = arctan()
Chen CL 24
Chen CL 25
Basic Dynamic Element (2):
Overdamped 2ndOrder Lag
Two NonInteractive Tanks
Chen CL 26
Nonlinear Dynamic Relations
Tank 1: 7.48A
1
dh
1
(t)
dt
= q
i
(t) C
1
v
max
x
1
_
gh
1
(t)
144g
c
g
r
= q
i
(t) C
1
v
_
h
1
(t)
Tank 2: 7.48A
2
dh
2
(t)
dt
= C
1
v
max
x
1
_
gh
1
(t)
144g
c
g
r
C
2
v
max
x
2
_
gh
2
(t)
144g
c
g
r
= C
1
v
_
h
1
(t) C
2
v
_
h
2
(t)
Chen CL 27
Response of h
1
(t) and h
2
(t) to q
i
Initial steady state:
A
1
= A
2
= 30 ft
2
h
1
tot
= h
2
tot
= 10 ft q
i
= 10 gpm
x
1
= x
2
= 0.5 h
1
= h
2
= 5 ft
C
v
1
= C
v
2
= 4.472
gpm
ft
Tank 1: 7.48A
1
dh
1
(t)
dt
= q
i
(t) C
1
v
_
h
1
(t)
= q
i
(t) 4.472
_
h
1
(t)
Tank 2: 7.48A
2
dh
2
(t)
dt
= C
1
v
_
h
1
(t) C
2
v
_
h
2
(t)
= 4.472
_
h
1
(t) 4.472
_
h
2
(t)
Step change in input rate:
q
i
= 10 = q
i
= 10 + q
i
(q
i
= 0.1, 1.0)
Chen CL 28
7.48(30)
dh
1
(t)
dt
= q
i
(t) 4.472
_
h
1
(t), h
1
(0) = 5 ft
7.48(30)
dh
2
(t)
dt
= 4.472
_
h
1
(t) 4.472
_
h
2
(t), h
2
(0) = 5 ft
Chen CL 29
% Response to step changes in input rate
subplot(2,1,1)
plot(dt,h1110,m,linewidth,2)
hold on
plot(dt,h1101,b,linewidth,2)
plot(dt,h1990,r,linewidth,2)
plot(dt,h1900,Color,[0,.5,0],linewidth,2)
ylabel(\bf h_1(t),Fontsize,14);
title(\bf Step Response to q_i,Fontsize,14)
set(gca,linewidth,3);
hold off
subplot(2,1,2)
plot(dt,h2110,m,linewidth,2)
hold on
plot(dt,h2101,b,linewidth,2)
plot(dt,h2990,r,linewidth,2)
plot(dt,h2900,Color,[0,.5,0],linewidth,2)
ylabel(\bf h_2(t),Fontsize,14);
xlabel(\bf t (min),Fontsize,14);
set(gca,linewidth,3);
legend(q_i(t)=11,q_i(t)=10.1,q_i(t)=9.9,q_i(t)=9);
hold off
Chen CL 30
Linearized Dynamic Relations and Deviation
Variables
Tank 1: 7.48A
1
dh
1
(t)
dt
= q
i
(t)
_
q
1
+R
1
_
h
1
(t) h
1
_
R
1
=
1
2
q
1
h
1
Tank 2: 7.48A
2
dh
2
(t)
dt
=
_
q
1
+R
1
_
h
1
(t) h
1
_
_
q
2
+R
2
_
h
2
(t) h
2
_
Tank 1:
1
dH
1
(t)
dt
+H
1
(t) =
K
1
..
1
R
1
Q
i
(t); Q
1
(t) = R
1
H
1
(t)
Tank 2:
2
dH
2
(t)
dt
+H
2
(t) =
R
1
R
2
H
1
(t) =
K
2
..
1
R
2
Q
1
(t); Q
2
(t) = R
2
H
2
(t)
Chen CL 31
Step Response to q
i
H
1
(t) = K
1
q
i
_
1 e
t/
1
H
2
(t) =
_
_
K
2
q
i
_
1
1
2
e
t/
1
1
e
t/
2
_
for
1
=
2
K
2
q
i
_
1
_
1 +
t
_
e
t/
_
for
1
=
2
Chen CL 32
Response of h
1
(t) and h
2
(t) to q
i
Initial steady state:
A
1
= A
2
= 30 ft
2
h
1
tot
= h
2
tot
= 10 ft q
i
= 10 gpm
x
1
= x
2
= 0.5 h
1
= h
2
= 5 ft
C
v
1
= C
v
2
= 4.472
gpm
ft
K
1
= K
2
=
1
R
1,2
= 1
ft
gpm
Step change in input rate:
q
i
= 10 = q
i
= 10 + q
i
(q
i
= 0.1, 1.0)
g1110 = 5 + 1.0*(1exp(dt/7.48/30));
g1101 = 5 + 0.1*(1exp(dt/7.48/30));
g1990 = 5  0.1*(1exp(dt/7.48/30));
g1900 = 5  1.0*(1exp(dt/7.48/30));
g2110 = 5 + 1.0*(1(1+dt/7.48/30).*exp(dt/7.48/30));
g2101 = 5 + 0.1*(1(1+dt/7.48/30).*exp(dt/7.48/30));
g2990 = 5  0.1*(1(1+dt/7.48/30).*exp(dt/7.48/30));
g2900 = 5  1.0*(1(1+dt/7.48/30).*exp(dt/7.48/30));
Chen CL 33
% Response to step changes in input rate
subplot(2,1,1)
plot(dt,g1110,m,linewidth,2)
hold on
plot(dt,g1101,b,linewidth,2)
plot(dt,g1990,r,linewidth,2)
plot(dt,g1900,Color,[0,.5,0],linewidth,2)
ylabel(\bf h_1(t),Fontsize,14);
title(\bf Step Response to q_i,Fontsize,14)
set(gca,linewidth,3);
hold off
subplot(2,1,2)
plot(dt,g2110,m,linewidth,2)
hold on
plot(dt,g2101,b,linewidth,2)
plot(dt,g2990,r,linewidth,2)
plot(dt,g2900,Color,[0,.5,0],linewidth,2)
ylabel(\bf h_2(t),Fontsize,14);
xlabel(\bf t (min),Fontsize,14);
set(gca,linewidth,3);
legend(q_i(t)=11,q_i(t)=10.1,q_i(t)=9.9,q_i(t)=9);
hold off
Chen CL 34
Laplace Transform
Tank 1:
1
s H
1
(s) +H
1
(s) = K
1
Q
i
(s)
H
1
(s) =
K
1
1
s + 1
Q
i
(s)
Q
1
(s) = R
1
H
1
(s)
Tank 2:
2
s H
2
(s) +H
2
(s) = K
2
Q
1
(s)
H
2
(s) =
K
2
2
s + 1
Q
1
(s)
=
K
2
2
s + 1
R
1
H
1
(s)
=
K
2
2
s + 1
R
1
K
1
1
s+1
Q
i
(s)
=
K
2
(
1
s + 1) (
2
s + 1)
Q
i
(s)
Q
2
(s) = R
2
H
2
(s)
Chen CL 35
Block Diagram
Chen CL 36
Step Response (Case 1:
1
=
2
; Case 2:
1
=
2
= )
Case 1:
1
=
2
H
2
(s) =
q
i
s
K
2
(
1
s + 1) (
2
s + 1)
= K
2
q
i
_
1
s
1
s+1
2
s+1
_
H
2
(t) = K
2
q
i
_
1
1
2
e
t/
1
1
e
t/
2
_
Case 2:
1
=
2
=
H
2
(s) =
q
i
s
K
2
(s + 1)
2
= K
2
q
i
_
1
s
s + 1
(s+1)
2
_
H
2
(t) = K
2
q
i
_
1
_
1 +
t
_
e
t/
_
Chen CL 37
Basic Dynamic Element (3):
Overdamped 2ndOrder Lag
Two Interactive Tanks
Chen CL 38
Flow Through Two Valves
q
1
(t) = C
1
v
max
x
1
_
p
1
(t)
g
r
= C
v
1
_
h
1
(t) h
2
(t) (gpm)
q
2
(t) = C
2
v
max
x
2
_
p
2
(t)
g
r
= C
v
2
_
h
2
(t) (gpm)
Mass Balance ( = const.)
Tank 1: 7.48A
1
dh
1
(t)
dt
= q
i
(t) q
1
(t)
= q
i
(t) C
v
1
_
h
1
(t) h
2
(t)
Tank 2: 7.48A
2
dh
2
(t)
dt
= q
1
(t) q
2
(t)
= C
v
1
_
h
1
(t) h
2
(t) C
v
2
_
h
2
(t)
Chen CL 39
Response of h
1
(t) and h
2
(t) to q
i
Initial steady state: (same as before)
h
1
= 7 ft h
2
= 3 ft
C
v
1
=
q
_
h
1
h
2
=
10
7 3
= 5
gmp
ft
C
v
2
=
q
_
h
2
=
10
3
= 5.77
gmp
ft
Level(s) responses to step inputrate change:
(approximated solution of nonlinear ODEs)
q
i
(t) = 10 + q
i
h
2
new
=
_
q
i
new
C
v
2
_
2
h
1
new
=
_
q
i
new
C
v
1
_
2
+h
2
new
q
i
q
i
new
h
2
new
h
1
new
+1.0 11.0 3.63 8.47
+0.1 10.1 3.06 7.14
0.1 9.90 2.94 6.86
1.0 9.00 2.43 5.67
Chen CL 40
7.48(30)
dh
1
(t)
dt
= q
i
(t) 5
_
h
1
(t) h
2
(t), h
1
(0) = 7 ft
7.48(30)
dh
2
(t)
dt
= 5
_
h
1
(t) h
2
(t) 5.77
_
h
2
(t), h
2
(0) = 3 ft
Chen CL 41
% Response to step changes in input rate
subplot(2,1,1)
plot(dt,h1110,m,linewidth,2)
hold on
plot(dt,h1101,b,linewidth,2)
plot(dt,h1990,r,linewidth,2)
plot(dt,h1900,Color,[0,.5,0],linewidth,2)
ylabel(\bf h_1(t),Fontsize,14);
title(\bf Step Response to q_i,Fontsize,14)
set(gca,linewidth,3);
hold off
subplot(2,1,2)
plot(dt,h2110,m,linewidth,2)
hold on
plot(dt,h2101,b,linewidth,2)
plot(dt,h2990,r,linewidth,2)
plot(dt,h2900,Color,[0,.5,0],linewidth,2)
ylabel(\bf h_2(t),Fontsize,14);
xlabel(\bf t (min),Fontsize,14);
set(gca,linewidth,3);
legend(q_i(t)=11,q_i(t)=10.1,q_i(t)=9.9,q_i(t)=9);
hold off
Chen CL 42
Linearization around a steady state
Tank 1: 7.48A
1
dh
1
(t)
dt
= q
i
(t) C
v
1
_
h
1
(t) h
2
(t)
q
i
(t)
_
q
1
+R
1
_
(h
1
(t) h
2
(t))
_
h
1
h
2
__
7.48A
1
dh
1
dt
= q
i
q
1
= 0
7.48A
1
d(h
1
(t)h
1
)
dt
= q
i
(t) q
i
R
1
__
h
1
(t) h
1
_
_
h
2
(t) h
2
_
DV
7.48A
1
dH
1
(t)
dt
= Q
i
(t) R
1
[H
1
(t) H
2
(t)]
Tank 2: 7.48A
2
dh
2
(t)
dt
= C
v
1
_
h
1
(t) h
2
(t) C
v
2
_
h
2
(t)
_
q
1
+R
1
_
(h
1
(t) h
2
(t))
_
h
1
h
2
__
_
q
2
+R
2
_
h
2
(t) h
2
__
7.48A
2
dh
2
dt
= q
1
q
2
= 0
7.48A
2
d(h
2
(t)h
2
)
dt
= R
1
__
h
1
(t) h
1
_
_
h
2
(t) h
2
_
R
2
_
h
2
(t) h
2
_
DV
7.48A
2
dH
2
(t)
dt
= R
1
[H
1
(t) H
2
(t)] R
2
H
2
(t)
= R
1
H
1
(t) (R
1
+R
2
) H
2
(t)
Chen CL 43
1
..
7.48A
1
R
1
dH
1
(t)
dt
+H
1
(t) =
K
1
..
1
R
1
Q
i
(t) +H
2
(t)
7.48A
2
R
1
+R
2
. .
2
dH
2
(t)
dt
+H
2
(t) =
R
1
R
1
+R
2
. .
K
2
H
1
(t)
1
dH
1
(t)
dt
+H
1
(t) = K
1
Q
i
(t) +H
2
(t)
2
dH
2
(t)
dt
+H
2
(t) = K
2
H
1
(t)
Chen CL 44
Response of h
1
(t) and h
2
(t) to q
i
Initial steady state: (same as before)
R
1
=
q
2(h
1
h
2
)
=
10
2(7 3)
= 1.25
gmp
ft
R
2
=
q
2h
2
=
10
2 3
= 1.67
gmp
ft
Level(s) responses to step inputrate change:
(approximated solution of nonlinear ODEs)
q
i
(t) = 10 + q
i
h
2
new
= 3 +
q
i
R
2
..
H
2
h
1
new
= 7 +
q
i
R
1
+ (h
2
new
h
2
)
Chen CL 45
q
i
q
i
new
h
2
new
h
1
new
h
2
new,true
h
1
new,true
+1.0 11.0 3.59 8.39 3.63 8.47
+0.1 10.1 3.06 7.14 3.06 7.14
0.1 9.90 2.94 6.86 2.94 6.86
1.0 9.00 2.40 5.60 2.43 5.67
Chen CL 46
Laplace Transform (Overdamped)
1
dH
1
(t)
dt
+H
1
(t) = K
1
Q
i
(t) +H
2
(t)
2
dH
2
(t)
dt
+H
2
(t) = K
2
H
1
(t)
1
sH
1
(s) +H
1
(s) = K
1
Q
i
(s) +H
2
(s)
2
sH
2
(s) +H
2
(s) = K
2
H
1
(s)
H
1
(s) =
K
1
1
s + 1
Q
i
(s) +
1
1
s + 1
H
2
(s)
H
2
(s) =
K
2
2
s + 1
H
1
(s)
Chen CL 47
H
2
(s) =
K
1
K
2
(
1
s+1)(
2
s+1)
1
K
2
(
1
s+1)(
2
s+1)
Q
i
(s)
=
K
1
K
2
1K
2
2
1K
2
s
2
+
1
+
2
1K
2
s+1
Q
i
(s)
=
K
2
s
2
+ 2s + 1
Q
i
(s)
=
_
1
2
1K
2
n
=
1
2
_
1K
2
1
+
2
1K
2
=
1
2
1K
2
1
+
2
2
> 1
Chen CL 48
Response(s) to Step Change in Input Rate
q
i
(t) = q
i
+ q
i
Q
i
(s) =
q
i
s
H
2
(s) =
K
2
s
2
+ 2s + 1
q
i
s
=
q
i
s
_
_
K
2
s
2
+ 2s + 1
for < 1
K
(s + 1)
2
for = 1
K
(T
1
s + 1)(T
2
s + 1)
for > 1
_
T
1,2
=
2
1
_
H
2
(t) = K(q
i
)
_
_
_
1
e
t/
_
1
2
sin
_
_
1
2
t/ + arctan
_
1
2
__
_
_
1
_
1 +
t
_
e
t/
_
_
1
T
1
T
1
T
2
e
t/T
1
T
2
T
2
T
1
e
t/T
2
_
Chen CL 49
Basic Dynamic Element (4):
Integrator
A Liquid Level Process
Chen CL 50
7.48A
dh(t)
dt
= q
i
(t) q(t) = f(h)
S.S.: 7.48A
dh
dt
= q
i
q = 0
7.48A
d(h(t)h)
dt
= (q
i
(t) q
i
)
. .
Q
i
(t)
(q(t) q)
. .
Q(t)
D.V.: 7.48A
dH(t)
dt
= Q
i
Q(t)
H(t) =
1
7.48A
. .
K
_
t
0
[Q
i
() Q()] d
L.T.: H(s) = K
Q
i
(s) Q(s)
s
=
K
s
[Q
i
(s) Q(s)]
Chen CL 51
Dynamic Behavior with Recycle Structures
A Reactor with FeedEuent Heat Exchanger
Transfer Functions
T
3
(s) =
K
1
1
s + 1
T
0
(s) +
K
2
2
s + 1
T
4
(s)
G
H1
(s)T
0
(s) +G
H2
(s)T
4
(s)
T
4
(s) =
K
R
R
s + 1
T
3
(s) G
R
(s)T
3
(s)
let: G
R
(s) =
3
10s + 1
G
H1
(s) = 0.40
G
H2
(s) =
_
0.30 (with recycle)
0 (without recycle)
Chen CL 52
T
4
(s)
T
0
(s)
=
G
R
(s)G
H1
(s)
1 G
R
(s)G
H2
(s)
=
_
_
_
3
10s+1
_
(0.40)
1
_
3
10s+1
_
(0.30)
=
(3) (0.4)
10s + (1 3 0.3)
=
12
100s + 1
(recycle)
_
3
10s+1
_
(0.40)
1
_
3
10s+1
_
(0)
=
1.20
10s + 1
(no recycle)
Note:
Dramatic eect (10 times) of recycle on
steadystate gain (1.2 12) and
time constant (10 100)
Chen CL 53
the recycle has created an inherent positive feedback
in the process
Dynamic Responses for A 2
o
C Step in T
0
Chen CL 54
Features of Step Response
of 2ndOrder Underdamping Systems
Introduction
Most (openloop) chemical process dynamics are overdamped in
nature
Desired closedloop step response: underdamping
2ndorder underdamping system
Chen CL 55
Typical ClosedLoop Step Response (R(t) = A, K = 1?)
Y (s)
R(s)
=
K
(s)
2
+ 2(s) + 1
, R(s) =
A
s
, ( < 1)
Y (t) = KA
_
1
e
t/
_
1
2
sin
_
_
1
2
t/ + arctan
_
1
2
__
_
Chen CL 56
Rising Time: t
R
At t = t
R
Y (t
R
) = A sin() = 0
m =
_
1
2
t/ + arctan
_
1
2
_
t
R
=
arctan
_
1
2
_
_
1
2
Chen CL 57
Peak Time: t
P
At t = t
P
Y (t
P
) reaches its maximum
0 =
dY (t)
dt
=
A
_
e
t
P
/
1
2
sin
_
_
1
2
t
P
/ +
_
e
t
P
/
cos
_
_
1
2
t
P
/ +
__
_
1
2
= tan
_
_
1
2
t
P
/ +
_
arctan
_
_
1
2
_
. .
+n =
_
1
2
t
P
/ +
t
P
=
_
1
2
Chen CL 58
Period: T
p
T
p
= 2t
P
=
2
_
1
2
or
T
p
=
2
_
1
2
Overshoot: OS
OS =
Y (t
p
) Y ()
Y ()
=
Y (t
p
) KA
KA
=
e
t
P
/
1
2
/
_
1
2
sin
_
_
1
2
1
2
/ + arctan
_
_
1
2
__
=
e
/
1
2
_
1
2
1
2
..
sin
_
arctan
_
_
1
2
__
= e
/
1
2
Chen CL 59
Decay Ratio: DR
DR =
Y (t
p
) Y ()
Y (2t
P
) Y ()
= OS
2
= e
2/
1
2
Settling Time: t
S
For t > t
S
:
Y (t) Y ()
Y ()
ln(0.05
_
1
2
)
Chen CL 60
TimeDomain Specications
Typical ClosedLoop Transfer Function (y
sp
(t) = A, K = 1?)
G
c
(s) =
Y (s)
Y
sp
(s)
K
(s)
2
+2(s)+1
=
K
(
s
n
)
2
+2
(
s
n
)
+1
Closed Loop Poles:
_
_
n
..
,
n
_
1
2
. .
d
_
_
Chen CL 61
TimeDomain Features to Step Setpoint Change
ClosedLoop TF: G
c
=
K
(s)
2
+2(s)+1
=
K
(
s
n
)
2
+2
(
s
n
)
+1
Setpoint Change: unit step
Rising Time: t
R
(Y (t) : 10% 90% in EE)
n
t
R
=
arctan
_
1
2
_
_
1
2
_
1.8 (used here)
0.8 + 2.5
1 0.4167 + 2.917
2
Peak Time: t
P
=
1
2
Overshoot: OS
OS = e
/
1
2
1
0.6
Chen CL 62
Settling Time: t
S
(1%)
t
S
ln(0.01
_
1
2
)
4.6
Summary
Relations of timedomain features to closedloop TF
t
R
1.8
n
OS 1
0.6
t
S
4.6
Design Specications
Given maximal allowable t
R
, OS, t
S
:
(t
R
)
max
, (OS)
max
, (t
S
)
max
Chen CL 63
Design a controller such that
t
R
1.8
n
< (t
R
)
max
OS 1
0.6
< (OS)
max
t
S
4.6
< (t
S
)
max
n
>
1.8
(t
R
)
max
(
n
)
min
> 0.6 (1 (OS)
max
)
min
>
4.6
(t
S
)
max
min
Chen CL 64
Process Identication from Plant Data
FOPDT Model from Step Response
Instead of deriving dynamic model based on unsteadystate
material/energy balances, we sometimes identify simple dynamic
models from plant testing data for subsequent controller tuning
FirstOrderPlusDeadTime FOPDT Model
y(s)
u(s)
= G(s) =
Ke
ds
s + 1
or
dy(t)
dt
+ y(t) = Ku(t d)
dY (t)
dt
+ Y (t) = KU(t d)
Chen CL 65
Step response and some characteristics for FOPDT
model:
u(t) = A (for t 0)
y(t) = AK
_
1 e
(td)/
y(t = ) = A K
y(t = d +
3
) = 0.283 KA
y(t = d + 0.4) =
1
3
KA
y(t = d +) = 0.632 KA
y(t = d + 1.1) =
2
3
KA
dy(t = d)
dt
=
KA
=
dy(t)
dt
max
Chen CL 66
Parameter Estimation: nd suitable K, , d from plant
data, such that model response is close to plant data
FOPDT Model: Process Gain from Step Test
Steadystate gain K for a selfregulating process
K =
y
u
ss
=
%transmitter output, %TO
%controller output, %CO
Chen CL 67
Example: step test on steam heater
u = 0.8 mA
(100 0)%CO
(20 4) mA
= 5%CO
y = 5
o
C
(100 0)%TO
(150 50)
o
C
= 5%TO
K =
5%TO
5%CO
= 1.0
%TO
%CO
Chen CL 68
FOPDT Model: Time Constant and Dead Time
Tangent Method (t 1)
Find point with maximum slope, take tangent line
Tangent line crosses initial steady state ( y): t = d
Tangent line crosses new steady state ( y +KA): t = d +
Problems:
tangent line is not very reproducible
larger estimate of time constant
tighter controller tuning
Chen CL 69
FOPDT Model: Time Constant and Dead Time
Tangent and Point Method (t 2)
Find point with maximum slope, take tangent line
Tangent line crosses initial steady state ( y): t = d
Response reaches 63.2% of total steadystate change: t
0.632
=
d +
Problems:
tangent line is not very reproducible
shorter estimate of conservative tuning
Chen CL 70
FOPDT Model: Time Constant and Dead Time
TwoPoint Method (t 3)
Step response reaches 28.3% of SS change: t
0.283
= d +
3
Step response reaches 63.2% of SS change: t
0.632
= d +
= 1.5(t
0.632
t
0.283
) d = t
0.632
Chen CL 71
FOPDT Model: Time Constant and Dead Time
Alternative TwoPoint Method (t 4)
Alternative twopoint method (t 4):
t
1/3
= d + 0.4 t
2/3
= d + 1.1
= 1.4(t
2/3
t
1/3
) d = t
2/3
1.1
Advantage: more reproducible
Problem:
longer estimate of d
shorter estimate of
Chen CL 72
OpenLoop Testing: Steam Heater
Step response: gure 3.4
Tangent method:
d = 8.0 sec = 0.13 min
= 57.2 8.0 = 49.2 sec = 0.82 min
Tangentandpoint method:
d = 8.0 sec = 0.13 min
T
63.2%
= 90 + 5 0.632 = 93.2
o
C
t
63.2%
= 45 sec
= 45 8.0 = 37 sec = 0.62 min
Chen CL 73
Twopoint method:
T
28.3%
= 90 + 5 0.283 = 91.4
o
C
T
63.2%
= 90 + 5 0.632 = 93.2
o
C
t
28.3%
= 23 sec t
63.2%
= 45 sec
= 1.5(45 23) = 33 sec = 0.55 min
d = 45 33 = 12 sec = 0.2 min
Chen CL 74
OpenLoop Testing: A Heat Exchanger
Process dynamics:
G(s) =
_
50
30s + 1
o
C
kg/s
__
1
10s + 1
%TO
o
C
__
0.016
3s + 1
kg/s
%CO
_
Openloop test:
Chen CL 75
FOPDT models:
K =
4
o
C
5%
100%TO
(15050)
o
C
= 0.80
%TO
%CO
G
1
(s) =
0.80e
7.2s
54.3s + 1
t 1
G
2
(s) =
0.80e
7.2s
37.8s + 1
t 2
G
3
(s) =
0.80e
11.2s
33.8s + 1
t 3
G
4
(s) =
0.80e
12s
33.6s + 1
t 4
t
1
= 22.5 t
2
= 45 = 3(45 22.5)/2 d = 45 33.8
t
1/3
= 25 t
2/3
= 49 = 1.4(49 25)/2 d = 49 1.1
Chen CL 76
FOPDT Model Identication
A Vacuum Filter
Consider a vacuum lter shown below.
This process is part of a waste treatment
plant. The sludge enters the lter at
about 5% solids. In the vacuum lter,
the sludge is dewatered to about 25%
solids. The lterability of the sludge in
the rotating lter depends on the pH of
the sludge entering the lter. One way
to control the moisture of the sludge to
the incinerator is by adding chemicals
(ferric chloride) to the sludge feed to
maintain the necessary pH. Fi.P71 shows
a proposed control scheme. The moisture
transmitter has a range of 55% to 95%.
The following data have been obtained
from a step test on the output of the
controller (MC70) of +12.5%CO.
Time, min Moisture, % Time, min Moisture, %
0.0 75.0 10.5 70.9
1.0 75.0 11.5 70.3
1.5 75.0 13.5 69.3
2.5 75.0 15.5 68.6
3.5 74.9 17.5 68.0
4.5 74.6 19.5 67.6
5.5 74.3 21.5 67.4
6.5 73.6 25.5 67.1
7.5 73.0 29.5 67.0
8.5 72.3 33.5 67.0
9.5 71.6
Chen CL 77
When the input moisture to the lter was
changed by 2.5%. the following data were
obtained.
1. Draw a block diagram for the moisture
control loop. Include the possible
disturbances.
2. Use t3 to estimate parameters of
FOPDT models of the two transfer
functions.
3. Give an idea of the controllability of the
output moisture. What is the correct
controller action.
4. Obtain the gain of a proportional
controller for minimum minimum IAE
response. Calculate the oset for a 5%
change in inlet moisture.
Time, min Moisture, % Time, min Moisture, %
0.0 75.0 11 75.9
1.0 75.0 12 76.1
2.0 75.0 13 76.2
3.0 75.0 14 76.3
4.0 75.0 15 76.4
5.0 75.0 17 76.6
6.0 75.1 19 76.7
7.0 75.3 21 76.8
8.0 75.4 25 76.9
9.0 75.6 29 77.0
10. 75.7 33 77.0
Chen CL 78
FOPDT Model Identication
A Vacuum Filter (solution)
K
T
=
100 0
95 55
= 2.5
% TO
% moist
m = 12.5 %CO x = 67.0 75.0 = 8.0 % moist
K
pump
K
P
=
8.0
12.5
= 0.64
% moist
% CO
K
1
= K
pump
K
P
K
T
= 1.60
% TO
% CO
x
1
= 75.0 + 0.283(8.0) = 72.73 % moist
t
1
= 7.5 +
72.73 73.0
72.3 73.0
(1.0) = 7.88 min
x
2
= 75.0 + 0.632(8.0) = 69.94 % moist
t
2
= 7.5 +
69.94 73.0
69.3 70.3
(2.0) = 12.21 min
=
3
2
(12.21 7.88) = 6.5 min
= 12.21 6.5 = 5.7 min
G
p
(s) =
1.6e
5.7s
6.5s + 1
Chen CL 79
FOPDT Model Identication
A Vacuum Filter (solution)
K
T
=
100 0
95 55
= 2.5
% TO
% moist
m = 12.5 %CO x = 67.0 75.0 = 8.0 % moist
K
pump
K
P
=
8.0
12.5
= 0.64
% moist
% CO
K
1
= K
pump
K
P
K
T
= 1.60
% TO
% CO
x
1
= 75.0 + 0.283(8.0) = 72.73 % moist
t
1
= 7.5 +
72.73 73.0
72.3 73.0
(1.0) = 7.88 min
x
2
= 75.0 + 0.632(8.0) = 69.94 % moist
t
2
= 7.5 +
69.94 73.0
69.3 70.3
(2.0) = 12.21 min
=
3
2
(12.21 7.88) = 6.5 min
= 12.21 6.5 = 5.7 min
G
p
(s) =
1.6e
5.7s
6.5s + 1
Chen CL 80
FOPDT Model Identication
A Vacuum Filter (solution)
x
i
= 2.5 %% moist x = 77.0 75.0 = 2.0 % moist
K
P
2
=
2.0
2.5
= 0.8
% moist
% moist
K
2
= K
P
2
K
T
= 2.0
% TO
% moist
x
1
= 75.0 + 0.283(2.0) = 75.57 % moist
t
1
= 8 +
75.57 75.4
75.6 75.4
(1.0) = 8.8 min
x
2
= 75.0 + 0.632(2.0) = 76.26 % moist
t
2
= 13 +
76.26 76.2
76.3 76.2
(1.0) = 13.6 min
=
3
2
(13.6 8.8) = 7.2 min
= 13.6 7.2 = 6.4 min
G
(s) =
2.0e
6.4s
7.2s + 1
Chen CL 81
FOPDT Model Identication
A Vacuum Filter (solution)
=
5.7
6.5
= 0.88 (quite high ratio, not very controllable)
K
c
=
0.902
1.60
_
5.7
6.5
_
0.985
= 0.64
% CO
% TO
oset = 0
2.0
1 + (0.64)(1.60)
(5) = 4.9 % TO (2.0 % moist)
K
c
=
0.902
1.60
_
5.7
6.5
_
1
= 0.64
% CO
% TO
= 3.33(5.7) = 19 min
Process Simulation
using Simulink
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Process Simulation
Simulation of A Gas Process
V
RT
dp(t)
dt
= f
i
(t) f
o
(t)
f
i
(t) = 0.16m
i
(t) ( = 0.00263 lbmole/scf, V = 20 ft
3
)
f
o
(t) = 0.00506m
o
(t)
p(t)[p(t) p
1
(t)]
m
i
(0) = m
i
= 50%, m
o
(0) = m
o
= 50%, p
1
(0) = p
1
= 14.7psia
f
o
(0) = f
i
(0) = 0.16m
i
(0) = (0.16)(50) = 8.0 scf/min
f
o
(0) = 0.00506m
o
(0)
p(0)[p(0) p
1
(0)]
p(0) = 39.8 psia
dp(t)
dt
=
RT
V
[f
i
(t) f
o
(t)]
=
(0.00263)(10.73)(520)
20
[f
i
(t) f
o
(t)]
= 0.734[f
i
(t) f
o
(t)] (now: m
i
= 55% at t = 5)
Chen CL 2
Chen CL 3
% Response to step changes in input rate
subplot(2,1,1)
plot(dt,p,m,linewidth,2)
ylabel(\bf p(t),Fontsize,14);
title(\bf Gas pressure response to step fan change,Fontsize,14)
subplot(2,1,2)
plot(dt,mi,b,linewidth,2)
ylabel(\bf m_i(t),Fontsize,14);
xlabel(\bf t (min),Fontsize,14);
set(gca,linewidth,3);
Chen CL 4
Process Simulation
Simulation of A Stirred Tank Heater
dT(t)
dt
=
1
V
f(t)[T
i
(t) T(t)] +
UA
V c
v
[T
s
(t) T(t)], T(0) = 150
o
F
dT
s
(t)
dt
=
1
C
M
{w(t) UA[T
s
(t) T(t)]} T
s
(0) = 230
o
F
T
i
(0) = = 100
o
F, f(0) = 15ft
3
/min, w(0) = 42.2lb/min
Chen CL 5
Response of heater outlet temperature and steam chest temperature
to a step change in process ow
Chen CL 6
Process Simulation
Simulation of A Batch Bioreactor
dx(t)
dt
= (t)x(t)
ds(t)
dt
=
1
y
(t)x(t)
d(t)
dt
=
m
s(t)
k+s(t)
(t)
= 15 h
1
, (0) =
m
= 1.2
k = 0.5 g/liter, s(0) = 2.5 g/liter, x(0) = 0.001 g/liter
Chen CL 7
Chen CL 8
Subsystem Block for The Stirred Tank Heater
Chen CL 9
Process Simulation
Simulation of A Pressure Tank (P133)
Chen CL 10
Chen CL 11
Transfer Function Simulation
Temperature Control of A Stirred Tank Heater (p.201)
Chen CL 12
Transfer Function Simulation
Temperature Control of A Stirred Tank Heater (p.201)
Analysis of
Feedback Control Loops
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Temperature Control Loop of A Heat Exchanger
Chen CL 2
ClosedLoop Transfer Function
E(s) = R(s) C(s)
M(s) = G
c
(s)E(s)
W
s
(s) = G
v
(s)M(s)
T
o
(s) = G
s
(s)W
s
(s) +G
w
(s)W(s)
C(s) = H(s)T
o
(s)
R(s) = K
sp
T
set
o
(s)
Chen CL 3
T
o
(s) = G
s
(s)W
s
(s) +G
w
(s)W(s)
= G
s
(s)G
v
(s)M(s) +G
w
(s)W(s)
= G
s
(s)G
v
(s)G
c
(s)E(s) +G
w
(s)W(s)
= G
s
(s)G
v
(s)G
c
(s) (R(s) C(s)) +G
w
(s)W(s)
= G
s
(s)G
v
(s)G
c
(s) (K
sp
T
set
o
(s) H(s)T
o
(s)) +G
w
(s)W(s)
T
o
(s) =
K
sp
G
s
(s)G
v
(s)G
c
(s)
1 +H(s)G
s
(s)G
v
(s)G
c
(s)
T
set
o
(s) +
G
w
(s)
1 +H(s)G
s
(s)G
v
(s)G
c
(s)
W(s)
R(s) = K
sp
T
set
o
(s), C(s) = H(s)T
o
(s)
G
1
(s) = H(s)G
s
(s)G
v
(s), G
2
(s) = H(s)G
w
(s)
C(s) =
G
c
(s)G
1
(s)
1 +G
c
(s)G
1
(s)
R(s) +
G
2
(s)
1 +G
c
(s)G
1
(s)
W(s)
Chen CL 4
Temperature Control Loop of A Heat Exchanger
Proportional Control
Let G
1
(s) =
K
s + 1
G
c
(s) = K
c
C(s)
R(s)
=
G
c
(s)G
1
(s)
1 +G
c
(s)G
1
(s)
=
K
c
K
s+1
1 +K
c
K
s+1
=
KK
c
s + 1 +KK
c
=
KK
c
1+KK
c
1+KK
c
s + 1
=
K
s + 1
K
1,
0 as KK
c
Chen CL 5
Temperature Control Loop of A Heat Exchanger
Pure Integral Control
Let G
1
(s) =
K
s + 1
, G
c
(s) =
K
I
s
C(s)
R(s)
=
G
c
(s)G
1
(s)
1 +G
c
(s)G
1
(s)
=
K
I
s
K
s+1
1 +
K
I
s
K
s+1
=
KK
I
s
s + 1 +
KK
I
s
=
KK
I
s
2
+s +KK
I
=
1
KK
I
s
2
+
1
KK
I
s + 1
=
1
_
s
n
_
2
+ 2
_
s
n
_
+ 1
n
=
_
KK
I
, =
1
4KK
I
lim
s0
C(s)
R(s)
= 1, r
1,2
=
1
1 4KK
I
2
Chen CL 6
KK
I
n
Comments
0.10 1.581 Overdamped
0.25 1.000 0.0 Critically damped
0.50 0.707 0.5 5% overshoot
5.40 0.215 2.3 Quarter decay ratio
Chen CL 7
HE SteadyState ClosedLoop Response
Proportional Control Mode
Chen CL 8
(1)
T
o
(s)
W(s)
=
G
w
(s)
1 +H(s)G
s
(s)G
v
(s)G
c
(s)
T
o
W
=
G
w
(0)
1 +H(0)G
s
(0)G
v
(0)G
c
(0)
=
K
w
1 +K
T
K
s
K
v
K
c
=
K
w
1 +KK
c
o
C
kg/s
e
W
=
K
w
1 +KK
c
o
C
kg/s
(e = T
set
o
. .
0 (now)
T
o
)
(2)
T
o
(s)
T
set
o
(s)
=
K
sp
G
s
(s)G
v
(s)G
c
(s)
1 +H(s)G
s
(s)G
v
(s)G
c
(s)
T
o
T
set
o
=
K
sp
G
s
(0)G
v
(0)G
c
(0)
1 +H(0)G
s
(0)G
v
(0)G
c
(0)
=
K
sp
K
s
K
v
K
c
1 +K
T
K
s
K
v
K
c
=
KK
c
1 +KK
c
o
C
o
C
e
T
set
o
= 1
KK
c
1 +KK
c
=
1
1 +KK
c
o
C
o
C
Steadystate oset (e) is smaller the higher the controller gain (K
c
)
Chen CL 9
HE SteadyState ClosedLoop Response
Eect of Integral Mode
I Mode zero SS oset
G
c
(0) = lim
s0
K
c
_
1 +
1
I
s
_
=
e
W
=
K
w
1 +KG
c
(0)
=
K
w
1 +K
= 0
e
T
set
o
= 1
KG
c
(0)
1 +KG
c
(0)
= 1
K
1 +K
= 1 1 = 0
Chen CL 10
Characteristic Eq of The Loop (Heat Exchanger)
The unforced response of the loop and its stability depend on the
roots of the Characteristic Equation
T
o
(s) =
K
sp
G
s
(s)G
v
(s)G
c
(s)
1 +H(s)G
s
(s)G
v
(s)G
c
(s)
T
set
o
(s) +
G
w
(s)
1 +H(s)G
s
(s)G
v
(s)G
c
(s)
W(s)
0 = 1 +H(s)G
s
(s)G
v
(s)G
c
(s)
0 = a
n
s
n
+a
n1
s
n1
+ +a
0
= a
n
(s r
1
)(s r
2
) (s r
n
)
T
o
(s) =
G
w
(s)
1 +H(s)G
s
(s)G
v
(s)G
c
(s)
W(s) (assume T
set
o
(s) = 0)
=
numerator terms
a
n
(s r
1
)(s r
2
) (s r
n
)(input terms)
=
b
1
sr
1
+
b
2
sr
2
+ +
b
n
sr
n
+ (input terms)
T
o
(t) = b
1
e
r
1
t
+b
2
e
r
2
t
+ +b
n
e
r
n
t
. .
unforced response
+(input terms)
. .
forced resp
Chen CL 11
Ex: Flow Control Loop
Develop the closedloop transfer function for a ow control loop
with a ProportionalIntegral (PI) controller
Chen CL 12
G
v
(s) =
F(s)
M(s)
=
K
v
v
s + 1
gpm
%CO
H(s) = K
T
=
100
f
max
%TO
gpm
K
sp
= K
T
G
c
(s) = K
c
_
1 +
1
I
s
_
=
K
c
(
I
s + 1)
I
s
%CO
%TO
F(s)
F
set
(s)
=
K
sp
G
v
(s)G
c
(s)
1 +K
T
G
v
(s)G
c
(s)
=
K
T
K
v
K
c
(
I
s + 1)
I
s(
v
s + 1) +K
T
K
v
K
c
(
I
s + 1)
K
T
K
v
K
c
v
s +K
T
K
v
K
c
=
1
FC
s + 1
(let
I
=
v
)
F(s)
R(s)
=
K
v
K
c
v
s +K
T
K
v
K
c
=
1/K
T
FC
s + 1
gpm
%TO
Chen CL 13
Ex: Temperature Control of A CSTR
EB on Liq. V c
v
dT(t)
dt
= f(t)c
p
T
i
(t) +UA[T
s
(t) T(t)] f(t)c
p
T(t)
EB on Coil C
M
dT
s
(t)
dt
= w(t) UA[T
s
(t) T(t)]
V c
v
d(t)
dt
= f(t)c
p
(T
i
T)F(t) +UA
s
(t) (UA+
fc
p
)(t)
C
M
d
s
(t)
dt
= W(t) UA
s
(t) UA(t)
Chen CL 14
(s) =
K
F
s + 1
F(s) +
K
s
s + 1
s
(s) ( =
V c
p
UA+
fc
p
,
c
=
C
M
UA
,
c
=
C
M
UA
)
s
(s) =
1
c
s + 1
(s) +
K
w
c
s + 1
W(s) (K
F
=
c
p
(T
i
T)
UA+
fc
p
, K
s
=
UA
UA+
fc
p
)
Valve G
v
(s) =
W(s)
M(s)
=
K
v
v
s + 1
, K
v
=
w(ln )
100
Trans. H(s) =
C(s)
(s)
=
K
T
T
s + 1
, K
T
=
1000
200100
= 1.0
%TO
o
F
PID G
c
(s) =
M(s)
R(s) C(s)
= K
c
_
1 +
1
I
s
+
D
s
_
Chen CL 15
Simplify G
F
(s) =
K
F
(
c
s + 1)
(s + 1)(
c
s + 1) K
s
, G
s
(s) =
K
w
K
s
(s + 1)(
c
s + 1) K
s
CL TF (s) =
K
sp
G
c
(s)G
v
(s)G
s
(s)
1 +H(s)G
c
(s)G
v
(s)G
s
(s)
set
(s) +
G
F
(s)
1 +H(s)G
c
(s)G
v
(s)G
s
(s)
F(s)
Chen CL 16
A = 241.5 ft
2
= 4.93 min
C
M
= 265.7 Btu/
o
F
c
= 0.524 min
K
F
= 2.06
o
F/(ft
3
/min) K
w
= 1.905
o
F/(lb/min)
K
s
= 0.383
o
F/
o
F K
sp
= K
T
= 1.0%TO/
o
F
K
v
= 1.652 (lb/min)/%CO
v
= 0.20 min
T
= 0.75 min
0 =
fc
p
T
i
+UA(
T
s
T)
fc
p
T
0 = w UA(
T
s
T)
T
s
=
T +
fc
p
(
TT
i
)
UA
= 150 +
(15)(68)(0.8)(150100)
(2.1)(241.5)
= 230
o
F
w =
UA(
T
s
T)
=
(2.1)(241.5)(230150)
966
= 42.2
lb
min
1,2
= 8.34, 0.502 min (eective time constants)
G
1
(s) = G
v
(s)G
s
(s)H(s) =
1.652
0.2s+1
1.183
(8.34s+1)(0.502s+1)
1.0
0.75s+1
%TO
%CO
G
2
(s) = G
F
(s)H(s) =
3.34(0.524s+1)
(8.34s+1)(0.502s+1)
1.0
0.75s+1
%TO
ft
3
/min
K
w
K
s
/(1 K
s
) = (1.905)(0.383)/(1 0.383) = 1.183
o
F/(lb/min)
K
F
/(1 K
s
) = (2.06)/(1 0.383) = 3.34
o
F/(lb/min)
C(s) =
G
c
(s)G
1
(s)
1 +G
c
(s)G
1
(s)
R(s) +
G
2
(s)
1 +G
c
(s)G
1
(s)
F(s)
Chen CL 17
Stability of The Control Loop
Chen CL 18
Zero and Pole of A Transfer Function
G(s) : transfer function of one process
G(s = z) = 0 z : zero of G(s)
G(s = p) = p : pole of G(s)
Ex: G(s) =
3
s + 1
(
1
s + 1)(
2
s + 1)
p =
1
1
,
1
2
z =
1
3
Chen CL 19
BIBO Stability
BoundedInput/BoundedOutput Stability:
A system is called BIBO Stable
if its output is bounded for any bounded input
Note: two typical bounded inputs
Step Input: U(t) = A for t > 0
U(s) =
A
s
Impulse Input: U(t) = (t) for t > 0
U(s) = 1
Chen CL 20
OpenLoop Stability
FirstOrder Process
G(s) =
K
s + 1
p =
1
U(s) =
A
s
step input
Y (t) = KA
_
1 e
t/
e
t/
Chen CL 21
OpenLoop Stability
Integrator Process
G(s) =
K
s
p = 0
U(s) =
A
s
step input
Y (t) = KAt
U(s) = A impulse input
Y (t) = KA
Chen CL 22
OpenLoop Stability
(Unstable) FirstOrder Process
G(s) =
K
s + 1
p = +
1
U(s) =
A
s
step input
Y (t) = KA
_
1 e
t/
e
t/
Chen CL 23
OpenLoop Stability
Overdamped SecondOrder Process
G(s) =
K
(
1
s + 1)(
2
s + 1)
p =
1
1
,
1
2
U(s) =
A
s
step input
Y (t) = KA
_
1
1
2
e
t/
1
1
e
t/
2
_
U(s) = A impulse input
Y (t) = KA
e
t/
1
e
t/
2
2
Chen CL 24
OpenLoop Stability
Critical SecondOrder Process
G(s) =
K
(s + 1)
2
p =
1
,
1
U(s) =
A
s
step input
Y (t) = KA
_
1 (1 +t)e
t/
(1 +t )e
t/
Chen CL 25
OpenLoop Stability
Underdamping SecondOrder Process (
n
= 1/)
G(s) =
K
_
s
n
_
2
+ 2
_
s
n
_
+ 1
p
1,2
=
n
n
_
1
2
i
U(s) =
A
s
step input
Y (t)
KA
= 1
p
1
p
1
p
2
e
p
1
t
p
2
p
2
p
1
e
p
2
t
= 1 e
n
t
_
cos(
_
1
2
n
t) +
_
1
2
sin(
_
1
2
n
t)
_
U(s) = A impulse input
Y (t)
KA
=
n
_
1
2
sin(
_
1
2
n
t)
Chen CL 26
OpenLoop Stability
General Process
G(s) =
Y (s)
U(s)
=
(s z
1
) (s z
m
)
(s p
1
) (s p
n
)
Y (s) =
c
1
(s p
1
)
+ +
c
1
(s p
n
)
+F(s) (for any BI)
Y (t) = c
1
e
p
1
t
+ +c
n
e
p
n
t
+F(t) ( forced response)
Note: Re(p
i
)
s stability ? Im(p
i
)
s oscillation ?
All Re(p
i
) < 0 BIBO Stable
Any one Re(p
i
) > 0 Unstable
At least one Re(p
i
) > 0 Unstable
Chen CL 27
ClosedLoop Stability
Y (s) =
G
c
G
p
1 +G
c
G
p
R(s) +
G
p
1 +G
c
G
p
L(s)
= G
R
(s)R(s) +G
L
(s)L(s)
Poles of G
R
(s) = Poles of G
L
(s)
= Roots of 1 +G
c
(s)G
p
(s) = 0
. .
characteristic eq
BI
s Y (t) = b
1
e
r
1
t
+. . . +b
r
e
r
r
t
+ (input terms)
For Real Roots: If r < 0 Then e
rt
0 as t
Complex Roots: r = +i e
rt
= e
t
sin(t +)
If < 0 Then e
t
0 as t
Chen CL 28
ClosedLoop Stability
For a feedback control loop to be stable, all of the roots of its
characteristic equation must be either negative real numbers or
complex numbers with negative real parts
For a feedback control loop to be stable, all of the roots of its
characteristic equation must fall on the lefthand half of the splane,
also known as the lefthand plane
Chen CL 29
ClosedLoop Stability
Root Location on The sPlane
The splane, showing the regions of stability and instability for the
location of the roots of the characteristic equation
Chen CL 30
ClosedLoop Stability
The Ultimate Gain
Response of closed loop with the controller gain less than (a), equal
to (b), and greater than (c) the ultimate gain
Chen CL 31
ClosedLoop Stability: Example
G
c
(s) can stabilize an openloop unstable process
Y (s) =
10
s 1
U(s) +
5
s 1
L(s)
G
c
(s) = K
c
Y (s) =
10K
c
s (1 10K
c
)
R(s) +
5K
c
s(110K
c
)
L(s)
0 = 1 +G
c
(s)G
p
(s) = 1 +K
c
10
s 1
p = 1 10K
c
If K
c
>
1
10
CL Stable
If K
c
<
1
10
CL Unstable
Chen CL 32
ClosedLoop Stability: Example
G
c
(s) can destabilize an openloop stable process
G
p
(s) =
1
s
2
+ 2s + 2
(p
i
= 1 i)
G
c
(s) = K
c
_
1 +
1
T
r
s
_
0 = 1 +K
c
_
1 +
1
T
r
s
_
1
s
2
+ 2s + 2
0 = s
3
+ 2s
2
+ (2 +K
c
)s +K
c
/T
r
if K
c
= 100 T
r
= 0.1
then p = 7.185 2.59 11.5i
CL Unstable!
Chen CL 33
Check The ClosedLoop Stability:
Direct Substitution Method
Example: Three Mixing Tanks (Luyben)
G
p
(s) =
0.039
(5s + 1)
3
G
L
(s) =
1
(5s + 1)
3
G
c
(s) = K
c
Y (s) =
K
c
0.039
(5s + 1)
3
1 +K
c
0.039
(5s + 1)
3
R(s) +
1
(5s + 1)
3
1 +K
c
0.039
(5s + 1)
3
L(s)
Char. Eq: 0 = 1 +K
c
0.039
(5s + 1)
3
0 = 125s
3
+ 75s
2
+ 15s + (1 + 0.039K
c
)
Chen CL 34
K
c
roots
0 (0.2, 0) (0.2, 0) (0.2, 0)
50 (0.45, 0) (.075, .216) (.075, .216)
100 (.515, 0) (.043, .273) (.043, .273)
200 (.597, 0) (.00168, .344) (.00168, .344)
205 (0.6, 0) (0, .346) (0, .346)
250 (.627, 0) (.0136, .37) (.0136, .37)
for K
c
= K
cu
s = i
u
(zero real part)
0 = 125(i
u
)
3
+ 75(i
u
)
2
+ 15(i
u
) + (1 + 0.039K
cu
)
0 =
_
1 + 0.039K
cu
75
2
u
_
. .
=0
+
_
15
u
125
3
u
_
. .
=0
i
u
= (0),
_
15
125
= 0.3464 K
cu
= (25.6), 205
Chen CL 35
Check The ClosedLoop Stability:
Direct Substitution Method
Example: A Heat Exchanger
G
p
(s) =
0.016
3s + 1
kg/s
%
. .
valve
50
30s + 1
o
C
kg/s
. .
HE
1
10s + 1
%
o
C
. .
Sensor
G
c
(s) = K
c
%
%
char. eq: 0 = 1 +K
c
0.016
3s + 1
50
30s + 1
1
10s + 1
0 = 900s
3
+ 420s
2
+ 43s + (1 + 0.8K
c
)
Chen CL 36
K
c
roots
0 (0.333, 0) (0.1, 0) (0.1, 0)
5 (0.379, 0) (.044, .113) (.044, .113)
10 (.410, 0) (.029, .154) (.029, .154)
20 (.453, 0) (.007, .204) (.007, .204)
23.8 (0.467, 0) (0, .219) (0, .219)
25 (.471, 0) (.002, .223) (.002, .223)
for K
c
= K
cu
s = i
u
0 = 900(i
u
)
3
+ 420(i
u
)
2
+ 43(i
u
) + (1 + 0.8K
cu
)
0 =
_
420
2
u
+ 1 + 0.8K
cu
_
. .
=0
+
_
900
3
u
+ 43
u
_
. .
=0
i
u
= (0), 0.2186 (rad/s) K
cu
= (1.25), 23.8 (%/%)
Chen CL 37
Summary of other conditions (on sensor, valve )
K
cu
(%/%)
u
(rad/s) T
u
(sec/cycle)
H(s) =
1
10s + 1
23.8 0.2186 28.7
H(s) =
2
10s + 1
11.9 0.2186 28.7
H(s) =
1
5s + 1
25.7 0.2906 21.6
G
s
(s) =
50
20s + 1
18.7 0.2345 26.8
G
s
(s) =
50e
2s
30s + 1
? ? ?
Chen CL 38
Check The ClosedLoop Stability:
Rouths Test
Rouths Test:
To determine # of RHP roots
(for a characteristic equation)
Not to nd roots directly
Useful to nd limiting values of loop parameters
Delay system ?
Chen CL 39
Rouths Test:
Step 1: nd characteristic equation
1 +G
c
G
p
= 0 a
n
s
n
+a
n1
s
n1
+a
1
s + 1 = 0
Step 2: prepare Rouths array
a
n
a
n2
a
n4
0
a
n1
a
n3
a
n5
0
b
1
b
2
b
3
0
c
1
c
2
0
.
.
.
e
1
0
b
1
=
a
n1
a
n2
a
n
a
n3
a
n1
c
1
=
b
1
a
n3
a
n1
b
2
b
1
b
2
=
a
n1
a
n4
a
n
a
n5
a
n1
c
2
=
b
1
a
n5
a
n1
b
3
b
1
.
.
.
.
.
.
Chen CL 40
Rouths Test: (continued)
Step 3: check rst column
count the # of signchange (N)
Step 4:
N = # of RHP roots
Note: N = 0 CL Stable
N > 0 CL Unstable !
Chen CL 41
Check The ClosedLoop Stability:
Rouths Test
Example: Heat Exchanger
Process:
G
p
(s) =
0.016
3s + 1
kg/s
%
50
30s + 1
o
C
kg/s
1
10s + 1
%
o
C
d
2
K
c
K
p
_
s + (1 +K
c
K
p
)
Rouths Array:
d
2
1 +K
c
K
p
+
d
2
d
2
K
c
K
p
0
1 +K
c
K
p
0
To prevent
CL unstable:
+
d
2
d
2
K
c
K
p
> 0
K
c
K
p
< 2
d
+ 1
Chen CL 44
Check The ClosedLoop Stability:
Rouths Test
Example: SecondOrder + PI Controller
G
p
(s) =
K
p
(
1
s + 1)(
2
s + 1)
G
c
(s) = K
c
_
1 +
1
T
r
s
_
0 = 1 +K
c
_
1 +
1
T
r
s
_
K
p
(
1
s + 1)(
2
s + 1)
0 = T
r
2
s
3
+T
r
(
1
+
2
)s
2
+T
r
(1 +K
c
K
p
)s +K
c
K
p
Rouths Array: T
r
2
T
r
(1 +K
c
K
p
) 0
T
r
(
1
+
2
) K
c
K
p
0
b
1
0
c
1
0
Chen CL 45
b
1
=
T
r
2
T
r
(1 +K
c
K
p
) T
r
2
K
c
K
p
T
r
(
1
+
2
)
=
T
2
r
(
1
+
2
)(1 +K
c
K
p
) T
r
2
K
c
K
p
T
r
(
1
+
2
)
c
1
= K
c
K
p
(> 0)
To prevent CL unstable:
b
1
> 0
T
r
>
K
c
K
p
1 +K
c
K
p
1
+
2
Dynamic Simulation
using Simulink
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Simulation of Control Instrumentation
P Control with Reset Bias (PI)
u(t) = K
c
e(t) +u
b
(t) u(0) = u
b
(0) = u
b
u(t) = T
I
du
b
(t)
dt
+u
b
(t)
du
b
(t)
dt
=
1
T
I
[u(t) u
b
(t)]
u
b
(t) =
_
t
0
1
T
I
[u() u
b
()] d +u
b
(0)
=
_
t
0
1
T
I
[(u() u(0)) (u
b
() u
b
(0))] d +u
b
(0)
U
b
(t) =
_
t
0
1
T
I
[U() U
b
()] d
U
b
(s) =
1
s
1
T
I
[U(s) U
b
(s)]
Chen CL 2
Simulation of Control Instrumentation
Simulation of PI Controller
u(t) = K
c
e(t) +u
b
(t); u
b
(t) u
b
(0) =
_
t
0
1
T
I
[u() u
b
()] d
Chen CL 3
Simulation of Control Instrumentation
Simulation of PI Controller
% P control with reset bias
plot(tout,p,m,linewidth,2)
hold on
plot(tout,ub,b,linewidth,2)
plot(tout,u,r,linewidth,2)
ylabel(\bf PI Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(p(t),u_b(t),u(t));
hold off
Chen CL 4
Simulation of Control Instrumentation
Simulation of PI Controller
% P control with reset bias
subplot(3,1,1)
plot(tout,p,m,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(3,1,2)
plot(tout,ub,b,linewidth,2)
ylabel(\bf u_b(t),fontsize,14);
set(gca,linewidth,3);
subplot(3,1,3)
plot(tout,u,r,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 5
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
u(t) = K
c
e(t +T
D
) +u
b
K
c
_
e(t) +T
D
de(t)
dt
_
+u
b
u(t) = K
c
_
e(t) +T
D
de
f
(t)
dt
_
+u
b
e(t) = T
D
de
f
(t)
dt
+e
f
(t) T
D
de
f
(t)
dt
=
1
[e(t) e
f
(t)]
e
f
(t) =
_
t
0
1
T
D
_
T
D
de
f
()
d
_
d +e
f
(0)
. .
=0
=
_
t
0
1
T
D
_
1
[e() e
f
()]
_
d +e
f
(0)
. .
=0
or E
f
(t) =
_
t
0
1
T
D
_
1
[E() E
f
()]
_
d (deviation var.s)
E
f
(s) =
1
s
1
T
D
1
[E(s) E
f
(s)] =
1
s
1
T
D
L
_
T
D
dE
f
(t)
dt
_
Chen CL 6
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
T
D
de
f
(t)
dt
=
1
(e(t) e
f
(t)) ; e
f
(t) e
f
(0) =
_
t
0
1
T
D
_
T
D
de
f
()
d
_
d
Chen CL 7
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,efuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),e(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 8
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
subplot(5,1,1)
plot(tout,e,Color,[0,.5,0],...
linewidth,2)
ylabel(\bf e(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,2)
plot(tout,efuture,Color,[.5,0,.5],...
linewidth,2)
ylabel(\bf e(t+T_d),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,3)
plot(tout,p,r,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,4)
plot(tout,Daction,b,linewidth,2)
ylabel(\bf D(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,5)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 9
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Measurement y with A Lowpass Filter
u(t) = K
c
e(t +T
D
) +u
b
K
c
_
y
sp
_
y(t) +T
D
dy(t)
dt
__
+u
b
u(t) = K
c
_
y
sp
_
y(t) +T
D
dy
f
(t)
dt
__
+u
b
y(t) = T
D
dy
f
(t)
dt
+y
f
(t) T
D
dy
f
(t)
dt
=
1
[y(t) y
f
(t)]
y
f
(t) =
_
t
0
1
T
D
_
T
D
dy
f
()
d
_
d +y
f
(0)
=
_
t
0
1
T
D
_
1
[y() y
f
()]
_
d +y
f
(0)
or Y
f
(t) =
_
t
0
1
T
D
_
1
[Y () Y
f
()]
_
d (deviation var.s)
Y
f
(s) =
1
s
1
T
D
1
[Y (s) Y
f
(s)] =
1
s
1
T
D
L
_
T
D
dY
f
(t)
dt
_
Chen CL 10
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Measurement y with A Lowpass Filter
T
D
dy
f
(t)
dt
=
1
(y(t) y
f
(t)) ; y
f
(t) y
f
(0) =
_
t
0
1
T
D
_
T
D
dy
f
()
d
_
d
Chen CL 11
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Measurement y with A Lowpass Filter
% PD control
plot(tout,y,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,yfuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(y(t),y(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 12
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Measurement y with A Lowpass Filter
% PD control
subplot(5,1,1)
plot(tout,y,Color,[0,.5,0],...
linewidth,2)
ylabel(\bf y(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,2)
plot(tout,yfuture,Color,[.5,0,.5],...
linewidth,2)
ylabel(\bf y(t+T_d),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,3)
plot(tout,p,r,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,4)
plot(tout,Daction,b,linewidth,2)
ylabel(\bf D(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,5)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 13
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error e with A Lowpass Filter
Chen CL 14
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error e with A Lowpass Filter
% Series PID control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,p,r,linewidth,2)
plot(tout,ub,b,linewidth,2)
plot(tout,u,m,linewidth,2)
ylabel(\bf Series PID Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),p(t),u_b(t),u(t));
hold off
Chen CL 15
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Measurement y with A Lowpass Filter
Chen CL 16
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Measurement y with A Lowpass Filter
% Series PID control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,p,r,linewidth,2)
plot(tout,ub,b,linewidth,2)
plot(tout,u,m,linewidth,2)
ylabel(\bf Series PID Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),p(t),u_b(t),u(t));
hold off
Chen CL 17
Simulation of A Generic Series PID
Chen CL 18
Simulation of A Control Valve
Chen CL 19
Simulation of A Sensor Transmitter
Chen CL 20
Process Simulation
Simulation of A Stirred Tank Heater
EB on Liq. V c
v
dT(t)
dt
= f(t)c
p
T
i
(t) +UA[T
s
(t) T(t)] f(t)c
p
T(t)
EB on Coil C
M
dT
s
(t)
dt
= w(t) UA[T
s
(t) T(t)]
V c
v
d(t)
dt
= f(t)c
p
(T
i
T)F(t) +UA
s
(t) (UA+
fc
p
)(t)
C
M
d
s
(t)
dt
= W(t) UA
s
(t) UA(t)
Chen CL 21
Process Simulation
Simulation of A Stirred Tank Heater
dT(t)
dt
=
1
V
f(t)[T
i
(t) T(t)] +
UA
V c
v
[T
s
(t) T(t)], T(0) = 150
o
F
dT
s
(t)
dt
=
1
C
M
{w(t) UA[T
s
(t) T(t)]} T
s
(0) = 230
o
F
T
i
(0) = 100
o
F, f(0) = 15ft
3
/min, w(0) = 42.2lb/min
Chen CL 22
Process Simulation
Simulation of A Stirred Tank Heater
Response of heater outlet temperature and steam chest temperature
to a step change in process ow
Chen CL 23
Process Simulation
Simulation of A Stirred Tank Heater
Chen CL 24
Simulation of Feedback Control
on A Stirred Tank Heater
Chen CL 25
Transfer Function Simulation
Temperature Control of A Stirred Tank Heater (p.201)
(s) =
K
F
s + 1
F(s) +
K
s
s + 1
s
(s) ( =
V c
p
UA+
fc
p
,
c
=
C
M
UA
,
c
=
C
M
UA
)
s
(s) =
1
c
s + 1
(s) +
K
w
c
s + 1
W(s) (K
F
=
c
p
(T
i
T)
UA+
fc
p
, K
s
=
UA
UA+
fc
p
)
Valve G
v
(s) =
W(s)
M(s)
=
K
v
v
s + 1
, K
v
=
w(ln )
100
Trans. H(s) =
C(s)
(s)
=
K
T
T
s + 1
, K
T
=
1000
200100
= 1.0
%TO
o
F
PID G
c
(s) =
M(s)
R(s) C(s)
= K
c
_
1 +
1
I
s
+
D
s
_
Chen CL 26
Simulation of Feedback Control
on A Stirred Tank Heater Transfer Function
Chen CL 27
Thank You for Your Attention
To Be Continued
Dynamic Simulation
using Simulink
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Simulation of Control Instrumentation
P Control with Reset Bias (PI)
u(t) = K
c
e(t) +u
b
(t) u(0) = u
b
(0) = u
b
u(t) = T
I
du
b
(t)
dt
+u
b
(t)
du
b
(t)
dt
=
1
T
I
[u(t) u
b
(t)]
u
b
(t) =
_
t
0
1
T
I
[u() u
b
()] d +u
b
(0)
=
_
t
0
1
T
I
[(u() u(0)) (u
b
() u
b
(0))] d +u
b
(0)
U
b
(t) =
_
t
0
1
T
I
[U() U
b
()] d
U
b
(s) =
1
s
1
T
I
[U(s) U
b
(s)]
Chen CL 2
Simulation of Control Instrumentation
Simulation of PI Controller
u(t) = K
c
e(t) +u
b
(t); u
b
(t) u
b
(0) =
_
t
0
1
T
I
[u() u
b
()] d
Chen CL 3
Simulation of Control Instrumentation
Simulation of PI Controller
% P control with reset bias
plot(tout,p,m,linewidth,2)
hold on
plot(tout,ub,b,linewidth,2)
plot(tout,u,r,linewidth,2)
ylabel(\bf PI Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(p(t),u_b(t),u(t));
hold off
Chen CL 4
Simulation of Control Instrumentation
Simulation of PI Controller
% P control with reset bias
subplot(3,1,1)
plot(tout,p,m,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(3,1,2)
plot(tout,ub,b,linewidth,2)
ylabel(\bf u_b(t),fontsize,14);
set(gca,linewidth,3);
subplot(3,1,3)
plot(tout,u,r,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 5
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
u(t) = K
c
e(t +T
D
) +u
b
K
c
_
e(t) +T
D
de(t)
dt
_
+u
b
u(t) = K
c
_
e(t) +T
D
de
f
(t)
dt
_
+u
b
e(t) = T
D
de
f
(t)
dt
+e
f
(t) T
D
de
f
(t)
dt
=
1
[e(t) e
f
(t)]
e
f
(t) =
_
t
0
1
T
D
_
T
D
de
f
()
d
_
d +e
f
(0)
. .
=0
=
_
t
0
1
T
D
_
1
[e() e
f
()]
_
d +e
f
(0)
. .
=0
or E
f
(t) =
_
t
0
1
T
D
_
1
[E() E
f
()]
_
d (deviation var.s)
E
f
(s) =
1
s
1
T
D
1
[E(s) E
f
(s)] =
1
s
1
T
D
L
_
T
D
dE
f
(t)
dt
_
Chen CL 6
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
T
D
de
f
(t)
dt
=
1
(e(t) e
f
(t)) ; e
f
(t) e
f
(0) =
_
t
0
1
T
D
_
T
D
de
f
()
d
_
d
Chen CL 7
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,efuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),e(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 8
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Error e with A Lowpass Filter
% PD control
subplot(5,1,1)
plot(tout,e,Color,[0,.5,0],...
linewidth,2)
ylabel(\bf e(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,2)
plot(tout,efuture,Color,[.5,0,.5],...
linewidth,2)
ylabel(\bf e(t+T_d),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,3)
plot(tout,p,r,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,4)
plot(tout,Daction,b,linewidth,2)
ylabel(\bf D(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,5)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 9
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Measurement y with A Lowpass Filter
u(t) = K
c
e(t +T
D
) +u
b
K
c
_
y
sp
_
y(t) +T
D
dy(t)
dt
__
+u
b
u(t) = K
c
_
y
sp
_
y(t) +T
D
dy
f
(t)
dt
__
+u
b
y(t) = T
D
dy
f
(t)
dt
+y
f
(t) T
D
dy
f
(t)
dt
=
1
[y(t) y
f
(t)]
y
f
(t) =
_
t
0
1
T
D
_
T
D
dy
f
()
d
_
d +y
f
(0)
=
_
t
0
1
T
D
_
1
[y() y
f
()]
_
d +y
f
(0)
or Y
f
(t) =
_
t
0
1
T
D
_
1
[Y () Y
f
()]
_
d (deviation var.s)
Y
f
(s) =
1
s
1
T
D
1
[Y (s) Y
f
(s)] =
1
s
1
T
D
L
_
T
D
dY
f
(t)
dt
_
Chen CL 10
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Measurement y with A Lowpass Filter
T
D
dy
f
(t)
dt
=
1
(y(t) y
f
(t)) ; y
f
(t) y
f
(0) =
_
t
0
1
T
D
_
T
D
dy
f
()
d
_
d
Chen CL 11
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Measurement y with A Lowpass Filter
% PD control
plot(tout,y,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,yfuture,Color,[.5,0,.5],linewidth,2)
plot(tout,p,r,linewidth,2)
plot(tout,Daction,b,linewidth,2)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf PD Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(y(t),y(t+T_d),p(t),D(t),u(t));
hold off
Chen CL 12
Simulation of Control Instrumentation
Simulation of PD Controller
D Action on Measurement y with A Lowpass Filter
% PD control
subplot(5,1,1)
plot(tout,y,Color,[0,.5,0],...
linewidth,2)
ylabel(\bf y(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,2)
plot(tout,yfuture,Color,[.5,0,.5],...
linewidth,2)
ylabel(\bf y(t+T_d),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,3)
plot(tout,p,r,linewidth,2)
ylabel(\bf p(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,4)
plot(tout,Daction,b,linewidth,2)
ylabel(\bf D(t),fontsize,14);
set(gca,linewidth,3);
subplot(5,1,5)
plot(tout,PDout,m,linewidth,2)
ylabel(\bf u(t),fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
Chen CL 13
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error e with A Lowpass Filter
Chen CL 14
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Error e with A Lowpass Filter
% Series PID control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,p,r,linewidth,2)
plot(tout,ub,b,linewidth,2)
plot(tout,u,m,linewidth,2)
ylabel(\bf Series PID Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),p(t),u_b(t),u(t));
hold off
Chen CL 15
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Measurement y with A Lowpass Filter
Chen CL 16
Simulation of Control Instrumentation
Simulation of Series PID Controller
D Action on Measurement y with A Lowpass Filter
% Series PID control
plot(tout,e,Color,[0,.5,0],linewidth,2)
hold on
plot(tout,p,r,linewidth,2)
plot(tout,ub,b,linewidth,2)
plot(tout,u,m,linewidth,2)
ylabel(\bf Series PID Output Signals,...
fontsize,14);
xlabel(\bf t (min),fontsize,14);
set(gca,linewidth,3);
legend(e(t),p(t),u_b(t),u(t));
hold off
Chen CL 17
Simulation of A Generic Series PID
Chen CL 18
Simulation of A Control Valve
Chen CL 19
Simulation of A Sensor Transmitter
Chen CL 20
Process Simulation
Simulation of A Stirred Tank Heater
EB on Liq. V c
v
dT(t)
dt
= f(t)c
p
T
i
(t) +UA[T
s
(t) T(t)] f(t)c
p
T(t)
EB on Coil C
M
dT
s
(t)
dt
= w(t) UA[T
s
(t) T(t)]
V c
v
d(t)
dt
= f(t)c
p
(T
i
T)F(t) +UA
s
(t) (UA+
fc
p
)(t)
C
M
d
s
(t)
dt
= W(t) UA
s
(t) UA(t)
Chen CL 21
Process Simulation
Simulation of A Stirred Tank Heater
dT(t)
dt
=
1
V
f(t)[T
i
(t) T(t)] +
UA
V c
v
[T
s
(t) T(t)], T(0) = 150
o
F
dT
s
(t)
dt
=
1
C
M
{w(t) UA[T
s
(t) T(t)]} T
s
(0) = 230
o
F
T
i
(0) = 100
o
F, f(0) = 15ft
3
/min, w(0) = 42.2lb/min
Chen CL 22
Process Simulation
Simulation of A Stirred Tank Heater
Response of heater outlet temperature and steam chest temperature
to a step change in process ow
Chen CL 23
Process Simulation
Simulation of A Stirred Tank Heater
Chen CL 24
Simulation of Feedback Control
on A Stirred Tank Heater
Chen CL 25
Transfer Function Simulation
Temperature Control of A Stirred Tank Heater (p.201)
(s) =
K
F
s + 1
F(s) +
K
s
s + 1
s
(s) ( =
V c
p
UA+
fc
p
,
c
=
C
M
UA
,
c
=
C
M
UA
)
s
(s) =
1
c
s + 1
(s) +
K
w
c
s + 1
W(s) (K
F
=
c
p
(T
i
T)
UA+
fc
p
, K
s
=
UA
UA+
fc
p
)
Valve G
v
(s) =
W(s)
M(s)
=
K
v
v
s + 1
, K
v
=
w(ln )
100
Trans. H(s) =
C(s)
(s)
=
K
T
T
s + 1
, K
T
=
1000
200100
= 1.0
%TO
o
F
PID G
c
(s) =
M(s)
R(s) C(s)
= K
c
_
1 +
1
I
s
+
D
s
_
Chen CL 26
Simulation of Feedback Control
on A Stirred Tank Heater Transfer Function
Chen CL 27
Thank You for Your Attention
To Be Continued
Tuning PID Controllers
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Outline
Selection of Controller Modes
Controller Tuning Tips
Integrated Tuning and Diagnosis
Tuning for Quarter Decay Ratio
Tuning for MinimumError Integrals
Controller Synthesis
Chen CL 2
Tuning Map for Gain and Reset Eects
Chen CL 3
The Eects of Adding Derivative
Chen CL 4
Selection of Controller Modes
Chen CL 5
Selection of Controller Modes
Deciding on Control Objective
Common objective for feedback control:
Case 1: to maintain CV at its setpoint
Case 2: to maintain CV in an acceptable range
Eliminating I mode if possible:
I mode: to eliminate oset or steady state error
I mode is not required when allowing CV to vary within a range
Eliminating I mode allows the use of higher proportional gain to
reduce initial deviation of CV caused by disturbances
Chen CL 6
Situations Allowing CV to Vary In A Range
Case 2a: process is very controllable (large time
constant + small dead time) that K
c
can be set high
and maintain CV in a very narrow range
Control of level in evaporators and reboilers
Control of temperature in refrigeration systems, ovens, air
conditioning/heating systems
Ono control can be used when time constant is long enough
that the cycling is of a very slow frequency
Could use very narrow proportional band (high gain) for P or
PD controllers or very narrow dead band for ono controllers
to maintain CV in a very narrow range
D mode can be added to compensate for lag in sensor or nal
control element and thus improve stability
Chen CL 7
Situations Allowing CV to Vary In A Range
Case 2b: when it is desirable to allow CV to vary
over a wide range
Control of level in intermediate storage tanks, condenser
accumulators
Control of pressure in gas surge tanks
Use P controllers with as wide a proportional band as possible
Chen CL 8
Liquid Level and Gas Pressure Control
Liquid level and gas pressure are controlled either for
Tight Control:
To keep liquid level or gas pressure constant because of their
eect on process or equipment operation
Averaging Control:
To smooth out variations in ow while satisfying material balance
Chen CL 9
Liquid Level and Gas Pressure Control
Tight Control: Examples
Level in natural circulation
evaporators or reboilers
Too low a level causes
deposits on bare hot tube
Too high a level causes elevation
of boiling point
Regulation of pressure in liquid or
gas supply header keep constant
P to prevent disturbances to users
when there is a sudden change in
demand of one or more of the users
Chen CL 10
Liquid Level and Gas Pressure Control
Tight Control: Discussion
Tight liquid level or gas pressure control systems require a fastacting control
valve with a positioner to avoid secondary time lag
(Secondary time lag would make the loop less controllable and cause oscillatory
behavior at high controller gain)
If liquid level/gas pressure controller is cascaded to a ow controller, the latter
must be tuned as tight as possible
Tight controller needs only P action with gain set high (10 100)
If lag of level/pressure sensor is signicant
use D mode and higher gain
Derivative time: sensor time constant
I mode should not be used
(I mode would require a reduction of P gain)
Chen CL 11
Liquid Level and Gas Pressure Control
Averaging Control: Examples
Level in a surge or intermediate storage
tank
Level in a condenser accumulator drum
level has no eect on process
operation
Purpose of averaging control:
to smooth out ow variations while
keeping the tank from overowing or
running empty
If tight level control
outlet ow = inlet ow: a pipe ?
Chen CL 12
Liquid Level and Gas Pressure Control
Averaging Control: Discussion
P action only:
setpoint = 50%, gain = 1, output bias = 50%
using full capacity of the valve and of the tank:
Outlet valve fully opened when level is at 100% of range
Outlet valve fully closed when level is at 0% of range
Use a higher gain:
reduce the eective capacity of the tank for smoothing variations
in ow
Use a lower gain:
reduce the eective capacity of the control valve and create
possibility of tank overowing or running dry
Chen CL 13
Tank a lowpass lter to ow variations with time const.
f
=
A[h
max
h
min
]
K
c
F
max
=
1
K
c
V
F
max
Increasing gain
reducing time constant
less smoothing of ow variations
Doubling gain by 2 =
reducing tank area or transmitter range (by a factor of 2)
Reducing gain by 2 =
reducing valve capacity by half
increasing possibility of tank overowing
Averaging pressure control:
a simple xed resistance on surge tank outlet is OK !
Chen CL 14
Flow Control
Controller Mode
Use PI control: weak P and strong I
proportional gain less than one
very fast integral time ( sec)
(similar to a pure integral controller)
Flow process is very simple (= actuator)
Most ow sensors are fast:
(orice, venturi, ow tubes, magnetic owmeters, turbine meters)
most signicant lag: valve actuator (a few seconds)
Simple process + fast sensor response very stable
Noisy measurement in ow sensors (turbulent ow)
Common control objective:
maintain a constant rate with few manual changes in setpoint
Chen CL 15
Flow Control
Slave Flow Loop
As a slave ow controller in a cascade control scheme:
respond fast to setpoint changes, tight control
PI controller with higher gain (> 1) and
increasing integral time for stability
Synthesis formula:
Reset time be set equal to time constant of the loop
(that of control valve actuator)
Adjust gain for desired tightness of control
Chen CL 16
Flow Control
Valve with Hysteresis
Caused by dynamic friction in the valve stem
Causes variations in ow around its set point
Creates a dierence between actual valve position and controller
output
The error changes direction according to the direction that the
stem must move
Dead band around desired valve position
Increasing controller gain
reducing amplitude of ow variations !
Valve positioners also reduce hysteresis and speed up valves
Chen CL 17
Temperature Control
Signicant lag in temperature sensors:
PID controllers
Synthesis method: T
D
= sensor time constant (
s
)
s
=
MC
p
hA
(min)
M: mass of sensor, including thermowell (b)
C
p
: specic heat (Btu/b
o
F)
h: lm coecient of heat transfer (Btu/minft
2

o
F)
A: area of the thermowell (ft
2
)
Chen CL 18
When temperature controller manipulates ow of steam
or fuel to a heater or furnace:
Heat of condensation of steam and heating value of fuel remain
approximately constant with load
rate of heat is proportional to the ow of steam or fuel
Chen CL 19
When temperature controller manipulates ow of
cooling water or hot oil:
Heat transfer rate requires that outlet utility temperature get
closer to its inlet temperature as the heat transfer rate increases
It requires higher increments in ow for equal increments in heat
rate as load increases
heat rate is very nonlinear with water or oil ow
Because of this and other problems with excessive water
temperature at low heat transfer rate
heat exchanger with bypass stream
removes exchanger lag from temperature control loop
faster control
Chen CL 20
Estimation of Sensor Time Constant
RTD (Resistance Temperature Device):
weight: 0.5 b; specic heat: 0.033 Btu/b
o
F
Thermowell:
cylindrical, outside diameter and length of 0.5 in.
Film coecient of heat transfer between uid and thermowell:
90 Btu/hft
2

o
F
Area of thermowell:
3.1416(0.5)(5)/144 = 0.055 ft
2
Time constant:
(0.5)(0.033)/(90/60)(0.055) = 0.20 min
Chen CL 21
Analyzer Control
Major problems associated with sensor/transmitter:
Dead time from sampling of process stream
Measurement noise due to poor mixing
(sample is not representative)
Sensors are slow,
sensitive to temperature and other process variables
Discontinuous in time usually
The important parameter:
ratio of dead time to process time constant
Chen CL 22
Case 1:
sampling time and total dead time
process time constant
Use PID controllers
Any tuning formula could be used
Synthesis formula have an advantage over the others
Case 2:
sampling time and total dead time
process time constant
Process is fast relative to the same frame in which it can be
measured
Situation is eectively the same as that of a fast process
A pure I controller is suggested by controller synthesis
Chen CL 23
Typical Tuning Values for Particular Loops
Chen CL 24
Practical Controller Tuning Tips
Chen CL 25
Practical Controller Tuning Tips
For making ecient and satisfying controller tuning
Controller tuning need only be approximate rather than
precise
Chen CL 26
Practical Controller Tuning Tips
Tune Coarse, Not Fine
Performance of a PID controller is NOT sensitive to precise
adjustment of its tuning parameters
There is satisfaction in the large improvements in performance
achievable by coarse tuning
frustration in improving performance by ne tuning
Controller tuning need only be approximate rether than precise
An expert seldom increases a parameter to less than twice or
decreases it by less than half its current value
Chen CL 27
Practical Controller Tuning Tips
Tune with Condence
Any of parameters may be adjusted to make up for nonoptimal
values of the other parameters
A successful approach is:
Select T
I
rst
Set T
D
to about one fourth of T
I
Adjust K
c
to obtain tight control of C.V. without undue variations in the
M.V.
If response is too oscillatory
double T
I
, T
D
, readjust K
c
If response is too slow in approaching set point
halve T
I
, T
D
, readjust K
c
When satisfactory performance is obtained
leave it alone, do NOT try to ne tune it further
Fine tuning it will result in disappointment
because of the insignicant incremental improvement
Chen CL 28
Practical Controller Tuning Tips
Use All of Available Information
Enough information about the process equipment may be gathered
to estimate process gain, time constant, dead time without having
to resort to openloop test
Information can also be gathered during trialanderror tuning
Estimating T
I
, T
D
from period of oscillation or total dalay
( +d) around the loop
+ d: can be estimated by time dierence between peaks in
controller output (or transmitter signal)
Chen CL 29
Practical Controller Tuning Tips
Try A Longer Integral Time
Poor loop response can many times be traced to trying to bring
the CV back to its SP faster than the process can respond
Increasing T
I
Increasing controller gain, improving response
Chen CL 30
Practical Controller Tuning Tips
Tuning Very Controllable Processes:
d
< 0.1
Having very large ultimate gains
Dicult to determine K
U
, T
U
by ultimate gainperiod method
M.E.I. formula give very high gains and very fast reset time
Previous tuning formula: not suitable for
d
< 0.1
to let good judgment override the formula
Chen CL 31
Practical Controller Tuning Tips
Tuning Very Uncontrollable Processes:
d
> 1.0
Even optimally tuned feedback controller will result in poor
performance:
Large initial deviations on disturbance inputs
Slow return to set point change
Improved performance can be achieved through feedforward
control, dead time compensation in feedback controller
Chen CL 32
Practical Controller Tuning Tips
Beware of Problems Not Related to Tuning
Reset windup, caused by saturation of controller output
Interaction between loops ( decoupling)
Processes with inverse or overshoot response, caused by parallel
eects of opposite direction between a process input and C.V.
Changes in process parameters because of nonlinearities
adaptive control
Chen CL 33
Integrated Tuning and Diagnosis
Chen CL 34
Integrated Tuning and Diagnosis
Problems Out of Tuning: Poor Control Performance
Poor controller tuning
Bad control conguration
Nonlinearities in the valve
(stick, hysteresis )
Improperly sized valves and transmitters
Important: to discover problems before initializing
controller tuning
Chen CL 35
Friction in the Valve
Too large static friction (stiction) in valve
degraded control performance
To measure amount of friction:
making small change in control signal and
checking process output (or valve stem)
Chen CL 36
Static friction in valve
Stickslip motion
Process output oscillates around setpoint
(control triangular; measurement square)
Chen CL 37
Diagnosis for Oscillation
Oscillation
Detune PID (many operators will do this)
Oscillation with larger period !
To determine the cause of oscillation:
Manual control:
check if oscillations are generated inside or outside the loop
Check friction:
making small changes in control signal
checking if measurement signal follows
Chen CL 38
Chen CL 39
Hysteresis in the Valve
Wear hysteresis (backlash) in valve or actuator
Measurement of amount of hysteresis (I):
Two step changes in control signal (same direction)
3rd step in opposite direction (same size to 2nd step)
Hysteresis =
y
K
p
, K
p
: process gain, y = y
3
y
1
Chen CL 40
Measurement of amount of hysteresis (II):
Ramped control signal upwards and downwards
Hysteresis: horizontal distance between two lines
Chen CL 41
Closedloop with large hysteresis: linear drift
Chen CL 42
Other Nonlinearities
Even valves with a small static friction and hysteresis often
have a nonlinear characteristics (sensor, transmitter )
Total characteristic of process can be obtained by checking static
relation between control signal and measured signal
Ex: larger gain at larger valve positions
gain scheduling ?
Chen CL 43
Integrated Tuning and Diagnosis
Online detection methods (?) are important to continuous
adaptation
Online detection:
Monitor control performance
Give alarm if process dynamics change
Adaptive control:
Monitor control performance
Change controller parameters if process dynamics change
It is important to determine why the performance has changed
before actions are taken
Lack of online detection methods in adaptive controller is perhaps
the major reason for relatively few applications of continuous
adaptive control available today
Chen CL 44
Tuning for Quarter Decay Ratio
Chen CL 45
Stability of Feedback Loop
Loop is unstable when a small change in disturbance
or set point causes the system to deviate widely from
its normal operating point
Causes of Instability
Controller has the incorrect action
instability is manifested by controller output running away to
either its upper or lower limit
Controller is tuned too tightly
K
c
too high ?, T
I
too small ? T
D
too high ?
Process is inherently unstable (rare)
Chen CL 46
Oscillatory type of instability is caused by the
controller having
A too high gain, or
A too fast integral time, or
A too high derivative time
We need a simple method for determining the
ultimate gain and period of oscillation
(The process starts to become oscillation)
Chen CL 47
Determination of Ultimate Gain/Period
Ultimate Gain: K
cu
K
cu
: the gain of a P controller at which the loop oscillates with
constant amplitude
A measure of the controllability of the loop
(larger Ultimate Gain easier loop)
K
cu
: gain at which loop is at threshold of instability
K
c
< K
cu
: stable; K
c
> K
cu
: unstable
Ultimate Period: T
U
(period of oscillations) a measure
of speed of response of the loop
(longer period slower loop)
Chen CL 48
Procedure for determining K
cu
and T
U
:
Remove integral and derivative modes
Carefully increase K
c
in steps
Disturb loop (small step setpoint change)
observe response of CV and MV
Constant amplitude of oscillations: K
c
K
cu
average period of oscillation: T
U
Chen CL 49
Tuning for QuarterDecay Ratio
(QDR) Response
ZieglerNichols (1942)
Controller K
c
T
I
T
D
P 0.50K
cu
 
PI 0.45K
cu
T
U
/1.2 
PID series 0.60K
cu
T
U
/2.0 T
U
/8
PID parallel 0.75K
cu
T
U
/1.6 T
U
/10
Chen CL 50
Note:
Additional lag introduced by integral mode
a reduction of 10% in QDR gain from P to PI
Derivative mode increases controlability of the loop
allows increasing 20% gain from P to PID
T
I
= 4T
D
in series PID
Tuning parameters for QDR are NOT unique
Chen CL 51
Example: Ultimate Gain Tuning of A Steam
Heater
A 2
o
C change in set point is used to start the oscillations
Try K
c
= 8, 12
= K
cu
= 12%/% (8.33%PB), T
U
= 0.60min
Chen CL 52
P control: K
c
= 0.50 12 = 6.0 %/% (17%PB)
PI control: K
c
= 0.45 12 = 5.4 %/% (18%PB)
T
I
= 0.6/1.2 = 0.50 min
PID control: K
c
= 0.60 12 = 7.2 %/% (14%PB)
T
I
= 0.6/2 = 0.30 min
T
D
= 0.6/8 = 0.075 min
Chen CL 53
Response of Ultimate Gain Tuning of A Steam
Heater
Chen CL 54
Practical Ultimate Tuning Tips
It is NOT absolutely necessary to force the loop to
oscillate with constant amplitude in determining K
cu
,
T
U
T
U
does not vary drastically as loop approaches ultimate
condition
Any oscillation that would allow a rough estimate of T
U
gives
good enough values of T
I
and T
D
K
c
can be adjusted to obtain an acceptable response
Example: steam heater on last page
K
c
= 8%/%
T
U
= 0.7 min (15% o from T
U
)
Chen CL 55
Performance of feedback controller is NOT usually
sensitive to tuning parameters
(a waste of time to change tuning par.s by less than 50%)
Recommended parameter adjustment policy is to leave
T
I
and T
D
xed at values calculated from tuning
formula and adjust K
c
to obtain desired response
Chen CL 56
Other Methods to Determine Ultimate
Gain and Ultimate Period
An Approximate Experiment
Start out like you are going to make a closedloop test
Increase controller gain until you get 1/4 decay closed
loop response
K
cq
: corresponding controller gain
T
q
: period of 1/4 decay
Estimate of K
cu
, T
U
:
K
cu
5
3
K
cq
= 1.67K
cq
T
U
0.9T
q
Chen CL 57
Relay Method
Chen CL 58
Need for Alternatives to Ultimate Gain
Tuning
It is not always possible to determine K
cu
and T
U
of a
loop
K
cu
and T
U
do NOT give insight into which process
or control system characteristics could be modied to
improve performance
Chen CL 59
More fundamental methods of characterizing process
dynamics are needed to guide such modications
Openloop reactioncurve methods
Closedloop reactioncurve methods
There is also the need to develop tuning formula for
response other than QDR response
Optimization methods
Controller synthesis
Internal Model Control
Dominant pole placement
Chen CL 60
OpenLoop Testing of Process Dynamics
Purpose of openloop test: to determine process TF
TF is a more fundamental model than ultimate gain and period
Two signals of interest:
Controller output (u(t)),
Transmitter output (y(t)) (0% 100%)
G(s) =
Y (s)
U(s)
Y (s) = L{y(t) y}
U(s) = L{u(t) u}
Chen CL 61
Procedure for performing an openloop test:
Keep steadystate (automatic or manual control): u = u, y = y
Switch into manual control
Cause a step change: u(t) = u +A
Record transmitter output y(t) until new steadystate is reached
Analysis of recorded data, obtaining parameters in G(s)
Chen CL 62
Two Parameters Model
from OpenLoop Step Test
Use 2 parameters to characterize process dynamics
Parameter d: how long
Parameter a: how fast (?)
Advantage: one simple test
Disadvantage: vague meaning of a
Chen CL 63
QDR Tuning Based on 2Parameters Model
gain integral time derivative time
P K
c
=
1
a
 
PI K
c
= 0.9
1
a
T
I
= 3.33 d 
PID series K
c
= 1.2
1
a
T
I
= 2.0 d T
D
= 0.5 d
Chen CL 64
First Order Plus DeadTime Model
3parameters FOPDT model: G(s) =
Ke
ds
s + 1
d: how long it takes for the controller to detect
the beginning of change in transmitter output
: how fast the controlled variable changes
K: how much the CV changes for a given change in CO
Chen CL 65
QDR Tuning Based on FOPDT Model
FOPDT model:
Ke
ds
s + 1
Note: slope =
Aa
d
=
AK
=a = K
d
c
= 1.2
K d
T
I
= 2.0 d T
D
= 0.5 d
Chen CL 66
FOPDT Model from Step Response
FOPDT model:
y(s)
u(s)
= G(s) =
Ke
ds
s + 1
dy(t)
dt
+ y(t) = Ku(t d)
or
dY (t)
dt
+ Y (t) = KU(t d)
Chen CL 67
Step response and some characteristics:
u(t) = A (for t 0)
y(t) = AK
_
1 e
(td)/
y(t = ) = A K
y(t = d +
3
) = 0.283 KA
y(t = d + 0.4) =
1
3
KA
y(t = d +) = 0.632 KA
y(t = d + 1.1) =
2
3
KA
dy(t = d)
dt
=
KA
=
dy(t)
dt
max
Chen CL 68
FOPDT Model: Process Gain from Step Test
Steadystate gain K for a selfregulating process
K =
y
u
ss
=
%transmitter output, %TO
%controller output, %CO
Chen CL 69
Example: step test on steam heater
u = 0.8 mA
(100 0)%CO
(20 4) mA
= 5 %CO
y = 5
o
C
(100 0)%TO
(150 50)
o
C
= 5 %TO
K =
5%TO
5%CO
= 1.0
%TO
%CO
Chen CL 70
FOPDT Model: Time Constant and Dead Time
Tangent Method (t 1)
Find point with maximum slope, take tangent line
Tangent line crosses initial steady state ( y): t
1
= d
Tangent line crosses new steady state ( y +KA): t
2
= d +
d = t
1
; = t
2
t
1
Problems:
Tangent line is not very reproducible
Larger estimate of time constant tighter controller tuning
Chen CL 71
FOPDT Model: Time Constant and Dead Time
Tangent and Point Method (t 2)
Find point with maximum slope, take tangent line
Tangent line crosses initial steady state ( y): t
1
= d
Response reaches 63.2% of total steadystate change:
t
0.632
= d +
d = t
1
; = t
0.632
t
1
Problems:
Tangent line is not very reproducible
Shorter estimate of conservative tuning
Chen CL 72
FOPDT Model: Time Constant and Dead Time
TwoPoint Method (t 3)
Step response reaches 28.3% of SS change: t
0.283
= d +
3
Step response reaches 63.2% of SS change: t
0.632
= d +
= 1.5 (t
0.632
t
0.283
) d = t
0.632
Chen CL 73
FOPDT Model: Time Constant and Dead Time
TwoPoint Method (t 4)
Step response reaches 1/3 of SS change: t
1/3
= d + 0.4
Step response reaches 2/3 of SS change: t
0.632
= d + 1.1
= 1.4(t
2/3
t
1/3
) d = t
2/3
1.1
Advantage: more reproducible
Problem: longer estimate of d, shorter estimate of
Chen CL 74
OpenLoop Testing: Steam Heater
Step response: gure 3.4
Tangent method:
d = 8.0 sec = 0.13 min
= 57.2 8.0 = 49.2 sec = 0.82 min
Tangentandpoint method:
d = 8.0 sec = 0.13 min
T
63.2%
= 90 + 5 0.632 = 93.2
o
C
t
63.2%
= 45 sec
= 45 8.0 = 37 sec = 0.62 min
Chen CL 75
Twopoint method:
T
28.3%
= 90 + 5 0.283 = 91.4
o
C
T
63.2%
= 90 + 5 0.632 = 93.2
o
C
t
28.3%
= 23 sec t
63.2%
= 45 sec
= 1.5(45 23) = 33 sec = 0.55 min
d = 45 33 = 12 sec = 0.2 min
Chen CL 76
QDR Tuning: Steam Heater
Use process parameters estimated by tangent method
FOPDT model: G(s) =
1 (%/%) e
0.13s
0.82s + 1
Controller tuning parameters:
K
c
(%/%) T
I
(min) T
D
(min)
P 6.2  
PI 5.5 0.44 
PID series 7.4 0.27 0.07
A 10
o
C step increase in process inlet temperature:
Chen CL 77
The P and PI controllers:
produce about the same maximum initial deviation
The PID controller:
Could give smaller initial deviation
Could maintain the temperature closer to the set point for the entire
response
Produce about one third as much IAE as PI controller
Chen CL 78
OpenLoop Testing: Heat Exchanger
Process dynamics:
G(s) =
_
50
30s + 1
o
C
kg/s
__
1
10s + 1
%TO
o
C
__
0.016
3s + 1
kg/s
%CO
_
Openloop test:
Chen CL 79
FOPDT models:
K =
4
o
C
5%
100%TO
(15050)
o
C
= 0.80
%TO
%CO
G
1
(s) =
0.80e
7.2s
54.3s + 1
t 1
G
2
(s) =
0.80e
7.2s
37.8s + 1
t 2
G
3
(s) =
0.80e
11.2s
33.8s + 1
t 3
G
4
(s) =
0.80e
12s
33.6s + 1
t 4
d = 7.2 t
3
= 61.5 = 61.5 7.2 = 54.3
C(t
2
) = 0.632(4) = 2.53 t
2
= 45 = 45 7.2 = 37.8
t
1
= 22.5 t
2
= 45 = 3(45 22.5)/2 = 33.8
d = 45 33.8 = 11.2
t
1/3
= 25 t
2/3
= 49 = 1.4(49 25)/2 = 33.6
d = 49 1.1 = 12
Chen CL 80
FOPDT Model Identication
Example: A Vacuum Filter
Consider a vacuum lter shown below.
This process is part of a waste treatment
plant. The sludge enters the lter at
about 5% solids. In the vacuum lter,
the sludge is dewatered to about 25%
solids. The lterability of the sludge in
the rotating lter depends on the pH of
the sludge entering the lter. One way
to control the moisture of the sludge to
the incinerator is by adding chemicals
(ferric chloride) to the sludge feed to
maintain the necessary pH. Fi.P71 shows
a proposed control scheme. The moisture
transmitter has a range of 55% to 95%.
The following data have been obtained
from a step test on the output of the
controller (MC70) of +12.5%CO.
Response (m(t)%) to u = 12.5%
Time (min) Moisture (%) Time (min) Moisture (%)
0.0 75.0 10.5 70.9
1.0 75.0 11.5 70.3
1.5 75.0 13.5 69.3
2.5 75.0 15.5 68.6
3.5 74.9 17.5 68.0
4.5 74.6 19.5 67.6
5.5 74.3 21.5 67.4
6.5 73.6 25.5 67.1
7.5 73.0 29.5 67.0
8.5 72.3 33.5 67.0
9.5 71.6
Chen CL 81
When the input moisture to the lter was
changed by 2.5%. the following data were
obtained.
1. Draw a block diagram for the moisture
control loop. Include the possible
disturbances.
2. Use t3 to estimate parameters of
FOPDT models of the two transfer
functions.
3. Give an idea of the controllability of the
output moisture. What is the correct
controller action.
4. Obtain the gain of a proportional
controller for minimum minimum IAE
response. Calculate the oset for a 5%
change in inlet moisture.
Response (m(t)%) to m
i
= 2.5%
Time (min) Moisture (%) Time (min) Moisture (%)
0.0 75.0 11 75.9
1.0 75.0 12 76.1
2.0 75.0 13 76.2
3.0 75.0 14 76.3
4.0 75.0 15 76.4
5.0 75.0 17 76.6
6.0 75.1 19 76.7
7.0 75.3 21 76.8
8.0 75.4 25 76.9
9.0 75.6 29 77.0
10. 75.7 33 77.0
Chen CL 82
FOPDT Model Identication
A Vacuum Filter (solution)
K
T
=
100 0
95 55
= 2.5
% TO
% moist
m = 12.5 %CO x = 67.0 75.0 = 8.0 % moist
K
pump
K
P
=
8.0
12.5
= 0.64
% moist
% CO
K
1
= K
pump
K
P
K
T
= 1.60
% TO
% CO
x
1
= 75.0 + 0.283(8.0) = 72.73 % moist
t
1
= 7.5 +
72.73 73.0
72.3 73.0
(1.0) = 7.88 min
x
2
= 75.0 + 0.632(8.0) = 69.94 % moist
t
2
= 7.5 +
69.94 73.0
69.3 70.3
(2.0) = 12.21 min
=
3
2
(12.21 7.88) = 6.5 min
= 12.21 6.5 = 5.7 min
G
p
(s) =
1.6e
5.7s
6.5s + 1
Chen CL 83
FOPDT Model Identication
A Vacuum Filter (solution)
K
T
=
100 0
95 55
= 2.5
% TO
% moist
m = 12.5 %CO x = 67.0 75.0 = 8.0 % moist
K
pump
K
P
=
8.0
12.5
= 0.64
% moist
% CO
K
1
= K
pump
K
P
K
T
= 1.60
% TO
% CO
x
1
= 75.0 + 0.283(8.0) = 72.73 % moist
t
1
= 7.5 +
72.73 73.0
72.3 73.0
(1.0) = 7.88 min
x
2
= 75.0 + 0.632(8.0) = 69.94 % moist
t
2
= 7.5 +
69.94 73.0
69.3 70.3
(2.0) = 12.21 min
=
3
2
(12.21 7.88) = 6.5 min
= 12.21 6.5 = 5.7 min
G
p
(s) =
1.6e
5.7s
6.5s + 1
Chen CL 84
FOPDT Model Identication
A Vacuum Filter (solution)
x
i
= 2.5 %% moist x = 77.0 75.0 = 2.0 % moist
K
P
2
=
2.0
2.5
= 0.8
% moist
% moist
K
2
= K
P
2
K
T
= 2.0
% TO
% moist
x
1
= 75.0 + 0.283(2.0) = 75.57 % moist
t
1
= 8 +
75.57 75.4
75.6 75.4
(1.0) = 8.8 min
x
2
= 75.0 + 0.632(2.0) = 76.26 % moist
t
2
= 13 +
76.26 76.2
76.3 76.2
(1.0) = 13.6 min
=
3
2
(13.6 8.8) = 7.2 min
= 13.6 7.2 = 6.4 min
G
(s) =
2.0e
6.4s
7.2s + 1
Chen CL 85
FOPDT Model Identication
A Vacuum Filter (solution)
=
5.7
6.5
= 0.88 (quite high ratio, not very controllable)
K
c
=
0.902
1.60
_
5.7
6.5
_
0.985
= 0.64
% CO
% TO
oset = 0
2.0
1 + (0.64)(1.60)
(5) = 4.9 % TO (2.0 % moist)
K
c
=
0.902
1.60
_
5.7
6.5
_
1
= 0.64
% CO
% TO
= 3.33(5.7) = 19 min
Chen CL 86
FOPDT Model Identication
Example: An Absorber
A gas with a composition of 90mole%
air and 10mole% ammonia is entering an
absorber. Before this gas is vented to
the atmosphere, it is necessary to remove
most of the ammonia from it. This will
be done by absorbing it with water. The
absorber has been designed so that the
outlet ammonia in the vapor is 50 ppm.
The following table gives the response to a
step change in water ow to the absorber.
Approximate the response of the absorber
with a rstorderplusdeadtime model.
Time (s) Water Flow, gpm Outlet Conc
0 250 50.00
0 200 50.00
20 200 50.00
30 200 50.12
40 200 50.30
50 200 50.60
60 200 50.77
70 200 50.90
80 200 51.05
90 200 51.20
100 200 51.26
110 200 51.35
120 200 51.48
130 200 51.55
140 200 51.63
160 200 51.76
180 200 51.77
250 200 51.77
Chen CL 87
FOPDT Model Identication
Example: An Absorber (solution)
K
T
=
100 0
200 0
= 0.5
% TO
ppm
K
V
=
500 0
100 0
= 5
gpm
% CO
f = 200 250 = 50 gpm y = 51.77 50.00 = 1.77 ppm
K
P
=
y
f
=
1.77
50
= 0.0345
ppm
gpm
K = K
V
K
P
K
T
=
_
5
gpm
% CO
_
_
0.0345
ppm
gpm
__
0.5
% TO
ppm
_
= 0.0885
% TO
% CO
y
1
= 50.0 + 0.283(1.77) = 50.50 ppm
t
1
= 40.0 +
50.50 50.30
50.60 50.30
(10) = 46.70 sec
y
2
= 50.0 + 0.632(1.77) = 51.13 ppm
t
2
= 80.0 +
51.1351.05
51.20 51.05
(10) = 85.28 sec
=
3
2
(85.28 46.70) = 57.9 sec = 0.96 min
= 85.28 57.9 = 27.4 sec = 0.46 min G
p
(s) =
0.0354e
0.46s
0.96s + 1
Chen CL 88
FOPDT Model Identication
Example: A Furnace
Consider the furnace, which is used to heat
the supply air to a catalyst regenerator.
The temperature transmitter is calibrated for
300
o
F to 500
o
F. The following response data
were obtained for a step change of +5% in
the output of the controller. Fit the process
data by a rstorderplusdeadtime model,
K
p
e
s
s + 1
.
time (min) T(t)
o
F time (min) T(t)
o
F
0 425 5.5 436.6
0.5 425 6.0 437.6
1.0 425 7.0 439.4
2.0 425 8.0 440.7
2.5 426.4 9.0 441.7
3.0 428.5 10.0 442.5
3.5 430.6 11.0 443.0
4.0 432.4 12.0 443.5
4.5 434 14.0 444.1
5.0 435.3 20.0 445.0
Chen CL 89
FOPDT Model Identication
Example: A Furnace (solution)
K
T
=
100 0
500 300
= 0.5
% TO
o
F
m = 5 %CO T = 445 425 = 20
o
F
K
P
1
=
20
5
= 4.0
o
F
% CO
K
1
= K
P
1
K
T
= 4.0(0.50) = 2.0
% TO
% CO
T
1
= 425 + 0.283(20) = 430.7
o
F
t
1
= 3.5 +
430.7 430.6
432.4 430.6
(0.5) = 3.52 min
T
2
= 425 + 0.632(20) = 437.6
o
F
t
2
= 6.0 min
=
3
2
(6.0 3.52) = 3.72 min
= 6.0 3.72 = 2.28 min
G
p
(s) =
2.0e
2.28s
3.72s + 1
Chen CL 90
FOPDT Model Identication
Example: A DoubleEect Evaporator
Consider the typical control system for the doubleeect evaporator shown below.
The composition of the product out of the last eect is controlled by manipulating
the steam to the rst eect. The design feed rate and composition are 50, 000
lb/hr and 5.0 weight percent. The composition sensor/transmitter has a range of
10 35 weight percent.
Chen CL 91
The following two gures show the openloop response of product composition for
a change of 2.5% in controller output (left) and a change of 0.75% by weight in
composition of solution entering rst eect (right), respectively.
1. What should be the failsafe position of the control valve ? What is the correct
controller action ?
2. Draw a complete block diagram with the transfer of each block (use t1).
3. Tune a series PID controller for quarter decay ratio response.
4. Tune a PI controller for 5% overshoot, using the controller synthesis method.
Chen CL 92
FOPDT Model Identication
Example: A DoubleEect Evaporator (soln)
K
T
=
100 0
35 10
= 4.0
% TO
wt %
m = 2.5 %CO x = 24.7 21.5 = 3.2 wt %
K
V
K
P
1
=
3.2
2.5
= 1.28
wt %
% CO
K
1
= K
V
K
P
1
K
T
= 1.28(4.0) = 5.12
% TO
% CO
x
1
= 21.5 + 0.283(3.2) = 22.4 wt %
t
1
= 250 sec
x
2
= 21.5 + 0.632(3.2) = 23.5 wt %
t
2
= 415 sec
=
3
2
(415 250) = 248 sec = 4.12 min
= 415 248 = 167 sec = 2.79 min
G
p
(s) =
5.12e
2.79s
4.12s + 1
Chen CL 93
x
F
= 0.75 %wt % x = 24.7 21.5 = 3.2 wt %
K
V
K
P
1
=
3.2
0.75
= 4.27
wt %
% CO
K
2
= K
P
2
K
T
= 4.27(4.0) = 17.07
% TO
wt %
x
1
= 22.4 wt % t
1
= 140 sec
x
2
= 23.5 wt % t
2
= 230 sec
=
3
2
(230 140) = 135 sec = 2.25 min
= 230 135 = 95 sec = 1.58 min
G
(s) =
17.07e
1.58s
2.25s + 1
Chen CL 94
QDR Tuning: A Summary
QDR Tuning Based on Ultimate Gain and Period
Controller Gain Integral Time Derivative Time
P K
c
= 0.50K
cu
 
PI K
c
= 0.45K
cu
T
I
= T
U
/1.2 
PID parallel K
c
= 0.75K
cu
T
I
= T
U
/1.6 T
D
= T
U
/10
PID series K
c
= 0.60K
cu
T
I
= T
U
/2.0 T
D
= T
U
/8
Chen CL 95
QDR Tuning: A Summary
QDR Tuning Based on 2Parameters Model
gain integral time derivative time
P K
c
=
1
a
 
PI K
c
= 0.9
1
a
T
I
= 3.33 d 
PID series K
c
= 1.2
1
a
T
I
= 2.0 d T
D
= 0.5 d
Chen CL 96
QDR Tuning: A Summary
QDR Tuning Based on FOPDT Model
gain integral derivative
P K
c
=
K d
 
PI K
c
= 0.9
K d
T
I
= 3.33 d 
PID series K
c
= 1.2
K d
T
I
= 2.0 d T
D
= 0.5 d
Chen CL 97
QDR Tuning: A Summary
Major Conclusions
K
c
1/K
Loop response depends on loop gain (K
c
K)
Gain of any element is changed because of recablication, re
sizing, or nonlinearity
response would change unless K
c
is readjusted
K
c
must be reduced when R d/ increases
Controllability of the loop decreases when R
Uncontrollability parameter of the loop: R = d/
A long dead time means loop is less controllable
only if time constant is short
A loop with a dead time of several minutes would be just as
controllable as one with a dead time of a few seconds if the
uncontrollability parameter for both loops is the same
Chen CL 98
Speed of the controller (determined by T
I
and T
D
)
must match speed of process response (here, d)
If performance of a welltuned controller was to
deteriorate under operation check a change in:
Process gain
Uncontrollability parameter
Speed of response
Chen CL 99
QDR Tuning: A Summary
Applying the QDR Tuning Formula
Range of process uncontrollability parameter: 0.1 < R < 0.3
Apply to series PID controller
Formula were developed for continuous analog controllers
For digital controller: d d +
T
2
(T: sampling period)
Increasing T would reduce controllability of the loop:
R =
d+
T
2
For most loops, control performance does not improve much when
sampling time is reduced beyond one tenth of time constant
Chen CL 100
Tuning for Min Error Integrals
Chen CL 101
Tuning for Minimum Error Integrals
Major Limitations of QDR Tuning
Narrow range of usable uncontrollability parameter
(0.1 0.3)
An innite no. of combinations of PI, PID tuning
parameters
Chen CL 102
The Minimum Error Integrals
Integral of Absolute value of the Error ( IAE)
IAE =
_
e(t)dt
Integral of Squared Error ( ISE)
ISE =
_
e
2
(t)dt
Chen CL 103
Integral of Timeweighted Absolute value of the Error ( ITAE)
ITAE =
_
te(t)dt
Integral of Timeweighted Square of the Error ( ITSE)
ITSE =
_
te
2
(t)dt
Aspects of closedloop response for dierent MEIs:
ISE, ITSE: weight large errors more than IAE, ITAE
tighter, more oscillatory response
ITAE, ITSE: put more weight on errors at end of response
having larger initial deviations than IAE, ISE
Chen CL 104
Tuning for Disturbance Changes
Tuning for min. IAE on disturbance inputs (Lopez et al., 1967)
Gain Integral Time Derivative Time
P KK
c
= 0.902
0.985
 
PI KK
c
= 0.984
0.985
T
I
= 1.645
0.707

PID parallel KK
c
= 1.435
0.921
T
I
= 1.139
0.749
T
D
= 0.482
1.137
Tuning for min. ITAE on disturbance inputs
Gain Integral Time Derivative Time
P KK
c
= 0.490
1.084
 
PI KK
c
= 0.859
0.977
T
I
= 1.484
0.680

PID parallel KK
c
= 1.357
0.947
T
I
= 1.188
0.738
T
D
= 0.381
0.995
Chen CL 105
Tuning for min. ISE on disturbance inputs
Gain Integral Time Derivative Time
P KK
c
= 1.411
0.917
 
PI KK
c
= 1.305
0.959
T
I
= 2.033
0.739

PID parallel KK
c
= 1.495
0.945
T
I
= 0.908
0.771
T
D
= 0.560
1.006
Tuning for min. ITSE on disturbance inputs (None)
Chen CL 106
Conclusions for MEI Tunings for
Disturbance
ISE formula result in the tightest tuning (highest gain, shortest
integral time)
ITAE results in the loosest tuning
IAE results in intermediate tuning
ITSE would probably fall between IAE and ISE in tightness of
tuning
Chen CL 107
K
c
: inversely proportional to process gain
Optimum loop gain decreases with its uncontrollability parameter
Speed of response of controller must match speed of response of
process
MEI formula relate T
I
, T
D
to rather than d (unlike QDR)
Chen CL 108
Tuning for Setpoint Changes (Rovira 1981)
Setpoint suddenly changed
error changes from zero to a nite value instantaneously
Disturbances input
error grows gradually higher controller gains
Tuning for disturbance assume same rate of response for
disturbance input and for change in controller output
Tuning for setpoint:
smaller gains, smaller derivative times, longer integral times
Chen CL 109
Tuning for min. IAE on setpoint inputs
Gain Integral Time Derivative Time
PI KK
c
= 0.758
0.861
T
I
=
1
1.02 0.323

PID parallel KK
c
= 1.086
0.869
T
I
=
1
0.74 0.130
T
D
= 0.348
0.914
Tuning for min. ITAE on setpoint inputs
Gain Integral Time Derivative Time
PI KK
c
= 0.586
0.916
T
I
=
1
1.03 0.165

PID parallel KK
c
= 0.965
0.855
T
I
=
1
0.80 0.147
T
D
= 0.308
0.929
Chen CL 110
Application of Minimum Error Integral Formula
Range of process uncontrollability parameter: 0.1 1.0
Apply to the parallel PID controllers
Tuning formula developed for continuous analog controllers
When applied to digital controllers: d d +
T
2
Many digital controllers oer option of having either the D mode
or the P mode or both act on CV instead of on error
P and D mode act on CV use formula for disturbance
(tighter tuning without danger of excessive overshoot)
Slave controllers in cascade: use setpoint tuning
P mode act on error
CO responds quickly to setpoint changes
Chen CL 111
Comparative Examples of MEI Tunings
Process: Steam Heater
Chen CL 112
Model parameters: (Gain = 1.0 %TO/%CO)
Tangent Tangent and TwoPoint
Method Point Method Method
Time Constant, min 0.82 0.62 0.55
Dead Time, min 0.13 0.13 0.20
Uncontrollability 0.16 0.21 0.36
Ziegler and Nichols used tangent method to develop their
empirical formulas, working with actual processes
use tangent method for QDR response
Lopez/Rovira developed MEI formulas using true FOPDT models
any method can be used for determining a FOPDT
Tangent method will result in tightest tuning parameters
Twopoint method will result in most conservative tuning
Chen CL 113
MEI PI Responses for Disturbance Inputs
Use process parameters estimated by tangentandpoint method
PI tuning parameters:
minimum IAE 4.4 0.34
minimum ISE 5.7 0.40
minimum ITAE 3.8 0.32
Chen CL 114
Response for a 10
o
C step increase in T
i
:
NO practical dierence between the three responses
ISE tuning produces a slightly faster response
IAE tuning and response are intermediate of the other two
Overall dierences between the three sets of tuning parameters are
insignicant
Chen CL 115
Disturbance versus Setpoint Tuning
Compare performance of a series PID controller tuned by formula
for min IAE on disturbance and set point inputs
Steam heater parameters estimated by tangentandpoint
method
Series PID tuning parameters:
parallel PID controller, disturbance tuning:
K
c
= 5.9 %/% T
I
= 0.22 min T
D
= 0.05 min
parallel PID controller, set point tuning:
K
c
= 4.1 %/% T
I
= 0.87 min T
D
= 0.05 min
Chen CL 116
the equivalent series PID controller parameters:
K
c
(%/%) T
I
(min) T
D
(min)
Disturbance Tuning 3.8 0.14 0.08
Set Point Tuning 3.8 0.81 0.06
T
I
set point
T
I
disturbance
Chen CL 117
Disturbance versus Setpoint Tuning
Step disturbance response
(10
o
C in T
i
)
Disturbance tuning results in:
A smaller maximum deviation
Quicker return to set point
More oscillatory response
IAE: 64% of the IAE for SP tuning
Step set point
response
( 5
o
C in S.P.)
SP tuning results in:
Very little overshoot
Better approach to new SP
IAE: 48% of the IAE for
disturbance tuning
Chen CL 118
Disturbance versus Setpoint Tuning
Discussion
Each set of tuning formula performs better than the
other on the input for which it is intended
Uncontrollability: 0.22
derivative mode results in superior response
QDR and various M.E.I. formula for disturbance inputs
result in similar tuning parameters
Chen CL 119
Controller Synthesis
Chen CL 120
Controller Synthesis
G(s): process; G
c
: controller; G
c
: closedloop TF
Given G(s), specic G
c(s)
G
c
(s)
G
c
(s) =
G(s)G
c
(s)
1 +G(s)G
c
(s)
G
c
(s) =
1
G(s)
G
c
(s)
1 G
c
(s)
Some specic G(s), G
c
(s) will result in PIDs
Chen CL 121
Fast Processes
Process: G(s) = K
Spec: G
c
(s) =
1
c
s + 1
Controller: G
c
(s) =
1
K
c
1
s
=
K
I
s
Tuning: K
I
=
1
K
c
Fast enough to require only pure Integral control
Examples:
Exit temperature control in reformer furnaces
Some ow control loops
Chen CL 122
FirstOrder Processes
Process: G(s) =
K
s + 1
Spec: G
c
(s) =
1
c
s + 1
Controller: G
c
(s) =
K
c
_
1 +
1
s
_
= K
c
_
1 +
1
T
i
s
_
Tuning: K
c
=
K
c
T
i
=
Zero oset spec Integral mode
P mode is added to compensate for process lag
Chen CL 123
SecondOrder Processes
Process: G(s) =
K
(
1
s + 1)(
2
s + 1)
(
1
>
2
)
Spec: G
c
(s) =
1
c
s + 1
Controller: G
c
(s) =
1
K
c
_
1 +
1
1
s
_
[
2
s + 1]
= K
c
_
1 +
1
T
i
s
_
[T
d
s + 1]
Tuning: K
c
=
K
c
T
i
=
1
T
d
=
2
Chen CL 124
Derivative mode is added to compensate for second lag
(temperature loops: sensor lag PID)
Integral, Derivative times = two time constants
P mode: adjustable to obtain desired tightness of response
Lag in derivative unit is not obtained (realizable ?)
Chen CL 125
Integrating Process
Process: G(s) =
K
s(s + 1)
Spec: G
c
(s) =
1
c
s + 1
Controller: G
c
(s) =
1
K
c
[s + 1]
= K
c
[T
d
s + 1]
Tuning: K
c
=
1
K
c
T
d
=
Chen CL 126
The required lag on derivative unit is not presented but must be
included in actual implementation
P mode for integrating process:
No oset for set point changes
Disturbances cause oset because no I mode in controller
Example: liquid level control
use P mode, add D mode for lag in sensor, process, valve
Chen CL 127
Processes with Inverse/Overshoot Response
Process: G(s) =
K(1
3
s)
(
1
s + 1)(
2
s + 1)
(
1
>
2
)
Spec: G
c
(s) =
1
3
s
c
s + 1
Controller: G
c
(s) =
1
K(
c
+
3
)
_
1 +
1
1
s
_
[
2
s + 1]
= K
c
_
1 +
1
T
i
s
_
[T
d
s + 1]
Tuning: K
c
=
K(
c
+
3
)
T
i
=
1
T
d
=
2
Chen CL 128
Presence of negative lead smaller gain
Inverse/overshoot processes:
less controllable gain reduction
Examples:
Distillation columns
Exothermic chemical reactors
Result of interaction between control loops
Chen CL 129
FOPDT Processes
Process: G(s) =
Ke
ds
s + 1
Spec: G
c
(s) =
e
ds
c
s + 1
Controller: G
c
(s) =
s + 1
K
1
c
s + 1 e
ds
Case 1: e
ds
1 ds
G
c
(s) =
K(
c
+d)
_
1 +
1
s
_
Tuning: K
c
=
K(
c
+d)
T
i
=
Chen CL 130
Case 2: e
ds
1
d
2
s
1 +
d
2
s
G
c
(s) =
K(
c
+d)
_
1 +
1
s
_ _
(
d
2
)
s+1
(
c
c
+d
)(
d
2
)
s+1
_
Tuning: K
c
=
K(
c
+d)
, T
i
= , T
d
=
d
2
,
=
c
c
+d
e
ds
1 ds degradation of performance
Dead time appears in denominator of gain formula
longer dead time smaller gain
A lter formula in derivative unit
Filter parameter () is not adjustable in practice
Chen CL 131
Selection of
c
Value
Min IAE for disturbance inputs:
c
= 0
PI controller: 0.1 <
d
< 0.5
PID controller: 0.1 <
d
< 1.5
Min IAE for setpoint inputs: (for 0.1 <
d
< 1.5)
PI controller:
c
=
2
3
d
PID controller:
c
=
1
5
d
5% overshoot on setpoint inputs:
c
= d K
c
=
0.5
K
d
Chen CL 132
Practical Conclusions
Spec: unity closedloop gain
I action as the basic controller mode
Simplest process complex = I PI PID
Simplest controller complex = P PI PID
I mode is indicated for very fast processes with
P mode: compensate for major time constant
D mode: compensate for 2nd time constant/delay
Chen CL 133
A simple tuning procedure:
To set integral time equal to major time constant
To set derivative time equal to 2nd time const. or
d
2
To adjust controller gain to obtain desired closedloop response
For inverse/overshoot response processes: K
c
max
=
1
K
3
For processes with dead time: K
c
max
=
1
K
d
For integrating processes:
Use P mode or PD mode (T
d
= )
Oset will result for disturbance inputs
Chen CL 134
Example: Steam Heater
Temperature control loop of a Heat Exchanger:
gain = 0.8%/%; time const. = 33.8 sec; dead time = 11.2 sec
Synthesized controller:
G
c
(s) =
33.8
0.8(
c
+ 11.2)
_
1 +
1
33.8s
_
_
_
1 + 5.6s
1 +
5.6
c
c
+ 11.2
_
_
Integral and derivative times:
T
i
= = 33.8 sec = 0.56 min
T
d
=
d
2
= 5.6 sec = 0.093 min
Chen CL 135
Min IAE gain for disturbance input:
c
= 0
= K
c
=
33.8
(0.8)(11.2)
= 3.8%/%
Min IAE gain for setpoint input:
c
=
d
5
= 2.24 sec
= K
c
=
33.8
(0.8)(11.2 + 2.24)
= 3.1%/%
5% overshoot on setpoint input:
K
c
=
(0.5)(33.8)
(0.8)(11.2)
= 1.9%/%
Chen CL 136
Min IAE parameters for setpoint inputs:
K
c
=
1.086
0.8
_
11.2
33.8
_
0.869
= 3.5%/%
T
i
=
33.8
0.74 0.13(11.2/33.8)
= 48.5 sec (0.81 min)
T
d
= 0.348(33.8)
_
11.2
33.8
_
0.914
= 4.3 sec (0.071 min)
Chen CL 137
Example: Steam Heater (cont.)
Process model: G(s) =
1 (%/%) e
0.13s
0.62s + 1
(in min)
Series PID controllers:
K
c
(%/%) T
I
(min) T
D
(min)
QDR 5.6 0.27 0.07
Min IAE Disturbance 3.8 0.14 0.08
Min IAE Set point 3.8 0.81 0.06
Synthesis (
c
= 0) 4.6 0.62 0.07
Chen CL 138
Response of heater outlet temperature to a 5
o
C raise in setpoint
The synthesis response and the min IAE setpoint response are
more conservative than the other two
Enhanced PID Control:
Cascade Control
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Enhanced PID Control: Cascade Control
What is Cascade Control ?
Motivation of using CC Control
Simple feedback CC Control
Major advantages of using CC Control
When to Use CC Control
Selection of CC Controller modes
Tuning of CC Controllers
Applications
Chen CL 2
A Preheater/Reactor Process
The Control Target
Chen CL 3
A Preheater/Reactor Process
Simple Feedback Control
Chen CL 4
A Preheater/Reactor Process
Another Feedback Control
Chen CL 5
A Preheater/Reactor Process
TwoLevel Cascade Control
Chen CL 6
A Preheater/Reactor Process
ThreeLevel Cascade Control
Chen CL 7
A Preheater/Reactor Process
Response of Feedback and 2L Cascade
25
o
C change in feed temperature to heater
Chen CL 8
A Preheater/Reactor Process
Stability Considerations
Process transfer functions:
K
V
= 3 gpm/%CO
V
= 0.2 min
K
1
= 1 C/gpm
1
= 3 min
K
3
= 0.8 C/C
2
= 1 min
4
= 4 min
5
= 1 min
K
T
1
= 0.5 %TO/C K
T
2
= 0.5 %TO/C
Chen CL 9
Simple Feedback:
Char. Eq.: 1 +
1.2G
c1
(0.2s + 1)(3s + 1)(s + 1)(4s + 1)(s + 1)
= 0
K
cu
= 4.33
%CO
%TO
,
u
= 0.507
rad
min
Chen CL 10
2L Cascade:
Inner: 1 +
1.5G
c2
(0.2s + 1)(3s + 1)(s + 1)
= 0
K
cu
2
= 17.06
%CO
2
%TO
2
K
c
2
= 0.5K
cu
2
= 8.53
%CO
2
%TO
2
Overall: 1 +
1.2G
c1
G
c2
(0.2s+1)(3s+1)(s+1)(4s+1)(s+1)
1 +
1.5G
c2
(0.2s+1)(3s+1)(s+1)
= 0
K
cu
1
= 7.2
%CO
1
%TO
1
u
= 1.54
rad
min
Chen CL 11
Summary: ultimate data for FB and cascade controls
Simple FB: K
cu
1
= 4.33 %CO/%TO
u
= 0.507 1/min
Cascade: K
cu
2
= 17.06 %CO/%TO
K
C
2
= 8.53 %CO/%TO (= 0.5K
cu
2
)
K
cu
1
= 7.2 %CO/%TO
u
= 1.54 1/min
Conclusion:
Cascade makes overall loop more stable and faster responding
(TO: Transmitter Output CO: Controller Output)
Chen CL 12
Major Advantages of Using CC Control
Any disturbances that aect slave variable
are detected and compensated by slave controller
BEFORE they aect primary variable
Controllability of outside loop is improved because
inside loop speeds up response between valve and slave
variable
Nonlinearities of process in inner loop are handled by
that loop and removed from the more important outer
loop
Chen CL 13
When to Use CC Control
When the three advantages result in signicant
improvement in control performance
Use CC control only when inner loop responding faster
than outer loop
NOTE:
CC control requires additional sensor and controller
Chen CL 14
Remarks of Using CC Control
If inner loop is NOT faster than outer loop:
Disturbances into inner loop will not be eliminated fast enough
to avoid aecting primary variable
Speeding up of inner loop would decrease controllability of overall
loop because:
Ratio of dead time to time constant would increase
Nonlinearities would become a part of slower loop
Sensor of the inner loop should be fast and reliable
Chen CL 15
Integral mode of master controller will compensate
for errors in measurement of slave variable
repeatability is more important than
accuracy for inner loop sensor
CC control would NOT be able to improve
performance of loops when:
These loops are already very controllable
These loops do not need tight control (averaging level control)
Chen CL 16
Selection of Cascade Controller Modes
Master Controller
Master controller has the same function as
single feedback controller
Selection of modes for master controller should follow
the same guidelines for single controller
Chen CL 17
Proportional Mode in Slave Controller
Slave controller must have proportional mode, act on error signal
Slave controller should follow setpoint changes as quickly as
possible with a small overshoot and decay ratio
Slave controller should transmit changes in master controller output
(slave setpoint) to nal control element at least as fast as if it is
not there
Slave controller should transmit changes in its setpoint to its output
as quickly as possible and amplify them
P control mode: K
c
1 if stability permits it
Changes in master controller output result in higher
immediate changes in nal control element than
when a single feedback loop is used
Faster response of master loop
Chen CL 18
Integral Mode in Slave Controller
Adding I mode results in a reduction of proportional gain
I mode is not needed in slave controller to eliminate oset
(I mode of master controller can adjust setpoint
of slave controller to compensate for oset)
IF slave loop is fast and subject to large disturbances
Oset in slave controller would require
corrective action by master controller
A deviation of primary CV from its setpoint
A fastacting I mode on slave controller would eliminate the need
for corrective action from master controller
Integral mode should not be used in these slave loops:
Gain is limited by stability
Disturbances into inner loop do not cause large osets in secondary CV
Chen CL 19
Derivative Mode in Slave Controller
Slave controller does not require derivative mode when inner loop
is fast and very controllable
D mode in slave controller is usually not suggested:
PID + PID too many tuning variables
Undesirable to put two derivative units in series
Derivative of slave controller should act on process variable instead
of error
Derivative unit could be used to compensate for sensor lag or loop
dead time
Use derivative unit to allow for a higher slave controller gain with
less overshoot and low decay ratio
Chen CL 20
Tuning of Cascade Controllers
General Guidelines
Tuning cascade control system: from inside out
Tune innermost loop rst, then the loop around it
Inner loop is part of the process for the outer loop
A loop must be tuned tighter and faster than the loop around it
Otherwise, setpoint of slave loop would vary more than its measured
variable poorer control of master variable
Slave variable should follow its setpoint as quickly as possible with
little overshoot (5%) and oscillations
1/4 decay ratio response is not recommended (overshoot: 50%)
Use IAE tunings for set point changes
Master loop can be tuned to follow any desired performance
criterion
Chen CL 21
Tuning of Cascade Controllers
Slave Flow Loop
Flow is the innermost loop in most cascade control system
Flow controller in a cascade system must be tuned tight
A PI controller can be used:
With a gain greater than 1.0
With integral time set equal to time constant of valve actuator
Chen CL 22
Tuning of Cascade Controllers
Slave Temperature Loop
Diculties with using temperature as slave variable:
Sensor lag
Possibility of reset windup
Use derivative mode to compensate for sensor lag:
Derivative time equal to sensor time constant
Derivative unit act on measured variable to prevent connection
of two D units in series
Chen CL 23
Tuning of Cascade Controllers
Slave Temperature Loop: Example
CC Control on Jacketed Chemical Reactor
If TIC1 cascades FIC:
cooling ow could compensate only for
variations in coolant header pressure
If TIC1 cascades TIC2:
Temperature could compensate for changes in both coolant
header pressure and temperature
It closes a loop around the jacket
reducing eective time constant
making reactor temperature control loop more controllable
Chen CL 24
Tuning of Cascade Controllers
Slave Pressure Loop
Pressure can be measured easily, fast,
and reliably
a good slave variable
TIC cascades PIC:
pressure controls steam condensing
temperature
Pressure might move out of transmitter range and get out of
control
Chen CL 25
Computer Cascade Control
Inner loop is usually processed at a higher frequency
slave controller has time to respond to a setpoint change from
master controller before next change takes place
Bumpless (smooth) transfer from manual to automatic:
Initializing master controller output to measured slave variable
when switch from M to A
Chen CL 26
Control of H
2
/N
2
Ratio
in Ammonia Synthesis
Chen CL 27
Control of H
2
/N
2
Ratio
in Ammonia Synthesis
Process Description
Air, natural gas (CH
4
), steam are mixed in reforming furnace
(CH
4
+ 2H
2
O CO
2
+ 4H
2
)
Removing CO
2
, feeding mixture of H
2
and N
2
to synthesis loop
compressor
15% of H
2
and N
2
mixture is converted to NH
3
ow of synthesis loop is about six to seven times
the ow of fresh feed
High recycletofresh ratio
long time constant for synthesis loop (short for reforming)
Chen CL 28
Control of H
2
/N
2
Ratio
in Ammonia Synthesis
Control Algorithm
Control objective:
to keep H/N ratio at its optimal value ( 2.85)
Master controller (ARC10) receives composition at reactor inlet from an accurate
analyzer AT10
ARC10 adjusts set point on slave controller AIC11
AIC11 receives composition of fresh feed from a fast and inexpensive analyzer
AT11
(say, thermal conductivity detector)
AIC11 adjusts ratio of air to natural gas
Ratio controller (RC2) adjusts setpoint of air ow controller (FRC2)
Pressure controller (PRC4) cascade purge ow controller (FRC5) to eliminate
accumulation of inert gases and excess nitrogen
Chen CL 29
Control of H
2
/N
2
Ratio
in Ammonia Synthesis
Remarks
Slave measurement need not be accurate but must be fast
Errors in slave measurement are corrected by integral mode of master controller
Measurement of master controller can be slow but must be accurate
Disturbances in reforming process are handled quickly by slave controller before
they have a chance to aect the primary controlled variable
Analog pressure controller:
Large process time constant (one hour)
Swinging purge ow all over its range
Operate on manual !
Digital pressure controller:
5 min sampling time, 45 min integral time is able to maintain pressure at its
optimum setpoint
Chen CL 30
Example: A Heat Exchanger
Simple Feedback Control
Chen CL 31
Example: A Heat Exchanger
Cascade Control (I)
Chen CL 32
Example: A Heat Exchanger
Cascade Control (II)
Chen CL 33
Example: A Jacketed Reactor
Cascade Temperature Control
Chen CL 34
Example: Multilevel Cascade Control
Four Level Cascade Control for A Distillation Tower
Chen CL 35
Example: A Heater
Simple Feedback:
changes in fuelgas header pressure (load disturbance)
change in fuelgas ow temperature upset
Cascade Control:
Load disturbances is eliminated by an additional measurement for fuelgas
ow and a fuelgas FC
TC manipulates setpoint of the fuelgas FC
Why external reset feedback ?
If inner FC is placed in manual
TC could no longer manipulate fuelgas ow
sustained error in TC
TC saturated if integral action exists
Integral saturation is prevented by feeding back fuelgas ow measurement to
TC
Chen CL 36
Chen CL 37
Example: Switching Scheme on A CC Loop
Switching Between Cascade and Single Loops
Maintaining hydrogenbed inlet temperature by manipulating
hydrogen quenchvalve position
Valves are connected to a hydrogen header
manipulation of one hydrogen valve will inuence all other hydrogen ows
Cascade Control
Useful turndown of ow transmitter is limited
bypass FC at low hydrogen ows
When FC is bypassed, it must track valve position to prevent a
bump when being switched back into service
Use two TC tunings for two conditions
Chen CL 38
Selective Control
and
Override Control
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Selector Switches
HS/LS: Higher/Lower Selectors
Higher and Lower Selectors: HS, LS
to select the higher (lower) of several measurement signals
to pass on as the process variable to a feedback controller
Use of selectors:
signals selection
selective control
parallel (splitrange) control
valveposition control
override control
Chen CL 2
Signal Selection with Selectors
Series Selectors
In critical applications, failure of a single eld transmitter in a control loop
cannot be tolerated, because this would create an unsafe condition or cause
unacceptable downtime !!
use three transmitters to measure a single variable
Requirement:
reliable indication of CV even if one transmitter fails
Using selectors as switches to alter signal
processing
Use three high selectors and one low selector to
generate a median (middle number in a series) value
If any one transmitter fails (either high or low)
the resultant output will not be materially aected
Chen CL 3
Selective Control
Applied to A PlugFlow Reactor
Simple Feedback Control
FB with A Selector
Chen CL 4
Parallel (SplitRange) Control
Applied to A Level Process
Use multiple controllers to maintain a single CV
Level control in the ltrate tank:
Normally maintained by manipulating outlet ow
Use 2nd controller to manipulate a makeup valve
to ensure that liquid is always present
on suction side of discharge pump
2nd controller: setpoint is lower than 1st one
with a narrow proportional band
low level: open makeup valve rapidly
Makeup valve: AFO or ATC
2nd controller: direct (positive action)
Outlet valve: AFC or ATO
1st controller: direct (positive action)
Chen CL 5
Valveposition Control
Applied to A HotOil System
Simple Feedback Control Selector + ValvePosition
Chen CL 6
Valve Position Control
Applied to An Air Compressor
Keep high header pressure to meet
maximum demand for any process area
without saturating control valves
waste energy during low demand period
VPC: keep minimum throttling losses for
varying demands
External feedback for VPC:
prevent integral windup when PC is in
manual
Chen CL 7
Pacing Control:
An Enhanced Ratio Control
HS determines which additive valve has
larger opening
VPC ensures neither valve will open more
than 95% by overriding totalproduct
ow controller via LS
Both VPC and totalproductow
controller are protected from windup by
reset feedback from output of LS
Ratio Control:
keep constant A/B for varying total ow
no ospecication product
Chen CL 8
Override Control: Key Concept
Basic Idea:
selector selects between the higher or lower of several controller
outputs for implementation
Normal operation:
one process variable is the controlling variable
Abnormal operation:
some other process variable becomes the controlling variable to
prevent it from exceeding a process or equipment limit
The limiting controller is said to override the normal process
controller
Chen CL 9
Override Control
Applied to A Process Heater
Normal Control: outlet temperature is
normally controlled by manipulating a fuel
valve
Operational Limit:
tube temperature within heater too high
coking within the heater passes
overloading of the heater
A limiting controller is used to prevent
encroachment of the operational limit
Chen CL 10
Override Control
Applied to A Process Heater
Normal Control Abnormal Control
Chen CL 11
Conventional PI
P with (Internal) Reset Feedback
Conventional PI
P with (Internal) RF
Chen CL 12
Problem of Using Conventional PI
Controller
Initial Condition
Reset Windup
Chen CL 13
Problem of Using Conventional PI
Controller
Fuel Valve: AirFailedClose type (AFC, ATO)
PI Controller: reverse action
Normal Condition:
Heater outlet temperature is near to its setpoint
Tube temperature is below its setpoint (safe)
I action will increase its output to the maximum
tube temperature controller: in a wind up condition
Outlet temperature controllers output will be selected and will
be passed to fuel valve
Chen CL 14
Abnormal Condition:
Conditions cause tube temperature becomes to rise
an increase in heater feed rate
coking inside the heater tubes
decrease in heater eciency
increased fuel ring
hotter combustion zone, higher tube temperature
to transfer sucient heat to process uid
Tube temperature controller remains wind up if
tube temperature does not exceed limit temperature
If tube temperature crosses the limit
limit controller starts to decrease its output
it must still decrease all the way below the
output of the outlet temperature controller
before it will have any eect on fuel rate
A signicant time of overlimit tube temperature before the limit
controller overrides and begins reducing fuel valve position
Chen CL 15
Override Control with ERF
P with Internal RF P with External RF
Chen CL 16
ERF: External Reset Feedback
With ERF conguration there is no free integrator with
a nonzero input that would cause wind up
Normal operation: (with ERF)
heater outlet temperature is controlling
tube temperature is below setpoint
tube temperature controller is not winding up
Chen CL 17
Override Control with External Reset
Feedback
Nominal
Near Limit Operation
Chen CL 18
Override Control with External Reset
Feedback
On the Limit Over the Limit
Chen CL 19
Override Control with External Reset
Feedback
Back to Limit
Normal Again
Chen CL 20
Override Control with External Reset
Feedback
Normal Control Again Safe Again
Chen CL 21
Override Control with ERF
At the time of crossing the limit (not steady state)
Bumpless transfer
Output of rstorder lag will go down to match its input
(controller output goes down)
If heater outlet temperature has been maintained
at setpoint with a 50% valve position,
then with a lower fuel valve position
the heater outlet temperature will go down
Keeping limit (safe) Operation (steady state)
Tube limit condition is controlling
Heater outlet temperature is below setpoint
Outlet temperature controller is not winding up
Chen CL 22
Override Control
Applied to A Distillation Column
Limiting Condition: Tower Flooding
Chen CL 23
Override Control
Applied to Tank Level and Flow
Simple Feedback Control
Override Control
Chen CL 24
Override Control
Applied to A Heater
Control with Constrained Availability
A naturaldraft red heater supplied with two fuels
natural gas
waste gas: subject to availability
(indicated by wastegas header pressure)
Objective:
use waste gas preferentially, subject to constraint
Output of wastegas headerpressure controller can be thought of
as the constraint
Setpoint of wastegas ow controller is the TC output, limited by
constraint via low selector
Chen CL 25
Additional fuel (natural gas) is determined by subtracting wastegas
ow from total demand
Chen CL 26
Override Control
Applied to A Fired Heater
Simple Feedback Control
Override Control
Chen CL 27
Override Control
Applied to A Reactor
Limiting Condition: Reactor Pressure
Chen CL 28
MultipleOutput Control
Applied to Multiple Compressors
MultipleOutput Control for Multiple Compressors
Chen CL 29
Multiple Compressors
Control of a single variable with multiple similar manipulated
variables
Multiple compressors that discharge into a common header
Loop gain should be constant, independent of number of
compressors in service
Allows independent biasing of each compressor
can adjust proportion of total load taken by a given compressor
Each compressor discharge valve is constrained independently,
without upsetting overall pressureloop performance
Chen CL 30
MultipleOutput Control for Multiple Compressors
A very fast integralonly controller (Multiple Output Controller,
MOC) adjusts signal levels to respective valves simultaneously to
maintain demand setpoint
The feedback in this loop is a weighted average of signals to
respective discharge valves, and not actual valve positions
The summer computes the average valveposition signal as a
measurement to the integralonly controller
The hand controllers (HC) on discharge valves provide ability
to bias one controlvalve signal relative to others
to manually set controlvalve signal (to baseload a given
compressor or to take it completely out of service)
Chen CL 31
Low selectors allow a given compressor to be constrained
independently of the others without upsetting the pressurecontrol
loop
Normal Control: header pressure control
Abnormal Conditions:
header pressure will be controlled UNTIL
all hand stations are in manual, or
all compressor discharge valves are constrained and/or saturated
Pressure controller is protected from windup via the external
feedback of the average signal
Chen CL 32
ParallelMetering Control
Applied to A Boiler
Chen CL 33
ParallelMetering Control on Boiler
A single boiler controlling header pressure with a single fuel and
single source of combustion air
Fuel and air must be adjusted in parallel to maintain header pressure
under conditions of variable load
Safe Process Operation:
letting air lead fuel on a load increase
letting air lag fuel on a load decrease
requiring fuel ow to be decreased on a falling airow condition
requiring air ow to be increased on a rising fuelow condition
Chen CL 34
Control Conguration:
Both air and fuel ows are controlled via their respective ow
controllers
Output of pressure controller adjusts setpoints of these ow
controllers in parallel
Setpoints are constrained via the high and low selectors
Low selector ensures air leads fuel ow:
if steam load pressure controller
LS will not let the fuelow setpoint increase
until air ow increases
High selector ensures air lags fuel ow:
if steam load pressure controller
HS will not let the airow setpoint decrease
until fuel ow decreases
Some Control Strategies for Productivity and Safety
Ratio, Selective,
Override Control
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Typical Computing Relays (Blocks)
Addition/Subtraction:
adding and/or subtracting input signals into output
Multiplication/Division:
multiplying/dividing input signals into output
Square Root:
output is obtained by extracting square root of input
High/Low Selector:
output is the highest or lowest of two or more inputs
High/Low Limiter:
output is the input limited to preset high or low limit
Chen CL 2
Function Generator:
output is a function of input (series of straight lines)
Integrator (totalizer):
output signal is time integral of input signal
Lead/Lag:
(output) =
_
ld
s + 1
lg
s + 1
_
(input)
Dead Time:
output signal is equal to a delayed input signal
Chen CL 3
Computing Blocks
Chen CL 4
Computing Blocks
Chen CL 5
Programming Languages
Chen CL 6
Programming Languages
Chen CL 7
Programming Languages: Mixing Process
Chen CL 8
Programming Languages: Preheater/Reactor
Chen CL 9
Scaling Computing Algorithms (I)
Chen CL 10
Scaling Computing Algorithms (II)
Write equation in engineering units
assign each variable a signal name
Relate each variable to its signal name by a scaled equation
Substitute the set of scaled equations into original equation and
solve for the output signal
Chen CL 11
Gas Mass Flow:
Engineering Equations (step 1)
Mass ow through an orice:
w = K
h
w : mass ow, lb/h
h : dierential pressure across orice, in. H
2
O
: density of gas, lb/ft
3
K : orice coecient, 196.1
lb/h
(in.H
2
Olb/ft
3
)
1/2
Chen CL 12
Density of gas around operating conditions:
= 0.13 + 0.003(p 30) 0.00013(T 500)
w = K{h[0.13 + 0.003(p 30) 0.00013(T 500)]}
1/2
Ranges of the variables:
signal variable range steady state
S1 h 0 100 in.H
2
O 50 in.H
2
O
S2 T 300 700
o
F 500
o
F
S3 p 0 50 psig 30 psig
S4 w 0 700 lb/h 500 lb/h
Chen CL 13
Gas Mass Flow:
Scaled Signals (step 2)
Signals: 0% 100%
Engineering variables and scaled signals:
S1 =
h 0
100 0
100% h = S1
S2 =
T 300
700 300
100% T = 4S2 + 300
S3 =
p 0
50 0
100% p = 0.5S3
S4 =
w 0
700 0
100% w = 7S4
Chen CL 14
Gas Mass Flow:
Scaled Equation (step 3)
Substituting the scaled equations into engineering equations
= nal scaled equation
w = K{h[0.13 + 0.003(p 30) 0.00013(T 500)]}
1/2
7S4 = 196.1{{S1}[0.13 + 0.003({0.5S3} 30)
0.00013({4S2 + 300} 500)]}
1/2
S4 = 1.085 {S1 [S3 0.35S2 + 44]
. .
S5:addition
. .
multiplication
}
1/2
. .
square root
Chen CL 15
Output of Summation: S5 [0%, 100%] ? Find worst condition
_
p = 40 psig (S3 = 80%)
T = 500
o
F (S2 = 50%)
_
S5 = 107.5%
_
p = 50 psig (S3 = 100%)
T = 300
o
F (S2 = 0%)
_
S5 = 144%
S5 = 144% in worst condition divide S5 by 1.44
S4 = 1.085
_
_
S1
_
S3
1.44
0.35
S2
1.44
+
44
1.44
_
. .
S5:addition
. .
multiplication
_
_
1/2
. .
square root
S4 = 1.302 {S1 [0.694S3 0.243S2 + 30.55]
. .
S5:addition
. .
multiplication
}
1/2
. .
square root
Chen CL 16
Gas Mass Flow:
Implementation (step 4)
Implementation using computing blocks
Summer:
OUT = K
X
X +K
Y
Y +K
Z
Z +B
o
S5 = 0.694(S3) + (0.243)(S2) + 0 + 30.55%
Square root of product block
OUT = (Factor)K
A
X Y Z +B
o
S4 = 1.302
_
(S1) (S5) + 0%
Note: two inputs Factor = 1
Chen CL 17
S5 = 0.694(S3) + (0.243)(S2) + 0 + 30.55%
S4 = 1.302
_
(S1) (S5) + 0%
Chen CL 18
Gas Mass Flow:
Validation (step 5)
Steadystate signals
S1 = 50% S2 = 50% S3 = 60% S4 = 71.4%
Steadystate mass ow from scaled equation:
S4 = 1.302{50[0.694(60) 0.243(50) + 30.5]}
1/2
= 71.3% 71.4%
Chen CL 19
Blending Control of Two Liquid Streams
Chen CL 20
Ratio Control of Blending Systems
Chen CL 21
Ratio Control of Blending Systems: One Wild Flow
(a) is a more linear system (preferred)
F
set
B
= R F
A
R = F
B
/F
A
F
set
B
F
A
= R
R
F
A
=
F
B
F
2
A
=
R
F
A
Chen CL 22
Ratio Control of Blending Systems: One Wild Flow
Chen CL 23
Air/Fuel Ratio Control for A Boiler
Chen CL 24
Air/Fuel Ratio Control for A Boiler
Chen CL 25
Air/Fuel Ratio Control for A Boiler
Chen CL 26
Air/Fuel Ratio Control for A Boiler
Chen CL 27
Air/Fuel Ratio Control for A Boiler
Chen CL 28
Air/Fuel Ratio Control for A Boiler
Chen CL 29
Air/Fuel Ratio Control for A Boiler
Chen CL 30
Air/Fuel Ratio Control for A Boiler
Chen CL 31
Air/Fuel Ratio Control for A Boiler
Chen CL 32
Air/Fuel Ratio Control for A Boiler
Chen CL 33
Air/Fuel Ratio Control for A Boiler
Chen CL 34
Air/Fuel Ratio Control for A Boiler
Chen CL 35
Feedback Trim Enhances Ratio Control
Adding 20% NaOH to a
varying ow of water to
produce 5% NaOH
The multiplier is scaled for
twice the product of the A
and B function to obtain a
FB controller output of 0.5
(midscale)
allow FB trim to adjust
ratio equally well up or down
from the normal value
FB trim can be introduced with a summer, adding to or subtracting from the
FF (?) calculation
Additive or Multiplicative ? a matter of minimizing FB correction
Chen CL 36
Tank and Flow Control Loop
Simple Feedback Control
Chen CL 37
Tank and Flow Control Loop
Override Control Scheme
Chen CL 38
Override Control Scheme
Controllers with Reset Feedback (RFB)
Chen CL 39
Heater Temperature Control System
Simple Feedback Control
Chen CL 40
Heater Temperature Control System
Override Control Scheme
Chen CL 41
A Plug Flow Reactor
Simple Temperature Control
Chen CL 42
A Plug Flow Reactor
Selective Control
Chen CL 43
A Hot Oil System
Feedback/Cascade Control
Chen CL 44
A Hot Oil System
Selective/ValvePosition Control
Chen CL 45
Designing Control Systems: An Exothermic Reactor
Consider a reactor, where the exothermic reaction A+B C takes place. The
diagram shows the control of the temperature in the reactor by manipulating the
cooling water valve.
Chen CL 46
1. Design a control scheme to control the ow of reactants to the reactor. The
ows of reactants A and B should enter the reactor at a certain ratio, R, that
is, R = F
B
/F
A
. Both ows can be measured and controlled.
2. Operating experience has shown that the inlet cooling water temperature varies
somewhat. Because of the lags in the system this disturbance usually results in
cycling of the temperature in the reactor. The engineer in charge of this unit
has been wondering whether some other control scheme can help in improving
the temperature control. Design a control scheme to help him.
3. Operating experience has also shown that under some infrequent conditions the
cooling system does not provide enough cooling. In this case the only way to
control the temperature is by reducing the ow of reactants. Design a control
scheme to do this automatically. The scheme must be such that when the
cooling capacity returns to normal the scheme of previous part is reestablished.
Chen CL 47
Designing Control Systems: An Exothermic Reactor
Chen CL 48
Designing Control Systems: An Exothermic Reactor
Chen CL 49
Designing Control Systems: An Exothermic Reactor
Chen CL 50
Designing Control Systems: An Exothermic Reactor
Chen CL 51
Designing Control Systems: An Exothermic Reactor
Chen CL 52
Designing Control Systems: An Exothermic Reactor
Chen CL 53
Designing Control Systems: An Exothermic Reactor
Chen CL 54
Designing Control Systems: An Exothermic Reactor
Chen CL 55
Designing Control Systems: An Exothermic Reactor
Chen CL 56
Designing Control Systems: An Exothermic Reactor
Chen CL 57
Designing Control Systems: An Exothermic Reactor
Chen CL 58
Designing Control Systems: An Exothermic Reactor
Chen CL 59
Designing Control Systems: An Exothermic Reactor
Chen CL 60
Designing Control Systems: An Exothermic Reactor
Chen CL 61
Design Control System: An Endothermic Reactor
Consider the reactor, where stream A reacts with water. Stream A can be
measured but not manipulated. This stream is the byproduct of another unit.
The water enters the reactor in two dierent forms, as liquid and as steam. The
steam is used to heat the reactor contents. It is necessary to maintain a certain
ratio, R, between the total water and stream A into the reactor. It is also
necessary to control the temperature in the reactor. It is important to maintain
the ratio of total ow of water to ow of stream A below a value Y : otherwise, a
very thick polymer may be produced plugging the reactor.
Chen CL 62
A situation has occurred several times during extended periods of time in which
the ow of stream A reduces signicantly. In this case the control scheme totally
cuts the liquid water ow to the reactor to maintain the ratio. However, the steam
ow to the reactor, to maintain temperature, still provides more water than
required, and thus the actual ratio of water to stream A entering the reactor
dangerously approaches Y . Design a control scheme to control the temperature in
the reactor, and another scheme to maintain the ratio of total water to stream A,
while avoiding reaching the value of Y even if it means that the temperature
deviates from set point.
Chen CL 63
Design Control System: An Endothermic Reactor
Chen CL 64
Design Control System: An Endothermic Reactor
Chen CL 65
Design Control System: An Endothermic Reactor
Feedforward Control
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
A Process Heater with Feedback Control
Chen CL 2
A Simple Pure Feedforward Control
Considering Inlet Temperature As Main Disturbance
EB: QC
p
(T
o
T
i
) = F H
v
E
ff
T
i
= MAIN disturbance
T
o
= desired outlet temp
F
=
QC
p
H
v
E
ff
(T
o
T
i
)
Chen CL 3
Pure FF Control for Multiple Disturbances
Considering Variation of Inlet Temperature,
Process Flow Rate, and Fuel Heating Value
Disturbance 1: variations of inlet temperature F
=
QC
p
H
v
E
ff
o
T
i
=
QC
p
H
v
E
ff
o
T
i
=
QC
p
H
v
E
ff
o
T
i
g
s + 1
e
ds
=
g
+
1
d
/
g
g
s + 1
e
ds
Chen CL 7
FF Control with
Additive/Multiplicative FB Trim
Chen CL 8
FF Control with Additive FB Trim
Most important disturbances are compensated by FF
Why feedback trim ?
Error in process model
Unmeasurable disturbances
FB signal should be scaled so that when it is in the center of its
range it represent zero correction to the FF signal
Process gain of the FB loop may vary inversely with
process ow rate
K
p
=
measurement
controller output
=
outlet temperature
fuel
T
o
= T
i
+
H
v
E
ff
QC
p
F
K
p
=
T
o
F
=
H
v
E
ff
QC
p
1
F
p
Chen CL 9
FF Control with Multiplicative FB Trim
FB signal: a multiplying factor, K
If FF controller is exact
no correction is necessary K = 1
Temperature controller output should be scaled so that 0 100%
of signal range represents a limited range of correction
Example: K = 0.75 1.25
FB can correct FF results by a factor 25%
Chen CL 10
FB Adjust FF Controllers Reference Value
T
o
: setpoint (reference value) of the FF controller
To adjust T
o
by FB trim to keep T
o
having desired value
Process gain of the FB loop is a constant value of 1.0 under any kind of load
condition
Chen CL 11
Experimental Approach for FF Control
Dynamic Eect of Load Change to Controlled Variable
T
dT
o
(t)
dt
+ T
o
(t) = K
Q(t d
)
G
(s) =
T
o
(s)
Q(s)
=
K
e
d
s
T
s + 1
Chen CL 12
Experimental Approach for FF Control
Dynamic Eect of Manipulated Variable to Controlled Variable
T
p
dT
o
(t)
dt
+ T
o
(t) = K
p
F(t d
p
)
G
p
(s) =
T
o
(s)
F(s)
=
K
p
e
d
p
s
T
p
s + 1
Chen CL 13
Experimental Approach for FF Control
Desired: No Response of Controlled Variable to Load Change
without FF: T
o
(s) = G
(s)Q(s)
use of FF: T
o
(s) = G
(s)Q(s) +G
p
(s)F(s)
= G
(s)Q(s) +G
p
(s)G
F
(s)Q(s)
= [G
(s) +G
p
(s)G
F
(s)]
=0
Q(s) = 0
Chen CL 14
Experimental Approach for FF Control
Desired: No Response of Controlled Variable to Load Change
= G
F
(s) =
G
(s)
G
p
(s)
=
K
e
d
s
T
s+1
K
p
e
d
p
s
T
p
s+1
=
K
p
T
p
s + 1
T
s + 1
e
(d
d
p
)s
Chen CL 15
Dynamic Compensation
Possible barriers to implementing perfect FF control:
Other disturbances might exist
Process model may be incorrect
There had been no consideration of process dynamics
Abstract view of the
process:
two external inuences
Load (disturbance)
Control eort
Chen CL 16
Required dynamic compensation:
H(s) = [A(s) +B(s)C(s)] = 0 (perfect control)
C(s) =
A(s)
B(s)
Suppose A(s) =
K
pA
e
T
dA
s
T
pA
s + 1
B(s) =
K
pB
e
T
dB
s
T
pB
s + 1
C(s) =
K
pA
K
pB
FF gain
T
pB
s + 1
T
pA
s + 1
lead/lag term
e
(T
dA
T
dB
)s
dead time term
Chen CL 17
C(s) = G
F
(s) =
K
pA
K
pB
FF gain
T
pB
s + 1
T
pA
s + 1
lead/lag term
e
(T
dA
T
dB
)s
dead time term
Chen CL 18
Implementation of Feedforward Control
Test each of the process paths:
load and process dynamics by FOPDT models
Take the ratio of the two TFs
Add feedback to compensate for unmeasured disturbances or errors
in process models
Relax FB controller from the tuning if FB were used alone
(lower gain, longer reset, no D)
No D action in FB (load upset is taken by FF)
Primary purpose of FB is to correct for steadystate errors in FF
controller
Responsibility of FB controller is not as great as if it were
controlling the process alone
Chen CL 19
Step Response of Leadlag
(with/without Dead Time) Function
Lead/Lag Only
with Dead Time
Chen CL 20
Fine Tuning The FF Controller
A FF control system by itself will rarely provide perfect
compensation for the measured disturbance
combined with FB
FB control acts only after the fact
(it must see an error to make a correction)
the closer to perfect compensation the FF makes
the less correction required by FB controller
Chen CL 21
Incremental Change and
Incremental Response
Suppose dynamic compensation consists only of dead time
Eect of reducing dead time in the compensator:
Reducing dead time in the compensator
incremental fuel change
incremental response of outlet temperature
Chen CL 22
Incremental Eect of Various Adjustments
Load:
increase in feed rate
Make adjustment in a
direction that will give a
positive incremental fuel
change to compensate
for the shortterm fuel
deciency
Chen CL 23
Incremental Eect of Various Adjustments:
Summary
A change in only dead time will result in an incremental process
response relatively soon after load change
A change in only leadlag ratio will result in an incremental process
response that is somewhat father out in time from the time of load
change
A change in lag time (constant leadlag ratio) will result in an
incremental process response that is the fastest away in time
Chen CL 24
Eect of Composite Adjustments
Fine Tuning:
Observe initial response to a load change of the FF control
system
Determine the direction and relative time scale of the required
incremental corrective process response
Adjust dynamic compensating terms accordingly
Example: Composite Adjustments
Decrease dead time to start the increased fuel response sooner
Decrease leadlag ratio to give less fuel increment once its
response is begun
Decrease lag time (maintaining a constant lead/lag ratio) to
cause a faster approach of the fuel to nal equilibrium
Chen CL 25
Chen CL 26
Feedforward: Balance Equation Approach
EX: A Mixing Process with Simple FB Control
Chen CL 27
Chen CL 28
SteadyState Feedforward Scheme
Steadystate overall mass balance
0 = q
5
+q
1
(t) +q
2
(t) +q
7
q
6
(t)
0 = q
5
+q
1
(t) +q
2
(t) +q
7
q
6
(t) ( = const.)
q
1
(t) = q
6
(t) q
2
(t) 1000
Steadystate mass balance on component A
and the feedforward relation:
0 = q
5
x
5
+q
2
(t)x
2
+q
7
x
7
q
6
(t)x
6
(t)
q
6
(t) =
1
x
6
(t)
[q
5
x
5
+q
7
x
7
+q
2
(t)x
2
]
=
1
x
6
(t)
[850 + 0.99q
2
(t)]
q
1
(t) =
1
x
set
6
[850 + 0.99q
2
(t)]
FY11A
q
2
(t) 1000
FY11B
Chen CL 29
SteadyState Feedforward Scheme
q
1
(t) =
1
x
set
6
[850 + 0.99q
2
(t)]
FY11A
q
2
(t) 1000
FY11B
Chen CL 30
FF Control with Dynamic Compensation
q
1
(t) =
1
x
set
6
[850 + 0.99q
2
(t)]
FY11A
q
2
(t) 1000
FY11B
Chen CL 31
FF Control with Dynamic Compensation
and FB Trim
Feedback trim: adjusting desired X
6
Question: additive FB or multiplicative FB ?
Chen CL 32
FF Control: Block Diagram Approach
Chen CL 33
Pure Feedforward Control
X
6
Q
1
= G
1
X
6
Q
2
= G
2
Q
1
M
= G
FC
M
TO
= G
F
TO
Q
2
= H
2
X
6
= G
2
Q
2
+G
1
Q
1
G
FC
M
G
F
TO
H
2
Q
2
Chen CL 34
= [G
2
+G
1
G
FC
G
F
H
2
] Q
2
= 0 (desired)
G
F
(s) =
G
2
G
1
G
FC
H
2
let G
1
G
FC
=
K
P
1
e
d
1
s
1
s+1
(mf/%CO)
G
2
=
K
P
2
e
d
2
s
2
s+1
(mf/gpm)
H
2
(s) = K
T
2
(%TO/gpm)
G
F
=
K
P
2
K
P
1
K
T
2
%CO/%TO
1
s + 1
2
s + 1
lead/lag
e
(d
2
d
1
)s
dead time
Chen CL 35
Feedforward Control with Feedback Trim
Chen CL 36
Summer FY11C: OUT = K
x
X +K
y
Y +K
z
Z +B
0
FB signal: X; FF signal: Y ; bias: B
0
K
x
= 1; K
y
= 1; B
0
= (K
P
2
/K
T
2
K
P
1
)40%
Steadystate value of q
2
(t) 1000 gpm
Range of transmitter for q
2
0 2500 gpm
Steadystate value of the ow 40%
Steadystate output from FF (K
P
2
/K
T
2
K
P
1
)40%
Bias to cancel SS FF signal (K
P
2
/K
T
2
K
P
1
)40%
Steadystate value of q
1
(t) 1900 gpm
Range of transmitter for q
1
0 3800 gpm
Output from summer must be 50%
Output from FB is forced to be 50%
K
y
= 0: FF is turned o
Chen CL 37
FF Control for Boiler Drum
SingleElement Control
Chen CL 38
FF Control for Boiler Drum
TwoElement Control
Chen CL 39
FF Control for Boiler Drum
ThreeElement Control
Chen CL 40
FF for Distillation Column
Simple Feedback Control
Chen CL 41
FF for Distillation Column
Feedforward Control Scheme
m
: lbm/hr;
: Btu/lbm
q
s
= q
t
q
1
= q
t
m
= q
t
K
h
= f
1
(P)
= f
2
(P)
signal
characterizers
Chen CL 42
FF Control on A Distillation Column
Chen CL 43
FF Control for Distillation Feed
FF Control Handles Two Upsets Simultaneously
Variables:
feed composition and owrate to a distillation column
excessive impurities to appear in bottoms product
Temperature of the twocomponent mixture in lowerbottoms
sump has a direct relationship to impurity concentration (sucient
correlation often exists even for multicomponent mixtures)
F, z, Fz: feed, fraction of light, ow of lighter component
Steam owrate should be nearly proportional to F
z
temperature controller adjusts the ratio to compensate
for possible errors in measurement, model
Chen CL 44
Most dicult part: dynamic compensation
Chen CL 45
FF Control on Heat Exchanger
Energy Balance:
W
s
H
s
= W
p
C
p
(T
2
T
1
)
W
s
= KC
p
(T
2
T
1
)
Dynamic Compensation:
change in product ow is faster than change in heat transfer
FB Temperature Control:
Providing setpoint (T
2
) in the FF computation
Force temperature to reach its setpoint without steadystate
oset
Chen CL 46
Chen CL 47
FF Control on Evaporator
Mass and Energy Balances:
(W: mass rate, kg/h; x: weight fraction;
E: economy, kg vapor/kg steam)
1st eect: W
0
x
0
= W
1
x
1
W
0
= W
1
+V
1
2st eect: W
1
x
1
= W
2
x
2
W
1
= W
2
+V
2
W
2
= (x
0
/x
2
)W
0
W
0
= W
2
+V
1
+V
2
W
0
0
F
0
1
x
0
x
2
= V
1
+V
2
EW
s
W
s
=
1
E
0
F
0
1
x
0
x
Chen CL 48
Feed density and feed solids weight fraction is related
signal characterizer f(
0
) : x
0
vs.
0
Feed ow signal (F
0
) is dynamically compensated with lead/lag
function
Product density does not respond with equal speed to changes
in feedrate and steam ow
Changes in steam ow produce a slower response because of
thermal time lags associated with heat transfer surfaces a
predominant lead function
Density normally does not vary as fast as feed ow
feeddensity dynamic compensation is not included
FB trim is provided by density controller to provide desired setpoint,
x
2
, in feedforward model
Chen CL 49
FF Control on Evaporator
Frequency Response
ChengLiang Chen
PSE
LABORATORY
Department of Chemical Engineering
National TAIWAN University
Chen CL 1
Frequency Response
G(s) =
Y (s)
X(s)
=
K
s + 1
X(t) = Asin(t) U(s) =
A
s
2
+
2
Y (s) =
K
s + 1
A
s
2
+
2
=
KA
()
2
+1
s +
1
+
KA
()
+
1
s +
KA
()
+
1
s
2
+
2
Chen CL 2
Y (t) =
KA
()
+
1
e
t/
+
KA
()
2
+ 1
[sin(t) cos(t)]
=
KA
()
+
1
e
t/
+
KA
_
()
2
+ 1
_
_
1
_
()
2
+ 1
. .
cos
sin(t) +
_
()
2
+ 1
. .
sin
cos(t)
_
_
=
KA
()
+
1
e
t/
. .
transient response0
+
KA
_
()
2
+ 1
sin(t +)
. .
steady response
KA
_
()
2
+ 1
sin(t +)
=
KA
_
()
2
+ 1
sin((t + t))
= arctan() t =
=
arctan()
Chen CL 3
Frequency Response:
steadystate behavior of a system when forced by a
sinusoidal input
Output frequency = input frequency
Amplitude Ratio =
output magnitude
input magnitude
=
K
()
2
+1
Output wave is lag to input wave ( < 0)
= arctan() radian, or t =
sec
Chen CL 4
Find AR() and () for A System (I):
Experimental
Use sinusoidal inputs with dierent frequencies
x(t) x U(t) = A
i
sin(
i
t), i = 1, 2, . . . , N
y(t) y Y (t) = B
i
sin(
i
(t t
i
))
AR(
i
) =
B
i
A
i
(
i
) =
i
t
i
Use specic input excitation (step, impulse . . .)
Extract AR(
i
), (
i
) at dierent frequencies
Chen CL 5
Find AR() and () for A System (II):
Given G(s)
Given G(s)
Let s = i
G(i) = Re(G(i)) +iIm(G(i))
= G(i)e
iG(i)
AR() = G(i) =
_
Re
2
(G(i)) +Im
2
(G(i))
() = G(i) = arctan
_
Im(G(i))
Re(G(i))
_
Chen CL 6
Proof:
X(t) = Asint X(s) =
A
s
2
+
2
Y (s) = G(s)
A
s
2
+
2
=
(s z
1
) (s z
m
)
(s p
1
) (s p
n
)
A
(s +i)(s i)
=
c
1
s p
1
+ +
c
n
s p
n
+
r
1
s i
+
r
2
s +i
r
1
= lim
si
(s i)Y (s)
= lim
si
_
(s i)G(s)
A
(s i)(s +i)
_
=
A
2i
G(i)
r
2
= lim
si
(s +i)Y (s) =
A
2i
G(i)
Chen CL 7
Y (t) =
A
2i
G(i)e
it
A
2i
G(i)e
it
+
c
j
e
p
j
t
. .
0
A
2i
G(i)e
iG(i)
. .
=G(i)e
iG(i)
e
it
A
2i
G(i)e
iG(i)
. .
=G(i)e
iG(i)
e
it
= AG(i)
e
i(t+G(i)
e
i(t+G(i)
2i
= AG(i)
. .
AR
sin
_
t +G(i)
. .
_
Chen CL 8
Frequency Response of Simple Models
FirstOrder Process:
G(s) =
K
s + 1
G(i) =
K
(i) + 1
=
K
()
2
+ 1
+
K
()
2
+ 1
i
=
K
_
()
2
+ 1
_
1
_
()
2
+ 1
+i
_
()
2
+ 1
_
AR () =
K
_
()
2
+ 1
() = arctan()
Chen CL 9
SecondOrder Process:
G(s) =
K
(s)
2
+ 2s + 1
G(i) =
K
(1 ()
2
) + (2)i
= K
(1 ()
2
) (2)i
(1 ()
2
)
2
+ (2)
2
AR() =
K
_
(1 ()
2
)
2
+ (2)
2
() = arctan
_
2
1()
2
_
Chen CL 10
Note:
AR() =
K
_
(1 ()
2
)
2
+ (2)
2
at =
R
(resonant frequency)
0 =
d AR()
d
R
=
1
2
()
3/2
_
2(1 ()
2
)(2
2
) + 8
2
R
0 = 8
2
R
4
2
R
(1 (
R
)
2
)
0 = 2
2
(1 (
R
)
2
)
R
=
_
1 2
2
( < 0.707)
Chen CL 11
Lead:
G(s) = s + 1
G(i) = i + 1
AR() =
_
()
2
+ 1
() = arctan()
Chen CL 12
Integrator:
G(s) =
1
s
G(i) =
1
i
=
1
i
AR() =
1
() = arctan
_
1/
0
_
=
2
Chen CL 13
Delay:
G(s) = e
ds
G(i) = e
di
= cos(d) i sin(d)
AR() = 1
() = arctan
_
sin(d)
cos(d)
_
= d
Chen CL 14
Frequency Response of TF in Series
G(s) = G
1
(s) G
n
(s)
G(i) = G
1
(i) G
n
(i) G
j
(i) = G
j
(i) e
iG
j
(i)
= G
1
(i) e
iG
1
(i)
G
n
(i) e
iG
n
(i)
= G
1
(i) G
n
(i)
. .
G(i)
e
i
G(i)
..
(G
1
(i) +. . . +G
n
(i))
AR() = G(i) =
n
j=1
G
j
(i)
() = G(i) =
n
j=1
G
j
(i)
Chen CL 15
Frequency Response of TF in Series:
Example
G(s) =
K(
3
s + 1)e
ds
s(
1
s + 1)(
2
s + 1)
=
Ke
ds
(
3
s + 1)
s(
1
s + 1)(
2
s + 1)
AR() = K 1
1
_
(
1
)
2
+ 1
1
_
(
2
)
2
+ 1
_
(
3
)
2
+ 1
1
=
K
_
(
3
)
2
+ 1
_
(
1
)
2
+ 1
_
(
2
)
2
+ 1
() = 0darctan(
1
)arctan(
2
)+arctan(
3
)
2
Chen CL 16
Frequency Response of TF in Series:
Example
G(s) =
Ke
s
(s + 1)
s(2s + 1)(3s + 1)
AR() =
K
_
()
2
+ 1
_
(2)
2
+ 1
_
(3)
2
+ 1
() = 0+arctan()
2
arctan(2)arctan(3)
Chen CL 17
Representation of Frequency Response
Polar Plot: Re(G(i)) vs. Im(G(i))
Bode Diagram:
AR() vs. and () vs. (???)
log ( AR()) vs. log() and () vs. log()
Note: L() = 20 log ( AR()) dB (decibel)
Nichols Chart: L() = 20 log ( AR()) vs. ()
Chen CL 18
Chen CL 19
Asymptotic Lines and Corner Frequency
G(s) =
K
s + 1
20 log AR() = 20 log
K
_
()
2
+ 1
() = arctan()
20 log AR()
0
20 log(K)
d (20 log AR())
0
d log
0
()
0
0
Chen CL 20
20 log AR()
20 log
_
K
()
2
_
= 20 log K 20 log 20 log
d (20 log AR())
d log
20 (dB/decade)
()
2
at =
c
20 log AR(
c
)
0
= 20 log AR(
c
)
c
=
1
(
c
) = arctan(1) =
4
Chen CL 21
Use Asymptotic Lines to Make Bode
Diagram
Chen CL 22
G(s) =
K(s + 1)e
s
s(2s + 1)(3s + 1)
AR() =
K
2
+ 1
4
2
+ 1
9
2
+ 1
L() = 20 log(K) + 20 log(
2
+ 1)
20 log(
4
2
+ 1)
20 log(
9
2
+ 1)
20 log() + 20 log(1)
() = 0 + arctan() arctan(2)
arctan(3) (
180
o
) 90
o
Chen CL 23
NonMinimum Phase System
G(s) with Delay:
G
1
(s) =
K
s + 1
G
2
(s) =
K
s + 1
e
ds
G
1
() =
K
_
()
2
+ 1
= G
2
() =
K
_
()
2
+ 1
G
1
() = arctan() > G
2
() = arctan() d
Chen CL 24
G(s) with RHP Zero:
G
1
(s) =
s + 1
2s + 1
G
2
(s) =
s + 1
2s + 1
G
1
() =
2
+ 1
4
2
+ 1
= G
2
() =
2
+ 1
4
2
+ 1
G
1
() = +arctan() > G
2
() = arctan()
arctan(2) arctan(2)
Chen CL 25
Principle of the Argument
F(s) =
(s z
1
) (s z
m
)
(s p
1
) (s p
n
)
F(s) = (s z
1
) + +(s z
m
) (s p
1
) (s p
n
)
given any s = (, ) on D, considering z
1
= (x
1
, y
1
) in D
s z
1
= ( x
1
) +i( y
1
)
z
1
= arctan
_
y
1
x
1
_
= arctan
_
Im(sz
1
)
Re(sz
1
)
_
= (s z)
If s travels clockwisely around D, return to starting point
z
1
: increases 2 F(s) increases 2
F(s) : travels clockwisely around the origin
Chen CL 26
If s travels around D clockwisely
Then each zero in D will increase F(s) by 2
each pole in D will increase F(s) by +2
or
each zero in D will make F(s) travel around origin
clockwisely
each pole in D will make F(s) travel around origin
counter clockwisely
N = Z P:
# of clockwise encirclement of F(s) around origin
Chen CL 27
Principle of the Argument:
Given F(s) zeros, poles
D: a region of interest (Z zeros, P poles in D)
If s travels around D clockwisely
Then F(s) will encircle origin clockwisely
by N = Z P times
Chen CL 28
Stability of ClosedLoop System
G
c
(s) =
G
c
(s)G
p
(s)
1 +G
c
(s)G
p
(s)
ClosedLoop Unstable G
c
has RHP poles
1 +G
c
G
p
has RHP zeros
RHP Nyquist D contour
D =
_
_
C
+
: s = i, = 0
C
R
: s = Re
i
, R , =
2
2
C
: s = i, = 0
Chen CL 29
Theorem:
If 1+G
c
G
p
has Z zeros and P poles inside D, and
s goes around D in clockwise direction
Then 1 +G
c
G
p
will encircle the origin clockwisely
by N Z P times
Chen CL 30
Note:
1 +G
c
G
p
encircles origin = G
c
G
p
encircles (1, 0)
CL Stable Z = 0 (in D)
N = Z P = P
G
c
G
p
encircles (1, 0) by
P times (counter clockwisely)
Chen CL 31
Stability of ClosedLoop System
Theorem: Nyquist Stability Criterion
Theorem: Nyquist Stability Criterion
A feedback control system is stable if and only if
_
_
# of counter clockwise
encirclements of G
c
G
p
around 1, 0
_
_
=
_
# of RHP poles
of G
c
G
p
_
Chen CL 32
Theorem: Nyquist Stability Criterion
for OpenLoop Stable System
An openloop stable system (P = 0) is closedloop
stable if and only if
a plot of G
c
G
p
does not encircle (1, 0) as s travels
around D contour
Note:
we are checking closedloop stability (G
c
)
by using openloop TF (G
c
G
p
)
Chen CL 33
Nyquist Stability Criterion: Example
G
p
(s) =
1/8
(s + 1)
3
G
c
(s) = K
c
G(s) = G
c
G
p
C
+
: s = i = 0
G(i) =
K
c
/8
(i + 1)
3
C
R
: s = Re
i
R = /2 /2
G(i) =
K
c
/8
(Re
i
+ 1)
3
R
lim
R
K
c
8R
3
e
3i
C
: s = i = 0
G(i) =
K
c
/8
(i + 1)
3
Chen CL 34
when K
c
= K
cu
=
u
(1, 0) =
K
cu
/8
(i
u
+ 1)
3
=
K
cu
/8
(1 3
2
u
) +i(3
u
3
u
)
=
1
8
K
cu
(1 3
2
u
)
(1 3
2
u
)
2
+ (3
u
3
u
)
2
. .
=1
+i
1
8
K
cu
(3
u
3
u
)
(1 3
2
u
)
2
+ (3
u
3
u
)
2
. .
=0
u
=
3 K
cu
= 64
Chen CL 35
Nyquist Stability Criterion: Example
G(s) = G
c
G
p
=
K
c
s(
1
s + 1)(
2
s + 1)
C
+
: G(i) =
K
c
(
1
+
2
) iK
c
(1
1
2
)
3
(
1
+
2
)
2
+(1
1
2
)
2
C
R
: G(i) 0
C
: G(i) = reection of C
+
C
0
: G(i) =
K
c
re
i
(
1
re
i
+ 1)(
2
re
i
+ 1)
r0,=/2/2
= lim
r0
K
c
r
e
i
u
=
1
2
K
cu
=
1
+
2
2
Chen CL 36
Nyquist Stability Criterion on Bode
Diagram
(1, 0) on Nyquist = ( AR = 1, = 180
o
)
Chen CL 37
Bode Stability Criterion
Example: Heat Exchanger
Chen CL 38
Bode Stability Criterion
Example: Heat Exchanger
G(s) = K
c
_
0.016
3s + 1
__
50
30s + 1
__
1
10s + 1
_
AR() = K
c
0.016
9
2
+1
50
900
2
+1
1
100
2
+1
() = 0 arctan(3) arctan(30) arctan(10)
when
u
= 0.22 radian/sec (trial and error)
(
u
) = 0
.583
180
=33.42
o
..
arctan(3
u
)
1.42
180
=81.38
o
..
arctan(30
u
)
1.144
180
=65.56
o
..
arctan(10
u
)
. .
180
o
AR(
u
, K
cu
) = K
cu
0.016
9
2
u
+1
50
900
2
u
+1
1
100
2
u
+1
= 1
K
cu
= 24 (%/%)
Chen CL 39
Bode Stability Criterion
Example: Heat Exchanger
Chen CL 40
Bode Stability Criterion
Example: Heat Exchanger
G(s) = K
c
_
0.016
3s + 1
__
50e
2s
30s + 1
__
1
10s + 1
_
AR() = K
c
0.016
9
2
+1
50
900
2
+1
1
100
2
+1
() = 0 arctan(3) arctan(30) arctan(10) 2
180
when
u
= 0.16 < 0.22 radian/sec
(
u
) = 0
25.64
o
..
arctan(3
u
)
78.23
o
..
arctan(30
u
)
58
o
..
arctan(10
u
)
18.33
o
..
2
u
180
. .
180
o
AR() = K
cu
0.016
9
2
u
+1
50
900
2
u
+1
1
100
2
u
+1
= 1
K
cu
= 13.2 < 24 (%/%)
Chen CL 41
Bode Stability Criterion
Example: Heat Exchanger
Chen CL 42
Bode Stability Criterion
Example: Eect of I Action
G
p
(s) =
_
0.016
3s + 1
__
50
30s + 1
__
1
10s + 1
_
G
c
(s) = K
c
_
1 +
1
T
r
s
_
T
r
= 60
G
c
G
p
= K
c
_
60s + 1
60s
__
0.016
3s + 1
__
50
30s + 1
__
1
10s + 1
_
AR = K
c
3600
2
+ 1
60
0.016
9
2
+ 1
50
900
2
+ 1
1
100
2
+ 1
() =
85.283
..
arctan(60)
90
..
2
180
31.216
..
arctan(3)
80.63
..
arctan(30)
63.662
..
arctan(10)
. .
180.23
u
= 0.202 radian/sec K
cu
= 20.12 %/%
Chen CL 43
Bode Stability Criterion
Example: Eect of I Action
G
p
(s) =
_
0.016
3s + 1
__
50e
2s
30s + 1
__
1
10s + 1
_
G
c
(s) = K
c
_
1 +
1
T
r
s
_
T
r
= 60
G
c
G
p
= K
c
_
60s + 1
60s
__
0.016
3s + 1
__
50e
2s
30s + 1
__
1
10s + 1
_
AR = K
c
3600
2
+ 1
60
0.016
9
2
+ 1
50
900
2
+ 1
1
100
2
+ 1
() =
83.44
..
arctan(60)
90
..
2
180
23.51
..
arctan(3)
77.05
..
arctan(30)
16.62
..
2
180
55.41
..
arctan(10)
. .
179.15
u
= 0.145 radian/sec K
cu
= 10.7 %/%
Chen CL 44
Bode Stability Criterion
Example: Eect of D Action
G
p
(s) =
_
0.016
3s + 1
__
50
30s + 1
__
1
10s + 1
_
G
c
(s) = K
c
15s + 1
1.5s + 1
G
c
G
p
= K
c
_
15s + 1
1.5s + 1
__
0.016
3s + 1
__
50
30s + 1
__
1
10s + 1
_
AR() = K
c
225
2
+ 1
2.25
2
+ 1
0.016
9
2
+ 1
50
900
2
+ 1
1
100
2
+1
() =
82.83
..
arctan(15)
38.49
..
arctan(1.5)
57.83
..
arctan(3)
86.40
..
arctan(30)
79.32
..
arctan(10)
. .
179.2
u
= 0.53 radian/sec K
cu
= 32.3 %/%
Chen CL 45
Bode Stability Criterion
Example: Eect of D Action
Chen CL 46
Bode Stability Criterion
Example: Eect of D Action
G
p
(s) =
_
0.016
3s + 1
__
50e
2s
30s + 1
__
1
10s + 1
_
G
c
(s) = K
c
15s + 1
1.5s + 1
G
c
G
p
= K
c
_
15s + 1
1.5s + 1
__
0.016
3s + 1
__
50e
2s
30s + 1
__
1
10s + 1
_
AR() = K
c
225
2
+ 1
2.25
2
+ 1
0.016
9
2
+ 1
50
900
2
+ 1
1
100
2
+1
() =
77.67
arctan(15)
24.58
arctan(1.5)
42.46
arctan(3)
83.76
arctan(30)
34.95
2
180
71.85
arctan(10)
. .
179.9
u
= 0.305 radian/sec K
cu
= 11.57 %/%
Chen CL 47
Performance of Control Loop
Specications on OpenLoop TF (G
c
G
p
):
how close is the OLTF to critical point (1, 0)
Phase margin (PM)
Gain margin (GM)
Specications on ClosedLoop TF (G
c
=
G
c
G
p
1+G
c
G
p
):
how height is the resonant peak of CLTF G
c
Peak gain ratio ( PGR), maximum peak height (
MPH)
Maximum closedloop log modulus (L
max
c
)
Chen CL 48
Phase Margin ( PM):
G
c
G
p

=
g
= 1 G
c
G
p
(
g
) < 180
o
PM = 180 +G
c
G
p
(
g
)
The closedloop system will be unstable if G
c
G
p
(
g
) is made
larger than current value by PM degree
The closedloop system is relatively stable to the critical system
by PM degree
Chen CL 49
Gain Margin ( GM):
G
c
G
p
(
u
) = 180
o
G
c
G
p

u
< 1
GM =
1
G
c
G
p

u
The closedloop system will be unstable if G
c
G
p

u
is made
larger than current value by GM times
The closedloop system is relatively stable to the critical system
by a factor GM
Chen CL 50
Given K
c
GM(K
c
) =
1
G
c
G
p

u
> 1
with K
cu
GM(K
cu
) =
1
G
c
G
p

u
= 1
K
cu
= K
c
GM(K
c
)
Typical specications:
GM = 1.7 2.2 PM = 30
o
60
o
Chen CL 51
Controller Tuning with Specied GM/PM
G
c
G
p
= K
c
_
0.016
3s + 1
__
50e
2s
30s + 1
__
1
10s + 1
_
u
= 0.16 radian/sec
K
cu
= 12.8 %/%
Q: Find K
c
such that GM = 1.5
K
c
=
K
cu
1.5
=
12.8
1.5
= 8.53 %/%
Chen CL 52
Q: Find K
c
such that PM = 45
o
AR() = K
c
0.016
9
2
+ 1
50
900
2
+ 1
1
100
2
+ 1
() = 0 arctan(3) arctan(30) arctan(10) 2
180
PM = 45
o
= 180 +(
g
)
(
g
) = 135
o
g
= 0.087 rad/sec (trial and error)
AR(
g
) = K
c
0.016
_
9
2
g
+ 1
50
_
900
2
g
+ 1
1
_
100
2
g
+ 1
= 1
K
c
= 4.78 %/%
Chen CL 53
Maximum Peak Height (MPH)
G
c
(s) =
G
c
(s)G
p
(s)
1 +G
c
(s)G
p
(s)
Ideal G
c
(s)
Typical G
c
(s)
MPH
G
c
(
R
)
G
c
(0)
1.26
Chen CL 54
Maximum Closedloop Log Modulus: L
max
c
2dB
L
c
= 20 log G
c
()
L
max
c
= max
20 log G
c
() = 20 log G
c
(
R
)
Chen CL 55
Thank You for Your Attention
Questions Are Welcome