Operation Strategy of Electricity Retailers Based on Energy Storage System to Improve Comprehensive Profitability in China’s Electricity Spot Market

: Due to the development of China’s electricity spot market, the peak-shifting operation modes of energy storage devices (ESD) are not able to adapt to real-time fluctuating electricity prices. The settlement mode of the spot market aggravates the negative impact of deviation assessments on the cost of electricity retailers. This article introduces the settlement rules of China’s power spot market. According to the electricity cost settlement process and the assessment methods, this paper proposes a comprehensive electricity cost optimization algorithm that optimizes day-ahead market (DA) electricity cost, real-time market (RT) electricity cost and deviation assessment through ESD control. According to the trial electricity price data of the power trading center in Guangdong province (China), many typical load curves and different deviation assessment policies, the algo-rithm calculates DA electricity cost, RT electricity cost and deviation assessment cost by utilizing a comprehensive electricity cost optimization algorithm. Compared with the original electricity cost and optimization cost, this method is proven to effectively save overall electricity costs under the spot market settlement system. Based on three different initial investment prices of ESD, this paper analyzes the economics of the ESD system and proves that ESD investment can be recovered within 5 years. Considering the small amounts of operating data in China’s power spot market, the algo-rithm generates random data according to characteristics of these data. Then, this paper verifies that the comprehensive electricity cost optimization algorithm remains reliable under random circum-stances.


