## 4 Results and Discussion
### Scenario III: Unbalanced and Distorted Source Voltage  
In Scenario III, the applied source voltage is unbalanced in terms of magnitude and contains different levels of harmonic distortion across each operating phase (refer to Figure 6c). The simulation findings obtained from this category of testing are presented in Figures 17-21. Meanwhile, to better observe the demonstrated performance, important findings are tabulated in a comparative manner, as in Table 4. First, referring to Figure 17, the enhanced-ADALINE algorithm is revealed to effectively extract the magnitude (mean value) of fundamental load current. Without integrating the averaging function, a significant peak-to-peak oscillation (ripples) can be observed at the extracted mean value (approximately 1 A for Load A and 0.5 A for Load B). However, by integrating the averaging function, the extracted mean value does not exhibit any significant ripples, which indicates a more accurate result. Next, from Figures 18 and 20, the findings revealed that both enhanced-ADALINE and STF-dq0 algorithms are effective in directing their respective SAPF in mitigating the harmonic currents generated by Loads A and B under Scenario III. For both Loads A and B, the highly distorted source currents, which are mitigated by both algorithms, recovered the desired sinusoidal wave-shape and the resulting THD values comply with the 5% harmonic limit, as tabulated in Table 4. Nevertheless, the THD values demonstrated by the enhanced-ADALINE algorithm (0.98-2.13%) are lower than that demonstrated by the STF-dq0 algorithm (1.66-2.92%). Moreover, it is also clear from the findings that the high neutral currents that resulted from unbalanced connection of single-phase loads (both Loads A and B) were minimized, once again showing effectiveness of both algorithms in removing excessive neutral currents. Furthermore, as presented in Table 4, for Loads A and B, the large phase differences between the source voltage and current were reduced by both algorithms, which indicates that they are able to synchronize operation of the SAPF with the connected power system under Scenario III. Nevertheless, the enhanced-ADALINE algorithm demonstrated a better synchronization performance by providing a lower phase difference value. In this manner, in-phase operation of the source current and voltage is once again achieved, and this provides a near to unity power factor (PF) of 0.999. As an overall, the enhanced-ADALINE algorithm is able to provide a better mitigation performance in comparison to the STF-dq0 algorithm under Scenario III. Figure 17: Simulation result obtained under Scenario III, showing the magnitude (mean value) of fundamental load current extracted by the enhanced-ADALINE algorithm with and without integrating Averaging function: (**a**) Load A and (**b**) Load B. Similarly, the ability of SAPF to regulate its dc-link voltage is also assessed under Scenario III. Figures 19 and 21 provide the related results. From both figures, once again, it is clear that SAPF controlled by the enhanced-ADALINE algorithm is able to continuously maintain its dc-link voltage \(V_{dc}\) at the desired voltage level (880 V). Meanwhile, the individual voltage across each split capacitor \(V_{dc1}\) and \(V_{dc2}\), are equally maintained at the desired voltage level (440 V), i.e., half the value of the total dc-link voltage. Similar findings can be observed for both Loads A and B. Hence, from all the results presented in this category, it can be confirmed that the enhanced-ADALINE algorithm is able to correctly manage operation of SAPF under Scenario III. To conclude the findings, first, in terms of the accuracy of the extracted mean value, the findings revealed that a more accurate result can be obtained by integrating the averaging function in the enhanced-ADALINE algorithm.