A New Method to Plan the Capacity and Location of Battery Swapping Station for Electric Vehicle Considering Demand Side Management

Abstract: Compared to electric vehicle (EV) charging mode, battery swapping mode can realize concentrated and orderly charging. Therefore battery swapping stations (BSS) can participate in the demand side management (DSM) as an integrated form. In this context, a new method to plan the capacity and location of BSS for EV, considering DSM, is proposed in this paper. Firstly, based on the original charging power of BSS with the rule of “First-In First-Out”, a bi-level optimal configuration model of BSS, in which net profit of BSS is maximized in the upper model and operating cost of Distribution Company is minimized in the lower model, is developed to decide the rated power, number of batteries, contract pricing and dispatched power of BSS for DSM. Then, the optimal locating model of BSS with the objective of minimizing network loss is built. A mesh adaptive direct search algorithm with YALMIP toolbox is applied to optimize the bi-level model. Simulation calculation was carried on IEEE-33 nodes distribution system and the results show that participating in DSM can improve the economic benefits of both BSS and distribution network and promote the consumption of distributed generation, verifying the feasibility and effectiveness of the proposed method.


Introduction
With the ability of enhancing sustainability of road traffic [1] and promoting low-carbon economic transition of transportation, electric vehicles (EVs) have attracted much attention all around the world.Many countries have been stepped up policies and standards to support the development of EVs and related facilities, especially in United States, Japan, and European countries.In 2010, the topic of "Research on the effect of electric vehicle charging on power grid and its orderly charging" was officially proposed by Chinese government, which marked that electric vehicles had become one of the main research hotspots in China [2].However, lagged construction of repowering facilities has become the bottleneck to fast development of EV [3].Therefore, it is badly in need of rapid development of EV energy supplying stations and the related facilities, to provide important energy supply and maintenance service for the normal operation of EV.
Recently, the main energy supplying mode of EV is the battery charging mode [4].Because of it is easy to conduct and has a lower one-time investment, battery charging stations (BCS) for EV belonging to the battery charging mode have been developed rapidly.However, along with the increase of EVs, drawbacks of BCS become prominent such as long charging time and poor endurance.Taking BAIC BJEV EV200 as an example, the maximum endurance mileage is 200 km with 6-8 h charging time [5].
Based on this context, battery swapping mode returns into the view of the public in China.In July 2015, the company BAIC BJEV signed a strategic cooperation agreement with Sinopec's Beijing oil to declare that the two sides will build the swapping services for EV based on the gas station network [6].Compared to the charging mode, battery swapping mode has its unique advantages, including the control ability of charging time and charging power for depleted batteries to achieve orderly charging, short waiting time for EV users of less than 5 min [7], storage ability to provide different kinds of auxiliary services, and convenient management.To promote development of BSS, the optimal planning and operating methods of BSS should be researched first and the potential economic benefit should be fully considered in the process to promote investment for BSS and cost recovery.
To date, some studies have been done regarding the optimal planning and operation of BSS.There are two main types in the existing works.Articles in the first type optimize the planning and operation of BSS with the goal of satisfying the requirements of EV users which mainly focus on the "service" attribute of BSS [8], involving minimizing waiting time and travelling time of EV users, meeting swapping demand [9], and ensuring BSS service availability [10].The other type primarily concerns the "power" attribute of BSS, e.g. the influence of BSS on power grid or the revenue obtained by the interaction between BSS and power grid.A dynamic operation model of BSS based on the short term battery management with responding actively to the price fluctuation was built in [7] and results show that BSS can acquire additional revenue in electricity market.Charging model of double objective optimization considering load shifting to minimizing the charging cost and reducing the load fluctuation was presented in [11] and the simulation results show that 30% of the optimized charging cost can be saved with the sharpening peak effect.To determine the capacity of BSS with consideration of the efficiency of photovoltaic (PV) energy, multi-objective model of PV-based BSS towards benefits of economy and environment was provided in [12].EV users' swapping behaviors were studied in [13] to determine the swapping load impacts on the power grid side and generation side.
In addition, as an effective method to increase the flexibility of power system, demand side management (DSM) has been paid much attention.Due to the controllability of EV charging time, charging mode of EV has been researched as a form of responsive demand [14].Nowadays, most studies in this aspect mainly focus on the mechanism of charging and discharging pricing [15].Based on EV charging demand varying in response to the electricity price, the optimal pricing and dispatch problem of smart grid retailers are formulated as a Stackelberg game in [16].A model to optimize time-of-use electricity price for the purpose of making use of orderly charge behavior by EV and realizing peak-shaving and valley-filling for power systems was presented in [17].As an integrated form of EV batteries, BSS offers a better new form of responsive demand.There have been some applications of BSS as a kind of controllable resource in demand side.The application of BSS to the system frequency regulation as responsive demand was studies in [18].A multi-objective bi-level optimization model of real-time charging/discharging dispatch with coordination of BSS and grid is established in [19].However, the cost of BSS responding to the dispatch of dispatch center was not considered in [19] and it just dealt with the operation of BSS not involving the BSS optimal planning.
In this paper, the process of BSS participating in DSM in distribution network with DG is considered into the optimal planning of BSS.Compared to the former studies, the main contributions and differences of this paper can be summarized as follows.(1) The optimal sizing and location of BSS are decided separately in this paper in order to reduce the complexity of the problem and difficulty of solving.(2) Both the economic profits of BSS and distribution company (DisCo) [20] are considered in the process of optimal planning of BSS and a bi-level programming model of BSS is presented realizing the decomposing of BSS optimal planning and DisCo economic dispatching.(3) Besides the planning variables containing optimal numbers of batteries and chargers initially purchased and optimal location, the operating variables, including contract price and dispatched power of BSS participating in DSM, can also be decided through the proposed model.
The rest of this paper is organized as follows.Section 2 gives the mechanism of BSS participating in DSM.The optimal sizing and locating mode of BSS considering DSM is introduced in Section 3.
Solving method of the bi-level model is shown in Section 4. The simulation of the proposed model for testing is provided in Section 5. Section 6 discusses the suggestions for BSS operators and DisCo.Finally, Section 7 is devoted to the conclusions and future research.

