This paper compares the Proportional-Integral (PI) and Artificial Neural Network (ANN) control techniques for a nine-switch Unified Power Quality Conditioner (UPQC) aimed at enhancing power quality. The findings indicate that the ANN controller outperforms the PI controller in mitigating voltage sags and swells, despite the nine-switch converter's inherent limitations. The study includes simulation results supporting the effectiveness of the ANN control strategy in improving overall power quality at reduced costs.