Control strategy research of electric vehicle thermal management system based on MGA-SVR algorithm

The thermal management system is one of the important assemblies that ensure the secure operation of electric vehicles (EVs). Using intelligent algorithms to optimize the control strategy of the thermal management system can reduce energy consumption under the premise of effective heat dissipation of EVs. This paper attempts to construct the control strategy of EV thermal management system by coupling the modified genetic algorithm (MGA) and support vector regression (SVR). Firstly, the double-population adaptive mutation method and a novel optimization process are adopted to obtain MGA. Afterward, the performance of MGA is verified by four benchmark functions compared with three typical algorithms, which are genetic algorithm (GA), double-population genetic algorithm (DPGA), and quantum genetic algorithm (QGA). The results demonstrate that the accuracy and stability of MGA are obviously better than the other three algorithms. Secondly, MGA is applied to modify parameters of SVR kernel function, and the accuracy of MGA-SVR algorithm is verified by the Auto-MPG and Computer Hardware data sets. The mean square deviations of the SVR algorithm test set are 0.0186 and 0.0806, respectively, and the mean square deviations of the MGA-SVR algorithm test set are 0.0099 and 0.0054, respectively, which fully shows that MGA-SVR have more accurate forecasting capabilities. Finally, the thermal management system model of EV is built by the one-dimensional simulation software KULI. Under the Chinese working condition, fan speed which meets the cooling requirements of the motor and controller is obtained from the KULI model, and the database is constructed. Then, MGA-SVR is trained by database and employed to predict fan speed under the Chinese working condition and obtain control strategy of the thermal management system. Compared with traditional control strategy, the thermal management system based on MGA-SVR control strategy can not only meet the radiating requirements, but also effectively reduce the power consumption of fans.


Introduction
Environmental pollution and energy crisis have been becoming increasingly serious in recent years. EV has become the automobile enterprises' competitive products owing to its high efficiency and low pollution. 1 However, the normal operation of key components such as motor is the basis to ensure the safety of the operation of the vehicles. If the heat generated by the EV motor system cannot be taken away in time, it will affect the working efficiency, and even cause it to burn out. Therefore, a thermal management system is of great significance to EVs. 2 For a complete thermal management system, the effective control strategy ensures that the motor and other key components work in the appropriate temperature range even if the compressor, fan and other power consuming parts work in the low speed range. However, the control strategy of automobile thermal management system based on threshold control and fuzzy control is difficult to meet the requirements. 3 With the development of the automobile industry technology, it is difficult for the traditional control method to fulfill the requirements of many aspects due to the increasingly precise requirements of the vehicle control system. Complex intelligent algorithms, such as SVM, 4 ANN, 5 GA, 6 and Combined artificial intelligence method 7 are emerging and developing in the Industrial field. Then researchers have begun to study the application of intelligent algorithms to the control strategy of vehicle thermal management system. 8,9 Wang et al. 10 used GA to optimize the fuzzy membership function with the goal of minimizing energy loss, and obtains the energy management strategy of hybrid energy storage system. Hannan et al. 11 adopts particle swarm optimization algorithm based on fuzzy logic control to improve the performance of battery thermal management system.
As a typical intelligent algorithm, GA is extensively used in mathematical programing, combinatorial optimization, and other fields. 12 Nevertheless, the optimization ability of GA is still facing challenges, and it is worthwhile devoting effort to improve the parameter setting, mutation method and convergence rules. 13 To improve the global search ability, Kumar et al. 14 adopt queuing theory and non-dominated sorting genetic algorithm II to make a planning framework of electric vehicles fast charging station assisted by solar and battery. Bhattacharjee et al. 15 used the improved Non-dominated Sorting Genetic Algorithm and other evolutionary optimization algorithm to optimize powertrain for improving fuel economy and performance. Yang et al. 16 combined GA with a distributed parameter MCGC model to predict the performance of micro-channel gas-cooler of automobile air conditioning system. Saadaoui 17 adopt non-uniform mutation to improve the performance of GA, and optimize the parameters of solar PV cell/ module. Support vector regression (SVR) was proposed by Vapnik,18 which is used to solve the fitting problem of nonlinear data in engineering, such as the prediction of vehicle air conditioning performance, 19 battery remaining useful life prediction 20 and so on. To improve the prediction accuracy of SVR, researchers propose to use various optimization algorithms, such as artificial fish swarm algorithm (AFSA), 21 GA, 22 firefly algorithm (FA), 23 to search for the optimal combination of parameters.
In this paper, the double-population adaptive mutation method is used to improve the GA, and get the MGA. The four typical benchmark functions are selected to compare the performance of MGA with GA, multiple-population genetic algorithm (MPGA) and quantum genetic algorithm (QGA). [24][25][26] It is proved that MGA shows much better performance in both accuracy and computational stability.
There are three main contributions of this paper: (1) The double population adaptive mutation operator and novel optimization process are introduced into the GA to obtain MGA algorithm. (2) MGA is applied to modify the penalty factor and variance of radial basis function of SVR kernel function and the accuracy of SVR is improved. (3) MGA-SVR is used to study the control strategy of the thermal management system of an EV, which effectively saves energy on the premise of satisfying the vehicle thermal load.