Mechanism of BSS Participating in Demand Side Management
Typically, without the limitation of external conditions, the rule of "First-In First-Out" is applied as the charging strategy of BSS, i.e., the swapped batteries are charged as soon as possible to satisfy the swapping demand in the next period [21].However, this may result in the increase of system load peak-valley ratio and reduce the benefit of DisCo.Therefore, some measures must be adopted to control the charging process of BSS.In this paper, the charging process of BSS is guided by DSM.In essence, the charging power of BSS is dispatched by DisCo as a form of DSM.
Through dispatching BSS, DisCo will profit in peak load shifting and valley load filling.Meanwhile, original charging power of BSS will be changed due to the dispatching by DisCo.More batteries and chargers need to be reserved in BSS, which will increase the initial configuration cost of BSS.Therefore, DisCo should pay some compensation for dispatching BSS.Contract price is one of the effective compensation methods [20].The mechanism of BSS participating in DSM is that in the market environment, BSS offers contract price of participating in DSM to DisCo and according to the system load curve and spot electricity price of the upper grid, DisCo decides how much power of BSS in each period is dispatched to minimize its operation cost.The profit of BSS participating in DSM is calculated as Equation (1).
where T is the total number of periods in the research; ∆t is the time interval (1 h); c R is contract price of DisCo dispatching unit power of BSS (¥/kWh); and P R.t is the dispatched power of BSS in time t.P R.t greater than zero means the charging power of BSS in time t needs to increase.Similarly, P R.t less than zero means the charging power of BSS in time t needs to decrease.The dispatched power of BSS in each time is based on the original charging power.Therefore, the original charging power curve of BSS must be obtained.Because the rule "First-In First-Out" is applied, the original charging power curve is determined by battery swapping demand and the rated power of BSS.The swapping demand power is calculated by Equation (2) and the calculation process of BSS original charging power in period t is shown in Figure 1.
where p EV.t is swapping power of EV in time t; S B is the rated capacity of EV battery; L t is the number of EVs coming to the BSS for battery swapping in time t which can be obtained through the hourly swapping demand model of BSS in [22]; SOC l is the value of battery state of charge (SOC) when the swapped battery l starts to charge; and T B is the number of periods required to charge a battery.In order to prevent the battery from permanent damage and prolong the lifetime, EV battery cannot be in full-charged state.Therefore, 95% is the upper boundary of SOC.In Figure 1, α is set to store the swapping demand power that cannot be charged immediately due to the restriction of BSS rated power; PB.nom is the rated power of BSS; and por.t expresses the original charging power of BSS in time t.
Generally, an EV battery is charged using constant current-constant voltage mode.Recently, the constant power charging mode has also become popular in charging EV batteries [23].Therefore, in order to provide better support for grid, the constant power charging mode is adopted in this paper.

