AN INTELLIGENT RTP-BASED HOUSEHOLD ELECTRICITY SCHEDULING WITH A GENETIC ALGORITHM IN A SMART GRID

Electricity scheduling for households based on real-time pricing (RTP) allows flexible and efficient consumption planning. However, this creates errors in predicted costs. Therefore this study used a genetic algorithm (GA) to reduce the error in predicted costs and suggested a model that offered better consumption planning. This model comprises a provider that supplies electricity and a subscriber that consumes electricity. Each subscriber has an energy management controller (EMC) that selects the optimal electricity scheduling. The provider and subscriber exchange real-time predicted costs and consumption plans to achieve an appropriate balance. During this process, the aforementioned prediction error — i.e., the difference between the predicted cost for each time slot and the final actual cost — occurs. This was addressed in this study using a GA. As a result, the presented model produced consumption plans with costs that were 22.60 per cent lower than the nonscheduled case, and 3.34 per cent lower than the model from a previous study. Furthermore, the fairness for each subscriber was improved by 15.96 per cent compared with the non-scheduled case, and by 0.62 per cent compared with the previous study model.


INTRODUCTION
The recent implementation of a smart grid has allowed real-time monitoring of electricity consumption.Thus it is becoming possible for electricity pricing systems to determine costs based on real-time monitoring.Many households have begun using Internet of Things (IoT) products to help facilitate this monitoring process.In order to prepare for increasing electricity consumption, providers depend on the demand response (DR) program to decentralise subscribers from peak usage times [1].
Real-time pricing (RTP) is considered to be an effective way to use DR [2,3,4].Providers use RTP to report predicted electricity costs 15 minutes ahead of time.The recent technological development of smart meters has increased reliability and security, and consequently allowed information exchange between providers and subscribers.Subscribers rely on energy management controllers (EMCs) to find the appropriate balance between electricity cost and subscriber preference.
Most previous studies on optimising electricity cost used the day-ahead method -which applies the actual electricity cost from the day before to the next day -or suggested smart RTP-based power scheduling using the Stackelberg game model [5,6,7].However, these studies have shortcomings: either the delay costs arising from subscribers delaying usage times were not considered, or the problems arising due to discrepancies created between subscriber-expected prediction costs and post-determined actual costs in the midst of finding the appropriate balance were not considered.This could create problems in scheduling when subscribers chose and moved to the most costefficient times; subscribers ahead of the peak time would not be able to predict the changes due to the delay time caused by subscribers after the peak time, and this could result in financial loss.
This study therefore aimed to predict electricity consumption cost for every 10 minutes using a genetic algorithm (GA).It also aimed to minimise the error costs with which subscribers must cope as a result of prediction errors and delay costs.Electricity cost data obtained from the prior 10 weeks was used to predict future costs 1 .The appropriate weights between these predicted costs and real-time predicted costs were then calculated and used to reduce cost errors.

PREVIOUS STUDIES
To deal with the risk of price volatility and to manage supply and demand, a day-ahead optimisation has frequently been discussed in power grids [8].Under the day-ahead pricing scheme, the electricity unit price in each time slot is set by the supply-side in the day-ahead market clearing process [9].Based on such a predetermined price, a centralised decision-making unit (a sort of headquarters) decides an optimal consumption scheduling of subscribers and of the corresponding planned supply.In this condition, subscribers follow the schedule strictly, regardless of the actual condition.
Various studies have sought to find suitable profits for providers while further reducing costs for subscribers -in particular, by predicting electricity consumption and cost.Garcia, Contreras, Van Akkeren, and Garcia [9] predicted electricity costs for the next day by applying predicted costs from the previous day to the generalised autoregressive conditional heteroskedastic (GARCH) method.
For short-term predictions, Szkuta, Sanabria, and Dillon [10] used the artificial neural network (ANN) method to suggest a prediction method using a developed model based on previous data.Contreras, Espinola, Nogales and Conejo [11] used the auto-regressive integrated moving average (ARIMA) method that was based on past-time series data to suggest a method that predicted electricity costs for the next day.Wang, Chen and Yang [12] used a semi-parametric regression approach to forecast electricity consumption in China, but this is inappropriate for short-term scheduling.
For more flexible demand management, Chen, Kishore and Snyder [5] aimed to predict costs by sharing costs in real-time in a distributed manner that also allowed subscribers to move to minimalpricing times in real-time, thus subsequently minimising the overall costs.A cost scheduling model based on real-time pricing (RTP) was used, and a model was suggested that described the movement of subscribers moving to minimal-pricing times in real-time.

