Robust Charging Schedule for Autonomous Electric Vehicles With Uncertain Covariates

Autonomous electric vehicles (AEVs) will become an inevitable trend in the future transportation network and have an important impact on the power grid. It is difficult to find the optimal distributed charging solution for AEVs to minimize the system cost with some uncertainties. In this paper, we investigate an AEVs charging and discharging problem with vehicle-to-grid (V2G) services. We aim to minimize the total electricity cost and battery degradation cost of AEVs and charging station batteries with V2G services, which takes the random arrival and departure of AEVs into account. We first propose a distributed charging framework of AEVs and charging stations by clustering method with the constraint of limited AEVs for each charging station in a region and formulate a distributed offline optimization problem. Then we formulate a distributed online charging optimization problem and propose a distributed online AEV charging scheduling (DOAS) algorithm to get an optimal charging solution. To study a more practical case, we reformulate the distributed online optimization problem with the uncertainties from base loads, renewable energy and charging demands. Furthermore, to improve the time efficiency of DOAS algorithm, we reduce the dimension of the distributed problem and design a dimension-reduction DOAS (DDOAS) algorithm. To seek a robust solution with some uncertainties, we propose a DDOAS algorithm with DRO based on Wasserstein distance (DDODW). Simulation results show that DOAS and DDOAS algorithms can have a close-to-optimal charging cost and a significantly less battery degradation cost of charging stations, compared with centralized online charging scheduling algorithm and DDOAS algorithm is more time-efficient than DOAS algorithm. The proposed DDODW algorithm can provide a robust solution for the energy schedule


I. INTRODUCTION
With the development of self-driving technology and intelligent charging technology, autonomous electric vehicles (AEVs) have attracted increasing attention in the industrial and academic community [1]. AEVs will become a cleaner and efficient transportation mode in the future. AEVs have more controllability than electric vehicles (EVs). EVs have been extensively utilized and developed in the past several The associate editor coordinating the review of this manuscript and approving it for publication was Wei Xu . years [2] because EVs are more environmentally friendly than traditional fuel vehicles. The penetration rate of EVs is expected to 25% by 2025 [3] and there will be a large number of AEVs in major cities [4]. AEVs can store redundant energy in their batteries and feed the electricity back to power grid with the vehicle-to-grid (V2G) service [5]. Price signals are used to guide AEVs to charge and discharge to support V2G service [6]. Large numbers of AEVs will be integrated into the power grid, which may increase the pressure on the grid. The potential impacts contain voltage fluctuation and frequency regulation. The charging station VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ can be an aggregator to shift the AEV charging schedule to alleviate the energy pressure on the power grid [7]. The AEV charging schedule is optimized to reduce the charging costs and obtain the profits by discharging energy to the power grid according to time-varying electricity prices [8].
Price signals are utilized to guide EVs to charge in charging stations to meet the predefined electricity demand. The charging station can incorporate renewable energy into the power system [9]. The charging station decides EV charging amount and brings the arbitrage to electricity market with regulation service as an aggregator [10]. We aim to minimize the charging cost of AEVs and the degradation cost of charging stations and AEVs, with the constraint of AEVs' electricity demands.
There are some uncertainties about the renewable generation and the arrival and departure time of AEVs. We might evaluate the electricity cost for making an observation, along with a cost of the uncertainties about renewable energy and AEVs' profile [11].
In this paper, we propose an offline optimization problem, where the profile of AEVs, the renewable energy and base load are known ahead. We aim to minimize the total AEV electricity cost and the degradation cost of charging stations and AEVs, considering V2G service. It is complicated and impractical to solve the optimization problem from a global perspective. Then we divide the whole region into smaller regions by clustering method, which restricts the number of AEVs in the current time slot to a certain amount. In practice, the offline optimization problem in a region should be reformulated as a distributed online optimization charging problem, considering the uncertainty of renewable energy and AEVs' profile. To study a more practical case, we reformulate a distributed online optimization problem with the uncertainties from base loads, renewable energy and charging demands. In this paper, we use the scenario-wise ambiguity sets based on Wasserstein distance to capture these uncertainties. Wasserstein distance can characterize the moment and distance information of these uncertainties. Then we design a distributed online algorithm to minimize the electricity cost of AEVs and the degradation cost of charging stations and AEVs, with V2G service. Finally, we propose a robust distributed online algorithm based on distributionally robust optimization to seek a robust solution of energy schedule.
We summarize the contributions of our paper as follows.
• We propose a distributed charging framework of AEVs and charging stations by clustering method with the constraint of limited AEVs for each charging station in a region. Then we reformulate the offline charging scheduling problem as a distributed online optimization problem by the rolling window method, which is practical and feasible.
• We propose a distributed online AEV charging scheduling (DOAS) algorithm to get the optimal charging solution to minimize the electricity cost of AEVs and the degradation cost of charging stations and AEVs, with V2G service.
• To improve the time efficiency, we propose a dimension-reduction DOAS (DDOAS) algorithm by measuring the data similarity between different charging stations. To seek a robust solution with some uncertainties, we propose a DDOAS algorithm with DRO based on Wasserstein distance (DDODW).
• Simulation results show that DOAS and DDOAS algorithms can have a close-to-optimal charging cost and a significantly less battery degradation cost of charging stations, compared with centralized online charging scheduling algorithm and DDOAS algorithm is more time-efficient than DOAS algorithm. The proposed DDODW algorithm can provide a robust solution for the energy schedule. The remainder of this paper includes these five sections. Section II shows the related work of our research. Section III formulates AEV charging problem, which contains system architecture, offline optimization problem, distributed online AEV charging scheduling problem. Then DOAS, DDOAS, DDODW algorithms are proposed to handle the online distributed optimization problem in Section IV. Simulation results and the related performance analysis are shown in Section V. Finally, Section VI concludes the paper. The notations used in this paper are explained in Table 1.

