Efficiency Optimization Design That Considers Control of Interior Permanent Magnet Synchronous Motors Based on Machine Learning for Automotive Application

Interior permanent magnet synchronous motors have become widely used as traction motors in environmentally friendly vehicles. Interior permanent magnet synchronous motors have a high degree of design freedom and time-consuming finite element analysis is required for their characteristics analysis, which results in a long design period. Here, we propose a method for fast efficiency maximization design that uses a machine-learning-based surrogate model. The surrogate model predicts motor parameters and iron loss with the same accuracy as that of finite element analysis but in a much shorter time. Furthermore, using the current and speed conditions in addition to geometry information as input to the surrogate model enables design optimization that considers motor control. The proposed method completed multi-objective multi-constraint optimization for multi-dimensional geometric parameters, which is prohibitively time-consuming using finite element analysis, in a few hours. The proposed shapes reduced losses under a vehicle test cycle compared with the initial shape. The proposed method was applied to motors with three rotor topologies to verify its generality.


I. INTRODUCTION
Environmentally friendly vehicles have increasingly attracted attention as a tool for achieving carbon neutrality. Interior permanent magnet synchronous motors (IPMSMs) [1], [2], [3] are used as traction motors in such vehicles because of their high output, high efficiency, and high reliability.
IPMSMs have permanent magnets (PMs) inside the rotor. There is a high degree of freedom in the PM arrangement and the flux barrier arrangement, and thus various designs are possible for a given set of specifications. Finite element analysis (FEA) is generally used to analyze the characteristics of IPMSMs; however, this analysis is very time-consuming. For IPMSM analysis for automotive applications, the analysis The associate editor coordinating the review of this manuscript and approving it for publication was Wei Quan. time is very long because the characteristics must be obtained under various speed and torque conditions (e.g., city driving, suburban driving, highway driving). The design of IPMSMs takes a long time because FEA must be repeatedly performed on various design alternatives. There is thus a need for an automatic design system that can efficiently design highperformance IPMSMs.
Many studies have proposed algorithms for efficiently finding the optimal design. Bonthu et al. [4] minimized torque ripple and cogging torque by optimizing the notch shape of the rotor surface of a PM-assisted synchronous reluctance motor. Farhadian et al. [5] proposed an optimization algorithm based on improved particle swarm optimization to optimize the torque characteristics of a synchronous reluctance motor. Son et al. [6] optimized the rotor shape of an IPMSM with grain-oriented electrical steel applied to the VOLUME 11, 2023 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ stator teeth using a modified genetic algorithm. Shi et al. [7] proposed multi-objective optimization based on the sequential Taguchi method for a five-phase permanent magnet hub motor. Although these methods efficiently optimize geometry, they are unsuitable for IPMSMs in automotive applications because they obtain the motor characteristics only at a single current condition.
To speed up the design process, many studies have constructed surrogate models for FEA. A surrogate model functionalizes the relationship between the input (geometry and operating conditions) and the output (the characteristics) of FEA. Using a surrogate model allows us to perform IPMSM design with a reduced number of FEA iterations or without FEA. Building a surrogate model requires some FEA results. Many studies have utilized surrogate models trained by machine learning. Islam et al. [8] optimized two rotor design parameters at multiple output points of an IPMSM using the response surface method. Zheng et al. [9] performed the multi-objective optimization of an IPMSM with rare-earth PMs and ferrite PMs using the response surface method. Sun et al. [10] classified the geometric parameters of an IPMSM into three categories by cross-factor variance analysis and optimized them with respect to torque and loss characteristics using kriging. Sun et al. [11], [12] proposed a system-level design optimization method based on the actual operating environment and a sequential subspace optimization method using the kriging method for a permanent magnet hub motor, respectively. Dhulipati et al. [13] used support vector regression to train a prediction model for a six-phase IPMSM. Hao et al. [14] trained a model to learn the relationship between the design parameters and torque ripple of an IPMSM using radial basis function networks and used the model for optimization. Pan et al. [15] used XGBoost, an optimized distributed gradient boosting library, to learn the relationship between the torque characteristics and the structural parameters of PM arc motors and used the model for optimization. These machine-learning-based surrogate models are very effective for the automated design of IPMSMs.
However, much of the above-mentioned research on design optimization of electromagnetic machines with machine learning did not focus on control strategies. For traction motors for automotive applications, some operating points (torques and speeds) are given. At that operating points, it is necessary to consider designs that optimize the characteristics such as efficiency. Because various current conditions are possible to drive at given operating points, it is necessary to determine the optimal current conditions based on a control strategy, which requires repeated FEA. Especially during design optimization, for each of a large number of design alternatives, the optimal current condition needs to be searched based on a control strategy and requires a high computational cost. Therefore, this study proposes a fast efficiency optimization method for IPMSM for automotive applications with machine-learning-based surrogate models. The contributions of this study are as follows.
• Machine-learning-based surrogate models are proposed for predicting iron loss characteristics based on current and speed conditions in addition to geometry information, which can reduce characteristic computation time compared to FEA.
• A surrogate model is used to obtain the current conditions for driving at the required operating points with copper loss minimization control and to find the best design that maximizes the efficiency characteristics under such control. The rest of this paper is organized as follows. Section II describes the mathematical modeling of the target IPMSM. Section III describes the training of the surrogate model with machine learning. Section IV shows the results of efficiency maximization with a torque constraint using the proposed surrogate model. Section V summarizes the results.
The dataset described in Section III-C is available at IEEE DataPort [16] and the Python implementation of the iron loss prediction model is available at GitHub [17].

