Research on site selection of electric vehicle swap station based on actual data

： In order to facilitate users to switch batteries, starting from the trajectory of electric vehicles, rationally arrange the location of electric vehicle switch stations. First, determine the service radius of the swap station from the consideration of the driver's driving preference, the service target of the swap station and the cruising range of electric vehicles; secondly, use the grid method to divide the Jinjiang District into 42 sub-regions. Through the analysis of massive driving data, combined with power exchange demand and median center theory, the candidate site for the power exchange station in Jinjiang District was initially selected. Finally, the location allocation model is used to select the distribution of the replacement stations when the number of stations is the smallest and the coverage is the largest, and sensitivity analysis is carried out. The conclusion shows that: when the service radius is 3.03km, 12 substations can meet 93.21% of the points.


Introduction
Electric vehicles replace traditional fossil energy drives with electric drives, which is one of the effective ways to reduce fossil energy consumption, alleviate environmental pollution, and achieve carbon peaking and carbon neutrality. However, due to the fact that economies of scale have not yet formed and the availability of data is restricted, the current issue of the location of power exchange facilities has not been reliably resolved.
In order to solve the problem of selecting the location of power exchange facilities, many scholars have conducted research from different angles. In the early days, people's research was partial to theory. P-median, P-center, and coverage are the main research contents of facility site selection, but today's site selection research is biased toward reality. Mahor [1] and Liu [2] regard the demand for power exchange as the basis for selecting the location of the power station. Considering the driving distance, Yang [3] and Lu [4] both set the goal of minimizing driving cost.
To sum up, the research of related scholars is biased towards practical problems, and most of them start with many factors that affect the site selection of power swapping stations. According to realistic data, research on the feasibility analysis of the site selection and construction of power swapping service facilities is rare, especially research on the site selection and construction of electric vehicle swap stations based on massive driving trajectories remains to be done.

Related theories of location allocation model
Given facilities and demand points, the purpose of the location allocation model is mainly to optimize the spatial layout of facilities to meet the needs of more users. In this article, facility point represents the swap station, and the demand point is the replacement demand point. This paper uses the ArcGIS 10.6 software to minimize the impedance and minimize the number of facilities to optimize the site selection of the switching station to ensure the shortest travel distance for users and the minimum number of switching stations (see Table 1 for details).

Minimize the impedance model
In this study, minimizing impedance refers to the minimum cost of the total distance from each demand point to the switching station.
Among them, ρ ij represents the distance from the point (x i , y i ) to the point (x j , y j ), and ρ df is the collection of the distance from each demand point to the facility.
Due to the limitation of calculation tools, when calculating the minimum impedance, this paper will use the projection distance between the demand point and the switching station to approximate the distance between the demand point and the switching station. Figure 1 is an illustration of the process of minimizing impedance calculation, combined with formula (2), we can see: In this example, ρ df (A)>ρ df (B) means that the sum of the distances from the demand point to substation A is shorter than the sum of the distances from the demand point to substation B.

Minimize the number of facilities
Minimizing the number of facilities means that under the condition of a given impedance interruption, the demand points in the coverage area can be allocated to the facilities as much as possible, and the number of facilities is minimized. Impedance interruption is a limit, usually expressed by time or distance. The time or distance consumed from the demand point to the facility exceeds the set limit, indicating that the facility cannot provide services for the demand point. In this paper, the service radius is taken as the impedance interruption. After the impedance interruption is determined, under the optimization of the system minimization facility model, the number of substations is minimized, and the demand points within the service range of the substation can be basically allocated to the substation. Figures 2 and 3 show the distribution of demand points when the impedance interruption is not given and the impedance interruption is 2km.  Through comparison, it is found that in the two cases, the coverage rate of the substation is 100%. After the given impedance is interrupted, the number of substations is reduced from 4 to 3, and the service objects of the reduced substation are allocated to the remaining 3 stations.

