# A Modified Shuffled Frog Leaping Algorithm for the Topology Optimization of Electromagnet Devices
## 4 Problem Formulation and Numerical Experiments
From this numerical experiment, the time step is finally set as period/100 for this case study. The prototype IPM design and its performance are given in Figure 3. The average torque of the prototype, \(T_{\text{prototype}}\), is 117.6 Nm, and the torque ripple of the machine is 9%. The algorithm stops when the best solution stays unchanged for five consecutive iterations or the iteration number exceeds 1000. To determine the appropriate algorithm parameters including the sub-memeplex size, local search times for the worst frogs and for the best frogs in the memeplex, the SFLA is run twice, using two sets of parameters, for each single objective optimization of the prototype IPM when optimizing its average torque. The parameter values and the corresponding algorithm performances are listed in Table 2. For both cases, the sizes of the population, memeplex, and sub-memeplex are identical. In the SFLA algorithm, the best frog local search step and the worst frog improvement step are the two core steps responsible for the exploration of the design domain. In the first run, the algorithm concentrates more on the directed search, and in each memeplex, the update of worst frog's position towards the best  
Figure 2: The initial discretized design domain and RBFs used to model it (in red). frog's position is repeated thrice, while the random local search for the best frog is only conducted once. In the second run, the algorithm focuses on the random search, and hence the random local search for the best frog in each memeplex is conducted thrice, and the worst frog improvement step is only done once. The results of two runs indicate that, with comparable numbers of FEM evaluations, the second run can obtain a better optimization result. This is because in the first run more computing resources are used to improve the overall objective values of the entire population, which is not necessary in the case of TO of electromagnetic devices. In the second run, the addition of randomness to the population via the best frog in each memeplex significantly improves the algorithm's ability to escape from the local optimum, and hence the optimized result is better than that of the first run. Hence, in the actual multi-objective TO problem for the IPM, the second set of parameters is chosen. After determining the algorithm parameters, the proposed modified SFLA is applied to the multi-objective TO problem formulated in the afore-section. To showcase the merit of the proposed method, its performance is compared with the performance of other two EAs, namely the original SFLA and LS-GA. Based on the famous no free lunch theorem, one cannot improve the performance of an optimization algorithm without sacrificing its performance in other aspects [18], and hence both the optimization time and the optimized results are compared as an indication of algorithm efficiency. The optimized topology designs and their corresponding torque plots of the three algorithms are given in Figures 4-6. The details of their performances are summed up in Table 3. All three algorithms are repeated three times and their performances are averaged to make the results more reliable. \begin{table}
\begin{tabular}{l c c} \hline \hline  & **First Run of SFLA** & **Second Run of SFLA** \\ \hline Population size & 185 & 185 \\ Memeplex size & 5 & 5 \\ Sub-memeplex size & 3 & 3 \\ Local search step size & 1 & 2 \\ Worst frog improvement repetition & 3 times & 1 time \\ Best frog improvement repetition & 1 time & 3 times \\ Number of FEM calls & 636 & 901 \\ Optimized results & 106.85 Nm & 134.73 Nm \\ No. of cycles to find the Optimum & 1 & 6 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Algorithm parameters used and the results obtained for two test runs of SFLA. Figure 3: The conventional design of IPM used for comparison: (**a**) cross-section; and (**b**) torque plot. Among all three algorithms, the conventional SFLA has the fastest optimization speed, and the overall optimization requires only 600+ FEM evaluations to locate the optimum.