II. RELATED WORK
There are a large number of literatures about the charging and discharging scheduling problem. The control center aims to optimize the bidirectional energy flows between the power grid and the EV battery. Li et al. proposed a model-free approach based on safe deep reinforcement learning to get the constrained optimal charging and discharging schedules with a deep neural network [12]. He et al. [13] presented a smart EV park model where the power flows among EVs and power grid. Leou et al. [14] aimed to reduce operation costs and achieve the optimal charging and discharging control of EVs with the constraints of EVs and power grid. Kikusato et al. [15] proposed an EV charging and discharging management framework for the effective utilization of solar energy by coordinating the information exchange between the energy management systems of home and power grid. These works provide good theoretical basis for the charging and discharging problem formulation in this paper.
V2G service is an important method to balance the electricity demand in power grid and reduce some costs of electricity systems with the help of EVs to balance the peaks of momentary electricity consumption. Turker et al. [16] studied the charging cost problems of the Plug-in EVs with the concepts of V2G and Vehicle-to-Home. The charging stations and EVs are distributed and how to study the charging scheduling in a distributed method is also the concern. Wang et al. [17] utilized rolling optimization for charging and discharging plans of the EVs and control center with the constraint of the guiding load curve. Tang et al. [18] formulated a joint routing and charging scheduling problem of an Internet of EVs network from the system operator's perspective. Wang et al. [19] proposed a partial augmented Lagrangian method to handle the coupling constraints of charging behaviours by introducing a penalty term. Mehrabi et al. [20] proposed an online distributed algorithm to schedule EVs in a geographically energy distribution system where EVs are flexible to charge and discharge at deployed charging stations. The charging stations play an important role in the charging and discharging scheduling problem of vehicles. We can use the charging station battery as an aggregator to help support V2G service. We need to consider the degradation cost of both AEVs and charging station batteries. Ahmadian et al. [21] presented a stochastic method for EVs' charging with considering the associated uncertainties and proposed a comprehensive model to study the impact of EVs' charging and discharging strategies on the battery degradation. Richard et al. [22] proposed a fast charging station model including grid services and studied the battery degradation cost under different conditions. Tan et al. [23] studied a charging scheduling problem of charging station batteries to minimize electricity cost with the constraint of fully charged EV batteries.
Due to the intermittent of renewable energy and electric vehicles, many uncertainties are brought into the power system. There are two dominant approaches: stochastic optimization (SO) [24] and robust optimization (RO) [25]. SO can improve the expected objective of market participants with the uncertainties where probability distribution is exactly known. However, it is still a challenging problem for SO to handle the scenarios with different probability distribution. RO constructs energy schedules that are immune to realizations of the uncertain parameters in a deterministic uncertainty set. However, RO has a pessimistic view of uncertainties in the evaluation of objective. To handle the uncertainties modestly in power system, we design an ambiguity set which includes possible probability distributions to apply the distributionally robust optimization (DRO). DRO was utilized in [26] at the first time and was applied in some power system studies [27], [28]. To the best of our knowledge, we are the first one to study a distributed online AEV charging scheduling problem with Wasserstein ambiguity set to get the near-optimal charging solution, which aims to minimize the electricity cost of AEVs and the degradation cost of charging station batteries and AEVs with some uncertainties.

