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

^{1}

^{2}

^{3}

^{4}

^{5}

^{6}

^{*}

Next Article in Journal

Next Article in Special Issue

Next Article in Special Issue

Previous Article in Journal

Previous Article in Special Issue

Previous Article in Special Issue

Computer Sciences Program, Turabah University College, Taif University, P.O. Box 11099, Taif 26571, Saudi Arabia

Centre of Renewable Energy, Government Advance Technical Training Centre, Hayatabad, Peshawar 25100, Pakistan

Department of Electrical and Computer Engineering, Islamabad Campus, COMSATS University Islamabad, Islamabad 44000, Pakistan

Department of Electrical Engineering, University of Engineering and Technology, Mardan 23200, Pakistan

Department of Electrical Engineering, College of Engineering, Taif University, P.O. Box 11099, Taif 21944, Saudi Arabia

Department of Electrical Engineering, University of Engineering and Technology, Peshawar 25000, Pakistan

Author to whom correspondence should be addressed.

Academic Editors: Sheraz Aslam, Herodotos Herodotou and Nouman Ashraf

Received: 4 October 2021
/
Accepted: 11 October 2021
/
Published: 16 October 2021

(This article belongs to the Special Issue Smart Grid Analytics for Sustainability and Urbanization in Big Data)

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.

The traditional power system is inefficient because it entirely depends on fossil fuels, and having centralized generation that is far away from consumers. In these circumstances, the generated electricity needs to be transmitted and distributed to consumers via transmission and distribution lines over long distances, spending many resources on construction, maintenance of all systems involved and high levels of technical losses [1]. According to [2], centralized power systems suffer from severe transmission and distribution energy losses because of long distances between consumers and generating stations. Furthermore, centralized generation usually causes more environmental pollution than distributed generation technologies. From the consumer’s point of view, practically, electricity is used in unintelligent manner without control. Keeping in view both perspectives, new paradigms of distributed generation and smart grid have emerged for electricity generation and consumption. These paradigms are prominent in the electricity market around the world because they have low transmission losses and provide electricity intelligently with control to consumers. According to [1], the distributed generation definitely refers to microgrids, which is small-sized, near to consumers, and directly connected to the distribution system. Smart grids are power grids with advanced communication and control technologies between consumers and generating stations, delivering optimized power usage, clean energy at reduced cost, and improving the quality of energy and efficiency of the power grid. They also provide reductions in technical losses and greenhouse gas emissions, and solve the high carbon emissions problem, where 23% and 41% pollution emission is caused by transport sector, and energy sector, respectively, around the globe [3]. Thus, the conventional power gird is not able to meet future electricity demand due to dependence on limited and environment foe fossil fuels.

With microgrids, evolution dependence on fossil fuels is reduced, and high carbon emission problem is resolved. Furthermore, the microgrid can be connected with smart homes in modes like grid-connected and islanded. In islanded mode, microgrids and commercial grids couldnot initiate the purchase/sell mechanism of energy. On the other hand, in grid-connected mode, the microgrid purchases and sells electricity from/to the external power grid. In the recent past, a significant variety of forecasts have been employed. The selection of a forecasting model is typically dependent on the available data, the model network mechanism’s aims, and the energy planning operation. In this paper, we examine renewable energy and power forecast models used as an energy planning tool in a critical and precise way, the application of these techniques for forecasting, their accuracy for geographical and temporal prediction, and their significance to policy and planning purposes are all explored. Machine learning models handling enormous data while also providing precise predictive analyses. By integrating various models and using ensemble methods, we may improve forecasting accuracy. Artificial neural networks, when utilised correctly, can help one make better decisions because they can extract and model previously unknown correlations and characteristics [4]. The microgrid includes renewable energy sources (RES) such as solar, wind etc., to generate electricity, contributing to pollution emission minimization. Furthermore, RES are intermittent in nature; thus, one cannot rely on them. Therefore, ESSs and EVs are used with RES to solve this problem.

One of the problems to be catered within smart grid/smart home is energy management, whose purpose is to give greater control to the user’s over their power usage to promote the efficient use of electricity, which is possible with the implementation of demand response (DR). The DR is classified in two classes, namely: direct DR program, in which the electric utility company (EUC) operator disconnects or interrupts the load as per an interruption contract signed with the consumer; indirect DR program, where the consumer changes/adapts their demand in response to the offered pricing signaled by the EUC operator [5]. The latter DR program is the focus of this work.

The indirect DR program plays a vital role in cost efficient and reliable power system operations [6]. In [7], users reduced cost and improve comfort level via scheduling smart home appliances using indirect DR program. Similarly, the DR program is used to schedule multiple homes’ loads with the same living patterns in [8]. However, the assumptions made by the authors seem impractical because, usually, multiple homes do not have the same devices with the same operation time and power rating. A novel energy management scheme can create optimal schedule of appliances power usage, which illustrates the same profile as the microgrid generated power. The users reduce electricity cost and import a minute amount of energy from the commercial power grid by adopting the optimal schedule. In this manner, efficient energy management ensures stable and reliable microgrid operation. In [9], EMC is introduced, which schedules the power usage pattern of a single home to alleviate peak demand. This work considered RES and day-ahead weather information to ensure energy cost minimization and an energy efficient operation. The paper [10] proposed a strategy for cost minimization considering weather parameters. The authors of [11] introduced the deterministic method to schedule the operation of appliances and charging/discharging of EVs. Furthermore, EVs are considered mobile storage. In [12], authors developed a building energy management strategy for peak energy consumption mitigation. They considered ESSs and EVs as storage devices to mitigate fluctuations accompanied by RES and improve building energy efficiency regarding cost minimization. A hybrid energy system of PV, WT, and ESSs is developed with day-ahead energy forecasting in [13]. Furthermore, they considered diesel generator as a backup for power generation; however, power is produced at high cost and pollution emission.

The valuable research reviewed above either focused on load scheduling or charging/discharging scheduling of ESSs and EVs or failed to fully utilize beneficial aspects of smart grid technologies and DR program implementation. Some studies used a diesel generator as a backup, which is not appropriate for RES-based microgrids. Some solutions such as load shedding may cause user frustration, and minimize welfare and system efficiency. With this motivation, this work proposes an efficient management strategy to schedule user activities, ESSs and EVs are connected to a smart microgrid. In addition, we assess a smart home and microgrid equipped with PV panels, WT, electrolyzer, hydrogen tank, ESSs, and EVs connected to the external power grid. As a backup resource, a MGT is employed in place of diesel drive subject to cost and carbon emission minimization concerns. We use mobile storage (EVs) and static storage (ESSs) simultaneously to cater for uncertainties in EVs (parked in home or goes out on driving), and ensure the reliable provision of electricity. Moreover, a prediction model based on modified Enhanced Differential Evolution (mEDE) and Artificial Neural Network (ANN) is developed for microgrid generation capacity accurate prediction instead of assuming. The main contribution and novelty of this paper is outlined below.

- An efficient energy management scheme is proposed, which considers the RTP curve with variations that systematically schedule appliance operation and charging/discharging of EVs to maintain a balance between energy supply and demand.
- Ant colony optimization (ACO) algorithm is adapted, which takes into account constraints, occupant energy consumption pattern, users priorities, and uncertainties in the presence of RTP to schedule load and EVs charging/discharging for efficient energy management.
- Adapted ACO algorithm successfully solves the presented problem, allowing a high monetary reduction in the energy cost paid by consumers, alleviating the peak formation in electricity demand, minimizing carbon emission, and improving the comfort of the users.
- For efficient energy management, an accurate forecast model ANN based on mEDE (ANN-mEDE) is developed to forecast a generation profile of microgrid using weather information and mathematical models of the WT and PV.
- Simulation results demonstrate that the newly devised scheme based on the ACO technique is effective, which considerably reduces the consumer’s cost, PAR, and peak electricity demand reduction in the commercial grid.

The rest of the paper is structured as follows: Section 2 presents related work. In Section 3, a proposed efficient system model is discussed. Section 4 presents mathematical modeling of the proposed system model. The problem formulation is presented in Section 5. The simulation results are presented in Section 6 and finally in Section 7, the paper is concluded.

Several research works have been conducted over the last few decades in the literature to address energy management problems in a smart gird. To solve energy management problems, many heuristic, mathematical, and controller base methods are developed in the literature, which are discussed in detail as follows.

In [14], the authors power usage scheduling framework based on Mixed Integer Linear Programming (MILP) to reduce energy cost and alleviate PAR. The authors in [15] proposes a game theory-based appliance scheduling framework for electricity cost and peak energy demand reduction. However, the user frustration level is not taken into consideration. The authors of [16] proposes a scheme for residential sector based on MILP technique to analyze EVs bi-directional flow. In [17], authors mitigate the cost of electricity in a smart house and determine the modes of operation of various loads; an exact solution technique is used to retain the surplus electricity from RESs in batteries. To minimize overall energy bill in the microgrid, an optimal energy management model based on MILP is presented [18]. The authors use the Power Grand Composite Curves (PGCC) technique for adjusting system functioning in response to short-term energy requirement, and their study provides a unique way for identifying appropriate Power Management Strategies (PMS) in RES-based smart grids. The authors of [19] evaluate prosumers-based Energy Management and Sharing (PEMS) as well as the issues that come with it. It will assist in the interpretation and analysis of the prosumers effect on future smart grids. Their study gives a detailed evaluation of these goals, PEMS in the smart grid environment, and its impacts on power system reliability and energy sustainability are studied. In [20], authors developed a technique based on the MILP paradigm, employed in this project to provide an optimal solution in terms of tasks such as energy usage and renewable resource management. The suggested technique achieves an optimal schedule under dynamic electrical limitations while maintaining thermal comfort based on user requirements. The mathematical and deterministic methods suffer from system and computational complexity.