A. TARGET IPMSM
This study focuses on IPMSMs for automotive applications. Fig. 1 shows the structure of a double-layered IPMSM (Type 2D) and Table 1 shows the corresponding specifications. To verify the generality of the proposed method, this study uses three rotor topologies (see Fig. 4 below). All IPMSMs have 8-pole, 48-slot stators with distributed windings. The details of each model are described elsewhere [3].

B. IPMSM MODELING
The average torque T of an IPMSM is obtained as follows.
where P n is the number of pole pairs, a is the PM flux linkage, L d and L q are the d-and q-axis inductances, respectively, i d and i q are the d-and q-axis currents, respectively, and I a and β are the magnitude and leading angle with respect to the q-axis of the armature current vector, respectively. Because IPMSMs are driven under inverter voltage and current limits, the current vector that maximizes the output should be searched for under each limit. The current and voltage limits are respectively expressed by the following equations.
where I am is the maximum armature current, V a is the terminal voltage, v d and v q are the d-and q-axis voltages, respectively, and V am is the maximum terminal voltage, which depends on the dc-link voltage. The limit of the induced  voltage V o of the IPMSM is expressed as follows.
where d and q are the d-and q-axis flux linkages, respectively, and the maximum induced voltage V om depends on V am as follows.
where R a is the winding resistance, and ϕ is the power factor angle. The equality condition for (5) is the power factor cosϕ = 1. For simplicity, this study sets the maximum induced voltage V om to the minimum value V am − R a I am .

C. LOSS EVALUATION
This section describes the losses of the IPMSM. IPMSMs for automotive applications are required to perform under various speed and torque conditions. The Worldwide Harmonized Light Vehicles Test Cycle (WLTC) is commonly used for vehicle loss and efficiency evaluation. Fig. 2 shows the vehicle speed and the discrete operating points of the motor under the WLTC. For the conversion from vehicle speed to motor operating point, the body constants of Toyota's thirdgeneration Prius were used. For more details, see [3]. As shown in Fig. 2, the operating point of a motor is given as a speed and a torque. However, there are various current conditions where the motor can be driven at a single operating point. Therefore, the evaluation of driving characteristics at a certain operating point requires finding the appropriate current conditions. This study finds the appropriate current conditions Î a ,β for a given operating point ω req , T req by minimizing copper loss as follows.
The reason for using copper loss minimization is that copper loss is easy to calculate and is often used in actual motor drives rather than maximum efficiency control, which takes into account iron loss and other losses. For motors for automotive applications, it is difficult to solve (6) analytically because the motor parameters have strong nonlinearities due to the effect of magnetic saturation. In general, (6) is solved numerically by repeatedly performing FEA. Fig. 3 shows the algorithm for the current condition search based on copper loss minimization, where I a > 0 and β > 0 are the search step sizes for I a and β, respectively, and ε > 0 is the threshold value. Because copper loss depends only on the current amplitude, copper loss minimization only needs to find the smallest current amplitude condition that satisfies the constraints. Therefore, this algorithm performs the characteristics analysis sequentially starting from the condition with the smallest current amplitude and searches for the smallest current condition that satisfies the constraints.
Once the appropriate current condition is found, the efficiency is calculated. Because this study uses static magnetic field analysis, iron loss does not affect the analyzed power, and iron loss analysis is performed separately under arbitrary speed conditions. Therefore, the efficiency η is calculated as follows.
where ω m is the mechanical angular velocity, and W i is the iron loss.