Model Formulation for Sizing and Locating of BSS
In order to reduce the complexity of the problem and difficulty of solving, the sizing and locating of BSS are decided separately in this paper.Firstly, without considering the specific grid structure, through dispatching BSS, DisCo intends to minimize the operation cost incurred in satisfying the load demand, whereas BSS intends to maximize the net profit with the profit of participating in DSM.Through the game between these two subjects, the rated power of BSS, dispatched power in each time and contract price for DSM can be determined.Structure of this sizing model is shown in Figure 2. Secondly, for BSS in different nodes chiefly affects the power flow resulting in different network power losses [24], optimal location model of BSS takes the minimum network power loss as an objective, based on the capacity and dispatching power of BSS given by the sizing model.In Figure 1, α is set to store the swapping demand power that cannot be charged immediately due to the restriction of BSS rated power; P B.nom is the rated power of BSS; and p or.t expresses the original charging power of BSS in time t.
Generally, an EV battery is charged using constant current-constant voltage mode.Recently, the constant power charging mode has also become popular in charging EV batteries [23].Therefore, in order to provide better support for grid, the constant power charging mode is adopted in this paper.

Model Formulation for Sizing and Locating of BSS
In order to reduce the complexity of the problem and difficulty of solving, the sizing and locating of BSS are decided separately in this paper.Firstly, without considering the specific grid structure, through dispatching BSS, DisCo intends to minimize the operation cost incurred in satisfying the load demand, whereas BSS intends to maximize the net profit with the profit of participating in DSM.Through the game between these two subjects, the rated power of BSS, dispatched power in each time and contract price for DSM can be determined.Structure of this sizing model is shown in Figure 2. Secondly, for BSS in different nodes chiefly affects the power flow resulting in different network power losses [24], optimal location model of BSS takes the minimum network power loss as an objective, based on the capacity and dispatching power of BSS given by the sizing model.

Bi-Level Optimal Programming Model of BSS Considering DSM
There are two subjects involved in the model, DisCo and BSS operator.As a new market participant, it is urgent for BSS to make a profit through optimal configuration.However, if BSS is configured arbitrarily, it will give enormous impact to the distribution system because of the lower voltage level in distribution system [25].Thus, DisCo must participate in the process of BSS optimal configuration through dispatching BSS in the form of DSM.According to [26], this problem belongs to bi-level programming model.The upper model focuses on the optimal configuration of BSS with consideration of BSS interests, deciding the rated power, number of batteries initially purchased and offering bidding price of DSM (i.e., contract price) to DisCo; the lower model simulates the economic dispatch of distribution network with objective of minimizing the operation cost of DisCo, deciding the dispatched power of BSS participating in DSM according to the contract price.The bi-level programming model of BSS considering DSM is shown as follows.

Upper-Level Optimization Model
where BBSS is annual net profit of BSS; BEX and BDM are annual battery swapping revenue and participating in DSM revenue, respectively; Ctol is one-time investment cost of BSS; Cop is annual operation cost of BSS; and Cmn is annual maintain cost of BSS.Apparently, these items include both planning phase and operation phase.For the sake of unity, every item is turned into uniform annual value in the following Equations ( 4)-( 8) [27].
where cB is unit price for swapping one battery.According to the different remaining energy of batteries (indicated by the value of SOC), the swapping cost is different, equal to a certain discount.
In Equation ( 5), f(Nw) is the fixed investment function of BSS; Nw and Mw represent the numbers of chargers and batteries initially purchased in BSS; Cb is unit price of EV battery; r0 is interest rate; and m is the depreciation period of BSS.In Equation ( 6), w is the fixed investment including business building and auxiliary construction; q is unit price of battery chargers; and e is the equivalent

Bi-Level Optimal Programming Model of BSS Considering DSM
There are two subjects involved in the model, DisCo and BSS operator.As a new market participant, it is urgent for BSS to make a profit through optimal configuration.However, if BSS is configured arbitrarily, it will give enormous impact to the distribution system because of the lower voltage level in distribution system [25].Thus, DisCo must participate in the process of BSS optimal configuration through dispatching BSS in the form of DSM.According to [26], this problem belongs to bi-level programming model.The upper model focuses on the optimal configuration of BSS with consideration of BSS interests, deciding the rated power, number of batteries initially purchased and offering bidding price of DSM (i.e., contract price) to DisCo; the lower model simulates the economic dispatch of distribution network with objective of minimizing the operation cost of DisCo, deciding the dispatched power of BSS participating in DSM according to the contract price.The bi-level programming model of BSS considering DSM is shown as follows.