Standard GA
The basic concept of GA is to simulate the genetic mechanism of natural biological population, and select the optimal individual after the stages of selection, crossover and mutation. Based on this concept, the biological population which represents the feasible solution space is composed of several individuals, while the individual is composed of several genes. The value of fitness indicates the quality of individuals. The better individuals and their genes are more possibly inherited by the offspring and become the optimal feasible solution. However, GA is easy to sink into premature convergence. 27 In order to improve the optimization ability of GA, it is usually modified by combining genetic variation or crossover, controlling population size, introducing adaptive control parameters or combining with other intelligent algorithms.

Double-population adaptive mutation strategy
According to the reference Liu et al., 28 a doublepopulation adaptive mutation operator is proposed. The population is divided into two subpopulations, and Gauss mutation and Cauchy mutation 29 are performed respectively. The probability density functions of Gaussian distribution function and standard Cauchy distribution function are shown in formula (1) and formula (2), respectively.
x is a random variable and the range of it is infinite, It can be seen from Figure 1 that most of the random numbers N i (0, 1) of Gauss distribution are in the interval of [23,3], and the random numbers C i (0, 1) of Cauchy distribution are concentrated in the interval of [25,5]. Therefore, when using the random number of Gauss distribution, individuals have a greater probability to search in the range near the expected value to find more accurate results. When using the random number of Cauchy distribution, individuals have a greater probability to search away from the expected value, resulting in that individuals can jump out of the poor solution region and the global search ability of the algorithm is enhanced. To find the minimum value of the function as the optimal fitness value, the mutation operators of Gauss distribution and Cauchy distribution are introduced as shown in formula (3).
Where, F x i ð Þ= f x i ð ÞÀf min f max Àf min .

Optimization mutation strategy
To further enhance the optimization ability of the population, the two subpopulations are merged after the mutation operation, and then the whole population is further optimized as the following steps. Above all, the location of the individual with the highest fitness is calculated. After that, each individual updates to the optimal individual according to formula (4). If the fitness of the updated individual is better than the original, the position of the individual is replaced. Otherwise, a pseudo-random number, namely rand, is generated randomly. If rand \ 1 À 1 ffiffiffiffiffi iter p , the position of the individual should be updated. Otherwise, the individual's position keeps its original value. By this means, individuals in the population have a chance to mutate randomly when they search near the optimal value of each generation. Consequently, it avoids the population convergence and improves the global search ability of the population.
: ð5Þ x and x 0 i are the ith individual before and after mutation respectively. c is the movement speed, which is generally set as a constant value between 0.1 and 0.5. x opt is the individual with the highest fitness in the current iteration. x min and x max are the lower and upper limit of respectively. iter is the number of current iteration. M is the total number of iterations. rand is a random number of interval [0,1].
To find the minimum value of the function as the optimal value of fitness function, the operation flow of optimization mutation operator is shown in Figure 2. In this case, F x ð Þ is the fitness function.

