CHE412 Process Dynamics and Control BSc (Engg)

advertisement
CHE412 Process Dynamics and Control
BSc (Engg) Chemical Engineering (7th Semester)
Week 2/3
Mathematical Modeling
Luyben (1996) Chapter 2-3
Stephanopoulos (1984) Chapter 4, 5
Seborg et al (2006) Chapter 2
Dr Waheed Afzal
Associate Professor of Chemical Engineering
Institute of Chemical Engineering and Technology
University of the Punjab, Lahore
wa.icet@pu.edu.pk
1
Test yourself (and Define):
• Dynamics (of openloop
and closedloop) systems
• Manipulated Variables
• Controlled/ Uncontrolled
Variables
• Load/Disturbances
• Feedback, Feedforward
and Inferential controls
• Error
• Offset (steady-state
value of error)
• Set-point
•
•
•
•
•
•
Stability
Block diagram
Transducer
Final control element
Mathematical model
Input-out model,
transfer function
• Deterministic and
stochastic models
• Optimization
• Types of Feedback
Controllers (P, PI, PID)
Hint: Consult recommended books (and google!)
Luyben (1996), Coughanower and LeBlanc (2008)
2
Types of Feedback Controllers
• Proportional:
c(t) = Kc Π„(t) + cs
• Proportional-Integral:
𝑐 𝑑 = π‘˜π‘ Π„ 𝑑 +
π‘˜π‘ 𝑑
Π„
τ𝐼 0
𝑑 𝑑𝑑 + 𝑐𝑠
• Proportional-Integral-Derivative:
𝑐 𝑑 = π‘˜π‘ Π„ 𝑑 +
π‘˜π‘ 𝑑
Π„
τ𝐼 0
𝑑 𝑑𝑑 + π‘˜π‘ τ𝐼
𝑑Є
𝑑𝑑
+ 𝑐𝑠
Π„(t)
Nomenclature
actuating output 𝑐 𝑑 ,
error Π„ 𝑑 , gain π‘˜π‘ ,
time constant τ𝐼
Consult your class notes on
modelling of stirred tank heater
(Stephanopoulos, 1984)
3
Mathematical Modeling
• Mathematical representation of a process (chemical
or physical) intended to promote qualitative and
quantitative understanding
• Set of equations
• Steady state, unsteady state (transient) behavior
Inputs
Experimental Setup
Outputs
Compare
Set of Equations
(process model)
Outputs
• Model should be in good agreement with
experiments
4
Systematic Approach for Modelling
(Seborg et al 2004)
1. Determine objectives, end-use, required details and
accuracy
2. Draw schematic diagram and label all variables, parameters
3. Develop basis and list all assumptions; simplicity Vs reality
4. If spatial variables are important (partial or ordinary DEs)
5. Write conservation equations, introduce auxiliary equations
6. Never forget dimensional analysis while developing
equations
7. Perform degree of freedom analysis to ensure solution
8. Simplify model by re-arranging equations
9. Classify variables (disturbances, controlled and manipulated
variables, etc.)
5
Need of a Mathematical Model
• To understand the transient behavior, how inputs
influence outputs, effects of recycles, bottlenecks
• To train the operating personnel (what will happen
if…, ‘emergency situations’, no/smaller than
required reflux in distillation column, pump is not
providing feed, etc.)
• Selection of control pairs (controlled v. /
manipulated v.) and control configurations
(process-based models)
• To troubleshoot
• Optimizing process conditions (most profitable
scenarios)
6
Classification of Process Models
based on how they are developed
• Theoretical Models
based on principal of conservation- mass, energy,
momentum and auxiliary relationships, ρ, enthalpy,
cp, phase equilibria, Arrhenius equation, etc)
• Empirical model
based on large quantity of experimental data)
• Semi-empirical model (combination of theoretical
and empirical models)
Any available combination of theoretical principles
and empirical correlations
7
Advantages of Different Models








Theoretical Models
Physical insight into the process
Applicable over a wide range of conditions
Time consuming (actual models consist of large
number of equations)
Availability of model parameters e.g. reaction rate
coefficient, over-all heart transfer coefficient, etc.
Empirical model
Easier to develop but needs experimental data
Applicable to narrow range of conditions
8
State Variables and State Equations
 State variables describe natural state of a process
 Fundamental quantities (mass, energy, momentum)
