A Hybrid Heuristic Algorithm for Energy Management in Electricity Market with Demand Response and Distributed Generators

: Optimal energy management trends are indispensable in improving the power grid’s reliability. However, power usage scheduling for energy management (EM) poses several challenges on a practical and technical level. This paper develops an energy consumption scheduler (ECS) to solve the power usage scheduling problem for optimal EM and overcome the major challenge in demand response (DR) implementation. This work aims to solve the power usage scheduling problem for EM to optimize utility bill, peak energy demand, and pollution emission while considering the varying pricing signal, distributed generators (DGs), household load, energy storage batteries, users, and EUC constraints. The ECS is based on a stochastic algorithm (genetic wind-driven optimization (GWDO) algorithm) because generation, DGs, demand, and energy price are stochastic and uncertain. The ECS based on the GWDO algorithm determines the optimal operation schedule of household appliances and batteries charge/discharge for a day time horizon. The developed model is analyzed by conducting simulations for two cases: home is not equipped with DGs, and home is equipped DGs in terms of utility bill, peak energy demand, and pollution emission. The simulation results validated the proposed model’s applicability to EM problems.


Introduction
Due to technology and population growth, the energy demand is growing rapidly worldwide [1].Mostly, energy generation is fossil fuel-based, which is costly and produces almost 27% carbon emissions after transportation [2].Therefore, distributed generators (DGs) are introduced in the power system for power generation to avoid such problems, which are dangerous for the environment and can lead to global warming [3][4][5][6].However, DGs, especially renewable DGs, are intermittent, and their generation is unstable [7][8][9].To overcome the fluctuations and smooth out generation from DGs, the integration of energy storage systems (ESSs) and electric vehicle driving modes are needed [10][11][12][13][14].This becomes possible with emanation of smart power grid (SPG), which combines the traditional grid and ICT [15].The SPG accommodates renewable, distributed, and hybrid generations and enables a two-way power and communication flow [16].
The SPG intelligently engages end-users and electric utility companies (EUCs) in electricity markets to exchange information and electricity actively in real-time [17].The intelligent engagement of consumers and EUCs in the electricity market is beneficial for both consumers and EUCs because it provides cheaper, green, and sustainable energy [18,19].Recently, different optimization techniques have been introduced to ensure consumers' active participation in the electricity market for various objectives such as operational cost, pollution emission, availability of DGs, user comfort, etc. [20][21][22][23].
The frameworks mentioned above are vital for solving EM via optimal scheduling in SPG.However, each framework has its own characteristics and constraints, and is appropriate for specific problems, objectives, and assumptions.Additionally, no framework exists that is perfect in all aspects, and can simultaneously cater conflicting objectives.Thus, a model is needed that solves the EM problem and caters simultaneously conflicting objectives.In this regard, a system model is proposed based on a novel algorithm, a genetic wind-driven optimization (GWDO) algorithm, for EM problems.The developed model simultaneously caters to energy cost, PAR, carbon emissions, and discomfort minimization.Additionally, the generation of DGs is intermittent, making it more challenging to handle.Thus, ESS is integrated with DGs to overcome the problem of energy generation fluctuations and meet the need of the load smoothly.The consumer's load is classified as interruptible portable, uninterruptible portable, and has consistent applications for participating in the DR to solve the EM problem.For validation and applicability, the proposed GWDO-based ECS is compared with the existing heuristic algorithms such as GA, particle swarm optimization (PSO), bacterial foraging algorithm (BFA), ant colony optimization (ACO), and wind driven optimization (WDO) in aspects of solving energy problems.Due to architectural similarities, newly designed hybrid algorithms such as genetic particle swarm optimization (GPSO), genetic bacterial foraging algorithm (GBFA), and genetic ant colony optimization (GACO) are also used as benchmarks.The proposed system model simulations are carried out in two scenarios: in the first scenario, the home is not equipped with DGs, and in the second scenario, the home is equipped with DGs.The findings reveal that the proposed GWDO-based ECS outperforms the existing algorithms in solving EM problems.
The remaining paper is arranged as: Related work is discussed in Section 2. In Section 3, the developed framework for electricity market EM is presented.The overall problem formulation and mathematical modeling are briefly discussed in Section 4. The simulation results for two scenarios are presented in Section 5. Finally, the paper is concluded in Section 6.