Researchers adopted controller-based methods to resolve problems accompanied with deterministic methods. For example, in [21], the authors presented a Distributed Model Predictive Controller (DMPC) for consumers and EUCs DSM. The smart grid have generating units such as RESs, ESSs, and smart load. The DMPC schedules the smart load for efficient DSM. The authors of [22] proposed an integration and control automation of RESs such as a PV plant, a solid oxide fuel cell with battery, and load in smart grid. The Energy Management System (EMS) is based on Proportional Integral (PI) and Adaptive Neuro-Fuzzy Inference System (ANFIS) techniques to effectively balance supply and demand. A DMPC method is developed for grid-connected cooperative energy management in [23]. The proposed DMPC’s optimization results are similar to Centralised MPC (CMPC) Pareto solutions according to a real-time hardware-in-the-loop, while the computation speed is significantly faster than CMPC. The authors in [24] proposed an energy management scheme to forecast interrupted data for a microgrid with a centralized dispatching mechanism. The proposed energy management scheme is based on MPC and ensemble learning network approaches. A novel coordinated MPC method is developed that schedules the operation of the microgrid while considering the variations of stochastic RESs as well as meteorological circumstances [25]. A dynamic energy management system based on MPC is developed for a power grid-connected microgrid linked to and serving a residential area [26]. The dynamic energy management system collects data from various components of the electrical system via a smart metering system. However, the controller-based methods are computationally intensive and become too slow for energy optimization.

To resolve the problems accompanied by deterministic and controller-based methods, stochastic techniques have emerged as a promising solution. For instance, in [27], the Genetic Algorithm (GA) based non-sorting scheme was adopted for scheduling household with primary objectives such as carbon emissions, power usage, and energy bill minimization. A new algorithm for programming the EMC to schedule household load is developed in [28]. The EMC schedules home appliances in such a manner that the load is shifted to the battery during peak hours. The work [29] proposed a hybrid optimization technique of GA and MILP for economic dispatch. The authors of [30] incorporate a mutation operator with ACO algorithm to resolve the problem trapping at local optima with primary DSM objectives such as PAR, and cost minimization. The authors in [31] scheduled the home appliances to mitigate PAR and minimize the delay time of appliances. However, the Carbon emission is not taken into account in their study. The authors of [32] implemented the Firefly Algorithm (FA) for energy management under the pricing schemes such as Real-Time Price (RTP) and Critical Peak Price (CPP). However, user comfort is compromised. The Grey Wolf Accretive Satisfaction Algorithm (GWASA) to solve the residential demand-side management problem with the lowest cost and highest ratio of satisfaction in [33]. The [34] used the Candidate Solution Updation Algorithm (CSUA) for reducing PAR and consumer delay time by increasing user comfort level. The authors of this paper considered uncertainties in loads and ensured optimal scheduling to facilitate residents. The authors presented an intelligent energy management principles and technology issues for smart grid applications to help the Distributed Electric System (DES). The authors in [35] conducted a comprehensive analysis of IoT-based energy management in smart communities. Following that, the foundation and software model for an IoT-based system at the network’s edge is presented. The authors developed optimum power scheduling technique using RTP and Inclining Block Rate (IBR) tariff to minimize electricity costs, reduce the PAR, and minimize user discomfort. The authors in [36] proposed hierarchical architecture using cloud computing and edge computing to a distributed architecture which provides autonomous strategic decisions with agent-based intelligence for massive information. In households and grids, large-scale information gathering, communications, processing, and control are performed through agents for cooperative energy management. The results of the experiments show that the agent-based solution is promising in cooperative energy management. In [37], the authors developed a game-theoretical model to schedule entire electricity consumption scheduling for efficient power consumption planning and DSM. The [38] proposed load schedling and distributed storage approach to improve user satisfaction and minimize customer energy costs. In [39], an optimization-based energy management structure is developed to schedule consumer energy consumption pattern using RTP signals under utility, PV, and ESSs. The purpose is to reduce energy bills, carbon emissions, and peak power consumption while mitigating pricing rebound peak generation. The authors proposed a multi-domain communication network with federation concept in [40]. This model introduced how IEC 61850 and the extensible Message Presence Protocol (XMPP) may be used to provide a common communication framework for Virtual Power Plants (VPPs) management in smart grids. A privacy-preserving technique is introduced. The nodes use accurate data for estimation and broadcasting the noisy version in [41]. The authors show that the proposed algorithm can protect privacy and retain the final solution’s convergence and optimality. Extensive simulations indicate that their proposed strategies are effective. The authors used a GA-, game theory-, and fuzzy logic-based framework that seeks to maximize profit by choosing the optimum alternative and forecasting future energy demands [42]. The authors implemented a Cuckoo Search Algorithm (CSA) to study the impact Battery Energy Storage (BES) on power system operation [43]. A game-theoretic (Stackelberg) model is introduced in [44] to examine coordination of generators with microgrids. A novel technique with Artificial Neural Networks (ANN) is developed for expressing and conveying the energy flexibility of distributed energy resources for efficient energy management [45]. In [46], the authors proposed a scheduling technique based on the markov decision process for energy management in a smart grid. This work aims to lower a customer’s energy expenditure. The authors in [47] presented a method for regulating the active and reactive power flow in an islanded renewable generating system’s Point of Common Connection (PCC). In [48], the authors employed optimum DR technique to maintain balance between supply and demand. The DR program engaged the Plug in Hybrid EVs (PHEVs) at parking stations as distributed energy storage and source to participate in DSM.

The related works discussed above are summarized in Table 1. All the methods discussed above are capable and effective in energy management. However, the researchers did not all use key features such as advanced metering infrastructure, forecasting, and bi-directional communication of the smart grid. Furthermore, mostly researchers assumed consumers behavior and RESs profile. Some authors focused on electricity cost minimization, others catered for PAR alleviation, a few handled both electricity cost and PAR minimization, while some authors considered user comfort maximization. However, the objectives such as electricity cost, carbon emission, PAR, and user comfort are not handled simultaneously by any authors in the literature. Thus, it is concluded from the above literature that electricity cost, carbon emission, PAR, and user comfort are energy management objectives, where carbon emission and PAR are utility objectives which are directly linked to customer objectives such as energy cost and user comfort. The utility and customer objectives are contradictory in nature and challenging to handle simultaneously.

Thus, an optimization technique is needed that considers user priority, DR program, and comfort constraints to cater for uncertainties in load and renewable generation for efficient energy utilization, energy cost reduction, PAR alleviation, carbon emission mitigation, and end-user satisfaction, to satisfy both utility providers and consumers at the same time. In this regard, an innovative framework composed of residential smart homes and a grid-connected smart microgrid is proposed. Furthermore, an efficient energy management scheme based on the ACO algorithm is developed for the proposed framework to systematically schedule load and EV’s charging/discharging connected in a smart microgrid.

Efficient energy management framework is presented in this section, followed by a description of the day-ahead energy generation prediction model. The complete implementation diagram of the proposed model is depicted in Figure 1, which is discussed in detail in subsequent sections.

The proposed system model is composed of a residential smart home equipped with smart meter and smart appliances, and a smart microgrid comprising WT, PV panels, electrolyzer, and hydrogen tank. The proposed system model is depicted in Figure 2. However, residential consumers load and electricity generation of a microgrid is stochastic and uncertain. Thus, an ANN-mEDE-based prediction model is developed for efficient energy management. An efficient EMC based on ACO algorithm (whose control parameters are listed in Table 2) is installed to systematically schedule load and EVs charging/discharging connected to a smart microgrid according to RTP signal. In our proposed work, the simulation time T is assumed to be 1 day, which is split into sub-timeslots of equal duration denoted by $t\left(1h\right)$. The detailed description of each component of the proposed system model is as follows.

This section describes the prediction model to predict solar irradiation and wind speed for effective generation estimation. In this regard, a framework of ANN-mEDE is developed to predict solar irradiation and wind speed for effective estimation of generation. The proposed prediction model is composed of three parts: (i) feature selector, (ii) forecaster, and (iii) optimizer. Feature selector phase of the prediction model based on mutual information technique uses time-series solar irradiation and wind speed as input. The mutual information technique rank the inputs and passed the ranked inputs to redundancy and irrelevancy filters for the removal of irrelevant and redundant features. Then, the selected inputs are split into training and testing datasamples.

The forecaster phase is based on an artificial neural network (ANN), which uses training and testing sets to forecast solar irradiation and wind speed for a day-ahead time horizon. The ANN is a multilayer feed-forward network, where each succeeding layer gets input from the preceding layers. In other words, the outputs of one layer’s nodes are used as inputs in the next layer. A weighted linear combination is used to combine the inputs, which are changed by a nonlinear function [53] to generate output.

The ANN has three layers layout having input, hidden, and output layers, where Artificial Neurons (ANs) in each layer are exploited by sigmoidal activation function [54], which is shown in Equation (1) as follows.

$$f(S,b)=\frac{1}{1+{e}^{-\beta (S-b)}}$$

The input signal is S with attributes (as discussed in the first module). The parameter $\beta $ is for steepness control of the activation function and b indicates the bias value. As discussed above, the developed prediction model is enabled via training to learn and accurately estimate future energy generation. In the literature, learning mechanisms such as unsupervised, supervised, and re-enforcement learning exist. The developed forecasting framework learns from time series analysis with the supervised learning approach, which employs multivariate autoregressive rules due to high convergence than benchmark learning rules [55]. Solar irradiation and wind speed prediction model is illustrated in Figure 3. The RESs three-year weather data is adopted from [56]. The acquired data is divided into training and testing sets of 80% and 20%, respectively, as per the mechanism available [57,58,59].

$$MAPE\left(i\right)=\frac{1}{n}\sum _{j=1}^{m}\frac{\left|\left.{p}^{actual}(i,j)-{p}^{forecast}(i,j)\right|\right.}{{p}^{actual}(i,j)}$$

The training set trains the forecasting framework to predict future values, and testing set validates the forecasting framework to show the accuracy of the obtained predicted results compared to the ground-truth observations. Mean absolute percentage error (MAPE) is a validation metric (to illustrate the relationship between ANN predicted output and observed values), which is formulated as follows in Equation (2) [54].

Where ${p}^{actual}(i,j)$ denotes the actual and ${p}^{forecast}(i,j)$ represents forecasted solar irradiation and wind speed. m denotes number of days under observation. The control parameters are tuned using Levenburg Marquart algorithm until the error is minimized. The forecasted values (solar irradiation and wind speed) by ANN forecaster is fed to optimizer phase of the prediction model for further error minimization.

In the optimizer phase, the error is calculated between estimated and observed value, and this error is further minimized with the use of the mEDE algorithm in the optimizer phase. The meta-heuristic algorithms such as GA, PSO, FA, DE and GWO are widely used in prediction problems. The DE among these algorithms is selected due to its better performance in the aspects of fast converging speed, computational efficiency, and avoidance of premature convergence while seeking a global optimal solution. This better performance of DE is due to the different vector-based mechanism, which expands its search space [60]. On this note, the authors of [61,62,63,64] used DE and GA techniques, respectively; with this as motivation, we developed modified enhanced DE to optimize control parameters of the prediction model for returning accurate estimation without trapping into local optima and avoiding premature convergence. The energy estimations returned from the optimizer phase are more accurate and utilized for efficient energy management.

