This paper presents the design, analysis and implementation of two degrees of freedom control combined with a repetitive controller in the context of inverters working in microgrids. The goal of control under study is to reduce the harmonic distortion of the inverter output voltage. The inverter is designed to operate in island mode as a voltage source. Simulations where performed with both linear and nonlinear loads.