are readily measurable in a process are described by
measurable variables (T, P, x, F, V)
 State equations are derived from conservation
principle (relates state variables with other variables)
(Rate of accumulation) = (rate of input) – (rate of
output) + (rate of generation) - (rate of consumption)
9
Modeling Examples
Jacketed CSTR
 Basis
Fi, CAi, Ti
Flow rates are volumetric
Compositions are molar
A → B, exothermic, first order
 Assumptions
Coolant
Perfect mixing
ρ, cP are constant
Perfect insulation
Coolant is perfectly mixed
No thermal resistance of jacket
F, CA, T
10
Modeling of a Jacketed CSTR (Contd.)
 Overall Mass Balance
Fi, CAi, Ti
(Rate of accumulation) = (rate of input) –
(rate of output)
 Component Mass Balance
(Rate of accumulation of A) = (rate of
input of A) – (rate of output of A) + (rate Coolant
Fci,Tci
of generation of A) – (rate of
consumption of A)
V
CA
T
Coolant
Fco,Tco
F, CA, T
Energy Balance
(Rate of energy accumulation) = (rate of energy input) – (rate of
energy output) - (rate of energy removal by coolant) + (rate of
energy added by the exothermic reaction)
11
Modeling of a Jacketed CSTR (Contd.)
 Overall Mass Balance
Fi, CAi, Ti
𝑑𝑉
= 𝐹𝑖 − 𝐹
𝑑𝑑
 Component Mass Balance
𝑑𝐢𝐴 𝐹𝑖
=
𝐢𝐴𝑖 − 𝐢𝐴 − πΆπ΄π‘˜0𝑒 −𝐸/𝑅𝑇
𝑑𝑑
𝑉
 Energy Balance
𝑑𝑇
𝑑𝑑
𝐹𝑖
𝑄
=
𝑇𝑖 − 𝑇 −
𝑉
𝑉ρ𝑐𝑃
−Δ𝐻 𝐢𝐴 π‘˜0 𝑒 −𝐸/𝑅𝑇
+
ρ𝑐𝑃
Coolant
Fci,Tci
V
CA
T
Coolant
Fco,Tco
F, CA, T
Input variables: CAi, Fi, Ti, Q, (F)
Output variables: V, CA, T
12
Degrees of Freedom (Nf) Analysis
Nf = Nv - NE
Case (1): Nf = 0 i.e. Nv = NE (exactly specified system)
We can solve the model without difficulty
Case (2): f > 0 i.e. Nv > NE (under specified system), infinite
number of solutions because Nf process variables can be fixed
arbitrarily. either specify variables (by measuring disturbances)
or add controller equation/s
Case (3): Nf < 0 i.e. Nv < NE (over specified system) set of
equations has no solution
remove Nf equation/s
We must achieve Nf = 0 in order to simulate (solve) the model13
Stirred Tank Heater: Modeling and
Degree of Freedom Analysis
Basis/ Assumptions
 Perfectly mixed, Perfectly insulated
 ρ, cP are constant
 Overall Mass Balance
π‘‘β„Ž
𝐴
= 𝐹𝑖 − 𝐹
𝑑𝑑
 Energy Balance
𝑑𝑇 𝐹𝑖
𝑄
=
𝑇𝑖 − 𝑇 −
𝑑𝑑 π΄β„Ž
π΄β„Žρ𝑐𝑃
 Degree of Freedom Analysis
 Independent Equations: 2 Variables: 6
 Nf = 6-2 (= 4) Underspecified
A
Steam
Fst
(h, Fi, F, Ti, T, Q)
14
Stirred Tank Heater: Modeling and
Degree of Freedom Analysis
Nf = 4
 Specify load variables (or disturbance)