Upper-Level Optimization
where B BSS is annual net profit of BSS; B EX and B DM are annual battery swapping revenue and participating in DSM revenue, respectively; C tol is one-time investment cost of BSS; C op is annual operation cost of BSS; and C mn is annual maintain cost of BSS.Apparently, these items include both planning phase and operation phase.For the sake of unity, every item is turned into uniform annual value in the following Equations ( 4)-( 8) [27].
where c B is unit price for swapping one battery.According to the different remaining energy of batteries (indicated by the value of SOC), the swapping cost is different, equal to a certain discount.
f pN w q " w `qN w `eN w 2 (6) In Equation ( 5), f (N w ) is the fixed investment function of BSS; N w and M w represent the numbers of chargers and batteries initially purchased in BSS; C b is unit price of EV battery; r 0 is interest rate; and m is the depreciation period of BSS.In Equation ( 6), w is the fixed investment including business building and auxiliary construction; q is unit price of battery chargers; and e is the equivalent coefficient of investment related to the number of chargers including area covered, transformer and power lines.
where c d.t is electricity price of BSS purchasing from distribution network at time t.P B.t is the actual charging power of BSS at period t with participating in DSM.η c is the charging efficiency of charger.
Maintenance cost contains maintenance expenses of BSS, material cost and staff salaries, and it can be converted into investment cost and the conversion coefficient is set as β.
The constraints for the upper model are as follows.
(1) The constraint about EV swapping demands In order to ensure the normal operation of EV users, the swapping available batteries at the start of each time should not be fewer than the number of EVs coming to BSS to swap battery during this period.Moreover, due to the forecasting error of EV swapping demand, battery redundancy is necessary.Consequently, the constraint about EV swapping demands is expressed as: where β s is redundancy coefficient of battery number.U B.t is the number of batteries available for swapping at the start of period t and subject to the equality constraint shown in Equation (10).(10) where ∆U B.t-1 is the number of newly added fully charged batteries during period t ´1, which is calculated as Equation (11).
(2) BSS charging power constraint (3) The relationship between chargers and the rated power of BSS where p w is the rated power of charger.This means rated power of a whole BSS must be integer multiple of charger's rated power.(2) Power interaction limit of distribution system with upper grid 0 ď p g.t ď p g.max (18) where p g.max is the upper boundary for the power interacted between distribution system and upper system while zero is the lower boundary.
(3) The dispatchable power limits of BSS In one scheduling cycle (24 h), the sum of BSS charging power must be equal to EV swapping demand power.
That is to say, the algebraic sum of BSS dispatching power in one scheduling cycle should be zero, shown as: In addition, due to the limitation of EV battery lifetime at present, the functions of V2G are not taken into consideration here.Namely, BSS is not permitted to return power to distribution system.Therefore, the original charging power of BSS is the upper boundary of BSS negative dispatchable power in each period.Moreover, to ensure the actual charging power of BSS is integer multiples of charger's rated power, the dispatched power also must be integer multiples of charger's rated power, shown as: ´pR.t " ´N p w ď p or.t (21) where N is an integer between [´N w.max , N w.max ] in which N w.max denotes the maximum number of chargers in BSS.
The flowchart of the proposed bi-level model is shown in Figure 3 in which the items marked in grey are the added ones in this bi-level model compared with the traditional BSS planning model.

Optimal Locating Model of BSS
BSS optimal locating model takes the minimum network losses as the objective.The objective function is shown in Equation (22).
where n is the number of nodes; Iij is the current magnitude in the feeder ij; and Rij is resistance of feeder ij.
Objective Equation ( 22) is subject to the following constraints.
(1) Power flow constraints where Qg.i t , Qd.i t , and Ui t are reactive power output of distribution system, reactive power load, and voltage of node i at time t, respectively.Since the power factor of most inverters for DG is close to 1.0, the reactive power of DG is neglected [28].Gij and Bij are conductance, susceptance of feeder ij and θij is the difference of node voltage phase angle between node i and node j.
(2) Node voltage and line current constraints where Umin and Umax stand for the minimum and maximum limits with respect to the voltage variation, respectively.Iij.max is the permitted maximum current limit in the feeder ij.
(3) The constraint to the number of BSS Limited by practice, it is necessary to restrict the number of BSS.

