MODELING GRID CONNECTION FOR SOLAR AND WIND ENERGY