Bi-level decomposition algorithm of real-time AGC command for large-scale electric vehicles in frequency regulation

,


INTRODUCTION
With the 'carbon peak' and 'carbon neutrality' goals proposed, the power system based on renewable resources has received extensive attention [1].While renewable resources bring new development opportunities, their randomness and volatility cause great challenges to the frequency stability of the power grid and increase the frequency regulation (FR) pressure.Nowadays, the traditional FR units in China are mostly thermal power units and hydropower units, and the thermal power units are the main component.The delay in data transmission and the low ramp rate of the unit often occur when the thermal power unit participates in AGC.The phenomenon leads to low adjustment rate, poor adjustment accuracy, slow response speed, and accelerated aging of the unit [2].Especially under the implementation of the 'Two Rules' [3], the FR based on traditional thermal power units has been unable to better meet the requirement of the new power system.Therefore, it is urgent to study new regulation resources applied to improve the frequency stability of the grid.
As a generalized form of energy storage, electric vehicles (EVs) use their characteristics to provide the FR service for the power grid, which is a promising V2G project [4].With the 'New Energy Vehicle Industry Development Plan (2021-2035)' and other policies put forward, the sales of the new energy vehicle (NEV) will reach about 20% of the total sales of new cars by 2025, which leads that the scale of EVs in China will become larger and larger.The large-scale EVs can provide: 1) power from MW to GW; 2) continuous discharging time with hour level; 3) response speed in milliseconds; 4) accurate control and the stability at any power point.According to this series of characteristics, EVs are well in line with the requirements of the "Two Rules" in the AGC performance assessment.So there have been some studies focusing on large-scale EVs participating in AGC services in the form of aggregators, which are mainly divided into three aspects: 1) Real-time dispatchable ability evaluation of the aggregator; 2) Method of the aggregator to obtain the AGC command; 3) Method of each EV to obtain the AGC command inside the aggregator.
In the first part, current studies mainly evaluate the dispatchable ability of EVs by means of prediction.Considering the temporal-spatial dual uncertainty, reference [5] evaluates their dispatchable ability by Monte Carlo method using the random travel chain.Reference [6] uses a large amount of history data to predict the dispatchable ability of EVs through machine learning.However, the accuracy of prediction will be limited by the amount of historical data.Nowadays, communication technology has already met the needs to obtain real-time data of large-scale EVs, so it can evaluate the real-time dispatchable ability of the aggregator through real-time data.
In the second part, there have also been some studies on the command decomposition between the aggregator and AGC units, including decomposition based on frequency domain characteristics, AGC performance assessment, and economic factors.1) In terms of frequency domain characteristics, reference [2] uses the empirical mode decomposition (EMD) to decompose the FR deviation of thermal power units into the high frequency, medium frequency and low frequency part.Considering the characteristics of supercapacitors, batteries and aggregated EV resources, each FR resource responds to the corresponding type of AGC command respectively, so as to realize the effective decomposition of AGC command between the aggregator and the traditional unit; 2) In terms of the AGC performance assessment, reference [7] proposes a multi-agent cooperative control algorithm for multi-regional and multi-energy microgrid clusters, which considers CPS as the evaluation index to obtain the optimal AGC control strategy corresponding to each unit and the aggregator respectively.Reference [8] uses an improved deep deterministic gradient algorithm to dynamically allocate the power between AGC units and the aggregator from the three aspects of the AGC performance assessment: regulation rate, response time and regulation accuracy; 3) In terms of the economic factors, reference [9][10][11][12] model the decomposition of the AGC command between AGC units and the aggregator with the aim of minimizing the AGC response cost and the respective constraints of EVs and AGC units.Reference [13] aims to minimize the ACE tracking error and AGC response cost according to different time scales of AGC units and the aggregator under the condition of satisfying the basic constraints.
In the third part, some research has been carried out on the AGC command decomposition among EVs.Reference [14][15] use the charging time margin to measure the charging urgency of each EV, so as to decompose the AGC command well considering the charging demand.Reference [16][17] decompose the AGC command among EVs according to the dispatchable power of EVs so that the overall power of each EV tends to be the same.However, the above two decomposition strategy is only from the perspective of meeting the charging demand, and ignore the battery life loss.Reference [18][19] combine the life loss and the dispatchable ability of EVs simultaneously in the weighting method to determine the priority of each EV, but the model for the life loss is too simple and the weight determination is too subjective.Reference [20][21] use the idea of optimization to consider the life loss of EVs participating in the AGC service.However, the optimized solution speed is difficult to meet the time accuracy of AGC due to the large number of EVs.
This paper studies the optimal decomposition of the real-time AGC command from the power grid to EVs based on the established framework of information interaction between them.A bi-level decomposition algorithm considering the network model in combination with real-time dispatchable information of EVs is proposed.In the bi-level decomposition algorithm, on the one hand, the upper level decomposes the total AGC command between the aggregator and the AGC unit with economy as the goal and safety as the constraint considering the network model.On the other hand, the lower level decomposes the command between each EV in the aggregator based on the real-time dispatchable power and the battery life loss under the condition of meeting the demand for EVs.Through the analysis of the study case in this paper, the upper level decomposition algorithm is more compatible with the participation of EV aggregators from the perspective of safety and economy, and the lower level decomposition algorithm effectively considers the charging demand of each EV in terms of the travel demand and battery life loss.

