This document describes a proposed system for mitigating current and voltage harmonics using a unified power quality conditioner (UPQC) with a moving average filter (MAF)-based control strategy. The UPQC consists of series and shunt compensators to regulate voltage and current, respectively. A photovoltaic array is connected between the compensators and provides power to the system. Simulation results show the system can effectively reduce the total harmonic distortion of both the supply voltage and current, improving power quality delivered to loads despite nonlinearities. The MAF control technique offers optimal harmonic attenuation without reducing controller bandwidth compared to other filtering methods.