Preface
With China's electricity trading market reformed deeply, the Electric Power Trading Center begun spot trading preparation work in the Guangdong province, the western part of Inner Mongolia and Shandong province in accordance with local conditions.In the province of Guangdong, electric power trading centers had started power spot trading trial operations, which combines day-head (DA) market, real-time (RT) market and deviation assessment in several indefinite days during each month with the settlement method [1].assessment.Due to energy storage technology developments, the developments are widely used on the customer side of the power system and adopts an arbitrage mode of peak-shaving.However, electricity costs are settled according to real time retail prices, and the energy storage equipment on the customer's side will lose arbitrage space through peak shifting after electricity spot trading applications.
On the power generation side, many researchers work on the optimization operations of power generation in order to adapt to the electric power spot market.In the power market, electricity retailers appear as new entities that face many new problems.In literature [2], the authors of this paper analyzed the centralized market, decentralized market and other different electricity market rules and combed different pricing methods of the generation side and the consumption side of the spot market in different regions of China.
In literature [3], aiming at the operators of power selling companies in the spot market, the risk assessment algorithm, CVaR, was used to analyze power purchase strategies in medium-term and long-term markets and spot markets by taking into account renewable energy, distributed energy, rental ESD and other factors.In paper [4], the authors focused on a virtual power plant (VPP) in the power spot market.They conducted research on the quotation and operation optimization in the DA market and RT market and studied the impacts of market uncertainty on VPP operation by using the CVAR method.In paper [5], the authors focused on the Turkish electricity spot market, and they established a multistage risk model combined with the price prediction model, which can dynamically manage portfolios in order to reduce risks.In literature [6,7], in the two-stage dispatching control of the DA market and RT market, power was dispatched through VPP and microgrid, and a risk preference model utilizing the CVaR method was established.In paper [8], for the DA market and regulatory market, the energy hub operator uses the stochastic mixed integer linear programming (MILP) method and takes into account the CVaR method in order to optimize scheduling of electric energy and natural gas procurement.In literature [9][10][11], from the composition of power purchase and sales, this paper studies power purchases and sales decisions of power retailers in medium-term and long-term contracts, DA markets and RT markets and considers the uncertainty of power generation, user demand response and other influencing factors.In papers [12,13], according to the RT electricity pricing situation, the authors carried out short-term load data forecast and obtained accurate fluctuation ranges.In literature [14], with respect to the spot market, the authors predicted RT electricity prices by utilizing the random forest regression method.In literature [15], the authors established electricity purchase models with robust optimization in order to reduce the impact of electricity price forecast errors by considering long-term transactions, spot trading and self-operated power plants.In literature [16], based on avoiding the risks of the balance market, the authors studied optimized trading strategies of the balanced market by establishing consumer demand-side response models and the electricity retailer's planning model.In papers [12,17], the authors studied the negative impact of deviation assessment on the revenue of electricity retailers, and they provided an idea to reduce deviation assessment by utilizing ESD.In paper [18], the CCHP mode was adopted in order to adjust system load.The authors established a rolling optimization model of deviation electricity in order to reduce deviation assessment in the RT market.In paper [19], in the assessment of deviation electricity in the RT market, the authors studied different contract transactions with ESD stations in order to improve the economy of electricity retailers.In paper [20], the research objective was aimed at total electricity purchase cost optimization of electricity retailers, which provides power to electric vehicles.In paper [21], electricity retailers analyzed pricing strategies for five different types users and introduced demand-side incentive policies.In literature [22], electricity retailers and energy storage operators were independent of each other.Energy storage operators served the grid by stabilizing load demand.Electricity retailers need to purchase and sell electricity from energy storage operators and the grid, respectively.Paper [23] focused on a micro-grid system with EV charging stations, which optimizes the operating costs of the ESD in the charging stations by utilizing mixed integer linear programming (MILP), and the optimization configuration of capacity and power of the ESD was obtained.In document [12], the electricity retailer leases the user's energy storage equipment, which is used to adjust electricity deviation.In paper [24], the electricity retailer has distributed power generation assets.In this paper, the decision goal is to obtain the ratio of power in the DA market relative to load forecast, which can combine DA markets and RT markets according to the constant price in the DA market.
The current body of research on the operation strategy of electricity retailers mainly refers to the settlement mechanism of electricity markets in Europe and the United States [13,25,26] and focuses on the strategy of medium-term market, long-term market, DA market and RT market.Research on settlement rules, electricity price and load fluctuation characteristics in China's electricity market has been lacking.Several research studies conducted on power purchase cost optimization mainly focused on the deviation of electricity [12], which does not comprehensively consider power purchase costs in DA markets and RT markets.
In this paper, based on the trading rules, electricity price data on trial operation days and load deviation data from the annual report of the Guangdong Electric Power Trading Center, a two-stage comprehensive optimization including both DA market and RT market is proposed in order to achieve a comprehensive reduction in the purchase costs of electricity retailers.In this article, the first chapter introduces China's current power trading policies and the rules of trial power spot market trading.The second chapter introduces the economic dilemma of ESD under peak-shifting operations and the negative impact of load deviation on the revenue of electricity retailers.The third chapter introduces a two-stage comprehensive optimization method including DA and RT markets.In the first stage, which is the DA market, according DA electricity prices, the declared load curve of the DA market is adjusted in order to reduce electricity purchase costs.In the second phase, which is the RT market, based on the optimization result of first stage and deviation assessment coefficient, the deviation between declared load and RT electricity load is adjusted in order to achieve electricity purchase cost optimization by controlling ESD outputs.In the fourth chapter, based on the trial operation data of Guangdong Electric Power Trading Center, a verification is demonstrated, and the comprehensive optimization algorithm is shown to effectively reduce electricity costs.On this basis, according to the investment cost analysis of ESD, the investment return rate of the strategy for electricity retailers with ESD is pointed out.By utilizing random data, the feasibility of the strategy under random load forecast errors and random electricity price changes is verified.Finally, we demonstrate that this control strategy can effectively improve the operating efficiency of electricity retailers in real-time random spot markets.