Optimal Locating Model of BSS
BSS optimal locating model takes the minimum network losses as the objective.The objective function is shown in Equation (22).
where n is the number of nodes; I ij is the current magnitude in the feeder ij; and R ij is resistance of feeder ij.
Objective Equation ( 22) is subject to the following constraints.
(1) Power flow constraints where Q g.i t , Q d.i t , and U i t are reactive power output of distribution system, reactive power load, and voltage of node i at time t, respectively.Since the power factor of most inverters for DG is close to 1.0, the reactive power of DG is neglected [28].G ij and B ij are conductance, susceptance of feeder ij and θ ij is the difference of node voltage phase angle between node i and node j.
(2) Node voltage and line current constraints where U min and U max stand for the minimum and maximum limits with respect to the voltage variation, respectively.I ij.max is the permitted maximum current limit in the feeder ij.
(3) The constraint to the number of BSS Limited by practice, it is necessary to restrict the number of BSS.
where ∆x k is a binary variable (0 or 1) indicating whether BSS is located in candidate location k; K is the number of candidate locations for BSS; and N BSS.max is the maximum number of BSS located in the system.
(4) The rated power and initial batteries in each BSS The sum of all BSS rated power allocated in the system is equal to the total rated power optimized by bi-level programming model.Furthermore, the number of batteries initially purchased by each BSS is proportion to the rated power, shown as Equation (26).
where p Bnom.k is the rated power of BSS k.M w.k is the number of batteries initially purchased in BSS k.
It is noted that the decision of BSS actual geographical position should take practical spatio-temporal distribution of vehicles and the geographical distance to station into consideration, as in [29].However, in this paper, the optimal locating model of BSS just considers the "power" attribute of BSS to determine the electrical position of BSS.Therefore, only network loss is considered in the process of deciding BSS location.

Solving Method
As shown in Figure 3, the proposed optimal planning model of BSS considering DSM contains two sub-problems.The model solving process is that the upper model passes the initialized BSS rated power and contract price to the lower model; then based on the original charging power of BSS, the lower model optimizes economic dispatch of distribution system with the given rated power and contract price of BSS and the dispatched power of BSS in each time can be obtained and be returned back to the upper model; the upper optimization process is go on and by iteratively, the optimal solution can be obtained eventually.
In the upper model, for the complex relationships among BSS rated power, contract price and the operation cost of DisCo are hard to determine directly, the lower optimization process can be regarded as "black box" from the upper model's perspective.Therefore, as an effective "black box" optimization algorithm, Mesh Adaptive Direct Search (MADS) is adopted to solve the upper model.MADS was first proposed by Audet and Dennis in 2004 [30].MADS can be divided into Search process and Poll process (more details can be seen in [31]).Compared to the traditional heuristic algorithm, MADS is suitable for optimization problems with more complex objective functions and can greatly shorten the calculation time.
The lower model is a problem of economic dispatch, which is an integer optimization linear programming and solved by the MATLAB toolbox YALMIP.YALMIP is a modeling language for advanced modeling and solution of convex and nonconvex optimization problems in MATLAB [32].
To satisfy the constraint of EV swapping demands in Equation ( 9), the minimum value of batteries initially purchased in BSS M w can be obtained by the actual charging power of BSS p B.t and the swapping power of BSS p EV.t .The calculation process is shown in Figure 4.The solving flowchart of the proposed bi-level model is shown in Figure 5, in which Tp expresses one scheduling period (24 h in this paper).The solving flowchart of the proposed bi-level model is shown in Figure 5, in which T p expresses one scheduling period (24 h in this paper).The solving flowchart of the proposed bi-level model is shown in Figure 5, in which Tp expresses one scheduling period (24 h in this paper).

System Parameters
As a test case, IEEE 33-bus system at 11 kV in Figure 6 is considered with a peak load of 3.775 + j2.300 MVA and high level of DG penetration.The type of DG is chosen as wind power connected to nodes 21 and 31 with power rating of 2500 kW.Wind energy data are taken from Guizhou area, China (longitude 105.29 ˝, north latitude 27.32 ˝).Due to no actual operating data of BSS at present, the swapping demand of EVs only can be analyzed according to the forecast.In target year, it is predicted that the total number of EVs will reach 500.The battery swapping demand prediction method can be found in [8].Consequently, the typical daily load, wind power output, EV swapping demand power and the forecasted electricity price [33] are presented in Figure 7.The candidate locations of BSS are nodes 2-33.Limited by practice, there are no more than three battery swapping stations in this system.Other important parameters of the system are set in Table 1.