data source
All the driving trajectory data used in this research comes from the DC competition data set, which is a GPS record of more than 1.4 billion of 14,000 taxis in 2014. The data was recorded from August 3rd to August 30th. Under the premise of fully considering the integrity and time continuity of the data, this paper uses the trajectory of 2000 taxis in Jinjiang District during the period from August 24 to August 30 to simulate the trajectory of electric vehicles. Such as shown in Table 2, this paper selects the relevant data of the 6 variables in the data set, vehicle number, latitude and longitude, recorded time and date, and passenger loading (0 means no passengers, 1 means there are passengers) for analysis. With the support of large sample data, it is reasonable to believe that the driver's driving preference, electric vehicle travel trajectory preference, and the location of the power exchange demand point are relatively stable. All studies are carried out under the above assumptions.

Data collation
Due to the short recording time interval, there are more than ten million pieces of driving data. In order to facilitate direct use in the paper, the data needs to be cleaned. The cleaning process is as follows: Step 1: data interval standardization. In the original data set, the interval of driving data ranges from a few seconds to tens of seconds. In order to facilitate statistics and simulation analysis, this article uses the SPSS tool to uniformly set the time interval to 1 minute and delete duplicate data.
Step 2: Constrain the range of the electric vehicle's trajectory. This study takes Jinjiang District as the research area. Therefore, all the data of 2000 vehicles are extracted from the original sample, and the intersection tool in ArcGIS is used to combine the outline map of Jinjiang District, and the data that intersects with the outline map are selected for research.

Determination of service radius
The service radius of electric vehicle swap facilities is different from the service radius of gas stations. It needs to be comprehensively considered from two aspects: charging station planning service targets, and endurance mileage (1) Endurance mileage The cruising range of an electric vehicle is closely related to the state of charge (Stage of Charge, SOC), but SOC does not equal the cruising range. In fact, there is about 5% error in the SOC, that is, when the SOC is 0, the electric vehicle still has 5% power and can continue to travel for a certain distance, as shown in Table 3. As shown, among them, the shortest mileage is 4.5km. The service radius of the battery swap station should be less than the driving range of electric vehicles, so the service radius of the station for electric vehicles should be less than r<4.5km. (2) Planning service targets of charging stations The swap station has a certain service radius and service range. Since Jinjiang District does not have a clear standard, this article draws on the station requirements of some provinces and cities: electric vehicles can reach the station for power exchange within 10 minutes. In the urban area, the average speed of the vehicle is 20km/h; secondly, since the vehicle does not always drive in a straight line in actual driving, there will be a turning and other curved driving route, so the empirical data considering the ratio of the actual travel distance to the straight travel distance is 1.1-1.2. In view of this, the service radius of the substation is calculated as: At present, the number of stations in my country is small and unevenly distributed, which makes it difficult to meet the power replacement needs of users. The construction of the public power exchange network should meet the demand for charging between various regions while ensuring the regional service radius. Therefore, the service scope of the station should overlap. To sum up, this article uses 3.03km as the service radius of the swap station to meet the needs of users as much as possible.

Identification of the demand area for power exchange
Before the initial site selection of electric vehicle swap stations, the sample area needs to be divided into grids of the same size to grid the driving data, which is convenient for calculating the traffic demand in the grid. It can be seen from the above that the service radius of the electric vehicle swap station in Chengdu is planned to be 3.03km. In order to meet as many needs as possible, the coverage areas can overlap. Therefore, the grid is divided according to the latitude and longitude 0.01° as the division standard, Jinjiang District is divided into 42 grids as shown in the figure 4.  (2) Long stay area When the taxi is changing the battery, it should be in a state where the previous order has ended and the next order has not started, that is, two consecutive passengers are recorded as 0 and 1. During the driving of the vehicle, the record should be continuous, and once it is interrupted, it will be a new record. This article uses 1min as the interval, there are records in [0,1], and the time is continuous, and there are records in [1,2], then the records in the time period [0,2] are continuous. If there are records in [0,1] and no records in [1,2], the first record will be interrupted, as shown in Figure 6. Because the whole process of changing the battery takes only 3 minutes, this article sets the stay time as t>3min, and counts the number of vehicles staying longer than 3 minutes in each area. Figure 7 shows the distribution of vehicles when the vehicles stay for a long time. The depth of the grid color represents the number of long-stay vehicles in each grid. The traffic flow close to the main urban area is large, and the number of parking vehicles is larger, and the darker the grid color. The long-term stay area is the potential demand area for power exchange, and it is the basis for the site selection of the power exchange station.

