An Optimized Decision Model for Electric Vehicle Aggregator Participation in the Electricity Market Based on the Stackelberg Game

: With the growing popularity of charging pile infrastructure and the development of smart electronic devices and 5G communication technologies, the electric vehicle aggregator (EVA) as a bidding entity can aggregate numerous electric vehicle (EV) resources to participate in the electricity market. Moreover, as the number of grid-connected EVs increases, EVA will have an impact on the nodal marginal prices of electricity market clearing. Aiming at the bidding and offering problem of EVA participation in the day-ahead and intra-day electricity markets, based on the Stackelberg game theory, this paper establishes a bilevel optimization model for EVA participation in the two-stage electricity market as a price-maker. In the proposed bilevel model, the upper-level and lower-level models are constructed as an operational problem for EVA and a market-clearing problem for independent system operator (ISO), respectively. In the day-ahead stage, EVA is optimized to maximize its own expected beneﬁts, and ISO aims to improve the social beneﬁts. In the intra-day stage, EVA is optimized to maximize its self-interest, and the ISO aims to make it possible to minimize the cost of expenditures to maintain the system’s supply–demand balance. Karush–Kuhn–Tucker (KKT) conditions and dual theory are used to transform the nonlinear bilevel programming model into a mixed-integer single-level linear programming model. In order to verify the validity of the proposed bilevel model as well as to comparatively analyze the impact of EVA’s participation in the electricity market on the market clearing results. Two scenarios are set up where EVA is seen as the price-taker in Scenario 1 and EVA is seen as the price-maker in Scenario 2. ISO’s revenue under Scenario 2 increased by USD 2262.66 compared to Scenario 1. In addition, the EVA acts as an energy consumer in Scenario 1 with a charging cost of USD 26,432.95, whereas in Scenario 2, the EVA can proﬁt by participating in the electricity market with a revenue of USD 26,432.95, at which point the EVA acts like a virtual power plant. The simulation examples verify that the proposed bilevel optimization model can improve the beneﬁts of ISO and EVA at the same time, achieving mutual beneﬁts for both parties. In addition, the simulation analyzes the impact of abandonment penalty price on ISO and EVA intra-day revenues. Comparing the scenarios where the abandonment penalty price is 0 with USD 10/MW, the ISO’s revenue in the intra-day market decreases by USD 197.5. Correspondingly, EVA’s reserve capacity is dispatched to consume wind power in the intra-day market, and its revenue increases by USD 197.5. The proposed two-stage bilevel optimization model can provide a reference for EVA to develop scheduling strategies in the day-ahead and intra-day electricity markets.


Introduction
Renewable energy sources represented by solar and wind energies have come a long way in becoming a major resource in today's global energy mix [1].However, the volatility and stochastic nature of renewable energy have brought great challenges to the safe and stable operation of power systems.In addition, the demand-side peak load continues to grow and the peak-to-valley difference further increases.The traditional regulation model of using generation-side resources to realize system supply and demand balance is no longer sustainable [2].Therefore, tapping the regulation potential of demand-side resources has become a hot research topic nowadays [3].
An electric vehicle (EV) is a high-quality flexible load resource with the characteristic of fast power adjustment in a short period of time [4].In recent years, the automobile industry has been accelerating towards decarbonization, and the amount of EV ownership continues to grow rapidly [5,6].According to the Global EV Outlook 2021 report published by the International Energy Agency, the number of EVs in the world has reached about 10 million in 2020 and is expected to soar to 145 million by 2030 [7].With the increasing popularity of charging pile infrastructure, the development of smart electronic devices, and 5G communication technology, EVs can realize intelligent interaction with the grid [8].However, the capacity of an individual EV is small and has not reached the threshold of access to the electricity market [9,10].Therefore, a large number of electric vehicles can be aggregated by an electric vehicle aggregator (EVA) as an agent to participate in electricity market transactions and provide various auxiliary services for the power system, thus improving the reliability of power supply, promoting new energy consumption, and enhancing the energy efficiency level of the whole society [11].Many scholars have carried out relevant studies on modeling aggregation.The concept of the equivalent rival whose behavior in the electricity market reflects the aggregation of behaviors of all individual competitors was introduced in [12].Reference [13] proposed an adaptive bidding strategy by revealing and modeling the behavior of market competitors from the viewpoint of an intended load aggregator in a two-sided electricity market.In [14], an optimal offering procedure for a photovoltaic plant that plays in both the day-ahead and balancing electricity markets simultaneously with and without a storage system based on modeling the behavior of market competitors was presented.
As an emerging interest entity, EVA has two main functions.On the one hand, it pursues the maximization of its own interests, and on the other hand, it facilitates the interaction between the independent system operator (ISO) and EV users [15].Currently, many scholars have conducted research on the bidding decision model for EVA participation in the electricity market.Reference [16] proposed a stochastic robust model for EVA participation in day-ahead electricity market bidding.In [17], two typical agency models between EVA and EV users were presented, and the optimal bidding strategy for EVA to participate in the day-ahead electricity market was discussed.Reference [18] presented a bidding strategy for EVA in the day-ahead electricity market that jointly considered the reserve capacity in the day-ahead market and the reserve deployment requirements in the real-time market.In [19], an optimization model for EVA participation in the electricity ancillary services market considering power system security constraints was proposed.Reference [20] proposed an optimal bidding and operating strategy for EVA in real-time regulated markets based on a multi-stage stochastic optimization model.In [21], a new hybrid stochastic/information gap decision-theoretic optimization technique for EVA decision making in uncertain environments was proposed.Reference [22] proposed a linear fuzzy optimization method for EVA to maximize profits in the day-ahead energy and ancillary services markets.
EVA is regarded as a price-taker in all of the above studies, i.e., EVA does not affect the nodal marginal price of electricity market clearing.However, as the number of gridconnected EVs increases, EVA can have an impact on the nodal marginal price of electricity market clearing.Therefore, it is necessary to research the optimal decision-making model for EVA participation in the electricity market as a price-maker.Reference [23] proposed a bilevel optimization model for a flexible load aggregator to participate in the day-ahead energy and reserve markets.Reference [24] investigated the problem of energy charging under demand uncertainty using a robust Stackelberg game approach in a power system consisting of an aggregator and multiple EVs, where the aggregator and the EVs are considered as a leader and multiple followers, respectively.However, only the game model of the day-ahead electricity market was considered.In [25], a bargaining game pricing method based on the psychological cost of EV users and the risk assessment of the aggregator was proposed.However, only the game scenario between EVA and EV users was considered.Reference [26] proposed a bilevel stochastic optimization model for EVAs to develop optimal bidding strategies in the day-ahead energy and ancillary services markets.However, the model only considered the game behavior among aggregators.Reference [27] proposed a game theoretic approach using non-cooperative and cooperative games to incentivize EVs to provide frequency regulation services to the power system.A two-stage game model between EVA and EVs in the day-ahead electricity market and realtime electricity market was constructed, respectively.However, the game model between EVA and ISO is not constructed.
The above optimization decision model of EVA based on the game theory method mainly considers the game behavior between EVA and EV users or multiple EVAs, and most of them only establish a day-ahead optimization model.When EVA participates in the electricity market, more attention is paid to its interactive behavior with the ISO at the dispatch level, so that each party reaches its optimization goal.In addition, a two-stage optimization model for EVA participation in day-ahead and intra-day electricity markets should be constructed in order to develop day-ahead and intra-day dispatch strategies for EVA.To address the shortcomings of the above literature studies, this paper proposes a Stackelberg game-based optimization decision model for EVA participation in the electricity market.The main contributions of this paper are as follows: (1) A bilevel optimization model for EVA as price-maker participation in the electricity market is proposed based on the Stackelberg game theory.The operation problems of ISO and EVA are modeled at the lower level and upper level, respectively.
(2) A two-stage optimization model for EVA participation in the day-ahead and intraday electricity markets is constructed in order to formulate dispatch strategies of EVA in the day-ahead and intra-day electricity markets, respectively.
The rest of this paper is structured as follows.Section 2 describes the framework for EVA to participate in the electricity market.The methodology for evaluating the response capability of EVA is given in Section 3. The bilevel Stackelberg game optimization model is developed in Section 4. Case studies are conducted in Section 5. Section 6 highlights the conclusions and future work.