Construct MGA algorithm
Based on double-population adaptive mutation strategy and the optimization mutation strategy, MGA is obtained in this section. To seek the minimum value of continuous space, the detailed steps of MGA are as following steps. The flow chart of MGA is shown in Figure 3.
Step1: In the definition domain, N initial data groups (individuals) are randomly generated to form the initial population, and the variable range is defined. M is the number of iterations. P a is the probability of selection. P c is the probability of crossover. range is the range of individual movement. c is the movement speed of individuals. The initial conditions are set: the number of iterations is 1, and the number of updates of the optimal solution (num) is 0.
Step2: f x is defined as the fitness function. The fitness of each individual in the initial population is calculated,  and the individual with the highest fitness is recorded as x best .
Step3: The process of population evolution is performed. According to the probability of selection P a , the better the fitness of individuals is, the greater the probability of being selected to inheritance.
Step4: The process of population crossover is performed. According to the probability of crossover P c , individuals are randomly selected for pairwise crossover. The genes to be crossed are randomly selected and crossed according to formula (6). After crossover, the selected and crossed populations are merged into one population for mutation.
In formula (6), x kj and x lj are the j th genes of the k th and l th individuals randomly selected; x 0 kj and x 0 lj are the j th genes of the k th and l th individuals after crossover; rand is a random number of interval [0,1].
Step5: The process of population mutation is performed. According to the fitness, individuals in the merged population are divided into two subpopulations on the basis of the relationship between the value of the ratio function obtained by formula (7) and 0.5. Gauss mutation and Cauchy mutation are carried out for the two subpopulations according to formula (3), and then the fitness values of each individual are calculated.
In the formula above, f x i ð Þ is the fitness value of the individual x i . f min and f max are respectively the minimum and maximum of the fitness function of each individual in the current iteration. (The smaller the fitness value is, the better the individual is.) Step6: The populations before and after mutation are recombined. And the first n individuals with better fitness are selected to form the new population, on which the operation of optimizing mutation operator is performed. Each individual steps forward to the optimal individual according to formula (4). If the fitness of the updated individual is better, the position of the individual is replaced. Otherwise, the position is updated randomly. If the fitness values after random updating are better, the original individuals will be replaced; Otherwise, the individuals will remain unchanged. After the optimization mutation operator is calculated, all individuals form the next generation population. And the individuals with the best fitness are recorded as x opt .
Step7: Comparing the value of optimal solution of the new generation with that of the previous generation, if f x best ð Þ. f x opt À Á , num = 0 and x best = x opt ; Otherwise, num = num + 1. When num = 10, the population is randomly updated to obtain the new species based on the formula (5) and num is reset to zero.
Step9: The iteration stops and the optimal solution is output.

Performance verification of MGA
Compared with standard GA, DPGA and QGA, the effectiveness of MGA is verified by finding the optimal value of four benchmark functions. The formulas of the functions are shown in formulas (8) to (11).
where x and y are limited within the range of [22,2].    Under the same test environment and parameter settings, each algorithm runs 20 times independently for each function. The best function value, the worst function value, the average function value and the standard deviation of each algorithm are shown in Table 1. It can be observed that the accuracy and stability of MGA is superior to that of the other four algorithms. To further prove the optimization performance of MGA, Figure 4(a) to (d) show the average iteration process of each algorithm for 20 runs. For the calculation of f 2 (x, y), MGA shows outstanding optimization ability, and its convergence speed and precision of results are obviously better than the other three algorithms. For the calculation of f 1 (x, y), f 3 (x, y) and f 4 (x, y), MGA converges to the optimal value at a faster speed in the early stage. In the later calculation process, other algorithms do not update the optimal value, while MGA further converges to the optimal value. The final optimization accuracy of MGA is higher than the other three algorithms. According to the above analysis, it can be concluded that MGA has more accurate and stable optimization ability in solving practical engineering problems.

