This document describes an improved fuzzy control strategy for a single-phase inverter used in distributed power generation systems to improve power quality. The control strategy allows the inverter to generate active power from a renewable energy source while also compensating for reactive power and current harmonics from local nonlinear loads. The control scheme uses a reference current generator based on sinusoidal signal integrators and instantaneous reactive power theory. It also employs a dedicated repetitive current controller with a fuzzy controller. Simulation results demonstrate the feasibility of the proposed solution for active power generation, reactive power compensation, and harmonic compensation when connected to the grid.