Electricity Market Framework
The framework of EVA participation in the two-stage electricity market is shown in Figure 1.In the day-ahead energy and reserve markets, the EVA develops trading strategies to maximize its own expected benefits based on day-ahead market energy prices and upand down-reserve prices.At the same time, the ISO clears day-ahead market energy prices and up-and down-reserve prices based on the bid prices of thermal power producers and EVA, as well as load demand, with the aim of maximizing the benefits to society.In the intra-day market, due to the uncertainty of wind power output, the reserve capacities provided by thermal power producers and EVA need to be dispatched to maintain the supply and demand balance of the system.In this process, the EVA develops trading strategies to maximize its revenues based on the intra-day price.At the same time, the ISO clears the intra-day price based on the bid prices of thermal power producers and EVA, aiming to minimize the cost of maintaining the system supply and demand balance.ISO and EVA, as two independent entities of interest, have conflicting and interacting optimization objectives.
Stackelberg game scenarios.In order to increase the motivation of EVA to participate in the electricity market, EVA is regarded as the decision leader and ISO is regarded as the decision follower in the bilevel model.In other words, EVA will adjust its bidding and offering strategy based on the ISO's market clearing results, and conversely, the ISO will clear the market electricity prices based on EVA's bidding strategy.Ultimately, the strategies developed by EVA and the ISO will reach a Nash equilibrium that ensures the optimal distribution of benefits.

Response Capacity Evaluation Model of EVA
Before formulating the trading strategy for EVA to participate in the electricity market, its response capability needs to be evaluated beforehand.This section is organized into three main parts.Firstly, an individual EV model based on energy constraints and power constraints is developed.Then, on this basis, the aggregation model of EVA is constructed.Finally, the response capability of EVA is evaluated.

Individual EV Model
The charging and discharging feasible field of an individual EV can be described by its energy and power boundaries, i.e., { } , which represents the feasible set of all possible charging and discharging trajectories [11].The energy and power boundaries for an individual EV are shown in Figure 2. The corresponding energy and power boundaries are calculated as follows: Stackelberg game, as a typical non-cooperative game method, has been widely adopted because it can effectively reflect the dynamic interaction process between the players.In this paper, a bilevel interactive decision-making model for EVA participation in the electricity market is constructed, which is divided into day-ahead and intra-day two Stackelberg game scenarios.In order to increase the motivation of EVA to participate in the electricity market, EVA is regarded as the decision leader and ISO is regarded as the decision follower in the bilevel model.In other words, EVA will adjust its bidding and offering strategy based on the ISO's market clearing results, and conversely, the ISO will clear the market electricity prices based on EVA's bidding strategy.Ultimately, the strategies developed by EVA and the ISO will reach a Nash equilibrium that ensures the optimal distribution of benefits.

Response Capacity Evaluation Model of EVA
Before formulating the trading strategy for EVA to participate in the electricity market, its response capability needs to be evaluated beforehand.This section is organized into three main parts.Firstly, an individual EV model based on energy constraints and power constraints is developed.Then, on this basis, the aggregation model of EVA is constructed.Finally, the response capability of EVA is evaluated.

Individual EV Model
The charging and discharging feasible field of an individual EV can be described by its energy and power boundaries, i.e., e , which represents the feasible set of all possible charging and discharging trajectories [11].The energy and power boundaries for an individual EV are shown in Figure 2. The corresponding energy and power boundaries are calculated as follows: where the subscript i represents the i-st EV. e i (τ) and p i (τ) where the subscript i represents the i-st EV. ( )  It is worth noting that Figure 2 depicts the charging and discharging feasible field of the EV when e e , i.e., the EV is over-discharged due to traveling so that the initial energy at the on-grid moment is less than the minimum threshold, the EV should be forced to charge immediately to min i e .The EV has no response capability until this time, after which the energy and power boundaries EV can be obtained from Equations (1)-(5).