III. MACHINE-LEARNING-BASED SURROGATE MODEL
For the efficiency maximization design, an efficiency evaluation is performed for a large number of solution shapes. However, as described in Section II, the efficiency evaluation of IPMSMs for automotive applications requires repeated FEA, which is time-consuming and thus makes large-scale optimization design difficult. This study constructs surrogate models that can predict the driving characteristics of an IPMSM from the current and speed conditions and its geometry using machine learning.

A. MOTOR PARAMETER PREDICTION
The parameters to be predicted by machine learning in the efficiency maximization design are motor parameters and the iron loss. The motor parameters include PM flux linkage a and d-and q-axis inductances L d and L q , respectively. Using (1) and (4) with these parameters, the average torque and induced voltage can be calculated, respectively. To take into account the effects of magnetic saturation, the surrogate model that predicts these motor parameters takes as input the current condition I e and β in addition to the geometric parameters. For the analysis of the motor parameters, note that a is calculated from the FEA results at β = 0 • and that a is required for calculating L d . Based on these relationships, we efficiently generate data and use support vector regression and XGBoost to construct surrogate models for motor parameters with high accuracy. See [18] for details. This study uses the surrogate models constructed in [18] for parameter prediction.

B. ROTOR SHAPE GENERATION
Next, the iron loss prediction method is described. Fig. 4 shows the initial rotor topologies and geometric parameters for the three IPMSMs [3], [19], where r · 1 , θ · 1 are the polar coordinates, with the center of the shaft as the origin. The geometric parameter vectors for each topology are defined as and all variables not included in x • geom or dimensions not shown in Fig. 4 are either constant or automatically determined (e.g., the PMs in the second layer in Fig. 4(a) have the same dimensions). The arc shape at the end of the flux barrier has been removed for simplicity. The rotor shape can be obtained by randomly generating x • geom according to the following equation.
where U (a, b) is a random variable with a uniform distribution on an open interval (a, b), x • geom(j) is the j-th geometric parameter, and x • lwr(j) , x • upr(j) are its upper and lower bounds, respectively. The upper and lower limits of the basic geometric parameters x • geom are set with inter-variable dependencies to prevent the generation of un-designable shapes (e.g., magnets popping out of the rotor area) [18]. Because the upper and lower bounds for each parameter are different from case  [3], and (c) Nabla [19].
to case, the simple uniform distribution was used instead of complex sampling methods such as the Latin hypercube sampling. The directions of magnetization of the PMs were fixed in the thickness direction.
For 2D, V, and Nabla topologies, 28,990, 28,539, and 27,655 rotor shapes for the training datasets were randomly generated according to (9), respectively. Python was used to implement the uniform distribution. (In fact, 30,000 rotor shapes for each topology were prepared, but excluding the cases where the FEA failed described in Sec. III-C, the numbers of data were as described above.)

