## 4 Results and Discussion  
In this study, the most qualified axial flux permanent magnet generator (AFPMG) in [10] was upgraded, to be employed for standalone residential wind turbine power generation. Some improvements were carried out on its geometry, such as adding two stator cores placed on the upper and lower sides of the original generator, modifying the permanent magnet shape, changing the winding type from core wound to tooth wound, and substituting a three-phase system with a five-phase system, as explained in Section 2.1. By restricting the flux density in the stator teeth and in the stator yoke, the dimensions of the five-phase AFPMG (FP-AFPMG) were gained with the help of Ansys Maxwell software in the magnetostatic solution type. Then, the rotor pole was optimized to improve THD by varying \(S_{o}\) and \(\alpha_{i}\). With the combination of \(S_{o}\) of 12 mm and \(\alpha_{i}\) of 0.95, the optimal rotor combination was achieved with a THD of 1.55%, as described in Section 2.2. With the purpose of generating the lowest THD, the proposed generator with optimal rotor combination was optimized again by the Taguchi method. By applying the Taguchi method in this case, a lot of time can be saved, especially for a simulation with a three-dimensional model if compared to the conventional experimental method. As explained in Section 3, three control factors, including the air gap length, the offset angle of the stator teeth on the upper side to the stator teeth on the lower side, and the stator yoke height were selected as independent control factors with four levels in each control factor. The measured THD and the calculated S/N ratio generated by the \(\mathbf{L_{16}}\) Taguchi table are shown in Table 5.  
The THD in Table 5 is measured when the proposed generator is simulated in the transient solution type from the Ansys Maxwell software in which the generator is connected to the resistive load. The S/N ratio is obtained based on the function of the smallest the better (STB). The most effective control factor that influences THD is obtained by the S/N ratio respond curve shown in Figure 12. From Figure 12, based on the function of the smaller the better, the most effective control factors are A4, B1, and C1. A4 means the level of air gap length at level number 4, B1 means the level of the stator teeth on the upper  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**No** & **A** & **B  
side to the stator teeth on the lower side at level number 1, and C1 means the level of the stator yoke height at level number 1. From Table 5, the air gap length at level number 4 is 2.5 mm, the stator teeth on the upper side to the stator teeth on the lower side at level number 1 is 0 degree, and the stator yoke height at level number 1 is 19 mm. The simulation is then conducted based on the most effective control factor to determine THD. After THD is obtained from the most effective control factor, its magnitude is converted to the smaller the better S/N function with a magnitude of \(-4\). According to the references in [25; 26; 27], the highest S/N ratio will result in a better performance irrespective of its characteristics. After all the S/N ratio magnitudes are compared for all the simulations, including the magnitude of the most effective control factor, the highest S/N ratio is obtained from the combination of A1, B4, and C3 with the magnitude of 3.63. Thus, the combinations of the air gap of 1 mm, the offset angle of the stator teeth on the upper side to the stator teeth on the lower side of 4.5 mechanical degrees, and the stator yoke height of 13 mm result in a THD of 0.66%. To compare the optimal result of the THD that is obtained from the Taguchi method, the Artificial Neural Network (ANN) built from Matlab R2020b was utilized in this study. To describe the ANN network in Figure 11, the nntool function is called in the Matlab command window.