0% found this document useful (0 votes)
186 views41 pages

2 - Dynamic Modelling (Process Dynamics and Control)

The document discusses dynamic modeling and developing mathematical models of processes. It covers: 1) The procedure for developing dynamic models, which includes defining objectives, collecting information, formulating the model using conservation laws and constitutive equations, determining a solution method, analyzing results, and validating the model. 2) Writing balance equations to model processes, using either an integral approach or instantaneous approach. Mass, energy, and momentum balances are commonly used. 3) Dynamic models relate inputs, states, and outputs over time using systems of differential equations. Component mass balances track the accumulation, inflows, and outflows of individual components.

Uploaded by

Marlinda Bauer
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
186 views41 pages

2 - Dynamic Modelling (Process Dynamics and Control)

The document discusses dynamic modeling and developing mathematical models of processes. It covers: 1) The procedure for developing dynamic models, which includes defining objectives, collecting information, formulating the model using conservation laws and constitutive equations, determining a solution method, analyzing results, and validating the model. 2) Writing balance equations to model processes, using either an integral approach or instantaneous approach. Mass, energy, and momentum balances are commonly used. 3) Dynamic models relate inputs, states, and outputs over time using systems of differential equations. Component mass balances track the accumulation, inflows, and outflows of individual components.

Uploaded by

Marlinda Bauer
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 41

Process Dynamics and

Control
CH 3043 A

Lecture 2 – Dynamic Modelling


2018-2019
Costin Sorin Bildea
University “Politehnica” of Bucharest
Department of Chemical and Biochemical Engineering

Email: c.s.bildea-1@tudelft.nl
s_bildea@upb.ro

Room:
Lecture 1 - Introduction

• Importance of Process Dynamics

• Levels of Process Control / Steps in designing control systems


• Controller tuning
• Algorithms (type of controller)
• Control structure
• Process design
Models

 
=nRT

4
Mathematical model
• Uses and advantages
• Fast, cheap way to investigate possible designs (including control system)
• Describe the behavior of complex systems
• Calculate the size of equipment
• Optimize existing plants
• Predict the result of an experiment
• Mathematical models consist in:
• Balance equations
• Constitutive equations

06/11/2020 5
Dynamic modeling
• A model is an abstraction (read approximation/simplification) of a
part of reality.
• Furthermore the model should be adequate (fit for purpose).

• What is adequate?
• Approximate what? Formalize by procedure
• Which part?

6
Procedure for developing (dynamic)
models
1. Define
objectives
• Purpose model? 2. Prepare
• Required
information
accuracy?
• Sketch process 3. Formulate
• Determine
model
system boundary
• Identify • Conservation 4. Determine
variables of laws
interest • Constitutive
solution
• State equations • Analytical 5. Analyze
assumptions • DOF”s? • Numerical
results
• Results correct? 6. Validate
• Interpret the
model
results
• Select key
variables
• Compare with
experiment

7
Balance equations
• Conservation laws can be set up for:
1.Mass (total or component)
2.Energy
3.Momentum

• Typically a conservation law is implemented as a balance:


Accumulation = In – Out + Production – Conversion
“Production” and “Conversion” occur only for component mass balance and
momentum balance

• For a lot of process systems mass and energy balances are sufficient, the
momentum balance is replaced by flow assumptions (e.g. ideal mixing, plug
flow…).
8
Balance equations
Accumulation = Net (in) + Net (generated)
dX
  X  RX
dt

Considered
X – property (kmol)
volume V
x – density of X (kmol/m3) F X
X
RX – total generation rate
(kmol/s) RX

rX – generation rate (kmol/m3/s)


Boundary S
ΦX – flow rate (kmol/s) 9
2
General form of balance equations
d dX

dt V
x  dV     X  n  dS   rX  dV
S V dt
  X  RX

Observation:

 
S
X  n  dS   div X  dV
V
 X   X
div X  i  j X k     X   X (Gauss)
x y z

dx
  div X  rX
dt
10
Lumped systems
d

dt V
x  dV     X  n  dS   rX  dV
S V

- Lumped systems : all variables are constant in space

 x  dV  x V  X  r
V
X  dV  rX V  RX
V

dX The rest of the lecture refers to


  X  RX lumped systems
dt
11
Writing balance equations
- the ”integral” approach (1)
X = X + X - X
at t + Dt at t entering leaving
from t to t from t to t
+Dt +Dt

t t t t
X t t
X t   X ,in dt    X ,out dt
t t

   X ,out  dt
t t
 X ,in
t

   X ,in   X ,out   t
“mean value theorem” t  t
(integral calculus)
0  1 12
The ‘integral” approach (2)
X t t
 X t    X ,in   X ,out   t
t  t

 X X   dX
 X ,in   X ,out 
t  t
 t t

t
t

dt t   t

“mean value theorem”


(differential calculus)
0  1

dX  t 
t  0   X ,in  t    X ,out  t 
dt 13
Writing balance equations
- the “instantaneous” approach -

