Resilient Distributed Coordination of Plug-In Electric Vehicles Charging under Cyber-Attack

: The coordinated scheduling of plug-in electric vehicle (PEV) charging should be constructed in distributed architecture due to the growing population of PEVs. Since the information and communication technology makes the adversary more permeable, the distributed PEV charging coordination is vulnerable to cyber-attack which may degrade the performance of scheduling and even cause the failure of scheduler task. Considering the tradeoff between system-wide economic efficiency, distribution level limitations and PEV battery degration, this paper investigates the resilient distributed coordination of PEV charging to resist cyber-attack, where the steps of detection, isolation, updating and recovery are designed synthetically. Under the proposed scheduling scheme, the misbehaving PEVs suffering from cyber-attack are gradually marginalized and ﬁnally isolated, and the remaining well-behaving PEVs obtain their own optimal charging strategy to minimize the total system cost in distributed architecture. The simulation results verify the effectiveness of theoretical method.


Introduction
Due to the growing concerns about carbon emission, fossil energy depletion and climate change, plug-in electric vehicles (PEVs) will be integrated widely into the power system [1,2]. The global sales of PEVs have almost exponential growth over the past 10 years before 2020, and the selling number is predicted to be 30 million and 50 million at the year 2030 and 2040 respectively [3]. The rising population of PEVs facilitates the exploitation of sustainable and renewable energy, reduces environmental pollution and minimizes greenhouse gases [4]. However, their disordered charging behavior introduces significant adverse impacts on power grid including power unbalance between the demand of PEVs' charging and the supply of power grid, localized overloading, excessive losses and larger voltage deviation [5][6][7]. Therefore, it is desirable to study the proper coordination scheme of PEV charging to minimize the above mentioned negative effects.
Many research works have studied the issue of PEV charging strategy scheduling in centralized architecture. In Reference [8], a centralized minimum-cost load scheduling algorithm was constructed to determine the purchase of energy in the day-ahead market and a dynamic dispatch algorithm was developed for distributing the purchased energy to PEVs. A centralized aggregator was proposed in [9] to compute the optimal charging strategy of each PEV for efficient power utilization. The centralized coordinated PEV charging method aimed to minimize the power losses and maximize the main grid load factor was studied in [10]. The centralized scheduling method mentioned in the existing papers requires a control center to collect the information of all PEVs, make the charging decision and transmit the control signal back to each PEV. In the centralized architecture, expensive high-bandwidth (1) The confidence level based resilient PEV charging coordination in the presence of cyber-attack is proposed, where the detection, isolation, updating and recovery steps are designed synthetically. The misbehaving PEV under cyber-attack is gradually marginalized and finally isolated from the system according to its confidence level calculated in real-time by the above steps. In order to resist the cyber-attack and acquire the optimized charging strategy, these steps are executed at each participating PEV based on the information received from its neighbors. (2) The implementation of resilient PEV charging coordination only requires each participating PEV to communicate with its neighboring PEVs in communication network, which implies that the proposed charging scheduling method is compliant with distributed architecture. It is more suitable for the charging system containing massive PEVs.
(3) The modality of cyber-attack is constructed and its negative effect on PEV charging coordination is analyzed. It is demonstrated that the common average price can not be obtained via the distributed consensus protocol when some PEVs suffer from cyber-attack, and this further results in the failure of traditional charging scheduling algorithm which was constructed without the consideration of cyber-attack.
This paper is organized as follows. The charging model and problem formulation are given in Section 2. Section 3 represents the modality and negative effects of cyber-attack in PEV charging coordination. The resilient distributed coordination of PEV charging against cyber-attack is constructed in Section 4, and the effectiveness of theory is verified by simulation in Section 5. Section 6 states the conclusion and future work.

