You are on page 1of 45

Process Control: Designing Process

and Control Systems for Dynamic

Performance
Chapter 4. Modelling and Analysis for
Process Control

material at non-profit educational institutions

CHAPTER 4 : MODELLING &

ANALYSIS FOR PROCESS CONTROL
When I complete this chapter, I want to be
able to do the following.

Analytically solve linear dynamic models

of first and second order
Express dynamic models as transfer
functions
Predict important features of dynamic
behavior from model without solving

CHAPTER 4 : MODELLING &

ANALYSIS FOR PROCESS CONTROL
Outline of the lesson.

Laplace transform
Solve linear dynamic models
Transfer function model structure
Qualitative features directly from model
Frequency response
Workshop

WHY WE NEED MORE DYNAMIC MODELLING

I can model this;
what more do
I need?

I would like to
model elements
individually
combine as needed
determine key
dynamic features
w/o solving

T
A

T
A

WHY WE NEED MORE DYNAMIC MODELLING

I would like to
model elements
individually
This will be a
transfer function

Now, I can combine

elements to model
many process
structures

T
A

WHY WE NEED MORE DYNAMIC MODELLING

Now, I can combine
elements to model
many process
structures

Even more amazing,

I can combine to
derive a simplified
model!

THE FIRST STEP: LAPLACE TRANSFORM

st

L( f (t )) f ( s ) f (t )e dt
0

Constant : L(C ) Ce
0

st

C st
dt e
s

t
t 0

f(t)=0
t=0

THE FIRST STEP: LAPLACE TRANSFORM

We have seen
this term
often! Its the
step response to
a first order
dynamic system.

st

L( f (t )) f ( s ) f (t )e dt
0

1
e (1/ s )t dt
e (1/ s )t
s 1/

L((1 e t / )) (1 e t / )e st dt e st dt e t / e st dt
1/ s

1
1
1

s s 1 / s s 1 s( s 1)

1
s 1/

Lets learn a new
dynamic response
& its Laplace
Transform

Lets consider plug flow through a pipe. Plug flow has no

backmixing; we can think of this a a hockey puck
traveling in a pipe.

What is the dynamic response of the outlet fluid property

(e.g., concentration) to a step change in the inlet fluid
property?

THE FIRST STEP: LAPLACE TRANSFORM

Lets learn a new
dynamic response
& its Laplace
Transform
What is the value of
plug flow?

Xout

Xin

time

dynamic response
& its Laplace
Transform
Is this a

0.5

What is the
value?

-0.5
0

5
time

10

5
time

10

0.5

-0.5
0

Lets learn a new
dynamic response
& its Laplace
Transform
Our plants have
pipes. We will
use this a lot!

The dynamic model for dead time is

X out (t ) X in (t )
The Laplace transform for a variable after dead time is

L( X out (t )) L( X in (t )) e

X in ( s )

THE FIRST STEP: LAPLACE TRANSFORM

I am in desperate
need of examples!

We need the Laplace transform of

derivatives for solving dynamic models.

constant

df (t )
L
sf (s ) f (t ) t 0

dt

First
derivative:
General:

d n f (t )

dt n

constant

s f (s ) s

n 1

f (t ) t 0 s

n 1 df ( t )

dt

....
t 0

d n 1f (t )

dt n 1

t 0

SOLVING MODELS USING THE LAPLACE

TRANSFORM
Textbook Example 3.1: The CSTR (or mixing tank)
experiences a step in feed composition with all other
variables are constant. Determine the dynamic response.

dC' A
V
F(C' A0 C' A ) VkC' A
dt
dC A'
V
F
'
'

C A KC A0 with
and K
dt
F kV
F kV
I hope we get the same
integrating factor!

F
CA0

CA

A B
rA kC A

SOLVING MODELS USING THE LAPLACE

