An α-Model Parametrization Algorithm for Optimization with Differential-Algebraic Equations - MDPI
←
→
Page content transcription
If your browser does not render page correctly, please read the page content below
applied sciences Article An α-Model Parametrization Algorithm for Optimization with Differential-Algebraic Equations Paweł Dra̧g Department of Control Systems and Mechatronics, Wrocław University of Science and Technology, Wybrzeże Wyspiańskiego 27, 50-370 Wrocław, Poland; pawel.drag@pwr.edu.pl Abstract: An optimization task with nonlinear differential-algebraic equations (DAEs) was ap- proached. In special cases in heat and mass transfer engineering, a classical direct shooting approach cannot provide a solution of the DAE system, even in a relatively small range. Moreover, available computational procedures for numerical optimization, as well as differential-algebraic systems solvers are characterized by their limitations, such as the problem scale, for which the algorithms can work efficiently, and requirements for appropriate initial conditions. Therefore, an αDAE model optimiza- tion algorithm based on an α-model parametrization approach was designed and implemented. The main steps of the proposed methodology are: (1) task discretization by a multiple-shooting approach, (2) the design of an α-parametrized system of the differential-algebraic model, and (3) the numerical optimization of the α-parametrized system. The computations can be performed by a chosen iter- ative optimization algorithm, which can cooperate with an outer numerical procedure for solving DAE systems. The implemented algorithm was applied to solve a counter-flow exchanger design task, which was modeled by the highly nonlinear differential-algebraic equations. Finally, the new approach enabled the numerical simulations for the higher values of parameters denoting the rate of changes in the state variables of the system. The new approach can carry out accurate simulation tests for systems operating in a wide range of configurations and created from new materials. Citation: Dra̧g, P. An α-Model Keywords: numerical optimization; differential-algebraic equations; α-model parametrization; Parametrization Algorithm for multiple-shooting method; heat and mass transfer Optimization with Differential- Algebraic Equations. Appl. Sci. 2022, 12, 890. https://doi.org/10.3390/ app12020890 1. Introduction Academic Editor: Roberto Citarella The advanced environments of computational optimization, which can take into account different types of constraints, are the tools that can be used by science and industry Received: 15 December 2021 to solve the most pressing engineering problems. There are some branches of engineering Accepted: 13 January 2022 and technology for which defining complex optimization tasks seems to be a natural issue, Published: 16 January 2022 such as, e.g., chemical engineering [1,2], biotechnology [3], power engineering [4], or Publisher’s Note: MDPI stays neutral aviation [5] and astronautics [6]. It is worth emphasizing that there is a wide group of with regard to jurisdictional claims in defined finitely dimensional optimization tasks with a classical scalar objective function and published maps and institutional affil- equality and/or inequality constraints that can arise in various branches of industry. This iations. means that not only the specific scope of the problems belongs to the optimization area, but also well-known formulations reflect a common desire in process design, such as increasing efficiency, the reduction of losses, or reaching a compromise among the chosen goals. Mathematical modeling, as well as a model-based optimization are important subjects Copyright: © 2022 by the author. of the heat and mass transfer area. Recently, Singh and Ghoshdastidar considered a new Licensee MDPI, Basel, Switzerland. This article is an open access article approach for computational simulation of heat transfer in a special case of alumina and distributed under the terms and cement rotary kilns [7]. The model relations take into account such items and phenomena conditions of the Creative Commons as: (a) radiation exchange among solids, walls, and gas, (b) convective heat transfer from Attribution (CC BY) license (https:// the gas to the wall and the solids, (c) contact heat transfer between the covered wall and creativecommons.org/licenses/by/ solids, and (d) heat loss to the surrounding, as well as chemical reactions. In particular, 4.0/). the energy equation for the wall was computed by the finite-difference method. Finally, Appl. Sci. 2022, 12, 890. https://doi.org/10.3390/app12020890 https://www.mdpi.com/journal/applsci
Appl. Sci. 2022, 12, 890 2 of 17 the performed simulations resulted in new insights into axial solids and gas temperature distributions, as well as the axial variation of chemical composition. Najim and Krishnan designed a new mathematical model to obtain a similarity solution, which can be further applied for heat transfer analysis in progressive freeze- concentration-based desalination [8]. Then, the calculated similarity solution can predict the temperature distributions in the ice, the thickness of the ice, as well as heat flux. An important part of the mathematical model is the Scheil equation, useful in an analysis of simultaneous heat and mass transfer phenomena. The calculated similarity solution was used in a further analysis to investigate, e.g., the effect of the ice–liquid interface speed on heat transfer. Li et al. designed and analyzed a new mathematical model of a novel evaporator [9]. In the presented new approach, the main rules of the vapor–liquid adjustment evaporator, as well as an appropriated configuration were considered. The authors indicated that the vapor–liquid adjustment evaporator can be further enhanced by an optimization procedure. Najib and co-workers considered a new approach to calculate the transfer functions (g-functions) for computer simulation for the thermal performance of large-diameter, shal- low bore, helical Ground heat exchangers [10]. It was indicated that the g-functions are generated using a validated numerical capacitance resistance model—helical ground heat exchangers for different bore diameters, bore depths, and helical pipe pitches. Moreover, a simplified resistance-based model, for the calculation of traditional borewell temperature- based g-functions, has also been presented. Ghrissi et al. investigated a new mathematical approach based on the darcien model [11]. The prepared solution enabled the analysis of the influence of effective coupled parameters, which were heat, moisture, and air, on the evaporation performance of a porous layer. Then, to solve the designed system of equations, a combination of the Boltzmann method and the finite-volume method was proposed. Finally, the obtained results indicated that blowing air in winter conditions markedly affects the heat and mass exchanges at the interface between the porous layer and the channel. The mentioned technological applications resulted in the problem functions expressed by the specified mathematical formulas. There are some important aspects that should be reflected in the problem formulation. In particular, the optimization task can be defined by considered the limitations and additional conditions: • The single- and multi-objective optimization is related to the form of the objective function [12]; • Nonlinear formulas indicate whether local solutions can be detected [13]; • Optimization with complementarity constraints (mathematical programs with com- plementarity constraints (MPCC)) considers special pairs of restrictions [14–16]; • Mixed-integer nonlinear programming (MINLP) combines constraints with combina- torial problems [17]. Usually, in the optimization tasks related to the technological problems, a mathe- matical model of the considered process is included. Then, the mathematical model can be considered as a system of constraints. In particular, there are purely dynamical con- straints in ordinary differential equation (ODE) form, dynamic constraints with distributed variables (partial differential equations (PDEs)), as well as dynamical constraints with discrete–continuous algebraic path constraints in the differential-algebraic equation (DAE) formulation. The optimization subject to the dynamical constraints is commonly known as dynamical optimization. Moreover, solving the model equation system is a difficult task, because the obtained solution trajectories depend on many particular situations that may arise. The initial conditions for the performed numerical computations, as well as the course of the input variables can have a decisive influence on the numerical simulations and their final result. In the other words, the features, such as, e.g., model instability and its stiffness, can vary during an iterative optimization procedure. Therefore, in each computation step, there
Appl. Sci. 2022, 12, 890 3 of 17 is a possibility that the computations can fail [18]. This is especially true when the initial solution is far from the final result. In the literature, there are two main perspectives on the optimized equation system treatment. The first one comes from an obvious observation that in the actual process, all physical relations and laws must be always fulfilled. On this basis, the processes can be optimized in such a way that the model equations are always satisfied during the performed numerical calculations [19]. In this case, according to the parametrization methodology used, the dynamical optimization tasks result often in small- or medium-scale nonlinear optimization problems [20]. The second view is definitely different in this aspect. That is, the mathematical equations of a process may be violated during the optimization procedure. However, they should be met at the end of the last iteration to define a useful final solution. This methodology can be observed in the direct transcription method [21]. Therefore, there are two main ways for optimization with dynamical constraints: the sequential, as well as the simultaneous approaches. The numerical sequential approaches for dynamic optimization are strongly based on the assumption that there is an available numerical procedure that is able to obtain solution trajectories satisfying the model equations. This assumption seems to be difficult to accept, because the observed increasing precision and complexity of technological processes are reflected in mathematical models, which are often highly nonlinear, unstable, numerically ill-conditioned, and possibly multi-stage [22–24]. Currently, simulation studies concerning the new solutions in the field of heat and mass transfer engineering indicate that an exact numerical solution of the differential-algebraic model of the system may not be possible [25]. This is especially true for new advanced mathematical models that are built according to the white-box approach. Moreover, by the appropriate selection of the model parameters, one can freely influence the numerical conditioning of the considered model equation system [26]. To improve the required stability condition, the multiple-shooting approach can be applied. This method is often used in numerical simulations of the nonlinear, as well as multi-stage production systems [27]. The multiple-shooting method can be combined together with other modifications, to ensure a failure-free operation of the designed compu- tational algorithms [28]. Recently, to parametrize the trajectory described by the dynamical equations, variability constraints have been proposed [29]. Therefore, the appropriate model of the parametrization procedures can be applied to rewrite the optimization task in a well-tractable form. Some of the most-often-used parametrization approaches result in large-scale nonlin- ear optimization tasks. Moreover, methodologies such as the direct transcription method [5] and collocation-based approaches [20] require experience in the numerical treatment of the differential-algebraic constraints. On the other hand, they are independent of the external computational procedures for the DAE system solution. Although the fully parametriza- tion methods are able to efficiently co-operate with large-scale numerical optimization procedures, the computational experience indicates that the external DAE solvers can be applied for some classes of constraints and thus reduce the dimension of the optimization task significantly. It is worth noticing that medium-scale optimization problems can be successfully solved by personal computers. Therefore, the use of specialized computing stations seems not to be necessary. The problem considered in this article is to overcome the difficulties associated with solving a system of the nonlinear differential-algebraic equations in a sequential optimiza- tion approach. One of the most important issues discussed in this work is an improvement of the optimization task’s tractability. This problem was considered in the context of a homotopy method, which was adjusted for solving optimization tasks with the DAE constraints [30]. The main contributions of this article are: • The design of the α-model parametrization procedure as a combination of homotopy and the multiple shooting method;
Appl. Sci. 2022, 12, 890 4 of 17 • The implementation of the αDAE model optimization algorithm; • The application of the αDAE model optimization algorithm for the design of a counter- flow exchanger. In the presented solution method, a well-known homotopy-based approach was used. Additionally, the designed method has never been used before to solve systems of differential- algebraic equations. Therefore, it is a significant extension of the applicability area of homotopy in solving optimization tasks subject to highly nonlinear differential- algebraic constraints. Based on the possibilities given by the homotopy and multiple-shooting method, an αDAE model optimization algorithm was designed and implemented. The detailed discussion of the considered optimization task, a formula of the model constraints, as well as the features of the new methodology are discussed in the next sections. The optimization problem taken into account is formulated in Section 2. The α-model parametrization procedure is introduced in Section 3. Then, the main steps of the αDAE model optimization algorithm are presented in Section 4. An application of the new approach to the design task of a heat and mass transfer process is described in Section 5. Finally, the presented considerations are concluded in Section 6. 2. The Problem Formulation Let us consider a classical optimization task subject to the differential-algebraic model equations: min F (y(t), z(t), u(t), p, t) (1) u(t) s.t ẏ(t) = f (y(t), z(t), u(t), p, t) 0 = g(y(t), z(t), u(t), p, t) ( DAE) t ∈ [ t0 tf ] (2) y ( t0 ) = y0 z ( t0 ) = z0 where: F : Rny × Rnz × Rnu × Rn p × R → R (3) is an optimized performance index, R denotes a set of real numbers, y(t) ∈ Rny is a vector dy(t) of state variables modeled by differential equations with ẏ(t) = dt , and z(t) ∈ Rnz represents a vector of state variables described by algebraic constraints. Moreover, u(t) ∈ Rnu denotes a vector of input functions; p ∈ Rn p is a vector of global constant parameters; t ∈ R is an independent variable with a known a priori range t ∈ [t0 t f ]. The considered relations take the form of the differential-algebraic equations in a semi-explicit form with: f : Rny × Rnz × Rnu × Rn p × R → R ny (4) g: Rny × Rnz × Rnu × Rn p × R → R nz To solve the model equations (2), consistent initial conditions: [y(t0 ) z(t0 )]T = [y0 z0 ] T (5) need to be provided. For a given initial value of the input function u(t0 ), the consistent initial conditions must fulfill the relation: g(y0 , z0 , u(t0 ), p, t0 ) = 0, (6) which is equivalent to the algebraic constraints at the point t0 of the independent vari- able domain.
Appl. Sci. 2022, 12, 890 5 of 17 It is worth explaining what the main difference between the differential-algebraic equations and differential-algebraic constraints is. The DAEs in their classical understand- ing can be solved by specialized single- or multi-step numerical schemes [31]. For the given consistent initial conditions (6), the DAEs (2) can be solved by Gear’s method or modified Runge–Kutta procedures [32]. Finally, starting from the consistent initial conditions, a set of feasible pointwise solutions can be found. This set can be further used to construct the solution trajectories y(t) and z(t). On the other hand, there is a group of methods that treat the DAE relations as the constraint system. While searching for a solution, the imposed restrictions do not have to be met. Even the starting solution may be infeasible. Finally, only the last result of the searching procedure should meet all of the model equations in the form of the differential-algebraic constraints. Therefore, it is possible to find a feasible solution without the knowledge about an explicit formulation of the constraint functions. The effectiveness of this approach in the context of simultaneous optimization has been described in the literature [33,34]. Although some solution procedures for the differential-algebraic equations have been just listed, it is worth presenting the main features of the direct shooting method—an approach designed for solving the highly nonlinear DAE systems. To solve the system of DAEs (2) characterized by a highly nonlinear dynamics, according to the multiple-shooting approach, the range of the independent variable is divided into an assumed number N of subintervals. Then, in each subinterval ti ∈ [t0i tif ], for i = 1, . . . , N and: −1 t0 = t10 < t1f = t20 < · · · < t N f = t0N < t Nf = t f , (7) the DAE system can be considered independently in each subinterval: i i ẏ (t ) = f (yi (ti ), zi (ti ), ui (ti ), p, ti ) 0 = g(yi (ti ), zi (ti ), ui (ti ), p, ti ) yi (t0i ) = y0i ( DAEi ) zi (t0i ) = z0i (8) ui ( ti ) ui = = const ti [t0i tif ] ∈ 1, · · · , N i = n where y0i ∈ R yi and z0i ∈ Rnzi denote the vectors of the initial conditions for the differential and algebraic state trajectories, respectively. It was assumed that the input function ui (ti ) is constant in each subinterval. The presented procedure, known as the multiple-shooting method, is a basis for com- putational optimization algorithms for problems with a highly nonlinear dynamics. This is because the dynamical relations can be solved more accurately on shorter subintervals than over one long range. Moreover, the initial conditions vectors y0i and z0i , with the state trajectories’ continuity requirements: yi (tif ) − yi+1 (t0i+1 ) = 0 zi (tif ) − zi+1 (t0i+1 ) = 0 (9) i = 1, · · · , N − 1 can be used to introduce additional discrete process constraints. Therefore, inequality constraints on the differential state trajectory: yL ≤ y(t) ≤ yU (10) t ∈ [ t0 tf ]
Appl. Sci. 2022, 12, 890 6 of 17 with y L , yU ∈ R, can be effectively considered in the following pointwise form: yL ≤ yi (t0i ) ≤ yU (11) i = 1, · · · , N. The presented multiple-shooting approach enables us to approximate an infinite- dimensional optimization task by a finite-dimensional formulation. The further considera- tions concern a new approach for optimization according to the sequential approach rules, where the differential-algebraic Equation (8) is fulfilled in each step of a computational procedure. Finally, the application of the multiple-shooting approach can be used to transform the classical task (1) and (2) to an optimization problem with pointwise-continuous constraints: min F (X) (12) X where X is a matrix of decision variables: (x1y0 )T (x1z0 )T (x1u )T ( x2 ) T ( x2 ) T (x2u )T y0 z0 ∈ R N ×(ny +nz +nu ) X = (13) .. .. .. . . . (xyN0 )T (xzN0 )T (xuN )T and the objective function: F : R N ×(ny +nz +nu ) → R (14) should be optimized subject to the parametrized DAEs: i i ẏ (t ) = f (yi (ti ), zi (ti ), ui (ti ), p, ti ) 0 = g(yi (ti ), zi (ti ), ui (ti ), p, ti ) yi (t0i ) xiy0 = ( DAEi (X)) zi (t0i ) = xiz0 (15) ui ( ti ) xiu = ti [t0i tif ] ∈ i = 1, · · · , N, the continuity constraints of the state trajectories: yi (tif ) − xiy+0 1 = 0 zi (tif ) − xiz+0 1 = 0 (16) i = 1, · · · , N − 1, as well as the initial conditions consistency constraints (6) in the new parametrized form: g(xiy0 , xiz0 , xiu , p, t0i ) = 0 (17) i = 1, · · · , N.
Appl. Sci. 2022, 12, 890 7 of 17 The presented reformulation is a consequence of the multiple-shooting approach. Moreover, the continuous model equations can be solved, independently in each subinter- val, by an outer numerical procedure. It is worth noticing that the application of the outer DAE solver is easy to implement and more flexible, because various numerical procedures can be used, such as ode15s in MATLAB or NDSolve in Mathematica. On the other hand, the full parametrization of the state trajectories leads us to a problem formulation that is independent of the outer DAE system solution procedure. Unfortunately, it needs, in many cases, much more computational effort and experience. Then, to obtain a feasible solution, an efficient large-scale nonlinear programming procedure is necessary. In the full-parametrization approach, computational experience seems to be crucial for an efficient solution algorithm design and implementation. Therefore, in the present work, the following assumptions were made. Assumption 1. The system of differential-algebraic equations (15) should be solved by an outer numerical procedure. Assumption 2. The DAEi (X) systems (15) cannot be solved for such initial conditions: {[xiy0 xiz0 xiu ]}iN=1 (18) which are far from the feasible solution. Assumption 3. The co-operated nonlinear programming procedure enables us to solve small- and medium-sized tasks. Assumptions 1 and 2 indicate that an appropriate numerical procedure for solving the differential-algebraic system (15) is available. Moreover, the consistent initial conditions should be given as well, because a complete (or dense) survey of a multi-dimensional solution space is not an appropriate way for solving real-life technological design and optimization tasks (Assumption 2). Finally, Assumption 3 blocks the possibility of a full parametrization of the optimization problem. According to the presented multiple-shooting parametrization procedure, as well as Assumptions 1–3, which reflect the available computing resources, the α-model parametriza- tion algorithm is proposed. The α-model parametrization is based on influencing the variability and nonlinearity of the differential-algebraic system: ẏα (t) = α f (yα (t), z(t), u(t), p, t) 0 = g(yα (t), z(t), u(t), p, t) t ∈ [ t0 tf ] (αDAE) (19) y α ( t0 ) = yα0 z ( t0 ) = z0 u ( t0 ) = u0 with a constant α ∈ [0 1]. 3. The α-Model Parametrization Algorithm The differential equation in ordinary form: ẏα (t) = α f (yα (t), z(t), u(t), p, t) (20) with α ∈ [0 1], can be treated according to an explicit definition, as the variability of the state trajectory yα (t). In other words, the right-hand side of Equation (20) indicates how rapidly the state yα (t) varies or changes its value. This interpretation seems to be valid for these particular equations, especially if the state variability is constant or strictly
Appl. Sci. 2022, 12, 890 8 of 17 constrained. Moreover, a comparison between the original dynamical equation with its approximation can result in some insight into the range of their similarity. In a general nonlinear case, the variability rate, as well as its direction cannot be assumed to be constant even on a relatively small subinterval. This situation is often met in the design of heat and mass transfer processes. The proposition discussed in this work is to influence the variability by the α-parameter multiplication. Then, the obtained solution, which is feasible for a given value of α, can be used as an initial point in further computations with higher α values. The α-model parametrization approach enables us to consider the αDAE model in three special cases: 1. If α = 0, then the DAE model (2) takes the form: ẏα (t) = 0 0 = g(yα (t), z(t), u(t), p, t) t ∈ [ t0 tf ] (αDAE) (21) y α ( t0 ) = yα0 z ( t0 ) = z0 u ( t0 ) = u0 In this case, the dynamics of the system is completely reduced. For the assumed values yα0 , the problem is transformed into an optimization task with a pure algebraic system of constraints; 2. If α = 1, then the αDAE model (19) is equivalent to the original one (2); 3. If α ∈ (0, 1), then the αDAE system (19) can be characterized by a dynamics similar to one of the extreme cases (1 or 2). The similarity can be influenced directly by the α-parameter. Moreover, the value of α can reflect the robustness and efficiency of the applied numerical method for solving the differential-algebraic equations, as well as the progress of the optimization procedure. The similarity between the original DAEs (2) and αDAE models (19) can be approxi- mated with the trapezoidal rule: R tf R tf t0 ẏ(t) − ẏα (t) dt ≤ t0 |ẏ(t) − ẏα (t)|dt |t f − t0 | ≈ ∑im=−01 1 2 |ẏ(ti ) − ẏα (ti )| + |ẏ(ti+1 ) − ẏα (ti+1 )| m | t f − t0 | = m ∑im=−01 1 2 | f (·; ti ) − α f (·; ti )| + | f (·; ti+1 ) − α f (·; ti+1 )| (22) | t f − t0 | = m ∑im=−01 1 2 | f (·; ti )|(1 − α) + | f (·; ti+1 )|(1 − α) | t f − t0 | = m ∑im=−01 1 2 | f (·; ti )| + | f (·; ti+1 )| (1 − α) | t f − t0 | m −1 1 = m (1 − α ) ∑ i =0 2 | f (·; ti )| + | f (·; ti+1 )| with an assumed value of m ∈ N+ , and N+ denotes a set of natural numbers greater than zero. The terms (1 − α) and | f (·; ti )| + | f (·; ti+1 )| clearly indicate that the similarity is dependent on the following features: • The variability of the original system of DAEs (2); • The actual considered value of the α-parameter.
Appl. Sci. 2022, 12, 890 9 of 17 It can be clearly observed that the value of α can be used to influence the similarity between the original and αDAE, as well as to change the variability of the considered αDAE model (19). The α-parameter can be modified iteratively, depending on the available numerical procedures. 3.1. An Extension for a Multiple-Shooting Method For an assumed value of the parameter α, the αDAE (19) model can be solved with a multiple-shooting approach. The reformulation takes the following form: i i ẏα (t ) = α f (yiα (ti ), zi (ti ), ui (ti ), p, ti ) g(yiα (ti ), zi (ti ), ui (ti ), p, ti ) 0 = yiα (t0i ) xiyα0 = (αDAEi (Xα )) zi (t0i ) = xiz0 (23) i i u (t ) = xiu ti ∈ [t0i tif ] i = 1, · · · , N. The matrix of decision variables is similar to the matrix X (13), designed for the original DAE in the multiple-shooting formulation: (x1yα0 )T (x1z0 )T (x1u )T ( x2 ) T (x2z0 )T (x2u )T yα0 ∈ R N ×(ny +nz +nu ) Xα = (24) .. .. .. . . . (xyNα0 )T (xzN0 )T (xuN )T 3.2. The Context of the Homotopy Method The α-model parametrization approach can be considered as a special case of the homotopy method. In its classical approach, homotopy is treated as a way to solve a difficult task with an appropriate initial solution. The initial solution should be a result obtained for an easier task, which in some sense is similar to the original one. Then, the solution of the difficult task can be obtained iteratively by solving combined difficult and easy problems. The homotopy for a system of dynamical equations in the formula (19) is defined as follows. Let f , fe, and H be continuous transformations such that: f , fe : Rny × Rnz × Rnu × Rn p × R → Rny (25) α ∈ [0 1] ⊂ R (26) H ( f , α) = α f (·) (27) H ( f , α ) : Rny × R → R ny (28) with: ẏ(t) = f (·), ẏα (t) = α f (·), ẏ0ny ×1 (t) ≡ 0ny ×1 = fe(·) (29) and: H ( f , α = 0) = α f (·) ≡ 0ny ×1 = fe(·) (30) H ( f , α = 1) = α f (·) = f (·) (31)
Appl. Sci. 2022, 12, 890 10 of 17 then: f ∼ fe (32) Example 1. The presented approach can be treated as a special case of the general homotopy relation: H ( f , α) = fe(·) + α f (·) − fe(·) = 0ny ×1 + α f (·) + 0ny ×1 = α f (·) (33) where: • for α = 0: H ( f , α = 0) ≡ 0ny ×1 = fe(·); • for α = 1: H ( f , α = 1) = f (·). The homotopy relation of the dynamical parts of αDAE (19) and the original DAE (2) will result in a valuable guess of the initial solutions yiα (t0i ) and zi (t0i ) for i = 1, . . . , N. The appropriate guess of the decision variables Xα is crucial for the effective performance of the optimization procedure. Then, the obtained solution can be iteratively improved together with the changed value of the α-parameter. 4. The New Solution Procedure The stated optimization problem subject to the nonlinear differential-algebraic con- straints takes a new form according to the multiple-shooting approach. Then, the optimiza- tion task is reformulated by the α-model parametrization procedure. Finally, the ordered processing and computational steps of the designed procedure are presented as the αDAE model optimization algorithm. The αDAE model optimization algorithm: Step 1. Define the optimized objective function according to Equation (1) with the system of differential-algebraic constraints (2) Step 2. Define N ∈ R and apply the multiple-shooting approach to obtain: - a parametrized form of the objective function (12), - the matrix of the initial solution (13). - the systems of the DAEi , for i = 1, . . . , N, (15) - the continuity constraints (16), - the initial conditions’ consistency constraints (17) Step 3. Apply the α-model parametrization algorithm to obtain: - the systems αDAEi , for i = 1, . . . , N, (23) - a matrix Xα (24) Step 4. Define n ∈ N+ and a sequence {αk }nk=1 with α1 = 0 and αn = 1 Step 5. For k = 1 to n, solve minXα F (Xαk ) k subject to αk DAEi (Xαk ), for i = 1, . . . , N, (23) the continuity constraints (16), the initial conditions’ consistency constraints (17), to obtain X?αk , and substitute Xαk+1 0 = X?αk Step 6. The matrix X?αn is a final solution. The finite number of n iterations needs to be assumed. Then, the unknown values in the decision variables’ matrix X?αn can be obtained. The computational complexity of the proposed algorithm is related to two main aspects: • The complexity of the algorithm applied to solve finite-dimensional optimization tasks with pointwise-continuous constraints; • The number n of {αk } with k = 1, . . . , n.
Appl. Sci. 2022, 12, 890 11 of 17 The computational effort related to the application of the αDAE model optimization algorithm is dependent on the sequence of the αk parameters, the number of multiple- shooting subintervals, as well as the size of the DAE system: n |{z} × N |{z} × (ny + nz + nu ) (34) | {z } sequence of the {αk } parameters shooting subintervals size of the DAE system The computational effort related to the problem solving with the proposed algorithm can improve the efficiency of the applied numerical optimization procedure. The appropriate values of the initial solution can prevent long-term calculations and the possibility of the premature termination of the algorithm as a result of finding a local minimum. The efficiency of the proposed procedure was tested in the task of a heat and mass transfer system’s design. 5. An Application in the Design of a Heat and Mass Transfer Process The αDAE model optimization algorithm was implemented in the MATLAB R2021b environment. Although the considered counter-flow exchanger design task has been discussed previously in other articles [26,35,36], the problem formulation, as well as the solution procedure considered in this work were substantially different. The problem consisted of the objective function and the system of differential-algebraic equations in a semi-explicit form: min (y1 (t f ) − 30)2 (35) y1 (0) subject to ẏ1 (t) = − B · (z1 (t) − y1 (t))/t f ẏ2 (t) = C · (z2 (t) − y2 (t))/t f ẏ3 (t) = C · (z3 (t) − y3 (t))/t f 0 = − E1 B · (z1 (t) − y1 (t))/t f − C · (z2 (t) − y2 (t))/t f − E2 C · (z3 (t) − y3 (t))/t f (36) 0 = z2 (t) − (z1 (t) − D · (y1 (t) − z1 (t))) z4 ( t ) 0 = z3 (t) − 0.622 · Pb −z4 (t) −4 ·(z 2 +8.33·10−7 ·( z 3 0 = z4 (t) − 6.107 · e0.0726·z2 (t)−2.912·10 2 ( t )) 2 ( t )) The physical interpretation of the variables in the DAE model (36) is presented in Table 1.
Appl. Sci. 2022, 12, 890 12 of 17 Table 1. The physical interpretation of the state variables in the model of a counter-flow exchanger. Variable Description Type y1 ( t ) temperature in the 1st channel (◦ C) differential state y2 ( t ) temperature in the 2nd channel (◦ C) differential state y3 ( t ) humidity ratio in the 2nd channel (kg/kg) differential state z1 ( t ) temperature of the plate surface in the 1st channel (◦ C) algebraic state z2 ( t ) temperature of the plate surface in the 2nd channel (◦ C) algebraic state z3 ( t ) humidity ratio on the plate surface in the 2nd channel (kg/kg) algebraic state z4 ( t ) the static pressure (h Pa) algebraic state Additionally, a vector of the initial conditions was considered: y1 (0) y (0) = 24.0 (37) 10.4 · 10−3 with global parameters: B 40.0 C 40.0 D 0.058 p= = (38) E1 1.0 E2 2.5 × 103 Pb 1000.0 Moreover, a range of the independent variable domain was assumed: t ∈ [0.0 t f ] = [0.0 1.0]. (39) The considered objective function with the system of differential-algebraic equations was solved according to the rules of the αDAE model optimization algorithm: • The number of shooting subintervals N = 20; • It was assumed that the α parameter takes the following values: α = {0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0}; (40) • The solution trajectories of the parametrized αDAEi models were computed by an outer function ode15s, which belongs to the MATLAB computational environment. The applied solver delivers support to the calculations of the consistent initial condi- tions; • The MATLAB function fmincon was applied as a numerical optimization procedure to solve the new optimization task with the parametrized model constraints. The numerical values of the objective, as well as constraint functions were calculated with the outer ode15s solver. The chosen value of N = 20 subintervals resulted in: N × ny1 + ( N − 1) × ny2 + ( N − 1) × ny3 = 58 (41) decision variables related to the initial values of the differential variables. In this special case, the number of decision variables was not affected by the size of z(t) because the initial
Appl. Sci. 2022, 12, 890 13 of 17 values of the algebraic state trajectories were computed by the ode15s procedure. However, to improve the computations, it is worth delivering the approximated values of zi (t0i ) for i = 1, . . . , N. The parameters B and C are related to the rate of change of the state variables. There- fore, they can represent the physical features of the exchanger, such as, e.g., the number of transfer units. Unfortunately, the approaches such as single- or multiple-shooting were unable to solve the considered task for the higher values of the parameters B and C. The applicability range of the classical procedures has been clearly indicated in the previous research. In particular, in [26], it was numerically tested that a single-shooting procedure is efficient for B and C less than 16. Recently, a multiple-shooting approach was used to solve this task for values of B and C equal to 30 [35]. Now, this task is for the first time solved for higher values of the parameters B and C. Therefore, an extension of the computational capabilities in the multiple-shooting approach is a milestone of this research. The obtained solution trajectories, for various values of α, are graphically presented in Figures 1–3, where the shooting subintervals are depicted by the dotted lines. Then, the αDAEi equations were solved by the applied DAE solver. Finally, the continuity of the trajectories was forced by the imposed continuity constraints. The presented results cannot be compared with other solutions, because the computations were not performed for these special values in the vector p (38). The presented results have a very original character and can be treated as a reference for further research in this field in the future. Figure 1. The trajectory of the state variable y1 (t).
Appl. Sci. 2022, 12, 890 14 of 17 Figure 2. The trajectory of the state variable y2 (t). Figure 3. The trajectory of the state variable y3 (t). 6. Conclusions In the present study, two main computational difficulties were considered: the problem dimensionality and the lack of an appropriate initial solution. The problem dimensionality was related to the selected way of the task parametrization. The mere fact of parametrization has the effect that an infinitely dimensional problem has a finite size. Then, the size of the
Appl. Sci. 2022, 12, 890 15 of 17 problem can be adjusted according to the solution procedure used, as well as the available computing resources. The combination of the multiple-shooting method with the sequential approach for the optimization results with medium-sized nonlinear optimization problems can be solved on a personal computer. It is important to notice that the application of an outer DAE solution approach is necessary. The numerical optimization algorithm should co-operate with the outer DAE solver to obtain information about an objective function and its gradient. The appropriate initial conditions can be provided by the iterative steps of the homotopy-based approach. Finally, the presented components were used to create a general method for solving difficult dynamical optimization tasks. The αDAE model optimization algorithm can be implemented according to the main rules given in this work, but a specialized numerical procedures can be freely chosen by the user. The steps of the solution method were strictly defined, but this does not eliminate the possibility of adapting it to a specific real-life task. The effectiveness of the new algorithm was tested on a heat and mass transfer design problem. This is one of a large number of engineering tasks where physical laws can be used to build a computer simulation model. This classical problem is difficult from a computational point of view, because the wanted solution features are reflected in the nonlinear problem functions. The observed nonlinear relations, as well as the lack of a trustworthy initial solution justify the need for the research presented in this work, as well as and the necessity to develop advanced numerical optimization algorithms. Funding: This research was funded by the Department of Control Systems and Mechatronics at Wrocław University of Science and Technology. Acknowledgments: The author would like to thank the anonymous Reviewers for thoroughly reading the manuscript and providing valuable comments. Conflicts of Interest: The author declares no conflict of interest. The foundershad no role in the design of the study; in the collection, analyses, or interpretation of the data; in the writing of the manuscript; nor in the decision to publish the results. Abbreviations F scalar-valued performance index N+ set of natural numbers greater than zero R set of real numbers B, C, D, E1 , E2 parameters of the counter-flow exchanger model F scalar-valued objective function N number of shooting subintervals Pb atmospheric pressure T matrix transposition X matrix of decision variables e Neper number f , fe functions used to describe the differential part in the DAE system g function used to describe the algebraic part in the DAE system n length of a series {αk } na size of vector a p vector of global constant parameters t independent variable u vector of input functions y vector of differential state trajectory z vector of algebraic state trajectory x vector of decision variables α factor in the parametrization approach
Appl. Sci. 2022, 12, 890 16 of 17 superscripts L lower bound U upper bound i i-th subinterval ? solution in a current iteration subscripts 0 initial value f final value k number of current iterations α variable in α-parametrization References 1. Burnak, B.; Pistikopoulos, E.N. Integrated process design, scheduling, and model predictive control of batch processes with closed-loop implementation. AIChE J. 2020, 66, e16981. [CrossRef] 2. Atmaram, L.L.; Kodamana, H. Successive Linearization based Stochastic Model Predictive Control for batch processes described by DAEs. IFAC-PapersOnLine 2020, 53, 380–385. [CrossRef] 3. Fidanova, S.; Roeva, O. Influence of Ant Colony Optimization Parameters on the Algorithm Performance. In Large-Scale Scientific Computing LSSC 2017; Lirkov, I., Margenov, S., Eds.; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2018; Volume 10665. [CrossRef] 4. Pandelidis, D.; Dra̧g, M.; Dra̧g, P.; Worek, W.; Cetin, S. Comparative analysis between traditional and M-Cycle based cooling tower. Int. J. Heat Mass Transf. 2020, 159, 1–13. [CrossRef] 5. Betts, J.T. Practical Methods for Optimal Control and Estimation Using Nonlinear Programming; SIAM: Philadelphia, PA, USA, 2010. [CrossRef] 6. Gong, Y.; Guo, Y.; Ma, G.; Guo, M. Mars entry guidance for mid-lift-to-drag ratio vehicle with control constraints. Aerosp. Sci. Technol. 2020, 107, 106361. [CrossRef] 7. Singh, A.P.; Ghoshdastidar, P.S. Computer Simulation of Heat Transfer in Alumina and Cement Rotary Kilns. ASME. J. Thermal Sci. Eng. Appl. 2022, 14, 031001. [CrossRef] 8. Najim, A.; Krishnan, S. A similarity solution for heat transfer analysis during progressive freeze-concentration based desalination. Int. J. Therm. Sci. 2022, 172, 107328. [CrossRef] 9. Li, J.; Chen, J.; Chen, Y.; Luo, X.; Liang, Y.; Yang, Z. Effectiveness of actively adjusting vapour-liquid in the evaporator for heat transfer enhancement. Appl. Therm. Eng. 2022, 200, 117696. [CrossRef] 10. Najib, A.; Zarrella, A.; Narayanan, V. Development of g-functions for large diameter shallow bore helical ground heat exchangers. Appl. Therm. Eng. 2022, 200, 117620. [CrossRef] 11. Ghrissi, W.; Promis, G.; Langlet, T.; Douzane, O.; Chouikh, R.; Guizani, A. Study of the influence of input parameters in an air channel on mass and heat transfer phenomena within a wall saturated with water: Application to the renovation of old wet buildings. J. Build. Perform. Simul. 2021, 15, 81–96. [CrossRef] 12. Miettinen, K. Nonlinear Multiobjective Optimization; Springer: Boston, MA, USA, 1998. [CrossRef] 13. Nocedal, J.; Wright, S. Numerical Optimization; Springer: New York, NY, USA, 2006. [CrossRef] 14. Fletcher, R.; Leyffer, S. Solving mathematical programs with complementarity constraints as nonlinear programs. Optim. Methods Softw. 2004, 19, 15–40. [CrossRef] 15. Hu, J.; Mitchell, J.E.; Pang, J.-S.; Yu, B. On linear programs with linear complementarity constraints. J. Glob. Optim. 2012, 53, 29–51. [CrossRef] 16. Ye, J.J. Optimality conditions for optimization problems with complementarity constraints. SIAM J. Optim. 1999, 9, 374–387. [CrossRef] 17. Sahinidis, N.V. Mixed-integer nonlinear programming. Optim. Eng. 2019, 20, 301–306. [CrossRef] 18. Beykal, B.; Onel, M.; Onel, O.; Pistikopoulos, E.N. A data-driven optimization algorithm for differential algebraic equations with numerical infeasibilities. AIChE J. 2020, 66, e16657. [CrossRef] [PubMed] 19. Caspari, A.; Lüken, L.; Schäfer, P.; Vaupel, Y.; Mhamdi, A.; Biegler, L.T.; Mitsos, A. Dynamic optimization with complementarity constraints: Smoothing for direct shooting. Comput. Chem. Eng. 2020, 139, 106891. [CrossRef] 20. Yancy-Caballero, D.M.; Biegler, L.T.; Guirardello, R. Large-scale DAE-constrained optimization applied to a modified spouted bed reactor for ethylene production from methane. Comput. Chem. Eng. 2018, 113, 162–183. [CrossRef] 21. Kelley, M.T.; Baldick, R.; Baldea, M. A direct transcription-based multiple-shooting formulation for dynamic optimization. Comput. Chem. Eng. 2020, 140, 106846. [CrossRef] 22. Cao, Y.; Acevedo, D.; Nagy, Z.K.; Laird, C.D. Real-time feasible multi-objective optimization based nonlinear model predictive control of particle size and shape in a batch crystallization process. Control. Eng. Pract. 2017, 69, 1–8. [CrossRef] 23. Hara, K.; Watanabe, M. Application of the DAE approach to the nonlinear sloshing problem. Nonlinear Dyn. 2020, 99, 2065–2081. [CrossRef] 24. Xia, S.; Ding, Z.; Shahidehpour, M.; Chan, K.W.; Bu, S.; Li, G. Transient Stability-Constrained Optimal Power Flow Calculation With Extremely Unstable Conditions Using Energy Sensitivity Method. IEEE Trans. Power Syst. 2021, 36, 355–365. [CrossRef]
Appl. Sci. 2022, 12, 890 17 of 17 25. Pandelidis, D.; Cichoń, A.; Pacak, A.; Dra̧g, P.; Dra̧g, M.; Worek, W.; Cetin, S. Water desalination through the dewpoint evaporative system. Energy Convers. Manag. 2021, 229, 1–19. [CrossRef] 26. Dra̧g, P.; Styczeń, K. A chain smoothing Newton method for heat and mass transfer control with discrete variability DAE models. Int. Commun. Heat Mass Transf. 2021, 120, 105056. [CrossRef] 27. Assassa, F.; Marquardt, W. Dynamic o optimization using adaptive direct multiple-shooting. Comput. Chem. Eng. 2014, 60, 242–259. [CrossRef] 28. Dra̧g, P. A shortened time horizon approach for optimization with differential-algebraic constraints. In Proceedings of the 16th Conference on Computer Science and Intelligence Systems, Sofia, Bulgaria, 2–5 September 2021; pp. 211–215. [CrossRef] 29. Dra̧g, P.; Styczeń, K. The new approach for dynamic optimization with variability constraints. In Recent Advances in Computational Optimization: Results of the Workshop on Computational Optimization WCO 2017; Fidanova, S., Ed.; Springer: Cham, Switzerland, 2019; pp. 35–46. [CrossRef] 30. Zanelli, A.; Quirynen, R.; Jerez, J.; Diehl, M. A Homotopy-based Nonlinear Interior-Point Method for NMPC. IFAC-PapersOnLine 2017, 50, 13188–13193. [CrossRef] 31. Brenan, K.E.; Campbell, S.L.; Petzold, L.R. Numerical Solution of Initial-Value Problems in Differential-Algebraic Equations; Society for Industrial and Applied Mathematics; SIAM: Philadelphia, PA, USA, 1995. [CrossRef] 32. Hairer, E.; Lubich, C.; Roche, M. The Numerical Solution of Differential-Algebraic Systems by Runge–Kutta Methods; Lecture Notes in Mathematics; Springer: Cham, Switzerland, 1989; Volume 1409. 33. Ma, Y.; Chen, X.; Eason, J.P.; Biegler, L.T. Dynamic optimization for grade transition processes using orthogonal collocation on molecular weight distribution. AIChE J. 2019, 65, 1198–1210. [CrossRef] 34. Lin, X.; Chen, X.; Biegler, L.T.; Feng, L.F. A modified collocation modeling framework for dynamic evolution of molecular weight distributions in general polymer kinetic systems. Chem. Eng. Sci. 2021, 237, 116519. [CrossRef] 35. Dra̧g, P. A direct optimization algorithm for problems with differential-algebraic constraints: Application to heat and mass transfer. Appl. Sci. 2020, 10, 9027. [CrossRef] 36. Pandelidis, D.; Anisimov, S.; Worek, W.M. Performance study of counter-flow indirect evaporative air coolers. Energy Build. 2015, 109, 53–64. [CrossRef]
You can also read