EVA Model
EVA can aggregate and control large-scale EVs within a certain area, and the sum of the energy and power boundaries of all EVs can be used to represent the total energy and power boundaries of the EVA.The energy and power boundaries of the EVA are calculated as follows: It is worth noting that Figure 2 depicts the charging and discharging feasible field of the EV when e s i ≥ e min i .If e s i < e min i , i.e., the EV is over-discharged due to traveling so that the initial energy at the on-grid moment is less than the minimum threshold, the EV should be forced to charge immediately to e min i .The EV has no response capability until this time, after which the energy and power boundaries EV can be obtained from Equations ( 1)-(5).

EVA Model
EVA can aggregate and control large-scale EVs within a certain area, and the sum of the energy and power boundaries of all EVs can be used to represent the total energy and power boundaries of the EVA.The energy and power boundaries of the EVA are calculated as follows: where E +/(−) (τ) and P +/(−) (τ) denote the upper and lower bounds of energy and power of the EVA at time τ, respectively.N i denotes the number of EVs controlled by the EVA.

Response Capability of EVA
To discretize the time axis, a day is divided equally into T time periods of length ∆t, assuming that the power of EVA is constant during time period ∆t.The response capability boundary of EVA is bounded by its energy and power constraints and the mathematical expressions are given below.
where E EVA t and E EVA (t−1) denote the energy of EVA at time period t and time period (t − 1), respectively.P EVA t denotes the power of EVA at time period t. p i (t) indicates the power of EV i at time period t.P EVA t and P EVA t denote the upper and lower response capability bound of EVA at time period t, respectively.P + t and P − t denote the upper and lower power bound of EVA at time period t, respectively.E EVA,+ (t+1) and E EVA,− (t+1) denote the upper and lower energy bound of EVA at time period (t + 1), respectively.
In this paper, the power flow of EVA purchasing power from the electricity market is defined as positive, and conversely, the power flow of EVA selling power to the electricity market is defined as negative.

Upper-Level: EVA
In the upper-level model, both the bid quantities and the winning electricity prices of EVA are variables.In this process, EVA can be seen as a price-taker and the winning electricity prices are consistent with the market clearing prices.But, the market clearing electricity prices are affected by the results of market clearing in the lower-level model.

Day-Ahead Market
The objective function and constraints of EVA participation in the day-ahead energy and reserve markets are as follows: Sustainability 2023, 15, 15127 7 of 26 where R EVA,up t and R EVA,dn t denote the up-and down-reserve capacity provided by EVA at time period t, respectively.λ EM t denotes the energy price cleared in the day-ahead energy market.λ RM,up t and λ RM,dn t denote the up-and down-reserve capacity prices cleared in the day-ahead reserve market, respectively.C IRC,re denotes the incentive price paid by EVA to EV users for providing reserve capacity.
is the decision variable for the upper-level model of the day-ahead market.The objective function Equation (13) indicates that EVA maximizes its expected benefits by optimizing its bidding strategy in the dayahead energy and reserve markets.The revenue of EVA is mainly composed of three parts, the first term represents the expenditure or income of EVA in the day-ahead energy market (when P EVA t > 0 indicates that the EVA is charging, in which case the first term represents the charging expenditure of the EVA, and when P EVA t < 0 indicates that the EVA is discharging, in which case the first term represents the discharging income of the EVA); the second term represents the up-and down-reserve income of EVA in the day-ahead reserve market; and the third term is the incentive expenditure paid by EVA to EV users.Equations ( 14)-( 16) represent the constraint conditions that the operating power and reserve capacity of EVA do not exceed the limits.Equations ( 17) and ( 18) represent the energy constraint conditions of EVA.Equations ( 19)- (23) indicate that the values of the reserve capacities provided by EVA and the clearing prices of the day-ahead market are non-negative.

Intra-Day Market
The objective function and constraints of EVA participation in the intra-day electricity market are as follows: where P EVA,up * t and P EVA,dn * t denote the upregulation and downregulation power offered by EVA in the intra-day market at time period t according to the dispatch demand, respectively.λ RT t denotes the energy price cleared in the intra-day energy market.λ DA avg denotes the average day-ahead electricity price.
is the decision variable for the upper-level model of the intra-day market.The objective function Equation (24) indicates that EVA optimizes its bidding strategy to maximize its benefits in the intra-day market.The revenue of EVA is mainly composed of three parts, the first term represents the expenditure or income of EVA in the intra-day energy market, as expressed by the purchasing electricity when the intraday electricity price is lower than the day-ahead average electricity price and the selling electricity when the intra-day price is higher than the day-ahead average electricity price, the second term represents the energy gain from EVA's reserve capacity being dispatched; the third term is the incentive expenditure paid by EVA to EV users.Equations ( 25) and ( 26) denote the constraints on the intra-day power regulation of EVA.Equations ( 27) and ( 28) denote the energy constraints of EVA.Equation (29) indicates that the clearing price of the intra-day market is non-negative.

Lower-Level: ISO
In the lower-level model, the bid electricity prices of EVA are variables.In this process, EVA can be seen as a price-maker whose bid prices affect the outcome of the market price clearing.In the upper-level problem, EVA adjusts its bidding strategy to maximize its benefits based on the market clearing results.