INFORMATION INTERACTION FRAMEWORK FROM THE POWER GIRD TO EVS
As shown in Fig. 1, in each dispatchable cycle, the information interaction process between EVs and the power grid is divided into two parts: real-time information reporting and real-time AGC command decomposition, which will be explained in Section 3.1 and 3.2 respectively.The information interaction in these two links revolves around the power grid level, the aggregator level, and the EV level.The real-time information reporting link is carried out from bottom to top.The EV level reports the real-time information of each EV to the aggregator level and the aggregator level reports the real-time dispatchable power and the AGC response cost to the grid level; The real-time AGC command decomposition is carried out from top to bottom, and the grid level decomposes the total AGC command into each AGC unit and the aggregator level, and the aggregator level decomposes the obtained real-time AGC command to each EV.The power grid obtains the frequency deviation in the calculation area and the exchange power deviation of the external tie line through real-time monitoring to calculate the corresponding regional control deviation.Then input the deviation, and output the total AGC command that the entire area needs to respond to after filtering and PI control process [22].The whole process is shown in Fig. 2.

B
Filter PI presents the total AGC command that the entire area needs to respond to.

Real-time information of the aggregator level 1) Real-time dispatchable power of the aggregator level
With the development of communication technologies such as optical fiber and wireless communication, real-time status monitoring of EVs can be realized.So the real-time charging data of EVs can be used to calculate their real-time dispatchable power.Compared to some previous artificial intelligence algorithms, this method of using real-time data has higher calculation accuracy.
In the condition of meeting user charging demand, the feasible region of the dispatchable ability for the corresponding EV can be calculated during the entire dispatchable period considering the travel constraint, the power constraint, and the capacity constraint in Fig. 3. To meet the time precision of the AGC command, the dispatchable ability during the entire dispatchable period should be turned into the real-time dispatchable power at the current time.If the power of EV is between the maximum discharging power and the maximum charging power, it has the ability to respond to the AGC command.
The upper limit and lower limit of feasible region can be obtained by using the real-time data, including the current capacity status of the EV, the end charging time, and the desired capacity status, so as to calculate the dispatchable power of each EV.
Where EV , jt S presents the planned capacity of the j th EV at the current moment; EVbase , j t+ t S  presents the minimum capacity of the j th EV at the next moment; plug-out j t presents the end charging time of the j th EV; j,t P presents the planned charging power of the j th EV at the current moment; ,, , j t j t PP  present the power of the j th EV that can be adjusted up and down at the current moment respectively; EVdep j S presents the desired capacity when the j th EV leaves; max max , PS present the upper limit of charging power and the upper limit of capacity respectively; ch dis ,  presents the charging efficiency and discharging efficiency.Using equation ( 1)-(3), the real-time dispatchable power of the EV can be calculated, in which the equation ( 1) is used to calculate the base capacity at the current moment, so that EVs participating in the AGC service does not affect the user's demand, equation ( 2) and (3) correspond to the power that can be adjusted up and down during this period.Because the charging efficiency of EV batteries is different from the discharging efficiency of that, it is necessary to classify and discuss to calculate the power that can be adjusted down.In the case of reverse discharge, the discharging efficiency needs to be used for calculation.
The real-time dispatchable power of single EV is relatively small, but from the perspective of an aggregator, making good use of the real-time dispatchable power of large-scale EVs can have a great impact on the power grid.By accumulating all EVs connected to the aggregator during the corresponding period, the real-time dispatchable power of the aggregator can be obtained.agg, , 1 In which agg, agg, , tt PP  present the power of the aggregator that can be adjusted up and down at the current moment respectively, t N presents the number of EVs connected to the aggregator at the corresponding time.