This section presents the mathematical modeling of a smart microgrid equipped with controllable appliances, PV panels, WT, electrolyzer, hydrogen tank, EVs, and ESS.

This section presents explanation and modeling modeling of appliances operating within smart home. Each consumer is in contact with smart appliances. Moreover, each appliance is scheduled according to consumer demand. These appliances are further categorized into three categories: (i) Electrically Controllable-Appliances (ECA), (ii) Thermostatically Controllable-Appliances (TCA), and (iii) Optically Controllable-Appliances (OCA). Each category will be discussed in detail as follows.

An adaptive approach based on RTP signal for ECA scheduling such as PHEVs is proposed. The EMC schedules ECA as soon as it receives RTP signal from the utility. Consumers typically schedule smart appliances within the assigned time interval to avoid high payment due to operation in peak price hours. Furthermore, the ECA parameters such as the time interval in between the Earliest Starting Time (EST) and Latest Finishing Time (LFT), and Length of Operation Time (LOT) are adjusted using In-Home Display (IHD) and the adjusted parameters will be communicated to EMC via Home Gate (HG). These parameters are adopted from [65] and listed in Table 3.

The appliance consumption cycle is started using the starting probability function, which is defined as ${P}_{step}$ in Equation (3):
where A represents an ECA appliance, h represents the hour of the day, d represents the day of the week, W represents the week of the year, and $\delta $ represents the computing time step (second or minute), $\sigma $ is the standard deviation for ${P}_{social}$ which represents the social random factor. Moreover, seasonal changes are customized by ${P}_{season}$, ${P}_{hour}$ the probability hourly factor, ${P}_{step}$ stands for scaling factor, which scales the probabilities in consideration with $\delta $. ${P}_{start}$ is described for each time interval $\delta $ it takes a value between 0 and 1. Further detailed elaboration is given in [65].

$${P}_{start}(A,W,\delta ,{\sigma}_{flat},h,d)={P}_{season}(A,W){P}_{hour}(A,h,d){P}_{step}\left(\delta \right){P}_{social}\left({\sigma}_{flat}\right)$$

TCA may be electrical or thermal equipment such as an air conditioner or a water heater, which can be scheduled using the desired temperature and RTP signal. The air conditioner, refrigerator, heater, and freezer temperatures are denoted by ${T}_{t}^{ac}$, ${T}_{t}^{fridge}$, ${T}_{t}^{heater}$, and ${T}_{t}^{freezer}$, respectively, presented in Equations (4)–(7) which should be adjusted by consumers as per their specified temperature to avoid user-frustration. These circumstances can be stated as follows:
where ${T}_{min}^{ac},\phantom{\rule{4pt}{0ex}}{T}_{min}^{fridge},\phantom{\rule{4pt}{0ex}}{T}_{min}^{heater}and\phantom{\rule{4pt}{0ex}}{T}_{min}^{freezer}$ are air conditioner, fridge, heater and freezer lower bound, while ${T}_{max}^{ac},\phantom{\rule{4pt}{0ex}}{T}_{max}^{fridge},\phantom{\rule{4pt}{0ex}}{T}_{max}^{heater}and\phantom{\rule{4pt}{0ex}}{T}_{max}^{freezer}$ are air conditioner, fridge, heater and freezer upper bound, respectively. These appropriate temperatures may differ from one household to the next, since they are determined by each individual consumer to ensure user comfort. Further detailed elaboration can be found in [65].

$${T}_{min}^{ac}\le {T}_{t}^{ac}\le {T}_{max}^{ac}$$

$${T}_{min}^{fridge}\le {T}_{t}^{fridge}\le {T}_{max}^{fridge}$$

$${T}_{min}^{heater}\le {T}_{t}^{heater}\le {T}_{max}^{heater}$$

$${T}_{min}^{freezer}\le {T}_{t}^{freezer}\le {T}_{max}^{freezer}$$

The OCA mostly includes lighting loads, which are scheduled according to illumination. The lighting load is modeled using illumination level index, which is based on the activity probability, which indicates the house occupancy in the lighting load calculation. The following is how the illumination of a room (a) in the house is expressed in Equation (8).

$${L}_{t}^{a}+{L}_{t}^{OUT}\ge (1+{k}_{t}){L}_{t}^{a,min}$$

A detailed elaboration is available in [65].

The microgrid considered in this work is equipped with controllable appliances, PV panels, WT, electrolyzer, hydrogen tank, EVs, and ESS for electricity generation. The net energy generated from the sources equipped with microgrid is m $\u03f5$ M in time interval t $\u03f5$ T is presented in Equation (9) as follows.
where $\u03f5m$ represents microgrid generation. Equation (10) calculates microgrid total electricity generation.

$$E\left(t\right)=\sum _{m\epsilon M}\epsilon m\left(t\right)$$

$$E\left(t\right)=\sum _{t=1}^{T}\sum _{m\epsilon M}\epsilon m\left(t\right)$$

As the microgrid is equipped with RESs which are intermittent in nature, thus, the ANN-mEDE prediction model is implemented to predict solar irradiation and wind speed for next-day timeslots T for accurate future electricity generation estimation. The detailed explanation of generating sources equipped with microgrid is presented as follows.

The WT is entirely dependent on the wind speed for electricity generation, which is mathematically modeled in Equation (11) as follows.
where ${P}^{wt}$ represents WT electricity generation at timeslot t, A is the area swept by turbine blades through which WT generates power, ${{V}_{t}}^{wt}$ denotes wind speed and air density is $\rho $. The electricity generation from WT is directly proportinal to wind speed, i.e., the higher the wind speed, the higher the generation, and vice versa, as presented in Equation (11). The WT electricity generation is subjected to specified constraints [66], which are defined in Equations (12)–(14).

$${P}^{wt}\left(t\right)=1/2\times {C}_{p}\times \left(\lambda \right)\times \rho \times A\times {\left({{V}_{t}}^{wt}\right)}^{3}\phantom{\rule{4pt}{0ex}}$$

$${V}^{cut-in}\le {V}^{wt}\left(t\right)\le {V}^{cut-out}$$

$$0={V}^{wt}\left(t\right)\ge {V}^{cut-out},\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\forall \phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}t\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\epsilon \phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}T$$

$$0={V}^{wt}\left(t\right)\le {V}^{cut-in},\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\forall \phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}t\phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}\epsilon \phantom{\rule{0.277778em}{0ex}}\phantom{\rule{0.277778em}{0ex}}T$$

PV panels generates electricity from the sunlight, which is mathematically modeled in Equation (15) as follows [65].
where ${{P}_{t}}^{pv}$ shows amount of electricity produced per hour from PV panels. The symbols ${A}^{pv}$ and ${\eta}^{pv}$ show area and efficiency of PV panel, respectively. Moreover, the $Temp\left(t\right)$ and $Irr\left(t\right)$ indicate amount of solar irradiation and the outside temperature at timeslot t.

$${{P}_{t}}^{pv}={\eta}^{pv}\times {A}^{pv}\times Irr\left(t\right)\times (1-0.005\times (Temp\left(t\right)-25))$$

An enhanced electrolyzer has been developed in our proposed study. In the electrolyzer model, electrochemical processes are employed. Furthermore, the maximum temperature of 100 °C was taken into account. An electrolyzer cell’s electrode dynamics can be approximated using an empirical voltage relationship. Several electrolyzer empirical models have been proposed [67,68,69,70].

$$U={U}_{rev}+\frac{r}{A}I+slog(\frac{t}{A}+1)$$

In addition, in order to model the temperature dependency of an over voltages, Equation (16) can be altered.

As this Bennedict Webb Rubin (BWR) equation comprises of eight parameters, and is more exact than that of three-parameter equations, particularly at temperatures above critical and pressures not exceeding extremely high, as indicated in Equation (17) [71].
where $\rho $ represents gas density which relates to compressibility factor by (18):
where as, p is represented in atm, T is in kelvin (k), $\rho $ is in mol/L, R = 0.08205 atm L/mol K. Moreover, the remaining parameters are as follows:

$$p=RT\rho +({B}_{0}RT-{A}_{0}-\frac{{C}_{o}}{{T}^{2}}){\rho}^{2}+(bRT-a){\rho}^{3}+a\alpha {\rho}^{6}+\frac{c{\rho}^{3}}{{T}^{2}}\ast [(1+\gamma {\rho}^{2})exp(-\gamma {\rho}^{2})]$$

$$z=1+({B}_{0}-\frac{{A}_{0}}{RT}-\frac{{c}_{0}}{R{T}^{3}})\rho +(b-\frac{a}{RT}){\rho}^{2}+\frac{a\alpha}{RT}{\rho}^{5}+\frac{c{\rho}^{2}}{R{T}^{3}}[(1+\gamma {\rho}^{2})exp(-\gamma {\rho}^{2})]$$

- a = −9.2211 × 10${}^{-3}$ (L/mol)${}^{3}$ atm;
- ${A}_{0}$ = 9.7319 × 10${}^{-2}$ (L/mol)${}^{2}$ atm;
- b = 1.7976 × 10${}^{-4}$ (L/mol)${}^{2}$;
- ${B}_{0}$ = 1.8041 × 10${}^{-2}$ (L/mol);
- c = −2.4613 × 10${}^{2}$ (L/mol)${}^{3}$ K${}^{2}$ atm;
- ${C}_{0}$ = 3.8914 × 10${}^{2}$ (L/mol)${}^{2}$ K atm;
- $\alpha $ = −3.4215 × 10${}^{-6}$ [(L/mol)${}^{3}$];
- $\gamma $ = 1.89 × 10${}^{-3}$ [(L/mol)${}^{2}$]

MGT is a generator used for electricity generation with a generation capacity range of 15–300 (kW). It is usually preferred due to its ease of installation and maintenance [72]. In this work, the MGT is employed as a backup and shiftable generating source, and operates as per the direction and requirement of users. Its generation is cheaper and environment friendly compared to diesel generators, and significantly contributes to carbon emission minimization [29]. On/off are the two operation statuses; it produces constant energy of 2 kW in on status while in off status, its generation is 0 kW [13].

ESSs includes static storage and mobile storage systems that are equipped with RES in the microgrid to store energy during on-peak hours (act as a load) and discharge energy to load in low price hours (act as a source). Complete discussion is presented below.