System Parameters
As a test case, IEEE 33-bus system at 11 kV in Figure 6 is considered with a peak load of 3.775 + j2.300 MVA and high level of DG penetration.The type of DG is chosen as wind power connected to nodes 21 and 31 with power rating of 2500 kW.Wind energy data are taken from Guizhou area, China (longitude 105.29°, north latitude 27.32°).Due to no actual operating data of BSS at present, the swapping demand of EVs only can be analyzed according to the forecast.In target year, it is predicted that the total number of EVs will reach 500.The battery swapping demand prediction method can be found in [8].Consequently, the typical daily load, wind power output, EV swapping demand power and the forecasted electricity price [33] are presented in Figure 7.The candidate locations of BSS are nodes 2-33.Limited by practice, there are no more than three battery swapping stations in this system.Other important parameters of the system are set in Table 1.
Before the presentation of results in the case study, the following assumptions are given first: in order to stand out the function of BSS participating in DSM, the difference of swapping revenue are neglected and it is supposed that EVs in the system are uniformly distributed.
From Figure 7, it can be seen that the original EV swapping demand power enlarges the peakvalley difference of system load.Furthermore, output of wind power has the inverse load characteristic; that is, wind power output is in low level during periods of peak load when the electricity price is high which leads to the economic loss of DisCo and low utilization ratio of DG.

System Parameters
As a test case, IEEE 33-bus system at 11 kV in Figure 6 is considered with a peak load of 3.775 + j2.300 MVA and high level of DG penetration.The type of DG is chosen as wind power connected to nodes 21 and 31 with power rating of 2500 kW.Wind energy data are taken from Guizhou area, China (longitude 105.29°, north latitude 27.32°).Due to no actual operating data of BSS at present, the swapping demand of EVs only can be analyzed according to the forecast.In target year, it is predicted that the total number of EVs will reach 500.The battery swapping demand prediction method can be found in [8].Consequently, the typical daily load, wind power output, EV swapping demand power and the forecasted electricity price [33] are presented in Figure 7.The candidate locations of BSS are nodes 2-33.Limited by practice, there are no more than three battery swapping stations in this system.Other important parameters of the system are set in Table 1.
Before the presentation of results in the case study, the following assumptions are given first: in order to stand out the function of BSS participating in DSM, the difference of swapping revenue are neglected and it is supposed that EVs in the system are uniformly distributed.
From Figure 7, it can be seen that the original EV swapping demand power enlarges the peakvalley difference of system load.Furthermore, output of wind power has the inverse load characteristic; that is, wind power output is in low level during periods of peak load when the electricity price is high which leads to the economic loss of DisCo and low utilization ratio of DG.Before the presentation of results in the case study, the following assumptions are given first: in order to stand out the function of BSS participating in DSM, the difference of swapping revenue are neglected and it is supposed that EVs in the system are uniformly distributed.
From Figure 7, it can be seen that the original EV swapping demand power enlarges the peak-valley difference of system load.Furthermore, output of wind power has the inverse load characteristic; that is, wind power output is in low level during periods of peak load when the electricity price is high which leads to the economic loss of DisCo and low utilization ratio of DG.

