Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 1L3—
Dynamics of forced andunsteady-state processes
Davide Manca
Lesson 3 of “Dynamics and Control of Chemical Processes” – Master Degree in Chemical Engineering
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 2L3—
Forced unsteady-state reactors
• Forced unsteady state (FUS) reactors allow reaching higher conversions than
conventional reactors.
• Two alternatives:
Reverse flow reactors, RFR;
Network of reactors: simulated moving bed reactors, SMBR.
• Within a SMBR network, the simulated moving bed is accomplished by periodically
switching the feed inlet from one reactor to the following one.
• APPLICATION: Methanol synthesis (ICI patent).
Operating temperature: 220-300 °C;
Pressure: 5-8 MPa;
CO = 10-20%; CO2 = 6-10%; H2 = 70-80%.
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 3L3—
Forced unsteady-state reactors
• Catalytic exothermic reactions can be carried out with an autothermal regime.
• FUS reactors are mainly advantageous when either the reactants concentration or
the reactions exothermicity are low.
• There is an increase of both conversion and productivity that allows:
Using smaller reactors,
Lower amounts of catalyst.
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 4L3—
Methanol synthesis in forced unsteady-state reactors
• The methanol synthesis reaction is:
• The reaction takes place with a reduction of the moles number. Therefore, the
reaction is carried out at high pressure.
• In the past, the methanol plants worked at 100 ÷ 600 bar.
• Nowadays, methanol plants work at lower pressures (50 − 80 bar).
• In the low-pressure plants, the following reactions are important too:
2 32 90.769 kJ/molRCO H CH OH H
2 2 2
2 2 3 23
CO H CO H O
CO H CH OH H O
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 5L3—
Reverse Flow Reactors
• Valves: V1, V2, V3, V4 allow periodically inverting the feed direction in the reactor.
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 6L3—
RFR: first–principles model
Equations #Eq. Eq. type Variables
Gas phase enthalpic
balance1
Partial
derivative
Solid phase enthalpic
balance (catalyst)1
Partial
derivative
Gas phase material
balancenComp
Partial
derivative
Solid phase material
balance (catalyst)nComp
Non-linear
algebraic
1...nComp i
, ,
G,iSG yTT
1...nComp i1...nComp i
, , ,
S,iG,iSG yyTT
1...nComp i1...nComp i
, , ,
S,iG,iSG yyTT
1...nComp i1...nComp i
, , ,
S,iG,iSG yyTT
2 2nComp 2 2nComp
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 7L3—
RFR: methanol synthesis
Reactor diameter
Reactor length
Void fraction
Catalyst mass
Apparent catalyst density
Catalyst porosity
Pellet diameter
Inlet temperature
Working pressure
Surface flowrate
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 8L3—
RFR: methanol synthesis
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 9L3—
Temperature profile once the pseudo-stationary condition is reached
Reverse Flow Reactors
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 10L3—
Reverse Flow Reactors
Concentration profile once the pseudo-stationary condition is reached
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 11L3—
Simulated Moving Bed Reactors
Step 1: 1g2g3Step 2: 2g3g1Step 3: 3g1g2
1
2
3
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 12L3—
Simulated Moving Bed Reactors
• Kinetic equations corresponding to a dual-site Langmuir-
Hinshelwood mechanism, based on three independent
reactions: methanol formation from CO, water-gas-shift
reaction and methanol formation from CO2:
Velardi S., A. Barresi, D. Manca, D. Fissore, Chem. Eng. J., 99 117–123, 2004
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 13L3—
Simulated Moving Bed Reactors
• Reaction rates for a catalyst based on Cu–Zn–Al mixed oxides
Velardi S., A. Barresi, D. Manca, D. Fissore, Chem. Eng. J., 99 117–123, 2004
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 14L3—
Simulated Moving Bed Reactors
Velardi S., A. Barresi, D. Manca, D. Fissore, Chem. Eng. J., 99 117–123, 2004
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 15L3—
Simulated Moving Bed Reactors
• After a suitable number of switches the temperature profile reaches a pseudo-
stationary condition.
High switch times Low switch times
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 16L3—
SMBR: the thermal wave
320
300
280
260
240
220
200
180
160
140
1200 1 2 3
Reactors
TG
AS
[°C]
260 s
150 s170 s220 s240 s250 s
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 17L3—
SMBR: open loop response
Velardi S., A. Barresi, D. Manca, D. Fissore, Chem. Eng. J., 99 117–123, 2004
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 18L3—
SMBR: open loop response
Velardi S., A. Barresi, D. Manca, D. Fissore, Chem. Eng. J., 99 117–123, 2004
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 19L3—
Disturbance stop after 195 switches Disturbance stop after 310 switches
There are more periodic stationary conditions
SMBR: open loop response
Velardi S., A. Barresi, D. Manca, D. Fissore, Chem. Eng. J., 99 117–123, 2004
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 20L3—
The control problem
• FEATURES
The system may suddenly diverge to unstable operating conditions (even chaotic
behavior);
The network may shut-down;
The reactors may work in a suboptimal region.
• PROBLEM
The reactor network should work within an optimal operating range;
Such a range is often narrow and its identification may be difficult.
• SOLUTION
A suitable control system must be synthesized and implemented on-line to avoid
both shut-down and chaotic behaviors;
An advanced control system is highly recommended;
Model based control Model Predictive Control, MPC.
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 21L3—
Numerical modeling
• The model based approach to the control problem calls for the implementation of a
numerical model of the network that will be used for:
1. Identification of the optimal operating conditions;
2. Control purposes, i.e. to predict the future behavior of the system.
• The numerical model is based on a first principles approach:
The reactors are continuously evolving (they never reach a steady-state
condition) time derivative;
Each PFR reactor must be described spatially spatial derivative;
The reacting system is catalyzed (therefore it is heterogeneous). Consequently,
an algebraic term is required PDAE system.
The PDAE system is spatially discretized DAE system.
A total of 1067 differential and algebraic equations must be solved to
determine the dynamic evolution of the network.
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 22L3—
Mathematical tricks…
1
1
1nComp
iComp
G,iCompG,nComp yyStoichiometric closure:
H2
mola
r fr
act
ion
0 1 2 3Reactors
0.936
0.934
0.932
0.930
0.928
0.926
0.924
0.922
0.920
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 23L3—
Numerical solution of the DAE
Boolean matrix that shows the presence indexes of the differential-algebraic system
Specifically tailored numerical algorithm for tridiagonal block systems
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 24L3—
Numerical solution of the DAE
Boolean matrix that shows the presence indexes of the differential-algebraic system
Specifically tailored numerical algorithm for banded systems
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 25L3—
BzzDAEFourBlocks
Numerical solution of the DAE
Algebraic equationsAlgebraic variables
Differential equationsAlgebraic variables
Differential equationsDifferential variables
Algebraic equationsDifferential variables
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 26L3—
• Simulation time: 4000 s
• Switch time: 40 s
• Spatial discretization nodes: 97
• Number of equations per node: 11
• Total number of DAEs: 1067
• CPU: Intel® Pentium IV 2.4 GHz
• RAM: 512 MB
• OS: MS Windows 7 Professional
• Compiler: COMPAQ Visual Fortran 6.1
+ MICROSOFT C++ 6.0
Numerical solution of the DAE
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 27L3—
Numerical simulationCH
3O
Hm
ola
r fr
act
ion
0.045
0.040
0.035
0.030
0.025
0.020
0.015
0.010
0.005
0.0000 1 2 3
Reactors
0 1 2 3
TG
AS
[°C]
300
280
260
240
220
200
180
160
140
120
Reactors
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 28L3—
Numerical simulation
0.045
0.040
0.035
0.030
0.025
0.020
0.015
CH
3O
Hm
ola
r fr
act
ion
TG
AS
[°C]
310
300
290
280
270
260
250
0 1000 3000 4000
Switch time = 40 s
Time [s]
0 1000 3000 4000Time [s]
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 29L3—
Parametric sensitivity study
• Variability interval of the analyzed process variables
Variable Interval
Inlet gas temperature, Tin [K] 300÷593
Inlet gas velocity, vin [m/s] 0.0189÷0.0231
Switch time, tc [s] 1÷350
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 30L3—
Parametric sensitivity study
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 31L3—
Parametric sensitivity study
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 32L3—
Parametric sensitivity study
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 33L3—
Need for speed
• THE POINT: to simulate 100 switches of the inlet flow with a switch time of 40 s
(total of 4,000 s) the DAE system, comprising 1067 equations, takes about 95 s of
CPU time on a workstation computer.
• PROBLEM: the detailed first principles model requires a CPU time that is prohibitive
for model based control purposes.
• SOLUTION
A high efficiency numerical model in terms of CPU time is therefore required;
Such a model should be able to describe the nonlinearities and the articulate
profiles of the network of reactors;
Artificial Neural Networks, ANN, may be the answer.
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 34L3—
System identification
with ANN
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 35L3—
ANN architecture
Input variables Range
Inlet gas temperature, Tin [K] 423÷453
Inlet gas velocity, vin [m/s] 0.0189÷0.0231
Switch time, tc [s] 10÷50
Output variables
Mean methanol molar fraction, xCH3OH
Outlet gas temperature, TGAS [K]
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 36L3—
Levels# of
nodes
Activation
function
1 Input 40 Sigmoid
2 Intermediate 1 15 Sigmoid
3 Intermediate 2 15 Sigmoid
4 Output 1 Linear
# of weights and
biases840 + 31 = 871
Learning factor, a 0.716
Momentum, b 0.366
Linear activation
constant, m0.275
ANN architecture
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 37L3—
Random input patterns
455
450
445
440
435
430
425
425Tin
[K]
Inlet gas temperature
Inlet gas velocity
0.023
0.022
0.021
0.020
0.019
vin
[m/s
]
50
45
40
35
30
t c[s
]
25
20
15
10
Switch time
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Input patterns
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 38L3—
Initialization of weights + biases
Forward
BackwardERMS
)(ni)(noi?Ni
Random selection
Load of the input patterns
( ) OR ?av MAXn n N
)(nav
)(nix
)(niy
nNO YES
NO
)(niw
)(nib
LM equation
?
avnewav
( )new n
av
ERMS
Levemberg Marquard learning algorithm
SECOND ORDER ALGORITHM
YES
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 39L3—
Algorithms comparison
Iterations
ERM
S(log)
1
0.1
First order Pattern Mode
10
Second order LM
10-2
10-3
10-4
10-5
10-6
10-7
10-8100 5001
0.92 s
22.32 s16.37 s
0.86 s
50.86 s
85.37 s
230.03 s
778.42 s
3172.50 s 4581.86 s
127.80 s
110.25 s
First order Batch Mode
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 40L3—
The overlearning problem
Time [s]
CH
3O
Hm
ola
r fr
act
ion
0.041
0.040
0.039
0.038
0.037
0.036
0.035
0.034
0.033
0.032
Detailed model
II order
3000 4000 5000 6000 7000 90002000
50
40
30
20
10
t c[s
]
8000
I order
Disturbance on the switch time (from 30 to 10 s)
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 41L3—
Iterations
ERM
S1
0.1
Learning
10
Cross Validation
10-2
10-3
10-4
10-5
10-6
10-7
10-8100 5001
13th iterat. 31th iteration
The overlearning problem
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 42L3—
0.041
0.040
0.039
0.038
0.037
0.036
0.035
0.034
0.033
0.032
Detailed modelANN
100 200 300 400 500 6000
Pattern number
CH
3O
Hm
ola
r fr
act
ion
Rela
tive e
rror
0.45%
0.40%
0.35%
0.30%
0.25%
0.20%
0.10%
0.15%
0.00%
0.05%
700 800 900 1000
ANN cross-validation
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 43L3—
ANN disturbance response
Time [s]
CH
3O
Hm
ola
r fr
act
ion
0.041
0.040
0.039
0.038
0.037
0.036
0.035
0.034
0.033
0.032
Detailed model
ANN
3000 4000 5000 6000 7000 90002000
455450445440435430425420415
Tin
[K]
8000
Disturbance on the inlet temperature 438 443 433 [K]
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 44L3—
Time [s]
CH
3O
Hm
ola
r fr
act
ion
0.041
0.040
0.039
0.038
0.037
0.036
0.035
0.034
0.033
0.032
Detailed modelANN
3000 4000 5000 6000 7000 90002000
50
40
30
20
10
t c[s
]
8000
Disturbance on the switch time 30 45 [s]
ANN disturbance response
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 45L3—
Time [s]
CH
3O
Hm
ola
r fr
act
ion
0.041
0.040
0.039
0.038
0.037
0.036
0.035
0.034
0.033
0.032
Detailed model
ANN
3000 4000 5000 6000 7000 90002000
0.023
0.022
0.021
0.020
0.019
Vin
[m
/s]
8000
ANN disturbance response
Disturbance on the inlet velocity 0.021 0.0194 [m/s]
© Davide Manca – Dynamics and Control of Chemical Processes – Master Degree in ChemEng – Politecnico di Milano 46L3—
ANN CPU times
MISO MIMO
ANN output variables CH3OH TG CH3OH+TGAS
# of output nodes 1 1 2
# of weights and biases 840+31=871 840+31=871 855+32=887
Jacobian matrix dimensions 4000 x 871 4000 x 871 8000 x 887
CPU time for evaluating JTJ [s] 17.38 17.37 49.13
Learning procedure CPU time 3h 14 min 3h 13 min 8 h 18 min
CPU time for a single ANN
simulation [s]8.08E-6 8.23E-6 8.86E-6
ABOUT 6 ORDERS OF MAGNITUDE
IMPROVEMENT BETWEEN THE FIRST
PRINCIPLES MODEL AND THE ANN
ON-LINE FEASIBILITY OF
MODEL BASED CONTROL