III. PROBLEM FORMULATION
In this section, we investigate a charging scheduling problem for AEVs' charging and discharging with V2G services. A global optimal solution to this optimization problem based on a real-time pricing model is provided to minimize the total electricity cost and battery degradation cost.

A. SYSTEM ARCHITECTURE
As shown in Fig. 1, we investigate the charging and discharging problem of AEVs in a period T , which can be evenly discretized into some time slots. The time slot is set as t ∈ T = {1, 2, . . . , T }. We assume that the charging and discharging rate in a time slot are unchangeable. The set of AEVs is denoted by K. The charging and discharging electricity of AEV k in time slot t is denoted by b k (t) where b k (t) > 0 and b k (t) < 0 means that AEV k charges and discharges in time slot t, respectively. When AEV k holds on, b k (t) = 0 means that this AEV does not charge or discharge. b k (t) may be positive, zero, or negative in time slot t ∈ T because there is bidirectional energy flows between AEV battery and power grid. b k (t) has a range is the maximum charging rate. We define the arrival time of AEV k as t arr k when AEV k reaches the charging station and the departure time of AEV k as t dep k when AEV k leaves the charging station. Then the charging and discharging time frame of AEV k is t dep k − t arr k . The battery capacity of AEV k is denoted by B max k . We denote VOLUME 9, 2021 the final battery level of AEV k as B dep k when it leaves at the time slot t dep k . We define the battery level of AEV k as B k (t), which has the following constraint, where B max k is the maximum capacity of the AEV k battery. When AEV k comes to the charging station, the control center will detect the arrival time, departure time and battery level of AEV k immediately. We schedule the AEV charging and discharging in the community and we don't consider the energy loss of power lines. We model the electricity price as a linear function of the total load as follows, where K 0 and K 1 are the parameters, l is the total load in the time slot t. We define the electricity cost of the charging station n as C n (t) in the following expression, From [29], we define the solar energy as, where ζ s represents the efficiency of solar energy to electricity, A is solar panel area and I (t) is the illumination intensity.
There is an upper bound r s,max for solar energy with the illumination intensity. We define the energy generated from the wind turbine as, where ζ w represents the efficiency of wind energy to electricity, W is rotor blade area of wind turbine, ρ w stands for the density of the air, v(t) is wind speed. Obviously, there is an upper bound r w,max for wind energy. In time slot t, the energy converting from renewable energy generators into battery in the charging station n in time slot t is r n (t). We have r n (t) = r s n (t) + r w n (t), which has a range restriction [0, R max n ]. We set the AEV charging amount of the charging station n as l e n (t) as, where K n (t) is the set of AEVs in the charging station n at time slot t. The charging demand of each AEV k should be satisfied as follows, where t arr k , t dep k are the arrival time and departure time of AEV k, D k is the charging demand of AEV k, and K is the total number of AEV k. The total load l n (t) can be expressed as follows, where l b n (t) is the base load, l e n (t) is the AEV charging load, r n (t) is the renewable energy, and there are some uncertainty in the renewable energy in practice. We consider the battery degradation cost of AEV k as follows according to [30], where V m is the normal charging voltage, P b is the price for a single energy unit of AEV battery, and h(·) is the energy capacity degradation of a cell unit per time slot for AEV k, which is shown as, Parameter ξ i can be obtained from [31]. The battery degradation cost of charging station n is denoted as follows, We assume that AEVs can move to the charging station by the remaining electricity. There are limited charging piles in the charging station and at the time slot t, that is, there is a capacity N c of AEVs in the charging station n. The number of K n (t) in the time slot denoted as |K n (t)| satisfies the following constraint, Then our objective function can be expressed as follows,