International Electricity Market Transaction Policy
The United States, Britain and other European countries formulated power market policies according to their own conditions; the countries constantly adjust and optimize their electricity market systems during the process of market operation over the duration of many years.
The PJM power market in the United States adopts a centralized power market, including power market, capacity market, auxiliary service market, etc.The power market covers medium and long-term bilateral transactions, including DA market and RT market.Both the power generation side and the power consumption side participate in the declaration of electricity quantity and electricity price.The settlement cost of PJM includes the following: blocking surplus expenses and compensation expenses.In the DA market and RT market, the deviation caused by users is assessed, which compensates operating power generation [27].The UK electricity market utilizes a decentralized electricity market.The trading mechanism includes medium and long-term transactions and unbalanced settlements are used afterwards, which compensate start-up, stop and no-load cost of generation units.In the Australian electricity market, the spot market is the core transaction, which centers around unilateral bidding and 24 h rolling clearing from the power generation side, without distinguishing DA markets and RT markets [28].

Constant Electricity Price Transaction Mode in the Electricity Market
Power trading policies vary in different provinces of China.The basic trading methods include bilateral negotiation, centralized bidding, listing transaction and so on [2].There are two kinds of price models: fixed price and peak-valley price.The peak-valley price model is widely used due to requirement of side regulation.Deviation of power consumption should be assessed, such as deviation of power consumption in each month and deviation between trading volume and actual consumption which would be punished.Therefore, user-side electricity costs include the following: electricity cost and deviation assessment.