Day-Ahead Market
The objective function and constraints of ISO clearing day-ahead energy and reserve markets are as follows: Sustainability 2023, 15, 15127 where P L t represents the baseline load demand in addition to EVA.C L t is the electricity price for the baseline load.G and W denote the number of thermal power producers and wind power producers, respectively.P G t,g represents the operating power of the thermal power producer g at time period t.P G g denotes the maximum value of the power output of the thermal power producer g.P W t,w and P f t,w denote the predicted power output and the maximum predicted power output of the wind power producer w at time period t.R G,up t,g and R G,up g denote the up-reserve capacity at time period t and the maximum up-reserve capacity provided by the thermal power producer g, respectively.R G,dn t,g and R G,dn g denote the down-reserve capacity at time period t and the maximum down-reserve capacity provided by the thermal power producer g, respectively.C G,en g denotes the energy electricity price for thermal power producer g.C W w denotes the energy electricity price of wind power producer w.C G,up g and C G,dn g denote the up-and down-reserve prices of thermal power producer g, respectively.λ EVA,en t denotes the energy electricity price bid by EVA in the day-ahead energy market.λ EVA,up t and λ EVA,dn t represent the up-and down-reserve capacity prices bid by EVA in the day-ahead reserve market, respectively.
is the decision variable for the lower-level model of the day-ahead market.The objective function Equation (30) represents that the ISO maximizes social benefits in the process of day-ahead energy and reserve market clearing, where the first term represents the ISO's revenue from selling electricity to satisfy baseline load demand; the second term represents the ISO's revenue from selling electricity to satisfy EVA demand; the third term represents the ISO's cost of paying thermal power producers and wind power producers to purchase energy; the fourth term represents the ISO's cost of paying thermal power producers to provide reserve capacity; and the fifth term represents the ISO's cost of paying EVA to provide reserve capacity.Equation (31) represents the system power balance constraint for the day-ahead market.Equations (32) and (33) denote the up-and down-reserve capacity constraints of the day-ahead market, where the reserve capacity is shared between the thermal power producer and the EVA.Equations (34)-(39) denote the constraints that the thermal power producers and wind power producers do not exceed the operating power and reserve capacity constraints.Equations ( 40)-(42) represent the constraints that the EVA's operating power and reserve capacity do not exceed the limits.The dual variables of Equations ( 31)-( 42) are given after the colon of the constraints, respectively.

Intra-Day Market
The objective function and constraints for the ISO clearing intra-day electricity market are as follows: where P W * t,w and P a t,w denote the actual power output and the maximum value of the intraday forecasted power output of the wind power producer w at time period t, respectively.P G,up * t,g and P G,dn * t,g denote the upregulation power and downregulation power provided by the thermal power plant producer g at time period t based on the dispatch demand, respectively.C spill denotes the wind abandonment penalty price.λ EVA,rt t denotes the energy electricity price offered by EVA in the intra-day energy market.
Λ is the decision variable for the lowerlevel model of the intra-day market.The objective function Equation (43) indicates that ISO minimizes the cost of maintaining the balance between supply and demand of the system in the process of intra-day market clearing, where the first term represents the wind power producers' abandonment cost, the second term represents the expenditure or income of intra-day power regulation by thermal power producers, the third term represents the expenditure or income of EVA intra-day power regulation, and the fourth term is the incentive expenditure paid by ISO to EVA.Equation (44) represents the system power balance constraints for the intraday market.Equations ( 45)-(47) denote the constraints that the operating power and reserve capacity of thermal power producers and wind power producers do not exceed the limits.Equations ( 48) and (49) denote the constraints for EVA power regulation not to exceed the limits.The dual variables of Equations ( 44)-( 49) are given after the colon of the constraints, respectively.

Solution Method
The optimization flowchart for the bilevel decision-making framework of EVA is shown in Figure 3.When solving objective Functions (13), ( 24), (30), and (43), we can see that these objective functions are mutually coupled non-linear programming problems [28].For example, in the day-ahead stage, maximizing the social welfare in (30) requires jointly solving the bidding price of EVA and the offering price of generators, based on the bidding strategy of EVA and the offering strategy of generators in the day-ahead electricity market.In other words, EVA and generators jointly clear the market price.However, maximizing the profit of EVA in (13) requires solving the EVA's bidding strategy based on the day-ahead prices.We can see that the bidding price, bidding power, and electricity market price are coupled decision variables.The intra-day stage is similar to the day-ahead stage.
shown in Figure 3.When solving objective Functions ( 13), ( 24), (30), and (43), we can see that these objective functions are mutually coupled non-linear programming problems [28].For example, in the day-ahead stage, maximizing the social welfare in (30) requires jointly solving the bidding price of EVA and the offering price of generators, based on the bidding strategy of EVA and the offering strategy of generators in the day-ahead electricity market.In other words, EVA and generators jointly clear the market price.However, maximizing the profit of EVA in (13) requires solving the EVA's bidding strategy based on the day-ahead prices.We can see that the bidding price, bidding power, and electricity market price are coupled decision variables.The intra-day stage is similar to the dayahead stage.
Initialize parameters in day-ahead electricity market: Since the upper-level model is constrained by the lower-level model, the lower-level problem itself can be considered as the constraint of the upper-level problem.The decision Since the upper-level model is constrained by the lower-level model, the lower-level problem itself can be considered as the constraint of the upper-level problem.The lower-level model can be replaced by KKT conditions, and the detailed derivation is given in Appendix A. The complementary slackness constraints in Appendix A can be linearized by the Big-M approach expressed in Equation (50), thus converting the bilevel nonlinear programming problem into a single-objective nonlinear programming problem.
where M is a sufficiently large constant and ψ is a binary variable.It is worth noting that the value of Big-M should be chosen carefully as inappropriate values of M may lead to suboptimal solutions or pathological conditions, and in this paper, M takes the value of 10 7 .
Finally, the single-objective nonlinear programming problem is transformed into a single-objective linear programming problem using dual theory, and the detailed transformation process is given in Appendix B. Therefore, the optimization objective functions of the bilevel model after transformation are Equations (A52) and (A64) in the day-ahead and intra-day stages, respectively.
The matlab 2016b+ yalmip R20230622 + gurobi 10.0.1 solver software environment is used to solve the single-level mixed integer linear programming problem, and the hardware environment of the system is Intel Core I7 CPU, 3.4 GHz, and 16 GB RAM.