B. OFFLINE OPTIMIZATION PROBLEM FORMULATION
We first formulate the offline optimization problem, where the profile of AEV, the base load and the renewable energy are known ahead. We aim to minimize the total electricity cost and the degradation cost of charging station n and AEV k, with offering the V2G service. We can formulate the offline optimization problem as follows, where the constraint (15aa) means that the charging demand of each AEV k should be satisfied, the constraint (15ab) means the charging rate of AEV k has a range limit, the constraint (15ac) means that the renewable energy has a upper bound R max , and the constraint (15ad) means that there are limited N c charging piles in the charging station and at the time slot t. We can get the optimal offline solution by solve the problem (15a), which is convex optimization problem. However, the offline problem (15a) is not impractical. The profile of AEVs, such as the arrival time, the departure time and the charging demand is unknown ahead. The base load is also not known ahead. Besides, it is very difficult and impractical to schedule a large number of AEVs by a centralized method. A centralized offline scheduling method is not scalable and not efficient when there are a lot of AEVs. Therefore, we design a distributed online AEV charging scheduling problem.

C. DISTRIBUTED ONLINE CLUSTERED AEV CHARGING PROBLEM
In a region, there are some charging stations and each charging station has limited charging pole. We can reformulate the centralized offline scheduling problem as a distributed online AEV charging scheduling problem. We can divide the whole region into some smaller regions by clustering method [32], which restricts the number of AEVs in the current time slot to a certain amount N c . The star is the location of the charging station and the circle is the AEV. The offline optimization problem needs to be reformulated as an online optimization charging problem. We denote H n (t) as the set of AEVs that are parked in the charging station n at time slot t. W n (t) is the set of the rolling window from the current time slot t to t , where t is the maximum departure time of AEVs in H n (t), when AEVs are parked in the charging station, that is, Fig. 2 shows an example to explain the concept of H n (t) and W n (t). There are five AEVs at the charging station 1 in this example. In time slot 3, there are two AEVs in this charging station 1, that is, H 1 (3) = {2, 3} and in this time slot, the maximum service time of AEVs parking in this charging station is from 3 to 8, that is, W 1 (3) = {3, 4, 5, 6, 7, 8} and EV 3 is the last one that leaves charging station 1 in time . We aim to minimize the total electricity cost and the degradation cost of charging station n and AEV k, with offering the V2G service by the current AEVs H n (t) during the current rolling service time W n (t) subject to the constraints in the offline problem (15a). Then the distributed online problem is formulated as follows, The online scheduling optimization problem (17a) in the rolling window W n (t) is a convex optimization problem for the charging station n, where we consider some uncertainty of AEV profile and renewable energy. The uncertainty of AEV profile and renewable energy has a range limit, which follows some distribution. We need to seek a robust solution to the scheduling optimization problem with some uncertainties.