C. FINITE ELEMENT ANALYSIS CONDITIONS
This section describes the analysis of the shapes generated in Section III-B. Phase currents I e , current phase angles β, and speeds N were generated according to (10).
This setting means that one geometry is analyzed under only one current and speed condition.
The rotor position was changed in one-degree (mechanical angle) steps in the two-dimensional FEA using JMAG-Designer 19.1 as the analysis software. In the iron loss analysis, the fast Fourier transform method was adopted for both hysteresis loss and eddy current loss computation without considering the minor loop. The eddy current loss in the PM was not considered. For the analysis, a computer with an Intel Core TM i9-10980XE CPU and 32.0 GB of RAM was used. The total FEA time for 28,990, 28,539, and 27,655 rotor shapes of the 2D, V, and Nabla topologies was 477.2, 372.5, and 439.8 hours, respectively.

D. XGBOOST
Because the training dataset is tabular and multi-dimensional and contains a lot of data, this study uses XGBoost as the learning method for iron loss prediction. XGBoost is a gradient boosting method proposed by Chen and Guestrin [20]. It uses decision trees as weak learners. The learning process of XGBoost is described below.
First, the first decision tree is adapted from the input data. Next, a second decision tree is fitted to reduce the residuals of the first one. In this way, when K decision trees are constructed, the predicted value f (x i ) is expressed by (11) with the k-th decision tree as f k .
When constructing the t-th decision tree from t-1 decision trees, the following optimization problem is solved.
is the prediction by t-1 decision trees, and the loss function l uses the root-mean-square error.
is the regularization term defined as follows.
where T is the number of leaf nodes in the decision tree, w ∈ R T is the value stored in the leaf node, and γ , λ > 0 are hyperparameters.

E. TRAINING SETTINGS
The input vectors x • ironloss in iron loss prediction are 14dimensional vectors.
VOLUME 11, 2023 As a general formula for iron loss, an empirical equation, called Steinmetz's equation [21], is used.
where W h is the hysteresis loss, W e is the eddy current loss, m core is the core mass, k h and k e are constants, f is the frequency, and B max is the maximum flux density. According to (15), the hysteresis loss and the eddy current loss have different nonlinearities with respect to frequency and the maximum magnetic flux density. Therefore, to improve prediction accuracy, the hysteresis loss and the eddy current loss were predicted separately as follows.
The functions f h and f e are subject to training with XGBoost.
In the training, the datasets of features and targets were split into two subsets, namely training and test sets, in a 4:1 ratio. The datasets were standardized before training.  Python was used for implementation. Five-fold crossvalidation with the library Optuna was used for hyperparameter tuning. Fig. 5 shows the prediction results of the hysteresis loss and the eddy current loss. The prediction of both hysteresis loss and eddy current loss was found to be highly accurate even for unknown test data. The prediction accuracies were equally high for all topologies. Fig. 6 compares the efficiency maps of the initial 2D models created by FEA and those predicted by machine learning. The computation time for generating efficiency maps for FEA was 4.23 ± 0.61 hours and that for the prediction by machine learning was 28.18 ± 0.08 seconds. The computation times are the means and standard deviations (std) of 5 trials for  FEA and 100 trials for prediction. The results of prediction by machine learning are similar to those of FEA, suggesting that this prediction has potential use as a highly accurate surrogate model. The computation time of the surrogate model was less than 0.2% that of FEA, indicating that once training is completed, the surrogate model can be repeatedly used for large-scale design optimization.

IV. EFFICIENCY OPTIMIZATION
In this section, a multi-objective multi-constraint optimization design is performed using the trained prediction models.