Parameter Setting
In this paper, the validity of the proposed bilevel optimization model is verified using a modified IEEE-5 test system, which contains three thermal power producers, one wind power producer, and an EVA.The operating and offering parameters of thermal power producers are shown in Table 1 [23].The wind power producer's day-ahead and intra-day forecasted maximum power output, as well as the primal baseline load profile when the system is not connected to EVA, are shown in Figure 4.In this paper, EVs are categorized into three types of home-based-work (HBW) vehicles, home-based-other (HBO) vehicles, and non-home-based (NHB) vehicles, with market shares of 61%, 30%, and 9%, respectively [29].It is assumed that the EVA consists of 5000 EVs and sets the EV type according to the above ratio.The distribution of EV travel characteristics refers to Reference [29], with data from the EU MERGE project database.EV user travel demand SOC d and battery capacity Q i obey a set truncated normal distribution, where µ and σ denote the expected value and standard deviation, respectively, and the relevant parameters are shown in Table 2.In order to ensure the safety of system operation, it is assumed that the reserve requirement for each time period is 10% of the day-ahead forecasted wind power output.The wind producer's energy price C W w is USD 5/MWh and the abandonment penalty price C spill is USD 10/MWh.The baseline load's electricity price C L t is USD 70/MWh.The incentive price C IRI,rt paid by the ISO to the EVA is USD 15/MWh.The incentive prices C IRC,re and C IRC,rt paid by the EVA to the EV users take the values of USD 15/MWh and USD 10/MWh, respectively.The values of the number of scheduling periods T and the time interval ∆t are taken as 24 and 1 h.In addition, this paper ignores the effect of network congestion on the system scheduling.0.9 η d 0.9