Related Work
In the literature, the demand response (DR) and incline block tariff (IBT) concepts [24,25] considering DGs are introduced for energy management (EM) via shifting and curtailing loads during peak hours to avoid extra economic costs [26][27][28].However, before EM load forecasting, human-factors identification in driving, and transmission resilience enhancement are indispensable [29][30][31].Similarly, optimization algorithms are presented for EM problems in [32][33][34][35].The authors used a heuristic forward-backward algorithm for optimizing thermal appliances to curtail peak energy consumption [36][37][38][39].However, measurement applications and transmission system faults [40,41] are ignored.The genetic algorithm (GA) is used to solve EM problems for cost and discomfort minimization [42,43].An ESS is integrated with photovoltaic (PV) to solve the EM problem in [44,45].Likewise, an optimization strategy is introduced for scheduling appliances to optimize the operational cost and peak-to-average demand ratio (PADR) [46].Moreover, the power usage scheduling problem is solved by engaging consumers from commercial and residential areas [47].The EM considering DGs is performed via a particle swarm optimization technique to reduce the PADR and cost [48][49][50].However, vehicle driving modes and charging/discharging scheduling are not addressed [51][52][53][54].In [55], the power usage problem is solved using real-time pricing and IBT for peak energy consumption and user discomfort minimization.An automation system is introduced to improve buildings' efficiency, allowing consumers to control and monitor consumption in [56,57].A literature review pertinent to the topic is conducted, and some existing literature studies are discussed in detail.For example, in research studies [58], authors proposed a multi-integer linear programming technique for PADR reduction.The results illustrate that the PADR is reduced by 49%, and the net energy cost is reduced by 45% compared to the base case.A demand-side management (DSM) strategy based on GA, binary particle swarm optimization (BPSO), WDO, and GPSO is developed in [59].The results illustrate that the electricity bills and PADR are reduced by 21.55% and 19.94%, respectively.However, the carbon emission reduction is ignored [60].The authors developed a model to solve an ongoing pollution routing problem and environment polarization characteristics in [61,62].The electricity cost and PADR with the user's discomfort minimization are solved using the Nash game theory-based optimization model in [63][64][65].The results illustrate that the electricity cost is reduced by 9.1% in the summer and 9.68% in the winter, respectively.Moreover, the PADR is reduced by 1.76% and 1.81% in the summer and winter seasons, respectively.However, an essential parameter, carbon emission, is ignored in this study.The ECS based on various optimization techniques such as GA, BPSO, WDO, etc., is presented in [66,67], which shows better results in terms of PADR and electricity cost reduction.The findings reveal that the electricity cost is reduced by 36% and PADR is reduced by 34%, respectively.However, the authors ignored user comfort and carbon emission, which are interdependent objectives [68][69][70][71][72].In our earlier works, enhanced differential evolution (EDE), and a hybrid algorithm of EDE and GA, namely EDGE, are developed in [73,74], respectively, to solve load scheduling problems in RE-integrated SPG.The developed model's performance is evaluated by comparing with BPSO, GA, WDO, and DE in perspectives of the utility bill, PADR, carbon emission, and user discomfort minimization.Likewise, in [75], the authors developed ACO to solve the DSM problem optimally using a flat pricing scheme (FPS) in SPG.The developed model outperforms MILP and W/O scheduling cases in the utility bill, carbon emission, and PADR alleviation perspectives.The authors in [76] develop a PSO-based super twisting sliding mode controller to balance the consumer demand according to the generation using dynamic pricing.An intelligent framework based on genetic and binary particle swarm optimization algorithm is developed in [77] for DSM in SPG.Similarly, an intelligent framework based on GACO is proposed in [78] for the energy optimization of renewable integrated SPG.A two-stage framework is developed in [79], where the electric load is forecasted for efficient EM in SPG.In [80], RESs are integrated with SPG to solve the DSM problem.The authors in [81] introduce the DR program in SPG to solve the DSM problem.Refs.[77][78][79][80][81], solve the DSM problem with the aim to minimize energy cost, carbon emission, user comfort, and PADR.Likewise, the authors develop control approaches in [82,83] to solve energy and load balancing problems in SPG and data centers, respectively, with the aim to minimize energy costs.The proposed model is compared with existing models in aspects of techniques, objectives, scenarios, and pricing schemes in Table 1.