2) Real-time AGC response cost of the aggregator level
For EVs, the economic cost of participating in AGC mainly comes from the battery life loss.So the AGC response cost of the aggregator should consider this factor.At present, there are some references that take the battery life loss into account in the AGC command decomposition for EVs, but the established battery life loss model is too simple or only as a criterion for the decomposition priority.Therefore, this paper uses a refined battery life loss model [23] , which converts the DOD-cycle life curve obtained from the experiment into the corresponding life loss when the SOC state changes.However, due to the complexity of the life loss model, the unit AGC response cost keeps changing during different periods.Therefore, the linear battery life loss model obtained by using the idea of piecewise linearization can reduce the change of unit cost effectively.The model [23] is improved based on that different EVs have different battery capacities: ) In which, F is the life loss function corresponding to the change of capacity; N presents the number of segments; i presents the serial number of the segment; i S  presents the length of the corresponding segment; S  presents the upper limit of the length of the segment; i S  presents the slope of the corresponding segment; S presents the current capacity of the EV battery; min S and max

S
present the lower limit and the upper limit of the battery respectively.The relationship between the piecewise linear life loss model and the original model is shown in Fig. 4  For each EV, extra battery life loss occurs only because of the discharging behavior in response to the AGC command.Based on the current capacity status of each EV, its position on the curve in Fig. 4 can be determined.Because each EV has the corresponding charging plan, it needs to subtract the maximum power that can be adjusted down during the charging scenario to calculate the dischargeable power of each EV in its corresponding life loss segment: In which, dis, , i jt P  presents the dischargeable power for the j th EV in the corresponding i th life loss segment; ch, , jt P  presents the maximum power that can be adjusted down for the j th EV during the charging scenario.dis,EV , jt S presents the updated state for the j th EV before participating in discharging.By accumulating the dischargeable power of EVs in the corresponding life loss segment during the corresponding period, the dischargeable power of the aggregator in each life loss segment can be obtained: In which, dis, agg, i t P  presents the dischargeable power for the aggregator in the corresponding i th life loss segment; i N presents the number of EVs connected to the aggregator at the corresponding time in the corresponding i th life loss segment.
Under the discharging scenario, the unit AGC response cost of EVs in the same life loss segment is approximately equal.So, the unit AGC response cost of the aggregator in each segment can be converted using the life loss and the total cost of the battery: In which, i c presents the unit AGC response cost in the corresponding i th life loss segment; BESS

C
presents the total cost of the battery.Combining the dispatchable power of the aggregator in the corresponding life loss segment and the unit AGC response cost, the unit AGC response cost of the aggregator can be obtained.

Upper level decomposition algorithm
According to the information interaction framework of EVs and the power grid in Section 2, the upper level decomposition algorithm from the power grid level to the aggregator level is studied, which establishes the optimization model with economy as the goal and safety as the constraint about the realtime command decomposition between the aggregator and the AGC units.

1) Objective function
In which, cost C presents the total AGC response cost of the AGC units and the aggregators; gen,i c presents the unit AGC response cost of the i th AGC unit; gen, agc i P presents the AGC response power of the i th AGC unit; load, j c presents the unit AGC response cost of the j th aggregator and it is caused by the deviation from the energy market after participating in AGC; load, agc j P presents the AGC response power of the j th aggregator; , kj c presents the unit discharging cost of the j th aggregator in the k th life loss segment; dis,res,k j P presents the discharging response power of the j th aggregator in the k th life loss segment; seg, j N presents the number of life loss segments of the j th aggregator.