The smart home considered in this work is equipped with BES with a storage capacity of 3 kWh, the same as is discussed in [14,73]. The BES is subjected to various constraints such as $ES{S}_{min}$ and $ES{S}_{max}$, which represent minimum and maximum charge limit, respectively. Every BES has a predefined discharging limit, namely lower discharging limit, which is set at 20%, the same as is used in [74,75]. The energy stored in BES is mathematically modeled in Equation (19).
subjected to
where SE shows stored energy at timeslot t in BES measured in Ah, ${\eta}^{ESS}$ is the efficiency of BES, $E{S}^{ch}\left(t\right)$ and $E{S}^{dis}\left(t\right)$ represent charging and discharging status at timeslot t, respectively. Moreover, the charging/discharging and idle status of BES is mathematically modeled in Equation (23) as follows.

$$SE\left(t\right)=SE(t-1)+k\times {\eta}^{ESS}\times E{S}^{ch}\left(t\right)-k\times E{S}^{dis}\left(t\right)/{\eta}^{ESS}$$

$$ES{\left(t\right)}^{ch}\le E{S}_{max}$$

$$ES{\left(t\right)}^{dis}\ge E{S}_{min}$$

$$ESS{\left(t\right)}^{ch}<ES{S}_{upl}$$

$${\alpha}_{e}\left(t\right)=\left\{\begin{array}{c}1\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}if\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}ESS\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}is\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}charging,\hfill \\ -1\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}if\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}ESS\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}is\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}discharging,\hfill \\ 0\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}if\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}ESS\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}is\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}idle.\hfill \end{array}\right.$$

When the status of BES is equal to 1, the battery is charging from RES and acts as a load. On the other hand, when the status of BES is equal to −1, the battery is in discharging mode and acts as a source; otherwise, it will be in idle mode.

EVs are employed as mobile energy storage systems as well as being used for driving purposes. The main objective is to mitigate fluctuations accompanied by RES and minimize energy cost. The EVs energy utilization for arrival and departure usage mode is mathematically modeled in Equation (48) as follows [14].
where, in Equation (24), ${t}_{a}^{e}$ represents EVs arrival time and ${t}_{d}^{e}$ denotes EVs departure time. The symbols ${\psi}_{e}\left(t\right)$ and ${\alpha}_{e}\left(t\right)$ denote charging/discharging in $Ah$ and status of EV at timeslot t, respectively. When ${\alpha}_{e}=1$ EV is in charging mode, ${\alpha}_{e}=-1$ EV is in discharging mode, and ${\alpha}_{e}=0$ EV is in idle mode.

$$E{V}_{e}=\sum _{t={t}_{a}^{e}}^{{t}_{d}^{e}}({\psi}_{e}\left(t\right)\times {\alpha}_{e}\left(t\right))$$

In energy management, the main objectives are energy cost, PAR, carbon emission, and user discomfort minimization to facilitate both end-users and utility. The energy management objectives can be achieved by actively engaging consumers/end-users in distributed generation and DR programs. In this work, end-users are engaged in both distributed generation and DR programs to obtain the energy management objectives. On this note, the EMC based on the ACO algorithm is employed, which receives a DR signal (RTP) and broadcasts it to consumers ahead of time. In response, consumers send their electricity consumption pattern to the EMC based on the ACO algorithm, whose control parameters are listed in Table 2. The EMC schedules power usage of consumers and charging/discharging of EVs and BES to manage the electricity consumption pattern of consumers in such a manner that energy cost is reduced, PAR is alleviated, carbon emission is mitigated, and user discomfort is minimized. Thus, the proposed objective function is modeled as optimization function to minimize the above-discussed objectives. Each optimization objective will be individually mathematically formulated following the whole energy management problem formulation.

Energy cost is a payment made by consumers to utility providers for the electricity consumed for a specific period of time. The energy cost is formulated with the RTP signal offered by the utility provider. In 2009, FERC reported that consumers who implemented DR programs for power usage scheduling achieved 65% monetary benefit in aspects of cost reduction. The energy cost payment to the utility providers for energy consumption under the RTP signal without considering the microgrid is formulated in Equation (25).
where ${\mathsf{\Gamma}}_{ECA}\left(t\right)$, ${\mathsf{\Gamma}}_{TCA}\left(t\right)$, and ${\mathsf{\Gamma}}_{OCA}\left(t\right)$ are electricity demand of ECA, TCA and OCA, respectively. Moreover, the total energy cost charged per day is formulated in Equation (26) as follows.

$$\zeta \left(t\right)=({\mathsf{\Gamma}}_{ECA}\left(t\right)+{\mathsf{\Gamma}}_{TCA}\left(t\right)+{\mathsf{\Gamma}}_{OCA}\left(t\right))\times EP\left(t\right)$$

$$\zeta \left(T\right)=\sum _{t=1}^{T}({\mathsf{\Gamma}}_{ECA}\left(t\right)+{\mathsf{\Gamma}}_{TCA}\left(t\right)+{\mathsf{\Gamma}}_{OCA}\left(t\right))\times EP\left(t\right)$$

The energy imported per hour after considering the microgrid equipped with RES, BES, EV, and MGT is formulated in Equation (27) as follows.

$$\mathsf{\Phi}\left(t\right)\phantom{\rule{4pt}{0ex}}=(({\mathsf{\Gamma}}_{ECA}\left(t\right)+{\mathsf{\Gamma}}_{TCA}\left(t\right)+{\mathsf{\Gamma}}_{OCA}\left(t\right))-(E\left(t\right)+EV.{\alpha}_{EV\left(t\right)}+ESS.{\alpha}_{ESS\left(t\right)}+MGT.{\alpha}_{MGT\left(t\right)}))$$

$$\mathsf{\Phi}\left(t\right)=\left\{\begin{array}{c}\mathsf{\Phi}\left(t\right)\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}if\phantom{\rule{0.166667em}{0ex}}\mathsf{\Phi}\left(t\right)>0,\hfill \\ 0\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}otherwise\hfill \end{array}\right.$$

Equation (28) shows that if $\mathsf{\Phi}\left(t\right)>0$ the electricity is imported and if $\mathsf{\Phi}\left(t\right)=0$, the energy is not imported. The total energy imported per day is formulated in Equation (29) as follows.

$$\mathsf{\Phi}\left(T\right)=\sum _{t=1}^{T}\mathsf{\Phi}\left(t\right)$$

The consumers hourly and daily energy cost after considering the microgrid is formulated in Equations (30) and (31), respectively, as follows.
where $\delta \left(t\right)$ is the per hour energy cost and $\delta \left(T\right)$ is the total energy cost per day. The symbol $\mathsf{\Phi}\left(t\right)$ represents imported electricity per hour and $EP\left(t\right)$ is RTP signal.

$$\delta \left(t\right)=\left(\mathsf{\Phi}\right(t\left)EP\right(t\left)\right)$$

$$\delta \left(T\right)=\sum _{t=1}^{T}(\mathsf{\Phi}\left(t\right)\times EP\left(t\right))$$

PAR is a ratio of peak electricity consumption to average electricity consumption. The PAR is important for EUCs and users because it smooths out the load curve for utility providers, which stops operation of peak power plants during peak hours and thus reduces consumers energy cost. In this work, utility providers stimulate users to participate in DR either by load and EVs charging/discharging scheduling, and to install the EMC, both of which significantly contribute to PAR alleviation. The PAR is mathematically formulated in Equation (32) as follows.
where $\mu $ represents PAR.

$$\mu =\frac{max\left({\mathsf{\Gamma}}_{ECA}\left(t\right)+{\mathsf{\Gamma}}_{TCA}\left(t\right)+{\mathsf{\Gamma}}_{OCA}\left(t\right)+E{S}^{ch}\left(t\right)\right)}{{\mathsf{\Gamma}}_{ECA}\left(t\right)+{\mathsf{\Gamma}}_{TCA}\left(t\right)+{\mathsf{\Gamma}}_{OCA}\left(t\right)+E{S}^{ch}\left(t\right)\phantom{\rule{-0.166667em}{0ex}}/\phantom{{\mathsf{\Gamma}}_{ECA}\left(t\right)+{\mathsf{\Gamma}}_{TCA}\left(t\right)+{\mathsf{\Gamma}}_{OCA}\left(t\right)+E{S}^{ch}\left(t\right)4}\phantom{\rule{0.0pt}{0ex}}\phantom{\rule{-0.166667em}{0ex}}4}$$

User comfort is measured in various aspects such as waiting time, energy consumption, temperature, sound, illumination, and demographic energy demand patron of consumers. This study measures user discomfort in aspects of delay, i.e., how much of a delay a user confronts after scheduling. Furthermore, a tradeoff exists between energy bill and user discomfort; the users who tolerate more delay would be charged a lower energy cost and those who are not delay-tolerant would be charged a higher energy cost. The user comfort is measured in aspects of delay/waiting time, which is mathematically formulated in Equation (33).
where ${w}_{a}$ is the waiting time that each appliance may face after scheduling, ${T}_{a,t}^{o,unsch}$ shows status of an appliance before scheduling, ${T}_{a,t}^{o,sch}$ denotes status of an appliances after scheduling, and ${T}_{a}^{lo}$ represents the total LOT of an appliance. The EMC based on the ACO algorithm schedules appliances in response to the RTP signal and consumer priority. An appliance that can tolerate maximum delay/waiting time is formulated in Equation (34) as follows.
where ${w}_{a}^{d}$ represents maximum waiting time/delay an appliance faces after scheduling and ${T}_{a}^{t}$ denotes the total time interval of appliances. User frustration increases with the increase in ${w}_{a}^{d}$ and hence their comfort is compromised. The user discomfort is at its peak when ${w}_{a}={w}_{a}^{d}$, and this represents the worst case, which never happens. Percentage user discomfort is mathematically modeled in Equation (35).

$${w}_{a}=\frac{{\displaystyle \sum _{t=1}^{T}}{\displaystyle \sum _{a=1}^{n}}\left|\left({T}_{a,t}^{o,unsch}-{T}_{a,t}^{o,sch}\right)\right|}{{T}_{a}^{lo}}$$

$${w}_{a}^{d}={T}_{a}^{t}-{T}_{a}^{lo}$$

$$D=\frac{{w}_{a}}{{w}_{a}^{d}}\times 100$$