Optimization Results
In order to verify the validity of the proposed method, two schemes are discussed in this paper, including original scheme (without consideration of DSM) and the proposed scheme (BSS participating in DSM).Optimal allocation results are shown in Table 2. Net profits of BSS and operation costs of DisCo in two schemes are shown in Tables 3 and 4. As shown in Table 2, compared to the original scheme, the proposed scheme needs more initial batteries.This is because BSS in the proposed scheme not only needs to meet the battery swapping demand of EV users, but also stores electric energy to participate in DSM.
In Table 3, we can see that compared to the original scheme, though the investment cost and maintenance cost of BSS in the proposed scheme increase (because of more initial batteries required), net profit in the proposed scheme is yet greater with consideration of DSM profit.It means that DSM is conducive to improving the economic benefit of BSS.Moreover, data in Table 4 show that even though the implementation of DSM will increase cost of DisCo with the item of BSS dispatching cost, electricity purchasing cost and environment cost can be reduced significantly.Thus, the total cost of DisCo is decreased.This means that DSM is conducive to improving the economic benefit of DisCo as well.On the other hand, the implementation of DSM can improve the utilization of DG.To clearly illustrate this conclusion, the consumptions of wind power in two schemes are shown in Table 5.To further analyze the difference between two schemes, BSS charging power curves and dispatching power are shown in Figure 8. though the implementation of DSM will increase cost of DisCo with the item of BSS dispatching cost, electricity purchasing cost and environment cost can be reduced significantly.Thus, the total cost of DisCo is decreased.This means that DSM is conducive to improving the economic benefit of DisCo as well.On the other hand, the implementation of DSM can improve the utilization of DG.To clearly illustrate this conclusion, the consumptions of wind power in two schemes are shown in Table 5.As shown in Figure 8, in the proposed scheme, due to the dispatching of DisCo, charging power of BSS during 11:00 a.m. to 9:00 p.m. is decreased and shifted to the period of 11:00 p.m. to 7:00 a.m. the following morning, when wind power output is high and electricity price is low.The dispatched power at 11:00 p.m. is much more than that in 12:00 p.m.This is because output of wind power at 11:00 p.m. is higher.This not only increases the consumption of DG but also decreases the electricity purchasing cost of DisCo.In addition, through participating in DSM, the fluctuation of BSS charging power curve is stabilized and the peak value of charging power is declined which reduces the rated power of BSS.This can be confirmed in Table 2 in which the chargers number and rated power of BSS in the proposed scheme are smaller than those in original scheme.
Finally, according to the optimal locating model of BSS (Section 3.2), the optimal locations of BSS in this distribution system are obtained.Results are exhibited in Table 6.As shown in Figure 8, in the proposed scheme, due to the dispatching of DisCo, charging power of BSS during 11:00 a.m. to 9:00 p.m. is decreased and shifted to the period of 11:00 p.m. to 7:00 a.m. the following morning, when wind power output is high and electricity price is low.The dispatched power at 11:00 p.m. is much more than that in 12:00 p.m.This is because output of wind power at 11:00 p.m. is higher.This not only increases the consumption of DG but also decreases the electricity purchasing cost of DisCo.In addition, through participating in DSM, the fluctuation of BSS charging power curve is stabilized and the peak value of charging power is declined which reduces the rated power of BSS.This can be confirmed in Table 2 in which the chargers number and rated power of BSS in the proposed scheme are smaller than those in original scheme.
Finally, according to the optimal locating model of BSS (Section 3.2), the optimal locations of BSS in this distribution system are obtained.Results are exhibited in Table 6.In order to compare the influence of different DG types, wind power is changed into solar photovoltaic (PV), which has a rather different output characteristic.Output of PV is shown in Figure 9 and the optimization results in Table 7.

The Influence of Different Types of DG
In order to compare the influence of different DG types, wind power is changed into solar photovoltaic (PV), which has a rather different output characteristic.Output of PV is shown in Figure 9 and the optimization results in Table 7.
Figure 9 shows that PV output has a positive load characteristic and there is no abandoning power in original scheme for total system load always greater than PV output.Thus, the dispatching of BSS cannot bring in more environment benefits for DisCo (the values of Cctp are the same in two schemes) and DisCo just profits in decreasing the operation cost Aop through shifting load in the high price periods to the low price periods.The reduction of DisCo profit will influence the process of dispatching BSS.Table 7 shows that, compared to the scheme with wind power, the contract price and DSM profit in this scheme decline greatly.It can be estimated that if the decrease of CD is smaller than the increase of BBSS, the contract price, which benefits both BSS and DisCo, cannot be searched, meaning, in this context, participating in DSM is no longer appropriate.

Discussion
Through the theoretical analysis and simulation results above, suggestions are provided for BSS operators and DisCo as follows.
For BSS operators: (1) BSS may benefit by participating in DSM through setting an appropriate contract price.
(2) To respond to DSM, BSS should purchase more batteries and chargers.
(3) Whether BSS should participate in DSM or not is decided by the relationship between the revenue brought by DSM and the added investment cost for BSS.   Figure 9 shows that PV output has a positive load characteristic and there is no abandoning power in original scheme for total system load always greater than PV output.Thus, the dispatching of BSS cannot bring in more environment benefits for DisCo (the values of C ctp are the same in two schemes) and DisCo just profits in decreasing the operation cost A op through shifting load in the high price periods to the low price periods.The reduction of DisCo profit will influence the process of dispatching BSS.Table 7 shows that, compared to the scheme with wind power, the contract price and DSM profit in this scheme decline greatly.It can be estimated that if the decrease of C D is smaller than the increase of B BSS , the contract price, which benefits both BSS and DisCo, cannot be searched, meaning, in this context, participating in DSM is no longer appropriate.

