Branch and Bound Algorithm Based on Prediction Error of Metamodel for Computational Electromagnetics
Total Page:16
File Type:pdf, Size:1020Kb
energies Article Branch and Bound Algorithm Based on Prediction Error of Metamodel for Computational Electromagnetics Reda El Bechari 1,2,∗ , Stéphane Brisset 1 , Stéphane Clénet 1 , Frédéric Guyomarch 1 and Jean Claude Mipo 2 1 University Lille, Arts et Metiers Institute of Technology, Centrale Lille, Junia, ULR 2697-L2EP, F-59000 Lille, France; [email protected] (S.B.); [email protected] (S.C.); [email protected] (F.G.) 2 Valeo Powertrain Systems, F-94000 Créteil, France; [email protected] * Correspondence: [email protected] Received: 16 November 2020; Accepted: 17 December 2020; Published: 21 December 2020 Abstract: Metamodels proved to be a very efficient strategy for optimizing expensive black-box models, e.g., Finite Element simulation for electromagnetic devices. It enables the reduction of the computational burden for optimization purposes. However, the conventional approach of using metamodels presents limitations such as the cost of metamodel fitting and infill criteria problem-solving. This paper proposes a new algorithm that combines metamodels with a branch and bound (B&B) strategy. However, the efficiency of the B&B algorithm relies on the estimation of the bounds; therefore, we investigated the prediction error given by metamodels to predict the bounds. This combination leads to high fidelity global solutions. We propose a comparison protocol to assess the approach’s performances with respect to those of other algorithms of different categories. Then, two electromagnetic optimization benchmarks are treated. This paper gives practical insights into algorithms that can be used when optimizing electromagnetic devices. Keywords: electromagnetic; finite element method; metamodel; optimization methods; TEAM Workshop problems 1. Introduction The increasing constraints on the design of electromagnetic devices require numerical tools that can model the electromagnetic fields with high precision on local quantities. The Finite Element (FE) method is the most used method to satisfy such a requirement. However, this method may be costly in terms of computational time due to nonlinear behavior, 3D geometry, and time dependency. Thus, its usage for optimization, i.e., iterative process, should be made with caution since only a limited number of evaluations of the simulation tool is possible. It also suffers from numerical noise due to the remeshing when dealing with geometric parameters. Thus, these issues have been extensively studied in the literature using the metamodel approach and the stochastic algorithms [1,2], e.g., genetic algorithms (GA), etc. On the other hand, optimization using gradient-based algorithms is less studied due to the remeshing error that perturbs the gradient’s computation using the finite difference technique [3]. Metamodels are widely used in the context of optimization of electromagnetic devices [4,5]. They are constructed based on a small sample from the expensive model, i.e., FEM simulation. The optimization is performed on the metamodel rather than the expensive model. This metamodel could be improved using infill criteria that enable the sampling of new promising designs from the Energies 2020, 13, 6749; doi:10.3390/en13246749 www.mdpi.com/journal/energies Energies 2020, 13, 6749 2 of 16 full model. The infill criterion has a strong influence on how efficiently and accurately the algorithm locates the optimum. In this paper, we developed a new approach to the usage of metamodels in optimization because the conventional approach of fitting one metamodel and enriching it has some drawbacks: 1. The infill criteria that focus more on the local search tend to sample points close to each other, which decays the conditioning of the correlation matrix and, consequently, the construction of the metamodel [6,7]. 2. The number of samples exponentially increases as the optimization problem’s dimensionality does (the curse of dimension). Thus, the size of the correlation matrix increases and consequently the time needed to fit the metamodel. This time can even exceed the evaluation time of the FE model. 3. The infill criteria optimization problem is highly multimodal, and their modality is highly correlated to the sample size of the expensive model evaluations; when the number of samples increases, the number of local optima increases too. Therefore, it becomes highly difficult to solve these optimization problems [8]. 4. When dealing with constrained optimization, the infill criteria tend to sample inside the feasible region but not on the feasibility boundaries, which affects the solution accuracy [9]. This paper proposes a novel approach that considers the FEM simulation as a black-box and constructs cheap metamodels to reduce the computational burden while refining in regions with a high error or low objective value. Then we compare it to different approaches that directly use the expensive model; a derivative-based algorithm that uses the derivatives computed using the adjoint variable method and derivative-free ones such as GA and DIRECT [10,11]. The comparison mainly focuses on the implementation and the computational cost to get efficient results. Furthermore, we define metrics and a comparison protocol to ease this task. The comparison results highlight the algorithms suitable for the optimization of electromagnetic devices and the pros and cons of each of them. 2. Metamodel Approach The proposed approach is called Branch and Bound based on Metamodel (B2M2). It is based on the principle of the branch and bound algorithms and consists of a systematic enumeration of candidate regions by splitting the search space into smaller spaces. The algorithm explores each smaller space then estimates the upper and lower bounds for each one of them. A subspace is discarded if it cannot produce a better solution than the best found so far by the algorithm. 2.1. B2M2 Algorithm We propose an algorithm that builds many metamodels, each on a specified region of the design space; each one of them is relatively easy to fit and is used to estimate the upper and lower bounds. Then, iteratively, it excludes the regions that are not promising. By adopting this algorithm, the drawbacks mentioned earlier are tackled, namely, the numerical ones related to the correlation matrix. The flowchart of the algorithm is shown in Figure1. Energies 2020, 13, 6749 3 of 16 Energies 2020, 1, 5 3 of 15 Define initial space S and set an empty list L Split S into K sub-spaces sj Fit Meta-model on s1 ... Fit Meta-model on sK Find new samples to ... Find new samples to improve meta-model improve meta-model Stop ? Stop ? Find the upper ... Find the upper and lower bounds and lower bounds Add all sj with bounds to L Prune unpromising spaces from L Select S as the most promising space in L Stop ? End FigureFigure 1. 1.FlowchartFlowchart of of B2M2. B2M2. 2.1.1.2.1.1. Initialization Initialization InIn the the beginning, beginning, the the initial initial space space SS isis defined, defined, and and an an empty empty list list LL isis set. set. LL willwill store store the the potentiallypotentially optimal optimal regions. regions. Additionally, Additionally, a a maximum maximum depthdepth levellevelllisis defined defined to to limit limit the the exploration exploration ofof the the algorithm. algorithm. The The depth depth level level can can be be seen seen as as a a metric metric of of how how many many times times the the initial initial design design space spaceSS cancan be be subdivided. subdivided. 2.1.2.2.1.2. Branching Branching TheThe branching branching stands stands for for subdividing subdividing the the initial initial design design space spaceSS.. The The most most intuitive intuitive rule rule is is splitting splitting nv each dimension of S by two. This will lead to K = 2nv sub-spaces s (nv is the number of variables). each dimension of S by two. This will lead to K = 2 subspaces sj j(nv is the number of variables). Unfortunately, the number of sub-spaces increases exponentially as the number of variables grows. This is not desired, and a more practical rule is proposed. Energies 2020, 13, 6749 4 of 16 Unfortunately, the number of subspaces increases exponentially as the number of variables grows. This is not desired, and a more practical rule is proposed. For metamodels, the purpose behind branching is to improve upon its accuracy by reducing the size of the design space. Thus, the space S is split, such as the produced subspaces are of better accuracy. Therefore, the metamodel fit to S is used to identify the dimensions of high inaccuracy. The stochastic term in the Kriging predictor enables the modeling of the error not captured by the regression term. The correlation function characterizes this term. Commonly, the exponential function is used to express the correlation between two points pk and pl, and it is given by nv k l k l a Corr[F(p ), F(p )] = exp ∑ qi pi pi (1) − i=1 j − j k k where F(p ) is the evaluation of the expensive model at p , nv is the number of variables, qi and a are the parameters of the correlation. The value of a characterizes the smoothness of the function, while the values of qi enable the modeling of the changes over distance. Large values of qi serve to model rapid changes even over small distances. Hence, the values of qi are indicators of how the function varies. If the value of qi, corresponding to a variable pi, is the largest. Then, the change in the ith-dimension is more important than other dimensions (when the variables are normalized). Consequently, splitting the space S by dividing its dimension i will lead to metamodels on the subspaces that are better than the one on S. A simple example is used to test this property of the Kriging model (2).