The Role of Smart Grids in Integrating Renewable Energy