Professional Documents
Culture Documents
a r t i c l e i n f o a b s t r a c t
Article history: This paper presents the application of self-optimizing concepts for more efficient generation of steady-
Received 8 April 2018 state surrogate models. Surrogate model generation generally has problems with a large number of in-
Revised 7 August 2018
dependent variables resulting in a large sampling space. If the surrogate model is to be used for op-
Accepted 24 August 2018
timization, utilizing self-optimizing variables allows to map a close-to-optimal response surface, which
Available online 25 August 2018
reduces the model complexity. In particular, the mapped surface becomes much “flatter”, allowing for a
Keywords: simpler representation, for example, a linear map or neglecting the dependency of certain variables com-
Self-optimizing control pletely. The proposed method is studied using an ammonia reactor which for some disturbances shows
Surrogate model limit-cycle behaviour and/or reactor extinction. Using self-optimizing variables, it is possible to reduce
Sampling domain definition the number of manipulated variables by three and map a response surface close to the optimal response
B-Splines surface. With the original variables, the response surface would include also regions in which the reactor
Optimization of integrated processes
is extinct.
Steady-state optimization
© 2018 Elsevier Ltd. All rights reserved.
https://doi.org/10.1016/j.compchemeng.2018.08.031
0098-1354/© 2018 Elsevier Ltd. All rights reserved.
144 J. Straus, S. Skogestad / Computers and Chemical Engineering 119 (2018) 143–151
ci = Hi yi (14)
ny
where yi ∈ R i are the selected measurements to replace the in-
dependent variables ui and ci ∈ Rnui are the local self-optimizing
Fig. 3. Example for mapping the optimal response surface using the Rosenbrock variables
function as case study.
To this effect, we define a local cost function Ji (xi , di , ui ) and
consider the following local optimization problem
This variable change is illustrated in Fig. 2 using a block dia- min Ji (xi , di , ui )
xi ,ui
gram. The controller K has integral action so that we have perfect
s.t. 0 = gi ( xi , di , ui ) (15)
control at steady state (ci = ci,s ). Note that Fig. 2 is just for illus-
0 ≥ hi ( xi , di , ui )
trating how we can change the independent variables from ui to ci ,
and there are no dynamics present in the surrogate model. The ob- As shown in Appendix A, we need to define the expected dis-
jective is that with this change in independent variables, the sur- turbance set through the weight Wd and the expected “noise”
rogate models become much simpler, for example linear, and in (caused by numerical errors) in the measurements yi through the
some cases we may even eliminate variables. weight Wny . The self-optimizing variables
are then
obtained as the
set ci = Hi yi which minimizes Ji ci , d ˜ i . If we neglect
˜ i − Ji,opt d
3.1. Motivating example “noise”, then we may use the nullspace method (Alstad and Sko-
gestad, 2007), but in this paper we include “noise” and use the ex-
As a motivating illustration of the concept, consider the Rosen- act local method, (Alstad et al., 2009) as described in more detail
brock function (Rosenbrock, 1960): in Appendix A.
2 Note that we include the inlet connection variables zk, i as dis-
Ji (ui ) = (1 − di )2 + 100 ui − di2 (9) turbances in the calculation of Hi , that is
The cost function is in this case also the outlet dependent variable ˜i = di
d (16)
yi . The contour map for Ji as a function of ui and di is shown in zk,i
Fig. 3. For a given disturbance value di , it would not make sense
to map the whole region for ui as it includes regions with a high and nd˜ = ndi + nzk,i . The calculation of the SOC selection matrix Hi
i
value of the cost function. Instead, it is preferable to map only the according to optimization problem (A.9) requires the solution to 1
region around the optimal input ui, opt (di ) as given by the yellow (or nd˜ + 1 if the optimal sensitivity matrix is calculated using finite
i
line. Note, by introducing differences) nonlinear problem(s) and nui mixed integer quadratic
problems. Furthermore, ntot nonlinear systems of equations have
ci = ui − di2 (10) i
to be solved to obtain the gain matrix Gy and the disturbance gain
y
and setting ci,s = 0, the cost function is minimized independently matrix Gd . The sampling for the calculation of the surrogate model
of the value of di as we indirectly get ui = ui,opt (di )= di2 . This al- then consists of solving np nonlinear systems of equations.
lows to map along the optimal response surface as shown by the Based on the sampling domain in (5), we suggest using as scal-
dashed lines. These bounds correspond to ci,s = ±0.5. The close-to- ing matrices
optimal response surface has a simpler structure compared to the
˜i − d
Wd = diag max d ˜ i,max − d˜i
˜ i,min , d (17)
complete response surface. Compared to the optimal response sur-
face approach, it is possible to vary the setpoint of the new vari- as this results in minimizing the loss within the surrogate model
able, ci, s as well. The surrogate models according to Eqs. (3) and domain. The “measurement noise” scaling matrix should be set to
146 J. Straus, S. Skogestad / Computers and Chemical Engineering 119 (2018) 143–151
Table 1 Table 2
Bounds and units for the connection variables. Optimal selection matrix for a fixed selection (In,Out) as well as
the optimal measurement subset for each input and the corre-
m˙ in pin Tin wNH3 ,in RH2 /N2 , in sponding optimal selection matrix Hi with ny = 2 (MIQP2 ).
[kg/s] [bar] [°C] [wt.%] [-] Chosen variables Selection matrix Hi
Lower Bound 59.5 185 235 7 2.8
Upper Bound 80.5 215 265 9 3.2 Bed 2 TIn,2 , T20 0.098 1.0 0 0
For this system, the independent variables are given by the Bed 2 TIn,2 , T11 0.982 −1.0 0 0
Table 3
Estimation error with fixing the three SOC variables using differ-
ent selection matrices H.
Adding the outlet temperature of each bed to the selected mea- 5. Discussion
surements (In,Out) reduces the error by one order of magnitude.
Furthermore, all points in the training space are feasible. Selecting 5.1. Advantages of the proposed method
only one optimal measurement in each bed (MIQP1 , see (31)) re-
duces the error by more than a factor two compared to using two The proposed utilization of self-optimizing variables to map the
“arbitrary” measurements (In,Out) in each bed. Finally, increasing optimal response surface is a promising new method in the gener-
the number of measurements in the MIQP approach from ny = 1 ation of surrogate models. The main advantages are given by
(MIQP1 ) to ny = 2 (MIQP2 ) in each bed gives a further decrease by 1. A response surface which is close to the optimal response sur-
one order of magnitude. This shows that it is important to select face but does not require the solution of a large number of non-
the best measurements. Otherwise, the resulting surface is more linear problems;
complicated and it may be even necessary to reduce the sampling 2. Potentially a reduced number of sampling points compared to
space to avoid sampling infeasible points. sampling with the original independent variables.
Importantly, the resulting response surface is simple. To show
this, the surrogate models were validated using a response surface This allows us to sample only regions we are interested in,
created through incorporation of constraints (14). The comparison and to neglect regions that are not encountered in practice. In
to this validation space results in a maximum absolute error for the case study, it is in fact not possible to use the original inputs
the surrogate model using the inlet temperatures (In) of 0.37% in ξ ui (split ratios) as independent variables. Thus, a variable trans-
and 0.7 K in Tout . Compared to the optimal response surface, this formation would be required independently of the application of
error is one order of magnitude smaller. In comparison, with the self-optimizing control. For example, one could use the variable
MIQP approach with ny = 2 (MIQP2 ), the maximum absolute error transformation utilizing the existing control structure as proposed
is given by 0.001% in ξ and 0.001 K in Tout . This indicates, that the by Straus and Skogestad (2016). If it is necessary to have surrogate
resulting response surface is indeed simpler and it is possible to models for other states than the dependent variables yi, k , it is pos-
reduce the number of sampling points. Using instead quadratic B- sible to calculate them as well, e.g. for the actual split ratios ui or
splines with three points for each variable d ˜ , n p = 53 = 243 points for additional potential measurements. In certain cases, as for our
have to be sampled. The maximum absolute error is then given by case study, it is as well feasible to reduce the number of indepen-
0.01% in ξ and 0.02 K in Tout which is still below the error of using dent variables.
the inlet temperatures with 4 points for each variable. An alternative to utilizing self-optimizing variables is to directly
Sampling the space without variable transformation, i.e. select- sample the optimal response surface given by
ing c = u, is not advisable for this case study. First, as already gi,opt : {d
˜ i } → yi,k (34)
mentioned, it would require the sampling of much more sampling
This approach is however computationally expensive. It would re-
points. In addition, the resulting surface is more complicated. To
quire the solution to np nonlinear problems whereas in the appli-
illustrate this, consider the case when all disturbance variables are
cation of the proposed method, only nd˜ + 1 have to be solved in
at their lower bound (Table 1) i
the calculation of the optimal sensitivity matrix F. In addition, this
T
˜ = 59.5
d 185 235 7 2.8 (33) approach does not allow for having the set points ci,s as degree of
freedom for solving the overall optimization problem as it is al-
and the manipulated
variables are fixed at their nominal optimum lowed with surrogate model (8).
(u = uopt d˜ nom ). In this situation, the reactor is extinct. Hence, us- Certain limitations of the proposed method can be identified
ing the split ratios u as independent variables would require the and need to be addressed.
mapping of regions in which the reactor is extinct as well as cross-
ing the limit-cycle region (Morud and Skogestad, 1998). This re- 5.2. Practical use of the proposed method
gion is exemplified in Fig. 5 where the inlet pressure is at its
lower bound and the other disturbances at their nominal value. A first important point is the selection of the disturbance and
We can see that the system displays limit-cycle behaviour and it is measurement scaling matrices, Wd and Wny . These matrices will
not possible to define a steady-state value for this operating point. influence the performance of the resulting surrogate model. The
However, these regions are not important for the subsequent op- 2-norm is used for scaling of the disturbances and measurement
timization, and hence, should not be sampled. These regions are noises as we can see in Eq. (A.7). This implies that all distur-
avoided through the application of self-optimizing variables. bances and measurement noises may not be at their upper or
J. Straus, S. Skogestad / Computers and Chemical Engineering 119 (2018) 143–151 149
lower limit simultaneously. In the case of control, this seems rea- structured selection matrix Hi with measurements in the vicin-
sonable and a detailed discussion for using the 2-norm is given ity of the respective manipulated variables. The variables ci are
by Halvorsen et al. (2003). However, this is not the case if we want then more decoupled and it is not necessary to converge the com-
to use the self-optimizing variables in the calculation of surrogate plete flowsheet for each adjustment. This problem is less pro-
models. We actually want to sample these so-called corner points nounced in equation-oriented simulators. There, the application of
to avoid extrapolation. The best would be to use another norm, for surrogate model-based optimization results in smaller models, and
example the 1-norm, but it can be partly circumvented by multi- hence, a simpler initialization of the models. The application of
plying Wd by nd˜. self-optimizing variables will then only increase the number of
A second important point relates to the selection of the “mea- equality constraints.
surements” y as they influence the loss when disturbances are
present. In the case of surrogate model generation, the measure- 5.5. Local cost function
ments do not need to be actual measurement as it is in the con-
trol application of SOC. Hence, it is possible to extend the mea- The application of self-optimizing variables requires the defini-
surements to states that are generally not considered as they are tion of a local cost Ji corresponding to the overall cost J. This is
hard to measure, e.g. concentrations. As a result, the number of possible for the investigated case study as it is general advanta-
possible measurements nytot can be high. This requires the applica- geous to maximize the conversion per pass of a chemical reactor. If
tion of the MIQP approach as developed by Yelchuru and Skoges- this is not the case, the self-optimizing variables must be obtained
tad (2012) and described in A.2. Unfortunately, the MIQP approach using the overall cost and optimization problem (1). In the investi-
for measurement selection does not handle structural zeros in the gated case study, the introduction of an additional heat-exchanger
selection matrix H. The reason is that the convex reformulation for with external cooling duty would for example complicate the cost
obtaining the optimization problem (A.3) does not hold in this case function as there is no direct cost linked to the conversion per
as a pre-multiplication of H with a non-singular matrix Q will not pass. This brings us back to the starting point of the application
preserve the structure of H. Consequently, it is necessary to mini- of surrogate model generation and is similar to the “hen and egg”
mize the nonlinear loss expression problem. If it is not possible to optimize the overall flowsheet, how
1 can we then calculate the self-optimizing variables for each sub-
L= J1uu/2 (HGy )−1 HY2 (35) model gi ?
2 F
One approach to achieve this is the utilization of a simplified
This optimization could be performed using a global non-linear overall model for the calculation of the self-optimizing variables.
mixed integer optimization solver like BARON (Tawarmalani and These can then be used in the generation of the surrogate mod-
Sahinidis, 2005) or ANTIGONE (Misener and Floudas, 2014). Unfor- els for the submodels. In addition, this would require the incorpo-
tunately, there are no simple methods for solving this problem in a ration of the setpoints cs of the self-optimizing variables into the
convincing way as highlighted by Jäschke et al. (2017). The devel- sampling domain as they do not correspond to the actual optimal
opment of an approach to include structural zeros is not the scope values due to the simplified overall model. The advantage here is
of this paper and will therefore not be discussed further. When we the simplified response surface. Another approach, which is proba-
used alternatively a full selection matrix H, we found that compli- bly better, is to define a reasonable local cost function, for example,
cated adjustments in the flowsheet solver occurred. The proposed based on physical arguments.
“local” approach and the resulting block diagonal selection ma-
trix does not guarantee the optimal measurement combination in 5.6. Manipulated variables and disturbances affecting several
the combined measurement matrix and may lead to cases, where submodels
problems may arise. However, it is not possible to generalize when
problems may occur and when not. As mentioned in Section 2, it possible that disturbances and
manipulated variables affect several submodels. This can include,
5.3. Number of independent variables for example, a disturbance in the cooling water temperature or if
several compressors are connected to the same turbine shaft. This
It is in general not possible to say, when the application of self- leads to the question if we can apply the procedure in these cases
optimizing variables allows a reduction in the number of indepen- as well.
dent variables. There are however certain conditions, which have On one hand, it is not a problem with a disturbance affecting
to be fulfilled as it is the case in the case study. One prerequisite several submodels. The reason is that the disturbances are included
is that the cost function Ji corresponds to the overall cost func- as independent variables in the surrogate model generation (see
tion J. In addition, it is necessary that the cost function is flat with Eqs. (8) and (2)). Therefore, the connection of the submodels for
respect to the self-optimizing variables as it was already stated optimization will provide to all surrogate models the same distur-
by Skogestad (20 0 0). The simpler response surface as aim of the bance value.
introduction of self-optimizing variables is still likely to hold, in- One the other hand, manipulated variables u∗i , which affect sev-
dependently of whether it is possible to reduce the number of eral submodels, have to be handled more carefully. Due to the vari-
independent variables. Especially if there are many disturbances able transformation, it is not possible to calculate self-optimizing
(or connection variables), this may give a much simpler surrogate variables for these manipulated variables in each submodel. In-
model which requires fewer sampling points to get a desired accu- stead, the manipulated variables must be assigned to one sub-
racy, as in the case study. model. In addition, it is required in this submodel to fit a surrogate
model
5.4. Application in flowsheeting software
gui : {d
˜ i , ci } → u∗
i (36)
The application of self-optimizing variables ci in flowsheeting to calculate the value of u∗i .
This value is then used as connec-
software can be difficult. It requires the use of additional equal- tion variable in the other submodels that contain u∗i as indepen-
ity constraints which can cause problems because it may require dent variable.
many iterations in sequential-modular simulators. As a result, the It has to be noted that it is more common in chemical pro-
computational expense is increased. Hence, we proposed to use a cess that disturbances affect several submodels. Furthermore, the
150 J. Straus, S. Skogestad / Computers and Chemical Engineering 119 (2018) 143–151
developer of the surrogate models can decide to include all unit the solution to the following optimization problem
operations with the same manipulated variables u∗i into one sub-
min HY
model. Then, it is not necessary to fit a surrogate model (36) to the H F
(A.3)
manipulated variables u∗i . s.t. HGy = J1uu/2
with Gy ∈ Rny ×nu representing the measurement gain matrix with
5.7. Alternative approaches for independent variable reduction respect to the input u. Y is given by
Self-optimizing control is a “direct” approach that applies op- Y = FWd Wny (A.4)
timization explicitly in the calculation of the optimal sensitivity
The optimal sensitivity matrix F = ∂ ∂y d can be calculated as
opt
matrix F. There exist several other approaches for optimization in
the context of real-time optimization with parameter uncertainty.
F = − Gy J−1 y
uu Jud − Gd (A.5)
One “indirect” approach is (adaptive) directional modifier adapta-
tion (Costello et al., 2016; Singhal et al., 2017). This approach uti- where Juu ∈ Rnu ×nu
is the Hessian of the cost function, and Jud ∈
lizes the conditions of optimality expressed by the derivative of Rnu ×nd which is the second order derivative of J with respect u
the Langrangian with respect to the inputs and parameters instead and d. Alternatively, if it is not possible to easily obtain the ana-
of using optimization explicitly for variable reduction. Through the lytic matrices of the cost function Juu and Jud , the optimal sensi-
application of singular-value decomposition to the derivative of the tivity matrix F can also be calculated using finite differences. This
Lagrangian, it is possible to identify input directions in which the results in nd additional optimization problems. Wd and Wny are
cost function is sensitive with respect to the uncertain parameters. the disturbance and measurement noise scaling matrices given by
In the case of surrogate model generation, the uncertain parame-
ters would correspond to the augmented disturbances. d = W d d ; ny = Wny ny (A.6)
Using directional derivatives is advantageous in comparison to
the proposed procedure using self-optimizing variables if there are The vectors d and ny are assumed to satisfy
many input connection streams, and hence, the number of inde- d
y ≤ 1 (A.7)
pendent variables is very large. In this situation, it may not be pos- n
sible to calculate the optimal sensitivity matrix F explicitly and a 2
reduction in independent variables may be necessary. Thus, Wd and Wny represent the magnitude of the expected vari-
ations in d and y. The solution to problem (A.3) when H is a full
6. Conclusion matrix is (Yelchuru and Skogestad, 2012):
−1
HT = YYT Gy (A.8)
Combining principles from control theory and surrogate mod-
elling, a new method was developed to simplify the structure of
surrogate models. The main idea is to replace the original inde- A2. Measurement selection for H
pendent variables ui by a better set ci using the approach of self-
optimizing control, see Section 3.2 for details. This approach al- It is in general desirable to use few measurements y. In order
lows for omitting regions in which the submodel is suboptimal, for to select the an optimal subset of measurements ny , Yelchuru and
example because a reactor is extinct. In addition, it may in some Skogestad (2012) developed a mixed integer quadratic program-
cases result in fewer independent variables. ming approach. It requires the reformulation of the problem given
in Eq. (A.3) in vectorized form:
References Misener, R., Floudas, C.A., 2014. ANTIGONE: Algorithms for coNTinuous / integer
global optimization of nonlinear equations. J. Global Optim. 59 (2), 503–526.
Alstad, V., Skogestad, S., 2007. Null space method for selecting optimal mea- Morris, M.D., 1991. Factorial sampling plans for preliminary computational experi-
surement combinations as controlled variables. Ind. Eng. Chem. Res. 46 (3), ments. Technometrics 33 (2), 161–174.
846–853. Morud, J.C., Skogestad, S., 1998. Analysis of instability in an industrial ammonia re-
Alstad, V., Skogestad, S., Hori, E.S., 2009. Optimal measurement combinations as actor. AlChE J. 44 (4), 888–895.
controlled variables. J. Process Control 19 (1), 138–148. Quirante, N., Caballero, J.A., 2016. Large scale optimization of a sour water stripping
Andersson, J., 2013. A General-Purpose Software Framework for Dynamic Optimiza- plant using surrogate models. Comput. Chem. Eng. 92 (Supplement C), 143–162.
tion. Arenberg Doctoral School, KU Leuven, Department of Electrical Engineer- Rosenbrock, H.H., 1960. An automatic method for finding the greatest or least value
ing (ESAT/SCD) and Optimization in Engineering Center, Kasteelpark Arenberg of a function. Comput. J. 3 (3), 175–184.
10, 3001-Heverlee, Belgium PhD thesis. Sacks, J., Welch, W.J., Mitchell, T.J., Wynn, H.P., 1989. Design and analysis of com-
Caballero, J.A., Grossmann, I.E., 2008. An algorithm for the use of surrogate models puter experiments. Statist. Sci. 4 (4), 409–423. doi:10.1214/ss/1177012413.
in modular flowsheet optimization. AlChE J. 54 (10), 2633–2650. Singhal, M., Marchetti, A.G., Faulwasser, T., Bonvin, D., 2017. Improved direc-
Costello, S., Franois, G., Bonvin, D., 2016. A directional modifier-adaptation algorithm tional derivatives for modifier-adaptation schemes. IFAC-PapersOnLine 50 (1),
for real-time optimization. J. Process Control 39, 64–76. 5718–5723. 20th IFAC World Congress
Cozad, A., Sahinidis, N.V., Miller, D.C., 2014. Learning surrogate models for simula- Skogestad, S., 20 0 0. Plantwide control: the search for the self-optimizing control
tion-based optimization. AlChE J. 60 (6), 2211–2227. structure. J. Process Control 10 (5), 487–507.
Forrester, A., Sobester, A.A., Keane, A., 2008. Engineering Design via Surrogate Mod- Straus, J., Skogestad, S., 2016. Minimizing the complexity of surrogate models for
elling: A Practical Guide. Wiley. optimization. In: Kravanja, Z., Bogataj, M. (Eds.), 26th European Symposium on
Forrester, A.I.J., Keane, A.J., 2009. Recent advances in surrogate-based optimization. Computer Aided Process Engineering. In: Computer Aided Chemical Engineer-
Prog. Aerosp. Sci. 45 (1), 50–79. ing, vol. 38. Elsevier, pp. 289–294.
Grimstad, B. et al. (2015). SPLINTER: a library for multivariate function approxima- Straus, J., Skogestad, S., 2017a. Economic NMPC for heat-integrated chemical
tion with splines. http://github.com/bgrimstad/splinter. Accessed: 2017-11-26. reactors. In: 2017 21st International Conference on Process Control (PC),
Halvorsen, I.J., Skogestad, S., Morud, J.C., Alstad, V., 2003. Optimal selection of con- pp. 309–314.
trolled variables. Ind. Eng. Chem. Res. 42 (14), 3273–3284. Straus, J., Skogestad, S., 2017b. Variable reduction for surrogate modelling. In: Pro-
Jäschke, J., Cao, Y., Kariwala, V., 2017. Self-optimizing control a survey. Annu. Rev. ceedings of Foundations of Computer-Aided Process Operations 2017, Tucson,
Control 43 (Supplement C), 199–223. AZ, USA, 8–12 Jan. 2017.
Karolius, S., Preisig, H.A., Rusche, H., 2016. Multi-scale modelling software frame- Tawarmalani, M., Sahinidis, N.V., 2005. A polyhedral branch-and-cut approach to
work facilitating simulation of interconnected scales using surrogate-models. In: global optimization. Math. Program 103, 225–249.
Kravanja, Z., Bogataj, M. (Eds.), 26th European Symposium on Computer Aided Wächter, A., Biegler, L.T., 2006. On the implementation of an interior-point filter
Process Engineering. In: Computer Aided Chemical Engineering, vol. 38. Elsevier, line-search algorithm for large-scale nonlinear programming. Math. Program
pp. 463–468. 106 (1), 25–57.
Krige, D. G. (1951). A Statistical Approach to Some Mine Valuations and Allied Prob- Yelchuru, R., Skogestad, S., 2012. Convex formulations for optimal selection of con-
lems at the Witwatersrand. Master’s thesis.South Africa University of Witwater- trolled variables and measurements using mixed integer quadratic program-
srand. ming. J. Process Control 22 (6), 995–1007.