Optimal Operation of IntegratedChemical ProcessesWith Application to Ammonia Synthesis
Julian Straus
2
Presentation Outline
1. Introduction– Ammonia Process (Chapter 2)
– Optimal Operation (Chapter 3)
2. Optimal Operation for Subprocesses– Economic Nonlinear Model Predictive Control (Chapter 5)
– Self-optimizing Control with Extremum-Seeking Control (Chapter 6+7)
– Feedback Real-time Optimization (Chapter 8)
3. Optimal Operation through Introduction of Surrogate Models– Main Procedure (Chapter 10)
– Variable Reduction using PLS Regression (Chapter 11+12)
– Application of Self-optimizing Variables (Chapter 13)
– Sampling for Surrogate Model Generation (Chapter 14)
4. Conclusion
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
17.August2018
3
Presentation Outline
1. Introduction– Ammonia Process (Chapter 2)
– Optimal Operation (Chapter 3)
2. Optimal Operation for Subprocesses– Economic Nonlinear Model Predictive Control (Chapter 5)
– Self-optimizing Control with Extremum-Seeking Control (Chapter 6+7)
– Feedback Real-time Optimization (Chapter 8)
3. Optimal Operation through Introduction of Surrogate Models– Main Procedure (Chapter 10)
– Variable Reduction using PLS Regression (Chapter 11+12)
– Application of Self-optimizing Variables (Chapter 13)
– Sampling for Surrogate Model Generation (Chapter 14)
4. Conclusion
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
17.August2018
4
Ammonia Process
• Haber Bosch process: Fixation of atmospheric nitrogen
• Developed in 1910s
• Strong competition and high energy demand Integration of the process Difficult optimization of the process
• Split into 2 sections1. Synthesis gas production
2. Ammonia synthesis
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
1. I
ntro
du
ctio
n
2 2 33H N 2NH
17.August2018
Chapter 2
5
Optimal Operation
• Aim: minimizing production cost through process control
• Control structure frequently hierarchical
• Optimal operation results in an optimization problem
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
1. I
ntro
du
ctio
n
Scheduling(weeks)
Site-wide optimization(day)
Local optimization(hour)
Supervisory control(minutes)
Regulatory control(seconds)
0( ), ( )min ( ), ( ), ( )( )
. .
dynJ t t t dt
ts
x ux d u
0
( ), ( ), ( ) , [0, )
( ), ( ), ( ) , [0, )
(0)
x f x d u
0 h x d u
x x
t t t t
t t t t
17.August2018
Chapter 3
S. Skogestad, Plantwide control: the search for the self-optimizing control structure, J. Proc Control. 10 (2000) 487-506
6
Optimal Operation
• Implementation of optimal operation
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
1. I
ntro
du
ctio
n
y
u
Optimizer
Process
Objective
d
Open-loop
yu
Optimizingcontroller
Process
Objective
d
Closed-loopwithout control layer
Closed-loopwith control layer
yu
cs
Controller
Optimizer
Process
Objective
H
˗+
d
( )c H ym
17.August2018
S. Skogestad, Plantwide control: the search for the self-optimizing control structure, J. Proc Control. 10 (2000) 487-506
7
Optimal Operation- Integrated Processes
• Optimizer for dynamic or steady-state optimization problem required
Model of the process
• Problems of integrated process:– Nested Recycle Loops
– Convergence of the Flowsheet
– Simulation noise
• Two different approaches1. Optimal operation of subprocesses
2. Simplified model for optimization of the overall process
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
1. I
ntro
du
ctio
n
17.August2018
8
Presentation Outline
1. Introduction– Ammonia Process (Chapter 2)
– Optimal Operation (Chapter 3)
2. Optimal Operation for Subprocesses– Economic Nonlinear Model Predictive Control (Chapter 5)
– Self-optimizing Control with Extremum-Seeking Control (Chapter 6+7)
– Feedback Real-time Optimization (Chapter 8)
3. Optimal Operation through Introduction of Surrogate Models– Main Procedure (Chapter 10)
– Variable Reduction using PLS Regression (Chapter 11+12)
– Application of Self-optimizing Variables (Chapter 13)
– Sampling for Surrogate Model Generation (Chapter 14)
4. Conclusion
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
17.August2018
9
• Three bed ammonia reactor
• Three manipulated variables u
• Heat integration for reduced cost through reactor outlet heat exchanger
• Cost function: rate of extent of reaction x
• Exhibits limit cycle and reactor extinction
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
tima
l Op
era
tion
of
Sub
pro
cess
es2
.
Case Study – Ammonia Reactor
x 3 3Inlet NH Outlet NH, ,Inlet 3in [kg NH /s]m w w
Bed 1
Bed 2
Bed 3
Inlet
Outlet
u1
u2
u3
17.August2018
J. Morud, S. Skogestad, Analysis of Instability in an Industrial Ammonia Reactor, AIChE J. 44 (1998) 888-895
Chapter 4
10
• Solves dynamic optimization problem for a time horizon
• Implements first calculated input of the trajectory
• Problems:– Required time for solving the optimization problem
– Feasibility of the solution to the optimization problem and stability
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
tima
l Op
era
tion
of
Sub
pro
cess
es2
.
Economic Nonlinear Model Predictive Control
0( ), ( )min ( ), ( ), ( )
. .
( )max
dy
t
nJ t t t dt
s t
x ux d u
0
]( ), ( ), ( ) , [0,
( ), ( ), ( ) , [0,
(0)
]
max
max
t t t t t
t t t t t
x f x d u
0 h x d u
x x
maxt
yu
Optimizingcontroller
Process
Objective
d
Closed-loopwithout control layer
17.August2018
Chapter 5
11
• Constant setpoint policy
Selection of controlled variables
• Based on steady-state optimization consideringthe disturbances and local linearization
• What happens if remaining plant is neglectedwhen calculating H?
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
tima
l Op
era
tion
of
Sub
pro
cess
es2
.
Self-optimizing Control (SOC)
c Hy
d0 yd0
uController Local plant
y
c
-cs
H
Remaining plant
dGlobal
plant
Closed-loopwith control layer
yu
cs
Controller
Optimizer
Process
Objective
H
˗+
d
( )c H ym
17.August2018
Chapter 6
12
Requires adjustment of setpoint to controllers
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
tima
l Op
era
tion
of
Sub
pro
cess
es2
.
Self-optimizing Control (SOC)Lo
ss [%
]Lo
ss [%
]
Loss
[%]
Loss
[%]
Original Setpoint Adjusted Setpoint17.
August2018
13
• Extremum-seeking control as optimizing layer for setpoint adjustment
• Self-optimizing control for fast close-to-optimal disturbance rejection
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
tima
l Op
era
tion
of
Sub
pro
cess
es2
.
Self-optimizing Control (SOC) + Extremum-seeking Control (ESC)
Extremum-seeking
controller
y
u
Processd
Setpointcontrol
H
J(y)
u cs
cm
dither
Ju
17.August2018
Chapter 7
14 Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
tima
l Op
era
tion
of
Sub
pro
cess
es2
.
Self-optimizing Control (SOC) + Extremum-seeking Control (ESC)
17.August2018
15
• ESC rather slow
• E-NMPC complicated through online optimization
• Translation of optimization problem into afeedback problem:
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
tima
l Op
era
tion
of
Sub
pro
cess
es2
.
Feedback Real-time Optimization
yu
Optimizingcontroller
Process
Objective
d
Closed-loopwithout control layer
y
uProcess
d
Contoller(PI)
,s uJ 0
ymeas
ny1ˆ uJ CA B D
, ,
, ,
.
y
f x d u
y h x d
x
u
Linearizemodel from
u to J
Gradientestimation
ˆˆ,x d
A B
C D
17.August2018
Chapter 8
16 Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
tima
l Op
era
tion
of
Sub
pro
cess
es2
.
Feedback Real-time OptimizationFlowrate Disturbance
(measured)Activity disturbance
(estimated)17.
August2018
17
Presentation Outline
1. Introduction– Ammonia Process (Chapter 2)
– Optimal Operation (Chapter 3)
2. Optimal Operation for Subprocesses– Economic Nonlinear Model Predictive Control (Chapter 5)
– Self-optimizing Control with Extremum-Seeking Control (Chapter 6+7)
– Feedback Real-time Optimization (Chapter 8)
3. Optimal Operation through Introduction of Surrogate Models– Main Procedure (Chapter 10)
– Variable Reduction using PLS Regression (Chapter 11+12)
– Application of Self-optimizing Variables (Chapter 13)
– Sampling for Surrogate Model Generation (Chapter 14)
4. Conclusion
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
17.August2018
18
• Detailed models often computational expensive to solve
• Introduction of surrogate models reduces computation load
• Surrogate model:Simple input (u)-output (ysurr) representation ( ) of a detailed model
• Input: Connection and decision variables
• Output: Connection and economic variables
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Surrogate Model
'( )surry g u
17.August2018
u Detailedmodel
ysurr
19
Original (steady-state) optimization problem:
1. Split original model g into n submodels gi
2. Calculate surrogate models gi,k’ for submodels gi
3. Combine surrogate models in big model through connection constraints
4. Optimize new problem
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Main Procedure
,min , ,
.
(
.
)
s
J
tx u
x d u
, ,
, ,
0 g x d u
0 h x d u
,min , ,
.
(
.
)x u
x u d
s
J
t
, , ,
, ,
' , ,
,
1
, 1
1
, ,
i k i k i k i i
i k i k
i i i i
i n k i
i n k i
i n
0 y g d z u
0 z y
0 h x d u
17.August2018
Chapter 10
, ,i k i k0 z y
20 Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Main Procedure- Ammonia Synthesis
u2 d2
Reaction
z1,2 y1,2
u1 d1
SynGasMakeUp
Feed
d3u3
SeparationRefrigeration
y3,1
z3,1
y2,3 z2,3
NH3
17.August2018
1,2 1,20 z y
3,1 3,10 z y
2,3 2,30 z y
P-243
21
• Connection variables can result in high number of independent variables nu
• Sampling and surrogate model fitting computation expensive with high nu
• Reduction necessary:1. Introduction of linear mass balances
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Variable Reduction using PLSR
yl
y
ynlSurrogateDefinition
u
LinearBalances
yaux
17.August2018
Chapter 11
22
• Connection variables can result in high number of independent variables nu
• Sampling and surrogate model fitting computation expensive with high nu
• Reduction necessary:1. Introduction of linear mass balances
2. Reduction of nu through PLSR:
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Variable Reduction using PLSR
u’DimensionReduction
yl
y
ynlSurrogateDefinition
u
LinearBalances
yaux
Tu W u
17.August2018
Chapter 11
23
• Connection variables can result in high number of independent variables nu
• Sampling and surrogate model fitting computation expensive with high nu
• Reduction necessary:1. Introduction of linear mass balances
2. Reduction of nu through PLSR:
3. Fitting of surrogate model using new latent and dependent variables
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Variable Reduction using PLSR
' uun n
u’DimensionReduction
yl
y
ynlSurrogateDefinition
u
LinearBalances
yaux
nlsurr
aux
yy
y
Tu W u
17.August2018
nl
ly
y
y
Chapter 11
24
• Reaction section, ammonia synthesis loop– 7 feed variables
– 3 manipulated variables
– 3 dependent variables
• Surrogate model structure
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Variable Reduction using PLSR
nS2
nS1
THEx
2 2 3 4, , , Ar,
T
H N NH CH ,z in in in in iin n nip T n n n n n
T1 2S S HExMV n n T
Tsurrout outp Ty
1 1
2 2
, ,
T
3 3
1,2,3 (1)
( ) (2)
( ) (3)
(5)
( ) (4)
x
x
u
u
u W u
u
out
out
i out i in i
k k
n n
k
p g
T g
g
17.August2018
25 Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Variable Reduction using PLSR- Outlet Pressure
1 2 3 4 5 6 7 8 9
max 𝜀[%]
0.00
0.25
0.20
0.15
0.10
0.05
0.30
3.5
0 %
0.7
3 %
0.4
6 %
Number of latent variables nu‘
0.000
0.025
0.020
0.015
0.010
0.005
0.030
1 2 3 4 5 6 7 8 9
𝜀[%]
Number of latent variables nu‘0.
856
%0.
191
%0.
056
%
17.August2018
26 Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Variable Reduction using PLSR- Extent of Reaction
1 2 3 4 5 6 7 8 9
max 𝜀[%]
Number of latent variables nu‘
3.5
4.0
0.0
2.5
2.0
1.5
1.0
0.5
3.0
14.3
%6.
5 %
4.3
%
1 2 3 4 5 6 7 8 9
𝜀[%]
Number of latent variables nu‘
0.0
0.5
0.4
0.3
0.2
0.1
0.6
0.7
0.8
3.5
7 %
1.1
8 %
17.August2018
27
• Idea: Simplify response surface through change of independent variables (sample interesting regions)
• Initial independent variables:– Feed
– Manipulated variables
• Initial dependent variables– Output
• Change of variables from u to c via self-optimizingcontrol principles, i.e. add equality constraints:
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Application of Self-optimizing Variables
Bed 1
Bed 2
Bed 3
Inlet
Outlet
u1
u2
u3
3 2 2
T
NH , H /N ,in in in in inm p T w R z
T1 2 3u u u u
surr
outTy
SOCg c Hy 0
17.August2018
Chapter 13
28
• Aim: Maximize rate of extentof reaction
• Local SOC variables per bed
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Application of Self-optimizing Variables
Bed 1
T10
out
Bed 2Bed 3
T20T30 w30
u3
in
u2 u1
Tin,1Tin,2Tin,3
17.August2018
29
• Aim: Maximize rate of extentof reaction
• Local SOC variables per bed
• 4 different SOC variablecombination tested
– Inlet temperatures
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Application of Self-optimizing Variables
Bed 1
T10
out
Bed 2Bed 3
T20T30 w30
u3
in
u2 u1
Tin,1Tin,2Tin,3
17.August2018
30
• Aim: Maximize rate of extentof reaction
• Local SOC variables per bed
• 4 different SOC variablecombination tested
– Inlet temperatures
– Inlet and outlet temperatures
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Application of Self-optimizing Variables
Bed 1
T10
out
Bed 2Bed 3
T20T30 w30
u3
in
u2 u1
Tin,1Tin,2Tin,3
17.August2018
31
• Aim: Maximize rate of extentof reaction
• Local SOC variables per bed
• 4 different SOC variablecombination tested
– Inlet temperatures
– Inlet and outlet temperatures
– 1 optimal temperature per bed
– 2 optimal temperatures per bed
• Error with respect to true optimum
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Application of Self-optimizing Variables
Bed 1
T10
out
Bed 2Bed 3
T20T30 w30
u3
in
u2 u1
Tin,1Tin,2Tin,3
17.August2018
32
Extent of reaction
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Application of Self-optimizing Variables
4.3
5 %
0.7
4 %
In In-Out Opt 1 Opt 20.0
0.5
0.4
0.3
0.2
0.1
0.6
max 𝜖[%]
0.00
0.10
0.08
0.06
0.04
0.02
0.12
𝜖[%]
17.August2018
33
• Limit cycle behavior and reactor extinction close to optimal point
• Complicates normal sampling
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Application of Self-optimizing Variables
17.August2018
34
• Sampling crucial for:– Performance of surrogate model
– Computational expense
• Common sampling approaches– Predefined
– Adaptive
• Aim: Sampling without– Surrogate model fitting
– Over-sampling
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Sampling for Surrogate Model Generation
Development of a sampling methodbased on partial least square regression
17.August2018
Chapter 14
35 Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s
• Weights Wk change with growing sampling space ( )
• Convergence of the significant weights
3
Sampling for Surrogate Model Generation
17.August2018 T u W u
36
• Convergence corresponds to flattening in error improvement:Reaction section ( sampled points)
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
Op
timal
Op
era
tion
thro
ugh
Intr
od
uctio
n o
f Su
rro
gate
s3
Sampling for Surrogate Model Generation
10-2 10-1 100
10-2
10-1
100
10-2 10-1 100100
101
102
103n
p= 100
np
= 200
np
= 500n
p= 1000
np
= 100
np
= 200
np
= 500n
p= 1000
2000pn
17.August2018
37
Presentation Outline
1. Introduction– Ammonia Process (Chapter 2)
– Optimal Operation (Chapter 3)
2. Optimal Operation for Subprocesses– Economic Nonlinear Model Predictive Control (Chapter 5)
– Self-optimizing Control with Extremum-Seeking Control (Chapter 6+7)
– Feedback Real-time Optimization (Chapter 8)
3. Optimal Operation through Introduction of Surrogate Models– Main Procedure (Chapter 10)
– Variable Reduction using PLS Regression (Chapter 11+12)
– Application of Self-optimizing Variables (Chapter 13)
– Sampling for Surrogate Model Generation (Chapter 14)
4. Conclusion
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
17.August2018
38
Conclusion
• Optimal operation methods– Self-optimizing control in recycle systems
– Combination of self-optimizing control and extremum-seeking control for removal of steady-state loss
– Feedback real-time optimization for fast disturbance rejection
• Optimization of integrated process– Method for surrogate model-based optimization
– Independent variable reduction through PLS regression
– Simplification of response surface through self-optimizing variables
– Termination criteria for sampling without the need of surrogate model fitting
Julian Straus | Optimal Operation of Integrated Chemical Processes – With Application to the Ammonia Synthesis
4. C
oncl
usi
on
17.August2018
Thank you for attending my defense