Charging Model of Individual PEV
Consider the optimal charging scheduling of n PEVs labeling from 1 to n over the time horizon T = {0, 1, ..., T − 1}. For each PEV i(i = 1, 2, ..., n), denote the charging power at time t ∈ T as u it and name the charging strategy over the horizon T as the vector and where u i 1 ≡ ∑ t∈T u it , Γ i is the energy capacity and T i ⊆ T is the charging horizon of the PEV i respectively. Denote the set of admissible charging strategies of PEVs i which satisfy the restricted condition (1) and (2) as U i . As mentioned in [24], the distribution-level harmful impacts caused by coincident high charger power demand of PEVs include line and transformer overloading, low voltages and increased losses. As a consequence, the PEVs are encouraged to charge at lower power level to minimize the above impacts. The strictly monotone increasing function g demand,it (u it ) is introduced to describe the distribution-level cost corresponding to the charging power u it of the PEV i at time t. Moreover, the battery degradation cost g cell,i (u it ) = a n u 2 it + b n u it + c n with the constants a n , b n and c n represents the monetary loss of PEV i charging at the rate of u it for the period ∆T as shown in [24]. The individual local cost of PEV i at time t considering the distribution level cost and battery degration is obtained as The individual local cost function g it (·) is assumed to be monotonically increasing, strictly convex and differentiable for all i and t.
According to Reference [9], the benefit function of the PEV i with respect to the total energy delivered over the charging horizon is defined as where the positive constant δ i denotes the the relative importance of delivering the full charge to the PEV i. (3) and (4), the utility function of individual PEV i for the charging strategy u i over the charging horizon satisfies

Communication Network for PEVs Interaction
In order to implement the distributed coordination of PEV charging, the information should be transmitted among the PEVs through the communication network whose topology can be described by an undirected graph G = (V, E , A). The node set V = {1, 2, ..., n} contains all of the n PEVs, and the edge set E = {(i, j)|i f i → j} contains all the communication links in G where the symbols i → j mean that the information of PEV i can be transmitted to PEV j directly through communication network. Noted that (i, j) ∈ E if and only if (j, i) ∈ E since graph G is undirected. The neighboring set of PEV i in communication network G is defined as N i = {j ∈ V |(j, i) ∈ E }, and its cardinal number is |N i |. The element a ij in matrix A = {a ij } ∈ R n×n indicates the positive weight of edge (j, i). Mentioned that a ij > 0 if and only if (j, i) ∈ E , otherwise a ij = 0.

Formulation of Distributed Coordination about PEVs Charging
The coordination of PEV charging studies the trade-off between the total cost and the benefit of supplying energy to the PEVs. Considering the utility function (5) and the generation cost function c(·), the system cost function of PEVs coordinated charging is given as where the admissible charging strategies u = {u 1 , u 2 , ..., u n } ∈ U satisfy u i ∈ U i , the quadratic function c(y t ) = 1 2 αy 2 t + βy t + γ with constants α, β and γ approximates the generation cost with respect to the aggregate demand y t = d t + ∑ i∈V u it based on the analysis in [25,26], and the function d t indicates the aggregate inelastic base demand at time t.
The objective of PEV coordinated charging is to implement a socially optimal collection of charging strategies for all participating PEVs to minimize the system cost function (6) under the restricted condition (1) and (2), which is characterized as the following optimization problem min u∈U J(u) By introducing the price profile and consensus based price update process, the following Algorithm 1 was constructed in [15] to address the distributed coordination of PEV charging under the parameter restriction A1 = 1, 1 T A = 1 T and |1 − η| + 2nκνη < 1 where the n-dimensional vector 1 = {1, 1, ..., 1} T , κ is the Lipschitz constant of derived function c (·), and ν = max i∈V,t∈T ν it where ν it is the Lipschitz constant of the function [g it ] −1 (·) over the interval [g it (0), g it (Γ i )]. The optimal charging strategy for each PEV can be obtained until the change in price profile is negligible.
Algorithm 1 satisfies the requirement of distributed architecture since the control center unit is nonexistent and each PEV updates its own individual electricity pricep i based on neighborhood information transmission through communication network G as shown in (10). Mentioned that the information transmission in Algorithm 1 is required to be ideal. However, the communication network is vulnerable to cyber-attack usually in practical application, and the attack launched by adversary may deteriorate the performance of distributed consensus protocol (10) and even cause the failure of PEV charging coordination. This signifies that the security issue should be a major concern. In the next sections, the modality and impact of cyber-attack on Algorithm 1 will be analyzed, and then the resilient PEV charging coordination scheme will be constructed to resist the cyber-attack. Algorithm 1: Distributed coordination of PEV charging without the consideration of cyber-attack.
• Specify the aggregate inelastic base demand d = (d t , t ∈ T ), total number of PEVs n, time horizon T and parameter η; • Define the allowable deviations ε stop and stop to terminate iterations; • Initialize the initial common electricity price p 0 = (p 0 t , t ∈ T ), ε > ε stop and m = 0; • WHILE ε > ε stop -Determine the charging profile u m+1 i w.r.t. p m for all PEVs i ∈ V simultaneously by minimizing the individual cost function • END WHILE • Specify the optimal charging strategy as u m i for PEV i(i ∈ V ).