Measure Fi, Ti (Nf = 4 - 2 = 2)
 Include controller equations (not
studied yet); specify CV-MV pairs:
CV
MV
h
F
T
Q
𝐹 = 𝐹𝑆 + π‘˜πΆπΉ β„Žπ‘ π‘’π‘‘ − β„Ž
𝑄 = 𝑄𝑆 + π‘˜πΆπ‘„ 𝑇𝑠𝑒𝑑 − 𝑇
Nf = 2 - 2 = 0
A
Steam
Fst
π‘‘β„Ž
𝐴
= 𝐹𝑖 − 𝐹
𝑑𝑑
𝑑𝑇 𝐹𝑖
𝑄
=
𝑇𝑖 − 𝑇 −
𝑑𝑑 π΄β„Ž
π΄β„Žρ𝑐𝑃
Can you draw these control loops?
15
Modeling an Ideal Binary Distillation Column
Basis/ Assumptions
1. Saturated feed
2. Perfect insulation of column
3. Trays are ideal
4. Vapor hold-up is negligible
5. Molar heats of vaporization of A
and B are similar
6. Perfect mixing on each tray
7. Relative volatility (α) is constant
8. Liquid holdup follows Francis weir
formulae
9. Condenser and Reboiler dynamics
are neglected
10. Total 20 trays, feed at 10
2, 4, 5 → V1 = V2 = V3 = … VN
(not valid for high-pressure columns)
Condenser
= 20
Reflux
mD
F
R xD
Z
Drum
D
xD
VB
mB
Reboiler
B
xB
(Stephanopoulos, 1984)
16
Modeling Distillation Column
V20
Reflux Drum
 Overall
𝑑(π‘šπ· )
𝑑𝑑
= 𝑉20 − 𝑅 − 𝐷
 Component
𝑑π‘₯𝐷
= (𝑉20 /π‘šπ· )(𝑦20 − π‘₯𝐷 )
𝑑𝑑
Top Tray
 Overall
𝑑(π‘š20 )
= 𝑅 + 𝑉19 − 𝐿20 − 𝑉20
𝑑𝑑
 Component
𝑑π‘₯20
1
=
𝑅 π‘₯𝐷 − π‘₯20
𝑑𝑑
π‘š20
Remember V1 = V2 = …. VN = VB
mD
R
xD
D
xD
Reflux Drum
V20
N = 20
Top Tray
L20
R
V19
+ 𝑉𝐡 (𝑦19 − 𝑦20 )
17
Modeling Distillation Column
Nth Stage (stages 19 to 11 and 9 to 2)
 Overall
𝑑(π‘šπ‘ )
= 𝐿𝑁+1 + 𝑉𝑁−1 − 𝐿𝑁 − 𝑉𝑁
Nth Stage
𝑑𝑑
LN
 Component
𝑑(π‘šπ‘ π‘₯𝑁)
= 𝐿𝑁+1 π‘₯𝑁+1 + 𝑉𝑁−1 𝑦𝑁−1 − 𝐿𝑁 π‘₯𝑁 − 𝑉𝑁 𝑦𝑁
𝑑𝑑
Feed Stage (10th)
…. simplify!
v10
 Overall
𝑑(π‘š10 )
F
= 𝐿11 + 𝐹 + 𝑉9 − 𝐿10 − 𝑉10
Z
𝑑𝑑
 Component
Feed Stage
(10th) L
𝑑(π‘š10 π‘₯10 )
= 𝐿11 π‘₯11 + 𝐹𝑍 + 𝑉9 𝑦9 − 𝐿10 π‘₯10 − 𝑉10 𝑦10 10
𝑑𝑑
…. simplify!
LN+1
vN
mN
vN-1
L11
mN
v9
18
Modeling Distillation Column
1st
Stage
 Overall
𝑑(π‘š1 )
= 𝐿2 +𝑉𝐡 −𝐿1 − 𝑉1
𝑑𝑑
 Component
𝑑(π‘š1 π‘₯1 )
𝑑𝑑
1st Stage
V1
L1
L2
VB
= 𝐿2 π‘₯2 + 𝑉𝐡 𝑦𝐡 − 𝐿1 π‘₯1 − 𝑉1 𝑦1
… simplify!
Column Base
 Overall
𝑑(π‘šπ΅ )
= 𝐿1 − 𝐡 −𝑉𝐡
𝑑𝑑
 Component
𝑑(π‘šπ΅ π‘₯𝐡 )
= 𝐿1 π‘₯1 − 𝐡π‘₯𝐡 −𝑉𝐡 𝑦𝐡
𝑑𝑑
…. simplify!
L1
VB
VB
mB
Column
Base
B
19
Modeling Distillation Column
Equilibrium relationships (to determine y)
 Mass balance (total and component) around 6 segments of a