Analysis of Bidding and Offering Results
In order to verify the validity of the proposed bilevel model as well as to comparatively analyze the impact of EVA's participation in the electricity market on the market clearing results, the following two scenarios are set up: Scenario 1: EVA is viewed as a load that satisfies the immediate charging needs of EV users when they are at the arriving destination, utilizing only the response capability of thermal power producers to meet the reserve demand of the day-ahead electricity market as well as the power regulation requirements of the intra-day electricity market.
Scenario 2: Based on the proposed Stackelberg game bilevel model, the reserve demand of the day-ahead electricity market as well as the power regulation requirements of the intra-day electricity market are shared by the thermal power plant producers and the EVA.
The clearing results of the day-ahead electricity market in Scenario 1 are shown in Figure 5.The scheduling power of thermal power producers, wind power producers, and the EVA is shown in Figure 5a.Meanwhile, the EV users adopt the control strategy of charging on arrival, and the charging curve of EVA is shown by the red solid line in the figure, which shows that the charging power at night and early morning is larger, while the charging power in the daytime is smaller or even close to zero.This is due to the fact that EV users have a need to travel during the day and hence the charging demand is concentrated during the stopping hours after returning home.The baseline load and EVA power demand are shared between the thermal power producers and the wind power producers.Since wind power is a green energy source and has the lowest price offer, the day-ahead electricity market will give priority to wind power, and the remaining shortfall in electricity consumption will be borne by thermal power producers.The ISO will schedule G3, G1, and G2 in descending order based on the thermal generators' day-ahead energy price.The up-reserve capacity provided by each thermal power producer separately is shown in Figure 5b.Because G3 has the lowest price offer for up-reserve capacity, the system's up-reserve demand during the 0:00-6:00 period is provided entirely by G3.In other periods, as the system's up-reserve demand increases, up-reserve capacity is prioritized to be provided by G1 for up-reserve capacity demand that cannot be met by G3 alone.When the up-reserve capacity provided by G1 reaches the upper limit of 84 MW, the remaining up-reserve capacity shortfall required by the system is covered by G2.The down-reserve capacity provided by each thermal power producer separately is shown in Figure 5c.From Figure 5c, it can be seen that most of the system's down-reserve capacity is provided by G3, and only when G3 provides down-reserve capacity up to the upper limit of 120 MW, the remaining small portion of the down-reserve demand is taken up by G1.This is due to the fact that G3 has the lowest down-reserve price and G3 can provide down-reserve capacity while participating in the energy market, so G3 can meet most of the system's down-reserve demand.The day-ahead energy market clearing price is shown in Figure 5d.During the 0:00-6:00 h, only G3 is required to provide power to meet the load power demand, at which time the day-ahead energy price is USD 30/MW.During the 6:00-9:00, 12:00-18:00, and 20:00-24:00 periods, the load demand needs to be shared between G3 and G1, so the day-ahead energy price rises to USD 50/MW.During peak load periods 9:00-12:00 and 18:00-20:00, G2 also starts power supply, and the energy price increases to USD 60/MW.Similarly, in the reserve market, the ISO clears up-and down-reserve prices based on up-and down-reserve demand in each time period.In the period of greater demand for reserve capacity, the higher the reserve price.It is worth noting that during the 6:00-9:00 and 12:00-13:00 periods, the up-reserve clearing price is USD 38/MW, and during the 9:00-12:00 and 18:00-20:00 periods, the up-reserve clearing price is USD 48/MW.In these periods, the up-reserve clearing price is greater than the up-reserve capacity offering of the thermal power producers.This is due to the fact that the up-reserve clearing price includes the up-reserve capacity quotation and the opportunity cost caused by the failure to provide electricity due to the provision of up-reserve capacity.
the remaining up-reserve capacity shortfall required by the system is covered by G down-reserve capacity provided by each thermal power producer separately is sh Figure 5c.From Figure 5c, it can be seen that most of the system's down-reserve c is provided by G3, and only when G3 provides down-reserve capacity up to the limit of 120 MW, the remaining small portion of the down-reserve demand is taken G1.This is due to the fact that G3 has the lowest down-reserve price and G3 can p down-reserve capacity while participating in the energy market, so G3 can meet m the system's down-reserve demand.The day-ahead energy market clearing price is in Figure 5d.During the 0:00-6:00 h, only G3 is required to provide power to m load power demand, at which time the day-ahead energy price is USD 30/MW.the 6:00-9:00, 12:00-18:00, and 20:00-24:00 periods, the load demand needs to be between G3 and G1, so the day-ahead energy price rises to USD 50/MW.During pe periods 9:00-12:00 and 18:00-20:00, G2 also starts power supply, and the energy p creases to USD 60/MW.Similarly, in the reserve market, the ISO clears up-and reserve prices based on up-and down-reserve demand in each time period.In the of greater demand for reserve capacity, the higher the reserve price.It is worth noti during the 6:00-9:00 and 12:00-13:00 periods, the up-reserve clearing price is USD 3 and during the 9:00-12:00 and 18:00-20:00 periods, the up-reserve clearing price 48/MW.In these periods, the up-reserve clearing price is greater than the up-rese pacity offering of the thermal power producers.This is due to the fact that the upclearing price includes the up-reserve capacity quotation and the opportunity cost by the failure to provide electricity due to the provision of up-reserve capacity.Since there may be some error in the day-ahead and intra-day forecast output of wind power, the reserve capacity provided by the thermal power producers will need to be scheduled to maintain the supply and demand balance of the system during the intra-day stage.The clearing results of the intra-day electricity market in Scenario 1 are shown in Figure 6.The intra-day dispatch of the up-and down-reserve capacity of each thermal power producer is shown in Figure 6a and Figure 6b, respectively, where the ISO dispatches G3 and G1 in descending order based on the thermal power producer's intra-day energy price offering.Each thermal power plant operator can only schedule up-reserve Since there may be some error in the day-ahead and intra-day forecast output of wind power, the reserve capacity provided by the thermal power producers will need to be scheduled to maintain the supply and demand balance of the system during the intra-day stage.The clearing results of the intra-day electricity market in Scenario 1 are shown in Figure 6.The intra-day dispatch of the up-and down-reserve capacity of each thermal power producer is shown in Figures 6a and 6b, respectively, where the ISO dispatches G3 and G1 in descending order based on the thermal power producer's intra-day energy price offering.Each thermal power plant operator can only schedule up-reserve capacity or down-reserve capacity in one direction during each time period, thus adjusting its intra-day operating power.The clearing prices in the intra-day electricity market are shown in Figure 6c.When there is a large error in the forecast output of wind power, the demand for reserve capacity is larger and the intra-day energy price is higher.
Since there may be some error in the day-ahead and intra-day forecast output of wi power, the reserve capacity provided by the thermal power producers will need to scheduled to maintain the supply and demand balance of the system during the intra-d stage.The clearing results of the intra-day electricity market in Scenario 1 are shown Figure 6.The intra-day dispatch of the up-and down-reserve capacity of each therm power producer is shown in Figure 6a and Figure 6b, respectively, where the ISO d patches G3 and G1 in descending order based on the thermal power producer's intra-d energy price offering.Each thermal power plant operator can only schedule up-rese capacity or down-reserve capacity in one direction during each time period, thus adju ing its intra-day operating power.The clearing prices in the intra-day electricity mar are shown in Figure 6c.When there is a large error in the forecast output of wind pow the demand for reserve capacity is larger and the intra-day energy price is higher.The clearing results of the day-ahead electricity market in Scenario 2 are shown in Figure 7.The scheduling power of thermal power producers, wind power producers, and the EVA is shown in Figure 7a.Meanwhile, the EVA can participate in both the day-ahead energy market and the reserve market for profit, and the EVA adjusts charging and discharging power in each period in order to maximize its own benefits.In contrast to Figure 5a, EVA discharges to the grid during the 11:00-12:00, 18:00-19:00, and 20:00-24:00 time periods.As in Scenario 1, the day-ahead electricity market gives priority to wind power, and the remaining shortfall in electricity consumption is borne by thermal power producers.The ISO will schedule G3, G1, and G2 in descending order based on the thermal generators' day-ahead energy price.The up-reserve capacity provided by each thermal power producer and EVA, respectively, is shown in Figure 7b.Comparing Figure 7b with Figure 5b shows that EVA provides a significant portion of the up-reserve capacity.The down-reserve capacity provided by each thermal power producer and EVA, respectively, is shown in Figure 7c.Similarly, EVA will take on a portion of the down-reserve capacity demand.The clearing price for the day-ahead electricity market in Scenario 2 is shown in Figure 7d.The ISO will clear the day-ahead energy price and reserve price for each time period based on the load demand and reserve capacity requirement for each time period.Comparing Figure 7d with Figure 5d shows that when EVA participates in the day-ahead electricity market, the energy price and the reserve price for day-ahead market clearing are reduced in some time periods.This is due to the participation of EVA in the demand response, enriching the adjustment means of ISO to maintain the balance of supply and demand in the system, expanding the traditional "source with load" regulation means to "source and load interaction", which can effectively alleviate the regulation pressure on the power generation side of the resource and reduce the market clearing price.
ers.The ISO will schedule G3, G1, and G2 in descending order based on the thermal erators' day-ahead energy price.The up-reserve capacity provided by each thermal po producer and EVA, respectively, is shown in Figure 7b.Comparing Figure 7b with Fi 5b shows that EVA provides a significant portion of the up-reserve capacity.The do reserve capacity provided by each thermal power producer and EVA, respectivel shown in Figure 7c.Similarly, EVA will take on a portion of the down-reserve capa demand.The clearing price for the day-ahead electricity market in Scenario 2 is show Figure 7d.The ISO will clear the day-ahead energy price and reserve price for each period based on the load demand and reserve capacity requirement for each time pe Comparing Figure 7d with Figure 5d shows that when EVA participates in the day-ah electricity market, the energy price and the reserve price for day-ahead market clea are reduced in some time periods.This is due to the participation of EVA in the dem response, enriching the adjustment means of ISO to maintain the balance of supply demand in the system, expanding the traditional "source with load" regulation mean "source and load interaction", which can effectively alleviate the regulation pressur the power generation side of the resource and reduce the market clearing price.The clearing results of the intra-day electricity market in Scenario 2 are shown in Figure 8.The up-and down-reserve capacity in the intra-day stage of thermal power producers and EVs are dispatched, as shown in Figures 8a and 8b, respectively.Compared with Figure 6a,b, it can be seen that the reserve capacity provided by EVA is also dispatched in the intra-day stage.The clearing price of the intra-day electricity market in Scenario 2 is shown in Figure 8c.It is worth noting that the energy price for intraday clearing is USD −10/MW in the 21:00-23:00 period compared to Figure 8c.This is because without an incentive for a negative electricity price in this time period, the ISO chooses to surrender a portion of its wind energy in the intra-day market in order to minimize the cost of expenditures to maintain the system's balance between supply and demand, and the price of the cleared energy price is the wind abandonment penalty price C spill .
pared with Figure 6a,b, it can be seen that the reserve capacity provided by EVA dispatched in the intra-day stage.The clearing price of the intra-day electricity ma Scenario 2 is shown in Figure 8c.It is worth noting that the energy price for intrada ing is USD −10/MW in the 21:00-23:00 period compared to Figure 8c.This is becaus out an incentive for a negative electricity price in this time period, the ISO chooses render a portion of its wind energy in the intra-day market in order to minimize t of expenditures to maintain the system's balance between supply and demand, a price of the cleared energy price is the wind abandonment penalty price spill C .

