Lecture 1 A
Lecture 1 A
Process Control II
Some Review Material
Winter 2006
Instructor:
M.Guay
TA:
V. Adetola
Introduction
Perturbations Processing
Plant objectives
Market Safety
Economy Make $$$
Climate Environment...
Upsets...
Control
Introduction
Combination of process
sensors, actuators and
computer systems
designed and tuned
to orchestrate
safe and profitable
operation.
Plant
Introduction
Process Dynamics:
Process Control
or
u
y
P
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
Examples
M
Tin, w
T, w
Q
Inputs Output
Tin
w Process T
Q
Examples
Friction Force of
Engine
Inputs Output
Friction
Process Speed
Engine
Examples
e.g. Millirobotics
Laparoscopic Manipulators
Introduction
Process
u
y
P
d
Information Flow
What is control?
Economic Benefits
Quality (waste reduction)
Variance reduction (consistency)
Savings in energy, materials, manpower
Reliability
Stabilizability
bicycle
aircraft
nuclear reactor
Control
What is a controller?
Process
Controller
System Physical
Boundary
Transfer of
fundamental Physical
quantities
Mass, Energy and Momentum
Abstract
Operation
Control
A controlled process is a system which is
comprised of two interacting systems:
Disturbances Outputs
Process
Action Observation
intervene Controller monitor
Nylon
Gas Make-up
Reheater
Vent
Relief
Dehumidifier Pot
Steam
Heater Blower
Water
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
Process Speed
Engine
Controller
Human or Computer
Classical Control
Control is meant to provide regulation of process
outputs about a reference, r, despite inherent
disturbances
r + e u y
Controller Process
-
d
Computer Actuator
r+ e y
C A P
-
Process
Sensor
Examples
Driving an automobile
Driver Steering
r + e y
C A P
-
Automobile
M
Actual trajectory
Desired trajectory y
r
Examples
Stirred-Tank Heater
Tin, w
Heater
Q T, w
TC
Thermocouple
Tin, w
Controller Heater
TR e y
+ C A P
-
Tank
M
Thermocouple
Examples
Measure T, adjust Q
Tin, w
Controller Heater
e T
+ C A P
TR -
Tank
M
Thermocouple
Feedback control
Controller: Q=K(TR-T)+Qnominal
where Qnominal=wC(T-Tin)
Ti
M
C A P
+ DQ
Qi + Q
Feedforward Control
Control Nomenclature
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 Other
Controller
Example
wi, Ti
Pc L
wc, Tci h T
wc, Tco
Po
wo, To
Variables T
d
r e u y
Controller Process
Model
Design
Implementation
Control System Development
Develop a process
model
Design controller
based on model
Test by
Simulation
Monitor
Performance
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?
Control System Development
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:
Control:
Steady-state
Variables not a function of time
useful for design calculation
Dynamic
Variables are a function of time
Control requires dynamic model
Process Modeling
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
Steady-State 1
60
55
Output
Steady-State 2
50
45
40
0 50 100 150 200 250 300
Time
Energy
Momentum
1.2
1.1
0.9
Output
0.8
0.7
0.6
0.5
0.4
0 50 100 150 200 250 300
Time
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
In existing processes, we really on
Dynamic models obtained from experiments
Usually of an empirical nature
Linear
In new applications (or difficult problems)
Focus on mechanistic modeling
Dynamic models derived from theory
Nonlinear
Process Modeling
General modeling procedure
Identify boundaries
Rate of
+ Production
rAh(t + tD ) - rAh(t )
r ( Fin - F ),
Dt
rAh(t + tD ) - rAh(t )
lim r ( Fin - F ),
Dt 0 Dt
dh
rA r ( Fin - F ).
dt
Process Modeling
Model consistency
“Can we solve this equation?”
Variables: h, r, Fin, F, A 5
Constants: r, A 2
Inputs: Fin, F 2
Unknowns: h 1
Equations 1
Degrees of freedom 0
Solve equation
t Fin ( ) - F ( )
h( t ) h(0) + 0 d
A
1.5 Fin
flow
1 F
0.5
0
0 10 20 30 40 50 60 70 80 90 100
1.3
1.2
1.1
h
0.9
0 10 20 30 40 50 60 70 80 90 100
Process Modeling
Energy balance
M
Tin, w
T, w
Q
dH
Hin - H out + Q + Ws
dt
Typically work done on system by external
forces is negligible
dH
Hin - H out + Q
dt
Assume that the heat capacities are constant
such that
H r CPV (T - Tref )
H in r C P w(Tin - Tref )
H out r C P w(T - Tref )
Process Modeling
After substitution,
d ( rCPV (T - Tref ))
rCP w(Tin - Tref ) - rCP w(T - Tref ) + Q
dt
d (T - Tref )
rCPV rCP w(Tin - Tref ) - rCP w(T - Tref ) + Q
dt
Divide by r CpV
dT w Q
(Tin - T ) +
dt V rCPV
Process Modeling
Resulting equation:
dT F Q
(Tin - T ) +
dt V rVC P
Model Consistency
Constants: V, Cp, r 3
Inputs: F, Tin, Q 3
Unknown: T 1
Equations 1
Assume F is fixed
dT (t ) F (t ) Q(t )
(Tin (t ) - T (t )) +
dt V rVC P
Product F(t)T(t) makes this differential
equation nonlinear.
+ Sum of forces
acting on system
Speed (v)
Friction Force of
Engine (u)
Balance:
Total momentum = Mv
d ( Mv (t )) dv(t )
M u(t ) - bv(t )
dt dt
Model consistency
Variables: M, v, b, u 4
Constants: M, b 2
Inputs: u 1
Unknowns v 1
Process Modeling
Gravity tank
Fo
h
F
dh Fo AP v
-
dt A A
dv hg K F v 2
-
dt L rAP
Linear or nonlinear?
Process Modeling
Model consistency
Inputs Fo 1
Unknowns h, v 2
Equations 2
Model is consistent
Solution of ODEs
dT F Q
(Tin - T ) +
dt V rVC P
specify r, CP, and V
specify T(0)
specify Q(t) and F(t)
Input Specifications
1.5
1
Input
0.5
0
0 1 2 3 4 5 6 7 8 9 10
Time
1.4
1.2
0.8
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
Common Input Signals
5
Input
0
0 1 2 3 4 5 6 7 8 9 10
Time
4
Output
-1
0 1 2 3 4 5 6 7 8 9 10
Time
Common Input Signals
100
90
80
70
60
Input
50
40
30
20
10
0
0 1 2 3 4 5 6 7 8 9 10
Time
0.45
0.4
0.35
0.3
0.25
Output
0.2
0.15
0.1
0.05
-0.05
0 1 2 3 4 5 6 7 8 9 10
Time
Common Input Signals
3. Pulses:
1.5
1
Input
0.5
0
0 1 2 3 4 5 6 7 8 9 10
Time
1.2
0.8
0.6
Output
0.4
0.2
-0.2
0 1 2 3 4 5 6 7 8 9 10
Time
Common Input Signals
4. Sinusoidal input
1.5
0.5
Input
-0.5
-1
-1.5
0 5 10 15 20 25 30
Time
0.8
0.6
0.4
0.2
Output
-0.2
-0.4
-0.6
-0.8
0 5 10 15 20 25 30
Time
Common Input Signals
5. Random Input
1.5
0.5
Input
-0.5
-1
-1.5
0 5 10 15 20 25 30
Time
0.6
0.4
0.2
0
Output
-0.2
-0.4
-0.6
-0.8
0 5 10 15 20 25 30
Time
Solution of ODEs using Laplace
Transforms
- st
F ( s) [ f (t )] f (t )e dt
t 0
Integrate out time and transform to
Laplace domain
dy (t )
ay (t ) + bu(t )
dt
y (0) c
Integration
Multiplication
Y(s) = G(s)U(s)
Common Transforms
- bt - bt - st
[e ] e e dt e - ( s+ b) t dt
0 0
- ( s+ b) t
- bt e 1
[e ] -
s + b s+b
0
2. Cosine
e - jt + e jt
f (t ) cos(t )
2
1 - ( s- j ) t
- ( s + j ) t
[cos(t )] e dt + e dt
2 0 0
1 1 1 s
+ 2
2 s - j s + j s + 2
Common Transforms
1 - ( s- j ) t
- ( s + j ) t
[sin(t )] e dt - e dt
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 e - st
df
[ ] uv 0 - udv f (t )e - st - ( - sf (t )e - st )dt
dt 0 0 0
df
[ ] s f (t )e - st dt - f (0) sF ( s) - f (0)
dt 0
t - st t F ( s)
f ( )d e ( f ( )d )dt
0 0 0 s
Common Transforms
Operators
3. Delayed function f(t-)
0 t
g (t )
f (t - ) t
- st
g (t ) e (0)dt + e - st f (t - )dt
0
g (t ) e - s F ( s)
Common Transforms
Input Signals
1. Constant f (t ) a
- st
- st
[a ] ae dt ( - ae ) 0 a
s s
0
0 t 0
2. Step f (t )
a t 0
- st
- st
[ f (t )] ae dt ( - ae ) 0 a
s s
0
0 t 0
3. Ramp function f (t )
at t 0
- st
e at ae - st a
f (t ) ate - st dt - + dt 2
0
s 0 0 s s
Common Transforms
Input Signals
4. Rectangular Pulse
0 t0
f ( t ) a 0 t t w
0 t tw
tw
f (t ) ae - st dt (1 - e - t w s )
a
0 s
5. Unit impulse
(1 - e - t w s )
1
(t ) lim
tw 0 tws
se - t w s
(t ) lim 1
tw 0 s
Laplace Transforms
Limitations:
y (t ) C1 ,
lim sY ( s) exists s Re( s) 0
s 0
Example
Using Laplace Transform, solve
dy
5 + 4y 2 , y (0) 1
dt
Result
dT F Q
(Tin - T ) +
dt V rVC P
T (0) T0
taking Laplace
V dT 1
Tin (t ) - T (t ) + Q(t )
F dt r FCP
(T ( s) - T (0)) Tin ( s) - T ( s) + K P Q( s)
1 K
T ( s) T (0) + Tin ( s) + P Q( s)
s + 1 s + 1 s + 1
To get back to time domain, we must
Specify Laplace domain functions Q(s), Tin(s)
Take Inverse Laplace
Linear ODEs
Notes:
The expression
1 K
T ( s) T (0) + Tin ( s) + P Q( s)
s + 1 s + 1 s + 1
Tin(s) 1
s + 1
+ T(s)
Q(s)
KP +
s + 1 +
T(0)
s + 1
Laplace Transform
1
Tin ( s) 2
s + 1 ( s + 2 )(s + 1)
Cannot invert explicitly, but if we can find A
and B such that
A B
+
2 s + 1
2
s +
2
( s + 2 )(s + 1)
we can invert using tables.
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
Partial fraction Expansions
n
q ( s) ( s + bi )
i 1
expand as
n i
r ( s)
i 1s + bi
2. q(s) has real but repeated factor
q ( s) ( s + b) n
expanded
1 2 n
r ( s) + ++
s + b ( s + b) 2
( s + b) n
Partial Fraction Expansion
Heaviside expansion
p( s) p( s) n
r ( s) n i
q ( s) ( s + bi )
( s + bi ) i 1
i 1
Constants are given by
p( s)
i ( s + bi )
q ( s) s-b
i
q ( s) ( s2 + d1s + d 0 ) n
where d 2
d0
4
Algorithm for Solution of ODEs
1 KP
T ( s) T (0) + T ( s) + Q( s)
s + 1 s + 1 in s + 1
Tin(s) 1
s + 1
+ T(s)
Q(s)
KP +
s + 1 +
T(0)
s + 1
e.g. The block KP
s + 1
is called the transfer function relating Q(s)
to T(s)
Process Control
1 KP
T ( s) T (0) + T ( s) + Q( s)
s + 1 s + 1 in s + 1
Tin(s) 1
s + 1
+ T(s)
Q(s)
KP +
s + 1 +
T(0)
s + 1
Transfer Function
s + 1 s + 1
Transfer Function
KP
Y1 ( s) U ( s)
s + 1
K
Y 2( s) P Y1 ( s)
s + 1
Y1 ( s)
KP KP
U ( s)
s + 1 s + 1
Deviation Variables
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
F, Tin
Fc, Tcin h
Fc, Tc
F, T
Assumptions:
Constant hold-up in tank and jacket
Constant heat capacities and densities
Incompressible flow
Model
dT F hc Ac
(Tin - T ) + (Tc - T )
dt V rC PV
dTc Fc h A
(Tcin - Tc ) - c c (Tc - T )
dt Vc rcC PcVc
Nonlinear ODEs
f(x)
f(x0) f
( x0 )
x
x0
x
Nonlinear systems
f ( xs )
f ( x ) f ( xs ) + ( x - xs )
x
f ( xs ,us ) f ( xs ,us )
f ( x, u) f ( xs , us ) + ( x - xs ) + (u - us )
x u
3. ODEs
f ( xs )
x f ( x) f ( xs ) + ( x - xs )
x
Transfer function
Y ( s)
G1 ( s)
U1 ( s)
Y ( s)
G2 ( s)
U 2 ( s)
First order Processes
Fi
dh
rA rFi - rF rFi - h
dt
rA dh r
Fi - h
dt
dh
+ h K p Fi
dt
dh
+ h K p Fi
dt
First Order Processes
dv
M u - bv
dt
M dv 1 v ( s) Kp
u - v
b dt b u ( s) s + 1
dv
K pu - v
dt
Stirred-tank heater
dT
rC pV - rC p FT + Q
dt
V dT 1 T ( s) Kp
Q - T
F dt rC p F Q ( s) s + 1
dT
K pQ - T
dt
Note:
Tin (t ) 0
First Order Processes
Kp
Liquid storage:
Capacity to store mass : rA
Resistance to flow : 1/
Car:
Capacity to store momentum: M
Resistance to momentum transfer : 1/b
Stirred-tank heater
Capacity to store energy: rCpV
Resistance to energy transfer : 1/ rCpF
0.9
0.8
0.7
0.632
0.6
0.5
0.4
0.3
0.2
0.1
0
0 1 2 3 4 5 6
t/
First order process
Kp Overall Change in y Dy
lim Kp
s 0s + 1 Overall Change in u Du
What do we need?
Process at steady-state
Step input of magnitude M
Measure process gain from new steady-state
Measure time constant
First order process
Ramp response:
Kp a
Y ( s)
s + 1 s2
Ramp input of slope a
4.5
4
y(t)/Kpa
3.5
2.5
a
2
1.5
0.5
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
t/
First order Process
Sinusoidal response KP A
Y ( s)
s + 1 s2 + 2
lim
t
Y ( s)
-1
1+
KP A
2 2
sin(t + f )
1.5
0.5
AR
-0.5
-1 f
-1.5
0 2 4 6 8 10 12 14 16 18 20
t/
First order Processes
Bode Plots
0
10
High Frequency
Asymptote
Corner Frequency
AR/Kp
-1
10
-2
10
-2 -1 0 1 2
10 10 10 10 10
p
0
-20
-40
f
-60
-80
-100
-2 -1 0 1 2
10 10 10 10 10
p
Fi
dh
rA rFi - rF Fi Fi - Fis , F F - Fs
dt
dh
dh
A Fi - F A Fi - F
dt dt
H ( s) 1/ A H ( s) 1 / A
-
F ( s) s
F ( s) s
i
Process acts as a pure integrator
Process Modeling
K M KM
Y ( s) 2
s s s
Slope = KM
Time Time
0 t0
y (t )
KMt t0
Integrating processes
K KM
Y ( s) M
s s
KM
Time Time
0 t0
y (t )
KM t0
Integrating Processes
KM - tws KM
Y ( s) (1 - e ) 2 (1 - e- tws )
s s s
Time Time
KMt t tw
y (t )
KMt w t tw
Second Order Processes
K P1 K P2
U(s) Y(s)
1s + 1 2s + 1
U(s)
K P1 K P 2 Y(s)
( 1s + 1)( 2 s + 1)
By multiplicative property of transfer functions
K P1 K P 2
Y ( s) U ( s)
( 1 s + 1)( 2 s + 1)
Second Order Processes
Momentum Balance
d dx dx
M pA - Kx - C
dt dt dt
M d 2 x C dx A
+ +x p
K dt K dt K
A
x ( s) K
p ( s) M s2 + C s + 1
K K
Second order Processes
KP
Y (S ) 2 2 U ( s)
s + 2s + 1
where KP = Process steady-state gain
= Process time constant
= Damping Coefficient
1 Underdamped
=1 Critically Damped
>1 Overdamped
-2 4 2 2 - 4 2
2 2
1 2
- -1
KP M
Y (S ) 2 2
s + 2s + 1 s
2
0
1.8
1.6 0.2
1.4
1.2
0.8
0.6
2
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
Second order process
Observations
M
Tin, w
Response of T2 to
Tin is an example of an
overdamped second
order process
Q
M
T1, w
T2, w
Q
Second order Processes
1. Rise time, tr
2. Time to first peak, tp
3. Settling time, ts
4. Overshoot:
a
OS exp -
b 1-
2
5. Decay ratio:
c 2
DR exp -
b 1-
2
Second order Processes
1.8
1.6
P
1.4
1.2
b
+5%
c
1
-5%
0.8
0.6
a
0.4
0.2
tp
0
0 tr 5 10 15 20 25 30 35 40 45 50
ts
Second Order Process
Sinusoidal Response
Kp A
Y ( s)
2 s2 + 2s + 1 s2 + 2
Kp A
y (t ) sin(t + f )
1 - ( )
2 2
+ (2 )2
where - 1 2
f - tan
2
1 - ( )
1
ARn
1 - ( )
2 2
+ (2 )2
Second Order Processes
Bode Plots
1
10
0.1
0
10
=1
-1
10
-1 0 1
10 10 10
-50
-100 =1
-150
0.1
-1 0 1
10 10 10
More Complicated processes
+ ++ r
r ( s) a0 a1s a r s
G( s)
q ( s) b0 + b1s++b s
s.t.
( a1 s + 1) ( ar s + 1)
G ( s) K
(1s + 1) ( s + 1)
Poles and zeroes
Definitions:
the roots of r(s) are called the zeros of G(s)
1 1
z1 - , , zr -
a1 ar
the roots of q(s) are called the poles of G(s)
1 1
p1 - ,, p -
1
K
s(1s + 1)( 2 s2 + 2 2 s + 1)
- t
e 2 sin( 1 - 2 t
2)
- t
e 2 cos( 1 - 2 t
2)
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
0.8
0.6
0.4
Imaginary axis
0.2
-0.2
-0.4
-0.6
-0.8
-1
-1.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2
Real axis
q( s) s3 + s2 + s + 1
Roots: -1.0, 1.0j, -1.0j
Poles
1.6
1.4
1.2
1
y(t)
0.8
0.6
0.4
0.2
0
0 5 10 15 20 25 30 35 40 45 50
t
Poles
0.8
0.6
0.4
Imaginary axis
0.2
-0.2
-0.4
-0.6
-0.8
-1
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5
Real axis
2s3 + 2.5s2 + 3s + 1
0.9
0.8
0.7
0.6
y(t)
0.5
0.4
0.3
0.2
0.1
0
0 2 4 6 8 10 12 14 16 18 20
t
Poles
1.5
0.5
Imaginary axis
-0.5
-1
-1.5
-0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6
Real axis
140
120
100
80
y(t)
60
40
20
-20
0 2 4 6 8 10 12 14 16 18 20
t
Zeros
Transfer function:
K p ( a s + 1)
G ( s)
(1s + 1)( 2 s + 1)
- - t - - t
y ( t ) K p M 1 + a 1 e 1 + a 2 e 2
1 - 2 -
1 2
8
1.5
y(t)/KM
4
1
2
1
0.5 0
-1
-2
0
-0.5
0 2 4 6 8 10 12 14 16 18 20
Time
Zeros
Observations:
K1
1s + 1
U(s) Y(s)
K2
2s + 1
( a s + 1)
G ( s) K
(1s + 1)( 2 s + 1)
K + K21
K K1 + K2 a 1 2
K1 + K2
Fi
Control loop
U(s) - d s G ( s) Y(s)
e
Y ( s) e - d sG ( s)U ( s)
e - d s K p
G ( s)
s+1
Second order plus dead-time
e - d s K P
G( s)
2 s2 + 2s + 1
Dead time
Dead time (delay)
G ( s) e - d s
Most processes will display some type of lag
time
Dead time is the moment that lapses between
input changes and process response
0.9
0.8
0.7
0.6
y/KM
0.5
0.4
0.3
0.2
0.1
0
0 D 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5
t/tau
Step response of a first order plus dead time process
Dead Time
Problem
use of the dead time approximation makes
analysis (poles and zeros) more difficult
e - d s K p
G ( s)
s+1
Approximate dead-time by a rational
(polynomial) function
Most common is Pade approximation
1- s
e - s G1( s) 2
1+ s
2
2
1 - s + s2
e -s G2 ( s) 2 12
2
1 + s + s2
2 12
Pade Approximations
- s
e 1- s K
Kp 2 p
G ( s)
s + 1 1 + s s + 1
2
Pade approximations introduce inverse
response (right half plane zeros) in the
transfer function
Dead time
First order plus dead time model is often used
for the approximation of complex processes
0.9
0.8
0.7
0.6
- First Order plus dead time
0.5
o Second Order
0.4
0.3
0.2
0.1
0
0 1 2 3 4 5 6 7 8
Process Approximation
1.2
0.8
-0.2
0 1 2 3 4 5 6 7 8
KPe- s
D
Y ( s) U ( s)
s + 1
KP e- s
D
Y (S ) 2 2 U ( s)
s + 2s + 1
U(s) Y(s)
e- Ds
G(s)
Process Approximation
e -s K p N
G ( s) i
(1s + 1)( 2 s + 1) i 3
e -s K p N
G ( s) i
(1s + 1) i 2
Process Approximation
Example
1
G ( s)
(10s + 1)(25s + 1)( s + 1)2
1.2
0.8
0.6
e -12 s
G1( s)
0.4
25s + 1
e -2 s
0.2
G2 ( s)
0
(10s + 1)(25s + 1)
-0.2
0 20 40 60 80 100 120 140 160 180 200
Empirical Modeling
Objective:
Methodologies:
E[ y ] 0 + 1x
Process Description
y 0 + 1x +
where
y vector of process measurement
x vector of process inputs
1 , 0 process parameters
Problem:
Find 1, 0 that minimize the sum of squared
residuals (SSR)
n
SSR ( yi - 0 - 1xi ) 2
i 1
Empirical Modeling
Solution
Differentiate SSR with respect to parameters
SSR n
-2 ( yi - 0 - 1xi ) 0
0 i 1
SSR n
-2 xi ( yi - 0 - 1xi ) 0
1 i 1
0 y - 1x
n
xi yi - nxy
1 i n1
2 2
xi - nx
i 1
where
n x n y
x i , y i
i 1 n i 1 n
Empirical Modeling
Compact form
Define
y1 1 x1
y 1 x2 0
Y 2 , X ,
1
y 1 xn
n
Then
y1 - 0 - 1x1
y - - x
E 2 0 1 2
Y - X
y - - x
n 0 1 n
Problem
find value of that minimize SSR
SSR E T E
Empirical Modeling
ET E
0
which can be shown to give
X T X X T Y
or
( )
-1
X T X X TY
In practice
Manipulations are VERY easy to perform in
MATLAB
Extends to general linear model (GLM)
E[ y ] 0 + 1x1 ++ p x p
Polynomial model
E[ y ] 0 + 1x1 + 11x12
Empirical Modeling
Control Implementation:
previous technique applicable to process model
that are linear in the parameters (GLM,
polynomials in x, etc…)
ei
i.e. such that, for all i, the derivatives are not
a function of
Example
E[ y (t )] 3.0 K p (1 - e - t / )
Model
Data
Step Response
4.5
3.5
2.5
y(t)
1.5
0.5
-0.5
0 10 20 30 40 50 60 70 80
t
Empirical Modeling
Results:
Using MATLAB function “leastsq” obtained
K p 13432
. , 118962
.
Resulting Fit
Step Response
4.5
3.5
2.5
y(t)
1.5
0.5
-0.5
0 10 20 30 40 50 60 70 80
t
Empirical Modeling
0 0 t
E[ yi ] - (ti - )/
K
p M (1 - e ) 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
1
G ( s)
(10s + 1)(25s + 1)( s + 1)2
Data
3.5
2.5
2
y(t)
1.5
0.5
-0.5
0 20 40 60 80 100 120 140
t
Empirical Modeling
10000
. e -11s
G1( s)
(27.3899 s + 1)
Second order plus dead time
0.9946e -2 s
G2 ( s)
(24.9058s + 1)(101229
. s + 1)
3.5
2.5
2
y(t)
1.5
0.5
-0.5
0 20 40 60 80 100 120 140
t
Empirical Modeling
M/s D(s)
Y*(s)
Gc Gp
U(s) Y(s)
Gs
Ym(s)
Manual Control
1. Step in U is introduced
2. Observe behavior ym(t)
3. Fit a first order plus dead time model
KMe -s
Ym ( s)
s( s + 1)
Empirical Modeling
0.8
0.6
KM
0.4
0.2
-0.2
0 1 2 3 4 5 6 7 8
1
0.9
0.8
0.7
0.6
y(t)
0.5
0.4
0.3
0.2
0.1
0
0 20 40 60 80 100 120 140 160
t1 t2 t
Estimate
13
. t1 - 0.29t2
0.67(t2 - t1)
Empirical Process
Example
For third order process
1
G ( s)
(10s + 1)(25s + 1)( s + 1)2
Estimates:
t1 23, t2 62.5
1178
. , 26.46
Compare:
Least Squares Fit Reaction Curve
10000
. e -11s . e -11.78s
100
G1( s) G1( s)
(27.3899 s + 1) (26.46s + 1)
Empirical Modeling
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 TT TC
IP
LT
Ps
Steam
Condensate
LC IP
F,T
Feedback control system: Valve is manipulated to
increase flow of steam to control tank temperature
Control Objective:
maintain a certain outlet temperature and tank
level
Feedback Control:
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
U(s) Y(s)
Gp
sensor
Gm
sensor
Gm
Y ( s) G p ( s)V ( s)
Y ( s) G p ( s)Gv ( s)U ( s)
Y ( s) G p ( s)Gv ( s)Gc ( s) E ( s)
Y ( s) G p ( s)Gv ( s)Gc( s) R( s) - Ym ( s)
Y ( S ) G p ( s)Gv ( s)Gc ( s) R( s) - Gm ( s)Y ( s)
Isolate Y(s)
G p ( s)Gv ( s)Gc ( s)
Y ( s) R( s)
1 + G p ( s)Gv ( s)Gc ( s)Gm ( s)
Closed-Loop Transfer Function
Y ( s) D( s) + G p ( s)V ( s)
Y ( s) D( s) + G p ( s)Gv ( s)U ( s)
Y ( s) D( s) + G p ( s)Gv ( s)Gc ( s) E ( s)
Y ( s) D( s) + G p ( s)Gv ( s)Gc ( s)0 - Ym ( s)
Y ( s) D( s) + G p ( s)Gv ( s)Gc ( s)0 - Gm ( s)Y ( s)
Isolating Y(s)
1
Y ( s) D( s)
1 + G p ( s)Gv ( s)Gc ( s)Gm ( s)
Closed-loop Transfer Function
Gd ( s)
Y ( s) D( s)
1 + G p ( s)Gv ( s)Gc ( s)Gm ( s)
Servo
G p ( s)Gv ( s)Gc ( s)
Y ( s) R( s) +
1 + G p ( s)Gv ( s)Gc ( s)Gm ( s)
Gd ( s)
D( s)
1 + G p ( s)Gv ( s)Gc ( s)Gm ( s)
Regulatory
PID Controllers
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 ) Kc e(t ) + e( )d + D + uR
I 0 dt
PID Control
Proportional Derivative
Action Action
1 t de
u(t ) Kc e(t ) + e( )d + D + uR
I 0 dt
Integral Controller
Action Bias
1
u(t ) - uR U ( s) Kc 1 + + D s E ( s)
Is
or:
U ( s) P + + Ds E ( s)
I
s
Note:
1
Gc ( s) Kc 1 + + D s
Is
or,
Gc ( s) P + + Ds
I
s
Note:
Form:
u(t ) - uR Kce(t )
Transfer function:
or, U '( s) Kc E ( s)
Gc ( s) Kc
Closed-loop form:
G p ( s)Gv ( s) Kc
Y ( s) R( s) +
1 + G p ( s)Gv ( s) KcGm ( s)
1
D( s)
1 + G p ( s)Gv ( s) KcGm ( s)
Proportional Feedback
Example:
Given first order process:
Kp
G p ( s) , Gv ( s) 1, Gm ( s) 1
s + 1
for P-only feedback closed-loop dynamics:
K p Kc
1 + K p Kc
Y(s) R(s)
s + 1
1 + K p Kc
1
s +
1 + K p Kc 1 + K p Kc
+ D(s)
s + 1
1 + K p Kc
Closed-Loop
Time Constant
Proportional Feedback
Final response:
K p Kc 1
lim yservo ( t ) , lim y reg ( t )
t 1 + K p Kc t 1 + K p Kc
Note:
for “zero offset response” we require
1
10.0
0.9
0.8 5.0
0.7
y(t)/KM
0.6
1.0
0.5
0.4 0.5
0.3
0.2
0.1 Kc
0.01
0
0 1 2 3 4 5 6 7 8 9 10
t/
- increasing controller gain eliminates off-set
Proportional Feedback
High-order process
e.g. second order underdamped process
1.5
1
y(t)/KM
5.0
2.5
1.0
0.5
0.5
0.01
0
0 5 10 15 20 25
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
PI controller form
1 t
u(t ) Kc e(t ) + e( )d + uR
I 0
Transfer function model
1
U ( s) Kc 1 + E ( s)
I s
PI Feedback
Closed-loop response
s + 1
G p ( s)Gv ( s) Kc I
Is
Y ( s) R( s) +
I s + 1
1 + G p ( s)Gv ( s) Kc Gm ( s)
Is
1
D( s)
s + 1
1 + G p ( s)Gv ( s) Kc I Gm ( s)
Is
Example
PI control of a first order process
Kp
G p ( s) , Gv ( s) 1, Gm ( s) 1
s + 1
Closed-loop response
Is+1
Y ( s) R ( s) +
I 2 1 + Kc K p
s + I s + 1
Kc K p Kc K p
I 2 I
s + s
Kc K p Kc K p
D( s)
I 2 1 + Kc K p
s + I s + 1
Kc K p Kc K p
Note:
offset is removed
closed-loop is second order
PI Feedback
Example (contd)
effect of integral time constant and controller gain
on closed-loop dynamics
I
cl
Kc K p
damping coefficient
1 K p Kc K p + 1
Kc I
2 Kc K p
1.8
0.01 Kc=1
1.6
1.4
0.1
1.2
0.5
y(t)/KM
1
1.0
0.8
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
PI Feedback
1
10.0
5.0
0.9
1.0
0.8 0.5
0.7
y(t)/KM
0.6
0.1
0.5
0.4
0.3
0.2
0.1
I=1
0
0 1 2 3 4 5 6 7 8 9 10
0.35
0.3
0.25
0.2
y(t)/KM
0.15
0.1
0.05
-0.05
-0.1
0 1 2 3 4 5 6 7 8 9 10
Important points:
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
D de
D
Kc dt
if error is increasing, decrease control
action
if error is decreasing, decrease control
action
1 t de
u(t ) Kc e(t ) + e( )d + D + uR
I 0 dt
PID Feedback
Transfer Function
1
U ( s) Kc 1 + + D s E ( s)
Is
Closed-loop Transfer Function
D I s2 + I s + 1
G p ( s)Gv ( s) Kc
Is
Y ( s) R( s) +
D I s + I s + 1
2
1 + G p ( s)Gv ( s) Kc Gm ( s)
Is
1
D( s)
D I s2 + I s + 1
1 + G p ( s)Gv ( s) Kc Gm ( s)
Is
Example:
PID Control of a first order process
Kp
G p ( s) , Gv ( s) 1, Gm ( s) 1
s + 1
Closed-loop transfer function
D I s2 + I s + 1
Y ( s) R( s) +
I 2 1 + Kc K p
+ D I s + I s + 1
Kc K p Kc K p
I 2 I
s + s
Kc K p Kc K p
D ( s)
I 2 1 + Kc K p
+ D I s + I s + 1
Kc K p Kc K p
PID Feedback
1.6
1.4
1.2
1
y(t)/KM
0.1
0.8
0.5
1.0 2.0
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
PID Feedback
0.25
0.2
0.15
0.1
1.0 2.0
0.05 0.5
0.1
0
-0.05
-0.1
0 1 2 3 4 5 6 7 8 9 10
Important Points:
General concepts:
BIBO Stability:
Comments:
Stability is much easier to prove than
unstability
This is just one type of stability
Closed-loop Stability
Closed-loop dynamics
GcGv G p 1
Y ( s) Y * ( s) + D( s)
1 + GcGv G pGm 1 + GcGv G pGm
GOL
+ ++ r
r ( s) a0 a1s a r s
G( s)
q ( s) b0 + b1s++b s
and factor as
( a1 s + 1) ( ar s + 1)
G ( s) K
(1s + 1) ( s + 1)
Closed-loop stability
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
an sn + an-1sn-1++ a1s + a0 0
is
1 an an - 2 an - 4
2 an - 1 an - 3 an - 5
3 b1 b2 b3
4 c1 c2
n+1 z1
where
a a -a a a a -a a
b1 n -1 n - 2 n - 3 n , b2 n -1 n - 4 n -5 n ,
an -1 an -1
ba -b a ba -b a
c1 1 n - 3 2 n -1 , c2 1 n -5 3 n -1 ,
b1 b1
Characteristic polynomial
2.36s5 + 149
. s4 - 0.58s3 + 121
. s2 + 0.42 s + 0.78 0
Polynomial Coefficients
a5 2.36, a4 149
. , a3 -058
. , a2 121
. , a1 0.42, a0 0.78
Routh Array
Observation:
Process becomes unstable when poles appear on
right half plane
Strategy:
Start with characteristic polynomial
r ( s)
1 + KcGv ( s)G p ( s)Gm ( s) 1 + Kc
q ( s)
Write characteristic equation:
q ( s) + Kcr ( s) 0
Substitute for complex pole (s=j)
q ( j ) + Kcr ( j ) 0
Solve for Kc and
Example: Direct Substitution
Characteristic equation
s+1
1 + Kc 0
s3 + 0.5s2 - 0.5s - 0.75
s3 + 0.5s2 - 0.5s - 0.75 + Kc s + Kc 0
s3 + 0.5s2 + ( Kc - 0.5) s + ( Kc - 0.75) 0
e.g.
1.5
Kc-0
1
0.5
Imaginary Axis
-0.5
Kc-0
-1
-1.5
-1.5 -1 -0.5 0 0.5 1 1.5
Real Axis
Stability and Performance
Given plant model, we assume a stable closed-loop
system can be designed
C
Space of all
Controllers S
Can be achieved by
Direct synthesis : Specify servo transfer
function required and calculate required
controller - assume plant = model
Tuning relations:
Cohen-Coon - 1/4 decay ratio
designs based on ISE, IAE and ITAE
Isolate Gc
1 C R
Gc
G p 1 - C
R
Gc
1
C ( )
Rd
( )
G pm 1 - C
R d
1. Perfect Control
C 1
R d
cannot be achieved, requires infinite gain
requires c
again, 1st order leads to PI control
2nd order leads to PID control
IMC Controller Tuning
D
R + C
+
Gc* Gp
+
-
+
-
Gpm
Gc*G p 1 - Gc*G p
C R+ D
1 + Gc* (G p - G pm ) 1 + Gc* (G p - G pm )
+ G-
G pm G pm pm
where + contains dead-time and RHP
G pm
zeros, steady-state gain scaled to 1.
2. Controller
1
Gc* f
G -pm
where f is the IMC filter
1
f
( c s + 1) r
based on pole-zero cancellation
not recommended for open-loop unstable
processes
very similar to direct synthesis
Example
e -9 s 0.3
G p ( s)
30s + 1
-9 s
C e
R d 12 s + 1
Example
25
IMC
20
Direct
Synthesis
15
y(t)
10
0
0 50 100 150 200 250 300
t
IMC not as good due to Pade approximation
Example
40
35
30
y(t)
25
Direct Synthesis
20
IMC
15
0 50 100 150 200 250 300
t
Direct synthesis rejects disturbance more
rapidly (marginally)
Tuning Relations
1/s D(s)
Y*(s)
Gc Gp
U(s) Y(s)
Gs
Ym(s)
Manuel Control
1. Step in U is introduced
2. Observe behavior ym(t)
3. Fit a first order plus dead time model
Ke - s
Ym ( s)
s+1
Tuning Relations
Process response
1.2
0.8
0.6
KM
0.4
0.2
-0.2
0 1 2 3 4 5 6 7 8
Controller Kc Ti Td
P-only (1 / K p )( / )
PI (0.9 / K p )( / ) 3.3
PID (1.2 / K p )( / ) 2.0 0.5
Example:
e -9 s 0.3
G p ( s)
30s + 1
50
Z-N PI
45
Z-N PID
40
y(t) 35
Direct Synthesis
30
25
20
0 50 100 150 200 250 300
t
Example
Regulatory Response
40
35
30 Direct Synthesis
25
Z-N PI
20
Z-N PID
15
10
0 50 100 150 200 250 300
Z-N tuning
Oscillatory with considerable overshoot
Tends to be conservative
Cohen-Coon Tuning Relations
Controller Kc Ti Td
P-only (1 / K p )( / )[1 + / 3 ]
PI (1 / K p )( / )[ 0.9 + / 12 ] [30 + 3( / )]
9 + 20( / )
PID 3 + 16 [32 + 6( / )] 4
(1 / K p )( / )[ ]
12 13 + 8( / ) 11 + 2( / )
Example:
Cohen-coon: Servo
55
50
45 C-C PID
40
35
C-C PI
30
25
20
0 50 100 150 200 250 300
Cohen-Coon: Regulatory
40
35
30
C-C PI
25
y(t) 20
15 C-C PID
10
5
0 50 100 150 200 250 300
Highly oscillatory t
Very aggressive
Integral Error Relations
IAE e(t ) dt
0
ISE e(t ) 2 dt
penalizes large errors
0
3. Integral of time-weighted absolute error
(ITAE)
ITAE t e(t ) dt
0
penalizes errors that persist
( )
Y A
B
KKc d
I
Setpoint Settings:
( )
Y A
B
KKc d ,
I A + B( )
Example
0.3e -9 s
Gs , GL 1
30s + 1
ITAE Relations
Example (contd)
Setpoint Settings
- 0.85
( )
KKc 0.965 9 30 2.6852
Kc 2.6852 K 2.6852 0.3 8.95
I 0.796 - 01465
. 9( )
30 0.7520
( )
d 0.308 9 0.929 01006
30 .
d 01006
. 3.0194
Load Settings:
- 0.947
KKc 1357
. 9
30( ) 4.2437
Kc 4.2437 4.2437 14.15
K 0.3
- 0.738
I 0.842( )
9
30 2.0474
( )
d 0.381 9 0.995 01150
30 .
d 01150
. 3.4497
ITAE Relations
Servo Response
60
55 ITAE(Load)
50
45
40
35 ITAE(Setpoint)
30
25
20
0 50 100 150 200 250 300
Regulatory response
40
35
30
ITAE(Setpoint)
25
20
15
10
5 ITAE(Load)
0
0 50 100 150 200 250 300
In general, d 0.25
I
Frequency Response of
Linear Control Systems
First order Process
lim
t
Y ( s)
-1 KP A
1+ 2 2
sin(t + f )
1.5
0.5
AR
-0.5
-1 f
-1.5
0 2 4 6 8 10 12 14 16 18 20
t/
Bode Plots
0
10
High Frequency
Asymptote
Corner Frequency
AR/Kp
-1
10
-2
10
-2 -1 0 1 2
10 10 10 10 10
p
0
-20
-40
f
-60
-80
-100
-2 -1 0 1 2
10 10 10 10 10
p
Sinusoidal Response
Kp A
Y ( s)
2 s2 + 2s + 1 s2 + 2
Kp A
y (t ) sin(t + f )
1 - ( )
2 2
+ (2 )2
where - 1 2
f - tan
2
1 - ( )
1
ARn
1 - ( )
2 2
+ (2 )2
Second Order Processes
Bode Plot
1
10
0.1
Amplitude reaches
a maximum at
AR
0
10 resonance frequency
=1
-1
10
-1 0 1
10 10 10
-50
=1
f
-100
-150
0.1
-1 0 1
10 10 10
Frequency Response
No
Yes
Im
b w
a Re
Some facts:
ii) Let z=a-bj and w= a+bj then
w z and arg( z) - arg( w)
Main Result:
AR G ( j ) Re(G ( j )) 2 + Im(G ( j )) 2
-1 Im(G ( j ))
Phase Angle tan
Re(G ( j ))
Frequency Response
r ( s) e - s ( s - z1)( s - zm )
G ( s)
q ( s) ( s - p1)( s - pn )
G ( j ) G ( j ) e j
The facts:
Examples:
K - j K
G ( j ) - j
j - j
K -1 - K /
AR , f tan -
0 2
G ( j ) e - j
AR 1, f -
Frequency Response
Examples:
3. n process in series
G( s) G1( s)Gn ( s)
G ( j ) G1 ( j ) Gn ( j )
G1 ( j ) e jf1 Gn ( j ) e jfn
therefore
n
AR G ( j ) Gi ( j )
i 1
n n
f arg(G ( j )) arg(Gi ( j )) fi
i 1 i 1
Frequency Response
Examples.
K1 Kn
G ( s)
1s + 1 n s + 1
K1 Kn
AR
1 + 12 2 1 + n2 2
f - tan -1(1)-- tan -1( n )
5. First order plus delay
K pe -s
G( s)
s+1
K p (1)
AR , f - tan -1( ) -
1 + 2 2
Frequency Response
K
AR -
2
2
10
1
AR
10
0
10
-2 -1 0
10 10 10
-89
-89.5
Phase Angle
-90
-90.5
-91
-2 -1 0
10 10 10
Frequency (rad/sec)
Bode Plot
G3
10
-2 G2
G1
-4
10
-4 -3 -2 -1 0 1
G
10 10 10 10 10 10
-100
-200
-300
-4 -3 -2 -1 0 1
10 10 10 10 10 10
1
G ( j )
(1 + 102 2 )(1 + 52 2 )(1 + 12 2 )
- tan -1(10 ) - tan -1(5 ) - tan -1( )
Bode Plot
G ( s) e - s
G( j ) 1, -
Example: Effect of dead-time
-2
10
G=Gd
-4
10
-4 -3 -2 -1 0 1
10 10 10 10 10 10
-100
-200
-300
Gd G
-4 -3 -2 -1 0 1
10 10 10 10 10 10
Nyquist Plot
G( j )
Nyquist Plot
Dead-time
Second Order
1
1
Nyquist Plot
Third Order
1
G ( s) 3
s + 3s2 + 3s + 1
, Gd ( s) e -2 s
1
G( s)
s2 + 3s + 1
Che 446: Process Dynamics and
Control
Frequency Domain
Controller Design
PI Controller
1
AR Kc +1
I 2 2
tan -1( -1 / I )
3
10
2
10
AR101
0
10
-3 -2 -1 0 1
10 10 10 10 10
-20
-40
-60
-80
-100
-3 -2 -1 0 1
10 10 10 10 10
PID Controller
2
1
AR Kc D - +1
I
-1 1
tan D -
I
3
10
2
10
AR
1
10
0
10
-3 -2 -1 0 1
10 10 10 10 10
100
50
0
-50
-100
-3 -2 -1 0 1
10 10 10 10 10
Bode Stability Criterion
D(s)
R(s) + +
Gc Gp
- +
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 f=-180
3. At same time, connect close the loop and set
R(s)=0
Strategy:
1. Solve for in
arg(GOL ( j )) -
2. Calculate AR
AR GOL ( j )
Bode Stability Criterion
5e - 01
.s
Gc ( s) 0.4 1 +
1
G( s) 01
( s + 1)(0.5s + 1) . s
5e -01.s
1
GOL ( s) 0.4 1 +
( s + 1)(0.5s + 1) 01 . s
5 1 1
AR 0.4 1 +
1+ 2
1 + 0.25 2 0.01 2
-1 -1 -1 1
f -01
. - tan ( ) - tan (0.5 ) - tan
01
.
- At =1.4128, f=-, AR=6.746
Ziegler-Nichols Tuning
2
Pu
c
Ziegler-Nichols Tunings
P Ku/2
PI Ku/2.2 Pu/1.2
PID Ku/1.7 Pu/2 Pu/8
Nyquist Stability Criterion
Strategy
5e -0.1s
G( s)
( s + 1)(0.5s + 1)
and the PI controller
Gc ( s) 0.4 1 +
1
01 . s
Stability Considerations
Gs
Ym(s)
Feedback controllers
output of process must change before any action
is taken
disturbances only compensated after they affect
the process
Feedforward Control
Feedforward
Controller
D(s)
Gf
GD
R(s) +
Gc + + Gv Gp
+
+
U(s) Y(s)
Gs
Ym(s)
Feedback/Feedforward Controller
Structure
Feedforward Control
F,Tin
TT
TT
TC1
Ps
Steam
Condensate
F,T
Is this control configuration feedback 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:
TT TC2
F,Tin +
TT +
TC1
Ps
Steam
Condensate
F,T
How do we design TC2?
Feedforward Control
D(s)
Gf
GD
UR(s)+ + +
Gv Gp
U(s) + Y(s)
Transfer Function
Y ( s) GD ( s) D( s) + G P ( s)Gv ( s)U ( s)
Y ( s) GD ( s) D( s) + G P ( s)Gv ( s)(U R ( s) + G f ( s) D( s))
Y ( s) (GD ( s) + G p ( s)Gv ( s)G f ( s)) D( s) + G p ( s)Gv ( s)U R ( s)
Y ( s) (GD ( s) + G p ( s)Gv ( s)G f ( s)) D( s) + YR ( s)
Tracking of YR requires that
GD ( s) + G p ( s)Gv ( s)G f ( s) 0
GD ( s)
G f ( s) -
G p ( s)Gv ( s)
Feedforward Control
GD ( s)
G f ( s) -
G p ( s)Gv ( s)
Exact cancellation requires perfect plant and
perfect disturbance models.
GD ( s) + G p ( s)Gv ( s)G f ( s) 0
Feedforward controllers:
very sensitive to modeling errors
cannot handle unmeasured disturbances
cannot implement setpoint changes
Feedback/Feedforward Control
D(s)
Gf
GD
R(s) +
Gc + + Gv Gp
+
+
U(s) Y(s)
Gs
Ym(s)
C( s) GD ( s) + G f ( s)Gv ( s)G p ( s)
D( s) 1 + Gc ( s)Gv ( s)G p ( s)Gm ( s)
Perfect control requires that (as above)
GD ( s)
G f ( s) -
Gv ( s)G p ( s)
Note:
Feedforward controllers do not affect closed-
loop stability
Feedforward controllers based on plant models
can be unrealizable (dead-time or RHP zeroes)
Can be approximated by a lead-lag unit or pure
gain (rare)
( 1s + 1) KD
G f ( s) K f G f ( s) -
( 2 s + 1) Kv K p
Feedforward Control
( 1s + 1)
G f ( s) K f
( 2 s + 1)
Kf obtained from open-loop data
KD
Kf -
Kv K p
- 1 and 2
from open-loop data
1 p , 2 D
from heuristics
1 1
0.5 2.0
2 2
Trial-and-error
1 - 2 c
Feedforward Control
Example:
Plant:
10
G p ( s)
(10s + 1)(5s + 1)( s + 1)
1
GD ( s)
(2.5s + 1)( s + 1)
Plant Model:
10e -6s e- s
G pm ( s) GDm ( s)
10s + 1 2.5s + 1
Feedback Design from plant model: IMC PID
tunings
e5s (10s + 1)
G f ( s) -
10 (2.5s + 1)
Not realizable
2. Lead-lag unit
1 10, 2 2.5
1
Kf -
3. Feedforward gain10
controller:
1
Kf -
10
Feedforward Control
0.8
.. - Gain Controller
0.6 -- - Lead-Lag Controller
- - No FF Controller
0.4
0.2
-0.2
-0.4
-0.6
0 20 40 60 80 100 120 140 160 180 200
Jacketed Reactor:
TT
F,Tin TT
TC1
Ps
Steam
FT
Condensate
F,T
Conventional Feedback Loop:
operate valve to control steam flow
steam flow disturbances must propagate
through entire process to affect output
does not take into account flow measurement
Cascade Control
TT
F,Tin TT
TC1 FC
FT
Ps
Steam
Condensate
F,T
Note:
TC1 calculates setpoint cascaded to the flow
controller
Flow controller attenuates the effect of steam
flow disturbances
Cascade Control
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
Block Diagram
D2 D1
+ + + +
Gc1 Gc2 Gv2 Gp2 Gp1
- -
Gm2
Gm1
Cascade Control
Cascade Control
1. Inner loop
C2 G p2Gv 2Gc2
Gcl 2
R2 1 + G p2Gv 2Gc2Gm2
2. Outer loop
C1 G p1Gcl 2Gc1
R1 1 + G p1Gcl 2Gc1Gm1
Characteristic equation
1 + G p1Gcl 2Gc1Gm1 0
G p2Gv 2Gc2
1 + G p1 Gc1Gm1 0
1 + G p2Gv 2Gc2Gm2
1 + G p2Gv 2Gc2Gm2 + G p1G p2Gv 2Gc2Gc1Gm1 0
Cascade Control
Example
K p1
G p1 , Gc1 Kc1, Gv1 Gm1 1
1s + 1
K p2
G p2 , Gc2 Kc2 , Gm2 1
2s + 1
K p2 K p2 K p1
1 + Kc 2 + Kc1 0
2s + 1 2 s + 1 1s + 1
(1s + 1)( 2 s + 1) + Kc2 K p2 (1s + 1) + Kc1K p2 K p1 0
1. Primary:
e -0.1s
G p1( s) , Gm1 1,
(0.5s + 1)( s + 1)
1
Gc1 Kc1 1 +
I s
2. Secondary:
1
G p2 , Gv 2 Gm2 1
. s+1
01
Gc2 Kc2
Cascade Control
1. PI controller only
-0.1s
GOL1 Kc1 1 +
1 1 e
s 01 . s + 1 (0.5s + 1)( s + 1)
1 1 1 1
AR Kc1 1 + 2
0.01 2 + 1 0.25 2 + 1 2 + 1
-1
1
- tan - tan -1(01
. )
- tan -1(0.5 ) - tan -1( ) - 01
.
Critical frequency
c 2.99, AR 0178
.
Maximum gain
Kc1 561
.
Cascade Control
Bode Plots
AR
ln()
Cascade Control
2. Cascade Control
Secondary loop
1
GOl 2 Kc2
. s+1
01
no critical frequency gain can be large
Let Kc2=10.
Primary loop
10
-0.1s
GOL1 Kc1 1 + 01 . s+1
1 e
s 1 (0.5s + 1)( s + 1)
1 + 10
. s+1
01
10 e -0.1s
Kc1
11 s(0.5s + 1)( 01
.
s + 1)
11
Cascade Control
Closed-loop stability:
AR 10 1 1 1
Kc1 11 2
+ 2
1 + 2
01
. 1 0.25
11
-1 01
.
f - - 01
. - tan - tan -1 (0.5 )
2 11
Bode
c 413
. , AR 0.0958
Maximum gain Kc1=10.44
Secondary loop stabilizes the primary loop.
Cascade Control
Implementation
R C
Gc Gp e-s
Motivation
e - s
G ( s) 2 . 0.75
, 01
s + 3s + 2
Gc ( s) 4 1 +
1
s
R C
Gc Gp e-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
- s
C( s) C( s) GcG p e
1,
D( s) R( s) 1 + GcG pm
1 + GcG pm 0
1
s2 + 3s + 2
Servo Response
1.5
0.5
0
0 1 2 3 4 5 6 7 8 9 10
Regulatory Response
1
0.8
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
Dead-time Compensation
D ( s) Y ( s) - Y ( s)
- s -s
D( s) G p e U ( s) - G pme U ( s)
Adding this to previous loop gives
R + C
Gc Gp e-s
+ - +
+
+
Gpm Gpm e-s -
+
Dead-time Compensation
- s - s
C ( s) 1 + (e -e )GcG pm
D( s) 1 + G G + G (G e - s - G e - s )
c pm c p pm
C ( s) GcG p e - s
R( s) 1 + G G + G (G e - s - G e - s )
c pm c p pm
Characteristic Equation
- s - s
1 + GcG pm + Gc (G pe - G pme )0
Fast Slow
Dynamics Dynamics
Effect of dead-time on stability is
removed
Disturbance rejection is achieved
Controller tuned for undelayed
dynamics
Dead-time Compensation
D
R 1 + C
4 1 +
1
e-0.5s
+ - s s2 + 3s + 2 +
+ 1 1 +
e-0.5s
+ s2 + 3s + 2 s2 + 3s + 2 -
D ( s)
Servo Response
1.5
0.5
0
0 1 2 3 4 5 6 7 8 9 10
Regulatory Response
1
0.5
-0.5
0 1 2 3 4 5 6 7 8 9 10
Dead-time Compensation
Alternative form
D
R + C
Gc Gp e-s
+ - +
+
Gpm(1-e-s)
+
Gc ( s)
Gc* ( s)
1 + G pm (1 - e -ms )
called a Smith-Predictor
Dead-time compensation
Smith-Predictor Design
Y ( s) G pm ( s)e -ms
2. Tune controller Gc for the undelayed
transfer function model Gpm
3. Implement Smith-Predictor as
Gc ( s)
Gc* ( s)
1 + G pm (1 - e -ms )
4. Perform simulation studies to tune
controller and estimate closed-loop
performance over a range of modeling
errors (Gpm and m)
Dead-time Compensation
+ 1 1 +
e-s
+ s2 + 3s + 2 s2 + 3s + 2 -
D ( s)