D. UNCERTAINTY CHARACTERIZATION
To study a more practical case, we reformulate a distributed online optimization problem with the uncertainties from base loads, renewable energy and charging demands. We give the uncertainties from base loads, renewable energy and charging demands in the following expression, r n,ω (t) =r n +r n,ω (t), VOLUME 9, 2021 wherer n ,l b n ,D k are expected value of renewable energy, base loads, and electricity demand of AEVs, respectively. We define the random variables of renewable energy, base loads, and electricity demand of AEVs asr n,ω (t),l b n,ω (t),D k,ω . We don't know the probability distributions of renewable energy, base loads, and AEVs' electricity demand exactly. The expected value of renewable energy, base loads, and electricity demand of AEVs can be known exactly. In this paper, we use the scenario wise ambiguity sets based on Wasserstein distance to capture these uncertainties. Wasserstein distance can characterize the moment and distance information of these uncertainties. We denote the random variables of renewable energy, base loads, and electricity demand of AEVs asx = {r n,ω (t),l b n,ω (t),D k,ω } ∈ X . To characterize the probabilities distribution of different scenarios, we first define the distance metric ρ : R |S| ×R |S| → [0, +∞), where S is the scenario wise ambiguity set and |S| is the number of scenarios. Then the Wasserstein distance is denoted as follows, whereP is probability distribution andP + = 1 N N n=1 δx is empirical distribution, which is an estimation of the true distribution P. δx is the Dirac measure onx. Then the Wasserstein ambiguity set can be written as follow, where S = |S| is the number of scenarios and θ is the limit of Wasserstein distance.

IV. DISTRIBUTED ONLINE AEV CHARGING SCHEDULING ALGORITHM WITH DRO
According to the problem (17a), we can design distributed online AEV scheduling (DOAS) algorithm. First, we divide the whole region into some smaller regions by clustering method and restrict the number of AEVs in the current time slot to N c . Then we solve the problem (26a) for the charging station n by primal dual interior point method [33] based on rolling window method.
We define the Lagrangian function L n (b k (t), λ k , µ k , γ k ) of the charging station n as follows, Then we have the KKT conditions as follows, where I is a vector where the element I (k, t) can be expressed as follows, Then the distributed online AEV charging scheduling (DOAS) algorithm is shown in Algorithm 1. From the equation (28), we can see that the optimal solutionb k (t) is related to the arrival and departure time and the charging demand. The optimal solutionb k (t) is scalable and we reduce the dimension of the problem when the profile of AEV k is proportional to the other one. We use the Euclidean distance to measure the data similarity function sim(O n 1 , O n 2 ) Algorithm 1 Distributed Online AEV Charging Scheduling (DOAS) Algorithm 1: Generate a regional map. The control center can get the real-time information about t arr k , t dep k , D k of AEVs. 2: Divide the whole region into smaller regions by clustering method and restricts the number of AEVs in the current time slot to N c . 3: For the charging station n 1 , solve the problem (26a) by primal dual interior point method.
of charging station n 1 and n 2 , which is expressed as follows, where When sim(O n 1 , O n 2 ) < α, there is small gap of |t dep k − t arr k | and D k . Then the charging station n 2 can use the optimal charging solution of the charging station n 1 . Then the dimension-reduction distributed online AEV charging scheduling (DDOAS) algorithm is shown in Algorithm 2. There is K AEVs' route plans and N (α) similar route plans, the time efficiency of our DDOAS algorithm is K −N (α) K of the time efficiency of DOAS algorithm. Then we study the DDOAS algorithm with DRO based on Wasserstein distance to seek a robust solution of the distributed online optimization problem with some uncertainties from base loads, renewable energy and charging demands. We can introduce an auxiliary random variablez in Eqn. (25) to rewrite F as the following lifted expression, wherez can characterize the limit of ρ(x,x˜s+) in each scenario s. According to the ambiguity set in Eqn. (33), each empirical distribution of random variables is related with the scenario s. The expectation of the auxiliary variablez over all scenarios has a upper bound θ in the third line in Eqn. (33). The last line in Eqn (33) shows that each scenario has the same probability 1/S. We give the DDOAS algorithm The simulation setting and performance evaluation of DOAS, DDOAS, DDODW algorithms are presented in this section.