Carbon emission is defined as the release of carbon dioxide in atmosphere while generating and using electricity in the energy sector. In this work, distributed generation and MGT are included in the microgrid instead of fossil fuels and diesel generators, while load and charging/discharging of EVs are scheduled, which reduces carbon emissions and ensures a cleaner and greener environment. The carbon emission is mathematically formulated in Equation (36) as follows.

$$\mathsf{{\rm Y}}=\frac{mean\left(EP\right(t\left)\right)}{\epsilon \times \varsigma \times \Im}$$

The term $\mathsf{{\rm Y}}$ represents carbon emission which is measured in pounds, where $mean\left(EP\right(t\left)\right)$ denotes mean electricity price, $\epsilon $ indicates price per kWh, $\varsigma $ is the electricity emission factor, and ℑ is the hour in the day.

Now, the overall problem is modeled as optimization problem to achieve our desired objectives: minimum energy cost, carbon emission, PAR, and user discomfort with load and charging/discharging scheduling, which is expressed is in Equation (37) as follows.

$$\mathrm{minimize}\phantom{\rule{0.166667em}{0ex}}\sum _{t=1}^{T}\phantom{\rule{0.277778em}{0ex}}\left(\begin{array}{c}({\mathsf{\Gamma}}_{ECA}^{t}+{\mathsf{\Gamma}}_{TCA}^{t}+{\mathsf{\Gamma}}_{OCA}^{t})-\hfill \\ ({E}^{t}+ES{S}^{t}+E{V}^{t}+MG{T}^{t})\hfill \end{array}\right)\times \mathrm{E}{\mathrm{P}}^{t}$$

Subjected to:

$$E\left(t\right)={P}^{pv}\left(t\right)+{P}^{wt}\left(t\right)+{P}^{hyd}\left(t\right)+{P}^{elec}\left(t\right),$$

$$\begin{array}{c}{\mathsf{\Gamma}}_{ECA}^{t}+{\mathsf{\Gamma}}_{TCA}^{t}+{\mathsf{\Gamma}}_{OCA}^{t}={E}^{t}+ES{S}^{t}\hfill \\ +E{V}^{t}+MG{T}^{t}+{\mathsf{\Phi}}^{t},\hfill \end{array},$$

$$\sum _{a=1}^{n}\eta =LOT\left(a\right),$$

$$\sum _{a=1}^{n}\alpha \le \eta \le \beta ,$$

$${U}_{rev}=\frac{\mathsf{\Delta}G}{zF}$$

$$z=\frac{p{V}_{m}}{RT}$$

$${\mathsf{\Phi}}_{t}\le KI,$$

$${V}^{cut-in}\le V{\left(t\right)}^{wt}\le {V}^{cut-out},\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\forall \phantom{\rule{0.166667em}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}T,$$

$$0<Irr\left(t\right)<kc,\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\forall \phantom{\rule{0.166667em}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}T,$$

$$0<ES{S}_{min}<ES{S}_{max},\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\forall \phantom{\rule{0.166667em}{0ex}}t\phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}\epsilon \phantom{\rule{0.166667em}{0ex}}\phantom{\rule{0.166667em}{0ex}}T,$$

$$E{V}_{min}^{e}\le \rho E{V}_{a}^{e}+E{V}_{e}\le E{V}_{max}^{e}$$

The symbols used in the above equations are defined in Section 3 and presented in Nomenclature table.

Analysis of simulation results are discussed in this section. The extensive simulations are carried out in a MATLAB environment installed in the computer system with Intel Core i5 2.4 GHz processor, 8 GB RAM, and Windows 10 operating system, in order to show optimal operation and charging/discharging scheduling of EVs. This study uses four performance metrics including energy cost, PAR, carbon emission, and waiting time/delay for performance evaluation of the proposed model in comparison with existing models. The proposed system model was developed for a residential smart home with three types of load: ECA, TCA, and OCA, which communicate with an EMC based on a ACO algorithm via the Internet, and the EMC schedule operation of appliances and charging/discharging of EVs per the RTP tariff received from the utility provider. The appliance description is discussed in Section 3 and their parameters are listed in Table 3. Furthermore, we developed a forecasting framework for solar irradiation and wind speed to accurately estimate electricity generation for efficient energy management. Simulations are conducted for cases: (I) energy management without a microgrid, (II) energy management with a microgrid for a 24 h time horizon. The detailed discussion is as follows.

This section presents the results and discussions of scenario I, where microgrid is not considered.

An RTP from Figure 4, it is obvious that the proposed scheme schedules the load during off-peak hours. When the proposed technique is not implemented, meanwhile, the maximum amount of energy is purchased during peak hours. In this figure, the hourly cost is also shown.

The electricity consumption profile of appliances like ECA, TCA, and OCA within home in presence of RTP tariff received from utility with and without proposed approach is illustrated in Figure 4 and their 24 h status is listed in Table 4. It is obvious that the proposed scheme schedules operation of most appliances during low and mid price hours considering the priority of users to ensure both objectives: energy cost and user discomfort minimization. In contrast, the MILP schedules the operation of most appliances during low price hours cause user discomfort and rebound peak creation. However, the MILP is better than the case without scheduling. The energy cost hourly pattern of this scenario is depicted in Figure 5. It is observed in the energy cost profile that our proposed scheme optimally schedules the operation of smart home appliances keeping in view both user priority and energy cost constraint, and hence have little bit more energy cost during peak hours. On the other hand, with MILP-based schedules, consumers pay minimum cost over our proposed case without scheduling because user priority constraints are ignored.

Figure 6 illustrates the consumer’s daily energy cost with and without using the proposed scheme. It is clearly seen in the Figure that our proposed scheme reduces energy cost significantly compared to without scheduling scheme and MILP based scheme. The solid reason for this performance is that the proposed scheme considers users priority and cost constraints, and minimizes both energy cost and user discomfort. In addition, it also avoids rebound peaks to ensure stable and reliable power grid operation.

The PAR is illustrated in Figure 7 for existing and proposed schemes. The proposed scheme minimized the PAR to 40%, which is lower as compared to MILP and the case without scheduling.

Simulations are conducted to evaluate the proposed scheme performance with and W/O microgrid in the proposed system model. microgrid is equipped with PV panels, WT, electrolyzer, hydrogen tank. The RES equipped with a microgrid are intermittent; therefore, the BES and EVs in the proposed microgrid are also included. The electricity is generated from sources such as PV panels, WT, electrolyzers, and hydrogen tanks depicted in Figure 8. It is visualized in figure that the PV generation is high during day time and lower at night time. This behavior is due to the well-known fact that the solar irradiation is high during daytime and lower during the night. The electricity generation from WT entirely depends on wind speed, i.e., electricity generation is maximum when wind speed is high and below the cut-out speed, and vice versa. Thus, we forecast wind speed to accurately estimate electricity generation from wind. Further, to ensure the accuracy of the prediction model, MAPE and NRMSE metrics are used, which are shown in Figure 9 and Figure 10, respectively. It is clear from the above figures that observed and forecasted values of wind are closely related ensures accurate estimation of electricity generation.

Solar energy is generated from sunlight, and is a sustainable and environmentally favorable energy source. Light from the Sun reaches the planet, which supplies energy. However, we require power every hour in the generation process. Energy is generated for commercial, industrial, and residential customers to serve their load. As a result, it is more efficient. As seen from Figure 11 the solar generation is high during the daytime due to high solar irradiance.

From Figure 12, it is clear that when the wind speed is high, the generation is likewise high, and vice versa. Wind energy is the primary source of RES in a microgrid that is optimized for balancing energy supply, demand, and storage to ensure efficient energy management.

However, a comparison of expected and measured electrolyzer voltage and accompanying power indicates that the slight under-prediction of temperature has virtually no relevance from the perspective of energy system modeling. For instance, we examine the one-day simulation described in our proposed study. By mixing hydrogen and oxygen, a hydrogen tank generates electricity, heat, and water. Frequently, fuel cells and batteries are combined. Both of these devices convert the energy generated by a chemical reaction into electrical energy. The hydrogen fuel cell, on the other hand, will keep producing energy as long as fuel (hydrogen) is available.

Figure 13 illustrates the net electricity demand and imported electricity for serving smart home loads. Figure 13 clearly demonstrates that our proposed scheme shifts the load via scheduling from high price hours to low price hours, and serves the net load from the microgrid. Furthermore, the proposed scheme acquires power from the external grid during the hours when power rates are low. This figure also depicts the RES curve, which ensures that RES are serving the whole day to satisfy the user’s electricity demand.

Net electricity demand, imported electricity from WT, and purchased electricity from the power grid considering with/without EVs discharging capabilites are illustrated in Figure 14. It is obvious from results that the proposed model minimizes the energy purchased from the power grid during high price hours, importing energy from WT and enabling the discharging mode of EVs to ensure reliable power supply to the load. In contrast, smart homes import more energy in cases when EVs are driving or empty because EVs act as mobile storage.

The mobile storage EVs charging/discharging and electricity generation of the microgrid, including all sources, is depicted in Figure 15. The figure clearly shows that EVs charging mode is enabled when the microgrid generation is maximum and EVs have lower energy, and discharging mode is enabled when microgrid generation is minimum or there is no other source of energy available. In the first hour, the battery is fully charged, in 10–15 h timeslots it is charging, and 2–3 and 16–21 timeslots, it is discharging.

The EVs and BES participate in the microgrid with RES to significantly contribute in energy cost and PAR minimization as shown in Figure 16. It is obvious from the results that users utilize electricity from BES or EVs rather than importing electricity from the power grid during situations when electricity demand is at peak or high price hours, or when generation from the microgrid is scarce. This behavior highly contributes to energy cost reduction and PAR alleviation.

The MGT is employed instead of a diesel generator to reduce carbon emissions and lower peak load. MGT will only operate when the user demand exceeds a certain threshold value. From Figure 17 it is evident that MGT only functions during peak hours to fulfil customer demand, and so PAR is lowered.

Analysis is conducted for 24 h operation of the microgrid system to evaluate carbon emissions. In the microgrid, the MGT used in place of diesel generator because a diesel generator releases a large carbon footprint with RES. Thus, our proposed scheme with the use of the microgrid significantly minimizes (up to 25%) carbon emission; this is shown in Figure 18.

