This document discusses using a distributed power flow controller (DPFC) to improve power quality issues like voltage sag, current swell, and total harmonic distortion. It provides background on power quality and traditional methods used for improvement. The DPFC design and operation is explained, including how active power is exchanged between the shunt and series converters. Simulation results using MATLAB/Simulink show the DPFC with PI, fuzzy logic, and artificial neural network (ANN) controllers can mitigate power quality issues. Analysis of the total harmonic distortion results shows the ANN controller provides the best performance with the lowest distortion.