Shortcomings of previous studies
Previous studies predicted electricity costs using prediction methods such as GARCH and ARIMA, based on RTP and day-ahead models [5,9,10,11].
However, [9] had limitations because peak times were moving towards neighbouring times, based on the peak times reported from the day before.There are also significant shortcomings in such a mechanism [9,13,14]: the computational complexity of a centralised decision-making unit We have not considered seasonality in the study.The consumption pattern is assumed to be similar across 11 weeks.
significantly increases as the number of subscribers increases; it is risky to hand over subscribers' private information to a centralised unit; and it is unreasonable for each subscriber strictly to follow the given consumption schedule, even though unpredicted consumption/price fluctuations can occur in practice.We have thus considered a distributed decision-making model reflecting both the subscriber's and the service provider's perspectives.
The model of [10] did not select delay costs, so the impact that subscribers experienced from the delay was not considered.The model of [5] had prediction errors because there were discrepancies between the costs resulting from subscribers moving usage times and the actual future costs.This created problems for subscribers who had first delayed using appliances.In addition, this error increased with an increase in the number of subscribers using appliances before noon.
The current study suggested a method that reduced the differences between the actual and the predicted costs, together with a pricing policy strategy to reduce maximum electricity consumption -especially in a distributed manner.The suggested method minimises the cost prediction error made by the RTP-based scheduling model based on a GA to predict real-time electricity costs.

MODEL
Based on Stackelberg game theory [5], this study used a GA in order to allow subscribers to save costs through more accurate predictions, while achieving an appropriate balance between subscriber cost and provider profit.GA is a method of problem-solving based on natural selection, and can be used as a predicting method [8,15].
The purpose of an EMC is to minimise subscriber cost.Thus  , * , which is the optimal time for subscribers to start using appliances, should be determined.Electricity costs can be reduced if appliance use is delayed to times of low pricing; however, a penalty cost,   , occurs due to the inconvenience.The estimated value of   , which is the maximum delayed time acceptable to subscribers, was therefore used.An EMC can schedule within 24 hours (=144).The start time,  , * , was calculated with Eq. ( 4) [5].