Rate of accumulation = rate of X - rate of X ( Reaction


entering leaving included ! )

dX  t 
  X ,in  t    X ,out  t 
dt

14
Mass balance
rate of accumulation = mass flow - mass flow
of mass in out
p q
dM
   M , j    M ,k
dt j 1 k 1

d V  p q
   j  V , j     V ,k
dt j 1 k 1

p q
dV
! For constant density r   V , j   V ,k
dt j 1 k 1

M, V = state variable ; Φ – input variables; r - parameter 15


General form of dynamic models
(will be updated later)

Inputs System Outputs


u(t) y(t)
States x(t)

dx  t 
 f  x t ,u  t  f : R nm  R n
dt
y t  g  x t  g : R nm  R p
at t  0 x  0   x0
16
Component mass balance
rate of mass accumulation = mass flow in
of component i of component i ( fi )
- mass flow out
of component i
+ rate of formation
of component i
p q
dM i
  f i , j   fi ,k  Ri i  1 n
dt j 1 k 1

p q
dN i
  fi , j   fi ,k  Ri i  1 n (molar)
dt j 1 k 1
17
Constitutive relationships
Gas law pv  RT
 a
 p  2   v  b   RT
(van der Waals)
 v 

Flow through valves


Reaction rate
Pv
 s x F  Cv f  x 
rA  kc AcB rX  
KS  s

Equilibrium relations yi  Ki xi

18
Conservation balance using intensive variables
•intensive variables enter constitutive equations
(reaction rate, physical properties)
•example:
Mi  kg of i 
ci   kg 
M  

•warning: be careful, there may be “index” problems!


19
in
d  ci M 
 ci ,in  Fin  ci ,out  Fout  Ri
dt
dci dM
M  ci  ci ,in  Fin  ci ,out  Fout  Ri
dt dt out

if well-mixed: ci  ci ,out
if M = constant Fin = Fout = F dci
M  ci ,in F  ci ,out F  Ri
dt
Otherwise (well mixed, but M not constant):

dM
 Fin  Fout
dt
dci
M  ci ,in Fin  ci Fin  Ri
dt
20
Energy balance
rate of change = flow of energy flow of energy
-
of total energy into the system out of the system

E  U  K E  PE
total internal kinetic potential
energy = energy + energy + energy

M  w2
M  g   h  h0  Small
H  U  P V 2 can be neglected

flow of energy = convective + conductive + work


radiative

21
Constitutive relationships

Heat transfer

QC  UAT QR   A  T  T
1
4
2
4

d
cp  T   a  b T  c T 
2

22
Example - CSTR
A B
F0, cA,0, cB,0, T0

F [ kg /s ]
c [ kg / kg ] M
cA, cB
Tc
 EA 
T U, A
r  k0 exp    cA
 RT 
(kg A / kg reactor)

F1, cA,1, c T1
B,1
23
Balance equations
Known :
- inlet conditions
dM A - outlet flow rate F1
 FA,0  FA,1  r  M (an input variable !!)
dt - constitutive relations,
dM B as needed
 FB ,0  FB ,1  r  M
dt
dH Solution possible
 F0  h0  F1  h1  Q (correct model) if:
dt
knowing the state variables
and inputs
M A  0   M A0
=
At t = 0 Can calculate the RHS of
M B  0  M B0
differential equation

H  0  H0 24
Calculating RHS
MA MB
c A,1  cB ,1  M  MA  MB
M M

H  M A hA  M B hB (ideal !!)

 M A  hA  Tref    cP , A  T  dT   M B  hB  Tref    cP , B  T  dT 
  
T T

 Tref   Tref 

 M A hA  Tref   cP , A  T  Tref    M  h  T   c T T  
B B ref P ,B ref

Solve for T

 EA  H
Calculate r  k0 exp    cA h1  Q  UA  T  Tc 
 RT  M 25
Where is the heat of reaction ?

dH d dM A dM B dhA dhB
  M A hA  M B hB   hA  hB  MA  MB
dt dt dt dt dt dt

dhA d dT
  hA  Tref   cP , A  T  Tref    cP , A
 
dt dt dt
dT dT
 M A c P , A  M B cP , B  dt
 McP
dt

hA  F0 c A,0  F1cA,1  R   hB  F0 cB ,0  F 1cB ,1  rM  


rM  hB  hA   hA  F0 cA,0  F1cA,1   hB  F0 cB ,0  F 1cB ,1 
26
Where is the heat of reaction ? (2)
dT
McP  R  hB  hA   hA  F0 cA ,0  F1cA,1   hB  F0 cB ,0  F 1cB ,1  
dt
F0 c A,0 hA,0  F0 cB ,0 hB ,0   F1cA hA  F1cB hB   Q


hA,0  hA  hA  Tref   cP , A  T0  Tref     h T   c T T    c T
A ref P, A 1 ref P,A 0  T1 


