# Meta-Heuristic Optimization and Comparison for Battery Pack Thermal Systems Using Simulink
## 4 Results and Discussion
### Comparison between PSO and GA
However, with subsequent iterations, they progressively approached the optimal outcome. When benchmarked against the basic model, the PSO demonstrated a marginally better performance than the GA. With PSO, there was a clear continuous effort to identify the local minimum through rapid convergence and persistent random functions. Figure 6 examines the relationship between the number of particles and iterations for both GA and PSO. Drawing from the results shown in Figure 5, this study explores the potential improvements as both particles and iterations are increased. It is evident that as the sizes of particles and iterations increase, the numerical analysis yields increasingly optimized results. While increasing the number of iterations may lead to somewhat shorter computation times compared to increasing particles, the best outcomes arise when the number of particles is increased. Notably, in this study, calculations were limited to 50 particles to avoid unnecessary computational overhead without a substantial improvement in results. While PSO and GA have comparable computation times, PSO displays slightly better computational efficiency and an increase of over 14% in result differentiation. Figure 5: Comparison between PSO and GA optimization results with iterations. Conversely, while the GA exhibits a similar trend, it does not seem to make a further effort to seek optimal results. PSO generally converges faster than GA, due to the cooperative behavior of particles, where each particle adjusts its path based on its own experience and the experience of its neighbors. This sharing of information can speed up convergence. PSO focuses on a balance between the exploration of new areas of the search space and the refinement of the search around the best solutions, whereas GA uses crossover and mutation to explore and exploit the search space. Depending on the problem, the balance struck by PSO might be more effective than GA. It is worth noting that the superiority of PSO over GA is problem-dependent. While PSO might be better suited for solving some problems, GA might outperform PSO in solving others. There were some studies where PSO outperformed the GA algorithm to some extent [18, 19, 40, 41]. When examining the basic optimization model, it is evident that if the number of particles calculated in each iteration increases, making a judicious decision regarding those particles early on can influence subsequent steps, potentially resulting in more optimal values. Conversely, as the number of iterations grows, decision making within a limited number of particles becomes necessary. While this trend is understandable, it might impose limitations on the choices available. Hence, it is advantageous that PSO optimization is emphasized as the number of particles increases, compared to the GA heuristics. Especially when faced with a situation with fewer particles and iterations, if we must make a choice, increasing the number of particles may be necessary for accuracy. However, from an engineering perspective, increasing the number of iterations could offer the advantage of faster computations with an acceptable fitness value. To delve deeper into these reasons, Figure 7 illustrates the particle variations for the two algorithms, PSO and GA. PSO demonstrates directionality due to the synergistic movements of individual particles. Figure 7a, depicts a coalescence at \(T_{\text{init}}\) = 40 \({}^{\circ}\)C that converges into optimal results. When values are not found within the upper or lower bounds, such as with pump displacement in Figure 7b, particles tend to move towards the nearest possible value. This observation aligns with the finding that computational outcomes improve as the numbers of particles or iterations increase, as shown in Figure 6.  
Figure 6: Comparison between GA and PSO for different iteration and particle sizes. “\(i\)” stands for iteration, “p” stands for particle. For the GA algorithm, the results tended to be largely spread between upper and lower bounds, deviating from the optimal value.