Grid integration of renewable energy