A. SIMULATION SETTING
We adopt the base load profile in South California Edsion from [34]. We divide a day into 24 time slot and the starting time is 00 : 00 AM in the morning. The capacity of AEV battery is 35 kWh based on Jianghuai iEV7L [35]. In the electricity price function (3), we set the parameters K 0 = 10 −3 , K 1 = 0.6 × 10 −3 and α = 0.1. We assume that AEVs have the same type and we charge each AEV to 90% at least. The maximum charging rate of each AEV is 6 kW. The arrival time, the departure time and the initial state of charge (SOC) of AEVs follow some certain distribution and we set three types of distribution according to the different probability of SOC at the arrival. The arrival of AEVs is obtained from the statistical data in an EPRI report [36]. The distribution of the AEV arrival time and the state of charge of AEVs are shown in Fig. 3 and Fig. 4. We do the simulation in the IEEE-118 bus with 10 charging stations. We set the number of scenarios as |S| = 73 and the radius of Wasserstein distance θ = 0.1. The base loads in 73 scenarios are shown in Fig. 5 and the blue bold line is the mean value of base loads. We simulate the optimization problem with RSOME [37],   a Matlab toolbox for DRO on a laptop with Intel Core i7 CPU and 16GB RAM.

B. PERFORMANCE EVALUATION
We compare the DDOAS algorithm with DOAS algorithm and the centralized AEV charging scheduling (CACS) method based on the reference [6]. The CACS method is a charging online scheduling method which considers the charging and discharging of AEVs in the whole region. We set the number of the total AEVs as 200 and the total AEVs are divided into 10 groups, where each group has 20 AEVs. It can satisfy the charging demand with limited charging piles in the charging stations.  The total loads with CACS, DOAS and DDOAS algorithms are shown in Fig. 6. We can see that DOAS and DDOAS algorithm have a close-to-optimal performance compared with centralized online charging scheduling algorithm and the total load of DDOAS algorithm is smoother than DOAS algorithm. Then maximum total loads of CACS, DOAS and DDOAS algorithms are 640.12kW, 629.74kW and 570.80kW. The AEV charging loads with CACS, DOAS and DDOAS are shown in Fig. 7. We can see that DOAS algorithm can have a close-to-optimal performance compared with centralized online charging scheduling algorithm and AEV charging of DDOAS algorithm is smoother than DOAS algorithm. Then AEV charging loads of CACS, DOAS and DDOAS algorithms are 232.71kW, 231.75kW and 255.78kW. The AEV charging costs and degradation costs with CACS, DOAS and DDOAS algorithms are shown in Fig. 8 Fig. 9. The peak total loads of DOAS algorithm under different group size of AEV 20, 40, 50, 100 are 640.26kW, 560.99kW, 540.99kW, 536.04kW, respectively. We can see   that with the increase of the group size, there is a lower peak total load and the load will be smoother. The AEV charging costs of CACS, DOAS and DDOAS algorithms under different number of AEVs 100, 200, 300, 400 are shown in Fig. 10     by DDODW are 80.67$, 138.43$, 114.22$. A sensitivity analysis for the AEV charging cost with different Wasserstein distances is presented in Fig. 13. The AEV charging cost comes to convergence when Wasserstein distance reaches 30%. We compare the time efficiency of DOAS and DDOAS algorithms under different number of AEVs. The running times of DOAS and DDOAS algorithms under different numbers of AEVs are shown in Fig. 14

VI. CONCLUSION
In this paper, we investigate a scheduling problem for AEVs charging and discharging with V2G services. We aim to minimize the total electricity cost and battery degradation cost of AEVs with V2G service, which takes the random arrival and departure of AEVs into account. We first formulate a centralized optimal online scheduling problem to get a global solution. Then we reformulate the centralized charging scheduling problem as a distributed online optimization problem. We propose the DOAS algorithm to get the optimal charging solution. Furthermore, to improve the time efficiency of DOAS algorithm, we design a dimension-reduction DOAS algorithm to reduce the dimension of the distributed charging scheduling problem. We further propose a DDODW algorithm to seek a robust solution with some uncertainties Simulation results show that DOAS and DDOAS algorithms can have a close-to-optimal charging cost and a significantly less battery degradation cost of charging stations, compared with centralized online charging scheduling algorithm and DDOAS algorithm is more time-efficient than DOAS algorithm. Our proposed DDODW algorithm can provide a robust solution for the energy schedule of AEV charging.