The document describes a Simulink model that was created to improve total harmonic distortion (THD) using a shunt active power filter. The model simulates a power system with a non-linear load connected to an ideal grid voltage. The shunt active power filter is connected 0.1 seconds after simulation start and works to compensate for harmonics by producing currents equal in magnitude but opposite in phase to the load harmonics. Simulation results show the THD is reduced from around 30.9% on the load side to 2.79% on the source side once the active filter is connected, below the maximum allowable limit.