Revenue Analysis
The revenue comparison of ISO and EVA in different scenarios is shown in T In Scenario 1, the negative revenue of EVA represents the charging cost of EVA.As seen in Table 3, ISO's revenue under Scenario 2 increased by USD 2262.66 comp Scenario 1.In addition, the EVA acts as an energy consumer in Scenario 1 with a ch cost of USD 26,432.95,whereas in Scenario 2, the EVA can profit by participating electricity market with a revenue of USD 26,432.95,at which point the EVA acts virtual power plant.The total return of EVA in Scenario 2 is USD 20,830.07,whe gains USD −8727.09,USD 28,535.84,and USD 10,021.32 from the day-ahead energ ket, day-ahead reserve market, and intra-day market, respectively.As a result, EVA money primarily through the day-ahead reserve market and adjusts its earnings ment in the intra-day market based on intra-day scheduling.In summary, the pr bilevel optimization model can improve the revenues of both ISO and EVA and a

Revenue Analysis
The revenue comparison of ISO and EVA in different scenarios is shown in Table 3.In Scenario 1, the negative revenue of EVA represents the charging cost of EVA.As can be seen in Table 3, ISO's revenue under Scenario 2 increased by USD 2262.66 compared to Scenario 1.In addition, the EVA acts as an energy consumer in Scenario 1 with a charging cost of USD 26,432.95,whereas in Scenario 2, the EVA can profit by participating in the electricity market with a revenue of USD 26,432.95,at which point the EVA acts like a virtual power plant.The total return of EVA in Scenario 2 is USD 20,830.07,where EVA gains USD −8727.09,USD 28,535.84,and USD 10,021.32 from the day-ahead energy market, day-ahead reserve market, and intra-day market, respectively.As a result, EVA makes money primarily through the day-ahead reserve market and adjusts its earnings settlement in the intra-day market based on intra-day scheduling.In summary, the proposed bilevel optimization model can improve the revenues of both ISO and EVA and achieve mutual benefit and a win-win situation.In the intraday market, the effect of C spill on the intra-day revenues of ISO and EVA is shown in Figure 9.When C spill is 0, the ISO chooses to abandon a portion of the wind energy in order to reduce the cost of supply and demand regulation.As C spill increases, the amount of wind energy abandoned is progressively less.When C spill is USD 10/MW, the wind energy is fully consumed, and increasing the abandonment penalty price further results in no further change in the ISO's revenue.Comparing the scenarios where C spill is 0 and USD 10/MW, the ISO's revenue in the intra-day market decreases by USD 197.5.Correspondingly, EVA's reserve capacity is dispatched to consume wind power in the intra-day market, and its revenue increases by USD 197.5.In the intraday market, the effect of spill C on the intra-day revenues of ISO and EVA is shown in Figure 9.When spill C is 0, the ISO chooses to abandon a portion of the wind energy in order to reduce the cost of supply and demand regulation.As spill C increases the amount of wind energy abandoned is progressively less.When spill C is USD 10/MW the wind energy is fully consumed, and increasing the abandonment penalty price further results in no further change in the ISO's revenue.Comparing the scenarios where spill C is 0 and USD 10/MW, the ISO's revenue in the intra-day market decreases by USD 197.5 Correspondingly, EVA's reserve capacity is dispatched to consume wind power in the intra-day market, and its revenue increases by USD 197.5.

Conclusions
In this paper, EVA is regarded as a price-maker.Based on the Stackelberg game theory, a bilevel optimization model of EVA participation in the electricity market is constructed.The proposed bilevel optimization model can be applied to both day-ahead and intra-day electricity markets to achieve different optimization objectives, respectively.The nonlinear bilevel model is converted into a linear single-level model using KKT conditions and dual theory.The validity of the model is verified by simulation examples and the main conclusions obtained are as follows: (1) Because EVA's participation in the day-ahead electricity market enriches the ISO's regulation means to maintain the balance between supply and demand of the system, EVA can effectively reduce day-ahead energy price and reserve price.
(2) Due to the errors in wind power forecasting, the reserve capacity needs to be dispatched to maintain the supply and demand balance of the system in the intra-day stage and the intra-day electricity price is affected by the reserve capacity scheduling requirement.The scheduling requirement of reserve capacity is greater, and the intra-day energy price is higher.
(3) ISO's revenue under Scenario 2 increased by USD 2262.66 compared to Scenario 1.In addition, the EVA acts as an energy consumer in Scenario 1 with a charging cost o USD 26,432.95,whereas in Scenario 2, the EVA can profit by participating in the electricity market with a revenue of USD 26,432.95,at which point the EVA acts like a virtual power plant.The proposed bilevel optimization model can improve the revenues of both ISO and EVA and achieve mutual benefit and a win-win situation.The total return of EVA in Scenario 2 is USD 20,830.07,where EVA gains USD 8727.09,USD 28,535.84,and USD