This work presents efficient energy management scheme to schedule operation of appliances and charging/discharging of EVs in the presence of RTP signal under utility with and without a microgrid. A prediction model, ANN-mEDE, is developed for accurate electricity generation estimation of the microgrid to contribute to efficient energy management. Then, an ACO algorithm is developed for the proposed scheme to solve energy management problems via scheduling with and without microgrid scenarios. The aims and objectives of solving the energy management problem are maintaining a balance between demand and supply for reducing energy cost, PAR, carbon emission, and user discomfort to facilitate both parties, utility providers and end-users, at the same time. To endorse the developed model, simulations are conducted in comparison with the existing scheme based on MILP and cases without scheduling in with and without microgrid scenarios. The results depict that the proposed scheme reduced energy cost, carbon emission, and PAR by 35%, 25.01%, and 40.12% in scenario I; by 55.05%, 45.5%, and 42.4% in scenario II, respectively.

Conceptualization, Data curation, Methodology, Resources, Validation, Writing—original draft, Writing—review & editing, F.R.A.; Conceptualization, Data curation, Methodology, Resources, Validation, Writing—original draft, Writing—review & editing, Formal analysis, Funding acquisition, Investigation, Project administration, Supervision, and Visualization, G.H.; Writing—review & editing, Formal analysis, Funding acquisition, Investigation, Project administration, Supervision, and Visualization, I.K.; Writing—review & editing, Formal analysis, Funding acquisition, Investigation, Visualization, S.K., Writing—review & editing, Formal analysis, Funding acquisition, Investigation, Visualization and Investigation, H.I.A.; Writing—review & editing, Formal analysis, Funding acquisition, Investigation, Visualization and Investigation, F.A. and G.R. All authors have read and agreed to the published version of the manuscript.

The article processing charge is supported by the Taif University Researchers Supporting Project Number (TURSP-2020/264), Taif University, Taif, Saudi Arabia.

The authors would like to acknowledge the support from Taif University Researchers Supporting Project Number (TURSP-2020/264), Taif University, Taif, Saudi Arabia.

The authors declare no conflict of interest.

Abbreviations | Explanation |

ACO | Ant Colony Optimization |

AN | Artificial Neuron |

ANN | Artificial Neural Network |

CE | Carbon Emission |

DR | Demand Response |

DSM | Demand Side Management |

DES | Distributed Electric System |

EMC | Energy Management controller |

EST | Earliest Starting Time |

EDE | Enhanced Differential Evolution |

EV | Electric Vehicle |

ESS | Energy Storage Systems |

ECA | Electrically Controllable Appliances |

FA | Firefly Algorithm |

IoT | Internet of Things |

GHG | Green House Gases |

GA | Genetic Algorithm |

LOT | Length of Time |

LFT | Latest Finishing Time |

MGT | Micro Gas Turbine |

MILP | Mixed Integer Linear Programming |

MINLP | Mixed Integer Non-Linear Programming |

MAPE | Mean Absolute Percentage Error |

MSE | Mean squared Error |

MG | Micro Grid |

MPC | Model Predictive Control |

MPPT | Maximum Power Point Tracking |

NRMSE | Normalized Root Mean Square Error |

OCA | Optically Controllable Appliances |

PAR | Peak to Average Ratio |

PSO | Particle swarm Optimization |

PHEV | Plug in Hybrid Electrcic Vehicle |

RES | Renewable Energy Sources |

RTP | Real Time Pricing |

SG | Smart Grids |

TCA | Thermostatically Controllable Appliances |

WT | Wind Turbine |

m | Generation from RES |

t | Time interval |

Constants | Explanation |

${T}_{min}^{ac}$ | AC lower bound |

${T}_{min}^{fridge}$ | Fridge lower bound |

${T}_{min}^{heater}$ | Heater lower bound |

${T}_{min}^{freezer}$ | Freezer lower bound |

${T}_{max}^{ac}$ | AC upper bound |

${T}_{max}^{fridge}$ | Fridge upper bound |

${T}_{max}^{heater}$ | Heater upper bound |

${T}_{max}^{freezer}$ | Freezer upper bound |

${V}^{cut-out}$ | Wind cut-out speed |

${V}^{cut-in}$ | Wind cut-in speed |

${{P}_{t}}^{pv}$ | Electricity consumed per hour from PV |

$\rho E{V}_{a}^{e}$ | Energy storage level at EV arrival time |

$\rho E{V}_{d}^{e}$ | Energy storage level at EV departure time |

$E{V}_{max}^{e}$ | Maximum EV discharging limit |

$E{V}_{min}^{e}$ | Minimum EV discharging limit |

${P}^{pv}\left(t\right)$ | PV contribution in electricity generation |

${P}^{wt}\left(t\right)$ | WT contribution in electricity generation |

${P}^{hyd}\left(t\right)$ | Hydrogen tank contribution in electricity generation |

${P}^{elec}\left(t\right)$ | Electrolyzer contribution in electricity generation |

${\mathsf{\Gamma}}_{ECA}$ | ECA scheduling |

${\mathsf{\Gamma}}_{OCA}$ | OCA scheduling |

${\mathsf{\Gamma}}_{TCA}$ | TCA scheduling |

$\mathsf{\Phi}\left(t\right)$ | Hourly imported electricity |

$E{V}_{a}^{e}$ | EV arrival time |

${\eta}^{pv}$ | Efficiency of Solar panel |

${\eta}^{ESS}$ | Efficiency of ESS |

Variables | Explanation |

${P}^{wt}$ | Generation from WT |

${{V}_{t}}^{wt}$ | Wind Speed |

$\rho $ | Air Density |

${{P}_{t}}^{pv}$ | Hourly produced energy by PV |

${A}^{pv}$ | Area of Solar panel |

$Irr\left(t\right)$ | Solar Radiation |

$Temp\left(t\right)$ | Outside Temperature |

SE | Stored Energy (Ah) |

${ES}^{ch}\left(t\right)$ | Charging Status of ESS at time t |

${ES}^{dis}\left(t\right)$ | Discharging Status of ESS at time t |