2) Constraints
In which, gen,i R presents the maximum power that the ith AGC unit is allowed to adjust up and down without considering the active power upper and lower limits, that is, the maximum ramp rate; before gen,i P presents the active power of the i th AGC unit at the previous moment.
③ present the active power that can be adjusted down and up of the jth aggregator respectively.They can be calculated by equation ( 4)- (5).
Equation (23) means that if the jth aggregator can satisfy the assigned AGC command using the maximum power that can be adjusted down during the charging scenario, the discharging response power is zero.If it cannot be satisfied, the calculation of the discharging response power needs to subtract the maximum power that can be adjusted down during the charging scenario.Through this constraint, the optimization model fits well with lower level decomposition algorithm.
④ Flow constraint of the main power grid The main power grid line adopts the ℼ-type model, which replaces the trigonometric function term in the original constraint with the quartic power term in accordance with the distflow power flow model of the distribution network.And considering the different radial characteristics between the main power grid and distribution network, establish the branch power flow model of the main power grid [24] .By processing the secondary variables, the power flow model of the main power grid is further processed into a linear model.
sin , , Equation ( 24)-(32) are the corresponding power flow model of the main power grid.Equation ( 24) and ( 25 26)-( 27) are the relationship between the phase and amplitude of the node voltage in the branch vw.Equation ( 28) is the relationship between node voltage, branch current and branch active, reactive power.Equation ( 29)-( 30 In order to meet the time precision of the AGC command decomposition between the AGC units and the aggregator, it is necessary to linearize the nonlinear constraint ( 26) and (28) in the power flow model of the main power grid.
Since the node phase needs to meet the constraints in equation ( 31) and (32), considering that the phase difference of the branch is generally small, equation (33) can be used to make an approximate calculation of the sine function.Since the voltage amplitude square interval allowed by the node voltage constraint is narrow, the error brought by the introduction of the node voltage constant norm bus V is also relatively small, and the linearization of equation ( 26) is completed.As shown in equation (34).The piecewise linearization is used to linearize equation (28), which means piecewise linear approximation is performed on the variable square term in the branch power flow model [25-26].So the nonlinear constraint (28) is transformed into: In which, respectively.Piecewise linear function ( , , ) f y y  is used to approximate the variable square term.In which, y presents the upper limit of y ;  presents the number of discrete segments; x  presents the auxiliary 0-1 variable; M presents the large enough constant;   presents the small enough constant.The following constraints (35)-(40) should be supplemented.37) and (38) linearize the absolute value of the variable.Equation ( 39) and (40) ensure that the length of the previous segment must take the maximum value when the next segment can take a nonzero value.

Lower level decomposition algorithm
According to the information interaction framework of EVs and the power grid in Section 2, the lower level decomposition algorithm of the real-time AGC command from the aggregator level to the EV level considers the battery life loss and dispatchable power in two cases.
Since the reverse discharging of EVs will produce additional battery life loss, which is unfavorable for EV users, it is necessary to reduce the planned charging power as much as possible to meet the AGC requirement.However, if all EVs have reached the maximum power that can be adjusted down during the charging scenario and it still cannot meet the real-time AGC command, the EV should response the AGC command by discharging, and the additional battery life loss should be minimized as much as possible.

1) First case
In view of the above situation, if all EVs in the aggregator can satisfy the AGC command by reducing to the maximum power that can be adjusted down during the charging scenario, then the lower level decomposition algorithm is based on the dispatchable power of EVs.
The idea of ability-contribution is proposed to decompose the response command to EVs based on the consensus algorithm.
In which, t  presents the ability-contribution factor, which means that when each EV has the same ability-contribution factor, EVs that have more dispatchable power can make more contributions so that their dispatchable power can be used fully and fairly.res , jt P presents the response power allocated to the jth EV, res t P presents the total response power of the aggregator.Through this strategy, the dispatchable power of EVs is considered to complete the command decomposition inside the aggregator.
It can be turned into the response power allocation weight for each EV by solving equations: Equation ( 45) means that when the power needs to be increased, EVs with more power that can be adjusted up are given priority to the response power.On the contrary, when the power needs to be decreased, EVs with more power that can be adjusted down are given priority to the response power. 2

) Second case
However, if all EVs have reached the maximum power that can be adjusted down during the charging scenario and it still cannot meet the real-time AGC command, the EV should response the AGC command by discharging.At this time, the established piecewise linear life loss model needs to be used to comprehensively consider the battery life loss and the real-time dispatchable power to decompose the AGC command.
In the discharging scenario, all EVs must at least reduce the charging power to maximum power that can be adjusted down during the charging scenario, so use the result to update the initial state of each EV.Determine the life loss segment of each EV based on the current state of each it.Combined with that, the segment with a lower life loss slope has a higher response priority.
First, calculate the total AGC command that need to respond by discharging, and update the initial state of each EV using equation (11)  In which, dis,res t P presents the total AGC command that need to respond by discharging.Then, the dischargeable power of each EV in each life loss segment can be obtained by using the equation (13).By accumulating the real-time dischargeable power of EVs in the corresponding life loss segment, the real-time dischargeable power of the aggregator in each life loss segment can be obtained: In which, dis, agg, i t P  presents the real-time dischargeable power of the aggregator in the i th life loss segment.
Combined that the segment with a lower life loss slope has a higher response priority, set the corresponding AGC response power of each segment according to the corresponding priority.And dis,res,i t P presents the total AGC command that need to respond by discharging in the i th life loss segment.seg dis,res dis,res, For EVs in the same segment, the priority needs to judge by the dispatchable power, as shown in Fig. 5.

