{'fraction_non_alphanumeric': 0.025841690955408166, 'fraction_numerical': 0.008927546875358594, 'mean_word_length': 4.731912654564589, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimal Planning of Electrical Appliance of Residential Units in a Smart Home Network Using Cloud Services

One of the important aspects of realizing smart cities is developing smart homes/buildings and, from the energy perspective, designing and implementing an efficient smart home area energy management system (HAEMS) is vital. To be effective, the HAEMS should include various electrical appliances as well as local distributed/renewable energy resources and energy storage systems, with the whole system as a microgrid. However, the collecting and processing of the data associated with these appliances/resources are challenging in terms of the required sensors/communication infrastructure and computational burden. Thanks to the internet-of-things and cloud computing technologies, the physical requirements for handling the data have been provided; however, they demand suitable optimization/management schemes. In this article, a HAEMS is developed using cloud services to increase the accuracy and speed of the data processing. A management protocol is proposed that provides an optimal schedule for a day-ahead operation of the electrical equipment of smart residential homes under welfare indicators. The proposed system comprises three layers: (1) sensors associated with the home appliances and generation/storage units, (2) local fog nodes, and (3) a cloud where the information is processed bilaterally with HAEMS and the hourly optimal operation of appliances/generation/storage units is planned. The neural network and genetic algorithm (GA) are used as part of the HAEMS program. The neural network is used to predict the amount of workload corresponding to users’ requests. Improving the load factor and the economic efficiency are considered as the objective function that is optimized using GA. Numerical studies are performed in the MATLAB platform and the results are compared with a conventional method.


Introduction
Electricity/energy management systems involve a series of related programs used by the operator of the electric grid and its customers to improve the efficiency and performance of the power/energy systems [1,2]. In this way, both the electricity supplier and the consumer will benefit more [3]. The energy management helps to obviate the requirement of constructing new/costly power stations on the production side, and reduces the energy price and related penalties for consumers on the consumption side.
A significant portion of the energy produced by distributed and renewable energy resources is consumed locally, which improves the efficiency of electric grids. However, the control/management of the local inverter-interfaced energy resources and consumers

•
Artificial intelligence and heuristic methods may reach a local sub-optimal point due to the local search for problem-solving or the use of expert experiences [24]. Fuzzy control methods, [25,26], genetic algorithm (GA) [27], and particle swarm optimization (PSO) [28,29] are examples of this category. The performance of these methods depends on the user experience and is weak against system changes and probability. • Classical methods, on the other hand, are more complex but offer optimal and reliable solutions. For example, the linear integer linear programming method [30] has been used to optimize distributed generation sources' energy production and consumption to reduce common costs.
Further, smart apartments equipped with wind and solar-type generation units, storage batteries, and electric cars can be connected to the network; however, the important factor of common welfare and comfort has not been considered [31]. Also, a general model is used for building energy management that can optimize and compromise user convenience and the minimizing of energy costs. In this paper, the increasing use of grid-connected hybrid vehicles and their positive effects, such as not needing to consume fossil fuels and the use of energy stored in the vehicle to meet home consumption loads, have been considered. It is noteworthy that charging the battery of a significant number of vehicles is a big risk for the smart grid [32]. Simultaneous charging of batteries may cause a sudden overload of the distribution grid [32]. Especially if it coincides with the peak consumption time. This concurrence can cause congestion of the distribution grid. Thus, with proper planning, the destructive effects of electric vehicles can be reduced considerably [33]. In the optimal operation of home loads with electric vehicles and devices, energy storage has been done in response to the prices and the time of use. Energy storage and electric vehicles can interact and exchange energy between the smart home and the distribution network. However, the study was conducted without considering the sources of distributed production [34].
The primary purpose of this research is to provide an intelligent service for controlling the working schedule of home appliances in cloud computing to minimize the cost of electricity. Although this seems obvious and valuable even without using advanced technologies such as the cloud platform, the internet-of-things, and wireless sensor networks, implementing such a service would be efficient only with the provision of modern technologies. The main reason for this is that the timing of the activity of electrical devices will not be possible without the possibility of their automatic operation due to the urgent need for humans to control electrical devices. Today, however, due to introducing smart washing machines, smart dishwashers, and automatic vacuum cleaners, many tasks can be performed automatically with no human intervention. Second, with the internet-of-things, remote access to the home appliance is possible, and its control is also provided by central applications. Service in the cloud can implement this central control and management [35]. Monitoring the environment and specific tasks that will need to be more visible will require using environmental sensors as wireless sensor networks. Applications of wireless sensor networks in this regard, including technologies related to control and monitoring of children, sick people at home, aged care, and home temperature control, etc., require the use of networks of sensors. According to the source, the dynamic resource allocation mechanism in the supercomputer has been implemented [36].
In this work, an intelligent mechanism for dynamic allocation and management in the cloud is proposed to manage/allocate cloud services for the energy management system. The amount of daily demand for allocation of the virtual machines to each customer for the source's valid data is provided. Thus, implementation of the proposed service, given that it is implemented in a wireless manner using sensor networks and internet-ofthings platforms as the essential technologies, depends on the specialized allocation of resources in the supercomputer and scheduling algorithms. Further, the following factors are considered in the program for optimal operation of the electrical equipment of smart residential homes under welfare indicators: • Actual load profiles are used, whereas, in most articles, the average consumption of appliances has been used. Cloud service provides the computational/storage requirements to deal with large data; • Local renewable energy resources, such as solar-wind hybrid systems, with their generation profiles, are considered in the management program as part of the smart home network; • The battery energy storage systems are involved in the program and their optimal operation is determined including optimal charging and discharging at different tariffs; • Economics and load factor improvement are considered as the objective functions of the problem.

The System Description and Materials
The system under study, consisting of a smart home with electric appliances, is shown in Figure 1a. The proposed method, based on a three-layer HAEMS, as shown in Figure 1b, includes (1) The access layer or the layer in which the sensors and actuators are located. The terminals are responsible for collecting data from the sensors of the intelligent building system and appliances. The collected data are sent to the next layer (fog layer) via Wi-Fi. Then, any equipment that is a part of the building can manage the smart terminal (socket) in the same part. (2) The fog layer, in which all kinds of servers are located for computing and data storage; this sorter can easily manage the same batch layer of fog and avoid malfunctioning, and any input data can be stored in the data centre instantly. Then, using the received general data, a package of data is created to quickly issue the necessary decisions and commands based on the stored data to respond to the target equipment. (3) The cloud layer of the data centres that are controlled and monitored by HAEMS. To achieve the goal of optimizing the HAEMS process of the building system, the data packet is sent from the top layer. Therefore, it provides more data for decision-making.
In the third layer, the haze dots have an important feature of data processing capability compared to the second layer data, therefore it requires more data and connection to the cloud layer in our proposed model. Therefore, we can treat a point in the third layer as an independent unit from an intelligent building. The third layer is the cloud where the data received from fog layers are analyzed through the HAEMS and scheduled by GA and embedded neural networks. After planning, a smart insight into the first layer will emerge to optimize the status of the monitored points.

The System Description and Materials
The system under study, consisting of a smart home with electric appliances, is shown in Figure 1a. The proposed method, based on a three-layer HAEMS, as shown in Figure 1b, includes (1) The access layer or the layer in which the sensors and actuators are located. The terminals are responsible for collecting data from the sensors of the intelligent building system and appliances. The collected data are sent to the next layer (fog layer) via Wi-Fi. Then, any equipment that is a part of the building can manage the smart terminal (socket) in the same part. (2) The fog layer, in which all kinds of servers are located for computing and data storage; this sorter can easily manage the same batch layer of fog and avoid malfunctioning, and any input data can be stored in the data centre instantly. Then, using the received general data, a package of data is created to quickly issue the necessary decisions and commands based on the stored data to respond to the target equipment. (3) The cloud layer of the data centres that are controlled and monitored by HAEMS. To achieve the goal of optimizing the HAEMS process of the building system, the data packet is sent from the top layer. Therefore, it provides more data for decision-making. In the third layer, the haze dots have an important feature of data processing capability compared to the second layer data, therefore it requires more data and connection to the cloud layer in our proposed model. Therefore, we can treat a point in the third layer as an independent unit from an intelligent building. The third layer is the cloud where the data received from fog layers are analyzed through the HAEMS and scheduled by GA and embedded neural networks. After planning, a smart insight into the first layer will emerge to optimize the status of the monitored points.

Mean Squared Normalized Error (MSNE)
The normalized value of the mean squared error is the normalized amount of squared error, which is usually used to evaluate the predicted continuous values. The squared value of the error makes it possible to consider a penalty for a more significant error so that the difference between the simulated value and the actual value, considering a power of two, reflects the magnitude of the error. Hence, the performance is evaluated accurately by considering the magnitude of the error and not its direction. Also, by normalizing the mean squares of the error, the evaluation is generalized, and the performance of the algorithm is generally evaluated based on the accuracy of the proposed method and not the data used. Calculating the normalized value of the mean squares of the error yields: where is, the actual output value and is the simulated input value for the member.

Linear Regression Matches the Predicted Value and the Actual Value of the Variable Value
The complementary measure for the accuracy or is a measure called the linear regression of the simulated value and the actual output value of the approximating algorithm. In fact, in addition to accuracy, another measure of reliability is needed to approximate a constant value. Reliability is calculated by a criterion called regression of correlation coefficients. The degree of reliability is numerical in the range (1 and −1). It is, in fact,

Mean Squared Normalized Error (MSNE)
The normalized value of the mean squared error is the normalized amount of squared error, which is usually used to evaluate the predicted continuous values. The squared value of the error makes it possible to consider a penalty for a more significant error so that the difference between the simulated value and the actual value, considering a power of two, reflects the magnitude of the error. Hence, the performance is evaluated accurately by considering the magnitude of the error and not its direction. Also, by normalizing the mean squares of the error, the evaluation is generalized, and the performance of the algorithm is generally evaluated based on the accuracy of the proposed method and not the data used. Calculating the normalized value of the mean squares of the error yields: where T i is, the actual output value and Y i is the simulated input value for the i member.

Linear Regression Matches the Predicted Value and the Actual Value of the Variable Value
The complementary measure for the accuracy or MSNE is a measure called the linear regression of the simulated value and the actual output value of the approximating algorithm. In fact, in addition to accuracy, another measure of reliability is needed to approximate a constant value. Reliability is calculated by a criterion called regression of correlation coefficients. The degree of reliability is numerical in the range (1 and −1). It is, in fact, an indicator for evaluating the degree of linear correlation between the actual value and the estimated value of a parameter. If R = 0, there is no linear relationship between the two values, but if R = 1 or R = −1, there is a stable positive or negative linear relationship. The optimum value for R is one, which indicates excellent reliability in the model. Calculating the reliability criterion through linear regression of correlation coefficients is: where R is a linear regression to measure the performance of the algorithm, T i is the actual output value, and Y i is the simulated input value for the ith member. Also, T is the actual output value and Y is the simulated input value of one step before step i. MSNE and R regression accuracy criteria can jointly demonstrate the performance of supervisor learning algorithms, and each alone may be flawed. Hence, if each is used independently to describe the version of the machine learning tool (here is the predictive neural network), it is incomplete and not sufficient to ensure the proper implementation of the method. Thus, both criteria are used together and as a compliment, and the neural network performance indicator will predict the workload. According to the source [24], the performance of dynamic resource allocation can be examined in terms of the request rate rejection and the number of resources wasted.

The Cloud Rejection Rate
The number of rejected requests is the primary measure of the efficiency of the dynamic resource allocation mechanism in the cloud. Thus, the number of rejected requests relative to the total number of proposals submitted to the cloud calculates the amount of this performance criterion. The following equation calculates this: where R t represents the number of rejected requests and U t represents all requests received at time t.

The Number of Wasted Resources in the Cloud
The number of resources wasted is the ratio of the remaining empty capacity in the servers to the total capacity of the cloud servers: where N is the total number of servers, Ld i is the current load on the physical server i, and Cap i is the total capacity of the physical server i. The neural network to predict workload needs to be trained first, and then its performance is measured by running on a test data set. However, the data set is based on the descriptions in the previous section of this paper; it has a percentage of noise to make the simulated data more realistic. It seems that averaging several times results in better neural network performance. The complete execution of the neural network on the Moore database should be evaluated so that the randomness of the noise can be more effective in accurately representing the overall performance neural network [33]. Thus, in this study, the neural network is run 20 times for different amounts of noise. Its efficiency is considered in terms of best performance and average efficiency shown in Table 1.

I: Objective function
All intelligent electrical appliances are controlled and programmed by the central control of the smart home network. The objective function is presented as: where SP represents the cost of operating a smart home and LF represents the load factor. SP is defined as the difference between the cost of purchasing energy from the upstream grid C EP with the profit from the sale of energy to the upstream grid C BS and the profit from participation in the valley filling program C DM .
Increasing the load factor can reduce the peak consumption or increase the average consumption by filling the valleys of the total load profile.

Charging and Discharging the Battery
Charging and discharging is optimal when charging happens during off-peak hours and discharging at rather expensive/peak hours; for the battery from the time of charge or discharge and charge level is defined as: where P ch with positive (negative) sign indicates the charge (discharge) mode for the battery.

II: Problem constrain:
Load clipping constrain: This upper and lower boundary limit in load clipping must be observed at any time. In the below equation, ∆P clip t,n is the amount of load from n that is curtailed at the moment t. U clip n is also a variable that determines whether or not the load participates in the load clipping strategy, which is one if it participates and zero otherwise.
Complete load transfer constraints: this means the complete transfer of load from one time to another in order to avoid the activity of electrical appliances in the peak load. In this strategy, it is assumed that the shape of the load does not change, it is only transferred from time to time. Load participation in the load transfer strategy is shown in Equations (10) and (11). In the equation below, the parameter ∆P trans t,n shows the difference between the load n, before and after the transfer at moment t. U trans n . also indicates the load participation in the transfer strategy, the value of which is zero or one. It can be one when the load can be turned off and transferred to another hour, and, vice versa, when the load is not transferable (for example for Central air conditioning), this index is zero. Also, in the following equations, the parameter y n,∆t indicates whether the load n has been transferred by ∆t or not. The range of this index is zero or one.
∆P trans t,n = U trans n P t,n − ∑ ∆t y n,∆t P t+∆t (10) ∑ ∆t y n,∆t = u trans Charging and discharging constrain: this constraint for the ESS system according to the minimum and maximum charge rate expresses a relationship as follows that, in the following relationships, P ch,max is the maximum battery charge rate in kW and P disch,max is the maximum battery discharge rate in kW. Also, EV BC battery capacity in kW. Finally, the EV SOC min is the minimum amount allowed to charge the battery in kWh.

Problem Solving Algorithm
In formulating the electrical task scheduling by the genetic algorithm, each subsolution (the moment the electrical task starts) is defined as an individual within a set of subsolutions called a chromosome. The main idea behind the genetic algorithm is that these chromosomes must include the subroutines that provide the most overall optimization during several stages of change. In fact, after a few steps of the algorithm, the algorithm's output should be the moments of performing electrical tasks so that the cost of power consumption is minimized. Each time the algorithm is implemented, each chromosome introduces a new generation of sub-solutions. In each generation, chromosomes are evaluated and allowed to survive and reproduce in proportion to their value. Generation is done in the discussion of the genetic algorithm with intersection three and mutation four operators. Top parents are selected based on a fitness function.
In the genetic algorithm, a group of points is randomly selected in the search space. A sequence of sub-solutions is assigned to each point in this process, to which genetic operators are applied. The resulting sequences are then decoded to find new issues in the search space. Finally, based on the objective function value in each, the probability of their participation in the next step is determined. Here, the objective function is the amount of empty capacity together relative to the total capacity.
The proposed protocol is implemented through the following steps ( Figure 2): 1.
The data of each device are collected based on their characteristics, i.e., the type of load and their basic operating hours; 2.
All the types of equipment are classified and the values of the desired level of operation for each appliance are entered from the customer or residents' point of view; 3.
All the 24-h data of the renewable hybrid system are called, and the amount of stored power is collected; 4.
The amount of power requested from the network is determined; 5.
In the next part of the formulation, the optimization problem is solved using the genetic algorithm, and optimal energy management and optimal timing for optimal operation of smart home equipment are achieved;

6.
The HAEMS protocol is performed and, in the next step, according to the parameters trained in the artificial neural network, the values of MSNE, Rj t , R, W R are checked to be in the acceptable range. If the values are in the unauthorized range, the determined power of the main grid and the amount of power requested are increased by 5%, and this process continues until the evaluation parameters of the proposed protocol are converged and minimized; 7.
The data of each device are layered by cloud computing taken bilaterally from the HAEMS protocol. The second is sent from the second layer to the first layer, and, in this part, which is the physical level of equipment in the smart home, they are controlled and operated optimally; 8.
The 24-h time limit is checked, and the program is terminated.
operation for each appliance are entered from the customer or residents' point of view; 3. All the 24-h data of the renewable hybrid system are called, and the amount of stored power is collected; 4. The amount of power requested from the network is determined; 5. In the next part of the formulation, the optimization problem is solved using the genetic algorithm, and optimal energy management and optimal timing for optimal operation of smart home equipment are achieved; 6. The HAEMS protocol is performed and, in the next step, according to the parameters trained in the artificial neural network, the values of MSNE, , , are checked to be in the acceptable range. If the values are in the unauthorized range, the determined power of the main grid and the amount of power requested are increased by 5%, and this process continues until the evaluation parameters of the proposed protocol are converged and minimized; 7. The data of each device are layered by cloud computing taken bilaterally from the HAEMS protocol. The second is sent from the second layer to the first layer, and, in this part, which is the physical level of equipment in the smart home, they are controlled and operated optimally; 8. The 24-h time limit is checked, and the program is terminated.

Classification of Household Electrical Appliances
Household appliances are divided into responsive and non-responsive loads according to their capabilities in the load response program. Responsive loads such as washing machines and water heaters can transfer their consumption from time to time in response to the received tariff. Devices such as televisions and personal computers, which are usually used based on the customer's wishes and without considering tariffs, are called non-responsive devices. Although the time and amount of consumption of these devices cannot be controlled, several time intervals can be suggested as operating times to the owners of these devices. Here, it is assumed that the subscriber turns on his device at one of the recommended times. Responsive appliances are of two types: (1) appliances that only have their on/off status determined by the program provided, such as washing machines. These devices consume their energy consumption at each interval when they are on. The subscriber selects the allowable operating time for these devices. For some, the operating intervals of these devices should be consecutive and, for some, can be incoherent. For example, a washing machine must have a working clock to wash clothes properly. However, the clothes dryer can do its job at non-consecutive intervals. (2) Another category of responsive devices is devices whose consumption level in each allowable performance interval is determined by implementing the program. These devices have an acceptable range of energy consumption in each interval. The customer can also select the desired level of consumption of the device in each interval. To ensure the well-being of the joint, the total deviation from this desired joint amount can be limited to a certain amount. Among the devices in this category is the electric cooling/heating system.

Energy Storage Systems
It is expected that a modern family in an SMG is equipped with some storage/production devices; for example, energy storage systems such as batteries or plug-in hybrid electric vehicles (PHEVs). To keep returns high, battery, charge/discharge, and charge mode (SOC) should be limited to a specific range as follows: Soc min ≤ Soc(h) ≤ Soc max (16) where P dch and P dh are the maximum charge and discharge power of the battery and Soc min and Soc max are the upper and lower limits of the battery SOC. Similarly, η ch and η cdh are battery charge and discharge efficiencies. u Batt Is a binary variable that shows the battery status at h ("1" charge and "0" = discharge). Due to the above limitations, the SOC update function is equal to: where, E Batt is the battery capacity in kWh. Although a PHEV is essentially the same as the battery, a few additional limitations (such as a cut-off signal) indicate that the PHEV battery can only be charged/discharged when it is at home, and Soc min hourly indicates the minimum PHEV battery power must also be satisfied. F is scheduling tasks and residential load model. Residential loads are generally divided into two categories: (1) Schedulable loads (removable and interruptible tasks); (2) Fixed loads. While loads such as refrigerators and stoves are considered fixed loads, space heating and cooling, vacuum cleaners, washing machines, and clothes dryers are examples of timed tasks that provide the most electricity in a household. They consume and behave differently in response to changes in electricity prices over time [24].

Modeling the Production Capacity of the Wind-Solar Hybrid System
The power generation regime of the wind-solar hybrid system separately for each wind turbine and solar system is given in Figure 3, respectively. In this section, the first interval shows 00:00 to 00:15 in the morning.
differently in response to changes in electricity prices over time [24].

Modeling the Production Capacity of the Wind-Solar Hybrid System
The power generation regime of the wind-solar hybrid system separately for each wind turbine and solar system is given in Figure 3, respectively. In this section, the first interval shows 00:00 to 00:15 in the morning.

Functional Range
One day will turn into 96 lot 15-min intervals. The interval starts at 6:00 a.m., and the last interval is at 5:00 a.m.

Functional Range
One day will turn into 96 lot 15-min intervals. The interval starts at 6:00 a.m., and the last interval is at 5:00 a.m.

Bars and Their Profiles
Dishwasher: has three primary performance cycles. This time is considered a transferable load (Figure 4).

Bars and Their Profiles
Dishwasher: has three primary performance cycles. This time is considered a transferable load (Figure 4). Washing machine: which works for washing, rinsing, and then drying, this time is also portable ( Figure 5). Refrigerator (cuft-6.15) with freezer: the refrigerator is a non-transferable and clipping appliance, and operates 24 h a day ( Figure 6).  Washing machine: which works for washing, rinsing, and then drying, this time is also portable ( Figure 5).

Bars and Their Profiles
Dishwasher: has three primary performance cycles. This time is considered a transferable load (Figure 4).  Refrigerator (cuft-6.15) with freezer: the refrigerator is a non-transferable and clipping appliance, and operates 24 h a day ( Figure 6).  Refrigerator (cuft-6.15) with freezer: the refrigerator is a non-transferable and clipping appliance, and operates 24 h a day ( Figure 6). Smart Cities 2021, 4, FOR PEER REVIEW 13 Figure 6. Load profile of refrigerator.
Central air conditioning: The use of this device depends on the weather and ambient temperature and is non-transferable (Figures 7 and 8).   Central air conditioning: The use of this device depends on the weather and ambient temperature and is non-transferable (Figures 7 and 8). Central air conditioning: The use of this device depends on the weather and ambient temperature and is non-transferable (Figures 7 and 8).

Hybrid Micro-Grid
The proposed objective function, and the constraints considered for the HAEMS, including the wind/solar micro-grid, such as taking the energy storage by the genetic algorithm for the discussed input loads, have been solved. The price of electricity at different tariffs is shown in Figure 9.

Hybrid Micro-Grid
The proposed objective function, and the constraints considered for the HAEMS, including the wind/solar micro-grid, such as taking the energy storage by the genetic algorithm for the discussed input loads, have been solved. The price of electricity at different tariffs is shown in Figure 9. Smart Cities 2021, 4, FOR PEER REVIEW 15 Figure 9. Different electricity tariffs.
The parameters and numerical values for solving the problem are shown in Table 2. 1 kW Wind turbine capacity installed 1 kW The capacity of an installed photovoltaic system 0.2 kWh Minimum battery charge 0.5 kW Charging rate every 15 min 0.9 Per Unit Charging tool efficiency 2 kWh Battery capacity 1.03*daily-price The cost of discharging or selling energy to the grid 0.04*daily-price Profits from participation in consumption reduction All loads in the HAEMS and peak, medium, and low load times in the network base state and the initial assumption are shown in Figure 10. The parameters and numerical values for solving the problem are shown in Table 2. All loads in the HAEMS and peak, medium, and low load times in the network base state and the initial assumption are shown in Figure 10.
Optimization, charging, and discharging of storage and load shift and load clipping operations on different loads according to the information given in the table below have been done.
According to Table 3, the central air conditioning is on at 96 time slots of 15 min, i.e., the whole day and night, and it is not possible to shift. Still, by adjusting the temperature, its consumption can be reduced, or its consumption can be increased by applying a lower temperature. Therefore, it is possible to reduce the load. The refrigerator is on all day, and it is not possible to shift or cut part of the load. The dishwasher can have both load shift and load clipping according to its settings. This equipment can shift and transfer loads from 67 to 96, and up to 2.0 saws for load reduction and clipping are considered. For washing machines and dryers from range 17 to 96, load transfer capacity and function are considered. It is assumed that the maximum load reduction is regarded as 30% according to the settings of this car. In the following, we will deal with the results obtained by applying the proposed simulation conditions, and the obtained results will be discussed: 0.9 Per Unit Charging tool efficiency 2 kWh Battery capacity 1.03*daily-price The cost of discharging or selling energy to the grid 0.04*daily-price Profits from participation in consumption reduction All loads in the HAEMS and peak, medium, and low load times in the network base state and the initial assumption are shown in Figure 10.

Central Air Conditioning (AC)
After optimization, the AC power consumption profile was obtained as follows ( Figure 11). Optimization, charging, and discharging of storage and load shift and load clipping operations on different loads according to the information given in the table below have been done.
According to Table 3, the central air conditioning is on at 96 time slots of 15 min, i.e., the whole day and night, and it is not possible to shift. Still, by adjusting the temperature, its consumption can be reduced, or its consumption can be increased by applying a lower temperature. Therefore, it is possible to reduce the load. The refrigerator is on all day, and it is not possible to shift or cut part of the load. The dishwasher can have both load shift and load clipping according to its settings. This equipment can shift and transfer loads from 67 to 96, and up to 2.0 saws for load reduction and clipping are considered. For washing machines and dryers from range 17 to 96, load transfer capacity and function are considered. It is assumed that the maximum load reduction is regarded as 30% according to the settings of this car. In the following, we will deal with the results obtained by applying the proposed simulation conditions, and the obtained results will be discussed:

Central Air Conditioning (AC)
After optimization, the AC power consumption profile was obtained as follows ( Figure 11).  Comparison of AC consumption profile before and after application of the proposed method.
Dishwasher: The profiles before and after optimization are compared; the result is shown in Figure 12.
Smart Cities 2021, 4, FOR PEER REVIEW 17 Dishwasher: The profiles before and after optimization are compared; the result is shown in Figure 12. Washing machine: the power consumption profile of the washing machine, and the dryer after and before the optimization is shown in Figure 13.

Electric Oven
Total load, i.e., the sum of HAEMS loads is shown in Figures 14 and 15, and for comparison with profiles such as simulation and proof of the efficiency of the Figures 16  and 17 method, the load profile is more linear and the peak load is reduced. Washing machine: the power consumption profile of the washing machine, and the dryer after and before the optimization is shown in Figure 13.
Smart Cities 2021, 4, FOR PEER REVIEW 17 Dishwasher: The profiles before and after optimization are compared; the result is shown in Figure 12. Washing machine: the power consumption profile of the washing machine, and the dryer after and before the optimization is shown in Figure 13.

Electric Oven
Total load, i.e., the sum of HAEMS loads is shown in Figures 14 and 15, and for comparison with profiles such as simulation and proof of the efficiency of the Figures 16  and 17 method, the load profile is more linear and the peak load is reduced.

Electric Oven
Total load, i.e., the sum of HAEMS loads is shown in Figures 14 and 15, and for comparison with profiles such as simulation and proof of the efficiency of the Figures 16 and 17 method, the load profile is more linear and the peak load is reduced. Smart Cities 2021, 4, FOR PEER REVIEW 18      ESS is in charging mode during off-peak hours and is scheduled in discharge mode during peak hours. The maximum and minimum charge limits are 2 and 0.2 kW. Figure 18 clearly shows that, at the end of the day and low load rates, the charging mode strategy is planned by HAEMS .  ESS is in charging mode during off-peak hours and is scheduled in discharge mode during peak hours. The maximum and minimum charge limits are 2 and 0.2 kW. Figure 18 clearly shows that, at the end of the day and low load rates, the charging mode strategy is planned by HAEMS . ESS is in charging mode during off-peak hours and is scheduled in discharge mode during peak hours. The maximum and minimum charge limits are 2 and 0.2 kW. Figure 18 clearly shows that, at the end of the day and low load rates, the charging mode strategy is planned by HAEMS. Smart Cities 2021, 4, FOR PEER REVIEW 20 Figure 18. Storage charge level.
Power generation and consumption in the HAEMS smart home network are not the same. Figure 19 shows this difference.  Figure 20 also shows the amount of power received from the main network to the smart home network. As has been made clear, the proposed method with optimal timing for the day ahead, in addition to high speed and accuracy, has been able to minimize the amount of power required from the main network. This has resulted in a 45% reduction in the purchasing power of the network from the main network. Figure 21 shows the total cost per day with and without considering the proposed HAEMS-based optimization method. As it turns out, this significantly reduced the cost of electricity. With this idea, customers save about $2 and 86 cents a day in payment . Power generation and consumption in the HAEMS smart home network are not the same. Figure 19 shows this difference. Power generation and consumption in the HAEMS smart home network are not the same. Figure 19 shows this difference.  Figure 20 also shows the amount of power received from the main network to the smart home network. As has been made clear, the proposed method with optimal timing for the day ahead, in addition to high speed and accuracy, has been able to minimize the amount of power required from the main network. This has resulted in a 45% reduction in the purchasing power of the network from the main network. Figure 21 shows the total cost per day with and without considering the proposed HAEMS-based optimization method. As it turns out, this significantly reduced the cost of electricity. With this idea, customers save about $2 and 86 cents a day in payment .  Figure 20 also shows the amount of power received from the main network to the smart home network. As has been made clear, the proposed method with optimal timing for the day ahead, in addition to high speed and accuracy, has been able to minimize the amount of power required from the main network. This has resulted in a 45% reduction in the purchasing power of the network from the main network. Figure 21 shows the total cost per day with and without considering the proposed HAEMS-based optimization method. As it turns out, this significantly reduced the cost of electricity. With this idea, customers save about $2 and 86 cents a day in payment.

Conclusions
In this paper, the HAEMS protocol was presented using cloud computing. The data of home appliances were analyzed by using cloud computing, which was exchanged bilaterally from the HAEMS protocol. An optimal schedule was made for a day ahead for the optimal operation of the electrical equipment of smart residential houses under welfare indicators. The efficiency of the neural network was evaluated in the form of averaging, several times, the complete implementation of the neural network on the Moore dataset, and, finally, welfare indicators such as MSNE, , , and were evaluated. In addition to welfare indicators, the proposed protocol with high accuracy, speed, and proper convergence at the level of welfare indicators was able to minimize the amount of power requested from the main network, which has resulted in a 45% reduction in the purchasing power from the grid. On the other hand, the total cost per day, regardless of the proposed HAEMS-based optimization method, has shown that the electricity costs were significantly reduced. With this method, customers save about $ 2 and 86 cents a day in payment. The proposed method was implemented by GA algorithm

Conclusions
In this paper, the HAEMS protocol was presented using cloud computing. The data of home appliances were analyzed by using cloud computing, which was exchanged bilaterally from the HAEMS protocol. An optimal schedule was made for a day ahead for the optimal operation of the electrical equipment of smart residential houses under welfare indicators. The efficiency of the neural network was evaluated in the form of averaging, several times, the complete implementation of the neural network on the Moore dataset, and, finally, welfare indicators such as MSNE, , , and were evaluated. In addition to welfare indicators, the proposed protocol with high accuracy, speed, and proper convergence at the level of welfare indicators was able to minimize the amount of power requested from the main network, which has resulted in a 45% reduction in the purchasing power from the grid. On the other hand, the total cost per day, regardless of the proposed HAEMS-based optimization method, has shown that the electricity costs were significantly reduced. With this method, customers save about $ 2 and 86 cents a day in payment. The proposed method was implemented by GA algorithm The Overall Dally utility Cost utility cost(optimized) utility cost(unoptimized) Figure 21. Total utility cost of the smart home after/before using the proposed HAEMS.

Conclusions
In this paper, the HAEMS protocol was presented using cloud computing. The data of home appliances were analyzed by using cloud computing, which was exchanged bilaterally from the HAEMS protocol. An optimal schedule was made for a day ahead for the optimal operation of the electrical equipment of smart residential houses under welfare indicators. The efficiency of the neural network was evaluated in the form of averaging, several times, the complete implementation of the neural network on the Moore dataset, and, finally, welfare indicators such as MSNE, Rj t , R, and W R were evaluated. In addition to welfare indicators, the proposed protocol with high accuracy, speed, and proper convergence at the level of welfare indicators was able to minimize the amount of power requested from the main network, which has resulted in a 45% reduction in the purchasing power from the grid. On the other hand, the total cost per day, regardless of the proposed HAEMS-based optimization method, has shown that the electricity costs were significantly reduced. With this method, customers save about $2 and 86 cents a day in payment. The