Krist V. Gernaey, Jakob K. Huusom and Rafiqul Gani (Eds.), 12th International Symposium on Process Systems Engineering and 25th European Symposium on Computer Aided Process Engineering. c 2015 Elsevier B.V. All rights reserved. 31 May - 4 June 2015, Copenhagen, Denmark.
Dynamic Chance-Constrained Optimization under Uncertainty on Reduced Parameter Sets David M¨ullera , Erik Eschea , Sebastian Werka and G¨unter Woznya a Department of Process Dynamics and Operation, Technische Universit¨ at Berlin, Str. des 17. Juni 135, D-10623 Berlin
[email protected]
Abstract Uncertainty is a crucial topic for the decision making process in almost every scientific field. Therefore, the correct implementation into optimization problems is vital. Herein, the chanceconstrained optimization approach is applied and compared with a standard Monte Carlo optimization on a CSTR model. The two approaches are expanded by limiting the number of uncertain parameters in the system with according subset selection strategies from parameter estimation studies. The idea here is that a high number of uncertain parameters does not add to a better description of a system. The uncertainty can be represented by a subset of uncertain parameters, which suffice to describe the system behavior. In this contribution, it is shown that the results, both for the chance constrained and Monte Carlo optimization approaches, are improved regarding result stability and control action indication. Additionally, it is discussed how the chance-constrained approach yields even better results regarding the objective function of the optimization problem and it is shown that the solution time is drastically reduced. Keywords: Chance Constraints, Optimization under Uncertainty, Subset Selection
1. Motivation and Introduction The consideration, proper handling, as well as the correct implementation of uncertainty are still some of the most challenging issues in process optimization today. On an industrial level, conservative measures are often applied to compensate for uncertainty, which of course lead to losses of potential profit. To minimize these, different approaches in stochastic process optimization exist. Of interest in this contribution is the chance-constrained optimization approach. Herein, a deterministic result for a stochastic optimization problem is obtained, while process constraints are adhered to with a certain probability. Independent of the way that uncertainties are implemented into an optimization problem, it can generally be said that with a higher number of uncertain parameters, the computational complexity for solving the optimization problem for certain approaches increases. Additionally, poorly estimated parameters can add unrealistic behavior to the system. Nevertheless, it is possible to support engineers in selecting the most relevant uncertain parameters for optimization under uncertainty using a strategy proposed in (M¨uller et al., 2014). Core features of the algorithm presented therein are an identifiability analysis of parameters and respective subset selection as well as a sensitivity analysis of parameters towards all states and a user-defined objective function. The remaining uncertain parameters are those that are relevant for optimization under uncertainty. Therefore, the novelty in this contribution is the combination of subset selection strategies for the selection of relevant uncertain parameters with two stochastic optimization approaches: Monte-Carlo-Optimization (MCO) and chance-constrained optimization (CCO).
D. M¨uller et al.
726
2. Chance-Constrained Optimization The chance-constrained approach has intensively been studied by Charnes and Cooper (1959), Wendt et al. (2002), Li et al. (2008), Arellano-Garcia and Wozny (2009), and Werk et al. (2012). The concept is briefly revisited in the following. 2.1. Optimization Problem Formulation The objective function of the stochastic optimization problem is formulated as shown in Eq. (1). Hereby f is the objective function. The minimization is to be achieved by manipulating the controls u. The states are the vector x and the uncertain parameters the vector ξ . For the purpose of this contribution, a multivariate normal distribution of ξ is assumed. Hereby, μ is its expected value and Σ the covariance matrix. In order to cope with the uncertain factors, the vector of inequality constraints h of the optimization problem is written as shown in Eq. (2). min E [ f (x, u, ξ )]
ξ = N (μ, Σ)
u
(1)
s.t. Pr {h(x, ˙ x, u, ξ ) ≥ 0} ≥ α
(2)
The probability of adhering to a certain constraint with a certain percentage α is of relevance. Thus, a relaxation of the inequality constraint is performed. 2.2. Optimization Problem Implementation The optimization problem is implemented as shown in Fig. 1 and is solved in six steps. In Step 1, Optimizer Step 6: Solve optimization step
Step 1: Send controls to CC Evaluator
Step 5: Calculate
Step 2: Sample ξ space ξ1 Test
ξ1
ξ2
Chance Constraint Evaluator
ξ2
3σ1
Step 4: Send sensitivities and results of state variables to the Chance Constraint Evaluator
Process Model and Solver
Step 3: Discretize DAE, solve, and calculate:
Figure 1: Complete framework for solving the chance-constrained optimization problem. the controls u are sent to the chance constraint evaluator. In our case, this is the dynamically optimized chance constraint evaluator (DoCCE). In Step 2, the DoCCE performs a sparse sampling of the uncertain parameters ξ . The user has the possibility to set the grid width (e.g. 3σ ), the grid resolution (number of samples within the width), as well as the grid depth of the sample. In Step 3, the samples of ξ and the controls u are passed down to the process model and solver. The solver discretizes the DAE into an AE and solves the model with given controls and parameters.
Dynamic Chance-Constrained Optimization under Uncertainty on Reduced Parameter Sets
727
Hereby, the sensitivity matrix of the states regarding the controls is determined. In Step 4, based on the implicit function theorem, the sensitivity of the states regarding the parameters and regarding the controls is sent back to the DoCCE. Afterwards, in Step 5, an integration to calculate the probability Pr of adhering to the constraints is carried out. For this purpose, a root-finding problem is solved and the course of the constraints h is determined. Finally, the optimizer obtains the probability (1), the sensitivity of the probability regarding the controls (2), as well as its second derivative of the sensitivity regarding the controls (3). For our case, the optimization problem is implemented in Python using a framework for the chance constraint calculation presented in Werk et al. (2012) and Wendt et al. (2002). Ipopt is used as an NLP solver for the optimization problem. For the simulation part of the framework, a sparse DAE solver with automatic sensitivity generation (sDACl, developed by Barz et al. (2011)) is used in combination with an NLE solver (NLEQ1s, developed by Nowak and Weimann (1991)).
3. Case Study The case study by (M¨uller et al., 2014) of a continuously stirred tank reactor (CSTR) with several reactions is further explored by comparing the results of four different optimizations under uncertainty: The first being a basic Monte Carlo-based stochastic optimization as well as a ChanceConstrained optimization on all initially uncertain parameters of the CSTR model, the third being a Monte Carlo-based stochastic optimization on a reduced set of uncertain parameters, and the fourth a chance-constrained optimization using the same subset. The calculations are performed on an intel 7 - 3770 CPU @ 3,50 GHz x 8 with 16 GB RAM running on Ubuntu 14.04 (64 Bit). 3.1. Task Description and Optimization Problem Formulation ˙ The inlet stream has two relevant concenThe CSTR has one entering and exiting mole flow F. trations cA0 and cB0 at a temperature of T0 . In the CSTR, two reactions take place: A is reacted to product C and B is reacted to A. The reactor is heatable or coolable via the jacket with the heating temperature T j . The CSTR and its reactions can be described with Eq. (3) to (5). The flow leaves the reactor at temperature T with concentrations cA and cB . The objective is to minimize the concentration of cA leaving the reactor. −EA −EB dcA F˙ = · (cAo − cA ) − kAo · cA · e R·T + kBo · cB · e R·T dt V −EB dcB F˙ = · (cBo − cB ) − kBo · cB · e R·T dt V −EA dT F˙ U ·A −ΔHA = · (To − T ) − · (T j − T ) + · kAo · cA · e R·T dt V ρ · c p ·V ρ · cp −EB −ΔHB · kBo · cB · e R·T + ρ · cp
(3) (4) (5)
The constants in the process are the volume of the reactor V = 1 m3 , the heat of reaction ΔHA = 4.5 · 104 J/mol and ΔHB = -5.5 · 104 J/mol for reaction A and B respectively, and the incoming stream F˙ = 6.5 · 10−4 m3 /s. The applied expected values and variances of the parameters for the three optimizations are obtained from (M¨uller et al., 2014) and are displayed in Tab. 1 and Tab. 2. 3.2. Results and Discussion Four cases are analyzed in greater detail, to analyze the effect of optimization under uncertainty using reduced parameter subsets. The objective is displayed in Eq. (6). min E [ f (x, u, ξ )] = −cA with ξ ∼ N(μ, Σ)
(6)
s.t. g(x, u, ξ ) = 0 and h(x, u, ξ ) = T ≤ 340K
(7)
u
728
D. M¨uller et al.
Table 1: Expected parameter values for uncertain parameters from (M¨uller et al., 2014). EA EB kAo kBo ρ cp U·A [J/(molK)] [J/(molK)] [1/s] [1/s] [kg/m] [J/(kgK)] [W/K] Real val. 6.90 · 104 7.20 · 104 5.0 · 106 1.0 · 107 8.00 · 102 3.5 1.40 Full set 6.94 · 104 7.62 · 104 6.1 · 106 4.0 · 107 5.50 · 102 5.0 1.37 Subset 6.94 · 104 7.62 · 104 6.1 · 106 4.0 · 107 5.54 · 102 5.0 1.38 Table 2: Parameter variances for the full set and subset from (M¨uller et al., 2014). EA EB kAo kBo ρ cp U·A Full set 4.0 · 103 3.3 · 103 7.8 · 106 4.2 · 107 3.2 · 103 3.0 · 101 1.0 · 10−1 Subset 8.4 · 101 7.9 · 101 0 0 0 0 1.2 · 101 Monte Carlo Optimization - Full Set: The first case of interest is a MCO using the whole set of estimated parameters including their determined variances. 10,000 MCOs are performed to obtain a reliable result. The differential algebraic equation system describing the CSTR is stiff and shows a tight feasible area for control and parameter combinations. Fig. 2 displays the determined control actions. The MCO shows an erratic behavior and gives no clear indication on how to operate the controllable reactor. Whilst the feed of cA0 reaches its lower bound (7 mol/m3 ), the results for T0 and T j are widely spread and the feed cB0 jumps to both bounds. For an operator, this result is not desirable.
Figure 2: MCO result for the control actions using the full set of uncertain parameters. Chance-Constrained Optimization - Full Set: The same optimization problem is then solved using chance-constrained optimization. As for the chance-constraints, a probability of α = 98% is required for the upper bound on the reaction temperature. The optimization problem shown above
Dynamic Chance-Constrained Optimization under Uncertainty on Reduced Parameter Sets
729
is expanded to Eq. (8). s.t. g(x, ˙ x, u, ξ ) = 0 and Pr {h(x, ˙ x, u, ξ ) = T ≤ 340K} ≥ α
(8)
For this case, no result could be obtained within any reasonable amount of time compared to the MCO (2 days). This result strengthens the statement that if this approach is used for optimization, the uncertainty in a model must be focused on a smaller set of uncertain parameters. Monte Carlo Optimization - Subset: The second MCO, using the reduced parameter set, shows a less erratic behavior with more than 92% of all 10,000 Monte Carlo samples leading to an optimal solution. The used subset of uncertain parameters is shown in Tab. 2. The parameters with a variance of 0 are the fixed parameters, while the others are the uncertain parameters. In all MCO cases, the value of the objective function is almost the same proving the controllability of the process. The objective function value lies at 6.6 mol/m3 . Furthermore, the range of valid control actions is not as wide as in the case of the first MCO with the full set of uncertain parameters. The control actions are displayed in Fig. 3. The result for the final temperature is shown in comparison to the result of the chance-constrained optimization result in Fig. 4. Here it is obvious, that the optimization results in control actions keeping the final temperature far away from the temperature bound of 340K. This of course means a loss of profit.
Figure 3: MCO result for the controls using the subset of estimated parameters. Chance-Constrained Optimization - Subset: Finally, a chance-constrained optimization is carried out for the reduced subset with the same probability bound for the reaction temperature. A solution to the optimization problem can be found in less than 120 seconds as opposed to over 6 hours for the Monte Carlo optimization. A further Monte Carlo analysis of the thus found result with respect to the parameter uncertainty shows a desirable stability. The expected value of the objective function lies at 6.58 mol/m3 . Thus, a clear indication for an operator is obtained, on how the reactor should be operated and a slightly higher objective function value is achieved.
D. M¨uller et al.
730
Figure 4: MCO result (left) and CCO result (right) for the subset of estimated parameters.
4. Conclusions and Outlook Among other things, the results indicate, that implementing too much uncertainty into a process model, no sensible result for a Monte Carlo optimization as well as for the chance-constrained optimization is obtained. Secondly, the described method of using the parameter reduction algorithm combined with chance-constrained optimization is a suitable path towards comprehensive process optimization under uncertainty. This is the case both for Monte Carlo and chance constrained optimization. Thirdly, the latter yields clear, easily interpretable, and implementable optimization results as only one deterministic result is obtained. Additionally, the objective function value of the CC result is higher, as a minor constraint violation is allowed. As an outlook, the chanceconstraint optimization approach will be implemented into the open source modeling environment MOSAIC (Kuntsche et al., 2011). Thus, the acceptance of the approach can be improved.
5. Acknowledgements The authors acknowledge the support from the Cluster of Excellence “Unifying Concepts in Catalysis” and the Collaborative Research Center SFB/TRR 63 InPROMPT “Integrated Chemical Processes in Liquid Multiphase Systems” both coordinated by the Technische Universitt Berlin and funded by the German Research Foundation (Deutsche Forschungsgemeinschaft “DFG”). Grant no.: DFG EXC 314 and DFG TRR 63
References Arellano-Garcia, H., Wozny, G., 2009. Chance constrained optimization of process systems under uncertainty: I. strict monotonicity. Computers & Chemical Engineering 33 (10), 1568 – 1583. Barz, T., Kuntsche, S., Wozny, G., Arellano-Garcia, H., 2011. An efficient sparse approach to sensitivity generation for large-scale dynamic optimization. Computers & Chemical Engineering 35 (10), 2053 – 2065. Charnes, A., Cooper, W. W., 1959. Chance-constrained programming. Management Science 5, 73. Kuntsche, S., Barz, T., Kraus, R., Arellano-Garcia, H., Wozny, G., 2011. Mosaic a web-based modeling environment for code generation. Computers & Chemical Engineering 35 (11), 2257 – 2273. Li, P., Arellano-Garcia, H., Wozny, G., 2008. Chance constrained programming approach to process optimization under uncertainty. Computers & Chemical Engineering 32, 25 – 45. M¨uller, D., Esche, E., Lopez-C., D. C., Wozny, G., 2014. An algorithm for the identification and estimation of relevant parameters for optimization under uncertainty. Computers & Chemical Engineering 71 (0), 94 – 103. Nowak, U., Weimann, L., 1991. A family of newton codes for systems of highly nonlinear equations. Tech. rep., Konrad-Zuse-Zentrum fr Informationstechnik Berlin. Wendt, M., Li, P., Wozny, G., 2002. Nonlinear chance-constrained process optimization under uncertainty. Industrial & Engineering Chemistry Research 41, 3621 – 3629. Werk, S., Barz, T., Wozny, G., Arellano-Garcia, H., 2012. Performance analysis of shooting algorithms in chanceconstrained optimization. In: Proceedings of the 11th International Symposium on Process Systems Engineering (PSE2012). pp. 1512 – 1516.