active constraints

1
Active constraint regions for
optimal operation of chemical
processes
Magnus Glosli Jacobsen
PhD defense presentation
November 18th, 2011
2
Outline
1. Optimal operation of chemical processes
2. Identifying active constraint regions
3. Case studies
1. Reactor-separator-recycle process
2. Distillation
4. Optimization of natural gas liquefaction plants
•
•
Challenges in optimization of liquefaction processes
Active constraint regions for a simple liquefaction process
5. Conclusions and suggestions for future work
3
Outline
1. Optimal operation of chemical processes
2. Identifying active constraint regions
3. Case studies
1. Reactor-separator-recycle process
2. Distillation
4. Optimization of natural gas liquefaction plants
•
•
Challenges in optimization of liquefaction processes
Active constraint regions for a simple liquefaction process
5. Conclusions and suggestions for future work
4
Optimal operation of chemical
processes
•
Optimal operation: Use process inputs to
1. Satisfy constraints
2. Maximize profit
•
•
Processes are subjected to disturbances
Disturbances will change the optimal conditions!
– Consider an example with two inputs, linear constraints and a
quadratic objective function:
5
6
7
8
Mathematical description
•
•
•
•
J is the cost function which we seek to minimize
f contains the model equations, which give x for given u and d
c contains the constraints imposed on the problem
x, u and d are internal states, inputs and disturbances,
respectively
9
Active constraint regions
• At the optimal solution, some c will be equal to 0, and
some will be smaller than 0. Those which are equal
to 0 are called the active constraints.
• As d changes, the optimal solution changes, and so
does the active set.
• The disturbance space can be divided into regions
with different active sets.
• Next: Why are these regions important?
10
Self-optimizing control
•
In order to have self-optimizing control, we need to
control:
1. Active constraints!
2. Other variables whose optimal values are insensitive to
disturbances.
•
•
When the set of active constraints (1) changes, the
variables included in (2) may change as well
Thus we need to know the regions
11
Regions example
• Two disturbances d1 and d2, two constraints c1≤c1,max and
c2≤c2,max
12
Outline
1. Optimal operation of chemical processes
2. Identifying active constraint regions
3. Case studies
1. Reactor-separator-recycle process
2. Distillation
4. Optimization of natural gas liquefaction plants
•
•
Challenges in optimization of liquefaction processes
Active constraint regions for a simple liquefaction process
5. Conclusions and suggestions for future work
13
Finding the regions
• Simple problems: Just optimize at many points
across the entire disturbance range
• Chemical engineering problems are usually not
simple
• For N independent constraints that may either be
active or inactive, we may have N2 regions
• We need a strategy to simplify the problem!
14
Finding the regions II
At any solution uopt of the optimization problem, the KaruschKuhn-Tucker conditions are satisfied:
L(uopt , opt )  0 ,where L  J (u )    c(u )
cactive (uopt )  0
cinactive (uopt )  0
i  0 for all i
ci  xi  0 for all i
15
Finding the regions III
• The optimal u, c and λ are dependent on d
• At a particular d, for the i’th constraint, either ci or λi is zero
• When the i’th constraint switches from active to inactive, we
have that ci + λi = 0
• In other words, to find when a constraint changes from active to
inactive, we solve the following equation by interpolation:
si (d ) ci (d )  i (d )  0
16
Finding the regions IV
• Still, we need to optimize a number of times
• How can we simplify the task?
• Use process and problem knowledge!
– Identify the most important disturbances
– Are any constraints independent of one disturbance?
– Are any combinations of active constraints physically impossible or
unrealistic?
– Do we know the bounds of the feasible part of the disturbance
space?
17
Constraint lines/curves
• A constraint curve is a curve which divides the
disturbance space into a part where a given
constraint is active, and a part where it is inactive
• If the constraint curve is straight, we will call it a
constraint line
• Each region is defined by the curves which bound it
• Thus, we need to draw the constraint curves
18
Summary of the method
1. Find out which disturbances d are important, and
their range
2. Find, from process and problem knowledge, whether
any constraints will be active for all d
3. Find out if some constraint curves/lines will be
independent of one disturbance
•
In the two-dimensional case this will lead to a vertical or horizontal
curve (line) segment
4. Then find sufficiently many points to draw each
curve
19
Outline
1. Optimal operation of chemical processes
2. Identifying active constraint regions
3. Case studies
1. Reactor-separator-recycle process
2. Distillation
4. Optimization of natural gas liquefaction plants
•
•
Challenges in optimization of liquefaction processes
Active constraint regions for a simple liquefaction process
5. Conclusions and suggestions for future work
20
Case study I: Stirred tank reactor
with distillation and recycle
21
Process description
• The reactant A reacts to B (desired product) and C
(undesired by-product) in a CSTR:
AB
(1)
A  2C
(2)
• B is the heavier product, and is separated from A and
C in a distillation column (B leaves in the bottom)
• A fraction of the distillate stream is purged, the rest is
mixed with fresh A and fed back to the reactor.
22
Process description
• Reaction (1) is favored by
low temperature
• C is the most volatile
component, followed by A
• Nominal feed rate of pure A
is F0 = 1 mol/s
23
Degrees of freedom
• Feed flow rate is considered a disturbance, so there
are five degrees of freedom:
–
–
–
–
–
Recycle/purge ratio P/D
Reactor holdup Mr
Reactor temperature Tr
Column reboiler duty QR
Column condenser duty QC
24
Optimization objective
The objective is written as follows:
J = pFF + pVV – pBB –pPP
with the following prices:
25
Constraints
1.
2.
3.
4.
5.
xB ≥ XB,B,min
Tr ≤ Tr,max
Mr ≤ Mr,max
V ≤ Vmax
P ≤ Pmax
In addition, all flows must be
larger than zero
26
Disturbances
• Feed flow rate F: If the process is part of a large
plant, e.g. a refinery, the feed flow rate may be set
elsewhere. If it is set locally, it may be considered a
degree of freedom.
• Energy price pV: This parameter may potentially vary
a lot, for example if the plant operator must change
between alternative energy sources.
27
Nominal operating point
• F, xB,B, Tr, Mr, L and P/D were
set
• The remaining variables
were calculated
28
Results: Constraint regions
29
30
Optimal values of variables
31
Summary
• The interpolation method worked well, but:
• Care had to be taken when choosing end points for
interpolation
• Only one curve was found to have a straight segment
(between regions IV and V)
32
Outline
1. Optimal operation of chemical processes
2. Identifying active constraint regions
3. Case studies
1. Reactor-separator-recycle process
2. Distillation
4. Optimization of natural gas liquefaction plants
•
•
Challenges in optimization of liquefaction processes
Active constraint regions for a simple liquefaction process
5. Conclusions and suggestions for future work
33
Distillation case studies
1. One distillation column with two products and fixed
product prices
2. One distillation column with two products and
variable price for the more valuable product
3. Two distillation columns with three products and
fixed product prices
34
One-column case studies
•
•
•
Degrees of freedom: Two
steady-state degrees of
freedom (e.g. L and V)
Disturbances: Feed flow F
and energy price pV
Constraints:
1. V ≤ Vmax
2. xD ≥ xD,min
3. xB ≥ xB,min
(mole fractions of main
components)
35
One column: Objectives
• The two case studies have different objective
functions:
• Case study Ia uses fixed prices:
J = pFF + pVV – pBB –pDD
• Case study Ib: No payment for impurity in distillate,
J = pFF + pVV – pBB –pDDxD
36
One column: Data
37
Finding regions for distillation
• Case 1a: xD is always active because of the ”avoid
product giveaway rule”.
• Border between ”only V1 active” and ”V1 plus one
purity constraint” regions must be vertical, because:
• When V1 is at its maximum, the optimal solution is
independent of pV
• Borders between regions where only purity
constraints are active, will be horizontal (independent
of F), because:
• Optimal flow ratios depend on pV only
38
Regions for case study Ia
39
Regions for case study Ib
40
Summary, one column
• There is a physical bottleneck at F = 1.44 mol/s,
above this we cannot satisfy all constraints
• The use of a priori knowledge reduces the number of
optimizations needed
• The change in price policy turns the order of purity
constraints ”upside down”:
– In case 1a, xB is active only at high values of pV
– In case 1b, xB becomes active before xD as pV increases
41
II: Two distillation columns
42
Description
• A is the most volatile
component and C the least
volatile
• B is most valuable product
• Maximum boilup in column 2
is half of maximum boilup in
column 1
43
Objective and constraints
•
•
Objective function:
J = pFF + pV(V1+V2) – pAD1 – pBD2 –pCB2
Constraints:
1.
2.
3.
4.
5.
•
V1 ≤ V1,max
V2 ≤ V2,max
xA ≥ xA,min
xB ≥ xB,min
xC ≥ xC,min
5 constraints potentially gives 25 = 32 regions
44
Regions map for case II
45
Control of two columns in series
46
Outline
1. Optimal operation of chemical processes
2. Identifying active constraint regions
3. Case studies
1. Reactor-separator-recycle process
2. Distillation
4. Optimization of natural gas liquefaction plants
•
•
Challenges in optimization of liquefaction processes
Active constraint regions for a simple liquefaction process
5. Conclusions and suggestions for future work
47
Optimization of LNG plants
• Recall the general
optimization problem
• f: Model equations who
describe the relationship
between states x, inputs u
and disturbances d
• c: Constraints, conditions
that we impose on the
problem.
48
Optimization of LNG plants
• The objective is often simple – either:
– Minimize energy consumption for a given production rate, or
– Maximize the production rate
• The optimization problem:
– Is nonlinear
– May be non-convex
– May have discontinuous constraints (e.g. when phase changes
occur)
49
Different approaches to solving
• In chemical engineering, the model equations (f) are
often solved for x by a flowsheet simulator (i.e.
Hysys, Aspen, Pro II)
• The optimization solver then only changes u, not x,
and the solver handles a problem with only inequality
constraints
• Some model equations may be left for the
optimization solver
50
Different approaches to solving
• Which equations to include in the optimization
problem, and which ones to leave to the simulator?
– Will the simulator be able to solve the equations for all allowed
values of u?
– Will the overall solution of the problem be more efficient when
leaving equations to the optimization solver?
• Example: Solving a simple counter-current heat
exchanger model
51
Example: Heat exchanger model
52
Example: Heat exchanger model
53
Different approaches to solving
• Many process models include recycles/tear streams
• Recycle convergence:
– Include in optimization problem?
– Keep within simulator?
• This depends on which solver is more likely to reach
convergence
• Test: Liquefaction part of a C3-MR process
54
C3-MR process
• Most widely used process for liquefaction of natural
gas
• Uses propane (C3) for precooling down to -40°C
• Precooling loop has three pressure levels
• Uses a mixed refrigerant (MR) for liquefaction in a
spiral-wound heat exchanger (MCHE)
• MR consists of methane, ethane, propane and N2
• Natural gas leaves this exchanger at -157°C
55
56
Model, liquefaction part
57
Different model formulations
1. Specify temperatures in the MCHE model
•
Must add heat exchanger area specifications as equality constraints in
optimization, but the recycles are not needed
2. Specify heat exchanger UA values, and include recycle
convergence in optimization problem
3. Specify heat exchanger UA values, and let the simulator
solve recycles
•
Gives the lowest dimension for the optimization problem as seen by the
optimization solver
58
Testing of model formulations
• How frequently would the simulator fail to solve ”its
part”?
• Each of six disturbances was varied over a range
around their nominal values:
– High and low MR pressure
– MR flow rate
– MR mole fractions of ethane, propane and nitrogen
59
Result, testing of model
formulations in Unisim
60
Testing of model formulations:
Solving remaining equations
• In Formulation I, we need to solve
UAcalculated(T)=UAspecified
• In formulation II, we need to converge the recycles
xrecycle,guessed = xrecycle,calculated
• This is basically a comparison between external
equation solvers and the internal solvers of the
simulator
61
Results
•
Tolerances set to match internal
simulator tolerances
•
Formulation I (table 5.4 from
thesis): MATLAB solves for
UAcalculated(T)=UAspecified
•
Formulation II (table 5.5 from
thesis): MATLAB solves
recycles
62
Summary, testing of different
model formulations
• Best solution overall: Using a dedicated equationsolver to converge recycles
• Best solution with optimization solver: Use model
formulation I together with an algorithm which
honours bounds on decision variables
63
Summary, challenges in optimization of
liquefaction processes
• How we formulate the problem, has an impact on the
likelihood of solving it
• If the calculations are carried out on several levels,
the bottom level should be defined in such a way that
it is certain to converge
• In the thesis, another example is given (consequence
of discontinuous constraint functions)
64
Outline
1. Optimal operation of chemical processes
2. Identifying active constraint regions
3. Case studies
1. Reactor-separator-recycle process
2. Distillation
4. Optimization of natural gas liquefaction plants
•
•
Challenges in optimization of liquefaction processes
Active constraint regions for a simple liquefaction process
5. Conclusions and suggestions for future work
65
Active constraint regions for a
simple liquefaction process
• The PRICO process is a simple liquefaction process with one
multi-stream heat exchanger.
66
Nominal conditions
• Feed flow rate: 15 170 kmol/h
• Temperature of gas and refrigerant after water
cooling: 30°C
• Turbine outlet pressure: 10.29 barg
• Compressor inlet pressure: 4.445 barg
• Compressor speed: 1000 rpm
• Refrigerant flow rate: 69 300 kmol/h
67
Key variables, compared to
Jensen and Skogestad (2008)
• Jensen’s work is done using gPROMS, this work using
Honeywell Unisim
68
Objective and degrees of
freedom
• Optimization objective: Minimize compressor work
(so J = Ws)
• Five degrees of freedom for operation:
–
–
–
–
–
Amount of cooling in condenser
Compressor speed
Turbine speed
Main choke valve opening
Active charge (level in liquid receiver)
69
Constraints
1. Exit temperature for natural gas, TNG,out ≤ -157°C
(always active)
2. Refrigerant to compressor must be superheated,
ΔTsup > 5°C
3. Compressor must not operate in surge, ΔMsurge > 0
4. Maximum compressor work, Ws ≤ 132MW
5. Turbine exit stream must be liquid only, ΔPsat > 0
6. Maximum compressor speed: ωcomp ≤ ωmax =
1200rpm
70
Disturbances
• Feed flow rate (relative to nominal), F/Fnominal
• Ambient temperature Tamb in °C
• Since cooling water is cheap compared to
compression power, natural gas and refrigerant
entering the main heat exchanger are cooled as
much as possible
• Thus, the disturbance sets the temperature of these
streams directly
71
Optimum at nominal F and Tamb
72
Regions for PRICO process
73
Regions for PRICO process II
There are five regions, with the following active constraints:
I.
TNG,out and ΔMsurge are active
II. TNG,out, ΔTsup and ΔMsurge are active
III. TNG,out, ΔTsup, ΔPsat and ωmax are active
IV. TNG,out, ΔTsup and ωmax are active
V. TNG,out and ωmax are active
74
Control of PRICO process
• 5 regions  5 control structures?
• ΔPsat is optimally close to zero in all regions
– Keep it at zero to simplify
• Surge margin and max speed are closely connected
– Use compressor speed to control ΔMsurge when ωopt < ωmax
• We can use two control structures!
– One for Regions I and V (where ΔTsup is inactive)
– One for Regions II, III and IV (where ΔTsup is active)
75
Control structure
76
Conclusions, PRICO case study
• 5 different active constraint regions were found
• Near-optimal control can be achieved with only two
control structures
77
Outline
1. Optimal operation of chemical processes
2. Identifying active constraint regions
3. Case studies
1. Reactor-separator-recycle process
2. Distillation
4. Optimization of natural gas liquefaction plants
•
•
Challenges in optimization of liquefaction processes
Active constraint regions for a simple liquefaction process
5. Conclusions and suggestions for future work
78
Conclusions
• A method for identifying active constraint regions has
been described
• The method has been illustrated with case studies in
distillation and natural gas liquefaction
• Challenges in optimization of liquefaction processes
have been addressed
79
Directions for future work
• A more analytical approach to finding active
constraint regions may be taken
– Use ideas from multiparametric programming?
• For LNG: Look into self-optimizing control
– Can the results for the PRICO process be generalized to more
complex processes?