*Article* **Efficient Energy Optimization Day-Ahead Energy Forecasting in Smart Grid Considering Demand Response and Microgrids**

**Fahad R. Albogamy <sup>1</sup> , Ghulam Hafeez 2,3,\* , Imran Khan <sup>4</sup> , Sheraz Khan <sup>4</sup> , Hend I. Alkhammash <sup>5</sup> , Faheem Ali <sup>6</sup> and Gul Rukh <sup>4</sup>**


**Abstract:** In smart grid, energy management is an indispensable for reducing energy cost of consumers while maximizing user comfort and alleviating the peak to average ratio and carbon emission under real time pricing approach. In contrast, the emergence of bidirectional communication and power transfer technology enables electric vehicles (EVs) charging/discharging scheduling, load shifting/scheduling, and optimal energy sharing, making the power grid smart. With this motivation, efficient energy management model for a microgrid with ant colony optimization algorithm to systematically schedule load and EVs charging/discharging of is introduced. The smart microgrid is equipped with controllable appliances, photovoltaic panels, wind turbines, electrolyzer, hydrogen tank, and energy storage system. Peak load, peak to average ratio, cost, energy cost, and carbon emission operation of appliances are reduced by the charging/discharging of electric vehicles, and energy storage systems are scheduled using real time pricing tariffs. This work also predicts wind speed and solar irradiation to ensure efficient energy optimization. Simulations are carried out to validate our developed ant colony optimization algorithm-based energy management scheme. The obtained results demonstrate that the developed efficient energy management model can reduce energy cost, alleviate peak to average ratio, and carbon emission.

**Keywords:** energy optimization; day ahead energy prediction; artificial neural network; renewable energy sources; demand response; microgrid; smart grid