Cyber-Attack against PEVs Charging Coordination
The distributed consensus protocol (10) in Algorithm 1 aims to drive the individual electricity pricep it of each PEV i to the average value (11) of all participating PEVs' initial individual prices by neighborhood information transmission through communication network G. This is the precondition of solving the optimization problem (7), and more details can be found in [15].
Considering the communication network suffering from cyber-attack, the distributed consensus protocol (10) in Algorithm 1 is affected aŝ where u a it (l) denotes the attack injection acting on individual pricep it of PEV i at iteration l. The aim of attack injection is to affect the convergence of consensus protocol and modify the convergent value (11), and finally destroy the effectiveness of Algorithm 1.
It can be seen from (12) that the attack injection u a it (l) determines whether the PEV i suffers from cyber-attack. Moreover, the injection u a it (l) describes the attack type launched by adversary. The injection u a it (l) = − a ijpjt (l) means the PEV j is under DoS attack since the information sent from PEV j to i is erased at iteration l. The injection u a it (l) = c − ∑ j∈V a ijpjt (l) for all iterations l implies the PEV i is under replay attack with the replay signal c. The random u a it (l) denotes the random attack on PEV i, and u a it (l) = c it (l) demonstrates PEV i suffers from false data injection attack with the designed injection c it (l).
The replay attack is given as an illustration to explain the impact of cyber-attack on distributed charging coordination scheme Algorithm 1. Denoting M and H as the sets of misbehaving PEVs under replay attack and well-behaving PEVs respectively, the distributed consensus protocols in Algorithm 1 is affected as where H ∩ M = ∅, H ∪ M = V, andp a it is the replay fake electricity price of the misbehaving PEV i(i ∈ M). According to Theorem 1 in [27], we can get that the individual electricity price of each well-behaving PEV converges into the convex hull co{p a jt , j ∈ M} spanned by the fake prices of misbehaving PEVs, i.e., where the constants c ij ≥ 0(∀j ∈ M) and they satisfy ∑ j∈M c ij = 1 for each i. We can consider two cases. The first case is that there exist multiple PEVs under replay attack and the fake prices of these misbehaving PEVs are unequal. This results in the individual electricity prices of all PEVs converging into the convex hull co{p a jt , j ∈ M}, which implies that these prices cannot achieve consensus. This further means that > stop in Algorithm 1 for any times of iteration, which makes the algorithm loop infinitely and fail. The other case is that the fake prices of all the misbehaving PEVs are equal or there is only one PEV under replay attack. Denoting the fake price of misbehaving PEVs asp . Although the consensus price can be ensured in this case, the average valuep * t in (11) cannot be achieved sincê p replay t is unequal top * t usually. It mismatches the precondition of solving the optimization problem (7) and leads to the failure of coordination of PEV charging.
Case application: Consider the communication network of five PEVs shown in Figure 1, and PEV 2 is assumed suffering from replay attack with the replay fake electricity pricep replay t = $0.9/kWh. The impact of replay attack on Algorithm 1 is illustrated in this case application. The generation and individual local costs satisfy c(y t ) = 2.9 × 10 −4 y 2 t + 0.06y t and g it (u it ) = 0.003u 2 it + 0.11u it − 0.02 respectively. The battery capacity of each PEV is 40 kWh and the weight fact in (4) is set as δ i = 0.03. Assuming the initial and maximum state-of-charge (SoC) of each PEV as soc 0 = 15% and soc h = 90% respectively, the energy capacity which can be delivered is calculated as Γ i = 40(soc h − soc 0 )kWh = 30 kWh for all i ∈ V. The aggregate inelastic base demand d is shown in Figure 2 which is representative of a typical hot summer day.
The charging strategy given by Algorithm 1 results in the aggregate demand shown in Figure 2, where the results in cases of no attack and replay attack are illustrated in Figure 2a,b respectively. It can be seen that the aggregate demands in these tow cases are different under the same distributed PEV charging coordination scheme Algorithm 1. The system cost function (6) can be quantified according to the simulation result as J(u a ) = $209.66/day and J(u) = $183.51/day where J(u a ) denotes the system cost function under replay attack and J(u) denotes that without attack. The overall waste caused by replay attack is then calculated as J(u a ) − J(u) = $26.15/day, which reveals the negative effects of replay attack against Algorithm 1.  in the whole charging horizon T as shown in Figure 4b. The comparison between Figure 4a,b demonstrates that the adjusting ability of common electricity price with respect to charging profile is lost under the influence of replay attack, and the average common price (11) cannot be obtained under Algorithm 1. It further results that the optimal charging profile obtained from (8) with respect to the average common price (11) cannot be achieved as shown in Figure 3, which makes the overall waste $26.15/day. This case application indicates that the PEV charging strategy profile calculated by Algorithm 1 under replay attack is not the solution of optimization problem (7), and the effectiveness of distributed PEV charging coordination scheme Algorithm 1 is damaged under replay attack.

