You are on page 1of 294

CHEE 434/821

Process Control II
Some Review Material
Winter 2006

Instructor:
M.Guay

TA:
V. Adetola
Introduction
In the chemical industry,






the design of a control system is essential to
ensure:
Good Process Operation
Process Safety
Product Quality
Minimization of Environmental Impact


Introduction
What is the purpose of a control system?

To maintain important process characteristics at
desired targets despite the effects of external
perturbations.
Control
Plant
Processing
objectives



Safety
Make $$$
Environment...
Perturbations




Market
Economy
Climate
Upsets...
Introduction
Plant
Control
What constitutes a control system?


Combination of process
sensors, actuators and
computer systems
designed and tuned
to orchestrate
safe and profitable
operation.
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











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


u
d
y
P
Information Flow
Examples
Stirred tank heater

M
T
in
, w
Q
T, w
T
in
w
Q
T Process
Inputs
Output
Examples
The speed of an automobile
Force of
Engine
Friction
I nputs
Output
Friction

Engine
Speed Process
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











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


u
d
y
P
Information Flow
Control
What is control?

To regulate of a process output despite the effect of
disturbances e.g.
Driving a car
Controlling the temperature of a chemical
reactor
Reducing vibrations in a flexible structure

To stabilize unstable processes e.g.
Riding a bike
Flight of an airplane
Operation of a nuclear plant








Benefits of Control
Economic Benefits
Quality (waste reduction)
Variance reduction (consistency)
Savings in energy, materials, manpower

Operability, safety (stability)
Performance
Efficiency
Accuracy
robotics
Reliability
Stabilizability
bicycle
aircraft
nuclear reactor
Control






A controller is a system designed to regulate a given
process
Process typically obeys physical and chemical
conservation laws
Controller obeys laws of mathematics and logic
(sometimes intelligent)

e.g. - Riding a bike (human controller)
- Driving a car
- Automatic control (computer
programmed to control)

Process
Controller
What is a controller?
Block representations
Block diagrams are models of the physical systems
Process
System Physical
Boundary
Transfer of
fundamental
quantities
Mass, Energy and Momentum
Input variables
Output variables
Physical
Operation
Abstract
Control
A controlled process is a system which is
comprised of two interacting systems:

e.g. Most controlled systems are feedback controlled
systems









The controller is designed to provide regulation of
process outputs in the presence of disturbances

Process
Controller
Outputs Disturbances
Action Observation
monitor intervene
Introduction
What is required for the development of a
control system?
1. The Plant (e.g. SPP of Nylon)
Water
Steam
Gas Make-up
Vent
Nylon
Blower
Dehumidifier
Reheater
Relief
Pot
Heater
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
Controller
Friction
Process Speed
Engine
Human or Computer
Classical Control
Control is meant to provide regulation of process
outputs about a reference, r, despite inherent
disturbances













The deviation of the plant output, e=(r-y), from its
intended reference is used to make appropriate
adjustments in the plant input, u

Process Controller
Classical Feedback Control System
d
y u r e
+
-
Control
Process is a combination of sensors and actuators

Controller is a computer (or operator) that performs
the required manipulations


e.g. Classical feedback control loop

y r e
A C P
M
d
Computer Actuator
Process
Sensor
-
+
Examples
Driving an automobile
y e
A C P
M
Driver
Automobile
-
+
Steering
r
Visual and tactile measurement
Desired trajectory
r
Actual trajectory
y
Examples
Stirred-Tank Heater
T
in
, w
Q T, w
Heater
TC
Thermocouple
y e
A C P
M
Controller
Tank
-
+
Heater
Thermocouple
T
in
, w
T
R

Examples
Measure T, adjust Q













Controller: Q=K(T
R
-T)+Q
nominal

where Q
nominal
=wC(T-T
in
)

Q: Is this positive or negative feedback?
T
in
, w
T e
A C P
M
Controller
Tank
-
+
Heater
Thermocouple
Feedback control
T
R
Examples
Measure T
i
, adjust Q
A P C
M
T
i

Q
i

AQ
Q
+
+
Feedforward Control
Control Nomenclature
Identification of all process variables

Inputs (affect process)
Outputs (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


Controller
Manipulated
Disturbances
Process
Control
Other
Example
T
L
T
w
i
, T
i

w
c
, T
ci

w
c
, T
co

w
o
, T
o

h
Variables

w
i
, w
o
: Tank inlet and outlet mass flows
T
i
, T
o
: Tank inlet and outlet temperatures
w
c
: Cooling jacket mass flow
P
c
: Position of cooling jacket inlet valve
P
o
: Position of tank outlet valve
T
ci
, T
co
: Cooling jacket inlet and outlet
temperatures
h: Tank liquid level
P
o

P
c

Example
Variables Inputs Outputs

Disturbances Manipulated Measured Unmeasured Control
w
i

T
i

T
ci

w
c

h
w
o

T
o

P
c

P
o



Task: Classify the variables
Process Control and Modeling

In designing a controller, we must
Define control objectives
Develop a process model
Design controller based on model
Test through simulation
Implement to real process
Tune and monitor

Model
Controller
y u r e
d
Process
Design
Implementation
Control System Development
Define Objectives
Develop a process
model
Design controller
based on model
Test by
Simulation
Implement and Tune
Monitor
Performance

Control development is usually carried out following these
important steps
Often an iterative process, based on performance we may
decide to retune, redesign or remodel a given control system
Control System Development
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
Implement and tune the controlled process
Test by simulation
incorporate control strategy to the process
hardware
theory rarely transcends to reality
tune and re-tune

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?

Dynamic vs. Steady-state

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
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
Dynamic vs. Steady-state











Step change in input to observe
Starting at steady-state, we made a step change
The system oscillates and finds a new steady-
state
Dynamics describe the transitory behavior







0 50 100 150 200 250 300
40
45
50
55
60
65
O
u
t
p
u
t

Time
Steady-State 1
Steady-State 2
Process Modeling
Empirical vs. Mechanistic models
Empirical Models
only local representation of the process
(no extrapolation)
model only as good as the data
Mechanistic Models
Rely on our understanding of a process
Derived from first principles
Observing laws of conservation of
Mass
Energy
Momentum
Useful for simulation and exploration of
new operating conditions
May contain unknown constants that must
be estimated


Process Modeling

Empirical vs Mechanistic models
Empirical models
do not rely on underlying mechanisms
Fit specific function to match process
Mathematical French curve




0 50 100 150 200 250 300
0.4
0.5
0.6
0.7
0.8
0.9
1
1.1
1.2
1.3
O
u
t
p
u
t
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 modeling objectives
end use of model (e.g. control)

Identify fundamental quantities of interest
Mass, Energy and/or Momentum

Identify boundaries

Apply fundamental physical and chemical laws
Mass, Energy and/or Momentum balances

Make appropriate assumptions (Simplify)
ideality (e.g. isothermal, adiabatic, ideal
gas, no friction, incompressible flow,
etc,)

Write down energy, mass and momentum
balances (develop the model equations)
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
For control applications:

Modeling objectives is to describe process
dynamics based on the laws of conservation of
mass, energy and momentum

The balance equation







1. Mass Balance (Stirred tank)
2. Energy Balance (Stirred tank heater)
3. Momentum Balance (Car speed)


Rate of Accumulation
of fundamental quantity
Flow
In
Flow
Out
Rate of
Production
=
-
+
Process Modeling
Application of a mass balance
Holding Tank








Modeling objective: Control of tank level

Fundamental quantity: Mass

Assumptions: Incompressible flow


h
F
F
in

Process Modeling
Total mass in system = V = Ah
Flow in = F
in
Flow out = F

Total mass at time t = Ah(t)
Total mass at time t+At = Ah(t+At)
Accumulation
Ah(t+At) Ah(t) = At(F
in
-F ),





A
dh
dt
F F
in
= ( ).
lim
( ) ( )
( ),
A
A
A
t
in
Ah t t Ah t
t
F F

+
=
0




Ah t t Ah t
t
F F
in
( ) ( )
( ),
+
=
A
A
Process Modeling
Model consistency
Can we solve this equation?

Variables: h, , F
in
, F, A 5

Constants: , A 2

Inputs: F
in
, F 2

Unknowns: h 1

Equations 1

Degrees of freedom 0

There exists a solution for each value of the
inputs F
in
, F

Process Modeling
Solve equation

Specify initial conditions h(0)=h
0
and integrate

h t h
F F
A
d
in
t
( ) ( )
( ) ( )
= +

|
\

|
.
|
}
0
0
t t
t
0 10 20 30 40 50 60 70 80 90 100
0
0.5
1
1.5
2
f
l
o
w F
Fin
0 10 20 30 40 50 60 70 80 90 100
0.9
1
1.1
1.2
1.3
h
Process Modeling
Energy balance











Objective: Control tank temperature
Fundamental quantity: Energy
Assumptions: Incompressible flow
Constant hold-up


M
T
in
, w
Q
T, w
Process Modeling
Under constant hold-up and constant mean
pressure (small pressure changes)
Balance equation can be written in terms of the
enthalpies of the various streams



Typically work done on system by external
forces is negligible



Assume that the heat capacities are constant
such that



dH
dt
H H Q
in out
= +

dH
dt
H H Q W
in out s
= + +

H C V T T
P ref
= ( )

( ) H C w T T
out P ref
=

( ) H C w T T
in P in ref
=
Process Modeling
After substitution,



Since T
ref
is fixed and we assume constant
,C
p



Divide by C
p
V




dT
dt
w
V
T T
Q
C V
in
P
= + ( )

C V
d T T
dt
C w T T C w T T Q
P
ref
P in ref P ref
( )
( ) ( )

= +
d C V T T
dt
C w T T C w T T Q
P ref
P in ref P ref
( ( ))
( ) ( )

= +
Process Modeling
Resulting equation:




Model Consistency

Variables: T, F, V, T
in
, Q, C
p
, 7

Constants: V, C
p
, 3
Inputs: F, T
in
, Q 3
Unknown: T 1

Equations 1

There exists a unique solution
dT
dt
F
V
T T
Q
VC
in
P
= + ( )

Process Modeling
Assume F is fixed



where t=V/F is the tank residence time (or
time constant)

If F changes with time then the differential
equation does not have a closed form
solution.



Product F(t)T(t) makes this differential
equation nonlinear.

Solution will need numerical integration.


T t T e e
T Q
C V
d
t t
in
p
t
( ) ( ) (
( ) ( )
)
/ ( )/
= + +
}

0
0
t t
,
t
,

,
dT t
dt
F t
V
T t T t
Q t
VC
in
P
( ) ( )
( ( ) ( ))
( )
= +

Process Modeling
A simple momentum balance













Objective: Control car speed
Quantity: Momentum
Assumption: Friction proportional to speed

Momentum
Out
=
Sum of forces
acting on system
Momentum
In
Rate of
Accumulation
-
+
Force of
Engine (u)
Friction
Speed (v)
Process Modeling
Forces are: Force of the engine = u
Friction = bv

Balance:

Total momentum = Mv




Model consistency

Variables: M, v, b, u 4
Constants: M, b 2
Inputs: u 1
Unknowns v 1

d Mv t
dt
M
dv t
dt
u t bv t
( ( )) ( )
( ) ( ) = =
Process Modeling
Gravity tank







Objectives: height of liquid in tank
Fundamental quantity: Mass, momentum
Assumptions:
Outlet flow is driven by head of liquid in the
tank
Incompressible flow
Plug flow in outlet pipe
Turbulent flow
h
L
F
F
o

Process Modeling
From mass and momentum balances,






A system of simultaneous ordinary
differential equations results

Linear or nonlinear?




dh
dt
F
A
A v
A
dv
dt
hg
L
K v
A
o P
F
P
=
=
2

Process Modeling
Model consistency

Variables F
o
, A, A
p
, v, h, g, L, K
F
, 9

Constants A, A
p
, g, L, K
F
, 6

Inputs F
o
1

Unknowns h, v 2

Equations 2

Model is consistent