Battery
In which, i t  presents the ability-contribution factor in the i th life loss segment.
, jt P presents the response discharging power allocated to the j th EV.Through this strategy, both the battery life loss and the dispatchable power of EVs are considered to complete the command decomposition inside the aggregator.
Similarly, it can be turned into the power allocation weight for each EV by solving equations: In view of fairness and economy, the lower level decomposition algorithm of the real-time AGC command from the aggregator level to the EV level is studied from the perspective of the battery life loss and dispatchable power according to the different situations of the dispatchable power.

REAL-TIME AGC COMMAND DECOMPOSITION PROCESS FROM THE POWER GRID TO EVS
Based on the information interaction framework of EVs and the power grid in Section 2, adding the real-time information acquisition method proposed in Section 3.1 and the bi-level real-time decomposition algorithm in Section 3.2, the real-time AGC command decomposition process from the power grid to the EVs can be obtained, as shown in Fig. 6.Fig. 6 Real-time AGC command decomposition process from the power grid to EVs The process is divided into the following steps: Step 1: Each EV determines its real-time status at the current moment and reports it to the aggregator; Step 2: Based on the real-time information of EVs, the aggregator calculates the real-time dispatchable power and AGC response cost according to the method in Section 3.1.2; Step 3: According to the ACE information at the current moment, the power grid calculates the total AGC command that it needs to respond to according to the method in Section 3.1.1; Step 4: The power grid determines the actual total AGC response command based on and the real-time dispatchable power of the AGC unit and the aggregator; Step 5: The power grid sends the corresponding response AGC command to the aggregator according to the upper level decomposition algorithm proposed in Section 3.2.1; Step 6: The aggregator sends the corresponding AGC response command to each EV according to the lower level decomposition algorithm proposed in Section 3.2.2; Step 7: Judge whether the current moment is within the scheduling period, if so, update the real-time state of the corresponding EV according to the result in step 6, and return to step 1; if not, complete the entire real-time AGC command decomposition during the dispatchable period.

Case data
In order to verify the correctness and effectiveness of the proposed bi-level decomposition algorithm for the real-time AGC command, this paper chooses the typical IEEE39 node system for the case study.Select the time section of 21:45-22:00, Jan 3 rd 2021 for simulation analysis and the time interval is 1 minute.The AGC command data uses the historical data of Shanghai grid during the corresponding time period.The initial state of each AGC unit is the example data of the typical IEEE39 node system.The corresponding unit AGC response cost of AGC units is in reference [27], and the cost of the power that can be adjusted up is the same as that can be adjusted down.The unit AGC response cost of the aggregator is 0.617 ￥/kWh according to the electricity price in the corresponding time period in Shanghai Set node 2 as the node of the aggregator that can respond to the AGC command.The real-time data of 5000 EVs in Shanghai corresponding to the time period are selected for analysis.And the battery capacity of EVs is 50 kWh and the maximum charging/discharging power of the charging pile is 20kW/-20kW.According to the experimental data of LiFePO 4 batteries in reference [28], the battery life loss fitting curve is: The upper limit of the SOC of the EV battery is taken as 0.8, and the lower limit is taken as 0.2, so as to reduce the number of excessively deep charging and discharging of the EV battery.The number of segments is set to 5, and the charging and discharging efficiency is 0.9.The unit cost of LiFePO 4 batteries is 1500￥/kWh.