Resilient Distributed Coordination of PEVs Charging
This section proposes the resilient distributed consensus protocol to resist cyber-attack, and then the resilient distributed coordination scheme of PEV charging is constructed based on this novel consensus protocol. Within this resilient protocol, a confidence level is introduced to identify how healthy each participating PEV is, and the confidence level is dynamic updated in real-time based on attack detection mechanism. When some certain PEV is detected to suffer from cyber-attack, its confidence level is decreased to reduce its negative effect on the other PEVs. Consequently, the misbehaving PEV under cyber-attack is gradually marginalized and finally isolated from the charging system. The remaining well-behaving PEVs recover and update their individual electricity price to attain the new common average electricity price without the influence of cyber-attack. The detailed description of resilient distributed consensus protocol is given as follows, where the steps of detection, isolation, updating and recovery are included and constructed synthetically.

Detection of Cyber-Attack
In this step, each PEV i transmits the received neighboring PEVs' individual electricity priceŝ p kt (l)(k ∈ N i ) and its own individual electricity pricep it (l + 1) to each of its neighboring PEV j(j ∈ N i ) at each iteration l, where the pricep it (l + 1) is calculated at iteration l by the resilient consensus protocol designed later. Based on the received information from the neighboring PEVs, PEV i executes the following attack detection mechanism where H ij (l) denotes the total number of verifiable correct price of the neighboring PEV j monitored by PEV i up to iteration l with the initial value H ij (0) = 0, the positive constant θ represents the threshold and a jk (l) is the positive weight of edge (k, j) in communication network G at iteration l.
It should be mentioned that ∑ k∈V a jk (l)p kt (l) in (15) is the expected normal price of PEV j at iteration (l + 1) in the absence of cyber-attack, whilep jt (l + 1) is the actual price of PEV j at iteration (l + 1) which may be affected by cyber-attack injection u a jt (l) as shown in (12). The attack detection mechanism (15) counts the number of verifiable correct price of PEV j according to the difference between these two types of prices in the whole iterative process, where the difference threshold θ is introduced to reduce the false positives caused by some normal disturbance. Based on detection mechanism (15), the PEV i constructs an index H ij to each of its neighboring PEV j.

