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
Outline of the lesson.
• Laplace transform
• Solve linear dynamic models
• Transfer function model structure
• Qualitative features directly from model
• Frequency response
• Workshop
CHAPTER 4 : MODELLING & ANALYSIS FOR PROCESS CONTROL
WHY WE NEED MORE DYNAMIC MODELLING
TA
I can model this;what more do
I need?TA
I would like to• model elements
individually• combine as needed• determine key
dynamic featuresw/o solving
WHY WE NEED MORE DYNAMIC MODELLING
TA
I would like to• model elements
individually• This will be a
“transfer function”
Now, I can combine elements to modelmany process structures
WHY WE NEED MORE DYNAMIC MODELLING
Now, I can combine elements to modelmany process structures
Even more amazing,I can combine toderive a simplifiedmodel!
THE FIRST STEP: LAPLACE TRANSFORM
∫==∞
−
0dtetfsftfL st)()())((
sCe
sCdtCeCL
t
t
stst =−==∞=
=
−∞
−∫00
)(: Constant
Step Change at t=0: Same as constant for t=0 to t=∞
t=0f(t)=0
THE FIRST STEP: LAPLACE TRANSFORM
∫==∞
−
0dtetfsftfL st)()())((
∫∫∫∞
−−∞
−∞
−−− −+=−=−000
11 dteedtedte)e())e((L st/tstst/t/t τττ
s/1=
ττττ
/se
/sdte t)s /(t)s /(
10
1
10
1 11+
−=+
=−=∞
+−∞
+−∫
)s (ss s/ss 11111
11 +=
+−=
+−=
τττ
τ
We have seenthis term
often! It’s thestep response to
a first orderdynamic system.
THE FIRST STEP: LAPLACE TRANSFORM
Let’s 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?
Let’s learn a newdynamic response
& its LaplaceTransform
THE FIRST STEP: LAPLACE TRANSFORM
Let’s learn a newdynamic response
& its LaplaceTransform
time
Xin
Xout
θ = dead timeθ
What is the value ofdead time for
plug flow?
0 1 2 3 4 5 6 7 8 9 10-0.5
0
0.5
1
time
Y, o
utle
t fro
m d
ead
time
0 1 2 3 4 5 6 7 8 9 10-0.5
0
0.5
1
time
X, in
let t
o de
ad ti
me
THE FIRST STEP: LAPLACE TRANSFORM
Let’s learn a newdynamic response
& its LaplaceTransform
• Is this a dead time?
• What is thevalue?
THE FIRST STEP: LAPLACE TRANSFORM
Let’s learn a newdynamic response
& its LaplaceTransform
The dynamic model for dead time is
)t(X)t(X inout θ−=
The Laplace transform for a variable after dead time is
)())(())(( sXetXLtXL ins
inoutθθ −=−=
Our plants havepipes. We willuse this a lot!
THE FIRST STEP: LAPLACE TRANSFORM
We need the Laplace transform of derivatives for solving dynamic models.
First derivative:
General:
0=−=
t)t(f)s(sf
dt)t(dfL
constant
+++−=
=−
−
=
−=
−
01
1
0
10
1
tn
n
t
nt
nnn
n
dt)t(fd....
dt)t(dfs)t(fs)s(fs
dt)t(fdL
constant
I am in desperateneed of examples!
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.
(We’ll solve this in class.)
FCA0 VCA
AAAA VkC')C'F(C'
dtdC'V −−= 0
AA kCrBA
=−→
kVFFK and
kVFV with ''
'
+=
+==+ ττ 0AA
A KCCdt
dC
I hope we get the same answer as with theintegrating factor!
SOLVING MODELS USING THE LAPLACE TRANSFORM
AA kCrBA
=−→
FCA0 V1CA1
V2CA2
Two 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.
(We’ll solve this in class.)
222212
2
111101
1
AAAA
AAAA
C'kV)C'F(C'dt
dC'V
C'kV)C'F(C'dt
dC'V
−−=
−−=
'''
'''
1222
2
0111
1
AAA
AAA
CKCdt
dC
CKCdt
dC
=+
=+
τ
τ
Much easier thanintegrating factor!
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.
(We’ll solve this in class.)
2AA kCr
BA
=−
→
FCA0
VCA
Non-linear!
TRANSFER FUNCTIONS: MODELS VALID FOR ANY INPUT FUNCTION
Let’s rearrange the Laplace transform of a dynamic model
Y(s)X(s) G(s)Y(s) = G(s) X(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
Y(s)X(s) G(s)G(s) = Y(s)/ X(s)
• How do we achieve zero initial conditions for every model?
• We don’t have “primes” on the variables; why?
• Is this restricted to a step input?
• What about non-linear models?
• How many inputs and outputs?
TRANSFER FUNCTIONS: MODELS VALID FOR ANY INPUT FUNCTION
Y(s)X(s) G(s)G(s) = Y(s)/ X(s)
Some examples:
?)()()( :CSTRs Two
?)()()( :tank Mixing
==
==
sGsCsC
sGsCsC
A
A
A
A
0
2
0
TRANSFER FUNCTIONS: MODELS VALID FOR ANY INPUT FUNCTION
Y(s)X(s) G(s)G(s) = Y(s)/ X(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 thefirst answer!
TRANSFER FUNCTIONS: MODELS VALID FOR ANY INPUT FUNCTION
T
opensm
svsF
sGvalve %/10.
)()(
)(30 ==
1250
2.1
)()()(
0
1
+
−==
ssFsTsG /sm
K 3tank1
130001
1
2
+==
sKK
sTsTsG / .)()()(tank2 110
012
+=
=
sKK
sTsTsG measured
sensor
/ .
)()()(
(Time in seconds)
Let’s see how tocombine models
TRANSFER FUNCTIONS: MODELS VALID FOR ANY INPUT FUNCTION
The BLOCK DIAGRAM
Gvalve(s) Gtank2(s)Gtank1(s) Gsensor(s)
v(s) F0(s) T1(s) T2(s) Tmeas(s)
It’s a picture of the model equations!
• Individual models can be replaced easily
• Helpful visualization
• Cause-effect by arrows
TRANSFER FUNCTIONS: MODELS VALID FOR ANY INPUT FUNCTION
Combine using BLOCK DIAGRAM ALGEBRA
Gvalve(s) Gtank2(s)Gtank1(s) Gsensor(s)
v(s) F0(s) T1(s) T2(s) Tmeas(s)
)()()()( )()(
)()(
)()(
)()()(
)()(
sGsGsGsGsvsF
sFsT
sTsT
sTsTsG
svsT
vTTs
measmeas
12
0
0
1
1
2
2
=
==
G(s)v(s) Tmeas(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.
sY(s) lim)(∞→∞→
=st
tY
Example for first order system
pApA
stA KCss
KCstC 0
0
0 )1(lim|)( ∆=
+
∆=
→∞→
τ
...)]sin()cos([...
..)(...)(
+++
++++++++=t
ttt
q
p
etCtC
etBtBBeAeAAtYα
ααα
ωω 21
2210210
21
What about dynamics can we determinewithout solving?
QUALITATIVE FEATURES W/O 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.
...)]sin()cos([...
..)(...)(
+++
++++++++=t
ttt
q
p
etCtC
etBtBBeAeAAtYα
ααα
ωω 21
2210210
21
...)]sin()cos([...
..)(...)(
+++
++++++++=t
ttt
q
p
etCtC
etBtBBeAeAAtYα
ααα
ωω 21
2210210
21
Real, distinct αiReal, repeated αi
Complex αiαq is Re(αi)
QUALITATIVE FEATURES W/O SOLVING
With αi the solutions to D(s) = 0, which is a polynomial.
...)]sin()cos([...
..)(...)(
+++
++++++++=t
ttt
q
p
etCtC
etBtBBeAeAAtYα
ααα
ωω 21
2210210
21
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.
...)]sin()cos([...
..)(...)(
+++
++++++++=t
ttt
q
p
etCtC
etBtBBeAeAAtYα
ααα
ωω 21
2210210
21
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
AA kCrBA
=−→
FCA0 V1CA1
V2CA2
(We’ll solve this in class.)
'''
'''
1222
2
0111
1
AAA
AAA
CKCdt
dC
CKCdt
dC
=+
=+
τ
τ
QUALITATIVE FEATURES W/O SOLVING
1. Is this system stable?
2. Is this system over- or underdamped?
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?
Withoutsolving!
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
0 1 2 3 4 5 6-0.4
-0.2
0
0.2
0.4
time
Y, o
utle
t fro
m s
yste
m
0 1 2 3 4 5 6-1
-0.5
0
0.5
1
time
X, i
nlet
to s
yste
m
input
outputB
A
P
P’
Amplitude ratio = |Y’(t)| max / |X’(t)| max
Phase angle = phase difference between input and output
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.
=∠==
+===
−
))(Re())(Im(tan)(angle Phase
))(Im())(Re()(Ratio Amp.
ωωωϕ
ωωω
jGjGjG
jGjGjGAR
1
22
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(ω)
QUALITATIVE FEATURES W/O SOLVING
FCA0 V1CA1
V2CA2Sine disturbance with
amplitude = 1 mol/m3
frequency = 0.20 rad/min
Must have fluctuations
< 0.050 mol/m3
CA2
Using equations for the frequency response amplitude ratio
0500120120011
1
2
2202
220
2
..).)(.(||)(
||||
)(|)(|
||||
>==+
=
+==
A
pAA
p
A
A
C
KCC
KjG
CC
τω
τωω Not acceptable. We need
to reduce the variability.How about feedback
control?
Data from 2 CSTRs
OVERVIEW OF ANALYSIS METHODS
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!!
Transfer function and block diagram
Flowchart of Modeling Method
Goal: Assumptions: Data:
Variable(s): related to goals
System: volume within which variables are independent of position
Fundamental Balance: e.g. material, energy
CheckD.O.F.
Is model linear? Expand in Taylor Series
DOF = 0 Another equation:-Fundamental balance-Constitutive equat ions
DOF ≠ 0
No
Express in deviation var iables
Group parameters to evalua te [ga ins (K), time-constants (τ), dead-times(θ)]
Take Laplace transform
Substitute specific input, e.g.,step, and solve for output
Ana lytical solution(step)
Numerical solution
Ana lyze the model for:- causali ty- order- stability- damping
Yes
Combine severa l models intointegrated system
We can use astandard modelling
procedure tofocus ourcreativity!
Combining Chapters 3 and 4
Too small to read here - check it out in the textbook!
CHAPTER 4: MODELLING & ANALYSIS WORKSHOP 1
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.
Solve the linearized model using Laplace transforms
CHAPTER 4: MODELLING & ANALYSIS WORKSHOP 2
1. System order
2. Final Value
3. Stability
4. Damping
5. Frequency response
The dynamic model for a non-isothermal CSTR is derived in Appendix C. A specific example has the following transfer function.
Determine the features in the table for this system.
)..()..(
)()(
80357918345076
2 ++−−
=ss
ssFsT
c
T
A
CHAPTER 4: MODELLING & ANALYSIS WORKSHOP 3
F
CA0V1CA1
V2CA2
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.
CHAPTER 4: MODELLING & ANALYSIS WORKSHOP 4
Feed
Vaporproduct
LiquidproductProcess
fluidSteam
F1
F2 F3
T1 T2
T3
T5
T4
T6 P1
L1
A1L. Key
We often measure pressure for process monitoring and control. Explain three principles for pressure sensors, select one for P1 and explain your choice.
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
Lot’s of improvement, but we need some more study!• Read the textbook• Review the notes, especially learning goals and workshop• Try out the self-study suggestions• Naturally, we’ll have an assignment!
LEARNING RESOURCES
• SITE PC-EDUCATION WEB
- Instrumentation Notes
- Interactive Learning Module (Chapter 4)
- Tutorials (Chapter 14)
• Software Laboratory
- S_LOOP program
• Other textbooks on Process Control (see course outline)
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 greater than the steady-state gain?
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
FT1
FT2
PT1
PIC1
AT1
TI1
TI2
TI3
TI4
PI2
PI3
PI4
TI5
TI6
TI7
TI8
TI9
FI3
TI10
TI11
PI5
PI6
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.
fuel
feed
air