Case result
According to the process in Chapter 4, the case study is analyzed according to the case data in Section 5.1.By calculating the real-time dispatchable power of the aggregator in each time interval, report it to the power grid.The AGC response power and the corresponding AGC response cost of the AGC units and the aggregator in each time interval are shown in Fig. 7.The bar graph in Fig. 6 shows the AGC response power of the AGC units and the aggregator in each time interval obtained by the upper level decomposition algorithm in Section 3.2.1.When the AGC command is positive, the AGC units need to increase the power, and the aggregator needs to reduce the load, on the contrary, when the AGC command is negative, the AGC units need to reduce the power, and the aggregator needs to increase the load.The line graph corresponds to the total AGC response cost in each time interval.
Based on the result of AGC response power received by the aggregator, the lower level decomposition algorithm is used to obtain the AGC response power for each EV in each time interval, as shown in Fig. 8. Fig. 8 Clustering result of charging power under the lower level decomposition algorithm Due to the huge amount of EVs in each time interval, in order to display the charging power situation of EVs under the lower level decomposition algorithm, the scenes are classified and clustered based on the positive and negative properties of the AGC response power.As shown in Fig. 7, the power of EVs is gathered between -15MW and -20MW in the down-clustering scenario, while the power of EVs is concentrated around 15MW and 20MW in the up-clustering scenario.And compared to the up-clustering scenario, the power in the down-clustering scenario is more dispersed because the lower level decomposition algorithm prioritizes reducing the charging power to 0MW and then adopts the discharging behavior to respond to the AGC command.The result shows that the EV resources are well used to respond to the real-time AGC command.
The process of the real-time AGC command decomposition from the power grid to EVs is completed through the case study, and the feasibility of the proposed bi-level decomposition algorithm for the realtime AGC command in this paper is preliminarily verified.

1) Feasibility analysis of EVs responding to the AGC command
After obtaining the result in Section 5.2.1, in order to verify the feasibility of EVs responding to the AGC command in the form of the aggregator, two scenarios where no EV responds to the real-time AGC command and aggregator without V2G in this section are set up to compare.Since the aggregator considering V2G responding to the AGC command is the important incremental resources, the real-time AGC commands can be satisfied.The key is to compare and verify the economic feasibility of EVs responding to the AGC command, as shown in Fig. 9.
Fig. 9 Economic analysis of EVs responding to the AGC command It can be found in Fig. 9 that all scenarios can meet the real-time AGC command, EVs responding to the AGC command can effectively reduce the cost, which verifies the economic feasibility of EVs responding to the AGC command in the form of the aggregator.And considering V2G, although the two scenarios are economically similar in the power needs to be adjusted up ( Time 3,4,9,10,11,15), aggregator with V2G can have better performance in economy because EVs can better exert their discharging capacity (Time 1, 2, 5, 6, 7, 8, 12, 13, 14).

2) Analysis of upper level decomposition algorithm
In the traditional command decomposition process from the power grid to the AGC unit, most of the AGC command decomposition between the AGC units and the aggregator in Chapter 1 is difficult to meet the time precision set in this case study.The two algorithms that can meet the time precision of real-time AGC command decomposition above are compared, and the feasibility of this method is verified from the perspective of economy and safety.
Algorithm 1: Upper level decomposition algorithm proposed in this paper.Algorithm 2: Decomposition algorithm in a fixed proportion of economy and dispatchable power [29] .Algorithm 3: Decomposition algorithm based on EMD [2] .① Economy analysis Algorithm 1 uses the optimization idea to decompose AGC commands with the goal of the lowest AGC response cost, which is more economical than Algorithm 2 and Algorithm 3, as shown in Fig. 9-11.13 with Fig. 14-15, it can be found that the burden rate of each branch in Algorithms 2 and 3 are significantly higher than those of the decomposition algorithm in this paper.In Algorithm 2, branch 3 and 13 are overloaded during parts of the time interval (the part above the parallel plane in Fig. 14), and in Algorithm 3, branch 1, 3, 27 and 37 appeared overloaded during parts of the time interval (the part above the parallel plane in Fig. 15).Under the decomposition algorithm in this paper, each node of the branch in the whole period is not overloaded, which verifies the safety feasibility of the decomposition algorithm in this paper.

① Feasibility analysis
The lower level decomposition algorithm comprehensively considers battery life loss and dispatchable power.The following shows the results from these two perspectives.

