Data-Driven Real-Time Pricing Strategy and Coordinated Optimization of Economic Load Dispatch in Electricity Market

Compared to the step tariff, the real-time pricing (RTP) could be more stimulated for household consumers to change their electricity consumption behaviors. It can reduce the reserve capacity, peak load, and of course the electricity bill, which could achieve the purpose of saving energy. This paper proposes a coordinated optimization algorithm and data-driven RTP strategy in electricity market. First, the electricity price is divided into two parts, basic electricity price and fluctuating price. When the electricity consumption is equal to the average daily electricity consumption, the price is defined as the basic electricity price, which is the clearing electricity price. The consumer electricity data are analyzed. A random forest algorithm is adopted to predict the load data. Optimal adjustment parameters are obtained and the load fluctuation and the fluctuation of the electricity price are further quantified. Secondly, the appliances are modeled. The operation priority is established based on the preferences of customers and the Monte Carlo method is used to form the power load curve. Then, the smart energy planning unit is proposed to optimize the appliances on/off time and running time of residential electrical appliances. An incentive mechanism is used to further standardize the temporary electricity consumption. An improved multiobjective particle swarm optimization (IMOPSO) algorithm is adopted, which adopts the linear weighted evaluation function method to maximize the consumer’s social welfare while minimizing the electricity bill. The simulation proves that the stability of the power grid is improved while obtaining the best power strategy.