Spot Trading Model in the Electricity Market
With the opening of China's power market, some provinces and cities have gradually carried out power spot market reforms.In August 2017, Guangdong, Mengxi, Zhejiang, Shanxi, Shandong, Fujian, Sichuan and Gansu were established as pilot areas of the power spot market.In 2020, Xinjiang, Anhui, Jiangsu, Jiangxi, Heilongjiang, Qinghai and Shaanxi released the construction scheme of the power spot market.In March 2021, Liaoning province, Jiangsu province, Anhui province, Henan province and Shanghai were established as pilot areas of the power spot market.Among the first batch of pilot areas, Guangdong province constructed the power market quickly.It adopts a centralized power market system similar to PJM, including medium and long-term markets and a spot market.In 2019, the province carried out trial operation settlement based on a daily time scale.The power markets in other pilot areas carried out trial operations based on a monthly time scale.
Due to the different construction progress of the power market in each pilot area, the time scale of deviation assessment, the range of deviation assessment 0 λ and the devia- tion assessment price are all different.Table 1 shows the range of deviation assessment in different regions.In the regions with monthly settlements, the deviation assessment price adopts coal power on-grid prices, multiples of annual transaction average prices and so on.In Guangdong regions with daily settlements, the regions adopted the price difference between DA markets and RT markets.Take the power spot market trading policy issued by Guangdong power trading market in June 2018 as an example [29][30][31][32], its settlement rules include three parts: DA market, RT market and deviation assessment.The daily electricity cost settlement is shown in Equation (1), in which the DA market settlement, RT market settlement and deviation assessment parts are shown in Equations ( 2 In C , as shown in Equation ( 5).In accordance with the above settlement rules, Guangdong province started trial operations on some trading days in May 2019.

Impact of Peak-Valley Price Difference on Electricity Retailer
In the peak-valley electricity price mode, the consumer can operate in the peak-shifting mode in which ESD is configured.The load curve of the electricity metering point can be adjusted to reduce electricity costs [33].This model is currently widely used, as shown in Figure 1.The optimization goal of its control is shown in Equation ( 6), in which t is peak-valley price, and ( ) load P t is the load curve of consumer side.
Due to the adjustment of peak-valley price policies in recent years [7], the difference in peak-valley prices has decreased in most regions, which results in the economic decline of peak shifting modes.According to the current construction cost of ESD, it is economical when the peak-valley price difference is more than 0.7 CNY/kWh.As shown in Table 2, only a few areas can meet its conditions.

The Impact of Deviation Assessment on the Cost of Electricity Retailer
Take the policy of Guangdong electric power market as an example, the deviation assessment coefficient of it is 2%, and the amount of electricity that exceeds the assessment range is assessed at twice the price.According to the annual report data of the Guangdong Electric Power Company in 2018 [34], relevant data are shown in Figure 2. The average deviation rate of the demand side is 8.7% and deviation rate achieved 18% in February.The annual sales revenue of the electricity retailer is CNY 770 million, and the deviation assessment is CNY 170 million.The above deviation assessment fee is based on the results of monthly assessments.With the development of the power spot market, many regions gradually adopted daily deviation assessment in China.Since the deviation fluctuation of daily loads is much higher than that of monthly loads, the deviation cost will be very high.It can be obesrved that the deviation assessment seriously affects the benefits of electricity retailers.According to the Guangdong Electric Power Company annual report in 2019, relevant data are as shown in Figure 3.The average deviation rate of the demand side is 6.3%, and the maximum deviation rate is 7.1%.The annual sales revenue of the electricity retailer is CNY 1.17 billion, and the deviation assessment is CNY 40 million.This shows that the deviation assessment fines seriously affect the profitability of electricity retailers.

Impact of Emergencies on the Operation of Electricity Retailers
With the advancement of the power market, due to the random fluctuations of the spot market electricity price and the deviation assessment policy, electricity retailers are required to improve the accuracy of load forecasting and to respond to the fluctuation of electricity price in time, which can reduce electricity costs and deviation assessment costs.
However, the sudden situation imposes negative impacts on the fluctuation of electricity prices and power loads in the spot market.For example, in Australia, the change of renewable energy power results in sharp fluctuations of RT electricity prices [35], which results in incorrect decision making on the part of the electricity retailer in the DA market.For example, COVID-19 has led to a sharp decline in power load growth in 2020.Table 3 shows China's electricity growth data in the first three quarters, showing an obvious downward trend [36].Due to the fact that electricity retailers cannot respond to the fluctuation of load forecasting in time, a large number of deviations in assessment costs resulted.Jiangxi, Jiangsu, Fujian, Guangdong, Xinjiang and other provincial and municipal governments temporarily exempted some deviation assessments.Hunan province temporarily adjusted the deviation assessment range from ±3% to ±8%.Therefore, it is an urgent requirement for electricity retailers to optimize operation and management in order to effectively confront price changes and load deviations.

Impact Analysis of Electricity Retailer Operation Based on the Electricity Spot Market Policy
According to the electricity spot market settlement rules introduced in Section 2.2 the electricity bill settlement process is shown in ( )

Electricity Cost Comprehensive Optimization Algorithm of Electricity Retailer in Spot Market
According to the analysis in Section 3.1, synthetic optimization considers three parts of electricity purchase costs, which includes electricity cost of the DA market, electricity cost of the RT market and deviation assessment penalty for reducing electricity retailer costs.The optimization goal is shown in Equation (7).
According to the declaration rules of the electricity retailer and the settlement procedures of the trading center, the state flow of comprehensive optimization electricity costs of the electricity retailer is shown in Figure 5.The original declared load curve of the electricity retailer is DA P according to forecast load rep P .Before the Nth day, the optimized value of the load declared is In PJM of the United States, Guangdong, Shandong, Zhejiang and other province in China, the spot market includes DA market and RT market, including the compensation settlement mechanism for power deviation.The settlement method is similar to the process shown in Figure 4.The optimization algorithm in Figure 5 is suitable for these markets.In Australia, the spot electricity market does not distinguish between the DA market and RT market.The British electricity market adopts a post unbalanced settlement mode.The optimization method is not applicable to this kind of electricity market mechanism.

Optimization Strategy of Electricity Cost in DA Market
In the past, the electricity retailer declared DA load ( ) DA P t based on the predicted load rep P .The DA electricity cost optimization algorithm module uses the optimization algorithm described in Section 2.2, which is shown in Figure 5.By utilizing ESD output adjustments, the DA declaration load is The constraints are shown in Equation (9).

Comprehensive Electricity Cost Optimization Algorithm
Due to environmental factors, demand changes and other reasons, various load forecasting algorithms have inevitable errors [37].Since it lacks the auxiliary management of the price convergence mechanism of virtual transactions in the Guangdong power market, RT electricity prices and DA electricity prices will inevitably have large-scale deviation [17,38].The deviation from _ ( ) DA plan P t obtained in Section 4.2.1 and the actual load de- mand RT P inevitably result in RT electricity costs and deviation assessment costs, as shown in Equations 3 and 4. In comprehensive optimization module shown in Figure 5, the correlation variables ( ) The constraints are shown in Equation (13).
As shown in Equation ( 14

Simulation and Analysis
Previous studies on the electricity market mostly used foreign data such as PJM, which lacked relevance to China's electricity market.In Guangdong province, trial operation of the power spot market between May and June 2019 begun.The electricity price data of five trial operation days were published by the power trading center, as shown in Figure 6a-e.According to the deviation analysis of the Guangdong power market in Section 2.2, the average deviation rate on the demand side is 10% [37].In Figure 6f, a typical load curve of electricity retailers is shown, and the deviation is about 10 % between the forecast load rep P and the real load real P .A3.
According to the settlement method in the Guangdong power spot market, the electricity costs of electricity retailers without any control strategies are shown in Table 4.

Case Analysis of Comprehensive Optimization Electricity Cost of Electricity Retailer
In order to improve the efficiency of the electricity retailer, the comprehensive optimization algorithm designed in Section 4.2.1 is used to realize declaration load optimization of the electricity retailer and the power control of ESD in real-time operation, which can achieve the goal of comprehensively reducing the cost of electricity purchase.2. Total cost of electricity purchase using only DA tariff optimization strategy.
Based on the recently declared load optimization results, the RT electricity price and deviation assessment, the RT electricity cost RT E is calculated.Due to load deviation in- creases as the energy storage configuration increases, which is shown in Figure 7, the deviation from _ DA plan P and real P also increases, which result in RT electricity cost in- creases, as shown in Figure 9a.Since the deviation assessment is not only related to load deviation but also to the changing trend of RT and DA electricity prices, the effect of the DA electricity tariff optimization strategy on deviation assessment is uncertain, as shown in Figure 9b.
In Figure 9c, the deviation of the new electricity cost relative to the original electricity cost (shown in Table 2) is demonstrated.Due to the influence of RT E and allocation E , the new electricity cost on some trial days is higher than its original electricity cost, which means that DA electricity cost optimization cannot be used on the electricity spot market settlement method.According to different energy storage configurations, the RT electricity cost RT E ob- tained by the comprehensive optimization method is shown in Figure 12, which is greatly reduced compared with the RT electricity cost under different operation methods shown in Table 2 and Figure 9. Compared with the original total power cost in Table 2, the power cost with comprehensive optimization strategy is significantly reduced.The reduction value increases with an increase in energy storage configurations, as shown in Figure 13.

Economic Analysis of ESD under Comprehensive Optimization Algorithm
According to the analysis results in Section 5.1.2,it is verified that the comprehensive optimization method can effectively reduce the cost of electricity purchase.Since the goal of this optimization method is to minimize electricity costs, its calculation is based on the DA load forecast rep P for which its error is inevitable [37].In the comprehensive optimi- zation algorithm,    The unit prices of ESD capacity and power are shown in Table 5.According to configuration of required ESD and different price in Table 5, the initial ESD investment cost is shown in Figure 15a-c.The recovery period of ESD investment is calculated by the electricity cost saved, which is shown in Figure 13, by utilizing the comprehensive optimization algorithm.In order to obtain the economics of the energy storage device, the relative relationship between the investment cost of the energy storage device and the electricity cost savings is analyzed [33].When the capacity configuration constraint is 8000 kWh, the cost recovery years tend to be stable under three different price in Table5, as shown in Figure 16a-c.In Table 6, the cost recovery period, which is the optimization result with a typical load curve, trial operation electricity prices and three ESD prices are shown.The system can recover investment costs in 3 to 5 years with the third ESD price.

Effectiveness Verification of Comprehensive Optimization Algorithm with Different Deviation Assessment
Section 2.2 introduced power market policies in different regions of China in which the ranges of deviation assessment and the assessment price are different, and they are adjusted according to the actual situation.For example, in Guangdong province, the range of deviation assessment was relaxed from ±2% to ±4%.
Take the price data in 15 May 2019 as an example, in the comprehensive optimization algorithm, min K and max K are set to ±2% or ±4%, respectively.fee K is set to one or two, respectively.Table 7 shows the changes of electricity cost under different deviation assessment policies.It can be observed that the optimization algorithm effectively controls the deviation range between the RT load and the DA declared load.Thus, the deviation assessment cost is always zero.The deviation assessment coefficient has no impact.With the reduction in deviation assessment range, the increase in electricity cost in the RT market results in the increase in total electricity cost.

Effectiveness Verification of Comprehensive Optimization Algorithm with Typical Load in Four Seasons
In order to verify the effectiveness of the comprehensive optimization algorithm for different seasonal loads, the electricity cost based on the typical load of four seasons of the tertiary industry in a Chinese province is calculated.As shown in Table 8, taking the price data in 15 May 2019, there are various electricity costs of the typical loads during the four seasons without utilizing the optimization algorithm.A4.
According to the DA electricity price, the daily declared load curve is optimized to effectively reduce the daily electricity cost.The real-time settlement load is optimized according to RT electricity price.Electricity cost in the RT market is effectively reduced, and load fluctuation is smaller than the deviation assessment range by utilizing optimization control, which resulted in a deviation assessment cost that is always zero.The corresponding electricity cost in Table 9 is significantly lower than that in Table 8.

Effectiveness Verification of Comprehensive Optimization Algorithm with Random Load
In Section 4.1, the energy storage system can recover costs based on the typical load curve calculation of 10% forecast deviation.In order to verify the feasibility of the comprehensive optimization algorithm with random conditions of load forecast errors, 10% random error between DA forecast load curve and RT load demand curve is used to optimize the power purchase cost.As a result, electricity costs, capacity and power configuration of ESD and cost recovery period are saved.
By utilizing the comprehensive optimization algorithm, 100 sets of random load curve data are generated to obtain the calculation results, such as ESD capacity demand, ESD power demand and recovery year, with electricity prices in 22 June which is shown in turn in Figure 18a-c with an outlier box plot.The average recovery period is 5 years.By using the comprehensive optimization algorithm, the average values of ESD configuration capacity, power and cost recovery period obtained with five trial electricity price data and the same random load curves are obtained, as shown in Table 10.

Effectiveness Verification of Comprehensive Optimization Algorithm with Random Electricity Price
In Figure 19a-e, the deviations of the DA electricity price and RT electricity price of five trial electricity price data used in this paper are shown.In Table 11, the average, maximum and minimum values of electricity price deviation are shown.Electricity price fluctuations are random data for an electricity retailer.Considering that there are few trial operation electricity price data shown above, according to the deviation characteristics of electricity price data in Figure 19, five types of random data are shown, which include 100 sets of randomly distributed electricity price data based on the same mean and limit range of five trial electricity price data.Based on the typical load data, the average recovery years by utilizing the comprehensive optimization algorithm are shown in Table 12.This proves that the comprehensive optimization algorithms can save electricity purchase costs with different electricity price data.

Conclusions
This paper studies the negative impact of ESD operation strategy and the cost of electricity retailers after the operation of the spot market in China.This paper introduces the settlement rules of the Guangdong Electric Power Trading Center in detail and proposes a comprehensive power cost optimization algorithm.This method is suitable for the settlement process of the spot market of electric power.It realizes DA electricity cost optimization in the DA market.Then, through the constraint of deviation between DA declaration load and RT settlement load, the algorithm obtains an RT settlement load, which realizes the comprehensive optimization of RT electricity cost and deviation assessment.This method can effectively reduce the cost of electricity retailers.This method can be applied to a centralized power market with two-stage transactions.According to different policies, the ESD cost and load forecasting accuracy, the algorithm can adjust the relevant parameters in the optimization algorithm.Then, the algorithm can obtain the amount of electricity saved, the ESD configuration parameters and its cost recovery period.The algorithm can effectively reduce the power cost of the electricity retailer and avoid additional expenditures caused by load forecast errors.According to the unit capacity price of 600 CNY/kWh, the unit power price of 300 CNY/kW and random load fluctuation within 10%, the cost of ESD can be recovered within 5 years.
According to the review of power market policies and development in many countries and regions, due to unexpected situations such as fluctuations of renewable energy and COVID-19 in recent years, abnormal fluctuations of RT electricity prices and the decline of load forecasting accuracy have caused great difficulties for electricity retailers.The difference and uncertainty of deviation assessment policy also put forward higher requirements for electricity retailers.In the process of market operation, third-party electricity retailers without monopoly resources need to continuously improve their advancement and adaptability in market changes through technological progress.The effectiveness of the comprehensive optimization algorithm is verified under the scenarios of different load periods, different deviation assessment policies, random load fluctuations and random RT electricity price fluctuations.In this paper, an effective solution for electricity retailers to confront the uncertainty of the electricity spot market is presented.

E
The first component of allocation E

Figure 1 .
Figure 1.Schematic diagram of demand-side operations with ESD under peak-valley electricity prices.

Figure 2 .
Figure 2. Electricity demand-side deviation rate of Guangdong province in 2018.Figure reference: Guangdong Electric Power Trading Center: 2018 annual report of Guangdong electric power market.

Figure 3 .
Figure 3. Electricity demand-side deviation rate of Guangdong province in 2019.Figure reference: Guangdong Electric Power Trading Center: 2019 annual report of Guangdong electric power market.

Figure 4 .
The electricity retailers provide the declared load ( ) DA P t in DA market based on load forecast data.The trading center an- nounces DA market electricity price ( ) DA C t 24 h in advance.The trading center can calculate the electricity expenses in DA market DA E .Due to the deviation between the actual load and the declared load, the deviation between ( ) DA C t and ( ) RT C t and different set- tlement times of DA E , RT E and allocation E , this method cannot effectively reduce the total electricity cost.

Figure 4 .
Figure 4. Time flow of electricity cost settlement in spot market.Figure reference: Guangdong Electric Power Trading Center: detailed rules for the implementation of spot electric energy market transactions in Guangdong and detailed rules for the implementation of transaction settlement in Guangdong electric power market, November 2018.

_Figure 5 .
Figure 5. State flow of total electricity cost optimization algorithm of electricity retailers.
optimization objective function is shown in Equation(8), which achieves optimization of the electricity cost in DA market of ESD power and capacity in the DA optimization algorithm.

(
power and capacity in the comprehensive electricity cost optimization algorithm.min K and max K are set according to the deviation assessment index. min

Figure 6 .
Figure 6.Electricity price curve and typical load curve in Guangdong electricity spot market.Figure reference: Figure (ae): Network public data of electricity price; refer to Appendix Tables A1 and A2. Figure (f): Network public data of typical load curve of load consumer in Guangdong; refer to Appendix TableA3.
Figure 6.Electricity price curve and typical load curve in Guangdong electricity spot market.Figure reference: Figure (ae): Network public data of electricity price; refer to Appendix Tables A1 and A2. Figure (f): Network public data of typical load curve of load consumer in Guangdong; refer to Appendix TableA3.

5. 1 . 1 .
Analysis of the Electricity Purchase Cost with DA Electricity Cost Optimization Algorithm 1. Electricity purchase costs in DA market only by using the DA electricity cost optimization algorithm.In Figure6f, DA P is the DA forecast load of the electricity retailer.The constraint of ESD power configuration value of n is between 1 and 10.According to the DA electricity cost optimization algorithm strategy shown in Section 4.2.1, the optimization curve of the 24 h declared ahead load _ DA plan P under the trial operation price data is shown in Figure 7. Figure 7a,b show _ DA plan P with the storage capacity constraint and the power constraint when the value of n is 1 or 10, respectively.With the increase in ESD constraint settings, the corresponding optimization results of the DA electricity cost are shown in Figure 8.With the DA electricity cost optimization algorithm, the DA electricity tariff presents a downward trend with increases in energy storage configuration parameters.

Figure 7 .
Figure 7. Optimization of DA declared load curve.

Figure 9 .
Figure 9. Trends of RT electricity cost, deviation assessment and total cost with DA optimization algorithm.

Figure 10 .Figure 11 .
Figure 10.Load control command on real-time operation day.The difference between the actual trading load and the DA declared load is shown in Figure11a,b.The figure demonstrates that the fluctuation amplitude is effectively limited within 2% with the minimum and maximum energy storage configurations.As the deviation fluctuation is limited within the range K, the deviation assessment electricity cost allocation E is always zero.

Figure 13 .
Figure 13.Decreased amplitude of total electricity cost with comprehensive optimization.
of ESD in Equation(13).By utilizing the comprehensive optimization algorithm, batt P and batt CAP are the actual power and capacity demand of ESD shown in Equation (14), which increases with the increase in configuration constraint ranges, as shown in Figure14a.Due to the restriction of deviation constraint condition K, the maximum value of in Figure14b.

Figure 14 .
Figure 14.Actual configuration requirements of energy storage device.

Figure 15 .
Figure 15.Initial investment cost of ESD with different unit price.

Figure 16 .
Figure 16.ESD investment recovery period by using the comprehensive optimization algorithm.

Figure 17a -
Figure 17a-c shows the typical load and RT load of four seasons in turn.And the appropriate DA declaration loads and real-time settlement loads obtained by utilizing the comprehensive optimization are shown.

Figure 17 .
Figure 17.Typical load, RT load, DA load and RT settlement load during the four seasons.Figure reference: rep Figure 17.Typical load, RT load, DA load and RT settlement load during the four seasons.Figure reference: rep P refers

Figure 18 .
Figure 18.Box plot of ESD capacity demand, ESD power demand and recovery year based on random load.

Figure 19 .
Figure 19.Distribution of deviation between DA electricity price and RT electricity price.

Table 2 .
Difference of peak-and-valley electricity prices in China.

Table 3 .
Electricity growth changes in the first three quarters of 2020 in China.

Optimized Operation of Electricity Retailer in the Electricity Spot Market
t between the DA declared load By combining the settlement process of DA markets and the RT markets, optimization calculations can provide the minimization goal cost (12)The optimization objective function is shown in Equation(11), and the deviation assessment expression relationship is shown in Equation(12).
), based on the optimization declared load ( )RT P t is the actual power demand._ ( )

Table 4 .
Electricity costs of original load curve.

Table 5 .
Cost data of energy storage device.

Table 6 .
Recover year of ESD.

Table 7 .
Electricity costs with different deviation assessment policies.

Table 8 .
Electricity charges without comprehensive optimization algorithm.

Table 9 .
Electricity costs with comprehensive optimization algorithm.

Table 10 .
ESD configuration and cost recovery years through comprehensive optimization.

Table 11 .
Deviation range of trial operation electricity price and corresponding recovery years.

Table 12 .
Average recover year based on random electricity prices.

Table A3 .
The declared load in DA market based on the load forecast data Consumer typical load in Guangdong province.
DA P

Table A4 .
Typical load of a province in four seasons.