Burden rate
Fig. 16 Distribution of battery life loss In terms of battery life loss, it can be seen from the Fig. 16 that the overall life loss distribution is skewed to the left, indicating that the decomposition method in this chapter has well considered the battery life loss.17, indicating that the overall SOC level is more concentrated.It is verified that the decomposition method in this chapter takes the dispatchable power into account well.

② Effectiveness Analysis
The lower decomposition algorithm proposed in this paper objectively considers the battery life loss and dispatchable power of EVs.In order to verify its effectiveness, it is compared with the previous traditional methods: Method 1: Considering the battery life loss and dispatchable power (lower decomposition algorithm proposed in this paper).
Method 2: Considering the dispatchable power [17] .Through the comparison of the total life loss of the two methods in Tab.1, as well as the comparison of the life loss distribution in Fig. 16 and Fig. 18, it can be concluded that the lower level decomposition method proposed in this paper has great advantages in terms of life loss.Compared with method 2, the total life loss is reduced by 9.34%, which verifies the effectiveness of the lower level decomposition method in this paper.

4) Applicability analysis of the decomposition algorithm
In order to verify the applicability of the bi-level decomposition algorithm, the typical IEEE118 node system is simulated and analyzed by setting the same parameters in Section 5.The case result proves the applicability of the bi-level decomposition algorithm proposed in this paper by decomposing the real-time AGC command well and satisfying the time precision of AGC simultaneously.

Fig. 1
Fig.1Information interaction framework between EVs and the power grid

Fig. 2 
Fig.2 Real-time AGC command acquisition in the power grid level

Fig. 3
Fig.3 Feasible region of the dispatchable ability for single EV

Fig. 4
Fig.4 Relationship between original life loss model and piecewise linear life loss model ) are the node power balance constraints.In which, , feeder bus SS present the set of the branches and the nodes respectively; , vw vw PQ present the branch active power and the reactive power from node v to node w respectively; , vw vw rx present the resistance and reactance of the branch vw respectively; sh sh , vv gb present the parallel admittance of the node v; sqr v V presents the voltage square of the node v; sqr vw I presents the current square of the branch vw; Since only the branch current square and the node voltage square are used in this model, the two square terms are directly used as a variable to simplify the model.Equation ( ) are the limit of the node voltage and branch current.In which, min max , vv VV present the lower and upper limit of the voltage at node v respectively; max vw I presents the upper limit of the current in branch vw.Equation (31)-(32) are the node phase and branch phase difference constraints.In which, v  presents the phase of the node v; min max bus bus ,  present the lower and upper limit of the node phase respectively; vw  presents the phase difference of the branch vw; min max ,   present the lower and upper limit of the node phase difference respectively;

Fig. 7
Fig.7 AGC response power and cost in each time period under the upper level decomposition algorithm

Fig. 17
Fig.17 Box figure of start SOC and end SOC In terms of dispatchable power, it can be seen from the Fig. that EVs uses the V2G performance to respond to the AGC command, which makes the box with the end SOC flatter than the box with the initial SOC in Fig.17, indicating that the overall SOC level is more concentrated.It is verified that the decomposition method in this chapter takes the dispatchable power into account well.②Effectiveness Analysis

9 SOCFig. 18 2 Tab
Fig.18 Distribution of battery life loss under method 2 Minimize the AGC response cost as the objective function:

①
Power constraint of the AGC unit Q presents the reactive power lower limit of the i th AGC unit; ② Ramp rate constraint of the AGC unit Power constraint of the aggregator ii PP  Lower level decomposition algorithm considering dischargingSimilarly, the idea of ability-contribution is proposed to decompose the command to EVs based on the consensus algorithm.
Considering that the state of each EV has been updated before, the AGC response power of each EV can be obtained by accumulating the charging and discharging scenarios.

t=1 Collect real-time status for each EV Aggregator: calculate dispatchable power and AGC response cost (3.1.2) Power grid: calculate the total AGC command (3.1.1) Real-time information about ACE at time t Power grid: calculate the AGC response command Aggregator: receive AGC response command EV: receive AGC response command Update the relevant data of EVs t>T t=t+1 Complete the entire real-time AGC command decomposition during the dispatchable period Report real-time information of EV
1.The case result is shown in Tab.2: Tab.2 Solution speed and AGC response cost in each time period