Isolation of Misbehaving PEVs
PEV i calculates and stores a confidence level to quantitatively measure the credibility for each of its neighboring PEV j in this step. The confidence level is calculated as (16) according to Bayesian Reputation function [28] based on the ratio of the number of verifiable correct price H ij in (15) to the total number of price received.
where con f ij (l) denotes the confidence level of PEV j calculated at PEV i at iteration l, and the positive coefficient µ is used to adjust the gradient of confidence level. It should be mentioned that 0 < con f ij (l) < 1 for all edges (j, i) ∈ E and iterations l. The confidence level reflects the healthy degree of neighboring PEV. It can seen from (16) that the confidence level con f ij decreases if the misbehaving PEV j is detected with abnormal price by attack detection mechanism (15) configured at PEV i, otherwise the confidence level con f ij increases. If the confidence level con f ij falls below the proposed anomaly threshold Θ, i.e., con f ij < Θ, the PEV j is identified to be attacked and it will be isolated from the communication network and physically disconnected from the PEV charging system. The anomaly threshold Θ is selected with weighting the false reject rate and the false accept rate in the practical application.

Updating and Recovery of Distributed Consensus Protocol
For the remaining PEVs after the isolation step, the weight a ij (l) is given as follows where the constant ξ > 1. Denoting the set containing all of the remaining PEVs asṼ, the resilient distributed consensus protocol for the updating of PEVs' individual electricity prices is constructed aŝ where the weight a ii (l) = 1 − ∑ j∈Ṽ,j =i a ij (l) for all i ∈Ṽ.

Theorem 1.
Denoting the initial individual electricity price of PEV i in setṼ asp it (l 0 ) where the initial iteration l 0 is the time when the last misbehaving PEV is isolated, the resilient distributed consensus protocol (18) drives the individual electricity price of each PEV to the average value of initial prices, i.e., lim l→+∞pit (l) = 1 |Ṽ | ∑ i∈Ṽp it (l 0 ) for each i ∈Ṽ where |Ṽ | is the cardinal number of setṼ, provided that the remaining communication network is still connected after the isolation of misbehaving PEVs.

Remark 2.
The selection method of weight a ij (l) given in (17) demonstrates the ability of the proposed resilient distributed consensus algorithm in adaptive adjusting weight based on confidence level. If PEV j is detected by PEV i with low confidence level con f ij , the weight a ij in communication network is decreased. The protocol (18) implies that the decreased weight a ij mitigates the effects of PEV j's abnormal individual price information on the entire system. As a consequence, the spread speed of the negative effect caused by the potential misbehaving PEV is restrained.
Although the individual electricity prices of the remaining well-behaving PEVs converge tô p com t = 1 |Ṽ | ∑ i∈Ṽp it (l 0 ) under the protocol (18), the convergent valuep com t may be not the desired onep * t = 1 |Ṽ | ∑ i∈Ṽp it (0) given in (11) which is required by distributed PEV charging coordination. The reason is that the misbehaving PEVs are not fully isolated in the iteration interval [0, l 0 ), and the contribution of them has already affected the average consensus computation. Therefore, a rollback recovery mechanism should be introduced to setp it (l 0 ) =p it (0) for each well-behaving PEVs i (i ∈Ṽ ) in order to restore the average common pricep com t to the desired valuep * t . The implementation of recovery mechanism requires each PEV i to save its own initial individual electricity pricep it (0). When the misbehaving PEV is isolated, the current individual price of each remaining PEV i is replaced by the saved initial onep it (0) and the resilient distributed consensus protocol is resumed.
Integrating the above steps of detection, isolation, updating and recovery, the resilient distributed consensus protocol of PEVs' individual electricity prices is given in the following Algorithm 2.
Algorithm 2: Resilient distributed consensus protocol of PEVs' individual electricity price.
• Specify the aggregate inelastic base demand d = (d t , t ∈ T ), total number of the remaining well-behaving PEVsñ, time horizon T and parameter η, µ and ξ; • Define the allowable deviation stop to terminate iterations; • Specify the thresholds θ and Θ; • Specify the common electricity pricep = (p t , t ∈ T ) and the corresponding optimal charging profileũ i (p) = (ũ it (p), t ∈ T ); • Initialize > stop and l = 0; • Initialize the initial individual electricity pricep i (0) = (p it (0), t ∈ T ) for each PEV i ∈Ṽ and t ∈ T asp it (0) =p t + η c (d t +ñ ·ũ it (p)) −p t ; • WHILE > stop -Update the total number of verifiable correct price H ij (l) using (15); -Update the confidence level con f ij (l) using (16); -IF con f ij (l) < Θ, THEN * Isolate PEV j from the communication network and disconnect it physically from the PEV charging system; * Replace the current price of the remaining PEVs by the initial value such that p it (l) =p it (0) for each i; -END IF -Update the weight a ij (l) of edge (j, i) using (17); -Calculate the weight a ii (l) = 1 − ∑ j =i a ij (l); -Update the individual electricity pricep i (l) = (p it (l), t ∈ T ) by executing (18) at each remaining PEV i and time t ∈ T ; -Update = max i { p i (l + 1) −p i (l) 1 }; -Update l = l + 1; • END WHILE • Specify the common pricep * =p i (l).