TRANSFORM
Textbook Example 3.2Two isothermal CSTRs are initially
at steady state and experience a step change to the feed
composition to the first tank. Formulate the model for
CA2.
dC' A1
F(C' A0 C' A1 ) V1k1C' A1
dt
dC' A2
V2
F(C' A1 C' A2 ) V2 k 2 C' A2
dt
V1

Much easier than

integrating factor!

F
CA0

dC A' 1
1
C A' 1 K1C A' 0
dt
dC A' 2
2
C A' 2 K 2C A' 1
dt

CA1

V1
CA2

V2

A B
rA kC A

SOLVING MODELS USING THE LAPLACE

TRANSFORM
Textbook Example 3.5: The feed composition experiences a
step. All other variables are constant. Determine the
dynamic response of CA.
Non-linear!
F
CA0

A B
rA

2
kC A

CA

TRANSFER FUNCTIONS: MODELS VALID FOR

ANY INPUT FUNCTION
Lets rearrange the Laplace transform of a dynamic model
Y(s) = G(s) X(s)

X(s)

G(s)

Y(s)

A TRANSFER FUNCTION is the output variable, Y(s),

divided by the input variable, X(s), with all initial
conditions zero.
G(s) = Y(s)/X(s)

TRANSFER FUNCTIONS: MODELS VALID FOR

ANY INPUT FUNCTION
G(s) = Y(s)/ X(s)

X(s)

How do we achieve zero initial

conditions for every model?
We dont have primes on the
variables; why?
Is this restricted to a step input?
How many inputs and outputs?

G(s)

Y(s)

TRANSFER FUNCTIONS: MODELS VALID FOR

ANY INPUT FUNCTION
G(s) = Y(s)/ X(s)

X(s)

Some examples:

C A (s)
Mixing tank :
G( s ) ?
C A0 ( s )
C A2 ( s )
Two CSTRs :
G( s ) ?
C A0 ( s )

G(s)

Y(s)

TRANSFER FUNCTIONS: MODELS VALID FOR

ANY INPUT FUNCTION
G(s) = Y(s)/ X(s)

X(s)

G(s)

Y(s)

Why are we doing this?

To torture students.
We have individual models that we can
combine easily - algebraically.
We can determine lots of information
about the system without solving the
dynamic model.

I chose the

TRANSFER FUNCTIONS: MODELS VALID FOR

ANY INPUT FUNCTION
Lets see how to
combine models

3
F0 ( s )
m
/s
Gvalve ( s )
.10
% open
v( s)

T ( s)
G tank1 ( s ) 1

F0 ( s )

1.2 K

m 3 /s
250 s 1

Tmeasured ( s )
Gsensor ( s )
T2 ( s )

Gtank2 ( s )

T2 ( s ) 1.0 K / K

T1 ( s )
300 s 1

1 .0 K / K
10 s 1

(Time in seconds)

TRANSFER FUNCTIONS: MODELS VALID FOR

ANY INPUT FUNCTION
The BLOCK DIAGRAM
v(s)

F0(s)

Gvalve(s)

T1(s)

Gtank1(s)

T2(s)

Gtank2(s)

Its a picture of the model equations!

Individual models can be replaced easily
Cause-effect by arrows

Tmeas(s)

Gsensor(s)

TRANSFER FUNCTIONS: MODELS VALID FOR

ANY INPUT FUNCTION
Combine using BLOCK DIAGRAM ALGEBRA
v(s)

F0(s)

Gvalve(s)

T1(s)

T2(s)

Gtank1(s)

v(s)

Gtank2(s)

G(s)

Tmeas(s)

Gsensor(s)

Tmeas(s)

T1 ( s ) F0 ( s )

F0 ( s ) v( s )
Gs ( s )GT 2 ( s )GT 1 ( s )Gv ( s )

Tmeas ( s )
Tmeas ( s )
G( s )

v( s )
T2 ( s )

T2 ( s )

T1 ( s )

TRANSFER FUNCTIONS: MODELS VALID FOR

