In this paper, the synthesis and performance of a shunt active power filter (SAPF) based on instantaneous active, and reactive current components (id − iq) technique is presented. The proposed active filter acts as a current source, which is connected in parallel with a nonlinear load and controlled to generate the required compensation currents. The proposed control technique for SAPF aims to compensate the harmonic current contents of nonlinear loads by connection of distributed generation (DG) resources based on renewable energy sources to distribution network. This modeling is derived from the 123(abc) to αβ and αβ to dq transformation of the ac system variables. The injected currents by the SAPF to polluted grid are controlled in synchronous orthogonal dq reference frame by using of decoupled current control technique. By use of phase locked loop (PLL) in control circuit of proposed technique, the angle of positive sequence has been detected, in order to synchronize the SAPF injected currents to distribution network. The proposed control strategy has this ability to eliminate wide range of harmonic frequency draws from utility grid, and provide the compensation currents by DG resources. By this control method, replacement of distributed power generation systems as an active power filter can be possible. Three-phase three-level neutral-point-clamped (NPC) voltage source inverter (VSI) is proposed for the interfacing between renewable energy resources and polluted distribution network. The simulation results demonstrate high performances of proposed SAPF technique. Copyright © 2010 John Wiley & Sons, Ltd.