Preliminary site selection for the swap station
The high-density coincidence area determines the number of service points for the substation, and the long-term stay area determines the site selection range of the station. In order to meet the user's power replacement demand, each grid needs to build at least one station, and the distance between the demand point in each grid and the station is minimized. Use the fishing net tool in ArcGIS to grid the Jinjiang District, and use the spatial statistical tool based on the central theory to identify thelocation point that minimizes the total distance between the demand points. Secondly, combined with the minimized impedance model, the number of stations that minimizes the user's travel cost is obtained, and the result is shown in Figure 8. It can be seen from Figure 8 that when the number of stations is 25, 221 demand points are basically covered. Close to the main urban area, the traffic volume is large, and the demand for power exchange is high; while in some marginal areas, because the demand for power exchange is small, most of the demand points matched by a station correspond to only 1 to 3; The demand points corresponding to the stations are relatively balanced, and the distribution of stations is relatively even. From the operator's point of view, it is not feasible to build stations in places where the demand is small. Therefore, while meeting the needs of more users, it is necessary to reduce the number of stations in order to reduce the cost of station construction as much as possible.

Minimize the number of facilities
In order to maximize the coverage area, it is also necessary to meet the user's needs as much as possible. This article uses ArcGIS and takes a radius of 3.03km as the service radius to establish a minimum facility model for stations and points, and finally knows the minimum number is 12, and the result is shown in Figure 9.
It can be seen from Figure 9 that the upper left corner area is close to the main urban area of Chengdu, with large traffic flow, dense demand points, and the distribution of swap stations; demand points in other areas are scattered, and the distribution of stations is relatively sparse. At the same time, when the number of substations is streamlined, some demand points may not be allocated to substations. As shown in Figure 10, the distance from demand point a to the switching station A is beyond the service range of the switching station and cannot correspond to the station; on the other hand, the demand point b is within the service range of the station B, but is limited by the shortest network path, cannot correspond to the swap station.  Table 4 shows the satisfaction of stations to demand response under different scenarios. It can be seen that in all service radius situations, the replacement service at demand points is basically fully covered, with the highest and lowest coverage rates being 97.74% and 93.21%, respectively. For example, when the service radius is extended to 3.23km, the highest service demand point of the station is 90, which accounts for 42.65% of all demand points. A certain station undertakes too much service work, which may cause a certain extent, it caused congestion in the response of the vehicle battery exchange service, while the distribution of demand point response in scheme 2 and scheme 3 was more balanced. Thirdly, with the expansion of the service radius, the number of substations shows a downward trend.

sensitivity analysis
In summary, option 5 has the least number of stations, but the distribution of demand points is seriously unbalanced. option 2 and option 3 solve the problem of uneven demand distribution. Combined with the sensitivity of the number of substations to the service radius, 12 stations are the best choice. Therefore, in this case, option 3 is the best choice.

Summary
This study uses actual operating data to discuss the optimal decision-making problem of the location of station and its demand response in Jinjiang District. The research results show that the 12 stations can meet 93.21% of demand, and the service response density of the facilities is relatively balanced, and there is no excessive power swap load at a certain facility. It should be noted that in the analysis and calculation process of this article, in order to reduce the solution time and reduce the consumption of system resources, the shortest network path between the station and the demand is considered, not the actual network path between the station and the demand. Therefore, when setting the service radius, due to the limitation of the sample data, this article does not consider the seasonal and temporal changes that may exist