ANY INPUT FUNCTION
Key rules for BLOCK DIAGRAM ALGEBRA

QUALITATIVE FEATURES W/O SOLVING

FINAL VALUE THEOREM: Evaluate the final valve of the
output of a dynamic model without solving for the entire
transient response.

Y (t ) t lim sY(s)
s

Example for first order system

C A (t ) |t lim s
s 0

C A0 K p
s( s 1)

C A0 K p

can we determine
without solving?

We can use partial fraction

expansion to prove the following
key result.

Y(s) = G(s)X(s) = [N(s)/D(s)]X(s) = C1/(s- 1) + C2/(s- 2) + ...

With i the solution to the denominator of the transfer
function being zero, D(s) = 0.
1t

Y (t ) A0 A1e

2t

A2 e

qt

Real, distinct i

pt

Complex i
q is Re( i)

...
Real, repeated i

QUALITATIVE FEATURES W/O SOLVING

With i the solutions to D(s) = 0, which is a polynomial.
1t

Y (t ) A0 A1e

2t

A2 e

pt

qt

...

1. If all i are ???, Y(t) is stable

If any one i is ???, Y(t) is unstable
2. If all i are ???, Y(t) is overdamped
(does not oscillate)
If one pair of i are ???, Y(t) is
underdamped

Complete statements
based on equation.

QUALITATIVE FEATURES W/O SOLVING

With i the solutions to D(s) = 0, which is a polynomial.
1t

Y (t ) A0 A1e

2t

A2 e

pt

qt

...

1. If all real [ i] are < 0, Y(t) is stable

If any one real [ i] is 0, Y(t) is unstable
2. If all i are real, Y(t) is overdamped (does not
oscillate)
If one pair of i are complex, Y(t) is underdamped

1

dC A' 1

dt
dC A' 2
2
C A' 2 K 2C A' 1
dt

A B
rA kC A

F
CA0

CA1

V1
CA2

V2

1. Is this system stable?

2. Is this system over- or underdamped?

Without
solving!

3. What is the order of the system?

(Order = the number of derivatives
between the input and output variables)
4. What is the steady-state gain?
(Well solve this in class.)

QUALITATIVE FEATURES W/O SOLVING

FREQUENCY RESPONSE:The response to a sine input of
the output variable is of great practical importance. Why?

Sine inputs almost never occur. However, many

periodic disturbances occur and other inputs can be
represented by a combination of sines.
For a process without control, we want a sine input to
have a small effect on the output.

QUALITATIVE FEATURES W/O SOLVING

Amplitude ratio = |Y(t)| max / |X(t)| max
Phase angle = phase difference between
input and output
P

output

Y, outlet from system

0.4
0.2

0
-0.2
-0.4

X, inlet to system

3
time

3
time

input

0.5
0
-0.5
-1

QUALITATIVE FEATURES W/O SOLVING

Amplitude ratio = |Y(t)| max / |X(t)| max
Phase angle = phase difference between
input and output
For linear systems, we can evaluate directly using transfer function!
Set s = j, with = frequency and j = complex variable.

Im(G ( j ))

Re(G ( j ))

These calculations are tedious by hand but easily performed in

standard programming languages.

QUALITATIVE FEATURES W/O SOLVING

Example 4.15 Frequency response of mixing tank.
Time-domain
behavior.

Bode Plot - Shows

frequency response for
a range of frequencies
Log (AR) vs log()
Phase angle vs log()

CA2

F
CA0

CA1

Sine disturbance with

V1
CA2

V2

Must have
fluctuations

amplitude = 1 mol/m3

Using equations for the frequency response amplitude ratio

Kp
| C A2 |
| G ( j ) |
| C A0 |
(1 2 2 )
| C A 2 || C A0 |

Kp
(1 2 2 )

Not acceptable. We need

to reduce the variability.
control?

OVERVIEW OF ANALYSIS METHODS