Conclusions
In this paper, EVA is regarded as a price-maker.Based on the Stackelberg game theory, a bilevel optimization model of EVA participation in the electricity market is constructed.The proposed bilevel optimization model can be applied to both day-ahead and intra-day electricity markets to achieve different optimization objectives, respectively.The nonlinear bilevel model is converted into a linear single-level model using KKT conditions and dual theory.The validity of the model is verified by simulation examples and the main conclusions obtained are as follows: (1) Because EVA's participation in the day-ahead electricity market enriches the ISO's regulation means to maintain the balance between supply and demand of the system, EVA can effectively reduce day-ahead energy price and reserve price.
(2) Due to the errors in wind power forecasting, the reserve capacity needs to be dispatched to maintain the supply and demand balance of the system in the intra-day stage, and the intra-day electricity price is affected by the reserve capacity scheduling requirement.The scheduling requirement of reserve capacity is greater, and the intra-day energy price is higher.
(3) ISO's revenue under Scenario 2 increased by USD 2262.66 compared to Scenario 1.In addition, the EVA acts as an energy consumer in Scenario 1 with a charging cost of USD 26,432.95,whereas in Scenario 2, the EVA can profit by participating in the electricity market with a revenue of USD 26,432.95,at which point the EVA acts like a virtual power plant.The proposed bilevel optimization model can improve the revenues of both ISO and EVA and achieve mutual benefit and a win-win situation.The total return of EVA in Scenario 2 is USD 20,830.07,where EVA gains USD 8727.09,USD 28,535.84,and USD 10,021.32 from the day-ahead energy market, day-ahead reserve market, and intra-day market, respectively.EVA is primarily profitable through the day-ahead reserve market and adjusts earnings settlement in the intra-day market according to the intra-day schedule.
(4) The wind abandonment penalty price C spill affects the amount of wind energy abandoned in the intra-day stage.Comparing the scenarios where C spill is 0 and USD 10/MW, the ISO's revenue in the intra-day market decreases by USD 197.5.Correspondingly, EVA's reserve capacity is dispatched to consume wind power in the intra-day market, and its revenue increases by USD 197.5.The system should set a reasonable wind abandonment penalty price according to the actual scheduling requirements.
The two-stage bilevel optimization model proposed in this paper can provide a reference for EVA to develop dispatch strategies in the day-ahead and intraday electricity markets.Subsequent research will further focus on how to rationally decompose EVA scheduling instructions to each EV, focusing on real-time control strategy research and compensation mechanism design.In addition, if electricity generators or storage assets are also regarded as profit-maximizing entities, they can also be seen as followers in the bilevel model.The model proposed in this paper will be expanded into a bilevel model with one leader and multiple followers, which will be part of our future research [30,31].

Figure 1 .
Figure 1.The framework of EVA participation in the electricity market.

Figure 1 .
Figure 1.The framework of EVA participation in the electricity market.

pFigure 2 .
Figure 2. Energy and power boundaries of an individual EV.

Figure 2 .
Figure 2. Energy and power boundaries of an individual EV.

Figure 4 .Table 2 .Figure 4 .
Figure 4. Forecast power output curves of wind power and baseline load demand.Table 2. The main parameters of EVA.Parameters Values Parameters Values c i p

Figure 5 .
Figure 5. Clearing results of the day-ahead electricity market in Scenario 1: (a) dispatch power; (b) up-reserve capacity; (c) down-reserve capacity; (d) day-ahead electricity prices.

Figure 5 .
Figure 5. Clearing results of the day-ahead electricity market in Scenario 1: (a) dispatch power; (b) up-reserve capacity; (c) down-reserve capacity; (d) day-ahead electricity prices.

Figure 6 .
Figure 6.Clearing results of the intra-day electricity market in Scenario 1: (a) up-reserve scheduling requirement; (b) down-reserve scheduling requirement; (c) intra-day electricity price.

Figure 7 .
Figure 7. Clearing results of the day-ahead electricity market in Scenario 2: (a) dispatch power (b)up-reserve capacity; (c) down-reserve capacity; (d) day-ahead electricity prices

Figure 7 .
Figure 7. Clearing results of the day-ahead electricity market in Scenario 2: (a) dispatch power; (b)up-reserve capacity; (c) down-reserve capacity; (d) day-ahead electricity prices.C IRI,rt represents the incentive price paid by the ISO to EVA for intra-day dispatch reserve capacity.C IRC,rt denotes the incentive price paid by EVA to EV users for intra-day dispatch reserve capacity.

Figure 8 .
Figure 8. Clearing results of the intra-day electricity market in Scenario 2: (a) up-reserve sch ing requirement; (b) down-reserve scheduling requirement; (c) intra-day electricity price.

Figure 8 .
Figure 8. Clearing results of the intra-day electricity market in Scenario 2: (a) up-reserve scheduling requirement; (b) down-reserve scheduling requirement; (c) intra-day electricity price.

Figure 9 .
Figure 9. Impact of spill C on ISO and EVA intra-day revenue.

Figure 9 .
Figure 9. Impact of C spill on ISO and EVA intra-day revenue.
denote the maximum value of the energy of the EV and the minimum threshold of the energy to prevent over-discharge of the EV, respectively.p c i and p d i indicate the rated charging and discharging power of the EV, respectively.η c and η d denote the charging and discharging efficiency of the EV, respectively.

Table 1 .
Operation and offering parameters of thermal power producers.

Table 1 .
Operation and offering parameters of thermal power producers.

Table 2 .
The main parameters of EVA.
Minimum threshold of the energy to prevent over-discharge of EV (MWh) p c Upper and lower bounds of power of EVA at time τ(MW) P + Upper power bound of EVA at time period t (MW) P − Lower power bound of EVA at time period t (MW) Lower response capability bound of EVA at time period t (MW) C IRC,re Incentive price paid by EVA to EV users for providing reserve capacity (USD/MWh) t t Power of EV at time τ(MW) e i (τ − ∆τ) Energy of EV at time Energy of EV at time (τ − ∆τ) (MWh)