Académique Documents
Professionnel Documents
Culture Documents
Process Control II
Some Review Material
Winter 2006
Instructor:
M.Guay
TA:
V. Adetola
Introduction
In the chemical industry,
Introduction
Perturbations
Plant
Processing
objectives
Safety
Make $$$
Environment...
Market
Economy
Climate
Upsets...
Control
Introduction
What constitutes a control system?
Control
Combination of process
sensors, actuators and
computer systems
designed and tuned
to orchestrate
safe and profitable
operation.
Plant
Introduction
Process Dynamics:
Study of the transient behavior of processes
Process Control
the use of process dynamics for the
improvement of process operation and
performance
or
the use of process dynamics to alleviate the
effect of undesirable (unstable) process
behaviors
Introduction
What do we mean by process?
A process, P, is an operation that takes an INPUT or a
DISTURBANCE and gives an OUTPUT
Information Flow
INPUT: (u) Something that you can manipulate
DISTURBANCE: (d) Something that comes as a result of
some outside phenomenon
OUTPUT: (y) An observable quantity that we want to
regulate
Examples
M
Tin, w
T, w
Q
Inputs
Tin
w
Q
Output
Process
Examples
Force of
Engine
Friction
Inputs
Output
Friction
Process
Engine
Speed
Examples
e.g. Landing on Mars
Examples
e.g. Millirobotics
Laparoscopic Manipulators
Introduction
Process
A process, P, is an operation that takes an INPUT or a
DISTURBANCE and gives an OUTPUT
d
Information Flow
INPUT: (u) Something that you can manipulate
DISTURBANCE: (d) Something that comes as a result of
some outside phenomenon
OUTPUT: (y) An observable quantity that we want to
regulate
Control
What is control?
Benefits of Control
Economic Benefits
Quality (waste reduction)
Variance reduction (consistency)
Savings in energy, materials, manpower
Control
What is a controller?
Process
Controller
e.g.
- Riding a bike (human controller)
- Driving a car
- Automatic control (computer programmed to
control)
Block representations
Input variables
System Physical
Boundary
Process
Output variables
Transfer of
fundamental
quantities
Physical
Control
Disturbances
Outputs
Process
Action
intervene
Observation
Controller
monitor
Introduction
What is required for the development of a
control system?
1. The Plant (e.g. SPP of Nylon)
Nylon
Gas Make-up
Reheater
Relief
Pot
Dehumidifier
Steam
Heater
Blower
Water
Vent
Introduction
What is required?
1. Process Understanding
Required measurements
Required actuators
Understand design limitations
2. Process Instrumentation
Appropriate sensor and actuator selection
Integration in control system
Communication and computer architecture
3. Process Control
Appropriate control strategy
Example
Cruise Control
Friction
Engine
Process
Controller
Human or Computer
Speed
Classical Control
d
r +
e
-
Controller
Process
Control
d
r+
Computer
Actuator
e
-
P
Process
M
Sensor
Examples
Driving an automobile
r +
e
-
Driver
Steering
P
Automobile
M
Visual and tactile measurement
Actual trajectory
Desired trajectory
Examples
Stirred-Tank Heater
Tin, w
Heater
Q
TC
T, w
Thermocouple
Tin, w
TR
Controller
Heater
+
-
P
Tank
M
Thermocouple
Examples
Measure T, adjust Q
Tin, w
+
Controller
Heater
TR -
P
Tank
M
Thermocouple
Feedback control
Controller:
Q=K(TR-T)+Qnominal
where
Qnominal=wC(T-Tin)
Examples
Ti
M
C
+ Q
Qi
Q
Feedforward Control
Control Nomenclature
(affect process)
(result of process)
Inputs
Disturbance variables
Variables affecting process that are due to
external forces
Manipulated variables
Things that we can directly affect
Control Nomenclature
Outputs
Measured
speed of a car
Unmeasured
acceleration of a car
Control variables
important observable quantities that we
want to regulate
can be measured or unmeasured
Disturbances
Manipulated
Other
Process
Controller
Control
Example
wi, Ti
L
Pc
wc, Tci
T
wc, Tco
Po
Variables
wi , w o :
Ti, To:
wc:
P c:
Po:
Tci, Tco:
h:
wo, To
T
Example
Variables
Inputs
Disturbances
Outputs
wi
Ti
Tci
wc
h
wo
To
Pc
Po
Task: Classify the variables
d
r
Controller
Process
Model
Design
Implementation
Monitor
Performance
Often an iterative process, based on performance we may
decide to retune, redesign or remodel a given control system
Objectives
What are we trying to control?
Process modeling
What do we need?
Mechanistic and/or empirical
Controller design
How do we use the knowledge of process
behavior to reach our process control
objectives?
What variables should we measure?
What variables should we control?
What are the best manipulated variables?
What is the best controller structure?
Monitor performance
periodic retuning and redesign is often
necessary based on sensitivity of process or
market demands
statistical methods can be used to monitor
performance
Process Modeling
Motivation:
Develop understanding of process
a mathematical hypothesis of process
mechanisms
Match observed process behavior
useful in design, optimization and control
of process
Control:
Interested in description of process dynamics
Dynamic model is used to predict how
process responds to given input
Tells us how to react
Process Modeling
What kind of model do we need?
Process Modeling
What kind of model do we need?
Experimental vs Theoretical
Experimental
Derived from tests performed on actual
process
Simpler model forms
Easier to manipulate
Theoretical
Application of fundamental laws of physics
and chemistry
more complex but provides understanding
Required in design stages
Process Modeling
60
Steady-State 1
Output
55
Steady-State 2
50
45
40
0
50
100
150
Time
200
250
300
Process Modeling
Process Modeling
Output
1
0.9
0.8
0.7
0.6
0.5
0.4
50
100
150
Time
200
250
300
Process Modeling
Linear vs Nonlinear
Linear
basis for most industrial control
simpler model form, easy to identify
easy to design controller
poor prediction, adequate control
Nonlinear
reality
more complex and difficult to identify
need state-of-the-art controller design
techniques to do the job
better prediction and control
Process Modeling
Process Modeling
Modeling procedure
Check model consistency
do we have more unknowns than equations
Determine unknown constants
e.g. friction coefficients, fluid density and
viscosity
Solve model equations
typically nonlinear ordinary (or partial)
differential equations
initial value problems
Check the validity of the model
compare to process behavior
Process Modeling
Rate of Accumulation
of fundamental quantity
Flow
In
+
Flow
Out
Rate of
Production
Process Modeling
h
F
Process Modeling
Total mass in system = V = Ah
Flow in = Fin
Flow out = F
Total mass at time t = Ah(t)
Total mass at time t+t = Ah(tt
Accumulation
Ah(ttAh(t) = t(Fin-F ),
A h ( t t ) A h ( t )
( F in F ) ,
t
lim
t 0
A h ( t t ) A h ( t )
( F in F ) ,
t
dh
( F in F ) .
dt
Process Modeling
Model consistency
Can we solve this equation?
Variables: h, , Fin, F, A
Constants: , A
Inputs: Fin, F
Unknowns: h
Equations 1
Degrees of freedom
Process Modeling
Solve equation
Specify initial conditions h(0)=h0 and integrate
h (t) h (0)
t
0
F in ( ) F (
2
Fin
fow
1.5
1
0.5
0
10
20
30
40
50
60
70
80
90
100
10
20
30
40
50
60
70
80
90
100
1.3
1.2
1.1
1
0.9
Process Modeling
Energy balance
M
Tin, w
T, w
Q
Objective:
Control tank temperature
Fundamental quantity: Energy
Assumptions: Incompressible flow
Constant hold-up
Process Modeling
dH
H i n H
dt
out
Q W
dH
H i n H
dt
out
H C P V ( T T ref )
H i n C P w ( T i n T r e f )
H o u t C P w ( T T r e f )
Process Modeling
After substitution,
d ( C PV ( T T ref ) )
dt
C P w ( T in T r e f ) C P w ( T T r e f ) Q
d ( T T ref )
C P w ( T in T r e f ) C P w ( T T r e f ) Q
dt
Divide by CpV
dT w
Q
( T in T )
dt V
C PV
Process Modeling
Resulting equation:
dT
F
Q
( T in T )
dt V
V C
Model Consistency
Variables: T, F, V, Tin, Q, Cp,
Constants: V, Cp,
Inputs: F, Tin, Q
Unknown: T 1
Equations
Process Modeling
Assume F is fixed
T (t) T (0)e
t /
e ( t ) / ( T in ( ) Q ( )
)d
C
V
p
0
d T (t) F (t)
Q (t)
( T in ( t ) T ( t ) )
dt
V
V C P
Product F(t)T(t) makes this differential
equation nonlinear.
Solution will need numerical integration.
Process Modeling
A simple momentum balance
Rate of
Accumulation
Momentum
In
Momentum
Out
Sum of forces
acting on system
Speed (v)
Friction
Force of
Engine (u)
Objective:
Control car speed
Quantity:
Momentum
Quantity
Assumption:
Assumption Friction proportional to speed
Process Modeling
Forces are: Force of the engine = u
Friction = bv
Balance:
Total momentum = Mv
d ( M v (t))
d v (t)
M
u (t) b v (t)
dt
dt
Model consistency
Variables:
Constants:
Inputs: u
Unknowns
M, v, b, u
M, b 2
1
v
1
Process Modeling
Gravity tank
Fo
Process Modeling
From mass and momentum balances,
dh Fo A P v
dt
A
A
dv hg K F v2
dt
L
A P
A system of simultaneous ordinary
differential equations results
Linear or nonlinear?
Process Modeling
Model consistency
Variables
Constants
A, Ap, g, L, KF,
Inputs
Fo
Unknowns
h, v
Equations
Model is consistent
Solution of ODEs
dT
F
Q
( T in T )
t CP,V and V
V C
specifyd
specify T(0)
specify Q(t) and F(t)
Input Specifications
Input
0.5
5
Time
10
10
1.4
1.2
1
0.8
0.6
0.4
0.2
0
Input
6
5
4
3
2
1
0
5
Time
10
8
7
6
Output
5
4
3
2
1
0
-1
5
Time
10
Input
60
50
40
30
20
10
0
5
Time
10
5
Time
10
0.45
0.4
0.35
0.3
Output
0.25
0.2
0.15
0.1
0.05
0
-0.05
Input
0.5
5
Time
10
5
Time
10
1.2
1
Output
0.8
0.6
0.4
0.2
0
-0.2
1.5
Input
0.5
-0.5
-1
-1.5
10
15
Time
20
25
30
10
15
Time
20
25
30
0.8
0.6
0.4
Output
0.2
0
-0.2
-0.4
-0.6
-0.8
1.5
Input
0.5
-0.5
-1
-1.5
10
15
Time
20
25
30
0.6
0.4
Output
0.2
0
-0.2
-0.4
-0.6
-0.8
10
15
Time
20
25
30
Linear ODEs
F ( s ) [ f ( t )] f ( t ) e
st
t0
d y (t)
a y (t) b u (t)
dt
y ( 0 ) c
Integration
Multiplication
Y(s) = G(s)U(s)
dt
Common Transforms
Useful Laplace Transforms
1. Exponential
f (t) e bt
[ e
bt
] e
bt st
[ e
bt
d t e (sb )td t
0
(sb )t
sb
sb
2. Cosine
e j t e j t
f ( t ) c o s ( t )
2
1 ( s j ) t
( s j ) t
[c o s ( t )] e
dt e
dt
2 0
0
1
1
1
s
2
2 s j s j
s 2
Common Transforms
Useful Laplace Transforms
3. Sine
e j t e j t
f ( t ) s in ( t )
2 j
1 ( s j ) t
( s j ) t
[s in ( t )]
dt e
dt
e
2 j 0
0
1
1
1
2
2 j s j s j
s 2
Common Transforms
Operators
1. Derivative of a function f(t)
df (t)
dt
du df
v
st
df
[ ] u v
dt
u d v f (t)e
0
df
[ ] s f ( t ) e
dt
0
st
st
0
( sf (t)e
st
)d t
st
F (s)
( f ( )d )d t
s
0
Common Transforms
Operators
3. Delayed function f(t-)
g (t)
f (t )
g ( t ) e
0
st
t
t
(0 )d t e st f (t )d t
g ( t ) e s F ( s )
Common Transforms
Input Signals
1. Constant
[ a ] a e
f (t) a
st
st
a
e
dt (
[ f ( t )] a e
st
st
a
e
dt (
f ( t )
a te
0
st
dt
st
) 0 a
t 0
t 0
0
3. Ramp function f ( t )
at
t 0
t 0
0
f (t)
a
2. Step
) 0 a
at
ae
st
dt
a
s2
Common Transforms
Input Signals
4. Rectangular Pulse
0
f (t) a
0
t 0
0 t tw
t tw
tw
a
f ( t ) a e st d t (1 e tw s )
s
0
5. Unit impulse
( t ) l i m
tw 0 tw
(1 e tw s )
se tw s
( t ) l i m
1
s
tw 0
Laplace Transforms
Final Value Theorem
lim
y (t)
lim s Y ( s )
s 0
Limitations:
y (t) C 1,
lim s Y ( s ) e x is ts s R e ( s ) 0
s 0
sY
(s)
Solution of ODEs
We can continue taking Laplace transforms
and generate a catalogue of Laplace
domain functions. See SEM Table 3.1
The final aim is the solution of ordinary
differential equations.
Example
Using Laplace Transform, solve
dy
5
4 y 2 ,
dt
y (0) 1
Result
y ( t ) 0 .5 0 .5 e 0 .8 t
T in ( t ) T ( t )
Q ( t )
F d t
FC P
( T ( s ) T ( 0 ) ) T in ( s ) T ( s ) K P Q ( s )
1
K P
T (s)
T (0)
T in ( s )
Q (s)
s 1
s 1
s 1
Linear ODEs
Notes:
The expression
T (s)
1
K P
T (0)
T in ( s )
Q (s)
s 1
s 1
s 1
Q(s)
T(0)
1
s 1
K P
s 1
s 1
+
+
T(s)
Laplace Transform
Assume Tin(t) = sin(t) then the transfer
function gives directly
1
T in ( s ) 2
s 1
( s 2 )(s 1 )
Cannot invert explicitly, but if we can find A
and B such that
B
2
2
2
s 1 ( s 2 )(s 1 )
s
A
Linear ODEs
We deal with rational functions of the form
r(s)=p(s)/q(s) where degree of q > degree
of p
q(s) is called the characteristic polynomial of
the function r(s)
Theorem:
Every polynomial q(s) with real
coefficients can be factored into the
product of only two types of factors
powers of linear terms (x-a)n and/or
powers of irreducible quadratic terms,
(x2+bx+c)m
q (s) (s bi)
i1
expand as
i
r(s)
i1s bi
n
1
2
n
r(s)
2
s b (s b)
(s b)n
1
(s bi )
i1
Transfer Function
1
K P
T (s)
T (0)
T in ( s )
Q (s)
s 1
s 1
s 1
Tin(s)
Q(s)
T(0)
1
s 1
K P
s 1
s 1
K P
s 1
T(s)
Process Control
Time Domain
Laplace Domain
Process Modeling,
Experimentation and
Implementation
Transfer function
Modeling, Controller
Design and Analysis
Transfer function
Order of underlying ODE is given by degree
of characteristic polynomial
e.g. First order processes
K P
Y (s)
U (s)
s 1
K P
Y (s) 2 2
U (s)
s 2 s 1
Y (s)
Final value theorem
s (s 1 )
lim s Y ( s ) lim G ( s ) K
s 0
s 0
Transfer function
1
K P
T (s)
T (0)
T in ( s )
Q (s)
s 1
s 1
s 1
Tin(s)
Q(s)
T(0)
1
s 1
K P
s 1
s 1
+
+
T(s)
Transfer Function
U(s)
K P
s 1
Y1(s)
K P
s 1
Transfer Function
K P
U (s)
s 1
K P
Y 2(s)
Y1 ( s )
s 1
K P K P
Y1 ( s )
U (s)
s 1 s 1
Y1 ( s )
Y2(s)
Deviation Variables
To remove dependence on initial condition
e.g.
1
K P
T (s)
T (0)
T in ( s )
Q (s)
s 1
s 1
s 1
Procedure
Find steady-state
Write steady-state equation
Subtract from linear ODE
Define deviation variables and their derivatives if
required
Substitute to re-express ODE in terms of deviation
variables
Example
Fc, Tcin
Fc, Tc
F, T
Assumptions:
Assumptions
Constant hold-up in tank and jacket
Constant heat capacities and densities
Incompressible flow
Model
dT
F
hc Ac
( T in T )
(Tc T )
dt V
C PV
d Tc Fc
hc Ac
( T c in T c )
(Tc T )
dt
Vc
c C P cV c
Nonlinear ODEs
Q: If the model of the process is nonlinear,
how do we express it in terms of a transfer
function?
A: We have to approximate it by a linear one
(i.e.Linearize) in order to take the Laplace.
f(x)
f
(x0)
x
f(x0)
x0
x
Nonlinear systems
f (xs)
(x xs)
x
f (x ,u ) f (xs ,u s )
f ( x s ,u s )
f ( x s ,u s )
(x xs)
(u us )
x
u
3. ODEs
x f ( x ) f ( x s )
f (xs)
(x xs)
x
Transfer function
Y (s)
G 1(s)
U 1(s)
Y (s)
G 2 (s)
U 2 (s)
dh
Fi F Fi h
dt
A d h
Fi h
dt
dh
h K p Fi
dt
dh
h K p Fi
dt
dv
ubv
dt
M dv 1
u v
b dt
b
dv
K pu v
dt
Stirred-tank heater
M
dT
C pV
C p F T Q
dt
V dT
1
Q T
F dt
C p F
dT
K pQ T
dt
Note:
T i n ( t ) 0
K p
v ( s )
u ( s ) s 1
K p
T ( s )
Q ( s ) s 1
A/
Speed of a car
M/b
1/b
Stirred-tank heater
1/CpF
V/F
Car:
Capacity to store momentum: M
Resistance to momentum transfer : 1/b
Stirred-tank heater
Capacity to store energy: CpV
Resistance to energy transfer : 1/ CpF
Y (s)
M
s 1 s
p
y(t)/KpM
0.632
0.6
0.5
0.4
0.3
0.2
0.1
0
t/
K p
lim
K
s 0 s 1
O v e ra ll C h a n g e in y y
O v e ra ll C h a n g e in u u
What do we need?
Process at steady-state
Step input of magnitude M
Measure process gain from new steady-state
Measure time constant
Y (s)
s 1 s 2
5
4.5
y(t)/Kpa
4
3.5
3
2.5
2
1.5
1
0.5
0
0.5
1.5
2.5
t/
3.5
4.5
K P
A
Y (s)
s 1 s 2
(s)
A
2
1
Sinusoidal input Asin(t)
t
s in ( t )
2
1.5
1
AR
y(t)/A
0.5
0
-0.5
-1
-1.5
10
t/
12
14
16
18
20
Bode Plots
AR/Kp
High Frequency
10
10
Asymptote
Corner Frequency
-1
-2
10
-2
-1
10
10
10
10
0
-20
-40
-60
-80
-100
-2
10
-1
10
Amplitude Ratio
K
AR
1 2 2
10
10
10
Phase Shift
ta n
( )
Integrating Processes
Example: Liquid storage tank
Fi
h
F
dh
Fi F
dt
dh
A
Fi F
dt
F i F i F is ,
F F Fs
dh
A
Fi F
dt
H ( s ) 1 / A
H ( s )
1/ A
s
Process
F ( acts
s ) as a spure integrator F i ( s )
Process Modeling
Input
Output
K M
KM
Y (s)
2
s s
s
Slope = KM
Time
Time
0
y (t)
KM t
t 0
t 0
Integrating processes
Input
Output
K
KM
Y (s)
M
s
s
Time
KM
Time
0
y (t)
KM
t 0
t 0
Integrating Processes
KM
) 2 (1 e
s
tw s
Input
Output
K M
Y (s)
(1 e
s s
Time
KM t
y (t)
K M tw
Time
t tw
t tw
U(s)
U(s)
K P1
1s 1
P 2
2s 1
K P1K P2
(1s 1)( 2s 1)
Y(s)
Y(s)
K P1K P2
Y (s)
U (s)
( 1s 1 )( 2s 1 )
Momentum Balance
M
d dx
dx
pA K x C
dt dt
dt
M d 2x C dx
A
x
p
K dt
K dt
K
A
x ( s )
K
p ( s ) M
s2 C s 1
K
K
K P
Y (S ) 2 2
U (s)
s 2 s 1
where P = Process steady-state gain
= Process time constant
= Damping Coefficient
Underdamped
=1 Critically Damped
Overdamped
4 2 2 4
22
2 1
1.8
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0
10
Tin, w
Response of T2 to
Tin is an example of an
overdamped second
order process
Q
T1, w
T2, w
Q
5. Decay ratio:
c
D R exp
b
2
2
1.8
1.6
1.4
1.2
+5%
c
1
-5%
0.8
0.6
0.4
0.2
0
tp
0
tr
10
15
20
ts
25
30
35
40
45
50
Sinusoidal Response
Y (s)
y (t)
K p
2 s 2 2 s 1 s 2 2
K p A
1
where
1
ta n
2 2
2 2
s in ( t )
2
1 ( )
ARn
2 2
2 2
10
10
=1
-1
10
-1
10
10
10
0
-50
=1
-100
-150
-1
10
10
10
r(s)
G (s)
q ( s) b 0 b1 s b s
where r(s) and q(s) can be factored as
q ( s ) b 0 ( 1 s 1 ) ( 2 s 1 ) ( s 1 )
r ( s ) a 0 ( a 1 s 1 ) ( a 2 s 1 ) ( a s 1 )
s.t.
( a 1 s 1 ) ( a s 1 )
G (s) K
( 1 s 1 ) ( s 1 )
z1
a1
, , z
p1
1
1
, , p
1
Poles
e.g. A transfer function of the form
K
s(1 s 1)( 2 s 2 2 2 s 1)
with
0 1
t
t
2 s in ( 1 2 t
2 co s( 1 2 t )
2
Poles can help us to describe the qualitative
behavior of a complex system (degree>2)
The sign of the poles gives an idea of the stability
of the system
Poles
Function ROOTS
e.g.
q (s) s3 s2 s 1
ROOTS([1 1 1 1])
ans =
-1.0000
0.0000 + 1.0000i
0.0000 - 1.0000i
MATLAB
Poles
Plotting poles in the complex plane
1
0.8
0.6
Imaginary axis
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-1.2
-1
-0.8
-0.6
-0.4
Real axis
-0.2
q (s) s3 s2 s 1
0.2
Poles
Process Behavior with purely complex poles
1.8
1.6
1.4
1.2
y(t)
1
0.8
0.6
0.4
0.2
0
10
15
20
25
t
30
35
40
45
50
Poles
1
0.8
0.6
Imaginary axis
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
-0.5
-0.4
-0.3
-0.2
-0.1
0
0.1
Real axis
0.2
0.3
2 s 3 2 .5 s 2 3 s 1
0.4
0.5
Poles
Process behavior with mixed real and
complex poles
Unit Step Response
1
0.9
0.8
0.7
y(t)
0.6
0.5
0.4
0.3
0.2
0.1
0
10
t
12
14
16
18
20
Poles
1.5
Imaginary axis
0.5
-0.5
-1
-1.5
-0.8
-0.6
-0.4
-0.2
0
Real axis
0.2
2 s 4 2 .5 s 3 3 s 2 s 0 .5
0.4
0.6
Poles
Process behavior with unstable pole
Unit Step Response
160
140
120
100
y(t)
80
60
40
20
0
-20
10
t
12
14
16
18
20
Zeros
Transfer function:
K p ( a s 1)
G (s)
(1 s 1)( 2 s 1)
t
t
1 a
2
1 e
2 e
y (t) K p M 1 a
1
2
1
2
2.5
y(t)/KM
2
8
1.5
2
1
0.5
0
-1
-2
0
-0.5
10
Time
12
14
16
18
20
Zeros
Observations:
Adding a zero to an overdamped second order
process yields overshoot and inverse response
Inverse response is observed when the zeros lie
in right half complex plane, Re(z)>0
Overshoot is observed when the zero is
dominant ( a 1 )
Pole-zero cancellation yields a first order
process behavior
In physical systems, overshoot and inverse
response are a result of two process with
different time constants, acting in opposite
directions
Zeros
Can result from two processes in parallel
K1
1 s 1
U(s)
Y(s)
K2
2 s 1
( a s 1)
G (s) K
(1 s 1)( 2 s 1)
K K1 K2
K 1 2 K 2 1
K1 K 2
Dead Time
Fi
Control loop
Dead time
Delayed transfer functions
U(s)
d s
G (s)
Y ( s ) e d s G ( s )U ( s )
e.g. First order plus dead-time
e d s K p
G (s)
s1
Second order plus dead-time
e d s K P
G (s)
2 s 2 2 s 1
Y(s)
Dead time
1
0.9
0.8
0.7
y/KM
0.6
0.5
0.4
0.3
0.2
0.1
0
D 0.5
1.5
2.5
3
t/tau
3.5
4.5
5.5
Dead Time
Problem
use of the dead time approximation makes
analysis (poles and zeros) more difficult
e d s K p
G (s)
s1
s
2
e s G 1 ( s)
1 s
2
1
2
1 s
2
12
e s G 2 ( s )
2
1 s
2
12
s2
s2
Pade Approximations
e
K p 1 2 s K p
G (s)
s 1
s1
1 s
2
s
Process Approximation
Dead time
First order plus dead time model is often used
for the approximation of complex processes
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
Process Approximation
1.2
1
0.8
0.6
0.4
0.2
0
-0.2
Process Approximation
K Pe s
Y (s)
U (s)
s 1
D
K Pe s
Y (S ) 2 2
U (s)
s 2 s 1
D
U(s)
Y(s)
Ds
G(s)
Process Approximation
U(s)
Y(s)
K P1K P 2 K PN
(1 s 1 ) ( 2 s 1 ) ( N s 1 )
For two dominant time constants and
process well approximated by
e s K p
G (s)
(1s 1)( 2 s 1)
N
i
i3
Process Approximation
Example
G (s)
1
(1 0 s 1 )( 2 5 s 1 )( s 1 ) 2
1.2
1
0.8
0.6
e 12 s
G 1(s)
25s 1
0.4
e 2 s
G 2 (s)
(1 0 s 1 )( 2 5 s 1 )
0.2
0
-0.2
20
40
60
80
100
120
140
160
180
200
Empirical Modeling
Objective:
To identify low-order process dynamics (i.e.,
first and second order transfer function models)
Estimate process parameters (i.e., Kp, and
Methodologies:
1. Least Squares Estimation
more systematic statistical approach
2. Process Reaction Curve Methods
quick and easy
based on engineering heuristics
Empirical Modeling
Least Squares Estimation:
Simplest model form
E [ y ] 0 1 x
Process Description
y 0 1 x
where
y
x
1, 0
Problem:
Find 1, 0 that minimize the sum of squared
residuals (SSR)
SSR
n
( yi
i1
0 1 x i ) 2
Empirical Modeling
Solution
Differentiate SSR with respect to parameters
n
SSR
2 ( y i 0 1 x i ) 0
0
i1
n
SSR
2 x i ( y i 0 1 x i ) 0
1
i1
These are called the normal equations.
Solving for parameters gives:
0 y 1 x
1
where
n
xiyi nxy
i1
n 2
2
xi nx
i1
n x
i
i1 n
i1
yi
n
Empirical Modeling
Compact form
Define
y1
1
y
1
Y 2 , X
y
1
n
x1
x2
xn
0
1
Then
y 1 0 1 x 1
y x
0
1 2
E 2
y x
n
0
1 n
Y X
Problem
find value of that minimize SSR
T
SSR E
Empirical Modeling
Solution in Compact Form
Normal Equations can be written as
E T E
0
which can be shown to give
X T X X T Y
or
1 T
X T X
X Y
In practice
Manipulations are VERY easy to perform in
MATLAB
Extends to general linear model (GLM)
E [ y ] 0 1 x 1 p x p
Polynomial model
E [ y ] 0 1 x 1 1 1 x 12
Empirical Modeling
Control Implementation:
previous technique applicable to process model that
are linear in the parameters (GLM, polynomials in
x, etc)
i.e. such that, for all i, the derivatives
function of
are
e i not a
E [ y ( t )] K p M (1 e t / )
Nonlinear in Kp and
1 e t /1 2 e t / 2
E [ y ( t ) ] K p M 1
Nonlinear in K p, and 1 2
Empirical Modeling
Nonlinear Least Squares required for control
applications
system output is generally discretized
y ( t ) [ y ( t1 ) , y ( t 2 ) , , y ( t n ) ]
or, simply
y ( t ) [ y 1 , y 2 , , y n ]
First Order process (step response)
E [ y i ] K p M (1 e ti / )
Least squares problem becomes the minimization of
SSR
i1
( y i K p M (1 e ti / ) ) 2
Empirical Modeling
Example
Nonlinear Least Squares Fit of a first order
process from step response data
Model
E [ y ( t ) ] 3 .0 K p ( 1 e t / )
Data
Step Response
4.5
4
3.5
3
y(t)
2.5
2
1.5
1
0.5
0
-0.5
10
20
30
40
t
50
60
70
80
Empirical Modeling
Results:
Using MATLAB function leastsq obtained
K p 1 . 3 4 3 2 , 1 1 .8 9 6 2
Resulting Fit
Step Response
4.5
4
3.5
3
y(t)
2.5
2
1.5
1
0.5
0
-0.5
10
20
30
40
t
50
60
70
80
Empirical Modeling
Approximation using delayed transfer
functions
For first order plus delay processes
0
E [ yi]
( ti ) /
K
M
(
1
e
)
p
0 t
t
Difficulty
Discontinuity at makes nonlinear least
squares difficult to apply
Solution
1. Arbitrarily fix delay or estimate using
alternative methods
2. Estimate remaining parameters
3. Readjust delay repeat step 2 until best value of
SSR is obtained
Empirical Modeling
Example 2
Underlying True Process
G (s)
1
(1 0 s 1 )( 2 5 s 1 )( s 1 ) 2
Data
3.5
3
2.5
y(t)
2
1.5
1
0.5
0
-0.5
20
40
60
80
100
120
140
Empirical Modeling
Fit of a first order plus dead time
1 .0 0 0 0 e 1 1 s
G 1(s)
( 2 7 .3 8 9 9 s 1 )
Second order plus dead time
0 .9 9 4 6 e 2 s
G 2 (s)
( 2 4 . 9 0 5 8 s 1 ) ( 1 0 .1 2 2 9 s 1 )
3.5
3
2.5
y(t)
2
1.5
1
0.5
0
-0.5
20
40
60
80
100
120
140
Empirical Modeling
Process reaction curve method:
based on approximation of process using first
order plus delay model
D(s)
M/s
Y*(s)
Gp
Gc
U(s)
Gs
Ym(s)
Manual Control
1. Step in U is introduced
2. Observe behavior ym(t)
K M e s
Ym (s)
s( s 1)
Y(s)
Empirical Modeling
First order plus dead-time approximations
1.2
1
0.8
0.6
KM
0.4
0.2
0
-0.2
0
Empirical Modeling
Estimation of time constant and dead-time
from process reaction curves
find times at which process reaches 35.3% and
85.3%
1
0.9
0.8
0.7
y(t)
0.6
0.5
0.4
0.3
0.2
0.1
0
20
t1
40
60
t2
80
t
100
Estimate
1 .3 t 1 0 .2 9 t 2
0 .6 7 ( t 2 t1 )
120
140
160
Empirical Process
Example
For third order process
G (s)
Estimates:
1
(1 0 s 1 )( 2 5 s 1 )( s 1 ) 2
t 1 2 3 , t 2 6 2 .5
1 1 .7 8 , 2 6 .4 6
Compare:
Least Squares Fit
1 .0 0 0 0 e 1 1 s
G 1(s)
( 2 7 .3 8 9 9 s 1 )
Reaction Curve
1 .0 0 e 1 1 .7 8 s
G 1(s)
( 2 6 .4 6 s 1 )
Empirical Modeling
Process Reaction Curve Method
based on graphical interpretation
very sensitive to process noise
use of step responses is troublesome in normal
plant operations
frequent unmeasurable disturbances
difficulty to perform instantaneous step
changes
maybe impossible for slow processes
restricted to first order models due to reliability
quick and easy
Least Squares
systematic approach
computationally intensive
can handle any type of dynamics and input signals
can handle nonlinear control processes
reliable
Feedback Control
Fin,Tin
TC
TT
IP
LT
Ps
Steam
Condensate
LC
IP
F,T
Feedback Control
Control Objective:
maintain a certain outlet temperature and tank
level
Feedback Control:
temperature is measured using a thermocouple
level is measured using differential pressure
probes
undesirable temperature triggers a change in
supply steam pressure
fluctuations in level trigger a change in outlet
flow
Note:
level and temperature information is measured at
outlet of process/ changes result from inlet flow
or temperature disturbances
inlet flow changes MUST affect process before an
adjustment is made
Examples
Feedback Control:
requires sensors and actuators
Controller
Valve
TR -
Tin, F
P
Tank
M
Controller:
Thermocouple
Actuator:
physical (with dynamics) process triggered by controller
directly affects process
Sensor:
monitors some property of system and transmits signal
back to controller
Closed-loop Processes
U(s)
Gp
Y(s)
D(s)
controller
R(s)+
-
Gc
actuator
Gv
process
Gp
sensor
Controller is dynamic system
Gm that interacts with the
process and the process hardware to yield a specific
behaviour
+ Y(s)
R(s)+
-
Gc
actuator
Gv
process
Gp
sensor
Gm
Gp(s)
Gc(s)
Gm(s)
Gv(s)
+ Y(s)
Servo
Regulatory
Y ( s ) G p ( s )V ( s )
Y ( s ) G p ( s ) G v ( s )U ( s )
Y (s) G p (s)G
Y (s) G p (s)G
Isolate Y(s)
Y ( s ) D ( s ) G p ( s )V ( s )
Y ( s ) D ( s ) G p ( s ) G v ( s )U ( s )
Y (s) D (s) G p (s)G
Y (s) D (s) G p (s)G
( s ) G c ( s )0 Y m ( s )
Y ( s ) D ( s ) G p ( s ) G v ( s ) G c ( s )0 G m ( s )Y ( s )
v
Isolating Y(s)
Y (s)
1
D (s)
1 G p (s)G v (s)G c (s)G m (s)
PID Controllers
The acronym PID stands for:
P
I
D
- Proportional
- Integral
- Derivative
PID Controllers:
greater than 90% of all control
implementations
dates back to the 1930s
very well studied and understood
optimal structure for first and second order
processes (given some assumptions)
always first choice when designing a
control system
1 t
de
u (t) K c e(t)
e ( ) d D
I 0
dt
uR
PID Control
PID Control Equation
Derivative
Action
Proportional
Action
1 t
de
u (t) K c e(t)
e ( ) d D
I 0
dt
Integral
Action
uR
Controller
Bias
Proportional gain
I
D
uR
PID Control
PID Controller Transfer Function
u ( t ) u R U ( s ) K c 1
D s E (s)
Is
or:
I
U ( s ) P D s E ( s )
s
Note:
numerator of PID transfer function cancels
second order dynamics
denominator provides integration to remove
possibility of steady-state errors
PID Control
Controller Transfer Function:
G c (s) K c 1
D s
Is
or,
I
G c ( s ) P D s
s
Note:
Many variations of this controller exist
Easily implemented in SIMULINK
each mode (or action) of controller is better
studied individually
Proportional Feedback
Form:
u (t) u R K ce(t)
Transfer function:
or,
U '( s) K c E ( s)
G c (s) K c
Closed-loop form:
G p (s)G v (s)K c
Y (s)
R (s)
1 G p (s)G v (s)K cG m (s)
1
D (s)
1 G p (s)G v (s)K cG m (s)
Proportional Feedback
Example:
Given first order process:
K p
G p (s)
,
s 1
G v (s) 1,
G m (s) 1
s 1
1 K pK c
1 K pK c
1 K pK c
Closed-Loop
Time Constant
1
1 K pK c
D (s)
s 1
Proportional Feedback
Final response:
K pK c
lim y s e rv o ( t)
,
1
K
K
t
p c
lim y re g ( t )
1 K pK c
t
Note:
for zero offset response we require
lim y serv o ( t ) 1 ,
Tracking Error
lim y re g ( t ) 0
Disturbance rejection
Proportional Feedback
Servo dynamics of a first order process under
proportional feedback
1
10.0
0.9
5.0
0.8
y(t)/KM
0.7
0.6
1.0
0.5
0.4
0.5
0.3
0.2
Kc
0.1
0
t/
0.01
9
10
Proportional Feedback
High-order process
e.g. second order underdamped process
1.5
y(t)/KM
5.0
2.5
1.0
0.5
0.5
0.01
0
10
15
20
25
Proportional Feedback
Important points:
proportional feedback does not change the
order of the system
started with a first order process
closed-loop process also first order
order of characteristic polynomial is
invariant under proportional feedback
speed of response of closed-loop process is
directly affected by controller gain
increasing controller gain reduces the
closed-loop time constant
in general, proportional feedback
reduces (does not eliminate) offset
speeds up response
for oscillatory processes, makes closedloop process more oscillatory
Integral Control
Integrator is included to eliminate offset
provides reset action
usually added to a proportional controller to
produce a PI controller
PID controller with derivative action turned
off
PI is the most widely used controller in
industry
optimal structure for first order processes
PI controller form
u (t) K c e(t)
e
(
)
d
uR
I 0
1 t
1
U ( s ) K c 1
E (s)
Is
PI Feedback
Closed-loop response
Y (s)
I s 1
Is
R (s)
I s 1
G m (s)
Is
G p (s)G v (s)K c
1 G p (s)G v (s)K c
1
Is
1 G p (s)G v (s)K c
Is
D (s)
G m (s)
PI Feedback
Example
PI control of a first order process
K p
G p (s)
,
s 1
G v (s) 1,
G m (s) 1
Closed-loop response
Is
Y (s)
I 2 1
s
K cK p
K
1
R (s)
K cK p
Is1
cK p
I 2 I
s
K cK p
K cK p
I 2 1 K cK p
K cK p
K cK p
Note:
offset is removed
closed-loop is second order
Is1
D (s)
PI Feedback
Example (contd)
effect of integral time constant and controller gain
on closed-loop dynamics
natural period of oscillation
cl
I
K cK p
damping coefficient
1
2
K p
K c K p 1
K c I
K cK p
PI Feedback
Effect of integral time constant on servo
dynamics
1.8
0.01
1.6
1.4
Kc=1
0.1
y(t)/KM
1.2
0.5
1.0
0.8
0.6
0.4
0.2
0
10
PI Feedback
Effect of controller gain
10.0
5.0
1
0.9
1.0
0.5
0.8
y(t)/KM
0.7
0.6
0.1
0.5
0.4
0.3
0.2
I=1
0.1
0
10
PI Feedback
Effect of integral action of regulatory
response
0.4
0.35
0.3
y(t)/KM
0.25
0.2
0.15
0.1
0.05
0
-0.05
-0.1
10
PI Feedback
Important points:
integral action increases order of the system in
closed-loop
PI controller has two tuning parameters that can
independently affect
speed of response
final response (offset)
integral action eliminates offset
integral action
should be small compared to proportional
action
tuned to slowly eliminate offset
can increase or cause oscillation
can be de-stabilizing
Derivative Action
Derivative of error signal
Used to compensate for trends in output
measure of speed of error signal change
provides predictive or anticipatory action
P and I modes only response to past and current
errors
Derivative mode has the form
D
de
D
Kc
dt
if error is increasing, decrease control
action
if error is decreasing, decrease control
action
Always implemented in PID form
1 t
de
u (t) K c e(t)
e ( ) d D
I 0
dt
uR
PID Feedback
Transfer Function
U ( s ) K c 1
D s E (s)
Is
Closed-loop Transfer Function
D I s2 I s
G p ( s ) G v ( s ) K c
Is
Y (s)
D I s2 I s
1 G p ( s ) G v ( s ) K c
Is
R (s)
G m ( s )
1
D I s2 I s 1
G m ( s )
1 G p ( s ) G v ( s ) K c
Is
D (s)
PID Feedback
Example:
PID Control of a first order process
K p
G p (s)
,
s 1
G v (s) 1,
G m (s) 1
Y (s)
D I s2 I s 1
R (s)
2 1 KcK p
I
I s 1
D I s
KcK p
KcK p
2 I
s
s
KcK p
D (s)
1 KcK p
I
2
I s 1
DI s
KcK p
KcK p
KcK p
PID Feedback
Effect of derivative action on servo dynamics
1.6
1.4
y(t)/KM
1.2
1
0.1
0.8
0.5
0.6
1.0 2.0
0.4
0.2
0
10
PID Feedback
Effect of derivative action on regulatory
response
0.25
0.2
0.15
0.1
0.05
0.1
2.0
0.5 1.0
0
-0.05
-0.1
10
Derivative Action
Important Points:
Characteristic polynomial is similar to PI
derivative action does not increase the order of the
system
adding derivative action affects the period of
oscillation of the process
good for disturbance rejection
poor for tracking
the PID controller has three tuning parameters and
can independently affect,
speed of response
final response (offset)
servo and regulatory response
derivative action
should be small compared to integral action
has a stabilizing influence
difficult to use for noisy signals
usually modified in practical implementation
Closed-loop Stability
Every control problem involves a
consideration of closed-loop stability
General concepts:
BIBO Stability:
An (unconstrained) linear system is said to
be stable if the output response is bounded
for all bounded inputs. Otherwise it is
unstable.
Comments:
Stability is much easier to prove than
unstability
This is just one type of stability
Closed-loop Stability
Closed-loop dynamics
G cG vG p
1
*
Y (s)
Y (s)
D (s)
1 G cG vG pG m
1 G cG vG pG m
GOL
if GOL is a rational function then the closed-loop
transfer functions are rational functions and
take the form
a 0 a 1 s a s
r(s)
G (s)
q ( s) b 0 b1 s b s
and factor as
( a 1 s 1 ) ( a s 1 )
G (s) K
( 1 s 1 ) ( s 1 )
Closed-loop stability
General Stability criterion:
A closed-loop feedback control system is stable
if and only if all roots of the characteristic
polynomial are negative or have negative real
parts. Otherwise, the system is unstable.
Unstable region is the right half plane of the
complex plane.
Valid for any linear systems.
Underlying system is almost always nonlinear
so stability holds only locally. Moving away
from the point of linearization may cause
instability.
Closed-loop Stability
Problem reduces to finding roots of a
polynomial
Easy (1990s) way : MATLAB function ROOTS
Traditional:
1. Routh array:
Test for positivity of roots of a
polynomial
2. Direct substitution
Complex axis separates stable and
unstable regions
Find controller gain that yields purely
complex roots
3. Root locus diagram
Vary location of poles as controller
gain is varied
Of limited use
Closed-loop stability
Routh array for a polynomial equation
a n s n a n 1 s n 1 a 1 s a 0 0
is
1
2
3
4
n 1
an
a n 1
b1
c1
z1
an2
an3
b2
c2
an4
an5
b3
where
a n 1a n 2 a n 3a n
a
a
a n 5a n
, b 2 n 1 n 4
,
a n 1
a n 1
b a
b 2 a n 1
b a
b 3 a n 1
c1 1 n 3
, c2 1 n 5
,
b
b
1
Elements of left1 column must be
positive to
b1
have
Polynomial Coefficients
a 5 2 . 3 6 , a 4 1 . 4 9 , a 3 0 .5 8 , a 2 1 . 2 1 , a 1 0 . 4 2 , a 0 0 . 7 8
Routh Array
a 5 ( 2 .3 6 )
a 4 ( 1 .4 9 )
b 1 ( 2 .5 0 )
c 1 ( 0 .7 2 )
d 1 ( 1 .8 9 )
e 1 ( 0 .7 8 )
a 3 ( 0 .5 8 )
a 2 ( 1 .2 1 )
b 2 ( 0 .8 2 )
c 2 ( 0 .7 8 )
d 2 (0)
a 1 ( 0 .4 2 )
a 0 ( 0 .7 8 )
b3 (0)
Direct Substitution
Observation:
Process becomes unstable when poles appear on
right half plane
Find value of Kc that yields purely complex
poles
Strategy:
Start with characteristic polynomial
c (s=j)
Substitute for complex pole
j )
Solve for qKc( and
K c r ( j ) 0
r(s)
q s
1 Kc
0
3
2
s 0 .5 s 0 .5 s 0 . 7 5
s 3 0 .5 s 2 0 .5 s 0 . 7 5 K c s K c 0
s 3 0 .5 s 2 ( K c 0 .5 ) s ( K c 0 . 7 5 ) 0
Real Part
Complex Part
( K c 0 .5 ) 3 0
0 .5 2 K c 0 . 7 5 0
K c 0 .5 2 0 . 7 5 ( 0 .5 2 0 . 7 5 0 .5 ) 3 0
0 .5 2 0 . 2 5 0
2 /2,
Kc 1
System is unstable
if
Kc 1
Kc-0
Imaginary Axis
0.5
-0.5
Kc-0
-1
-1.5
-1.5
-1
-0.5
0
Real Axis
0.5
1.5
S
P
Controller Tuning
Can be achieved by
Direct synthesis : Specify servo transfer
function required and calculate required
controller - assume plant = model
Internal Model Control: Morari et al. (86)
Similar to direct synthesis except that plant and
plant model are concerned
Tuning relations:
Cohen-Coon - 1/4 decay ratio
designs based on ISE, IAE and ITAE
Frequency response techniques
Bode criterion
Nyquist criterion
Field tuning and re-tuning
Direct Synthesis
From closed-loop transfer function
G cG p
C
R 1 G cG p
Isolate Gc
1 C R
Gc
G p 1 C
R
1
G pm
R d
1 C
R d
Direct Synthesis
1. Perfect Control
C 1
R d
cannot be achieved, requires infinite gain
D
R
+
G c*
Gp
Gpm
G c* G p
1 G c* ( G p G p m )
1 G c* G p
1 G c* ( G p G p m )
G c*
1 G c* G p m
1
G p m
1
( c s 1) r
Example
PID Design using IMC and Direct synthesis
for the process
e 9 s 0 .3
G p (s)
30s 1
1
12s 1
Example
Result: Servo Response
IMC and direct synthesis give roughly same
results
25
IMC
20
Direct
Synthesis
15
y(t)
10
50
100
150
200
250
t
IMC not as good due to Pade approximation
300
Example
Result: Regulatory response
40
35
30
y(t)
25
Direct Synthesis
20
IMC
15
50
100
150
200
250
t
Direct synthesis rejects disturbance more
rapidly (marginally)
300
Tuning Relations
Process reaction curve method:
based on approximation of process using first
order plus delay model
D(s)
1/s
Y*(s)
Gp
Gc
U(s)
Gs
Ym(s)
Manuel Control
1. Step in U is introduced
2. Observe behavior ym(t)
Y(s)
Tuning Relations
Process response
1.2
1
0.8
0.6
KM
0.4
0.2
0
-0.2
0
Ziegler-Nichols Tunings
Controller
P-only
Kc
Ti
PI
(0.9 / K p )( / )
3.3
PID
(1.2 / K p )( / )
2.0
(1 / K p )( / )
Td
0.5
Example:
PI:
PID:
e 9 s 0 .3
G p (s)
30s 1
Kc= 10
Kc= 13.33
I=4.5
I=29.97
I=18
Example
Z-N PI
45
Z-N PID
40
y(t)
35
Direct Synthesis
30
25
20
50
100
150
200
250
300
Example
Regulatory Response
40
35
30
Direct Synthesis
25
Z-N PI
20
Z-N PID
15
10
50
100
150
200
250
Z-N tuning
Oscillatory with considerable overshoot
Tends to be conservative
300
Kc
Ti
PI
(1 / K p )( / )[0.9 / 12 ]
[30 3( / )]
9 20( / )
PID
(1 / K p )( / )[1 / 3 ]
(1 / K p )( / )[
3 16
]
12
[32 6( / )]
13 8( / )
Example:
PI: Kc=10.27
I=18.54
Kc=15.64
I=19.75
d=3.10
Td
4
11 2( / )
Tuning relations
Cohen-coon: Servo
55
50
C-C PID
45
40
35
C-C PI
30
25
20
50
100
150
200
250
300
Tuning Relations
Cohen-Coon: Regulatory
40
35
30
C-C PI
25
y(t)
20
C-C PID
15
10
5
50
100
150
Highly oscillatory t
Very aggressive
200
250
300
IA E e (t ) d t
0
IS E e (t )2 d t
penalizes large errors
0
IT A E t e (t ) d t
0
ITAE Relations
Choose Kc, I and d that minimize the ITAE:
For a first order plus dead time model, solve
for:
IT A E
0,
Kc
IT A E
0,
I
IT A E
0
d
Type of
Controller
PI
Load
PID
Set point
PI
Set point
PID
Mode
P
I
P
I
D
P
I
P
I
D
0.859
0.674
1.357
0.842
0.381
0.586
1.03
0.965
0.796
0.308
-0.977
-0.680
-0.947
-0.738
0.995
-0.916
-0.165
-0.85
-0.1465
0.929
ITAE Relations
From table, we get
Load Settings:
B
Y A
K K c d
I
Setpoint Settings:
Y A
K K c d ,
Example
0 .3 e 9 s
G s
,
30s 1
B
I
G L 1
ITAE Relations
Example (contd)
Setpoint Settings
0 .8 5
K K c 0 .9 6 5 9 3 0
2 .6 8 5 2
K c 2 .6 8 5 2 K 2 .6 8 5 2 0 .3 8 .9 5
0
.
7
9
6
0
.
1
4
6
5
3 0 0 .7 5 2 0
I 0 . 7 5 2 0 3 0 0 . 7 5 2 0 3 9 .8 9
0 .9 2 9
d
9
0 .1 0 0 6
0 .3 0 8 3 0
d 0 .1 0 0 6 3 . 0 1 9 4
Load Settings:
0 .9 4 7
9
K K c 1 .3 5 7 3 0
4 .2 4 3 7
K c 4 .2 4 3 7 4 .2 4 3 7
1 4 .1 5
K
0 .3
0 .7 3 8
9
0
.
8
4
2
2 .0 4 7 4
30
I
I 2 .0 4 7 4 3 0 2 .0 4 7 4 1 4 .6 5
0 .9 9 5
d
9
0 .1 1 5 0
0 .3 8 1 3 0
d 0 .1 1 5 0 3 . 4 4 9 7
ITAE Relations
Servo Response
60
55
ITAE(Load)
50
45
40
ITAE(Setpoint)
35
30
25
20
50
100
150
200
250
300
ITAE Relations
Regulatory response
40
35
30
ITAE(Setpoint)
25
20
15
10
5
0
ITAE(Load)
0
50
100
150
200
250
300
Tuning Relations
In general,
I 0 .2 5
CHE 446
Process Dynamics and Control
Frequency Response of
Linear Control Systems
lim
(s)
A
2
10
14
s in ( t )
2
1.5
1
AR
y(t)/A
0.5
0
-0.5
-1
-1.5
t/
12
16
18
20
10
Bode Plots
AR/Kp
High Frequency
10
10
Asymptote
Corner Frequency
-1
-2
10
-2
-1
10
10
10
10
0
-20
-40
-60
-80
-100
-2
10
-1
10
Amplitude Ratio
K
AR
1 2 2
10
10
10
Phase Shift
ta n
( )
Sinusoidal Response
Y (s)
y (t)
K p
2 s 2 2 s 1 s 2 2
K p A
1
where
1
ta n
2 2
2 2
s in ( t )
2
1 ( )
ARn
2 2
2 2
10
AR
Amplitude reaches
a maximum at
resonance frequency
10
=1
-1
10
-1
10
10
10
-50
=1
-100
-150
-1
10
10
10
Frequency Response
Q: Do we have to take the Laplace inverse
to compute the AR and phase shift of a 1st
or 2nd order process?
No
Q: Does this generalize to all transfer
function models?
Yes
Frequency Response
Some facts for complex number theory:
i) For a complex number:
a R e ( w ),
w a bj
b Im ( w )
Im
b
It follows that
w
where
a w c o s ( ),
R e ( w )2 Im ( w )2
such that
w w e j
Re
b w s in ( )
Im ( w )
a rg ( w ) ta n 1
R e(w )
Frequency Response
Some facts:
ii) Let z=a-bj and w= a+bj then
w z a n d a rg ( z ) a rg ( w )
j
2
2
2
2
j 1 (1 j ) 1
1
such that
K p
G ( j )
( A R )
1 2 2
a rg ( G ( j )) ta n 1 ( )( P h a s e L a g )
Frequency Response
Main Result:
The response of any linear process G(s) to
a sinusoidal input is a sinusoidal.
The amplitude ratio of the resulting signal
is given by the Modulus of the transfer
function model expressed in the frequency
domain, G(i).
The Phase Shift is given by the argument of
the transfer function model in the
frequency domain.
i.e.
A R G ( j )
R e ( G ( j )) 2 Im ( G ( j )) 2
P h a s e A n g le ta n
Im ( G ( j ))
R e ( G ( j ))
Frequency Response
For a general transfer function
r ( s ) e s ( s z1 ) ( s z m )
G (s)
q (s)
( s p 1 ) ( s p n )
Frequency Response summarized by
G ( j ) G ( j ) e j
where
is the modulus of G(j) and
G ( j )
is the argument of G(j)
Note: Substitute for s=j in the transfer
function.
Frequency Response
The facts:
For any linear process we can calculate the
amplitude ratio and phase shift by:
i) Letting s=j in the transfer functionG(s)
ii) G(j) is a complex number. Its modulus is the
amplitude ratio of the process and its argument
is the phase shift.
iii) As , the frequency, is varied that G(j) gives
a trace (or a curve) in the complex plane.
iv) The effect of the frequency, , on the process
is the frequency response of the process.
Frequency Response
Examples:
1. Pure Capacitive Process G(s)=1/s
K j
K
G ( j )
j
j j
1 K /
A R , ta n
0
2
2. Dead Time G(s)=e-s
G ( j ) e j
A R 1,
Frequency Response
Examples:
3. n process in series
G ( s ) G 1 ( s ) G n ( s )
Frequency response of G(s)
G ( j ) G 1 ( j ) G n ( j )
therefore
G 1 ( j ) e j1 G n ( j ) e jn
n
A R G ( j ) G i ( j )
i1
i1
i1
a rg ( G ( j )) a rg ( G i ( j )) i
Frequency Response
Examples.
4. n first order processes in series
K1
K n
G (s)
1s 1 n s 1
AR
K1
1 12 2
K n
1 n2 2
t a n 1 1 t a n 1 n
K p (1 )
1 2 2
K p e s
s1
, ta n 1 ( )
Frequency Response
Bode Plot
Pure Capacitive Process
AR
AR
10
10
10
-2
10
-1
10
10
Phase Angle
-89
-89.5
-90
-90.5
-91
-2
10
-1
10
Frequency (rad/sec)
10
Bode Plot
G (s) G 1(s)G 2 (s)G 3 (s)
1
1
1
G 1(s)
, G 2 (s)
, G 3(s)
10s 1
5s 1
s1
0
10
-2
10
G3
G2
G1
-4
10
-4
10
-3
10
-2
10
-1
10
10
10
0
-100
-200
-300
-4
10
G ( j )
-3
10
-2
10
-1
10
10
1
(1 1 0 2 2 )(1 5 2 2 )(1 1 2 2 )
ta n 1 (1 0 ) ta n 1 (5 ) ta n 1 ( )
10
Bode Plot
G ( s ) e s
G ( j ) 1,
10
-2
10
G=Gd
-4
10
-4
10
-3
10
-2
10
-1
10
10
10
0
-100
-200
Gd
-300
-4
10
-3
10
-2
10
-1
10
G
0
10
10
Nyquist Plot
Plot of G(j) in the complex plane as is
varied
Relation to Bode plot
AR is distance of G(j) for the origin
Phase angle, , is the angle from the Real
positive axis
G ( j )
Nyquist Plot
Dead-time
Second Order
1
1
Nyquist Plot
Third Order
1
G (s) 3
s 3s2 3s 1
1
s2 3s 1
, G d (s) e 2 s
Frequency Domain
Controller Design
PI Controller
AR K c
1
2
ta n 1 ( 1 / I )
3
10
10
AR101
0
10
-3
10
-2
10
-1
10
10
10
0
-20
-40
-60
-80
-100
-3
10
-2
10
-1
10
10
10
PID Controller
1
A R K c D
ta n
1
D
10
AR
10
10
10
-3
10
-2
10
-1
10
10
10
100
50
0
-50
-100
-3
10
-2
10
-1
10
10
10
+
-
Gp
Gc
U(s)
+
+
Y(s)
Gs
Ym(s)
Open-loop Response to R(s)
1. Introduce sinusoidal input in setpoint (D(s)=0) and
observe sinusoidal output
2. Fix gain such AR=1 and input frequency such that
=-180
3. At same time, connect close the loop and set
R(s)=0
Bode Criterion
Consider the transfer function and controller
5 e 0 .1 s
G (s)
( s 1 ) ( 0 .5 s 1 )
1
G c ( s ) 0 . 4 1
0 .1 s
G O L (s)
0 .4 1
( s 1 ) ( 0 .5 s 1 )
0 .1 s
5
1
1
2
0 .1 t a n
1 0 .2 5
1
( ) ta n
0 .4 1
1
1
0 .0 1 2
( 0 .5 ) t a n
- At =1.4128, =-AR=6.746
0 .1
Ziegler-Nichols Tuning
Closed-loop tuning relation
With P-only, vary controller gain until system (initially stable)
starts to oscillate.
Frequency of oscillation is c,
Ultimate gain, Ku, is 1/M where M is the amplitude of the openloop system
Ultimate Period
Ziegler-Nichols Tunings
P
Ku/2
PI
Ku/2.2 Pu/1.2
PID
Ku/1.7 Pu/2
2
Pu
c
Pu/8
Nyquist Criterion
Consider the transfer function
5 e 0 .1 s
G (s)
( s 1 ) ( 0 .5 s 1 )
and the PI controller
1
G c ( s ) 0 .4 1
0 .1 s
Stability Considerations
CHE 446
Process Dynamics and
Control
Feedforward Control
Feedback control systems have the general
form:
D(s)
UR(s)
R(s)
Gc
GD
+ +
Gv
Gp
U(s)
Ym(s)
+
Y(s)
Gs
Feedback controllers
output of process must change before any action
is taken
disturbances only compensated after they affect
the process
Feedforward Control
D(s)
Gf
GD
R(s)
Gc
+ +
Gv
U(s)
Ym(s)
Gp
Gs
Feedback/Feedforward Controller
Structure
+
Y(s)
Feedforward Control
Heated Stirred Tank
F,Tin
TT
TT
TC1
Ps
Steam
Condensate
Is this control configuration feedbackF,T
or
feedforward?
How can we use the inlet stream thermocouple to
regulate the inlet folow disturbances
Will this become a feedforward or feedback
controller?
Feedforward Control
A suggestion:
TC2
TT
F,Tin
TT +
TC1
Ps
Steam
Condensate
F,T
Feedforward Control
The feedforward controller:
D(s)
Gf
GD
UR(s) +
+
U(s)
Gv
Gp
+
Y(s)
Transfer Function
Y ( s ) G D ( s ) D ( s ) G P ( s ) G v ( s )U ( s )
Y ( s ) G D ( s ) D ( s ) G P ( s ) G v ( s )(U R ( s ) G f ( s ) D ( s ))
Y ( s ) ( G D ( s ) G p ( s ) G v ( s ) G f ( s )) D ( s ) G p ( s ) G v ( s )U R ( s )
Y (s) (G D ( s) G p (s)G v ( s)G f (s)) D (s) Y R (s)
Feedforward Control
Ideal feedforward controller:
G f (s)
G D (s)
G p (s)G v (s)
Feedforward controllers:
very sensitive to modeling errors
cannot handle unmeasured disturbances
cannot implement setpoint changes
Need feedback control to make control system
more robust
Feedforward Control
Feedback/Feedforward Control
D(s)
Gf
GD
R(s)
Gc
+ +
Gv
U(s)
Ym(s)
Gp
Gs
Y(s)
Feedforward Control
Regulatory transfer function of
feedforward/feedback loop
C (s) G D (s) G f (s)G v (s)G p (s)
G f (s) K f
(1s 1)
( 2 s 1)
K D
G f (s)
K vK p
Feedforward Control
Tuning: In absence of disturbance model
lead-lag approximation may be good
(1s 1)
G f (s) K f
( 2 s 1)
Kf obtained from open-loop data
K D
K f
K vK p
1 and 2
from open-loop data
1 p ,
2 D
from heuristics
1
0 .5
2
Trial-and-error
1
2 .0
2
1 2 c
Feedforward Control
Example:
Plant:
10
(1 0 s 1 )(5 s 1 )( s 1 )
1
G D (s)
( 2 .5 s 1 ) ( s 1 )
G p (s)
Plant Model:
1 0 e 6 s
G pm (s)
10s 1
es
G D m (s)
2 .5 s 1
Feedforward Control
Possible Feedforward controllers:
1. From plant models:
e 5 s (1 0 s 1 )
G f (s)
1 0 ( 2 .5 s 1 )
Not realizable
2. Lead-lag unit
1 1 0 , 2 2 .5
1
K f
10
3. Feedforward gain controller:
K f
1
10
Feedforward Control
For Controller 2 and 3
Disturbance Controller with Feedforward
1.2
1
0.8
.. - Gain Controller
0.6
-- - Lead-Lag Controller
- - No FF Controller
0.4
0.2
0
-0.2
-0.4
-0.6
20
40
60
80
100
120
140
160
180
200
Feedforward Control
CHE 446:
Process Dynamics and
Control
Cascade Control
Jacketed Reactor:
TT
F,Tin
TT
TC1
Ps
Steam
FT
Condensate
F,T
Cascade Control
Consider cascade control structure:
TT
F,Tin
TT
TC1
FC
FT
Ps
Steam
Condensate
Note:
F,T
Cascade Control
Cascade systems contain two feedback loops:
Primary Loop
regulates part of the process having slower
dynamics
calculates setpoint for the secondary loop
e.g. outlet temperature controller for the
jacketed reactor
Secondary Loop
regulates part of process having faster
dynamics
maintain secondary variable at the desired
target given by primary controller
e.g. steam flow control for the jacketed
reactor example
Gc1
+
-
Block Diagram
Gc2
Gm1
Gm2
Gv2
Gp2
D2
Gp1
D1
+
Cascade Control
Cascade Control
G p2G v2G c2
C2
G cl2
R 2 1 G p2G v2G c2G m 2
2. Outer loop
G p1G cl2 G c1
C1
Characteristic equation
1 G p1G cl2 G c1G m 1 0
G p2G v2G c2
1 G p1
G c1G m 1 0
1 G p2G v2G c2G m 2
1 G p 2 G v 2 G c2 G m 2 G p1G p 2 G v 2 G c2 G c1G m 1 0
Cascade Control
Stability of closed-loop process is governed by
1 G p 2 G v 2 G c2 G m 2 G p1G p 2 G v 2 G c2 G c1G m 1 0
Example
K p1
G p1
, G c1 K c1 , G v1 G m 1 1
1s 1
K p2
G p2
, G c2 K c2 , G m 2 1
2s 1
K p2
K p2 K p1
1 K c2
K c1
0
2s 1
2 s 1 1s 1
(1s 1)( 2 s 1) K c 2 K p 2 (1s 1) K c1 K p 2 K p1 0
1 2 s 2 (1 2 K c 2 K p 2 1 ) s 1 K c 2 K p 2
K c1 K p 2 K p1 0
Cascade Control
Design a cascade controller for the following
system:
1. Primary:
e 0 .1 s
G p1(s)
, G m 1 1,
( 0 .5 s 1 ) ( s 1 )
1
G c1 K c1 1
Is
2. Secondary:
1
,G v2 G m 2 1
0 .1 s 1
G c2 K c2
G p2
Cascade Control
1. PI controller only
0 .1 s
1
1
e
G O L 1 K c 1 1
s 0 .1 s 1 ( 0 . 5 s 1 ) ( s 1 )
A R K c1 1
ta n
0 .0 1 2 1
0 .2 5 2 1
1 t a n 1 ( 0 .1 )
t a n 1 ( 0 . 5 ) t a n 1 ( ) 0 .1
Critical frequency
c 2 .9 9 ,
A R 0 .1 7 8
Maximum gain
K c 1 5 .6 1
2 1
Cascade Control
Bode Plots
AR
ln()
Cascade Control
2. Cascade Control
Secondary loop
G O l2 K c2
1
0 .1 s 1
Primary loop
G O L 1 K c1 1
10
0 .1 s
e
0 .1 s 1
1
( 0 .5 s 1 ) ( s 1 )
110
0 .1 s 1
10
e 0 .1 s
K c1
1 1 s ( 0 . 5 s 1 ) ( 0 .1 s 1 )
11
Cascade Control
Closed-loop stability:
AR
10 1
K c1 1 1
2
0
.
1
2
1
11
1 0 .2 5 2
1 0 .1
0 .1 t a n
t a n 1 ( 0 .5 )
11
2
Bode
c 4 .1 3 ,
A R 0 .0 9 5 8
Cascade Control
Use cascade when:
conventional feedback loop is too slow at
rejecting disturbances
secondary measured variable is available which
responds to disturbances
has dynamics that are much faster than
those of the primary variable
can be affected by the manipulated variable
Implementation
tune secondary loop first
operation of two interacting controllers requires
more careful implementation
switching on and off
CHE 446
Process Dynamics and Control
Dead-time Compensation
Consider feedback loop:
D
R
Gc
Gp
-s
Dead-time Compensation
Motivation
e s
G (s) 2
, 0 .1 0 . 7 5
s 3s 2
1
G c ( s ) 4 1
0.75
Dead-time Compensation
Use plant model to predict deviation from
setpoint
D
R
Gc
Gp
-s
Gpm
Result:
Removes the de-stabilizing effect of dead-time
Problem:
Cannot compensate for disturbances with just
feedback (possible offset)
Need a very good plant model
Dead-time Compensation
Closed-loop transfer function
C (s)
1,
D (s)
C (s) G cG
R (s) 1 G
s
e
p
cG pm
Dead-time Compensation
D
R
1
4 1
e-0.5s
s 3s 2
1
s2 3s 2
Servo Response
1.5
1
0.5
0
10
10
Regulatory Response
1
0.8
0.6
0.4
0.2
0
Dead-time Compensation
Include effect of disturbances using model
predictions
D ( s ) Y ( s ) Y ( s )
D ( s ) G p e s U ( s ) G p m e s U ( s )
Adding this to previous loop gives
D
R
+
Gc
Gpm
Gp
Gpm
+
e
-s
e-s
+
+
-
Dead-time Compensation
Closed-loop transfer function
s
1 (e
e
)G cG pm
C (s)
s
s
D (s) 1 G G
G pm e
)
c pm G c (G pe
G c G p e s
C (s)
s
s
R (s) 1 G G
G pm e
)
c pm G c (G pe
Characteristic Equation
1 G cG pm G c (G pe
G pm e
) 0
Slow
Fast
Dynamics
Effect of dead-time on Dynamics
stability is
removed
Disturbance rejection is achieved
Controller tuned for undelayed dynamics
Dead-time Compensation
D
R
+ -
1
4 1
s 3s 2
+
2
s 3s 2
s 3s 2
+ C
-0.5s
+
+
-0.5s
D ( s )
Servo Response
1.5
1
0.5
0
10
10
Regulatory Response
1
0.5
0
-0.5
Dead-time Compensation
Alternative form
D
R
+
Gc
Gp
+
e
-s
Gpm(1-e-s)
G (s)
G c (s)
1 G p m (1 e m s )
called a Smith-Predictor
Dead-time compensation
Smith-Predictor Design
1. Determine delayed process model
Y ( s ) G p m ( s ) e m s
2. Tune controller Gc for the undelayed
transfer function model Gpm
3. Implement Smith-Predictor as
*
c
G (s)
G c (s)
1 G p m (1 e m s )
Dead-time Compensation
Effect of dead-time estimation errors:
R
+ -
s 3s 2
+
+
4 1
s
2
s 3s 2
s 3s 2
-0.5s
D
+ C
+
-s
+
D ( s )