Transfer function and block diagram
We can determine
individual models
and combine

1. System order
2. Final Value
3. Stability
4. Damping
5. Frequency response

We can determine
these features without
solving for the
entire transient!!

Flowchart of Modeling Method

Goal:

Assumptions:

Data:

Combining Chapters 3
and 4

Variable(s): related to goals

System : volume within which variables are indepen dent of position
Fundam ental Ba lance: e.g. material, energy

DOF = 0

Is model linear?
Yes

Check
D.O.F.

No

DOF 0

Anothe r equa tion:

-Fundament al balance
-Constitutive equations

Express in deviation var iables

Group param eter s to evalua te [ga ins (K), time-constants (), dead-times()]
Take Laplace transform
Substitute specific input, e.g.,
step, and solve for output

(ste p)

- causality
- order
- stability
- damping

Combine severa l m odels into

integrated system

We can use a
standard modelling
procedure to
focus our
creativity!

Example 3.6 The tank with a drain has a continuous flow in

and out. It has achieved initial steady state when a step
decrease occurs to the flow in. Determine the level as a
function of time.

CHAPTER 4: MODELLING & ANALYSIS WORKSHOP 2

T
A

1. System order
2. Final Value
3. Stability
4. Damping
5. Frequency response

The dynamic model for a nonisothermal CSTR is derived in

Appendix C. A specific example
has the following transfer
function.

T (s)
( 6.07 s 45.83)
2
Fc ( s ) ( s 1.79 s 35.80)
Determine the features
in the table for this
system.

CHAPTER 4: MODELLING & ANALYSIS WORKSHOP 3

Answer the following using the MATLAB program
S_LOOP.
Using the transfer function derived in Example 4.9,
determine the frequency response for CA0 CA2. Check one
point on the plot by hand calculation.

F
CA0

CA1

V1
CA2

V2

CHAPTER 4: MODELLING & ANALYSIS WORKSHOP 4

We often measure pressure for process monitoring and control.
Explain three principles for pressure sensors, select one for P1

T6

Feed

T1

T2

T5

F1

T4

T3

F2

P1

L1

F3

Process Steam
fluid

Vapor
product

A1
L. Key

Liquid
product

CHAPTER 4 : MODELLING &

ANALYSIS FOR PROCESS CONTROL
When I complete this chapter, I want to be
able to do the following.

and second order

Predict important features of dynamic behavior

from model without solving

Lots of improvement, but we need some more study!

Review the notes, especially learning goals and workshop
Try out the self-study suggestions
Naturally, well have an assignment!

LEARNING RESOURCES

SITE PC-EDUCATION WEB

- Instrumentation Notes
- Interactive Learning Module (Chapter 4)
www.pc-education.mcmaster.ca/
- Tutorials (Chapter 4)

Software Laboratory
- S_LOOP program

SUGGESTIONS FOR SELF-STUDY

1. Why are variables expressed as deviation variables when
we develop transfer functions?
2. Discuss the difference between a second order reaction
and a second order dynamic model.
3. For a sine input to a process, is the output a sine for a
a. Linear plant?
b. Non-linear plant?
4. Is the amplitude ratio of a plant always equal to or

SUGGESTIONS FOR SELF-STUDY

5. Calculate the frequency response for the model in
Workshop 2 using S_LOOP. Discuss the results.
6. Decide whether a linearized model should be used for
the fired heater for
PIC
1

a. A 3% increase in the
fuel flow rate.
b. A 2% change in the
feed flow rate.
c. Start up from ambient
temperature.
d. Emergency stoppage
of fuel flow to 0.0.

feed

AT
1

FT
1

PI
4

TI
1

PI
5
TI
5

TI
2

TI
6

PT
1
TI
3

TI
7

TI
4

TI
9

TI
8

FT
2

PI
2

air

TI
10

FI
3

PI
3

TI
11

PI
6

fuel