This document describes a simulation of a shunt active power filter with a PI controller to mitigate current harmonics from nonlinear loads. It begins with an introduction to power quality issues caused by nonlinear loads and an overview of active power filters. It then describes the system configuration, including the PI controller used to regulate the DC link voltage of the active power filter inverter. Simulation results in MATLAB/Simulink show the PI controller is effective at eliminating current harmonics on the source side, improving the power factor to near unity and reducing the total harmonic distortion to 2.22%. The system is concluded to offer fast compensation of current harmonics and improved power quality through use of the shunt active power filter with PI control.