Resilient Distributed PEVs Charging Coordination
Algorithm 3 represents the resilient distributed coordination of PEV charging considering cyber-attack based on the consensus protocol shown in Algorithm 2. Since Algorithm 2 can drive the common electricity price to the average value of all remaining well-behaving PEVs' initial individual electricity prices as illustrated in Theorem 1, the following main theorem can be obtained obviously and the proof is omitted. The flowchart of the proposed resilient distributed coordinated charging scheme containing Algorithm 2 and 3 is shown in Figure 5.

Theorem 2.
Supposing the positive constant η satisfies |1 − η| + 2nκνη < 1 and the remaining communication network is connected, Algorithm 3 guarantees the optimal charging strategy u * i = (u * it , t ∈ T ) for each remaining well-behaving PEV i even under cyber-attack, which is the solution of optimization problem (7).

Start
Specify the aggregate inelastic based demand , total number of PEVs , time horizon , the parameters , and the thresholds Initialize common electricity price , and Determine the charging profile Specify the price and the charging profile Initialize the initial individual electricity price where , and , Updating and using (15) and (16)  Specify the optimal charging strategy as End Figure 5. The flowchart of resilient distributed coordination of PEV charging.

Algorithm 3:
Resilient distributed coordination of PEV charging considering cyber-attack.
• Specify the aggregate inelastic base demand d = (d t , t ∈ T ), total number of PEVs n, time horizon T and parameter η; • Define the allowable deviation ε stop to terminate iterations; • Initialize the initial common electricity price p 0 = (p 0 t , t ∈ T ), ε > ε stop and m = 0; • WHILE ε > ε stop -Determine the charging profile u m+1 i w.r.t. p m for all PEVs simultaneously by minimizing the individual cost function -Specify the pricep = p m and the corresponding charging profileũ i (p) = u m+1 i (p m ), and inputp andũ i (p) into Algorithm 2; -Determine the common electricity price p m+1 by the output of Algorithm 2 such that p m+1 =p * ; -Update ε = p m+1 − p m 1 ; -Update m = m + 1; • END WHILE • Specify the optimal charging strategy as u * i = u m i for the remaining well-behaving PEV i.

Simulation
This section verifies the effectiveness of Algorithm 3 by numerical simulation of five PEVs with the communication network shown in Figure 1, where the issue of cyber-attack is considered. The generation cost function c(y t ), individual local cost function g it (u it ), aggregate inelastic based demand d, energy capacity Γ i and weight fact δ i in (4) are the same with those in the case application given in Section 3. The parameter η = 1 in Algorithm 3 to satisfy |1 − η| + 2nκνη < 1 where n = 5, κ = 5.8 × 10 −4 and ν = 166.7 calculated from the above given functions. The parameters satisfy µ = 0.5 in (16) and ξ = 2 in (17). The allowable deviations are set as ε stop = 0.001 and stop = 0.002, and the thresholds are selected as θ = 0.1 and Θ = 0.25 respectively.