Abbreviations: T′ 8 , T′ 11 , T′ 12 , T′ 17 , T′ 18 , T′ 20 , the actual temperature at 8:00, 11:00, 12:00, 17:00, 18:00, 20:00; Ω i , dataset i with the similar temperature and precipitation (the temperature difference does not exceed 5°C and the precipitation difference does not exceed 10 mm at the same time); [X Mon , X Tue , ..., X Sun ](X ∈ Ω i ), the weekly load dataset in the dataset; Ω i ; S T , All training sets of the current node; A, the feature set extracted from the current node; T 1 ,T 2 , the training set according to feature A; y i , the square deviation of output value; S T , the training set; S E , the test set; E, the forecast error rate; P r , the load forecast value; P e , the actual load value; P 0 , the average load value; A 0 , the market clearing price; F, the fluctuation range; P L (t), the load forecasting curve; W, the price fluctuation; A t , the final electricity price at time t; A 0 , the basic electricity price; A d , the fluctuating electricity price; μ μ 1 , μ 2 , μ 3 , the fluctuation coefficients of electricity price; T, the time length; a, the consumer's application; C, the set of consumer's application; Q t a , the power consumption during the time step t; S t i , the total power consumption of the consumer i in time step t; k,k ∈ (0, 1), the priority adjustment coefficient; λ t ∈ λ, the running state variable of application; δ, the cooling type operating coefficient; T t em , the temperature at time t; P ri , the electricity bill; P z , the incentive fee; B, the total social welfare; L i , the consumption of electricity S t i , by consumer i at time t; C k (x k ), the power generation cost at the time of producing electricity x k ; δ', the electric elasticity coefficient; m, r, b, and c, the constants; κ 1 , κ 2 , the weighting coefficients; f 1b , f 2b , the optimal solution of the two objective functions; f b 2 , the value of the second objective function when the first objective function is optimal; f b 1 , the value of the second objective function when the second objective function is optimal; A INTRODUCTION Power consumers have coincident peak load, resulting in a large peak-valley difference. For traditional power supplies, the spare capacity is relatively large, which increases the operating cost of the system. In order to reduce the peak-valley difference and enhance the stability of power supply, optimization methods were proposed from the power generation side and the load side, such as time-of-use electricity price (TOU) and Demand Response (DR). The demand side self-adjustment is more economical and practical than the investment in the power side to meet the peak demand (Li et al., 2021). To establish a standardized and healthy electricity market, it is necessary to give full play to the leverage of electricity prices in the electricity market. In recent years, TOU has played an increasingly important role in the power industry of various countries in the world and has also attracted widespread attention in the academic field (Lampropoulos et al., 2012). After the implementation of the TOU, the load demand is increased during the low period and the load demand is reduced during the peak period, in which way the consumer has an economical benefit (i.e., low utility bill). So it can change the electricity consumption behavior of consumers. Currently, the pricing models mainly include tiered electricity price (TP), real-time pricing (RTP), day-ahead pricing (DAP), time-of-use pricing (TOUP), and critical peak pricing (CPP). Zhou B. proposed a new multiobjective optimal electricity price setting model for time-of-use electricity price and stepped electricity price, which can save energy and transfer the load from peak hours to off-peak hours (Zhou et al., 2018). Mohsenian-Rad A. H. considered deployment of energy consumption scheduling (ECS) equipment in smart meters to implement autonomous demand side management in communities where multiple buildings share energy (Mohsenian-Rad et al., 2010). This article mainly studies a source of energy (a generator or stepdown substation transformer) connected to the grid, without considering regional interconnection issues. From the long-term implementation of the time-of-use electricity price experience, it is found that the range of the peak-to-valley price ratio is usually between two and five times . Based on the game theory method, a pricing model is proposed to reduce the total energy consumption cost and the peak-to-average load ratio (PAR). The use of a smart residential energy management system (SREMS) is demonstrated at the consumers' premises to reduce the total electricity bill by optimally time scheduling the operation of household appliances. Related topics of home smart power consumption management unit are being widely studied. A new intelligent management system to accommodate the possible optimal decisions for elastic load consumption is discussed in an informational rich smart electricity grid (Alamaniotis (2020). How much of the elastic load for that specific day has been already scheduled? The temporary power demand of consumer is not considered in this paper. An increase in distributed small-scale generation and storage in residential prosumer households, Heinisch et al. (2019). The paper aims at investigating how residential photovoltaic (PV)-battery systems are operated in given different assumed incentives. However, this paper does not propose how to coordinate the battery charging and discharging strategies in the system case and household cost optimization.
This article first proposes a new RTP. The final electricity price consists of clearing price and fluctuating price. The relationship between load power consumption fluctuation and fluctuating electricity price is quantified based on a stochastic forest algorithm. In the second part, a mathematical model of household electrical equipment is established. A smart energy planning unit is proposed to optimize the on/off time and running time of residential electrical appliances. According to the equipment operation priority set by the consumers, a load forecasting model is proposed, and the Monte Carlo method is used to form a load curve. On this basis, incentive mechanisms are used to further regulate temporary electricity consumption. In the third part, the improved multiobjective particle swarm optimization (IMPSO) algorithm is used to optimize the calculation, so as to maximize the social welfare of consumers and minimize the cost of electricity. The optimal power consumption strategy is obtained, which also improves the stability of power grid. The simulation results show that the model reduces the consumers' electricity bill, reduces the peakvalley difference of the system, and improves the stability of the system.

Load Forecasting Model Based on Stochastic Forest Algorithm
The establishment of electricity price mechanism is based on the stability of power grid. Consumers have a certain regularity in the behaviors of electricity consumption. The power consumption of four seasons in a year varies greatly. The power consumption in summer has increased significantly. If necessary, the energy must be limited to ensure the reliability of the power supply. Weather changes also affect the electricity consumption of consumers. The temperature rises, the cooling power increases significantly, and the electricity consumption fluctuates in rainy days. Therefore, load forecasting is related to weather factors, such as temperature and precipitation. Different weather factors affect the load in Frontiers in Energy Research | www.frontiersin.org August 2021 | Volume 9 | Article 714951 different ways. In the same season, weather factors affect the load in different ways. Therefore, the load data are classified by two indicators of weather temperature and rainfall.
The actual temperature at 8:00, 11:00, 12:00, 17:00, 18:00, 20: 00 T′ 8 , T′ 11 , T′ 12 , T′ 17 , T′ 18 , T′ 20 is selected every day, and the temperature difference does not exceed 5°C and the precipitation difference does not exceed 10 mm at the same time. These data will be treated as the same datasetΩ i . Load forecasting model is more accurate than that of Zhao et al. (1997) as the weather conditions have not been considered. Load forecasting has been classified based on time and weather in this paper. The trend of electricity consumption in the same set is basically the same for a week. The trend of electricity consumption in a week is basically the same. As shown in Figures 1, 2, there is a relatively large change in electricity consumption during weekdays on weekends. Different peak valley time and different electricity consumption increase the difficulty of load forecasting. This will lead to large errors when we use weekend electricity load to forecast Monday load data. Li et al. (2015) put forward the average error of hourly load forecasting on weekdays which was only 2.16%. But the electricity consumption on Sunday is compared with that on weekdays; the average prediction error of that day is 3.5%. Zhao et al. (1997) considered that the magnitude of the load value at a certain time t (t 1, 2, ..., 24) is mainly related to the load value in the past day and the load value at that time in the past week. They established a par forecasting model, which considered the weekly periodicity of load fluctuation by modifying the daily cycle par model of short-term load forecasting. Compared with these papers, the algorithm is simpler and reduces the calculation scale of intelligent prediction module in this paper.
In random forest algorithm, each tree selects some samples and some features to avoid overfitting to a certain extent. Each tree randomly selects samples and randomly selects features, so that it has good antinoise ability and stable performance. It can handle very high-dimensional data and does not need to make feature selection. The decision trees of the random forest algorithm are independent of each other, the calculation speed is not affected and the training model is fast. The accuracy of the training results is high. The Monte Carlo method is used to generate the residential electricity consumption curve, which is more accurate and reliable than the historical simulation method. It also has a small amount of calculation. The traditional empirical method cannot approximate the real physical process, and it is difficult to obtain satisfactory results, while the Monte Carlo method can truly simulate the actual physical process, so the problem solving is very consistent with the reality, and very satisfactory results can be obtained. From Figure 1, it can be seen that the trend of electricity consumption in a week is basically the same, and the difference between peak and valley in a single day is about 30%. Mohsenian-Rad A H reckons that an efficient prediction is likely by looking at the prices on yesterday,   the day before yesterday, and the same day last week. But the actual Monday load forecast accuracy is greatly affected by the previous day. From Figure 2, the electricity consumption pattern is quite different on weekends than on weekdays. As the load electricity consumption curve presents a certain regularity according to the week, the week is divided into seven groups, the load database is established, and the historical data are used to predict the power consumption of a certain day in the future. The Pauta criterion (3σ criterion) is selected to process the data. If the residual error is greater than 3σ, the data are considered abnormal and discarded. The standard deviation is usually used to replace the deviation (Qian, 2002). It can be seen from the above that the weekly load data are divided into seven groups [X Mon , X Tue , ..., X Sun ](X ∈ Ω i ); each set of data is similar day data. The result of random forest algorithm is a combination of the results in each decision tree, so the key step of random forest algorithm prediction is the formation of decision trees and forests. After extracting the training set and its features through the bootstrap algorithm, the CART algorithm is selected as the algorithm for generating the regression decision trees (Rothblum and Sethuraman, 2008;Li et al., 2020). Therefore, the basis of node splitting is the minimum mean square error, and the calculation method is shown in Eq. 1.
where S T represents all training sets of the current node. A represents the feature set extracted from the current node. The training set is divided into subsets T 1 and T 2 according to feature A. By traversing the value of a, the sum of the minimum mean square deviation of output valuey i is obtained. Finally, all the attributes are traversed to get the growth information of the node. Repeat the above process for each generated child node until the termination condition is reached. The termination condition is set to the minimum mean square error to reach the threshold. Firstly, using the similar daily data, it is divided into two parts: S {S T , S E }, training set S T and test set S E . By using the bootstrap resampling method, one training set with the same sample size is selected from the training set S T and repeated K times, the training sets 3 can be obtained [S 1 , S 2 , ..., S K ], and each training set can generate the corresponding decision trees. Using training set [S 1 , S 2 , ..., S K ], the corresponding CART decision trees are generated, and the minimum mean square value is calculated to obtain the optimal segmentation criterion. Train each decision tree until the termination condition is reached. The test set data are brought in for training, the root, node, weight, and other pieces of information of the decision trees are saved, and the test set data are used for testing.
The forecast error rate E can be expressed as where P r is the load forecast value; P e is the actual load value. Load forecast and actual value comparison could be found in Figure 3. Historical data estimates that the minimum error on Monday is 2.3% and the maximum error rate is 7.8%. The minimum error of other times is 1.5%, and the maximum error rate is 7.5%.

Establishment of Price Fluctuation Model
The equal area method is used to analyze the load forecasting curve and the average load value of the next day is obtain as P 0 .
The electricity price consists of two parts, basic electricity price and electricity fluctuating price. The basic electricity price A 0 is determined by the average daily electricity consumption P 0 . If the load value of the moment is P0, the electricity price is equal to the basic electricity price A0; the electricity price fluctuation value is 0. The P L (t) − P 0 determines the actual electricity price fluctuation range. The amplitude of electricity price fluctuations is affected by the electricity price fluctuation range F and the next day's load forecast curveP L (t). Electricity price fluctuation range F refers to the maximum fluctuation range of electricity price defined by the government to ensure that the electricity price is within the normal fluctuation range, generally (-15%; 10%). Set the variable electricity price fluctuation value W, W ∈ (0, |P L (t) − P 0 | max ). The final electricity price A t at time t consists of two parts: the basic electricity price A 0 and the fluctuating electricity priceA d . The electricity fluctuating price A d is the power function of the load fluctuation valueA i . The greater the deviation of actual power consumption from the daily average load, the greater the peak-valley difference and the greater the reserve capacity. To ensure the economy of power generation, the electricity price should be appropriately increased to ensure that the load is transferred to a time period with a lower electricity price and reduce the burden on the system. The fluctuation coefficients are μ 1 , μ 2 , and μ 3 , respectively. Among them, μ 1 < μ 2 < μ 3 when the load curve exceeds the average load value more; in order to ensure that the peak-to-valley difference is relatively small, the electricity price should be relatively more expensive, so as to ensure that users transfer to electricity when the electricity price is lower.
In order to avoid the unnecessary frequent fluctuation of electricity price, we ignore the situation that the fluctuation of electricity price is less than 5%. In the concept of IBR pricing, the marginal price increases with the total consumption (Reiss and White, 2005). Beyond the specific threshold of the total residential load per unit time, the electricity price will increase to a higher value. In Figure 4, it can be seen that TOU electricity price changes frequently. Compared with the step tariff, the change can highlight the regulation effect on hourly electricity consumption. The electricity price is relatively low in the early morning and at night, and the electricity price rises significantly in the morning and evening and the ladder rate changes largely. The larger price difference is conducive to the transfer of peak load, but it also makes it difficult for consumers to control the power consumption time. Therefore, it is necessary to use intelligent energy planning unit to manage the opening and closing time of household appliances.

Electric Application Model
After receiving the TOU price, the smart energy planning unit performs energy management planning. It selects a reasonable power consumption time based on consumers' demand and plans the time lengthT. The unit controls the on and off time of the interruptible load, and the duration of the interruptible load is determined by the electricity price. The duration of uninterruptible load power consumption cannot be adjusted, The duration of uninterruptible load power consumption cannot be adjusted.
where the consumer's application is a (a ∈ C), the power consumption during the time step t is Q t a , and the total power consumption of the consumer i is S t i in time step t. The priority adjustment coefficient k is k ∈ (0, 1). The larger the value, the later the adjustment sequence. When k 1, the application cannot be interrupted and can only stop after the end of the operating cycle. For example, electric vehicles can be charged to full charge at intervals according to regulation requirements, but in order to ensure convenience, consumers actively choose electric vehicles as uninterruptible, with priority adjustment coefficient k 1. When the application running state variable is λ t ∈ λ and when Q t a > 0, there is λ t 1; otherwise, λ t 0. It can be seen from (5) that once the uninterruptible load starts to run, it will run uninterrupted until the task is completed to avoid any energy loss.
For electrical appliances with temperature restrictions, ensure that the temperature is within a reasonable range. For the cooling type operating coefficient δ 1, the heating type δ 0.

The Smart Energy Planning Unit
As shown in Figure 5, the smart energy planning unit obtains electricity price information through the local area network and sends instructions and receives messages through the home area network (HAN) (Hu, 2020). The information interaction network realizes the information interaction between smart modules and household appliances. The unit can capture the consumers' electricity consumption rules and upload the forecast value of the next day's electricity demand to the grid through the regional network in advance. A two-way information transmission channel is formed, contributing to the company's power generation planning.

THE OBJECTIVE FUNCTION AND CONSTRAINTS
Goal 1. Optimize the electricity price model within the preset agreed conditions. The optimal electricity usage plan of the electricity customer within the day is obtained so that the electricity bill value generated on the day is the smallest. The optimization function of the electricity price model is Due to the uncertainty of customer electricity usage rules. To ensure the reliability of power supply, it is necessary to establish an incentive mechanism for customers' energy management. For customers who continuously implement the electricity consumption plan for consecutive m days, the preferential state variable λ 2 1, The preferential incentive electricity fee is λ 1 times the electricity fee, and λ 1 is called the preferential ratio.
Goal 2. Due to the particularity of electric energy, the total social welfare should be maximized while ensuring the minimum electricity bill for consumers. The implementation of real-time electricity prices will inevitably have a profound impact on consumers' electricity consumption behavior and the safe operation and management of the power grid. The social welfare maximization model is a model established from the perspective of the whole society as a whole, which fully reflects the interests of both supply and demand. The optimization problem is based on the basic model of the real-time electricity price pricing strategy that the government determines the electricity price or determines the guide price. The electricity price under the social welfare model will not exceed the fluctuation range required by the government to protect people's livelihood.
where L i is the consumption of electricity S t i by consumer i at time t. C k (x k )is the power generation cost at the time of producing electricity x k . Under the condition of satisfying the two basic assumptions of economics (Van L, 2015), where δ′, m are constant, δ′ is the electric elasticity coefficient, and r, b, and c are all constants. Constraints are shown in (5B)-(7). When social welfare and electricity bill reach the optimal solution, respectively, their corresponding electricity consumption planning curves are different, which cannot make them reach the maximum value at the same time.
Therefore, the multiobjective function is solved by linear weighted evaluation function method.
The multiobjective function obtained by linear weighting is expressed as where κ 1 and κ 2 are weighting coefficients, and the calculation method is as follows: where f 1b and f 2b are the optimal solution of the two objective functions, f b 2 is the value of the second objective function when the first objective function is optimal, and f b 1 is the value of the second objective function when the second objective function is optimal.
In this paper, the multiobjective particle swarm optimization algorithm is adopted to optimization. The calculation steps are shown in Figure 6.

EXAMPLES AND RESULTS
In this paper, the provincial load data of a certain area in Northeast China for the past three years are used to learn. The primary industry in this region currently accounts for 1.8% of the society, and the secondary industry is about 71.8% of the electricity consumption in the Northeast power grid. This shows that the northeast region has a relatively high degree of industrialization. The electricity consumption of the tertiary August 2021 | Volume 9 | Article 714951 6 industry in Northeast China is about 14.5%. The part of urban and rural residents is about 11.9%. With the improvement of living standards, electricity consumption is still increasing. The electricity price data of PJM Dayton in 2019 are as the reference value of clearing electricity price to obtain the actual electricity price. In this paper, the Monte Carlo method is used to generate residential electricity consumption curve. About the parameter setting of electric application, the lower limit of the set temperature is 22°C, and the upper limit is 27°C. The optimum temperature is 25°C, and the scheduling period is T 24h. According to the daily load data of a provincial power grid, it can be seen that the peak hours of electricity consumption are around 6:30-8 am and about 5:30 pm to 9 pm. The power valley period is between two and four in the morning, and the maximum daily load peak-valley difference at the provincial level is about 0.4 × 10 4 kW. P 0 2.424 × 10 4 kW is calculated from Eq. 6.
Assume that the number of consumers' appliances changes within 2-13, which are divided into fixed on-off equipment including lighting (p 0.05 kWh) and induction cooker (about 1 kWh). Flexible control equipment includes humidifier (p 0.05 kWh), oven (P 1 kWh), and water dispenser (p 0.6 kWh). From Figure 7, it can be seen that the realtime electricity price system has a certain effect on shifting the peak electricity load, and the peak electricity consumption of single-user residents has reduced about 40.13%.
To compare the impact of real-time electricity prices on consumers' electricity consumption behaviors and the impact on electricity bills, the following two scenarios are set up.
Scene 1. Consider only the perspective of consumers, without considering the social welfare. The consumers' comfort index is proposed to quantify the consumers' comfort level as Eq. 16, which reflects user satisfaction with electricity.
Scene 2. On the premise of ensuring social welfare, consider the economics and comfort of electricity customers.
Eq. 8 is optimized by particle swarm algorithm (Venter and Jaroslaw, 2003), and the upper limit of F fluctuation is 70.3 $/MWh. The average single-day electricity bill of consumers decreased by 13.81%. In order to ensure the comfort of consumers (Ding et al., 2005), they can temporarily change their electricity consumption plan at the expense of discounts on electricity charges.
where A i 1 T t 1 Δc a,t represents the time sum when the electrical appliance a is on and is inconsistent with the switch state under the target work plan. Consumers' electricity comfort level under TP comfort coefficient K i 1.
It can be seen from Table 1 that the average consumers' weekly electricity bill is $36.85, and the average comfort index is 0.74. In this scenario, the consumers' real-time electricity price and step tariff orders daily electricity consumption is shown in Figure 7. It can be seen that the consumers' electricity consumption pattern has changed, and part of the load FIGURE 6 | Block diagram of multi-objective particle swarm optimization optimization.  during peak period shifted to valley period. Under the premise of not disturbing consumers, the working hours of some electrical appliances are transferred to the load in the afternoon and evening hours (such as dishwashers generally start to work after meals (Dadashi-Rad et al., 2020). In order to ensure the effect of peak shaving and valley filling, the dishwasher is transferred to the load 2 hours after meals). It can be seen from Figure 8 that there is no plan for social welfare in this situation. The social welfare at this time is not very high, and the social welfare value on that day is $467,956.
Considering scenario (2), the social welfare comparison chart is shown in Figure 9. The power distribution diagram under scenario (2) is shown in Figure 10. It can be seen that there is basically no change in part of the electricity load, and the operation basically does not change due to changes in electricity prices. The second type of electricity load is more flexible, and adjusting this type of load is the main means to ensure the economy on the basis of real-time electricity prices. The third type of load has the smallest K. The second and third types of loads are the main means to ensure the economy of electricity consumption.
The smart energy planning unit could report the consumers' electricity consumption behaviors through the regional network, which plays a corrective role in the grid load forecast. It enhances the accuracy of load forecasting for residential users. The change of parameters also has a certain impact on the optimization results. The larger the preferential ratio parameter, the weaker the consumers' willingness to temporarily electricity consumption and the better the peak-shaving and valley-filling effect.
When the parameter λ 1 changes from 0.01 to 0.03, the consumers give up the comfort level in order to save electricity bills. When it rises to 0.03, the temporary electricity consumption reaches the minimum value, and the consumers' electricity bill economy reaches saturation.

CONCLUSION
This paper proposes a RTP strategy. The random forest algorithm is used to forecast the load, and the fluctuation range of electricity price is determined by the fluctuation range of load. The sum of the basic electricity price and fluctuating price forms the final price. The smart energy planning unit captures the electricity price information and effectively plans the electricity consumption behavior of consumers. The optimization goal is to maximize the economy of electricity consumption and the total social welfare. The linear weighted evaluation function method is used to optimize multiobjective. Upload the consumers' electricity data to complete the two-way data transmission. The State Grid should strengthen the understanding of consumers' electricity consumption. Taking a single day as an example, the number of electrical appliances for this consumer is 13. The simulation results show that the user's weekly electricity comfort and electricity price parameters show a trend of first growth and then stability, and the reasonable setting of parameters plays an important role in the user's electricity comfort.

DATA AVAILABILITY STATEMENT
The raw data supporting the conclusion of this article will be made available by the authors, without undue reservation.

AUTHOR CONTRIBUTIONS
SW is responsible for the determination of the research direction of the paper. YZ is responsible for the editing of the text. WG is responsible for the determination of the method. AW is responsible for the data source. DL is responsible for optimized calculations. All authors contributed to manuscript revision, read, and approved the submitted version.