Proposed System Model for Optimal Energy Management
This work proposes an efficient ECS based on the GWDO algorithm for optimal EM, considering DR and DGs with load flexibility.The developed model has two modules: (i) distribution system operator, and (ii) DSM.The developed framework is a cascaded framework, where the first module's output is the next module's input.The developed model implementation for the optimal EM requires identifying the influencing parameters and factors.The factors influencing optimal EM include DG profiles, DR, geological data, environment situation, ESSs, load flexibility, users, EUC constraints, etc.However, considering all the influencing factors would make the system's process more complex and affect the performance.Therefore, DGs, DR, ESS, load profiles, and consumer flexibility are considered.The AMI of the developed model will receive data about energy consumption and DR.The AMI will regulate the energy price signal and deliver it to ECS.The GWDO-based ECS algorithm installed at the module will utilize users' energy consumption pattern and price signal delivered by the AMI for optimal EM via power usage scheduling.The schematic diagram of the proposed model is shown in Figure 1.A detailed discussion of the proposed system model is given below.

Distribution System Operator Module with Advance Communication Infrastructure
The distribution system operator (DSO) provides an advanced communication infrastructure, i.e., AMI.The AMI consists of a data concentrator, communication module, and meter data management system.The communication module has two further modules: one on the consumer side and the other on the DSO side.The communication modules are connected to smart meters and are responsible for delivering and updating user energy consumption data.The energy usage data is received by the data concentrator and then regulated to the meter data management system for further processing.Here, the meter data management analyzes the user's energy consumption, processes the data to extract useful information, and then communicates this data to the DSO.This real-time sharing of information with the DSO empowers them to maintain, improve and detect power outages.The DSO is also responsible for regulating varying pricing signals.The ECS based on GWDO schedules the power usage pattern of users to minimize peak energy consumption, cost, PADR, user discomfort, and carbon emissions by efficiently utilizing DGs.Thus, the role of AMI is a communication system between DSO and end users.

Demand Side Management Module
The DSM module have smart meter, a GWDO-based ECS, an in-home display, home appliances, and a computer control unit.The smart meter receives data from DSO and establishes and maintains communication with the supply side.Its role is to collect the users' energy consumption data and communicate it with DSO, acting as a gateway to the demand side.The smart meter also receives the data from the DSO like an energy pricing signal and then communicates it to the ECS and later broadcasts this data to the in-home display.The GWDO-based ECS collects the energy pricing signal, power ratings of the appliances, energy consumption pattern, and priority set by the user and schedules the power usage pattern of home appliances for optimal EM.Moreover, the priority and consumption pattern of the appliances can be adjusted or can be changed by the user via a user interface such as an in-home display, etc.
The overall load of the consumer is divided into three categories: portable interruptible, portable uninterruptible, and consistent.The appliances' power ratings and operation time are shown in Table 2.The overall set of appliances is represented by A r , where the further classification of application into the portable interruptible, portable uninterruptible, and consistent sets of appliances can be represented by A r pi , A r pni , A r c , respectively, whereas the operation time of the appliances is considered for the 24 h and represented by T = τ 1 , τ 2 , τ 3 . . .τ 24 .Portable interruptible appliances can be interrupted during operation and scheduled for operation at any possible time.This set includes personal computers, microwave ovens, cooking ranges, water pumps, and electric irons.Energy consumption per day ε r pi of portable interruptible set of appliances can be determined using Equation (1) taken from [80], where A r pi is the set of portable interruptible appliances, a r pi represents one appliance that belongs to A r pi , and λ r pi shows the power rating.
where A r pi appliances energy cost is mathematically modeled in Equation (3).The state of the appliance, i.e., ON/OFF [0 1], is represented by α(τ) and RTP signal by p(τ).The per hour and total operation costs are modeled in Equations ( 2) and (3), respectively [80].
where ς total r pi shows the total cost of portable interruptible appliances, A r pi denotes set of portable interruptible appliances, λ r pi shows the power rating, p(τ) represents the pricing signal, and α(τ) shows the ON/OFF status of appliances.