𝑚𝑖𝑛
Service providers supply electricity to subscribers at the price of   , which was assumed to be the sum of the wholesale price,   , and the provider profit,   .
∝ (  ,   , ) = { 1 (  −   )  ⁄    >   (  −   )     ≤   (5) Providers received data on ,  , , and  , from subscribers, and an electricity consumption vector, P, was created so that the actual consumption   could be updated in real time.The total profit of a provider was ∑    =1 *  ,  and the net profit was calculated by subtracting the wholesale price and the mismatch cost3 from the total profit.
Each  interacted with the   value and was selected by a provider.Depending on the updated , subscribers also update  , * .This approach was used to find the equilibrium between  , * , when the cost for subscribers was at a minimum, and  * , when provider profit was at a maximum [5].Algorithm I represents the procedure of RTP-based consumption scheduling of subscribers, and Algorithm II is a GA to predict the real-time price on each time slot.We have used the backward induction with  = [ 1 , … ,   ].

7:
if random_number[time_local] ≥ 0.5 8: change(GA_variable [1][time_local], GA_variable [2] ---------------------------------------------------------------4 EXPERIMENT AND ANALYSIS The experiment was coded in MATLAB.This study assumed that the daily electricity consumption was similar to that recorded for the corresponding days of the week during the previous 10-week period.Consequently, this study performed experiments using electricity costs generated on the same day of the week during the 10 weeks.Each 24-hour period was divided into 10-minute intervals and represented in rows, and the electricity cost for each week was represented in columns. Parameter settings, described in Table 1, are as follows (referring to [5]).Eighty subscribers were selected for the experiment (=80).It was assumed that each subscriber used three types of scheduled appliances (  =1,2,3: dishwasher, clothes dryer, and washing machine) that were controlled by EMCs.Furthermore, it was assumed that  , followed an exponential distribution with an average of  , , and the total time (T) was set from 7:00 AM to 7:00 AM the next day.The time was divided into 10-minute intervals.The appliances were used more frequently by subscribers between 5:00 AM and 8:00 PM, and so this interval included the peaks for electricity consumption.The population for the GA comprised the electricity costs for the same day of the week from the previous 10 weeks.The size of a population is 10 for each time slot.We have referred to the default settings of GA in MATLAB.In short, the mask parameter during the crossover operation was randomly selected from values between 0 and 1; if the selected value was 0.5 or higher, it selected parent 1; and if the selected value was lower than 0.5, it selected parent 2. The mutation probability was set to five per cent for this process.With increasing iterations of the GA, all the solutions in the population continued to converge in real time to the cost value of each time slot.Ultimately, all solutions converged at the end of the one-day cycle.The computation time of GA is less than a minute.This is reasonable for a 10-minute RTP.

Select operation
Two parent solutions were selected from the population for the select operation.The difference between solutions from the population and the cost, Z, measured in real time, was chosen as the fitness.The better-and worse-fitting solutions were distinguished according to this difference, and eight better-fitting solutions (approximately the top 18 per cent of the population) were selected so that the algorithm could evolve toward better solutions.

Crossover operation
Crossover produces a new solution by partially crossing the genes of two fitter parent solutions.This study used uniform crossover, with a mask parameter of 1 to  random values.If the mask parameter is 0, it crosses two parent solutions of the time slot, but not when it is 1.

.1.3 Mutation
Mutation was implemented in the process to produce new child solutions from the crossover.With mutation, the existing child solution became a random value, which helped the gene pool to converge toward better solutions.

CONCLUSION AND FUTURE WORK
Controlling electricity consumption with an EMC using appliance scheduling based on real-time pricing creates a prediction error due to variations in future electricity consumption.In this study, a GA was used to decrease this prediction error; the results showed a 3.34 per cent reduction in electricity cost compared with the existing model.
Although this study aimed to reduce prediction error by using a GA -which was a problem in previous studies -the predictions still have limitations.Methods potentially exist to reduce errors more effectively.One way is to divide subscribers into groups according to electricity consumption, and then make predictions for each group.Another approach is to use an energy storage system (ESS) to save electricity beforehand, to reduce inconsistencies in prediction error.Such studies will be continued, and a seasonality effect will also be considered in the future.

Figure 1
Figure 1 shows a comparison of the total electricity consumptions from RTP & GA-based scheduling, the Chen [5] model, and day-ahead scheduling 5 .The peak consumption was 107 kW for nonscheduling, 89.2 kW for day-ahead scheduling, 91 kW for Chen scheduling, and 90.8 kW for RTP & GA-based scheduling.The RTP & GA-based scheduling was similar to the planned power curve.

Figure 1 :Figure 2
Figure 1: Comparison of daily electricity consumption (see online version for colour)Figure2shows a comparison of the peak-to-average values that were obtained by dividing the maximum electricity consumption over the total time period by the overall average.The GA generated a peak-to-average value of 2.498, which improved the value by 17.84 per cent, compared with 2.943 when scheduling was not applied.The Chen model generated a peak-to-average value of

Figure 2 :Figure 3
Figure 2: Peak-to-average comparison (Y-axis: the peak-to-average ratio)Figure3is a graph comparing the sums of daily costs for 80 subscribers.Applying the GA generated a cost of $60.80, which was 22.60 per cent lower than the $74.55 generated when scheduling was not applied.The Chen model generated $62.84, which was 18.63 per cent lower than when scheduling was not applied.Furthermore, the GA improved the cost by 3.34 per cent compared with the Chen model.

Figure 3 :Figure 4
Figure 3: Cost comparison (Y-axis: subscribers' total cost ($))Figure4compares the standard deviations of the daily electricity costs of 80 subscribers.Applying the GA resulted in a standard deviation of 0.555.This was 15.96 per cent lower than the standard deviation of 0.644 when scheduling was not applied.The Chen model generated a standard deviation of 0.559, which was 15.24 per cent lower than when scheduling was not applied.Furthermore, the GA slightly improved the standard deviation by 0.62 per cent compared with the Chen model.