Stability of photovoltaic and wind turbine grid-connected inverters for a large set of grid impedance values