hB ,0  hA  hB  Tref   cP , B  T0  Tref     h T   c T T    c T
B ref P ,B 1 ref P ,B 0  T1 

dT
McP  F0  c A,0 cP , A  cB ,0 cP , B   T  T0     r H  rM  UA  T  TC 
dt

McP
dT
 F0 cP  T  T0     r H  rM  UA  T  TC 
c P, A  cP , B  !
dt 27
Using moles and m3

d  V  c pT  p
  Fj c pj  T j  T   rV  H R   Q
dt j 1

28
General form of dynamic models

Inputs System outputs


states: x(t)
u(t) auxiliary: z(t) y(t)

dx  t 
 f  x  t  , z (t ), u  t  
dt
0  g  x(t ), z (t ), u (t ) 
y t  h x t , z  t 
at t  0 x  0   x0
u t for t  0 29
Degrees of freedom
N DF  NU  N E
unknowns equations

NDF = 0 A unique solution may exist

NDF > 0 the problem is under-specified (optimisation)

NDF < 0 the problem is over-specified (least squares)

30
Counting
Physical quantities: variables, parameters, constants

Parameters : must be known

Variables : differential (state) and algebraic (auxiliary)

Each differential equation (variable x) must have an initial condition x(t=0) = x0

The number of algebraic variables (z) must be equal to the number of algebraic
equations (g)

For distributed parameter systems – we also need boundary conditions


31
Example
dx
dh 1  f  x, z  , x  0   x0
  F1  F2  , h  0   h0 dt
dt A
0  g  x, z 
F1  CV  P1  P2  0
P0
F2  CV  P2  P3  0
P2  P0   gh  0
h
P1
P3
P2

F1 F2
32
Degrees of freedom

1 state variable : h
6 algebraic variables: P0,P1,P2,P3,F1,F2
3 parameters: A, CV, r
1 constant: g
P0

1 differential equation with I.C. P1 h P3


3 algebraic equation P2
3 parameter values F1 F2

NDF = 6 – 3 = 3

33
Good specification [ P0, P1, P3 ]
P0

At t=0, h=h0
P1 h P3
calculate: P2
P2 F1 F2
F1
F2
dh 1
dh/dt   F1  F2  , h  0   h0
dt A
at t = 0 + Dt F1  CV  P1  P2  0
h = h(0)+ Dt*dh/dt
F2  CV  P2  P3  0
Index 1 P2  P0   gh  0
34
Bad specification [ P0, P1, P2 ]
Index > 1
P0

?
At t=0, h=h0 P1 h
P2 P3
calculate:
P3, F1, F2 F1 F2

P3 F1 F2
dh 1
  F1  F2  , h  0   h0
X dt A
F1  CV  P1  P2  0
X X
F2  CV  P2  P3  0
P2  P0   gh  0
35
Solving nonlinear, dynamic models
• A set of DAE’s can be solved either by:
• Analytical techniques; normally the chances of success are quit small.
However finding an analytical solution after linearization is standard.
• Numerical techniques; think of Euler, Runga-Kutta methods etc…
• Implicit methods are attractive (the algebraic part already requires
iterations and they are very stable).

dx
 f ( x, u ), x(0)  x0
dt
xi 1  xi  (ti 1  ti )  f ( xi , ui ) (explicit)

xi 1  xi  (ti 1  ti )  f ( xi 1 , ui 1 ) (implicit)

36
Solution
• Nowadays there are a number software packages
available to solve DAE’s. There are basically two kind of
packages:
1. General purpose; like Matlab, Mathcad, Mapple and
Mathematica.
2. Process oriented; like gPROMS, Aspen Dynamics,
Hysys

• The general purpose packages offer little support for


modeling and the calculation of properties, however the
integration with analysis and synthesis tools is typically
better.

37
Identification (I)
• The basic idea of identification is to fit the input-output
behavior of a parameterized differential equation to an
experiment.

• Consider a system with a Single Input u and a Single


Output (SISO) y :

u System y

• The experiment is often a step response.

38
Identification (II) dym
 a  ym  b  u
dt
• Assume a model, for example:
ym (0)  ym 0
• This model has three parameters (a, b and ym0). The values of these
parameters is determined such that “the difference between ye(t)
and ym(t)” is minimal.

u(t), y (t) ym

ye

time

39
Identification (III)
• The main use of identification is tuning of PID-
controllers and getting models for Model Predictive
Control (MPC).

• Identification is attractive for getting a simple (SISO,


linear) model. First principles are better for
complex (MIMO*, non-linear) models. Basically this
has to do with the time needed for experiments.

* Multiple Input Multiple Output

40
Validation
• To determine whether the model represents the
process with the required accuracy for the specified
range of conditions.

• Given the model purpose one selects key variables and


compares the model with one or more experiments.

• No set of experiences can fully validate the model.


Good comparisons only demonstrate that the model
has not been invalidated by the data.

41

You might also like