Portable Uninterruptible Load
Portable uninterruptible appliances can be operated anytime, but cannot be disturbed or stopped during the operation.Portable uninterruptible appliances include washing machines, blenders, etc.Energy consumption per hour is denoted by ε r pni , which is modeled in Equation ( 4), taken from [80].A r pni is the portable uninterruptible appliances set, a r pni is an appliance that belongs to A r pni , and the power rating is λ r pni .The net energy consumption is mathematically modeled in Equation (4), taken from [80].
The hourly and net energy costs of portable uninterruptible appliances are modeled in Equations ( 5) and (6), respectively [80].
Appliances that are consistently ON for 24 h a day and cannot be interrupted during their operation are considered consistent loads.The per hour energy consumption ε r c of a consistent load is modeled in Equation (7), where A r c is the set of portable uninterruptible appliances, a r c represents an appliance that belongs to A r c , and the power rating is denoted by λ r c .The total energy consumption is modeled in Equation ( 7) [80].
The hourly energy cost of consistent appliances is mathematically modeled in Equations ( 8) and ( 9), respectively [80].
The net load considered in this work is modeled in Equation (10).
The optimal energy consumption pattern obtained by the proposed algorithm-based ECS using a pricing signal is shown in Equation (11).

Problem Formulation and Numerical Modelling
Most EM frameworks consist of energy optimization strategies whose primary goal is minimizing the energy cost and PADR via consumer appliance scheduling.Additionally, the efficient utilization of DGs reduces the per-unit energy cost.In this section, we defined our optimization problem, focusing on reducing the per unit energy cost, PADR, and user discomfort and decreasing energy consumption with carbon emissions reduction.In this current work, we proposed a GWDO-based ECS, which simultaneously addresses and achieves all these objectives.Using our proposed framework, the consumers actively participate in DR programs to optimally schedule appliances that help to achieve the desired objectives.The detailed formulation is presented below.

Objective Function
This section discusses the objective function formulation to achieve the desired objectives such as minimization of energy cost, PADR, energy consumption, carbon emission, and user discomfort.These objectives can be achieved by scheduling the consumer's appliances into the off-peak hours using the GWDO-based ECS.The objective function in Equation ( 12) is modeled and defined as follows.