- Ackermann, T.; Andersson, G.; Söder, L. Distributed generation: A definition. Electr. Power Syst. Res.
**2001**, 57, 195–204. [Google Scholar] [CrossRef] - Gungor, V.C.; Sahin, D.; Kocak, T.; Ergut, S.; Buccella, C.; Cecati, C.; Hancke, G.P. Smart grid and smart homes: Key players and pilot projects. IEEE Ind. Electron. Mag.
**2012**, 6, 18–34. [Google Scholar] [CrossRef] - Zakariazadeh, A.; Jadid, S.; Siano, P. Smart microgrid energy and reserve scheduling with demand response using stochastic optimization. Int. J. Electr. Power Energy Syst.
**2014**, 63, 523–533. [Google Scholar] [CrossRef] - Ahmad, T.; Zhang, H.; Yan, B. A review on renewable energy and electricity requirement forecasting models for smart grid and buildings. Sustain. Cities Soc.
**2020**, 55, 102052. [Google Scholar] [CrossRef] - Flores, J.T.; Celeste, W.C.; Coura, D.J.C.; Rissino, S.D.D.; Rocha, H.R.O.; Moraes, R.E.N. Demand planning in smart homes. IEEE Lat. Am. Trans.
**2016**, 14, 3247–3255. [Google Scholar] [CrossRef] - Zhao, X.; Gao, W.; Qian, F.; Ge, J. Electricity cost comparison of dynamic pricing model based on load forecasting in home energy management system. Energy
**2021**, 229, 120538. [Google Scholar] [CrossRef] - Rocha, H.R.O.; Honorato, I.H.; Fiorotti, R.; Celeste, W.C.; Silvestre, L.J.; Silva, J.A.L. An Artificial Intelligence based scheduling algorithm for demand-side energy management in Smart Homes. Appl. Energy
**2021**, 282, 116145. [Google Scholar] [CrossRef] - Kim, B.-G.; Zhang, Y.; Van Der Schaar, M.; Lee, J.-W. Dynamic pricing and energy consumption scheduling with reinforcement learning. IEEE Trans. Smart Grid
**2015**, 7, 2187–2198. [Google Scholar] [CrossRef] - Shirazi, E.; Jadid, S. Cost reduction and peak shaving through domestic load shifting and DERs. Energy
**2017**, 124, 146–159. [Google Scholar] [CrossRef] - Silvente, J.; Papageorgiou, L.G. An MILP formulation for the optimal management of microgrids with task interruptions. Appl. Energy
**2017**, 206, 1131–1146. [Google Scholar] [CrossRef][Green Version] - Tushar, M.H.K.; Assi, C.; Maier, M.; Uddin, M.F. Smart microgrids: Optimal joint scheduling for electric vehicles and home appliances. IEEE Trans. Smart Grid
**2014**, 5, 239–250. [Google Scholar] [CrossRef] - Umetani, S.; Fukushima, Y.; Morita, H. A linear programming based heuristic algorithm for charge and discharge scheduling of electric vehicles in a building energy management system. Omega
**2017**, 67, 115–122. [Google Scholar] [CrossRef] - Wang, X.; Palazoglu, A.; El-Farra, N.H. Operational optimization and demand response of hybrid renewable energy systems. Appl. Energy
**2015**, 143, 324–335. [Google Scholar] [CrossRef] - Aslam, S.; Khalid, A.; Javaid, N. Towards efficient energy management in smart grids considering microgrids with day-ahead energy forecasting. Electr. Power Syst. Res.
**2020**, 182, 106232. [Google Scholar] [CrossRef] - Pal, S.; Thakur, S.; Kumar, R.; Panigrahi, B. A strategical game theoretic based demand response model for residential consumers in a fair environment. Int. J. Electr. Power Energy Syst.
**2018**, 97, 201–210. [Google Scholar] [CrossRef] - Thomas, D.; Deblecker, O.; Ioakimidis, C.S. Optimal operation of an energy management system for a grid-connected smart building considering photovoltaics’ uncertainty and stochastic electric vehicles’ driving schedules. Appl. Energy
**2018**, 210, 1188–1206. [Google Scholar] [CrossRef] - Melhem, F.Y. Optimization Methods and Energy Management in “Smart Grids”. Ph.D. Thesis, Université Bourgogne Franche-Comté, Bourgogne Franche-Comté, France, 2018. [Google Scholar]
- Giaouris, D.; Papadopoulos, A.I.; Seferlis, P.; Papadopoulou, S.; Voutetakis, S.; Stergiopoulos, F.; Elmasides, C. Optimum energy management in smart grids based on power pinch analysis. Chem. Eng.
**2014**, 39, 55–60. [Google Scholar] - Zafar, R.; Mahmood, A.; Razzaq, S.; Ali, W.; Naeem, U.; Shehzad, K. Prosumer based energy management and sharing in smart grid. Renew. Sustain. Energy Rev.
**2018**, 82, 1675–1684. [Google Scholar] [CrossRef] - De Angelis, F.; Boaro, M.; Fuselli, D.; Squartini, S.; Piazza, F.; Wei, Q. Optimal home energy management under dynamic electrical and thermal constraints. IEEE Trans. Ind. Inform.
**2012**, 9, 1518–1527. [Google Scholar] [CrossRef] - He, M.-F.; Zhang, F.-X.; Huang, Y.; Chen, J.; Wang, J.; Wang, R. A distributed demand side energy management algorithm for smart grid. Energies
**2019**, 12, 426. [Google Scholar] [CrossRef][Green Version] - Subha, S.; Nagalakshmi, S. Design of ANFIS controller for intelligent energy management in smart grid applications. J. Ambient Intell. Humaniz. Comput.
**2021**, 12, 6117–6127. [Google Scholar] [CrossRef] - Xing, X.; Xie, L.; Meng, H. Cooperative energy management optimization based on distributed MPC in grid-connected microgrids community. Int. J. Electr. Power Energy Syst.
**2019**, 107, 186–199. [Google Scholar] [CrossRef] - Yuan, D.; Lu, Z.; Zhang, J.; Li, X. A hybrid prediction-based microgrid energy management strategy considering demand-side response and data interruption. Int. J. Electr. Power Energy Syst.
**2019**, 113, 139–153. [Google Scholar] [CrossRef] - Ouammi, A.; Achour, Y.; Zejli, D.; Dagdougui, H. Supervisory model predictive control for optimal energy management of networked smart greenhouses integrated microgrid. IEEE Trans. Autom. Sci. Eng.
**2019**, 17, 117–128. [Google Scholar] [CrossRef] - Mbungu, N.T.; Bansal, R.C.; Naidoo, R.M.; Bettayeb, M.; Siti, M.W.; Bipath, M. A dynamic energy management system using smart metering. Appl. Energy
**2020**, 280, 115990. [Google Scholar] [CrossRef] - Bingham, R.D.; Agelin-Chaab, M.; Rosen, M.A. Whole building optimization of a residential home with pv and battery storage in the Bahamas. Renew. Energy
**2019**, 132, 1088–1103. [Google Scholar] [CrossRef] - Shakeri, M.; Shayestegan, M.; Reza, S.S.; Yahya, I.; Bais, B.; Akhtaruzzaman, M.; Sopian, K.; Amin, N. Implementation of a novel home energy management system (hems) architecture with solar photovoltaic system as supplementary source. Renew. Energy
**2018**, 125, 108–120. [Google Scholar] [CrossRef] - Nemati, M.; Braun, M.; Tenbohlen, S. Optimization of unit commitment and economic dispatch in microgrids based on genetic algorithm and mixed integer linear programming. Appl. Energy
**2018**, 210, 944–963. [Google Scholar] [CrossRef] - Silva, B.N.; Han, K. Mutation operator integrated ant colony optimization based domestic appliance scheduling for lucrative demand side management. Future Gener. Comput. Syst.
**2019**, 100, 557–568. [Google Scholar] [CrossRef] - Hafeez, G.; Alimgeer, K.S.; Wadud, Z.; Khan, I.; Usman, M.; Qazi, A.B.; Khan, F.A. An innovative optimization strategy for efficient energy management with day-ahead demand response signal and energy consumption forecasting in smart grid using artificial neural network. IEEE Access
**2020**, 8, 84415–84433. [Google Scholar] [CrossRef] - Shuja, S.M.; Javaid, N.; Khan, S.; Akmal, H.; Hanif, M.; Fazalullah, Q.; Khan, Z.A. Efficient scheduling of smart home appliances for energy management by cost and PAR optimization algorithm in smart grid. In Proceedings of the Workshops of the International Conference on Advanced Information Networking and Applications, Matsue, Japan, 27–29 March 2019; Springer: Cham, Switzerland, 2019; pp. 398–411. [Google Scholar]
- Ayub, S.; Ayob, S.M.; Tan, C.W.; Ayub, L.; Bukar, A.L. Optimal residence energy management with time and device-based preferences using an enhanced binary grey wolf optimization algorithm. Sustain. Energy Technol. Assess.
**2020**, 41, 100798. [Google Scholar] [CrossRef] - Shuja, S.M.; Javaid, N.; Rafique, M.Z.; Qasim, U.; Khan, R.F.M.; Butt, A.A.; Hanif, M. Towards efficient scheduling of smart appliances for energy management by candidate solution updation algorithm in smart grid. In Proceedings of the International Conference on Advanced Information Networking and Applications, Matsue, Japan, 27–29 March 2019; Springer: Cham, Switzerland, 2019; pp. 67–81. [Google Scholar]
- Liu, Y.; Yang, C.; Jiang, L.; Xie, S.; Zhang, Y. Intelligent edge computing for IoT-based energy management in smart cities. IEEE Netw.
**2019**, 33, 111–117. [Google Scholar] [CrossRef] - Choi, J.S. A hierarchical distributed energy management agent framework for smart homes, grids, and cities. IEEE Commun. Mag.
**2019**, 57, 113–119. [Google Scholar] [CrossRef] - Ding, Y.; Xie, D.; Hui, H.; Xu, Y.; Siano, P. Game-Theoretic Demand Side Management of Thermostatically Controlled Loads for Smoothing Tie-line Power of Microgrids. IEEE Trans. Power Syst.
**2021**, 36, 4089–4101. [Google Scholar] [CrossRef] - Longe, O.M.; Ouahada, K.; Rimer, S.; Harutyunyan, A.N.; Ferreira, H.C. Distributed Demand Side Management with Battery Storage for Smart Home Energy Scheduling. Sustainability
**2017**, 9, 120. [Google Scholar] [CrossRef][Green Version] - Ali, S.; Khan, I.; Jan, S.; Hafeez, G. An Optimization Based Power Usage Scheduling Strategy Using Photovoltaic-Battery System for Demand-Side Management in Smart Grid. Energies
**2021**, 14, 2201. [Google Scholar] [CrossRef] - Nadeem, F.; Aftab, M.A.; Hussain, S.M.; Ali, I.; Tiwari, P.K.; Goswami, A.K.; Ustun, T.S. Virtual power plant management in smart grids with XMPP based IEC 61850 communication. Energies
**2019**, 12, 2398. [Google Scholar] [CrossRef][Green Version] - Zhao, C.; Chen, J.; He, J.; Cheng, P. Privacy-preserving consensus-based energy management in smart grids. IEEE Trans. Signal Process.
**2018**, 66, 6162–6176. [Google Scholar] [CrossRef] - Je, S.-M.; Huh, J.-H. Estimation of future power consumption level in smart grid: Application of fuzzy logic and genetic algorithm on big data platform. Int. J. Commun. Syst.
**2021**, 34, e4056. [Google Scholar] [CrossRef] - Taheri, S.S.; Seyedshenava, S.; Mohadesi, V.; Esmaeilzadeh, R. Improving Operation Indices of a Micro-grid by Battery Energy Storage Using Multi Objective Cuckoo Search Algorithm. Int. J. Electr. Eng. Inform.
**2021**, 13, 132–151. [Google Scholar] - Chen, J.; Zhu, Q. A Stackelberg game approach for two-level distributed energy management in smart grids. IEEE Trans. Smart Grid
**2017**, 9, 6554–6565. [Google Scholar] [CrossRef] - Förderer, K.; Ahrens, M.; Bao, K.; Mauser, I.; Schmeck, H. Towards the modeling of flexibility using artificial neural networks in energy management and smart grids: Note. In Proceedings of the Ninth International Conference on Future Energy Systems, Karlsruhe, Germany, 12–15 June 2018; pp. 85–90. [Google Scholar]
- Misra, S.; Mondal, A.; Banik, S.; Khatua, M.; Bera, S.; Obaidat, M.S. Residential energy management in smart grid: A Markov decision process-based approach. In Proceedings of the 2013 IEEE International Conference on Green Computing and Communications and IEEE Internet of things and IEEE Cyber, Physical and Social Computing, Beijing, China, 20–23 August 2013; pp. 1152–1157. [Google Scholar]
- Andrade, I.; Pena, R.; Blasco-Gimenez, R.; Riedemann, J.; Jara, W.; Pesce, C. An Active/Reactive Power Control Strategy for Renewable Generation Systems. Electronics
**2021**, 10, 1061. [Google Scholar] [CrossRef] - El-Zonkoly, A.M. Optimal energy management in smart grids including different types of aggregated flexible loads. J. Energy Eng.
**2019**, 145, 04019015. [Google Scholar] [CrossRef] - Hafeez, G.; Islam, N.; Ali, A.; Ahmad, S.; Usman, M.; Alimgeer, K.S. A modular framework for optimal load scheduling under price-based demand response scheme in smart grid. Processes
**2019**, 7, 499. [Google Scholar] [CrossRef][Green Version] - Campagna, N.; Caruso, M.; Castiglia, V.; Miceli, R.; Viola, F. Energy Management Concepts for the Evolution of Smart Grids. In Proceedings of the 2020 8th International Conference on Smart Grid (icSmartGrid), Paris, France, 17–19 June 2020; pp. 208–213. [Google Scholar]
- Sharifi, A.H.; Maghouli, P. Energy management of smart homes equipped with energy storage systems considering the PAR index based on real-time pricing. Sustain. Cities Soc.
**2019**, 45, 579–587. [Google Scholar] [CrossRef] - Rahim, S.; Javaid, N.; Ahmad, A.; Khan, S.A.; Khan, Z.A.; Alrajeh, N.; Qasim, U. Exploiting heuristic algorithms to efficiently utilize energymanagement controllers with renewable energy sources. Energy Build.
**2016**, 129, 452–470. [Google Scholar] [CrossRef] - Neural Network Models. Available online: https://otexts.com/fpp2/nnetar.html (accessed on 7 September 2020).
- Ahmad, A.; Javaid, N.; Guizani, M.; Alrajeh, N.; Khan, Z.A. An accurate and fast converging short-term load forecasting model for industrial applications in a smart grid. IEEE Trans. Ind. Inform.
**2017**, 13, 2587–2596. [Google Scholar] [CrossRef] - Niedźwiecki, M.; Ciołek, M. Identification of nonstationary multivariate autoregressive processes-comparison of competitive and collaborative strategies for joint selection of estimation bandwidth and model order. Digit. Signal Process.
**2018**, 78, 72–81. [Google Scholar] [CrossRef] - Solar Resource Data. Available online: https://pvwatts.nrel.gov/pvwatts.php (accessed on 12 October 2020).
- Gensler, A.; Henze, J.; Sick, B.; Raabe, N. Deep Learning for solar power forecasting—An approach using AutoEncoder and LSTM Neural Networks. In Proceedings of the 2016 IEEE International Conference on Systems, Man, and Cybernetics (SMC), Budapest, Hungary, 9–12 October 2016; pp. 002858–002865. [Google Scholar]
- Pulipaka, S.; Kumar, R. Comparison of som and conventional neural network data division for pv reliability power prediction. In Proceedings of the 2017 IEEE International Conference on Environment and Electrical Engineering and 2017 IEEE Industrial and Commercial Power Systems Europe (EEEIC/I&CPS Europe), Milan, Italy, 6–9 June 2017; pp. 1–5. [Google Scholar]
- Alzahrani, A.; Shamsi, P.; Dagli, C.; Ferdowsi, M. Solar irradiance forecasting using deep neural networks. Procedia Comput. Sci.
**2017**, 114, 304–313. [Google Scholar] [CrossRef] - Engelbrecht, A.P. Computational Intelligence: An Introduction; John Wiley & Sons: Hoboken, NJ, USA, 2007. [Google Scholar]
- Amjady, N.; Keynia, F.; Zareipour, H. Short-term load forecast of microgrids by a new bilevel prediction strategy. IEEE Trans. Smart Grid
**2010**, 1, 286–294. [Google Scholar] [CrossRef] - Hu, Y.-L.; Chen, L. A nonlinear hybrid wind speed forecasting model using LSTM network, hysteretic ELM and Differential Evolution algorithm. Energy Convers. Manag.
**2018**, 173, 123–142. [Google Scholar] [CrossRef] - Lin, K.-P.; Pai, P.-F.; Ting, Y.-J. Deep belief networks with genetic algorithms in forecasting wind speed. IEEE Access
**2019**, 7, 99244–99253. [Google Scholar] [CrossRef] - Wang, Y.; Shen, Y.; Mao, S.; Cao, G.; Nelms, R.M. Adaptive learning hybrid model for solar intensity forecasting. IEEE Trans. Ind. Inform.
**2018**, 14, 1635–1645. [Google Scholar] [CrossRef] - Ullah, K.; Hafeez, G.; Khan, I.; Jan, S.; Javaid, N. A multi-objective energy optimization in smart grid with high penetration of renewable energy sources. Appl. Energy.
**2021**, 299, 117104. [Google Scholar] [CrossRef] - Chang, G.; Lu, H.; Chang, Y.; Lee, Y. An improved neural network-based approach for short-term wind speed and power forecast. Renew. Energy
**2017**, 105, 301–311. [Google Scholar] [CrossRef] - Griesshaber, W.; Sick, F. Simulation of Hydrogen–Oxygen–Systems with PV for the Self-Sufficient Solar House; FhG-ISE: Freiburg im Breisgau, Germany, 1991. (In Germany) [Google Scholar]
- Havre, K.; Borg, P.; Tommerberg, K. Modeling and control of pressurized electrolyzer for operation in stand alone power systems. In Proceedings of the Second Nordic Symposium on Hydrogen and Fuel Cells for Energy Storage, Helsinki, Finland, 19–20 January 1995; pp. 63–78. [Google Scholar]
- Vanhanen, J. On the Performance Improvements of Small-Scale Photovoltaic-Hydrogen Energy Systems. Ph.D. Thesis, Helsinki University of Technology, Espoo, Finland, 1996. [Google Scholar]
- Hug, W.; Divisek, J.; Mergel, J.; Seeger, W.; Steeb, H. Highly efficient advanced alkaline electrolyzer for solar operation. Int. J. Hydrog. Energy
**1992**, 17, 699–705. [Google Scholar] [CrossRef] - Zhou, L.; Zhou, Y. Determination of compressibility factor and fugacity coefficient of hydrogen in studies of adsorptive storage. Int. J. Hydrog. Energy
**2001**, 26, 597–601. [Google Scholar] [CrossRef] - Nascimento, M.A.R.; Rodrigues, L.O.; Santos, E.C.; Gomes, E.E.B.; Dias, F.L.G.; Velásques, E.I.G.; Carrillo, R.A.M. Micro gas turbine engine: A review. Prog. Gas Turbine Perform.
**2013**, 5, 107–141. [Google Scholar] - Aslam, S.; Javaid, N.; Asif, M.; Iqbal, U.; Iqbal, Z.; Sarwar, M.A. A mixed integer linear programming based optimal home energy management scheme considering gridconnected microgrids. In Proceedings of the 14th International Wireless Communications & Mobile Computing Conference (IWCMC), Limassol, Cyprus, 25–29 June 2018; pp. 993–998. [Google Scholar]
- Shirazi, E.; Jadid, S. Optimal residential appliance scheduling under dynamic pricing scheme via hemdas. Energy Build.
**2015**, 93, 40–49. [Google Scholar] [CrossRef] - Aslam, S.; Herodotou, H.; Mohsin, S.M.; Javaid, N.; Ashraf, N.; Aslam, S. A survey on deep learning methods for power load and renewable energy forecasting in smart microgrids. Appl. Energy
**2021**, 144, 110992. [Google Scholar]