Optimizing SVR algorithm with MGA
When using the traditional SVR, penalty factor (c) and variance of radial basis function (g) are selected by cross validation method. Nevertheless, the large step size results in missing the best combination of c and g, which will reduce the accuracy of performance prediction; the small step size results in the complexity of calculations increasing. The MGA algorithm enhances the prediction performance of the SVR algorithm by improving the selection of parameters c and g. Figure 5 is a flowchart of the process. The prediction error of the SVR model is used as the optimization target, and the parameter combination of c and g that minimizes the error is found for the subsequent forecasting process.
To demonstrate the effectiveness of MGA-SVR, two datasets, Auto_MPG and Computer Hardware, in the UCI standard database 30 are chosen to compare the performance of MGA-SVR with SVR, respectively. To ensure that the training environment is consistent, the two algorithms are run on a computer with a 3.2 GHz quad-core processor and 16 GB of running memory, and tested in the running environment of MATLAB 2019.For each data set, 80% of the data is the training set, and the remaining 20% is the test set. During the operation, the same training set and test set are used in both algorithms to avoid errors caused by different data. Table 2 shows the comparison of the average relative error and mean square error of the training set and the test set using the SVR and MGA_SVR algorithms for prediction, respectively. For the parameter prediction of the training set and test set, MGA-SVR is apparently more accurate than the traditional SVR, and can be applied to the analysis and establishment of

Establishment of control strategy for thermal management system
Building simulation model of thermal management system Compared with bench tests of thermal management system, it is more convenient to find the influence of these parameters by computer simulation. Therefore, the simulation model of electric vehicle thermal management system is established based on KULI, as shown in Figure 6. KULI software is a professional software for the research of automotive thermal management system, providing a complete set of automotive thermal simulation tools. At a certain vehicle speed and ambient temperature, the cold air driven by the fan exchanges heat with the radiator to take away the heat from the motor, controller and DC/DC converter. The performance curves of fan built in KULI are shown in Figure 7, which shows the relationship between the power/pressure difference of the fan and the flow rate of air by wind tunnel test.

Calibration of thermal management system simulation model
Referring to the existing experimental data, the model of vehicle thermal management system built in last section is calibrated by calculating the heat dissipation capacity. The working conditions are set as follows. In case 1, the ambient temperature is 40°C, and the vehicle speed is 40 km/h, and the climbing degree is 10%; In case 2, the ambient temperature is 40°C, the vehicle speed is 120 km/h, and the climbing degree is 0%. Table 3 presents information about the equipment used in the experiment. The parameter setting and calibration results of the steady-state model are shown in Table 4. The inlet and outlet temperature of the coolant is calculated based on the calibration model, and the comparison with the test value is shown in Table 5. The difference between the simulation and test value of the inlet and outlet coolant temperature is within 2.2°C).
The difference between the simulation and test value of the motor inlet and outlet water temperature is within 2.2°C. In both cases, the error is within 5%, and the model is accurate enough to be used in the following analysis.
To verify the accuracy of the model, environment warehouse experiment is carried out to test the transient performance of the thermal management system. The ambient temperature is 40°C. The vehicle speed is   40 km/h, and the climbing degree is 10%. The coolant outlet temperature of motor is controlled by the controller outside the environment warehouse. After setting the light intensity and windward speed, the experiment can be started. The simulation parameters are consistent with the experimental settings: the ambient temperature is set at 40°C, the vehicle speed is set at 40 km/ h, the simulation time is set as 600 s, and the initial temperature of motor is set as 65°C. Both the simulated and experimental results are shown in Figure 8, and the trends are consistent. The simulation value of the coolant temperature of motor is finally stable at 66.52°C with an error of 0.27%, and the maximum error is 3.61%. The above analysis also illustrates relatively high accuracy of the simulation model of vehicle thermal management system based on KULI software.