Solution of ODEs
Mechanistic modeling results in nonlinear
sets of ordinary differential equations

Solution requires numerical integration

To get solution, we must first:
specify all constants (densities, heat capacities,
etc, )
specify all initial conditions
specify types of perturbations of the input
variables

For the heated stirred tank,


specify , C
P,
and V
specify T(0)
specify Q(t) and F(t)


dT
dt
F
V
T T
Q
VC
in
P
= + ( )

Input Specifications
Study of control system dynamics
Observe the time response of a process
output in response to input changes

Focus on specific inputs

1. Step input signals
2. Ramp input signals
3. Pulse and impulse signals
4. Sinusoidal signals
5. Random (noisy) signals


Common Input Signals
1. Step Input Signal: a sustained
instantaneous change

e.g. Unit step input introduced at time 1










0 1 2 3 4 5 6 7 8 9 10
0
0.5
1
1.5
I
n
p
u
t
Time
0 1 2 3 4 5 6 7 8 9 10
0
0.2
0.4
0.6
0.8
1
1.2
1.4
Common Input Signals
2. Ramp Input: A sustained constant rate of
change
e.g.
0 1 2 3 4 5 6 7 8 9 10
0
1
2
3
4
5
6
7
8
9
I
n
p
u
t
Time
0 1 2 3 4 5 6 7 8 9 10
-1
0
1
2
3
4
5
6
7
8
O
u
t
p
u
t
Time
Common Input Signals
3. Pulse: An instantaneous temporary change

e.g. Fast pulse (unit impulse)
0 1 2 3 4 5 6 7 8 9 10
0
10
20
30
40
50
60
70
80
90
100
I
n
p
u
t
Time
0 1 2 3 4 5 6 7 8 9 10
-0.05
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
Time
O
u
t
p
u
t
Common Input Signals
3. Pulses:

e.g. Rectangular Pulse
0 1 2 3 4 5 6 7 8 9 10
0
0.5
1
1.5
I
n
p
u
t
Time
0 1 2 3 4 5 6 7 8 9 10
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
O
u
t
p
u
t
Time
Common Input Signals
4. Sinusoidal input
0 5 10 15 20 25 30
-1.5
-1
-0.5
0
0.5
1
1.5
I
n
p
u
t
Time
0 5 10 15 20 25 30
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
O
u
t
p
u
t
Time
Common Input Signals
5. Random Input
0 5 10 15 20 25 30
-1.5
-1
-0.5
0
0.5
1
1.5
I
n
p
u
t
Time
0 5 10 15 20 25 30
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
O
u
t
p
u
t
Time
Solution of ODEs using Laplace
Transforms
Process Dynamics and Control
Linear ODEs
For linear ODEs, we can solve without
integrating by using Laplace transforms



Integrate out time and transform to
Laplace domain




F s f t f t e dt
st
t
( ) [ ( )] ( ) = =
}

=

0
Multiplication
Y(s) = G(s)U(s)
Integration
dy t
dt
ay t bu t
y c
( )
( ) ( )
( )
= +
= 0
Common Transforms
Useful Laplace Transforms
1. Exponential







2. Cosine
f t e
bt
( ) =

= =
} }
=
+
(

(
(
=
+
+

+

[ ]
[ ]
( )
( )
e e e dt e dt
e
e
s b s b
bt bt st s b t
bt
s b t
0 0
0
1
f t t
e e
j t j t
( ) cos( ) = =
+

e
e e
2
=
}
+
}


`
)
=

+
+


`
)
=
+

[cos( )]
( ) ( )
e
e e
e
e e
t e dt e dt
s j s j
s
s
s j t s j t
1
2
1
2
1 1
0 0
2 2
Common Transforms
Useful Laplace Transforms
3. Sine










f t t
e e
j
j t j t
( ) sin( ) = =


e
e e
2
=
}

}


`
)
=


`
)
=
+

[sin( )]
( ) ( )
e
e e
e
e
e e
t
j
e dt e dt
j s j s j
s
s j t s j t
1
2
1
2
1 1
0 0
2 2
Common Transforms
Operators
1. Derivative of a function f(t)








2. Integral of a function f(t)








(
=
} }
=

f d e f d dt
F s
s
t
st
t
( ) ( ( ) )
( )
t t t t
0 0 0
|
|
du df
v e
df
dt
uv udv f t e sf t e dt
df
dt
s f t e dt f sF s f
st
st st
st
=
=
=
}
=
}
=
}
=

[ ] ( ) ( ( ) )
[ ] ( ) ( ) ( ) ( )
0
0
0
0
0
0 0
df t
dt
( )
Common Transforms
g t
t
f t t
( )
( )
=
<
>

0 t
t t
| |
= +
} }

g t e dt e f t dt
st st
( ) ( ) ( ) 0
0
t
t
t
| |
=

g t e F s
s
( ) ( )
t
Operators
3. Delayed function f(t-t)
Common Transforms
I nput Signals
1. Constant




2. Step




3. Ramp function
f t
t
a t
( ) =
<
>

0 0
0
= =

=
}


[ ( )] ( ) f t ae dt
ae
s
a
s
st
st
0
0
= =

=
}


[ ] ( ) a ae dt
ae
s
a
s
st
st
0
0
f t a ( ) =
f t
t
at t
( ) =
<
>

0 0
0
| |
= =
(

(
+ =

} }
f t ate dt
e at
s
ae
s
dt
a
s
st
st st
( )
0
0
0
2
Common Transforms
I nput Signals
4. Rectangular Pulse







5. Unit impulse
f t
t
a t t
t t
w
w
( ) =
<
s <
>

0 0
0
0
| |
=
}
=

f t ae dt
a
s
e
st
t
t s
w
w
( ) ( )
0
1
| |
=


o( )
lim
( ) t
t s
e
t
w
t s
w
w
0
1
1
| |
= =

o( )
lim
t
se
s
t
t s
w
w
0
1
Laplace Transforms
Final Value Theorem



Limitations:




Initial Value Theorem



| | | |
lim ( ) lim ( )
t s
y t sY s

=
0
| |
y t C
sY s s s
s
( ) ,
lim ( ) Re( )
e
>

1
0
0 exists
| |
y sY s
s
( ) lim ( ) 0 =

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



Result

5 4 2 0 1
dy
dt
y y + = = , ( )
y t e
t
( ) . .
.
= +

05 05
08
Solution of Linear ODEs
Stirred-tank heater (with constant F)




taking Laplace





To get back to time domain, we must
Specify Laplace domain functions Q(s), T
in
(s)
Take Inverse Laplace

dT
dt
F
V
T T
Q
VC
T T
in
P
= +
=
( )
( )

0
0
| | | | | |
V
F
dT
dt
T t T t
FC
Q t
T s T T s T s K Q s
T s
s
T
s
T s
K
s
Q s
in
P
in P
in
P

