Harmonic distortion is a crucial power quality (PQ) issue especially in microgrids. Distributed energy resources employ either synchronous generator or voltage source inverter to interface microsource with loads. This paper presents the analysis of the proportional resonant (PR) controller along with a selective harmonic compensator (SHC) for a stand-alone distributed generation inverter. Furthermore, a new improved triple-action controller (TAC) design is proposed and implemented. The proposed TAC consists of a conventional PR along with SHC, in addition to, a feed-forward current controller to achieve seamless sinusoidal voltage. This mitigate not only the total harmonic distortion (THD) but also individual harmonics to a level below the stated in IEEE/IEC standards. Moreover, optimize the TAC parameters to ensure its best performance. A comparative study of harmonic effects for various load-types are introduced. The voltage regulation and THD mitigation improved the power factor and efficiency, hence, it improved the PQ of the system.