distillation column: reflux drum, top tray, Nth tray, feed tray, 1st
tray and column base.
 Solution of ODE for total mass balance gives liquid holdups (mN)
 Solution of ODE for component mass balance gives liquid
compositions (xN)
 V1 = V2 = … = VN = VB (vapor holdups)
 How to calculate y (vapor composition) and L (liquid flow rate)
 Recall αij is constant throughout the column
 Use αij = ki/kj , xi + xj =1, yi + yj = 1, and k = y/x to prove
π’šπ’Š =
∝π’Šπ’‹ π’™π’Š
𝟏+(∝π’Šπ’‹ −𝟏)π’™π’Š
Phase-equilibrium relationship (recall
thermodynamics)
20
Modeling Distillation Column
Hydraulic relationships (to determine L)
 Liquid flow rate can be calculated using well-known Francis
weir hydraulic relationship; simple form of this equation is
linearized version:
𝐿𝑁 = 𝐿𝑁0 +





π‘šπ‘ − π‘šπ‘0
β
LN is flow rate of liquid coming from Nth stage
LN0 is reference value of flow rate LN
mN is liquid holdup at Nth stage
mN0 is reference value of liquid holdup mN
β is hydraulic time constant (typically 3 to 6 seconds)
21
Modeling Distillation Column
Degree of Freedom Analysis
Total number of independent equations:
 Equilibrium relationships (y1, y2, …yN, yB) →
N+1 (21)
 Hydraulic relationships (L1, L2, …LN) →
N (20)
(does not work for liquid flow rates D and B)
 Total mass balances (1 for each tray, reflux drum and
column base) →
N+2 (22)
 Total component mass balances (1 for each tray, reflux
drum and column base) →
N+2 (22)
 Total Number of equations NE = 4N + 5 (85)
44 differential and 41 algebraic equations
Note the size of model even for a ‘simple’ system with several
simplifying assumptions!
22
Modeling Distillation Column
Degree of Freedom Analysis
Total number of independent variables:
 Liquid composition (x1, x2, …xN, xD, xB) → N+2
 Liquid holdup (m1, m2, …mN, mD, mB) → N+2
 Vapor composition (y1, y2, …yN, yB) →
N+1
 Liquid flow rates (L1, L2, …LN) →
N
 Additional variables →
6
(Feed: F, Z; Reflux: D, R; Bottom: B, VB)
 Total Number of independent variables NV = 4N + 11
Degree of Freedom
= (4N + 11) – (4N + 5)
=6
System is underspecified
23
Modeling Distillation Column
Degree of Freedom Analysis
(4N + 11) – (4N + 5) = 6
 Specify disturbances: F, Z
(Nf = 6-2 = 4)
 Include controller equations (Recall our discussion on types
of feedback controllers )
 General form, of P-Controller
c(t) = cs + Kc Π„(t)
Controlled
Variable
Controller Equation
Manipulated
(Proportional Controller)
Variable
xD
R
xB
VB
mD
D
mB
B
Nf = 4 - 4 = 0
R = Kc (xs - xD) + Rs
VB = Kc (xBs-xB) + VBs
D = Kc (mDs-mD) + Ds
B = Kc (mBs-mB) + Bs
24
Can you draw these four feedback control loops?
CV
xD
MV loop
R
1
xB
VB
2
mD
mB
D
B
3
4
Feedback Control on a Binary Distillation Column
R
(Stephanopoulos, 1984)
25
Week 2/3
Weekly Take-Home Assignment
1. Define all the terms on slide 2 with examples whenever possible.
2. Prepare short answers to ‘things to think about’
(Stephanopoulos, 1984) page 33-35
3. Prepare short answers to ‘things to think about’
(Stephanopoulos, 1984) page 78-79
4. Solve the following problems (Chapter 4 and 5 of
Stephanopoulos, 1984): II.1 to II.14, II.22, II.23 (Compulsory)
Submit before Friday
Curriculum and handouts are posted at:
http://faculty.waheed-afzal1.pu.edu.pk/
26
Download