(
= +
= +
=
+
+
+
+
+
( ) ( ) ( )
( ( ) ( )) ( ) ( ) ( )
( ) ( ) ( ) ( )
1
0
1
0
1
1 1

t
t
t t t
Linear ODEs
Notes:
The expression



describes the dynamic behavior of the process
explicitly

The Laplace domain functions multiplying T(0),
T
in
(s) and Q(s) are transfer functions














1
1
1
1
t
t
t
t
s
K
s
s
P
+
+
+
T s
s
T
s
T s
K
s
Q s
in
P
( ) ( ) ( ) ( ) =
+
+
+
+
+
t
t t t 1
0
1
1 1
+
+
+
T
in
(s)
Q(s)
T(0)
T(s)
Laplace Transform
Assume T
in
(t) = sin(et) then the transfer
function gives directly



Cannot invert explicitly, but if we can find A
and B such that



we can invert using tables.

Need Partial Fraction Expansion to deal with
such functions


1
1
1
2 2
t
e
e t
s
T s
s s
in
+
=
+ +
( )
( )( )
A
s
B
s
s s
2 2 2 2
1
1 +
+
+
=
+ + e
t
e
e t ( )( )
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,
(x
2
+bx+c)
m





Partial fraction Expansions
1. q(s) has real and distinct factors



expand as



2. q(s) has real but repeated factor


expanded



q s s b
i
i
n
( ) ( ) = +
[
=1
q s s b
n
( ) ( ) = +
r s
s b
i
i i
n
( ) =
+

=
o
1
r s
s b
s b s b
n
n
( )
( ) ( )
=
+
+
+
+ +
+
o o o
1 2
2

Partial Fraction Expansion
Heaviside expansion

For a rational function of the form




Constants are given by




Note: Most applicable to q(s) with real and
distinct roots. It can be applied to more
specific cases.


r s
p s
q s
p s
s b
s b
i
i
n
i
i i
n
( )
( )
( )
( )
( )
( )
= =
+
[
=
+

=
=
1
1
o
o
i i
s b
s b
p s
q s
i
= +
(

(
=
( )
( )
( )
Partial Fraction Expansions
3. Q(s) has irreducible quadratic factors of the
form


where

Algorithm for Solution of ODEs

Take Laplace Transform of both sides of ODE
Solve for Y(s)=p(s)/q(s)
Factor the characteristic polynomial q(s)
Perform partial fraction expansion
Inverse Laplace using Tables of Laplace
Transforms

q s s d s d
n
( ) ( ) = + +
2
1 0
d
d
2
0
4
<
Transfer Function Models
of Dynamical Processe
Process Dynamics and Control
Transfer Function
Heated stirred tank example











e.g. The block

is called the transfer function relating Q(s)
to T(s)

T s
s
T
s
T s
K
s
Q s
in
P
( ) ( ) ( ) ( ) =
+
+
+
+
+
t
t t t 1
0
1
1 1
1
1
1
1
t
t
t
t
s
K
s
s
P
+
+
+
+
+
+
T
in
(s)
Q(s)
T(0)
T(s)
K
s
P
t +1
Process Control
Time Domain
Transfer function
Modeling, Controller
Design and Analysis
Process Modeling,
Experimentation and
Implementation
Laplace Domain
Ability to understand dynamics in Laplace and
time domains is extremely important in the
study of process control
Transfer function
Order of underlying ODE is given by
degree of characteristic polynomial
e.g. First order processes


Second order processes


Steady-state value obtained directly
e.g. First order response to unit step function


Final value theorem


Transfer functions are additive and
multiplicative

Y s
K
s
U s
P
( ) ( ) =
+ t 1
Y s
K
s s
U s
P
( ) ( ) =
+ + t t
2 2
2 1
Y s
K
s s
p
( )
( )
=
+ t 1
| | | |
lim ( ) lim ( )
s s
P
sY s G s K

= =
0 0
Transfer function
Effect of many transfer functions on a
variable is additive
T s
s
T
s
T s
K
s
Q s
in
P
( ) ( ) ( ) ( ) =
+
+
+
+
+
t
t t t 1
0
1
1 1
1
1
1
1
t
t
t
t
s
K
s
s
P
+
+
+
+
+
+
T
in
(s)
Q(s)
T(0)
T(s)
Transfer Function
Effect of consecutive processes in series in
multiplicative





Transfer Function
K
s
P
t +1
K
s
P
t +1

U(s)
Y
2
(s) Y
1
(s)
Y s
K
s
U s
Y s
K
s
Y s
Y s
K
s
K
s
U s
P
P
P P
1
2 1
1
1
1
1 1
( ) ( )
( ) ( )
( ) ( )
=
+
=
+
=
+
|
\

|
.
|
+
|
\

|
.
|
t
t
t t
Deviation Variables
To remove dependence on initial condition
e.g.


Remove dependency on T(0)


Transfer functions express extent of deviation
from a given steady-state

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
' =
+
' +
+
' T s
s
T s
K
s
Q s
in
P
( ) ( ) ( )
1
1 1 t t
T s
s
T
s
T s
K
s
Q s
in
P
( ) ( ) ( ) ( ) =
+
+
+
+
+
t
t t t 1
0
1
1 1
Example
Jacketed heated stirred tank







Assumptions:
Constant hold-up in tank and jacket
Constant heat capacities and densities
Incompressible flow
Model
F, T
in

F
c
, T
cin

F
c
, T
c

F, T
h
dT
dt
F
V
T T
h A
C V
T T
dT
dt
F
V
T T
h A
C V
T T
in
c c
P
c
c c
c
cin c
c c
c Pc c
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
0
)
f(x)
c
c
f
x
x ( )
0
x
x
0
Nonlinear systems
First order Taylor series expansion

1. Function of one variable



2. Function of two variables



3. ODEs



f x u f x
s
u
s
f x u
x
x x
s
f x u
u
u u
s
s s s s
( , ) ( , )
( , )
( )
( , )
( ) ~ + +
c
c
c
c
f x f x
s
f x
x
x x
s
s
( ) ( )
( )
( ) ~ +
c
c
( ) ( )
( )
( ) x f x f x
s
f x
s
x
x x
s
= ~ +
c
c
Transfer function
Procedure to obtain transfer function from
nonlinear process models
Find steady-state of process
Linearize about the steady-state
Express in terms of deviations variables about
the steady-state
Take Laplace transform
Isolate outputs in Laplace domain
Express effect of inputs in terms of transfer
functions

Y s
U s
G s
Y s
U s
G s
( )
( )
( )
( )
( )
( )
1
1
2
2
=
=
First order Processes
Examples, Liquid storage
h
F
F
i

| A
dh
dt
F F F h
i i
= =

|

|
t
t
Adh
dt
F h
dh
dt
h K F
dh
dt
h K F
i
p i
p i
=
+ =
'
+ ' =
'
First Order Processes
Examples: Speed of a Car






Stirred-tank heater







Note:

t
C V
dT
dt
C FT Q
V
F
dT
dt C F
Q T
dT
dt
K Q T
p p
p
p
'
= ' + '
'
= ' '
'
= ' '
1
'
'
=
+
T s
Q s
K
s
p
( )
( ) t 1
M
dv
dt
u bv
M
b
dv
dt b
u v
dv
dt
K u v
p
'
= ' '
'
= ' '
'
= ' '
1
t
'
'
=
+
v s
u s
K
s
p
( )
( ) t 1
' = T t
in
( ) 0
First Order Processes
Liquid Storage Tank


Speed of a car


Stirred-tank heater
K
p
t

/| A/|


M/b 1/b


1/C
p
F V/F
First order processes are characterized by:

1. Their capacity to store material, momentum
and energy
2. The resistance associated with the flow of
mass, momentum or energy in reaching their
capacity
First order processes
Liquid storage:
Capacity to store mass : A
Resistance to flow : 1/|

Car:
Capacity to store momentum: M
Resistance to momentum transfer : 1/b

Stirred-tank heater
Capacity to store energy: C
p
V
Resistance to energy transfer : 1/ C
p
F

Time Constant = t = (Storage capacitance)*
(Resistance to flow)


First order process
Step response of first order process



Step input signal of magnitude M

Y s
K
s
M
s
p
( ) =
+ t 1
0 1 2 3 4 5 6
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0.632
t/t
First order process
What do we look for?

Process Gain: Steady-State Response




Process Time Constant:

t =


What do we need?

Process at steady-state
Step input of magnitude M
Measure process gain from new steady-state
Measure time constant



lim
s
p
p
K
s
K
y
u +

(
= = =
0 1 t
Overall Change in y
Overall Change in u
A
A
Time Required to Reach
63.2% of final value
First order process
Ramp response:



Ramp input of slope a
Y s
K
s
a
s
p
( ) =
+ t 1
2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
t
a
t/t
y
(
t
)
/
K
p
a

First order Process
Sinusoidal response



Sinusoidal input Asin(et)
Y s
K
s
A
s
P
( ) =
+
+
t
e
e
1
2 2
0 2 4 6 8 10 12 14 16 18 20
-1.5
-1
-0.5
0
0.5
1
1.5
2
AR
|
t/t
| |
{ }
lim ( ) sin( )
t
P
Y s
K A
t


=
+
+
1
2 2
1 t e
e |
First order Processes



10
-2
10
-1
10
0
10
1
10
2
10
-2
10
-1
10
0
A
R
/
K
p

t
p
e
Bode Plots
10
-2
10
-1
10
0
10
1
10
2
-100
-80
-60
-40
-20
0
|

t
p
e
High Frequency
Asymptote
Corner Frequency
AR
K
=
+ 1
2 2
t e
| et =

tan ( )
1
Amplitude Ratio Phase Shift
Integrating Processes
Example: Liquid storage tank















Process acts as a pure integrator
h
F
F
i

A
dh
dt
F F
A
dh
dt
F F
i
i
=
=
'
'
=
H s
F s
A
s
i
( )
( )
/ 1
F F F F F F
A
dh
dt
F F
i i is s
i
'
= ' =
'
=
'
'
,
'
'
=
H s
F s
A
s
( )
( )
/ 1
Process Modeling
Step input of magnitude M










Y s
K
s
M
s
KM
s
( ) = =
2
Time Time
Slope = KM
y t
t
KMt t
( ) =
<
>

0 0
0
Integrating processes
Unit impulse response











Y s
K
s
M
KM
s
( ) = =
Time Time
KM
y t
t
KM t
( ) =
<
>

0 0
0
Integrating Processes
Rectangular pulse response
Y s
K
s
M
s
e
KM
s
e
t s t s
w w
( ) ( ) ( ) = =

1 1
2
Time Time
y t
KMt t t
KMt t t
w
w w
( ) =
<
>

Second Order Processes


Three types of second order process:

1. Multicapacity processes: processes that
consist of two or more capacities in series
e.g. Two heated stirred-tanks in series

2. Inherently second order processes: Fluid
or solid mechanic processes possessing
inertia and subjected to some acceleration
e.g. A pneumatic valve

3. Processing system with a controller:
Presence of a controller induces oscillatory
behavior
e.g. Feedback control system

Second order Processes
Multicapacity Second Order Processes
Naturally arise from two first order processes in
series










By multiplicative property of transfer functions
Y s
K K
s s
U s
P P
( )
( )( )
( ) =
+ +
1 2
1 2
1 1 t t
K
s
P1
1
1 t +
U(s) Y(s)
K
s
P2
2
1 t +
Y(s) U(s)
K K
s s
P P 1 2
1 2
1 1 ( )( ) t t + +
Second Order Processes
Inherently second order process:
e.g. Pneumatic Valve








Momentum Balance
x
p
M
d
dt
dx
dt
pA Kx C
dx
dt
M
K
d x
dt
C
K
dx
dt
x
A
K
p
x s
p s
A
K
M
K
s
C
K
s
=
+ + =
'
'
=
+ +
2
2
1
( )
( )
Second order Processes
Second order process:
Assume the general form




where K
P
= Process steady-state gain
t = Process time constant
= Damping Coefficient

Three families of processes

<1 Underdamped
=1 Critically Damped
>1 Overdamped

Note: Chemical processes are typically
overdamped or critically damped
Y S
K
s s
U s
P
( ) ( ) =
+ + t t
2 2
2 1
Second Order Processes
Roots of the characteristic polynomial






Case 1) >1: Two distinct real roots
System has an exponential
behavior

Case 2) =1: One multiple real root
Exponential behavior

Case 3) <1: Two complex roots
System has an oscillatory
behavior


2 4 4
2
1
1
2 2 2
2
2
t t t
t

t t

Second order Processes
Step response of magnitude M
Y S
K
s s
M
s
P
( ) =
+ + t t
2 2
2 1
0 1 2 3 4 5 6 7 8 9 10
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
=2
=0
=0.2
Second order process
Observations

Responses exhibit overshoot (y(t)/KM >1)
when <1

Large yield a slow sluggish response

Systems with =1 yield the fastest response
without overshoot

As (with <1) becomes smaller system
becomes more oscillatory

If <0, system oscillates without bounds
(unstable)
Second order processes
Example - Two Stirred tanks in series

M
T
in
, w
Q
T
1
, w
M
Q
T
2
, w
Response of T
2
to
T
in
is an example of an
overdamped second
order process
Second order Processes
Characteristics of underdamped second order
process

1. Rise time, t
r

2. Time to first peak, t
p

3. Settling time, t
s

4. Overshoot:



5. Decay ratio:


OS
a
b
= =

|
\

|
.
|
|
exp

t
1
2
DR
c
b
= =

|
\

|
.
|
|
exp
2
1
2
t

Second order Processes


0 5 10 15 20 25 30 35 40 45 50
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
-5%
+5%
a
b
c
t
r

t
s

P
t
p

Second Order Process
Sinusoidal Response









where

Y s
K
s s
A
s
p
( ) =
+ + + t t
e
e
2 2 2 2
2 1
( )
| |
( )
y t
K A
t
p
( ) sin( ) =
+
+
1 2
2
2
2
et t
e |
|
et
et
=

(
(

tan
( )
1
2
2
1
( )
| |
( )
AR
n
=
+
1
1 2
2
2
2
et et
Second Order Processes
Bode Plots
10
-1
10
0
10
1
10
-1
10
0
10
1
10
-1
10
0
10
1
-150
-100
-50
0
=1
=0.1
=1
=0.1
More Complicated processes
Transfer function typically written as rational
function of polynomials




where r(s) and q(s) can be factored as



s.t.




G s
r s
q s
a a s a s
b b s b s
( )
( )
( )
= =
+ + +
+ + +
0 1
0 1


u
u
q s b s s s
r s a s s s
a a a
( ) ( )( ) ( )
( ) ( )( ) ( )
= + + +
= + + +
0 1 2
0 1 2
1 1 1
1 1 1
t t t
t t t
u
u

G s K
s s
s s
a a
( )
( ) ( )
( ) ( )
=
+ +
+ +
t t
t t

u
1
1 1
1 1
1

Poles and zeroes


Definitions:
the roots of r(s) are called the zeros of G(s)



the roots of q(s) are called the poles of G(s)




Poles: Directly related to the underlying
differential equation

If Re(p
i
)<0, then there are terms of the
form e
-p
i
t
in y(t) - y(t) vanishes to a unique
point

If any Re(p
i
)>0 then there is at least one
term of the form e
p
i
t
- y(t) does not vanish

z z
a a
1
1 1
1
= =
t t

, ,
p p
1
1
1 1
= =
t t
u
u
, ,
Poles
e.g. A transfer function of the form



with can factored to a sum of

A constant term from s
A e
-t/t
from the term (t
1
s+1)
A function that includes terms of the form






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
e
t
e
t
t
t

t
2
2
1
1
2
2
2
2
sin( )
cos( )
K
s s s s ( )( ) t t t
1
2 2
2
1 2 1 + + +
0 1 s <
Poles
Calculation performed easily in MATLAB

Function ROOTS
e.g.


ROOTS([1 1 1 1])
ans =

-1.0000
0.0000 + 1.0000i
0.0000 - 1.0000i

q s s s s ( ) = + + +
3 2
1
MATLAB
Poles
Plotting poles in the complex plane













Roots: -1.0, 1.0j, -1.0j
-1.2 -1 -0.8 -0.6 -0.4 -0.2 0 0.2
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
I
m
a
g
i
n
a
r
y

a
x
i
s
Real axis
q s s s s ( ) = + + +
3 2
1
Poles
Process Behavior with purely complex poles
0 5 10 15 20 25 30 35 40 45 50
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
Unit Step Response
y
(
t
)
t
Poles
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
I
m
a
g
i
n
a
r
y

a
x
i
s
Real axis
Roots: -0.4368, -0.4066+0.9897j,
-0.4066-0.9897j
2 25 3 1
3 2
s s s + + + .
Poles
Process behavior with mixed real and
complex poles
0 2 4 6 8 10 12 14 16 18 20
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Unit Step Response
y
(
t
)
t
Poles
-0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6
-1.5
-1
-0.5
0
0.5
1
1.5
I
m
a
g
i
n
a
r
y

a
x
i
s
Real axis
2 25 3 05
4 3 2
s s s s + + + . .
Roots: -0.7441, -0.3805+1.0830j,
-0.3805-1.0830j, 0.2550
Poles
Process behavior with unstable pole
0 2 4 6 8 10 12 14 16 18 20
-20
0
20
40
60
80
100
120
140
160
Unit Step Response
y
(
t
)
t
Zeros
Transfer function:






Let t
1
is the dominant time constant
G s
K s
s s
p a
( )
( )
( )( )
=
+
+ +
t
t t
1
1 1
1 2
y t K M e e
p
a
t
a
t
( ) = +

|
\

|
.
|
|

1
1
1 2
2
1 2
1 2
t t
t t
t t
t t
t t
t t
1 2
>
0 2 4 6 8 10 12 14 16 18 20
-0.5
0
0.5
1
1.5
2
2.5
3
Time
y
(
t
)
/
K
M
16
8
4
2
1
0
-1
-2
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 ( )

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

t t
a
>
1
Zeros
Can result from two processes in parallel













If gains are of opposite signs and time
constants are different then a right half
plane zero occurs
U(s) Y(s)
K
s
2
2
1 t +
K
s
1
1
1 t +
G s K
s
s s
a
( )
( )
( )( )
=
+
+ +
t
t t
1
1 1
1 2
K K K = +
1 2
t
t t
a
K K
K K
=
+
+
1 2 2 1
1 2
Dead Time
Time required for the
fluid to reach the valve
usually approximated as
dead time
h
F
i

Control loop
Manipulation of valve does not lead to immediate
change in level
Dead time
Delayed transfer functions







e.g. First order plus dead-time



Second order plus dead-time
e
d
s t
G s ( )
U(s)
Y(s)
Y s e G s U s
d
s
( ) ( ) ( ) =
t
G s
e K
s
d
s
p
( ) =
+
t
t 1
G s
e K
s s
d
s
P
( ) =
+ +
t
t t
2 2
2 1
Dead time
Dead time (delay)

Most processes will display some type of lag
time
Dead time is the moment that lapses between
input changes and process response

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
y
/
K
M
t/tau
t
D

Step response of a first order plus dead time process
G s e
d
s
( ) =
t
Dead Time
Problem
use of the dead time approximation makes
analysis (poles and zeros) more difficult




Approximate dead-time by a rational
(polynomial) function
Most common is Pade approximation

G s
e K
s
d
s
p
( ) =
+
t
t 1
e G s
s
s
e G s
s s
s s
s
s

~ =

+
~ =
+
+ +
u
u
u
u
u u
u u
1
2
2
2
2
2
1
2
1
2
1
2 12
1
2 12
( )
( )
Pade Approximations
In general Pade approximations do not
approximate dead-time very well

Pade approximations are better when one
approximates a first order plus dead time
process




Pade approximations introduce inverse
response (right half plane zeros) in the
transfer function

Limited practical use






G s
e K
s
s
s
K
s
s
p p
( ) =
+
~

+
+
u
t
u
u
t 1
1
2
1
2
1
Process Approximation
Dead time
First order plus dead time model is often used
for the approximation of complex processes

Step response of an overdamped second
order process
0 1 2 3 4 5 6 7 8
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
- First Order plus dead time
o Second Order
Process Approximation
Second order overdamped or first order
plus dead time?













Second order process model may be more
difficult to identify
0 1 2 3 4 5 6 7 8
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
-- First order plus dead time
- Second order overdamped
o Actual process
Process Approximation
Transfer Function of a delay system

First order processes





Second order processes



Y s
K e
s
U s
P
s
D
( ) ( ) =
+
t
t 1
Y S
K e
s s
U s
P
s
D
( ) ( ) =
+ +
t
t t
2 2
2 1
G(s) e
D
s t
Y(s)
U(s)
Process Approximation
More complicated processes
Higher order processes (e.g. N tanks in series)






For two dominant time constants t
1
and t
2

process well approximated by




For one dominant time constant t
1
, process well
approximated by

Y(s)
K K K
s s s
P P PN
N
1 2
1 2
1 1 1

( )( ) ( ) t t t + + +
U(s)
G s
e K
s
s
p
i
i
N
( )
( )
~
+
=

u
t
u t
1
2
1
G s
e K
s s
s
p
i
i
N
( )
( )( )
~
+ +
=

u
t t
u t
1 2
3
1 1
Process Approximation
Example
G s
s s s
( )
( )( )( )
=
+ + +
1
10 1 25 1 1
2
0 20 40 60 80 100 120 140 160 180 200
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
G s
e
s
s
1
12
25 1
( ) =
+

G s
e
s s
s
2
2
10 1 25 1
( )
( )( )
=
+ +

Empirical Modeling
Objective:

To identify low-order process dynamics (i.e.,
first and second order transfer function models)
Estimate process parameters (i.e., K
p
, t 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



Process Description



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)

E y x [ ] = + | |
0 1
y x = + + | | c
0 1
SSR y x
i i
i
n
=
=
( ) | |
0 1
2
1
Empirical Modeling
Solution
Differentiate SSR with respect to parameters






These are called the normal equations.
Solving for parameters gives:






where
c
c |
| |
c
c |
| |
SSR
y x
SSR
x y x
i i
i
n
i i i
i
n
0
0 1
1
1
0 1
1
2 0
2 0
= =
= =
=

(

)
(

)

| |
|
0 1
1
1
2 2
1
=
=

y x
x y nxy
x nx
i i
i
n
i
i
n
x
x
n
y
y
n
i
i
n
i
i
n
= =
=

=
,
1 1
Empirical Modeling
Compact form
Define





Then





Problem
find value of | that minimize SSR

Y
y
y
y
X
x
x
x
n n
=

(
(
(
(
=

(
(
(
(
=

(
1
2
1
2 0
1
1
1
1

, , |
|
|
E
y x
y x
y x
Y X
n n
=


(
(
(
(
=
1 0 1 1
2 0 1 2
0 1
| |
| |
| |
|

SSR E E
T
=
Empirical Modeling
Solution in Compact Form
Normal Equations can be written as



which can be shown to give


or



In practice
Manipulations are VERY easy to perform in
MATLAB
Extends to general linear model (GLM)

Polynomial model
c
c |
E E
T
= 0
X X X Y
T T

| =
( )

| =

X X X Y
T T
1
E y x x [ ] = + + | | |
0 1 1 11 1
2
E y x x
p p
[ ] = + + + | | |
0 1 1

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 are not
a function of |

typical process step responses
first order


Nonlinear in K
p
and t
overdamped second order



Nonlinear in K
p
, t
1
and t
2

nonlinear optimization is required to find the
optimum parameters

c
c |
e
i
E y t K M e
p
t
[ ( )] ( )
/
=

1
t
E y t K M
e e
p
t t
[ ( )]
/ /
=

|
\

|
.
|
|

1
1 2
1 2
1 2
t t
t t
t t
Empirical Modeling
Nonlinear Least Squares required for control
applications
system output is generally discretized


or, simply


First Order process (step response)


Least squares problem becomes the minimization
of



This yields an iterative problem solution best
handled by software packages: SAS, Splus,
MATLAB (function leastsq)



SSR y K M e
i p
t
n
i
i
=

=
( ( ))
/
1
2
1
t
y t y y y
n
( ) [ , , , ]
1 2

y t y t y t y t
n
( ) [ ( ), ( ), , ( )]
1 2

E y K M e
i p
t
i
[ ] ( )
/
=

1
t
Empirical Modeling
Example

Nonlinear Least Squares Fit of a first order process
from step response data

Model

Data
E y t K e
p
t
[ ( )] . ( )
/
=

30 1
t
0 10 20 30 40 50 60 70 80
-0.5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
y
(
t
)
t
Step Response
Empirical Modeling
Results:
Using MATLAB function leastsq obtained


Resulting Fit

K
p
= = 13432 118962 . , . t
0 10 20 30 40 50 60 70 80
-0.5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
y
(
t
)
t
Step Response
Empirical Modeling
Approximation using delayed transfer
functions
For first order plus delay processes




Difficulty
Discontinuity at u 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
E y
t
K M e t
i
p
t
i
[ ]
( )
( )/
=
s <
>


0 0
1
u
u
u t
Empirical Modeling
Example 2
Underlying True Process




Data
G s
s s s
( )
( )( )( )
=
+ + +
1
10 1 25 1 1
2
0 20 40 60 80 100 120 140
-0.5
0
0.5
1
1.5
2
2.5
3
3.5
y
(
t
)
t
Empirical Modeling
Fit of a first order plus dead time



Second order plus dead time
G s
e
s s
s
2
2
09946
24 9058 1 101229 1
( )
.
( . )( . )
=
+ +

G s
e
s
s
1
11
10000
27 3899 1
( )
.
( . )
=
+

0 20 40 60 80 100 120 140


-0.5
0
0.5
1
1.5
2
2.5
3
3.5
t
y
(
t
)
Empirical Modeling
Process reaction curve method:
based on approximation of process using first
order plus delay model











1. Step in U is introduced
2. Observe behavior y
m
(t)
3. Fit a first order plus dead time model


G
p

G
c

G
s

M/s
D(s)
Y(s)
Y
m
(s)
Y
*
(s)
U(s)
Manual Control
Y s
KMe
s s
m
s
( )
( )
=
+
u
t 1
Empirical Modeling
First order plus dead-time approximations











Estimation of steady-state gain is easy
Estimation of time constant and dead-time is
more difficult
0 1 2 3 4 5 6 7 8
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
t
KM
u
Empirical Modeling
Estimation of time constant and dead-time
from process reaction curves
find times at which process reaches 35.3% and
85.3%













Estimate
0 20 40 60 80 100 120 140 160
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
y
(
t
)
t
t
t
1
t
2

u
t
=
=
13 0 29
0 67
1 2
2 1
. .
. ( )
t t
t t
Empirical Process
Example
For third order process



Estimates:




Compare:
Least Squares Fit Reaction Curve





G s
s s s
( )
( )( )( )
=
+ + +
1
10 1 25 1 1
2
t t
1 2
23 62 5
1178 26 46
= =
= =
, .
. , . u t
G s
e
s
s
1
1178
100
2646 1
( )
.
( . )
.
=
+

G s
e
s
s
1
11
10000
27 3899 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
Steam heated stirred tank











Feedback control system: Valve is manipulated to
increase flow of steam to control tank temperature

Closed-loop process: Controller and process are
interconnected




TT
TC
IP
P
s

Condensate
Steam
F
in
,T
in

F,T
IP
LT
LC
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

e.g. Temperature Control Loop







Controller:
software component implements math
hardware component provides calibrated signal for
actuator
Actuator:
physical (with dynamics) process triggered by
controller
directly affects process
Sensor:
monitors some property of system and transmits
signal back to controller








T
in
, F
T e
A C P
M
Controller
Tank
-
+
Valve
Thermocouple
T
R
Closed-loop Processes
Study of process dynamics focused on uncontrolled
or Open-loop processes

Observe process behavior as a result of specific input
signals




In process control, we are concerned with the
dynamic behavior of a controlled or Closed-loop
process








Controller is dynamic system that interacts with the
process and the process hardware to yield a specific
behaviour


G
p

Y(s) U(s)
G
c

G
m

G
p
G
v

+
-
+
+
controller actuator
process
sensor
R(s) Y(s)
D(s)
Closed-Loop Transfer Function
Block Diagram of Closed-Loop Process









G
p
(s) - Process Transfer Function

G
c
(s) - Controller Transfer Function

G
m
(s) - Sensor Transfer Function

G
v
(s) - Actuator Transfer Function






G
c

G
m

G
p
G
v

+
-
+
+
controller actuator
process
sensor
R(s) Y(s)
D(s)
Closed-Loop Transfer Function
For control, we need to identify closed-loop
dynamics due to:
- Setpoint changes Servo
- Disturbances Regulatory

1. Closed-Loop Servo Response
transfer function relating Y(s) and R(s) when
D(s)=0








Isolate Y(s)

| |
| |
Y s G s V s
Y s G s G s U s
Y s G s G s G s E s
Y s G s G s G R s Y s
Y S G s G s G s R s G s Y s
p
p v
p v c
p v c s m
p v c m
( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( )
( )
=
=
=
=
=
Y s
G s G s G s
G s G s G s G s
R s
p v c
p v c m
( )
( ) ( ) ( )
( ) ( ) ( ) ( )
( ) =
+ 1
Closed-Loop Transfer Function
2. Closed-loop Regulatory Response

Transfer Function relating D(s) to Y(s) at
R(s)=0








Isolating Y(s)


| |
| |
Y s D s G s V s
Y s D s G s G s U s
Y s D s G s G s G s E s
Y s D s G s G s G s Y s
Y s D s G s G s G s G s Y s
p
p v
p v c
p v c m
p v c m
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( ) ( )
= +
= +
= +
= +
= +
0
0
Y s
G s G s G s G s
D s
p v c m
( )
( ) ( ) ( ) ( )
( ) =
+
1
1
Closed-loop Transfer Function
2. Regulatory Response with Disturbance
Dynamics




G
d
(s) Disturbance (or load) transfer
function


3. Overall Closed-Loop Transfer Function
Y s
G s
G s G s G s G s
D s
d
p v c m
( )
( )
( ) ( ) ( ) ( )
( ) =
+ 1
Y s
G s G s G s
G s G s G s G s
R s
G s
G s G s G s G s
D s
p v c
p v c m
d
p v c m
( )
( ) ( ) ( )
( ) ( ) ( ) ( )
( )
( )
( ) ( ) ( ) ( )
( )
=
+
+
+
1
1
Regulatory
Servo
PID Controllers
The acronym PID stands for:
P - Proportional
I - Integral
D - 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

PID controller equation:



u t K e t e d
de
dt
u
c
I
D
t
R
( ) ( ) ( ) = + +

(
+
}
1
0
t
, , t
PID Control
PID Control Equation









PID Controller Parameters
K
c
Proportional gain
t
I
Integral Time Constant
t
D
Derivative Time Constant
u
R
Controller Bias

u t K e t e d
de
dt
u
c
I
D
t
R
( ) ( ) ( ) = + +

(
+
}
1
0
t
, , t
Proportional
Action
Integral
Action
Derivative
Action
Controller
Bias
PID Control
PID Controller Transfer Function



or:



Note:

numerator of PID transfer function cancels
second order dynamics
denominator provides integration to remove
possibility of steady-state errors

| |
= ' = + +
|
\

|
.
|
u t u U s K
s
s E s
R c
I
D
( ) ( ) ( ) 1
1
t
t
' = + +
|
\

|
.
|
U s P
I
s
Ds E s ( ) ( )
PID Control
Controller Transfer Function:



or,




Note:

Many variations of this controller exist
Easily implemented in SIMULINK
each mode (or action) of controller is better
studied individually




G s K
s
s
c c
I
D
( ) = + +
|
\

|
.
|
1
1
t
t
G s P
I
s
Ds
c
( ) = + +
|
\

|
.
|
Proportional Feedback
Form:


Transfer function:

or,


Closed-loop form:





u t u K e t
R c
( ) ( ) =
U s K E s
c
' ( ) ( ) =
G s K
c c
( ) =
Y s
G s G s K
G s G s K G s
R s
G s G s K G s
D s
p v c
p v c m
p v c m
( )
( ) ( )
( ) ( ) ( )
( )
( ) ( ) ( )
( )
=
+
+
+
1
1
1
Proportional Feedback
Example:
Given first order process:



for P-only feedback closed-loop dynamics:






G s
K
s
G s G s
p
p
v m
( ) , ( ) , ( ) =
+
= =
t 1
1 1
Y s
K
p
K
c
K
p
K
c
K
p
K
c
s
R s
K
p
K
c
s
K
p
K
c
K
p
K
c
s
D s
( ) ( )
( )
=
+
+
|
\

|
.
|
|
+
+
+
|
\

|
.
|
|
+
+
+
|
\

|
.
|
|
+
1
1
1
1
1
1
1
1
t
t
t
Closed-Loop
Time Constant
Proportional Feedback
Final response:



Note:
for zero offset response we require





Possible to eliminate offset with P-only
feedback (requires infinite controller gain)

Need different control action to eliminate offset
(integral)
lim ( ) , lim ( )
t
y
servo
t
K
p
K
c
K
p
K
c t
y
reg
t
K
p
K
c
=
+

=
+ 1
1
1
lim ( ) , lim ( )
t
servo
t
reg
y t y t

= = 1 0
Tracking Error Disturbance rejection
Proportional Feedback
Servo dynamics of a first order process under
proportional feedback












- increasing controller gain eliminates off-set

0 1 2 3 4 5 6 7 8 9 10
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0.01
0.5
1.0
5.0
10.0
K
c

y
(
t
)
/
K
M

t/t
Proportional Feedback
High-order process
e.g. second order underdamped process












increasing controller gain reduces offset, speeds
response and increases oscillation

0 5 10 15 20 25
0
0.5
1
1.5
5.0
2.5
1.0
0.5
0.01
y
(
t
)
/
K
M

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 closed-
loop 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



Transfer function model
u t K e t e d u
c
I
t
R
( ) ( ) ( ) = +

(
+
}
1
0
t
, ,
' = +
|
\

|
.
|
U s K
s
E s
c
I
( ) ( ) 1
1
t
PI Feedback
Closed-loop response









more complex expression
degree of denominator is increased by one
Y s
G s G s K
s
s
G s G s K
s
s
G s
R s
G s G s K
s
s
G s
D s
p v c
I
I
p v c
I
I
m
p v c
I
I
m
( )
( ) ( )
( ) ( ) ( )
( )
( ) ( ) ( )
( )
=
+ |
\

|
.
|
+
+ |
\

|
.
|
+
+
+ |
\

|
.
|
t
t
t
t
t
t
1
1
1
1
1
1
PI Feedback
Example
PI control of a first order process




Closed-loop response










Note:
offset is removed
closed-loop is second order
G s
K
s
G s G s
p
p
v m
( ) , ( ) , ( ) =
+
= =
t 1
1 1
Y s
s
K K
s
K K
K K
s
R s
K K
s
K K
s
K K
s
K K
K K
s
D s
I
I
c p
c p
c p
I
I
c p
I
c p
I
c p
c p
c p
I
( ) ( )
( )
=
+
|
\

|
.
| +
+ |
\

|
.
| +
+
|
\

|
.
| +
|
\

|
.
|
|
\

|
.
| +
+ |
\

|
.
| +
t
t t
t
t t t
t t
t
1
1
1
1
1
2
2
2
PI Feedback
Example (contd)
effect of integral time constant and controller gain
on closed-loop dynamics

natural period of oscillation



damping coefficient




integral time constant and controller gain can
induce oscillation and change the period of
oscillation
t
t t
cl
I
c p
K K
=

t
t
t =
+ |
\

|
.
|
1
2
1
K
K
K K
K K
p
c I
c p
c p
PI Feedback
Effect of integral time constant on servo
dynamics
0 1 2 3 4 5 6 7 8 9 10
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
y
(
t
)
/
K
M

0.01
0.1
0.5
1.0
K
c
=1
PI Feedback
Effect of controller gain












affects speed of response
increasing gain eliminates offset quicker

0 1 2 3 4 5 6 7 8 9 10
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
y
(
t
)
/
K
M

0.1
0.5
1.0
5.0
10.0
t
I
=1
PI Feedback
Effect of integral action of regulatory
response











reducing integral time constant removes effect
of disturbances
makes behavior more oscillatory
0 1 2 3 4 5 6 7 8 9 10
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
y
(
t
)
/
K
M

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



if error is increasing, decrease control
action
if error is decreasing, decrease control
action

Always implemented in PID form
u t K e t e d
de
dt
u
c
I
D
t
R
( ) ( ) ( ) = + +

(
+
}
1
0
t
, , t
D
K
de
dt
c
D
t
PID Feedback
Transfer Function



Closed-loop Transfer Function








Slightly more complicated than PI form
' = + +
|
\

|
.
|
U s K
s
s E s
c
I
D
( ) ( ) 1
1
t
t
Y s
G s G s K
s s
s
G s G s K
s s
s
G s
R s
G s G s K
s s
s
G s
D s
p v c
D I I
I
p v c
D I I
I
m
p v c
D I I
I
m
( )
( ) ( )
( ) ( ) ( )
( )
( ) ( ) ( )
( )
=
+ +
|
\

|
.
|
|
+
+ +
|
\

|
.
|
|
+
+
+ +
|
\

|
.
|
|
t t t
t
t t t
t
t t t
t
2
2
2
1
1
1
1
1
1
PID Feedback
Example:
PID Control of a first order process




Closed-loop transfer function
G s
K
s
G s G s
p
p
v m
( ) , ( ) , ( ) =
+
= =
t 1
1 1
Y s
s s
K K
s
K K
K K
s
R s
K K
s
K K
s
K K
s
K K
K K
s
D s
D I I
I
c p
D I
c p
c p
I
I
c p
I
c p
I
c p
D I
c p
c p
I
( ) ( )
( )
=
+ +
+
|
\

|
.
|
|
+
+ |
\

|
.
|
|
+
+
|
\

|
.
|
|
+
|
\

|
.
|
|
+
|
\

|
.
|
|
+
+ |
\

|
.
|
|
+
t t t
t t
t t t
t t t
t t
t t t
2
2
2
2
1
1
1
1
1
PID Feedback
Effect of derivative action on servo dynamics
0 1 2 3 4 5 6 7 8 9 10
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
2.0
1.0
0.5
0.1
y
(
t
)
/
K
M

PID Feedback
Effect of derivative action on regulatory
response












increasing derivative action reduces impact of
disturbances on control variable
slows down servo response and affects
oscillation of process

0 1 2 3 4 5 6 7 8 9 10
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
2.0
1.0
0.5
0.1
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





if G
OL
is a rational function then the closed-loop
transfer functions are rational functions and
take the form



and factor as






Y s
G G G
G G G G
Y s
G G G G
D s
c v p
c v p m c v p m
( ) ( ) ( )
*
=
+
+
+ 1
1
1
G
OL

G s
r s
q s
a a s a s
b b s b s
( )
( )
( )
= =
+ + +
+ + +
0 1
0 1


u
u
G s K
s s
s s
a a
( )
( ) ( )
( ) ( )
=
+ +
+ +
t t
t t

u
1
1 1
1 1
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


is







where



Elements of left column must be positive to
have roots with negative real parts
a s a s a s a
n
n
n
n
+ + + + =


1
1
1 0
0
a a a
a a a
b b b
c c
z
n n n
n n n


2 4
1 3 5
1 2 3
1 2
1

1
2
3
4
1

n +
b
a a a a
a
b
a a a a
a
c
b a b a
b
c
b a b a
b
n n n n
n
n n n n
n
n n n n
1
1 2 3
1
2
1 4 5
1
1
1 3 2 1
1
2
1 5 3 1
1
=

=

=

=


, ,
, ,

Example: Routh Array


Characteristic polynomial


Polynomial Coefficients


Routh Array







Closed-loop system is unstable
2 36 149 058 121 042 078 0
5 4 3 2
. . . . . . s s s s s + + + + =
a a a
a a a
b b b
c c
d d
e
5 3 1
4 2 0
1 2 3
1 2
1 2
1
2 36 058 042
149 121 078
250 082 0
072 078
189 0
078
( . ) ( . ) ( . )
( . ) ( . ) ( . )
( . ) ( . ) ( )
( . ) ( . )
( . ) ( )
( . )


a a a a a a
5 4 3 2 1 0
2 36 149 058 121 042 078 = = = = = = . , . , . , . , . , .
Direct Substitution
Technique to find gain value that de-stabilizes the
system.

Observation:
Process becomes unstable when poles appear on
right half plane

Find value of K
c
that yields purely complex
poles

Strategy:
Start with characteristic polynomial


Write characteristic equation:


Substitute for complex pole (s=je)


Solve for K
c
and e


q j K r j
c
( ) ( ) e e + = 0
( )
1 1 + = + K G s G s G s K
r s
q s
c v p m c
( ) ( ) ( )
( )
q s K r s
c
( ) ( ) + = 0
Example: Direct Substitution
Characteristic equation





Substitution for s=je



Real Part Complex Part





System is unstable if


1
1
05 05 0 75
0
05 05 0 75 0
05 05 0 75 0
3 2
3 2
3 2
+
+
+
=
+ + + =
+ + + =
K
s
s s s
s s s K s K
s s K s K
c
c c
c c
. . .
. . .
. ( . ) ( . )
( ) . ( ) ( . ) ( . )
. ( . ) ( . )
j j K j K
j K j K
c c
c c
e e e
e e e
3 2
3 2
05 05 075 0
05 05 075 0
+ + + =
+ + =
+ = 05 075 0
2
. . e K
c
( . ) K
c
= 05 0
3
e e
= + + =
+ =
= =
K
K
c
c
05 075 05 075 05 0
05 025 0
2 2 1
2 2 3
2
. . ( . . . )
. .
/ ,
e e e e
e
e
K
c
> 1
Root Locus Diagram
Old method that consists in plotting poles of
characteristic polynomial as controller gain is
changed

e.g.
s s K s K
c c
3 2
05 05 075 0 + + + = . ( . ) ( . )
-1.5 -1 -0.5 0 0.5 1 1.5
-1.5
-1
-0.5
0
0.5
1
1.5
I
m
a
g
i
n
a
r
y

A
x
i
s
Real Axis
K
c
-0
K
c
-0
1
Stability and Performance
Given plant model, we assume a stable closed-loop
system can be designed

Once stability is achieved - need to consider
performance of closed-loop process - stability is not
enough

All poles of closed-loop transfer function have
negative real parts - can we place these poles to get
a good performance



S: Stabilizing Controllers for a given plant
P: Controllers that meet performance
S
P
C
Space of all
Controllers
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


Isolate G
c




For a desired trajectory (C/R)
d
and plant
model G
pm
, controller is given by



not necessarily PID form
inverse of process model to yield pole-zero
cancellation (often inexact because of process
approximation)
used with care with unstable process or
processes with RHP zeroes




C
R
G G
G G
c p
c p
=
+ 1
G
G
C
R
C
R
c
p
=

|
\

|
.
|
|
1
1
( )
( )
G
G
C
R
C
R
c
pm
d
d
=

|
\

|
.
|
|
1
1
Direct Synthesis
1. Perfect Control


cannot be achieved, requires infinite gain

2. Closed-loop process with finite settling
time


For 1st order G
p
, it leads to PI control
For 2nd order, get PID control

3. Processes with delay u


requires
again, 1st order leads to PI control
2nd order leads to PID control




C
R
d
|
\

|
.
|
= 1
C
R s
d c
|
\

|
.
|
=
+
1
1 t
C
R
e
s
d
s
c
c
|
\

|
.
| =
+
u
t 1
u u
c
>
IMC Controller Tuning
G
pm
G
p
R
-
+
+
-
+
+
D
C
G
c
*
Closed-loop transfer function
C
G G
G G G
R
G G
G G G
D
c p
c p pm
c p
c p pm
=
+
+

+
*
*
*
*
( ) ( ) 1
1
1
In terms of implemented controller, G
c

G
G
G G
c
c
c pm
=

*
*
1
IMC Controller Tuning
1. Process model factored into two parts


where contains dead-time and RHP
zeros, steady-state gain scaled to 1.

2. Controller


where f is the IMC filter



based on pole-zero cancellation
not recommended for open-loop unstable
processes
very similar to direct synthesis


G G G
pm pm pm
=
+
G
pm
+
G
G
f
c
pm
*
=

1
f
s
c
r
=
+
1
1 ( ) t
Example
PID Design using IMC and Direct synthesis
for the process



Process parameters: K=0.3, t=30, u=9

1. IMC Design: K
c
=6.97, t
I
=34.5, t
d
=3.93
Filter


2. Direct Synthesis: K
c
=4.76, t
I
=30
Servo Transfer function


G s
e
s
p
s
( )
.
=
+
9
0 3
30 1
f
s
=
+
1
12 1
C
R
e
s
d
s
|
\

|
.
|
=
+
9
12 1
Example
Result: Servo Response
IMC and direct synthesis give roughly same
results














IMC not as good due to Pade approximation
0 50 100 150 200 250 300
0
5
10
15
20
25
y(t)
t
IMC
Direct
Synthesis
Example
Result: Regulatory response












Direct synthesis rejects disturbance more
rapidly (marginally)
0 50 100 150 200 250 300
15
20
25
30
35
40
y(t)
t
IMC
Direct Synthesis
Tuning Relations
Process reaction curve method:
based on approximation of process using first
order plus delay model











1. Step in U is introduced
2. Observe behavior y
m
(t)
3. Fit a first order plus dead time model


G
p

G
c

G
s

1/s
D(s)
Y(s)
Y
m
(s)
Y
*
(s)
U(s)
Manuel Control
Y s
Ke
s
m
s
( ) =
+
u
t 1
Tuning Relations
Process response











4. Obtain tuning from tuning correlations
Ziegler-Nichols
Cohen-Coon
ISE, IAE or ITAE optimal tuning relations
0 1 2 3 4 5 6 7 8
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
t
KM
u
Ziegler-Nichols Tunings
Controller K
c
T
i
T
d
P-only
) / )( / 1 ( u t
p
K
PI
) / )( / 9 . 0 ( u t
p
K
u 3 . 3
PID
) / )( / 2 . 1 ( u t
p
K
u 0 . 2 u 5 . 0
- Note presence of inverse of process gain in controller
gain
- Introduction of integral action requires reduction in
controller gain
- Increase gain when derivation action is introduced

Example:



PI: K
c
= 10 t
I
=29.97
PID: K
c
= 13.33 t
I
=18
t
I
=4.5


G s
e
s
p
s
( )
.
=
+
9
0 3
30 1

Example
Ziegler-Nichols Tunings: Servo response
0 50 100 150 200 250 300
20
25
30
35
40
45
50
Z-N PI
Z-N PID
Direct Synthesis
y(t)
t
Example
Regulatory Response












Z-N tuning
Oscillatory with considerable overshoot
Tends to be conservative
0 50 100 150 200 250 300
10
15
20
25
30
35
40
Direct Synthesis
Z-N PID
Z-N PI
Cohen-Coon Tuning Relations
Designed to achieve 1/4 decay ratio
fast decrease in amplitude of oscillation







Example:

PI: K
c
=10.27 t
I
=18.54
K
c
=15.64 t
I
=19.75
t
d
=3.10
Controller K
c
T
i
T
d
P-only
] 3 / 1 )[ / )( / 1 ( t u u t +
p
K
PI
] 12 / 9 . 0 )[ / )( / 1 ( t u u t +
p
K
) / ( 20 9
)] / ( 3 30 [
t u
t u u
+
+
PID
]
12
16 3
)[ / )( / 1 (
t
t u
u t
+
p
K
) / ( 8 13
)] / ( 6 32 [
t u
t u u
+
+
) / ( 2 11
4
t u
u
+
Tuning relations
Cohen-coon: Servo











More aggressive/ Higher controller gains
Undesirable response for most cases

0 50 100 150 200 250 300
20
25
30
35
40
45
50
55
C-C PID
C-C PI
Tuning Relations
Cohen-Coon: Regulatory











Highly oscillatory
Very aggressive
0 50 100 150 200 250 300
5
10
15
20
25
30
35
40
C-C PI
C-C PID
y(t)
t
Integral Error Relations
1. Integral of absolute error (IAE)



2. Integral of squared error (ISE)


penalizes large errors
3. Integral of time-weighted absolute error
(ITAE)


penalizes errors that persist

ITAE is most conservative
ITAE is preferred
ISE e t dt =
}

( )
2
0
ITAE t e t dt =
}

( )
0
IAE e t dt =
}

( )
0
ITAE Relations
Choose K
c
, t
I
and t
d
that minimize the ITAE:

For a first order plus dead time model, solve
for:



Design for Load and Setpoint changes yield
different ITAE optimum










c
c
c
ct
c
ct
ITAE
K
ITAE ITAE
c I d
= = = 0 0 0 , ,
Type of
Input
Type of
Controller
Mode A B
Load PI P 0.859 -0.977
I 0.674 -0.680
Load PID P 1.357 -0.947
I 0.842 -0.738
D 0.381 0.995
Set point PI P 0.586 -0.916
I 1.03 -0.165
Set point PID P 0.965 -0.85
I 0.796 -0.1465
D 0.308 0.929
ITAE Relations
From table, we get
Load Settings:


Setpoint Settings:




Example






( ) ( )
Y A KK A B
B
c
I
d
= = = = +
u
t
t
t
u
t
t
t
,
( )
Y A KK
B
c
I
d
= = = =
u
t
t
t
t
t
G
e
s
G
s
s
L
=
+
=

03
30 1
1
9
.
,
ITAE Relations
Example (contd)
Setpoint Settings







Load Settings:

( )
KK
K
K
c
c
= =
= = =

1357 4 2437
4 2437 4 2437
0 3
1415
9
30
0 947
. .
. .
.
.
.
( )
( )
t
t
t
t
t
t
t t
I
I
d
d
= =
= = =
= =
= =

0842 2 0474
2 0474
30
2 0474
14 65
0 381
9
30
01150
01150 34497
9
30
0 738
0 995
. .
. .
.
. .
. .
.
.
( )
KK
K
K
c
c
= =
= = =

0 965 2 6852
2 6852 2 6852
0 3
8 95
9
30
085
. .
. .
.
.
.
( )
( )
t
t
t
t
t
t
t t
I
I
d
d
= =
= = =
= =
= =
0 796 01465 0 7520
0 7520
30
0 7520
39 89
0 308
9
30
01006
01006 30194
9
30
0 929
. . .
. .
.
. .
. .
.
ITAE Relations
Servo Response












design for load changes yields large overshoots
for set-point changes

0 50 100 150 200 250 300
20
25
30
35
40
45
50
55
60
ITAE(Load)
ITAE(Setpoint)
ITAE Relations
Regulatory response












Tuning relations are based G
L
=G
p

Method does not apply to the process
Set-point design has a good performance for
this case
0 50 100 150 200 250 300
0
5
10
15
20
25
30
35
40
ITAE(Setpoint)
ITAE(Load)
Tuning Relations
In all correlations, controller gain should be
inversely proportional to process gain

Controller gain is reduced when derivative action is
introduced

Controller gain is reduced as increases

Integral time constant and derivative constant
should increase as increases

In general,

Ziegler-Nichols and Cohen-Coon tuning relations
yield aggressive control with oscillatory response
(requires detuning)

ITAE provides conservative performance (not
aggressive)

u
t
u
t
t
t
d
I
= 025 .
CHE 446
Process Dynamics and Control
Frequency Response of
Linear Control Systems
First order Process
Response to a sinusoidal input signal













Recall: Sinusoidal input Asin(et) yields
sinusoidal output caharacterized by AR and
|
0 2 4 6 8 10 12 14 16 18 20
-1.5
-1
-0.5
0
0.5
1
1.5
2
AR
|
t/t
| |
{ }
lim ( ) sin( )
t
P
Y s
K A
t


=
+
+
1
2 2
1 t e
e |
First order Processes



10
-2
10
-1
10
0
10
1
10
2
10
-2
10
-1
10
0
A
R
/
K
p

t
p
e
Bode Plots
10
-2
10
-1
10
0
10
1
10
2
-100
-80
-60
-40
-20
0
|

t
p
e
High Frequency
Asymptote
Corner Frequency
AR
K
=
+ 1
2 2
t e
| et =

tan ( )
1
Amplitude Ratio Phase Shift
Second Order Process
Sinusoidal Response









where

Y s
K
s s
A
s
p
( ) =
+ + + t t
e
e
2 2 2 2
2 1
( )
| |
( )
y t
K A
t
p
( ) sin( ) =
+
+
1 2
2
2
2
et t
e |
|
et
et
=

(
(

tan
( )
1
2
2
1
( )
| |
( )
AR
n
=
+
1
1 2
2
2
2
et et
Second Order Processes


Bode Plot
10
-1
10
0
10
1
10
-1
10
0
10
1
10
-1
10
0
10
1
-150
-100
-50
0
=1
=0.1
=1
=0.1
Amplitude reaches
a maximum at
resonance frequency
A
R

|

e
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


Study of transfer function model response to
sinusoidal inputs is called Frequency
Domain Response of linear processes.
Frequency Response
Some facts for complex number theory:

i) For a complex number:









It follows that where


such that
w a bj = +
a w b w = = Re( ), Im( )
Re
Im
w
u
a
b
a w b w = = cos( ), sin( ) u u
w w w = + Re( ) Im( )
2 2
u = =
|
\

|
.
|

arg( ) tan
Im( )
Re( )
w
w
w
1
w we
j
=
u
Frequency Response
Some facts:
ii) Let z=a-bj and w= a+bj then


iii) For a first order process


Let s=je


such that
w z z w = = and arg( ) arg( )
G s
K
s
p
( ) =
+ t 1
G j
K
j
j
j
K K
j
p p p
( )
( )
( )
e
t e
t e
t e
t e
et
t e
=
+

=
+

+
1
1
1
1 1
2 2 2 2
G j
K
AR
G j
p
( ) ( )
arg( ( )) tan ( )(
e
t e
e et
=
+
=
= =

1
2 2
1
Phase Lag)
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(ie).

The Phase Shift is given by the argument of
the transfer function model in the
frequency domain.
i.e.
AR G j G j G j
G j
G j
= = +
= =
|
\

|
.
|

( ) Re( ( )) Im( ( ))
tan
Im( ( ))
Re( ( ))
e e e

e
e
2 2
1
Phase Angle
Frequency Response
For a general transfer function




Frequency Response summarized by



where is the modulus of G(je) and
is the argument of G(je)

Note: Substitute for s=je in the transfer
function.



G s
r s
q s
e s z s z
s p s p
s
m
n
( )
( )
( )
( ) ( )
( ) ( )
= =


u
1
1

G j G j e
j
( ) ( ) e e

=
G j ( ) e
Frequency Response
The facts:

For any linear process we can calculate the
amplitude ratio and phase shift by:

i) Letting s=je in the transfer functionG(s)

ii) G(je) is a complex number. Its modulus is the
amplitude ratio of the process and its argument
is the phase shift.

iii) As e, the frequency, is varied that G(je) gives
a trace (or a curve) in the complex plane.

iv) The effect of the frequency, e, on the process
is the frequency response of the process.
Frequency Response
Examples:

1. Pure Capacitive Process G(s)=1/s






2. Dead Time G(s)=e
-us

G j
K
j
j
j
K
j ( ) e
e
e
e e
=

|
\

|
.
|
=
AR
K K
= =

|
\

|
.
|
=

e
|
e t
, tan
/
1
0 2
G j e
j
( ) e
eu
=

AR = = 1, | eu
Frequency Response
Examples:

3. n process in series



Frequency response of G(s)



therefore
G s G s G s
n
( ) ( ) ( ) =
1

G j G j G j
G j e G j e
n
j
n
j
n
( ) ( ) ( )
( ) ( )
e e e
e e
| |
=
=
1
1
1

AR G j G j
G j G j
i
i
n
i
i
n
i
i
n
= =
[
= = =

=
= =
( ) ( )
arg( ( )) arg( ( ))
e e
| e e |
1
1 1
Frequency Response
Examples.

4. n first order processes in series







5. First order plus delay
G s
K
s
K
s
n
n
( ) =
+ +
1
1
1 1 t t

( ) ( )
AR
K K
n
n
n
=
+ +
=

1
1
2 2 2 2
1
1
1
1 1 t e t e
| et et

tan tan
G s
K e
s
p
s
( ) =
+
u
t 1
AR
K
p
=
+
=

( )
, tan ( )
1
1
2 2
1
t e
| et ue
Frequency Response
To study frequency response, we use two
types of graphical representations

1. The Bode Plot:
Plot of AR vs. e on loglog scale
Plot of | vs. e on semilog scale

2. The Nyquist Plot:
Plot of the trace of G(je) in the
complex plane

Plots lead to effective stability criteria and
frequency-based design methods
Bode Plot
AR
K
= =
e

t
2
10
-2
10
-1
10
0
10
0
10
1
10
2
A
R
10
-2
10
-1
10
0
-91
-90.5
-90
-89.5
-89
Frequency (rad/sec)
P
h
a
s
e

A
n
g
l
e
Pure Capacitive Process
Bode Plot
G s G s G s G s ( ) ( ) ( ) ( ) =
1 2 3
G s
s
G s
s
G s
s
1 2 3
1
10 1
1
5 1
1
1
( ) , ( ) , ( ) =
+
=
+
=
+
G j ( )
( )( )( )
tan ( ) tan ( ) tan ( )
e
e e e
e e e
=
+ + +
=

1
1 10 1 5 1 1
10 5
2 2 2 2 2 2
1 1 1
10
-4
10
-3
10
-2
10
-1
10
0
10
1
10
-4
10
-2
10
0
10
-4
10
-3
10
-2
10
-1
10
0
10
1
-300
-200
-100
0
G
1

G
2

G
3

G
Bode Plot




Example: Effect of dead-time
G s e
s
( ) =
u
G j ( ) , e ue = = 1
G s e G s G s G s
d
s
( ) ( ) ( ) ( ) =
2
1 2 3
10
-4
10
-3
10
-2
10
-1
10
0
10
1
10
-4
10
-2
10
0
10
-4
10
-3
10
-2
10
-1
10
0
10
1
-300
-200
-100
0
G=G
d

G G
d

Nyquist Plot
Plot of G(je) in the complex plane as e is
varied

Relation to Bode plot

AR is distance of G(je) for the origin
Phase angle, , is the angle from the Real
positive axis

Example First order process (K=1, t=1)




G j ( ) e
Nyquist Plot
Dead-time







Second Order
e
> 1
< 1
Nyquist Plot
Third Order








Effect of dead-time (second order process)
G s
s s
G
d
s e
s
( ) , ( ) =
+ +
=

1
2
3 1
2
G s
s s s
( ) =
+ + +
1
3 3 1
3 2
Che 446: Process Dynamics and
Control
Frequency Domain
Controller Design
PI Controller
AR K
c
I
I
= +
=

1
1
1
2 2
1
e t
et tan ( / )
10
-3
10
-2
10
-1
10
0
10
1
10
0
10
1
10
2
10
3
10
-3
10
-2
10
-1
10
0
10
1
-100
-80
-60
-40
-20
0
AR

e
PID Controller
AR K
c D
I
D
I
=
|
\

|
.
|
+
=
|
\

|
.
|

et
et
et
et
1
1
1
2
1
tan
10
-3
10
-2
10
-1
10
0
10
1
10
0
10
1
10
2
10
3
10
-3
10
-2
10
-1
10
0
10
1
-100
-50
0
50
100
AR

e
Bode Stability Criterion
Consider open-loop control system









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

Q: What happens if AR>1?
G
p

G
c

G
s

D(s)
Y(s)
Y
m
(s)
R(s)
U(s)
Open-loop Response to R(s)
+
-
+
+
Bode Stability Criterion

A closed-loop system is unstable if the
frequency of the response of the open-loop
G
OL
has an amplitude ratio greater than
one at the critical frequency. Otherwise it
is stable.

Strategy:

1. Solve for e in


2. Calculate AR

arg( ( )) G j
OL
e t =
AR G j
OL
= ( ) e
Bode Stability Criterion
To check for stability:

1. Compute open-loop transfer function
2. Solve for e in |=-t
3. Evaluate AR at e
4. If AR>1 then process is unstable

Find ultimate gain:

1. Compute open-loop transfer function
without controller gain
2. Solve for e in |=-t
3. Evaluate AR at e
4. Let
K
AR
cu
=
1
Bode Criterion
Consider the transfer function and controller



- Open-loop transfer function



- Amplitude ratio and phase shift





- At e=1.4128, |=-t, AR=6.746

G s
e
s s
s
( )
( )( . )
.
=
+ +

5
1 05 1
01
G s
s
c
( ) .
.
= +
|
\

|
.
|
04 1
1
01
G s
e
s s s
OL
s
( )
( )( . )
.
.
.
=
+ +
+
|
\

|
.
|

5
1 05 1
04 1
1
01
01
AR =
+ +
+
=
|
\

|
.
|

5
1
1
1 025
04 1
1
0 01
01 05
1
01
2 2
2
1 1 1
e e
e
| e e e
e
.
.
.
. tan ( ) tan ( . ) tan
.
Ziegler-Nichols Tuning
Closed-loop tuning relation

With P-only, vary controller gain until system
(initially stable) starts to oscillate.
Frequency of oscillation is e
c
,

Ultimate gain, K
u
, is 1/M where M is the
amplitude of the open-loop system
Ultimate Period



Ziegler-Nichols Tunings

P K
u
/2
PI K
u
/2.2 P
u
/1.2
PID K
u
/1.7 P
u
/2 P
u
/8






P
u
c
=
2t
e
Nyquist Stability Criterion

If N is the number of times that the
Nyquist plot encircles the point (-1,0) in
the complex plane in the clockwise
direction, and P is the number of open-
loop poles of G
OL
that lie in the right-half
plane, then Z=N+P is the number of
unstable roots of the closed-loop
characteristic equation.

Strategy

1. Substitute s=je in G
OL
(s)
2. Plot G
OL
(je) in the complex plane
3. Count encirclements of (-1,0) in the
clockwise direction
Nyquist Criterion
Consider the transfer function



and the PI controller

G s
e
s s
s
( )
( )( . )
.
=
+ +

5
1 05 1
01
G s
s
c
( ) .
.
= +
|
\

|
.
|
04 1
1
01
Stability Considerations
Control is about stability

Considered exponential stability of
controlled processes using:
Routh criterion
Direct Substitution
Root Locus
Bode Criterion (Restriction on phse angle)
Nyquist Criterion

Nyquist is most general but sometimes
difficult to interpret

Roots, Bode and Nyquist all in MATLAB

MAPLE is recommended for some
applications.



Polynomial
(no dead-time)
CHE 446
Process Dynamics and
Control
Advanced Control Techniques:
1. Feedforward Control
Feedforward Control
Feedback control systems have the general
form:








where U
R
(s) is an input bias term.

Feedback controllers
output of process must change before any action
is taken
disturbances only compensated after they affect
the process

G
p
G
c

G
s

Y(s)
Y
m
(s)
R(s)
U(s)
+
+
+
G
D

G
v

+
+
D(s)
U
R
(s)
Feedforward Control
Assume that D(s)
can be measured before it affects the process
effect of disturbance on process can be
described with a model G
D
(s)
Feedforward Control is possible.









Feedback/Feedforward Controller
Structure

G
p
G
c

G
s

Y(s)
Y
m
(s)
R(s)
U(s)
+
+
+
G
D

G
v

G
f

+
+
D(s)
Feedforward
Controller
Feedforward Control
Heated Stirred Tank












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?
TT
TC1
P
s

Condensate
Steam
F,T
in

F,T
TT
Feedforward Control
A suggestion:














How do we design TC2?
TT
TC1
P
s

Condensate
Steam
F,T
in

F,T
TC2
+
+
TT
Feedforward Control
The feedforward controller:






Transfer Function




Tracking of Y
R
requires that





G
p

Y(s)
U(s)
+
+
G
D

G
v

G
f

+
+
D(s)
U
R
(s)
Y s G s D s G s G s U s
Y s G s D s G s G s U s G s D s
Y s G s G s G s G s D s G s G s U s
Y s G s G s G s G s D s Y s
D P v
D P v R f
D p v f p v R
D p v f R
( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( )( ( ) ( ) ( ))
( ) ( ( ) ( ) ( ) ( )) ( ) ( ) ( ) ( )
( ) ( ( ) ( ) ( ) ( )) ( ) ( )
= +
= + +
= + +
= + +
G s G s G s G s
G s
G s
G s G s
D p v f
f
D
p v
( ) ( ) ( ) ( )
( )
( )
( ) ( )
+ =
=
0
Feedforward Control
Ideal feedforward controller:



Exact cancellation requires perfect plant and
perfect disturbance models.




Feedforward controllers:
very sensitive to modeling errors
cannot handle unmeasured disturbances
cannot implement setpoint changes

Need feedback control to make control system
more robust

G s
G s
G s G s
f
D
p v
( )
( )
( ) ( )
=
G s G s G s G s
D p v f
( ) ( ) ( ) ( ) + = 0
Feedforward Control
G
p
G
c

G
s

Y(s)
Y
m
(s)
R(s)
U(s)
+
+
+
G
D

G
v

G
f

+
+
D(s)
What is the impact of G
f
on the closed-loop
performance of the feedback control system?
Feedback/Feedforward Control
Feedforward Control
Regulatory transfer function of
feedforward/feedback loop



Perfect control requires that (as above)



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)

C s
D s
G s G s G s G s
G s G s G s G s
D f v p
c v p m
( )
( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
=
+
+ 1
G s
G s
G s G s
f
D
v p
( )
( )
( ) ( )
=
G s K
s
s
f f
( )
( )
( )
=
+
+
t
t
1
2
1
1
G s
K
K K
f
D
v p
( ) =
Feedforward Control
Tuning: In absence of disturbance model
lead-lag approximation may be good



K
f
obtained from open-loop data



t
1
and t
2

from open-loop data


from heuristics


Trial-and-error








G s K
s
s
f f
( )
( )
( )
=
+
+
t
t
1
2
1
1
K
K
K K
f
D
v p
=
t t t t
1 2
= =
p D
,
t
t
t
t
1
2
1
2
05 2 0 = = . .
t t
1 2
= c
Feedforward Control
Example:

Plant:




Plant Model:



Feedback Design from plant model: IMC PID
tunings




G s
s s s
G s
s s
p
D
( )
( )( )( )
( )
( . )( )
=
+ + +
=
+ +
10
10 1 5 1 1
1
2 5 1 1
G s
e
s
G s
e
s
pm
s
Dm
s
( ) ( )
.
=
+
=
+

10
10 1 25 1
6
K
c I D
= = = 026 13 2 31 . , , . t t
Feedforward Control
Possible Feedforward controllers:

1. From plant models:


Not realizable

2. Lead-lag unit



3. Feedforward gain controller:


G s
e s
s
f
s
( )
( )
( . )
=
+
+
5
10
10 1
25 1
t t
1 2
10 25
1
10
= =
=
, .
K
f
K
f
=
1
10
Feedforward Control
For Controller 2 and 3












Some attenuation observed at first peak
Difficult problem because disturbance dynamic
are much faster
0 20 40 60 80 100 120 140 160 180 200
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
1.2
Disturbance Controller with Feedforward
.. - Gain Controller
-- - Lead-Lag Controller
- - No FF Controller
Feedforward Control
Useful in manufacturing environments if
good models are available
outdoor temperature dependencies can be
handle by gain feedforward controllers
scheduling issues/ supply requirements can be
handled

Benefits are directly related to model
accuracy
rely mainly on feedback control

Disturbances with different dynamics
always difficult to attenuate with PID
may need advanced feedback control approach
(MPC, DMC, QDMC, H
4
-controllers, etc)

Use process knowledge (and intuition)
CHE 446:
Process Dynamics and
Control
Advanced Control Techniques
2. Cascade Control
Cascade Control
Jacketed Reactor:











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
TT
TC1
P
s

Condensate
Steam
F,T
in

F,T
TT
FT
Cascade Control
Consider cascade control structure:











Note:
TC1 calculates setpoint cascaded to the flow
controller
Flow controller attenuates the effect of steam
flow disturbances
TT
TC1
P
s

Condensate
Steam
F,T
in

F,T
TT
FT
FC
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
Cascade Control
B
l
o
c
k

D
i
a
g
r
a
m


G
c
2

G
p
1

G
p
2

G
v
2

G
m
2

G
m
1

G
c
1

D
1

D
2

-

-

+

+

+

+


Cascade Control
Closed-loop transfer function

1. Inner loop



2. Outer loop



Characteristic equation
C
R
G G G
G G G G
G
p v c
p v c m
cl
2
2
2 2 2
2 2 2 2
2
1
=
+
=
C
R
G G G
G G G G
p cl c
p cl c m
1
1
1 2 1
1 2 1 1
1
=
+
1 0
1
1
0
1 0
1 2 1 1
1
2 2 2
2 2 2 2
1 1
2 2 2 2 1 2 2 2 1 1
+ =
+
+
=
+ + =
G G G G
G
G G G
G G G G
G G
G G G G G G G G G G
p cl c m
p
p v c
p v c m
c m
p v c m p p v c c m
Cascade Control
1 0
2 2 2 2 1 2 2 2 1 1
+ + = G G G G G G G G G G
p v c m p p v c c m
Stability of closed-loop process is governed by


Example
G
K
s
G K G G
G
K
s
G K G
p
p
c c v m
p
p
c c m
1
1
1
1 1 1 1
2
2
2
2 2 2
1
1
1
1
=
+
= = =
=
+
= =
t
t
, ,
, ,
1
1 1 1
0
2
2
2
1
2
2
1
1
+
+
+
+ +
= K
K
s
K
K
s
K
s
c
p
c
p p
t t t
( )( ) ( ) t t t
1 2 2 2 1 1 2 1
1 1 1 0 s s K K s K K K
c p c p p
+ + + + + =
t t t t t
1 2
2
1 2 2 2 1 2 2
1 2 1
1
0
s K K s K K
K K K
c p c p
c p p
+ + + + + +
=
( )
Cascade Control
Design a cascade controller for the following
system:

1. Primary:




2. Secondary:

G s
e
s s
G
G Kc
s
p
s
m
c
I
1
01
1
1 1
05 1 1
1
1
1
( )
( . )( )
, ,
.
=
+ +
=
= +
|
\

|
.
|

t
G
s
G G
G K
p v m
c c
2 2 2
2 2
1
01 1
1 =
+
= =
=
.
,
Cascade Control
1. PI controller only










Critical frequency


Maximum gain

G K
s s
e
s s
OL c
s
1 1
01
1
1 1
01 1 05 1 1
= +
|
\

|
.
|
+ + +

. ( . )( )
.
AR K
c
= +
+ + +
1
2
2 2 2
1
1 1
001 1
1
025 1
1
1
e
e e e . .

e
e
e e e
=
|
\

|
.
|




tan tan ( . )
tan ( . ) tan ( ) .
1 1
1 1
1
01
05 01
e
c
AR = = 2 99 0178 . , .
K
c1
561 = .
AR

Bode Plots
Cascade Control

ln(e)
Cascade Control
2. Cascade Control

Secondary loop



no critical frequency gain can be large
Let K
c2
=10.


Primary loop

G K
s
Ol c 2 2
1
01 1
=
+ .
G K
s
s
s
e
s s
K
e
s s s
OL c
s
c
s
1 1
01
1
01
1
1
10
01 1
1 10
1
01 1
05 1 1
10
11
05 1
01
11
1
= +
|
\

|
.
|
+
+
+
+ +
=
+ +

.
.
( . )( )
( . )(
.
)
.
.
Cascade Control
Closed-loop stability:







Bode


Maximum gain K
c1
=10.44
Secondary loop stabilizes the primary loop.
e
c
AR = = 413 00958 . , .
AR
K
c1
2
2
2
1 1
10
11
1 1
1
01
11
1
1 025
2
01
01
11
05
=
+
|
\

|
.
|
+
=
|
\

|
.
|


e
e
e
|
t
e e e
.
.
. tan
.
tan ( . )
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
Advanced Control Techniques
3. Dead-time Compensation
Dead-time Compensation
Consider feedback loop:









Dead-time has a de-stabilizing effect on closed-
loop system
Presence of dead-time requires detuning of
controller
Need a way to compensate for dead-time
explicitly
G
c
G
p
e
-us

R
C
D
Dead-time Compensation
Motivation

G s
e
s s
G s
s
s
c
( ) , . .
( )
=
+ +
s s
= +
|
\

|
.
|
u
u
2
3 2
01 075
4 1
1
0.1 0.75 0.5 0.25
Dead-time Compensation
Use plant model to predict deviation from
setpoint








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
G
c
G
p
e
-us

R
C
D
G
pm

Dead-time Compensation
Closed-loop transfer function




Characteristic Equation becomes



Effect of dead-time on closed-loop
stability is removed
Controller is tuned to stabilize
undelayed process model
No disturbance rejection
C s
D s
C s
R s
G G e
G G
c p
s
c pm
( )
( )
,
( )
( )
= =
+

1
1
u
1 0 + = G G
c pm
Dead-time Compensation
0 1 2 3 4 5 6 7 8 9 10
0
0.5
1
1.5
Servo Response
0 1 2 3 4 5 6 7 8 9 10
0
0.2
0.4
0.6
0.8
1
Regulatory Response
e
-0.5s

R C
4 1
1
+
|
\

|
.
|
s
1
3 2
2
s s + +
1
3 2
2
s s + +
D
Dead-time Compensation
Include effect of disturbances using model
predictions



Adding this to previous loop gives

( ) ( )

( )

( ) ( ) ( )

D s Y s Y s
D s G e U s G e U s
p
s
pm
s
=
=
u u
G
c
G
p
e
-us

R
C
D
G
pm

G
pm
e
-us

+
+
+
-
+
+
+
-
Dead-time Compensation
Closed-loop transfer function






Characteristic Equation




Effect of dead-time on stability is
removed
Disturbance rejection is achieved
Controller tuned for undelayed
dynamics

C s
D s
e e G G
G G G G e G e
C s
R s
G G e
G G G G e G e
s s
c pm
c pm c p
s
pm
s
c p
s
c pm c p
s
pm
s
( )
( )
( )
( )
( )
( )
( )

=
+
+ +
=
+ +


1
1
1
u u
u u
u
u u
1 0 + + =

G G G G e G e
c pm c p
s
pm
s
( )

u u
Fast
Dynamics
Slow
Dynamics
Dead-time Compensation
e
-0.5s

R C
4 1
1
+
|
\

|
.
|
s
1
3 2
2
s s + +
1
3 2
2
s s + +
D
e
-0.5s

1
3 2
2
s s + +
+
+
+
-

( ) D s
+
+
+
-
0 1 2 3 4 5 6 7 8 9 10
0
0.5
1
1.5
Servo Response
0 1 2 3 4 5 6 7 8 9 10
-0.5
0
0.5
1
Regulatory Response
Dead-time Compensation
Alternative form









Reduces to classical feedback control system
with



called a Smith-Predictor
G
c
G
p
e
-us

R
C
D
G
pm
(1-e
-us
)
+
+
+
+
+
-
G s
G s
G e
c
c
pm
s
m
*
( )
( )
( )
=
+

1 1
u
Dead-time compensation
Smith-Predictor Design

1. Determine delayed process model


2. Tune controller G
c
for the undelayed
transfer function model G
pm


3. Implement Smith-Predictor as



4. Perform simulation studies to tune
controller and estimate closed-loop
performance over a range of modeling
errors (G
pm
and u
m
)

( ) ( ) Y s G s e
pm
s
m
=
u
G s
G s
G e
c
c
pm
s
m
*
( )
( )
( )
=
+

1 1
u
Dead-time Compensation
Effect of dead-time estimation errors:

e
-0.5s

R C
4 1
1
+
|
\

|
.
|
s
1
3 2
2
s s + +
1
3 2
2
s s + +
D
e
-ts

1
3 2
2
s s + +
+
+
+
-

( ) D s
+
+
+
-
t

You might also like