A. PROBLEM
It is time-consuming to evaluate efficiency at all operating points of the WLTC. Therefore, the characteristics at two representative points are evaluated. Fig. 7 shows the evaluation points used in optimization. The efficiency evaluation points are determined based on the motor operating points in WLTC as shown in Fig. 2, and two other torque constraints are set to maintain the same output as the reference motor. The efficiency maximization problem with a torque constraint for the IPMSM is as follows.
where η pred 1 and η pred 2 are the predicted efficiencies at operating points P 1 and P 2 , which are calculated by (6), (7), and (16) and normalized by the initial values η init 1 and η init 2 , respectively. w 1 and w 2 are weight coefficients, (w 1 , w 2 ) = (1, 1) in this setup. P AD is the applicability domain penalty of the prediction models [18]. The constraint conditions g i are torque constraints for two required operating points N req i , T req i 4 i=3 , which are multiplied by a coefficient (α = 1.05) to consider the prediction error. The predicted torques used for efficiency calculations and torque constraints were calculated by (1) and the surrogate model for predicting motor parameters described in Section III-A at the current conditions obtained in (6).
The current conditions for the efficiency evaluation were determined by copper loss minimization using the algorithm in Fig. 3 with the surrogate model instead of FEA. This algorithm is implemented using the array computation in the Python library NumPy. The torque prediction results are given as the maximum output control at the required speed using the surrogate models for motor parameters.
NSGA-II [22] was used as the optimization algorithm and the Python library pymoo was used for the implementation [23]. For 2D, V, and Nabla, the population sizes were 50, 25, and 40, and the numbers of offspring were 10, 8, and 10, respectively. These values depended on the dimensions of the geometric parameters. Latin hypercube sampling was used for sampling the initial population, the tournament method was used for selection, simulated binary crossover was used for crossover, and polynomial mutation was used for mutation. The termination condition was set to 50 generations.   at low speed was the most effective constraint in this setup. Severe torque constraints converge the population to a shape that can reduce copper loss. Thus, especially for 2D and V, the final population tended to have higher efficiency η pred 1 than η pred 2 , where copper loss is dominant rather than iron loss. On the other hand, for Nabla, the average torque tends to be the highest among the three topologies. Therefore, the effect of the torque constraints on the final population is not significant; the final population formed a broad Pareto front to η at low speed tends to be highest for Nabla, where torque is easily obtained, and that efficiency η pred 2 at high speed tends to be highest for 2D, which has a high reluctance torque ratio.
FEA of the best shape was performed to verify the validity of the optimization results. Fig. 10 shows the selected best rotor shapes and Table 2 shows their geometric parameters. The best shapes are indicated by blue squares in Fig. 8. Fig. 11 shows the total losses under WLTC, where losses during regeneration were not considered. The optimized models achieved a loss reduction of 1.9% for 2D, 10.1% for V, and 5.6% for Nabla compared with the initial geometries. This is thanks to the accelerated computation time for individual evaluation, which allows many shape alternatives to be considered. Table 3 shows the optimization computation time for each topology, where the results were measured for 10 optimization runs on a computer with an Intel Core TM i7-9700K CPU, 32.0 GB of RAM, and an NVIDIA GeForce RTX 3090 SUPER (24 GB) GPU. The optimization calculation took only about 2 hours even for 2D, which has 11 dimensions and the largest number of geometric parameters among three topologies. Thus, our proposed method can complete efficiency optimization with many parameters, which is  prohibitively time-consuming using FEA, in a relatively short time. Furthermore, once trained, the prediction model can be used repeatedly, allowing optimization under different conditions to be performed repeatedly in a short time.

V. CONCLUSION
This paper proposed a machine-learning-based surrogate model for predicting iron loss characteristics. This model allowed us to obtain the current conditions for the operating points with copper loss minimization control and to perform efficiency maximization design in a short time. The effectiveness of the proposed method was validated by IPMSMs with three rotor topologies.
The surrogate model takes the current and speed conditions as inputs in addition to geometry information. It achieved highly accurate iron loss prediction under a wide range of speed and torque conditions. The computation time of the surrogate model was less than 0.2% that of FEA. Therefore, the surrogate model allows an efficiency maximization design with multi-dimensional geometrical parameters to be performed, which is prohibitively time-consuming using FEA. The best shapes obtained in the optimization reduced the losses under the WLTC by 1.9%, 10.1%, and 5.6% compared with that for the initial motors for 2D, V, and Nabla, respectively. The computational time required for the optimization was 123.58 minutes even with 11-dimensional geometric parameters, indicating that the design can be completed in a short time. Furthermore, once trained, the prediction model can be used repeatedly, allowing optimization under different conditions to be performed repeatedly in a short time.
In future work, the driving characteristics of the optimized models will be verified using prototypes.
The dataset described in Section III-C is available at IEEE DataPort [16] and the Python implementation of the iron loss prediction model is available at GitHub [17].