Response under Replay Attack
In this scenario PEV 2 suffered from replay attack with the replay fake electricity pricep replay t = $0.9/kWh, which is the same with that in the case application of Section 3. Figure 6 illustrates the evolution of weight a ij (l) in each edge (j, i) in communication network under the execution of Algorithm 3, where only the weights of six edges were displayed instead of all 12 edges since a ij (l) = a ji (l). It should be mentioned that the weights of edges connected to PEV 2 decreased and these weights finally achieved 0 at the 13th step of iteration shown in Figure 6. This demonstrates that the misbehaving PEV 2 was detected to be attacked and then it was isolated from the communication network under Algorithm 3, which prevented it from negatively affecting the other PEVs. Figure 7 shows that the common electricity price could still be adjusted adaptively with respect to charging profile under Algorithm 3 even under replay attack, which is different to the result shown in Figure 4b where the price was fixed by the fake replay signal $0.9/kWh under Algorithm 1. This implies that each PEV could obtain its own optimal charging strategy according to the dynamical common price under Algorithm 3 as shown in the evolution of SoC illustrated in Figure 8, and it is different to the constant power charging strategy under Algorithm 1 shown in Figure 3b where the economy was destroyed under replay attack. The aggregate demand under Algorithm 3 is given by Figure 9, and it can be obtained that the system cost function satisfied J(u r ) = $177.82/day where the optimal charging strategy u r is given by Algorithm 3. Algorithm 3 saved the total cost J(u a ) − J(u r ) = $31.84/day compared with Algorithm 1 under replay attack. Moreover, the charging strategy for four PEVs calculated under Algorithm 1 without replay attack was the same as shown in Figure 8. This further demonstrates that the optimal charging strategy can be realized for Algorithm 3 after the isolation of misbehaving PEV 2.

Response under Random Attack
In this scenario, PEV 4 suffered from random attack so that it could randomly set its individual electricity pricep 4t (l) which was a random number satisfying the normal distribution N(0.1, 0.03) at each iteration l. Because of the stochastic behavior ofp 4t (l), the simulation result indicated that it always had > stop for any step of iteration under Algorithm 1. This implies that the convergent common price within acceptable deviation range could not be obtained and it led to the failure of Algorithm 1. Algorithm 1 fell into in an endless loop under random attack and the optimal charging strategy could not be acquired. On the other hand, the simulation result for Algorithm 3 under this random attack was the same as those shown in Figures 7-9, and the evolution of edge weights is given in Figure 10. This illustrates that the weights of edges connecting to the misbehaving PEV 4 achieved 0 at the 9th step of iteration, and PEV 4 was detected to be under attack and finally isolated by Algorithm 3. Moreover, the remaining well-behaving four PEVs obtained the optimal charging strategy. It verified the effectiveness of the proposed resilient distributed PEV charging coordination scheme Algorithm 3 under random attack.

Conclusions
The resilient distributed PEV charging coordination in the presence of cyber-attack is studied in this paper, where the trade-off between total generation cost and local cost associated with overloading and battery degradation is considered. The cyber-attack tampers the individual electricity price by injecting unauthorized attack data to exert its negative influence. In order to resist the cyber-attack, a novel type of resilient charging coordination scheduling method is constructed which contains the steps of detection, isolation, updating and recovery. It is proved theoretically that the misbehaving PEVs under cyber-attack are gradually marginalized and finally isolated according to its real-time updated confidence level, and the remaining well-behaving PEVs obtain their optimal charging strategy to minimize the total system cost in distributed architecture. The simulation result confirms the effectiveness of theoretical method.
Some of the future directions of the present research are given as follows. (i) The unified cooperative optimal dispatch between charging of PEVs and power generation of microgrids cluster can be explored; (ii) The cyber-attack with stealthy characteristic which can cheat the attack detection mechanism should be studied in the PEV charging coordination; (iii) The proposed resilient scheduling framework can be extended considering the discharging behavior of PEV where the energy storage function of PEV is taken into account. These research directions will be considered in our future works.

Conflicts of Interest:
The authors declare no conflict of interest.