Figure 1 .
Figure 1.Calculation process of battery swapping station (BSS) original charging power.

Figure 1 .
Figure 1.Calculation process of battery swapping station (BSS) original charging power.

Figure 2 .
Figure 2. System structure of BSS Bi-level optimal sizing model considering demand side management (DSM).

Figure 2 .
Figure 2. System structure of BSS Bi-level optimal sizing model considering demand side management (DSM).

Figure 3 .
Figure 3. Bi-level optimal programming model of BSS considering demand side management.

Figure 3 .
Figure 3. Bi-level optimal programming model of BSS considering demand side management.

Figure 4 .
Figure 4. Calculation flow of the optimal initial batteries in BSS.

Figure 5 .
Figure 5. Flow chart of the proposed bi-level model solved by Mesh Adaptive Direct Search (MADS) with YALMIP.

Figure 4 .
Figure 4. Calculation flow of the optimal initial batteries in BSS.

Figure 4 .
Figure 4. Calculation flow of the optimal initial batteries in BSS.

Figure 5 .
Figure 5. Flow chart of the proposed bi-level model solved by Mesh Adaptive Direct Search (MADS) with YALMIP.

Figure 5 .
Figure 5. Flow chart of the proposed bi-level model solved by Mesh Adaptive Direct Search (MADS) with YALMIP.

Figure 7 .Figure 6 .
Figure 7.Typical daily load, wind power output, EV swapping demand power and electricity price curve.

Figure 7 .
Figure 7.Typical daily load, wind power output, EV swapping demand power and electricity price curve.

Figure 7 .
Figure 7.Typical daily load, wind power output, EV swapping demand power and electricity price curve.

Figure 8 .
Figure 8. Charging power curves of two schemes.

Figure 8 .
Figure 8. Charging power curves of two schemes.

Figure 9 .
Figure 9. Charging power curves of two schemes.

Figure 9 .
Figure 9. Charging power curves of two schemes.
D is the operation cost of DisCo; A op is annual expected electricity purchasing cost; C DM is annual cost of dispatching BSS which equals to B DM in Equation (3); and C ctp is annual environment cost related to carbon emission in the operation stage.Specific expressions are as follows..t is electricity power of DisCo purchasing from upper grid; and c g.t is spot electricity price.Since DisCo is the investment subject of DGs in this paper, the cost of purchasing electricity from DGs is not included in the operation cost.h is the charge rate for pollutant emission (¥/t); and ξ g is emission intensity from the upper grid, representing the amount of emission induced for producing per kilowatt-hour of electricity (t/kWh).The constraints for the lower model are as follows.
3.1.2.Lower-Level Optimization Model minC D " A op `CDM `Cctp (14) where C (1) System power balance ÿ nPN DG p DG.n.t `pg.t " p d.t `plos.t`pB.t (17) where p DG.n.t , p d.t and p los.t represent the expected power output of DG n, the original system load demand and network losses in period t in which p los.t is set as 5% of p d.t approximately, respectively.N DG is the number of DGs in this system.
(12)Tp} back to the upper model Obtain PB.t according to(12)and calculate the number of initial batteries for BSS Mw according to Fig.4 (12)Tp} back to the upper model Obtain PB.t according to(12)and calculate the number of initial batteries for BSS Mw according to Fig.4 Start Input system data and initialize MADS trial point x0(PB.nom,CTR}) in the upper model According to pEV.t and PB.nom, calculate the original charging power por.t of BSS as Fig.1 Perform mesh Search process and pass CTR into the lower model, go into the lower optimization model

Table 1 .
Important parameters of system.

Table 2 .
Optimal allocation results of two schemes.

Table 5 .
The consumptions of DG in two schemes.

Table 5 .
The consumptions of DG in two schemes.

Table 6 .
The consumptions of distributed generation (DG) for two schemes.

Table 6 .
The consumptions of distributed generation (DG) for two schemes.
5.3.The Influence of Different Types of DG

Table 7 .
The consumptions of DG for two schemes.

Table 7 .
The consumptions of DG for two schemes.