Strategy of the thermal management system based on MGA-SVR
Based on the simulation model of the vehicle thermal management system, the database is established, which is used to construct the control strategy. In order to make the outlet coolant temperature of motor in the range of 60 6 0.5°C, the most appropriate speed of the electronic fan under different working conditions were obtained by changing the motor torque, motor speed, ambient temperature, coolant pump speed, and considering the last second motor refrigerant outlet temperature, and other input parameters. By setting the motor torque range of 4-140 Nm, the motor speed range of 0-5000 r/min, the ambient temperature range of 30°C-40°C, the coolant pump speed range of 2000-3000 rpm, the motor coolant outlet temperature in the last second of 40°C-65°C, 486 sets of sample data of electronic fan speed under different working conditions are calculated, which are served to establish the control strategy of vehicle thermal management system. Table 6 shows samples of fan speed and motor speed prediction.   MGA-SVR is applied to predict the speed of fan under different working conditions. Figure 9 shows the comparison between the predicted and simulated speeds of the fan. It can be seen that the predicted results are in good agreement with the simulation data. The correlation test R 2 is 99.46%, and the average relative error of prediction value is 4.63%. The above group of results indicate that speeds of fan predicted by MGA-SVR can be used to construct the control strategy of the vehicle thermal management system.
In order to verify the effect of the intelligent control strategy of the thermal management system based on the prediction of MGA-SVR, the fan speed prediction model trained by MATLAB. The heat dissipation of the motor is calculated according to the Chinese working conditions, and the condenser power is set at 6 kW. The vehicle thermal management system model built by KULI is transient simulated on the Chinese working condition. The temperature changes of motor outlet coolant are calculated and compared with that under the threshold control. For threshold control, when the coolant outlet temperature of the motor is lower than 59°C, the fan is set to the low gear (speed is 1800 rpm). When the coolant outlet temperature of the motor is higher than 61°C, the fan is set to the high gear (2800 rpm). When the coolant outlet temperature of the motor is higher than 59°C and lower than 61°C, and the outlet water temperature of the motor continues to increase, the fan is set to the low gear. If the outlet water temperature of the motor continues to decrease, the fan is set to the high gear. Figure 10 shows the coolant inlet temperature of motor under the Chinese working condition. Because MGA-SVR control strategy is trained based on the sample database obtained under steady-state operation conditions and the coolant has high specific heat capacity, the coolant outlet temperature of the motor slightly fluctuates, but the change trend of the coolant temperature is relatively stable. However, when the threshold control strategy is used for transient simulation, the coolant outlet temperature of the motor changes greatly. Figure 11 shows speeds of the fan under the Chinese working condition. In this working condition, the MGA-SVR control strategy can adjust the speeds of the fan more flexibly than that under threshold control, which effectively utilizes the ability of the thermal management system. Compared with the threshold control method, the fan power consumption of the intelligent control strategy is reduced by 11.59%, which effectively reduces the power consumption of the fan and saves vehicle energy.

Conclusion
Based on the modified genetic algorithm and support vector regression, this paper studies the thermal   (1) To improve the traditional GA, the Gauss and Cauchy mutation operators are adopted, and the population optimization mutation operator is introduced to it in the meantime. Afterward, MGA is used to improve SVR algorithm, which establishes foundation for constructing the control strategy of vehicle thermal management system. (2) Based on the prediction model trained by MGA-SVR, the control strategy of the fan speed is obtained. The control strategy file is coupled with KULI software, and the transient simulation is carried out under the Chinese working condition. The temperature changes of motor outlet coolant is calculated and compared with that under the traditional threshold control. The results show that the thermal management system based on MGA-SVR control can not only meet the requirements of heat dissipation, but also reduce the energy consumption of electronic fans, which is conducive to increase the mileage of electric vehicles.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was financially supported by the China Shandong province Key Research and Development Program of Grant No. 2020CXGC011005