Along with the increasing demand on improving power quality i.e generally defined as any change in power (voltage, current, or frequency) that interferes with the normal operation of electrical equipment, the most popular technique that has been used is Active Power Filter (APF); This is because Passive filters performance is limited to a few harmonics and they can introduce resonance in the power system. Passive filters are larger component sizes and therefore Costs high. So APF can easily eliminate unwanted harmonics, improve power factor and overcome voltage sags and eliminate any harmonic frequencies. This paper will discuss and analyze the simulation result for a three-phase three wire shunt active power filter using MATLAB program. This simulation will implement a non-linear load, to compensate line current harmonics under balanced and unbalance loads. As a result of the simulation, it is found that an active power filter is the better way to reduce the total harmonic distortion (THD)

Keywords: APF, PWM converter, d-q theorm, THD, Power Quality, Instantaneous Power theory