References | Sources | Storage | Objective(s) | Proposed Algorithm |
---|---|---|---|---|

[14] | RES + CG | ESS + MGT | Reducing PAR, minimizing cost, maximizing user comfort | MILP |

[15] | RES + CG | ESS | Minimizing cost and PAR | Game-theory framework |

[16] | RES + CG | ESS | Reducing electricity cost | MILP |

[17] | RES + CG | ESS | Reducing electricity cost | MILP |

[18] | RES + CG | ESS | Short term energy demands | PGCC and MILP |

[19] | RES + CG | ESS | Issues faced by prosumer | PEMS and MILP |

[20] | RES + CG | ESS | Saving consumer cost | MILP |

[21] | RES + CG | ESS | Electricity price varying | MPC |

[22] | RES + CG | ESS | Minimizing electricity cost | PI and ANFIS |

[23] | RES + CG | ESS | Minimizing electricity cost | DMPC |

[24] | RES + CG | ESS | Reducing electricity cost | MPC |

[25] | RES + CG | ESS | Reducing green house gases emissions | MPC |

[26] | RES + CG | ESS | Energy-saving and gain | MPC |

[27] | RES + CG | ESS | Carbon emission, energy consumption and reducing electricity cost | GA |

[28] | RES + CG | ESS | Cost minimization, maximize comfort level | Control algorithm |

[29] | RES + CG | ESS | Minimizing cost and PAR and economic dispatch | GA and MILP |

[30] | RES + CG | ESS | Minimizing PAR and cost | ACO algorithm |

[31] | Reducing PAR cost, and consumer delay time | GmEDE | ||

[32] | RES + CG | ESS | Minimizing electricity cost | FA |

[33] | RES + CG | ESS | Minimize cost and high level of user satisfaction | GWASA |

[34] | RES + CG | ESS | Reducing PAR and increase user comfort level | CSUA |

[49] | RES + CG | ESS | Minimizing cost and PAR | GA, GWO, mEDE and GmGWO |

[50] | RES + CG | ESS | Issues of EVs integration smart grid | DES |

[35] | RES + CG | ESS | Cost minimization | IoT-based system |

[51] | RES + CG | ESS | Minimizing cost and reducing PAR | Aquifer Thermal Energy Storage (ATES) |

[36] | RES + CG | ESS | Reducing electricity cost | Hierarchical architecture |

[37] | RES + CG | ESS | TCLs electricity consumption scheduling and minimizing RES fluctuation | Game-Theoretic Demand Side Management |

[52] | RES + CG | ESS + BES | Minimizing cost and PAR | GA and PSO and ACO |

[38] | RES + CG | ESS | Minimizing cost and User comfort level | Distributed storage strategy |

[39] | RES + CG | ESS | Minimizing cost and PAR | HGACO |

[40] | RES + CG | ESS | VPPM | XMPP based IEC 61850 communication |

[41] | RES + CG | ESS | Accurate data for state changing | Privacy-preserving technique |

[42] | RES + CG | ESS | Predicting future energy demands using GA | Game-theory based fuzzy logic |

[43] | RES + CG | ESS | BES on the functioning of power systems | CSA |

[44] | RES + CG | ESS | Maximizing their payoffs | Stackelberg game theoretic framework |

[45] | RES + CG | ESS | Energy flexibility of distributed energy resources | ANN |

[46] | RES + CG | ESS | Lowering Consumer’s electricity cost | MDP |

[47] | RES + CG | ESS | Reactive islanded power flow | PCC |

[48] | RES + CG | ESS | Energy Balance and flexible loads | Multilayer individual-based optimization algorithm |

Technique | Parameters | Values |
---|---|---|

Number of Ants | 15 | |

Maximum number of Iterations | 250 | |

Ant Colony Optimization | Evaporation Rate | 7 |

Pheromone Factor | 3 | |

Stopping criteria | When Maximum iteration reached |

Category | Appliance | EST (h) | LFT (h) | LOT (h) | Power (kw) |
---|---|---|---|---|---|

Dishwasher | 09:00 | 17:00 | 7 | 2.4 | |

Dryer | 13:00 | 18:00 | 5 | 2.5 | |

Electrically Controllable Appliances | Washing Machine | 09:00 | 17:00 | 8 | 2 |

Pump | 12:00 | 19:00 | 9 | 1 | |

EV | 18:00 | 8:00 | 15 | 3.5 | |

Thermostatically Controllable Appliances | Heater | 09:00 | 19:00 | 6 | 2.4 |

Fridge | 00:00 | 24:00 | 24 | 0.5 | |

Freezer | 09:00 | 20:00 | 10 | 0.3 | |

AC | 08:00 | 16:00 | 3 | 0.7 | |

Optically Controllable Appliances | Lighting | 19:00 | 24:00 | 6 | 0.84 |

Category | Appliances | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

ECAs | Dish Washer | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 1 |

Dryer | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | |

Cloth Washer | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | |

Pump | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | |

EV | 1 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 0 | |

TCAs | Heater | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 |

Fridge | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | |

Freezer | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | |

AC | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | |

OCAs | Lighting | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).