min(Cost
where Cost, CO 2 , Delay, and PADR represent cost, carbon emission, user discomfort, and PADR, respectively.As these objectives have different dimensional units, their addition is made possible by normalization, dimensionality, and a weighted sum approach subject to the constraints and goal of the optimization problem, as in [92].Each objective used in Equation ( 12) is defined separately as follows.
The energy cost is modeled and defined in Equation (13).It shows the cost paid by user for the consumed energy.
Equation ( 14) mathematically defines PADR, which is the ratio of peak load demand to average load demand.The PADR metric determines users' load operating during peak hours to show whether the users' load is high or low.Reducing PADR ensures efficient scheduling of appliances from peak hours to off-peak hours.Thus, shifting load from on-to off-peak hours leads to the minimization of energy cost, carbon emission, and peak energy consumption.
The CO 2 is carbon emission, defined in Equation ( 15), δ represents the energy price per kWh equal to USD 0.2, θ is a carbon emission factor equal to 0.37, and m is the number of months.
Delay used in Equation ( 12) represents the waiting time of an appliance after scheduling, which is defined in Equation (16).
The objective function defined in Equation ( 12) is subjected to the following constraints, which are defined as follows.
E min ≤ E ≤ E max ( 17) Equation (17) shows that home energy consumption must be bounded between the lower and upper limits E min and E max , respectively, which ensures that the peak loads and average loads cannot be the same.Equation (18) shows home energy consumption before and after the scheduling must be the same to ensure a fair comparison.Likewise, Equation (19) ensures that home energy consumption does not exceed the grid generation capacity, providing reliable power grid operation.Equation (20) illustrates that the length of appliances' operation time is not affected by the scheduling process, i.e., it must be the same before and after scheduling.

Solar Energy Generation System
A solar energy generation system is utilized to lower the dependence on the traditional power grid during peak hours for utility bill, pollution emission, and PADR alleviation.
The output of the solar energy generation system is calculated using Equation ( 21), as follows.
where P pv represents the hourly PV energy generation, η pv is the PV system efficiency, A pv is the area of the PV system, Irr(t) is variable representing solar irradiance, and Temp(t) shows outside temperature, respectively.

Energy Storage Systems
The overall stored energy (SE) in the ESS is mathematically represented by Equation ( 22), where ES max is the maximum level, and ES min is the minimum level of the ESS.Moreover, some limits are defined for the charging and discharging, and the depth of the charge is kept at 90%.SE shows the overall energy stored in ESS in the unit of Ah, charging, discharging state, and the efficiency of the ESS, ES dis , ES ch , and η ESS , respectively.

Proposed Genetic Wind Driven Optimization Algorithm
In the literature, many frameworks are proposed for optimal EM via power usage scheduling.In this work, a GWDO-based ECS is developed, which uses DR, consumer's power usage pattern, DGs, etc., to schedule consumers' power usage patterns.The GWDO algorithm is developed by combining key steps of two algorithms: WDO and GA.
The GA is a biologically inspired nonlinear algorithm.It leads to the selection of the upcoming living organisms with a capability best suited to the environment in which they will survive.The less suited to the environment will become extinct over the years.The genes are responsible for the characteristics of the organisms present in the chromosomes.Hence, the GA follows these steps for optimization through the biological process adopted for transferring genetic information and finding the best offspring suited for the environment using the fitness function of the optimization algorithm.The parent chromosomes in GA use crossover and mutation to transfer the information to the newly formed offspring.In the crossover step of the GA, two of the parent chromosomes mutually transfer genetic information randomly to selected points.In the mutation step, some randomly selected genes on the parent chromosome undergo a random change in the new offspring.The WDO algorithm is a heuristic optimization algorithm based on the movement of air particles in the environment.In the WDO algorithm, an N number of dimensional search space is produced, where an infinite number of air particles move, which is controlled by several forces known as gravitational, pressure gradient, frictional, and Coriolis.The mentioned forces are mainly responsible for several functions, as the gradient force is responsible for the shifting and moving forward of the air particles.In contrast, the frictional force is involved in resisting the forward direction movement.The gravitational force pulls the air particles into the origin, and the Coriolis force deflects the air particles into the atmosphere.The following Equations are used to calculate these forces, which act on the air particles.The Equations ( 26)-( 29) represent the pressure gradient, Coriolis, gravitational, and frictional forces respectively.
The proposed GWDO algorithm is a cascaded form of the genetic and WDO algorithms.Thus, the developed algorithm at the first stage has the complete steps and processes of the WDO algorithm.In the second stage, it employs crossover and mutation steps of the GA on the global best solution returned from the first stage.This development of the GWDO algorithm is because of the WDO algorithm's superior performance in reducing energy cost and maximizing user comfort.In contrast, the GA performs best in reducing PADR.Thus, the key steps of the WDO and GA are combined to obtain objectives: utility, PADR, and carbon emission reduction while improving user comfort.The GWDO algorithm is a type of optimization algorithm that is inspired by the principles of evolution of genetics (GA) and air parcels (WDO).In this work, GWDO is employed to solve the EM problem in the electricity market.The fitness function in a GWDO flowchart represents the objectives (energy cost, etc.) that the algorithm tries to optimize.In the context of EM, the fitness function may represent the cost of electricity.Mutation in a GWDO involves randomly changing the genes (parameters) of the solution candidates (chromosomes).In EM, mutation corresponds to changing the mix of the energy sources used to generate electricity.The selection of one offspring involves choosing the best solution candidate (chromosome) from the current generation to be passed on to the next generation.In the context of EM, selection may involve choosing the energy mix that results in the lowest cost of electricity while meeting the desired reliability requirements.In summary, the GWDO algorithm is used to optimize EM and electricity cost by using a fitness function to evaluate the quality of the solution candidates, using crossover and mutation to explore new solutions, and using selection to choose the best solution for the next generation.The complete setup-wise details of the GWDO algorithm are shown in Figure 2 and their parameters are listed in Table 3.

Simulations Results and Discussions
This section presents the simulation results and discusses the developed model for optimal EM via power usage scheduling.Our proposed system model simulations are carried out for two case studies: (a) home is not equipped with DGs, and (b) home is equipped with DGs.The load is served via a power supply from the EUC and DGs.These case studies are created to evaluate the validity and applicability of the proposed system model for achieving our desired objectives.Furthermore, the proposed GWDO-based ECS is compared with existing algorithms in aspects of optimal EM.In the proposed system model, we have considered six appliances as a load of the consumer, which are smart appliances connected via WiFi to the ECS.The GWDO algorithm-based ECS schedules the operation of smart appliances using an energy pricing signal considering consumer and EUC constraints.Distributed generations such as PV, WT, ESS, and DGs are shown in Figure 3.The RTP signal is depicted in Figure 4.

Case Study 1: Home Is Not Equipped with DGs
This case study considers that home is not equipped with DGs, and the home is only receiving power from SPG.The proposed GWDO-based ECS schedules consumers' appliances using RTP signal.The obtained results for all the objectives (energy cost, PADR, carbon emission, and user comfort) are compared with the benchmark algorithms, which are discussed in detail as follows.

Electricity Cost Optimization
Figure 5 depicts the net electricity cost consumed by the consumer's appliances having unscheduled loads without DGs for case study 1.In the case of the unscheduled load, the highest cost of electricity recorded is 70 cents in slots 9-10, and the combined electricity cost is 730 cents for 24 h.In PSO, the maximum energy cost is 65 cents at the 19-20, 21-22, and 23-24 time slots, whereas the combined 24 h slot is 638.In WDO, the maximum electricity cost recorded is 53 cents at the 8-9 time slot, and the 24 h combined cost is 646.While considering the results of ACO, it is 67 cents at the 7-8 h slot, and at 24 h it is 638.Similarly, BFA has 58 cents in the 21-22 time slot and 659 for 24 h.In GA, it is 56 cents within the time slot of 22-23 and 623 for 24 h.In GPSO, it is 48 cents within the time slot of 9-10, while in GACO, it is 49 cents in the 9-10 time slot.Additionally, in GBFA, it is 57 cents in the 8-9 time slot.In GWDO-based hourly electricity cost, the highest is 41 cents at a 9-10 h slot.Whereas 620, 601, 614, and 571 cents for GPSO, GACO, GBFA, and GWDO, respectively, for 24 h.
The execution of the GWDO algorithm while minimizing the electricity cost outperforms the benchmark heuristic algorithms, whether simple or hybrid.By evaluating simulations, the GWDO technique gives the best outcomes in terms of the average cost for 24 h, which is a 21.78% reduction compared with the case of unscheduled operation.Additionally, there is a 14.6%, 13.9%, 9.72%, 12.60%, 11.5%, 15%, 15.8%, and 17.6% reduction in case of GA, PSO, BFA, ACO, WDO, GPSO, GBFA, and GACO, respectively, compared with the unscheduled case.Moreover, GWDO also gave a low hourly peak electricity cost compared with other optimization algorithms: ACO, PSO, WDO, GA, BFA, GACO, GPSO, and GBFA.

PADR
Figure 6 shows the PADR of the consumer's appliances.The results show that our proposed GWDO algorithm-based ECS decreases PADR by 40.1% when compared with the case of the unscheduled load operation, whereas it is 27%, 11.8%, 32.3%, 16.3%, 23.7%, 19.2%, 5.3%, and 36.8% for cases of using the GA, PSO, BFA, ACO, WDO, GPSO, GBFA, and GACO, respectively.These algorithms are supposed to minimize the overall consumer load.The PSO, WDO, and BFA algorithms shifted more of the load to less electricity pricing time slots, resulting in rebound peaks.These new peaks in the time slots of 19-24 create instability in the power system and result in a penalty from the electricity supplier.However, the GWDO algorithms uniformly distribute the operation of the overall appliance and result in low PADR.The results show that our proposed GWDO algorithm-based ECS decreases carbon emissions by 15.25% when compared with the case of the unscheduled load operation, whereas 2.74%, 1.25%, 12.4%, 14.2%, 3.1%, 11%, 11.9%, and 8.8% for cases of using the GA, PSO, BFA, ACO, WDO, GPSO, GBFA, and GACO, respectively.

User Comfort
The user comfort is the delay faced by the appliance considered without DGs is depicted in Figure 8.The user comfort of our proposed GWDO-based ECS is set side by side with the existing algorithms, which are PSO, GA, ACO, WDO, BFA, GPSO, GBFA, and GACO.The overall delays in the operation of each appliance are shown in Figure 8, where the water heater faced the highest delay by using ACO, whereas the GBFA and BFAbased ECS gave zero delays.GWDO-based ECS delayed 0.4 h of the appliance's operation for the user.Additionally, in the case of the dishwasher, the GWDO-based ECS gave a 0.5-h delay, which is the lowest after the GBFA-based ECS.The overall average delay faced by the dishwasher for all algorithms is 0.63 h.In the case of the clothes dryer, our proposed GWDO-based ECS gave the lowest delay, which is 0.38 h, and the highest delay faced by the clothes dryer is in the case of using the GA-based ECS.In the case of the iron, the lowest delay faced is by using the BFA-based ECS, and the highest delay is recorded by using ACO, whereas the GWDO-based ECS gave a delay of 0.64 h.Additionally, the GBFA-based strategy gave the lowest delay time, and the GA-, PSO-, and ACO-based ECSs gave the highest delays.In the case of EV, the overall delay faced by EV in the case of all techniques is 1.15 h, where PSO and ACO gave the highest, and our proposed GWDO gave the lowest delay among all techniques.

Case Study 2: Home Is Equipped with DGs
Case study 2 considers that DGs are equipped with the home in addition to supply from the EUC.The proposed GWDO-based ECS schedules the consumers' load under a RTP signal using case study 2. The obtained results of case 2 with the developed model are compared with existing algorithms in aspects of energy cost, PADR, carbon emission, and user comfort.The complete discussion for case study 2 considering each objective is as follows.

Electricity Cost
Figure 9 shows the electricity cost of the consumer's load operation for the unscheduled and scheduled load by various optimization algorithms based on ECS for the case when DGs are equipped in the home.The unscheduled load operation gave a peak of 92 cents in the 9-10 h slot and 722 cents combined for 24 h of operation.In PSO, the maximum energy cost is 57 cents at the 9-10 time slot, whereas the combined 24 h is 602 cents.The WDO-based ECS gave 45 cents as a maximum hourly cost at the 9-10 time slot and a total energy cost of 649 cents in 24 h.Additionally, by using an ACO-based framework, it is 38 cents at the 7-8 h slot, and in 24 h, it is 639 cents.Whereas, in BFA, it is 48 cents in the 23-24 time slot and 678 cents for 24 h.In GA, it is 58 cents within the time slot of 9-10 and 643 cents for 24 h.In GPSO, it is 41 cents within the time slot of 9-10, while in GACO, it is 53 cents in the 8-9 time slot.Additionally, in GBFA, it is 64 cents in the 8-9 time slot.In GWDO-based hourly electricity cost, the highest is 43 cents at the 8-9 h slot.
The GWDO-based ECS outperforms the existing techniques for ECS in terms of average electricity cost minimization for 24 h.The GWDO technique's average cost for 24 h is 537 cents and is 26.43% reduced compared to the unscheduled operation.Additionally, there is a 11.9%, 17.5%, 7.1%, 12.4%, 11%, 14.1%, 15.6%, and 16.8% reduction in the cases of GA, PSO, BFA, ACO, WDO, GPSO, GBFA, and GACO, respectively, when comparing with the unscheduled case.

PADR
The PADR for case study 2, where RES and ESS are equipped with the home in addition to the EUC, is shown in Figure 10.The results show that the proposed algorithm reduces PADR by 40.1%, whereas PSO, GA, ACO, BFA, WDO, GBFA, GPSO, and GACO limit the PADR by 27%, 11.8%, 32.3%, 16.3%, 23.7%, 19.26%, 5.3%, and 36.8%,respectively, and the GWDO algorithm-based ECS consistently scheduled the consumer's appliances to attain the objective of reducing the PADR.

Carbon Emission
The carbon emissions of the unscheduled and scheduled appliances using the heuristic algorithms are shown in Figure 11.The hourly peak emissions were recorded by the unscheduled case, which is 144 pounds at the 18th time slot, and the combined 24 h carbon emissions are 2372 pounds.The GA, PSO, BFA, ACO, WDO, GPSO, GBFA, and GACO gave peak emissions of 117 pounds at the 19th hour slot, 132 pounds at the 19th hour slot, 127 pounds at time slot 19, 100 pounds, 130 pounds at time slot 19, 104 pounds at time slot 19 and 107 pounds at time slot 19, respectively.Our proposed GWDO-based ECS gave the lowest carbon emissions peak among these techniques, which is 88 pounds at time slot 19.Comparing the combined emissions for 24 h with unscheduled, our proposed ECS reduced carbon emissions by 33.8%.The rest of the benchmarks techniques reduced carbon emissions by 18.8%, 8.2%, 13.3%, 28.7%, 26.4%, 25%, 28.4%, and 28.1% for GA, PSO, BFA, ACO, WDO, GPSO, GBFA, and GACO, respectively.

User Comfort
Appliances' scheduling by our proposed system model consisting of a GWDO-based ECS is evaluated and compared with the existing algorithms' ECSs, which are GA, PSO, BFA, ACO, WDO, GPSO, GBFA, and GACO.The user comfort is the delay appliances face while users operate with DGs, as shown in Figure 12.The overall delays in the operation of each appliance are shown in Figure 12, where the water heater faced the highest delay by using ACO, which is 1.4 h, and zero delay time for the cases of the GA, BFA, and GPSO.However, GWDO gave a delay time of 0.5 h for the water heater.In the case of the dishwasher, the WDO and BFA algorithms gave a delay of zero, and the highest delay was recorded using the GA algorithm.In the case of the clothes dryer, our proposed GWDO-based ECS gave the lowest delay, which is 1.1 h after the GBFA algorithm, and the highest delay faced by the clothes dryer is in the case of using GA-based ECS, which is 1.6.In the case of the iron, the lowest delay faced is by using the GWDO-based ECS, and the highest delay is recorded by using GA, PSO, and GBFA.In the case of EV, the overall delay faced by EV in the case of all techniques is 1 h, where GA gave the highest, and our proposed GWDO gave a delay of 1 h.Furthermore, our proposed framework based on the GWDO algorithm notably minimized the average delay of all the user's appliances compared to the parent algorithms, which are the GA and WDO algorithms.Thus, the GWDO-based ECS effectively increased user comfort compared to all the other benchmark algorithms for all appliances combined.
The developed model is compared with existing models in aspects such as convergence speed, computational complexity, cost, carbon emission, and PADR.The obtained results are listed in Table 4. From the above discussion and evaluation, it is concluded that the developed model outperforms existing models and is suitable for solving EM problems from different perspectives.

Conclusions
In this work, an ECS was presented for home energy management in SPG.The formulated objective function (EM optimization problem) was solved using single and hybrid heuristic algorithms (GA, PSO, BFA, ACO, WDO, GPSO, GACO, and GBFA) along with a developed GWDO algorithm in aspects of chosen performance metrics.The simulations were conducted for two case studies: home is not equipped with DGs, and home is equipped with DGs, considering home appliances, pricing signals, and consumers and EUC constraints.The developed GWDO-based ECS optimally schedules consumers' appliances, and the returning results show that the electricity cost, PADR, and carbon emission are reduced by 21.78%, 40.1%, and 15.25% in case study 1; and by 26.43%, 40.1%, and 33.8% in case study 2, respectively.The results illustrate that the developed algorithm outperforms both single and hybrid algorithms in aspects of utility bill, PADR, pollution emission, and user comfort in both case studies.
In the future, real-time multi-criterion optimization problems will be solved using the Lyapunov technique by utilizing fog-and cloud-based environments to service the on-site events and requests of both EUC and consumers.

Figure 1 .
Figure 1.Developed framework for electricity market energy management.

Figure 4 .
Figure 4. Pricing signal for energy management.

Figure 6 .
Figure 6.Case study 1: PADR reduction.5.1.3.Carbon EmissionFigure 7 depicts the carbon emissions for the scheduled and unscheduled appliance operation when the supply is only from the electricity EUC.Where the GA algorithm-based

Table 2 .
Appliances specification and description.
Figure 2. Flowchart diagram of the overall energy management system model.

Table 4 .
Comparison of the proposed model with existing models from different perspectives.