<figure><img src="image_1.png" /></figure>

HAL
open science

# Deep Reinforcement Learning Based Defense System for Electric Vehicle Charging Stations

Samira Chouikhi, Lyes Khoukhi

► To cite this version:

Samira Chouikhi, Lyes Khoukhi. Deep Reinforcement Learning Based Defense System for Electric Vehicle Charging Stations. IEEE International Conference on Communications (ICC) 2025, Jun 2025, Montreal, Canada. 10.1109/ICC52391.2025.11161599. hal-05081455v2

HAL Id: hal-05081455

https://hal.science/hal-05081455v2

Submitted on 27 May 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Deep Reinforcement Learning Based Defense System for Electric Vehicle Charging Stations

Samira Chouikhi, and Lyes Khoukhi

Université Caen Normandie, ENSICAEN, CNRS, Normandie Univ, GREYC UMR 6072, F-14000 Caen, France.

***Abstract***—The widespread adoption of Electric Vehicles (EVs) requires an efficient charging infrastructure. Using data connection-based charging equipment, smart charging, and vehicle-to-grid (V2G) charging technologies allow electric vehicles to connect to the electrical grid. This enables the exchange of information and instructions. However, this ecosystem is susceptible to physical or cyberattacks, just like any other cyber-physical system. In this paper, we investigate load-altering (LA) attacks that impact the functionality of the smart grid. We propose a two-phase strategy to avoid, detect, and mitigate attacks. Our first step is scheduling charging station operations to normalize system utilization to avert future simultaneous attacks. Therefore, a distributed Deep Reinforcement Learning (DRL) model is used to establish the ON/OFF status of each charging station. To maintain the system's power stability during the charging process, the system uses an event-based method to respond to the abrupt change in charging/discharging behavior. To detect attacks, a second multi-agent deep-reinforcement learning model is created. This enables the system to recognize and neutralize the effects of LA attacks on the power grid. After the compromised entities are located, they are isolated and the demands of certain backup charging stations either completely or partially replace the canceled power demands. The performance study shows that the suggested strategy minimizes the impact of LA attacks and delivers good results in terms of detection accuracy.

***Index Terms***—Electric vehicles, charging stations, attack detection, attack mitigation, deep reinforcement learning, load-altering attack.

## I. INTRODUCTION

New horizons for research and development have been opened to deal with the growing popularity of intelligent electric vehicles. It is expected that one-third of automobiles worldwide will be electrified by 2040. Over the next ten years, some of the largest automakers in the world intend to launch numerous new electric vehicle models. As the world's automobile fleet shifts to electric vehicles (EVs), the existing infrastructure for EV charging must be improved and expanded. The integration of services offered by independently run charging stations requires open standards and a shared infrastructure for EV charging. This unification will allow EVs to function flawlessly, use a variety of cross-vendor charging stations, and charge frequently. Therefore, this plan requires coordination of the activities and services offered by the several charging systems' companies. However, the interconnection of mobile devices, autonomous vehicles, and heterogeneous cyberphysical systems creates new threats and vulnerabilities when smart energy and smart transportation systems are combined to create a complex system with many coexisting parts and technologies. Some entities in the

charging ecosystem have already incorporated various defense strategies and systems [1], [2], [3]. We still need to adapt existing methods and develop new strategies to deal with the unique security issues in the EV charging infrastructure.

Since charging stations are cyberphysical systems, the system is susceptible to physical, cyber, and hybrid attacks. The primary problem with this ecosystem is that it might be used to attack more vital and significant systems, such as the electrical grid's infrastructure. Attackers may manipulate and alter the power of the grid to disrupt its functioning and even cause blackouts [4], [5].

In this paper, we focus on protecting the electrical grid by preventing, detecting, and mitigating attacks using EV charging systems. Our objective is to prevent or mitigate the impact of cyberattacks on the functionality and stability of the electrical grid. We especially address Load-Altering (LA) attacks that cause grid stability. These attacks use compromised electric vehicles and charging stations to alter the load and disrupt the normal operation of the power system. As examples of LA attacks, we can give two of the most well-known attacks: load injection attacks and switching or Oscillatory Attacks. During the first attacks, the attackers use the two-way energy flow to purposefully introduce a large amount of energy into the system by discharging the batteries of electric vehicles at the same time. The load injection causes frequency rise and voltage violation. Because the injected power cannot be controlled or regulated by the system, unlike power provided by a generator, its impact on the grid is more severe than an increase in power demand. The oscillatory attacks are performed by rapidly switching between power injection and increasing demand. In the first stage of this attack, the frequency is lowered by drastically increasing the power consumption. Then, when the system starts to adjust the turbines' frequency and speed to recuperate, the attacker cancels the demands and performs power injection while simultaneously discharging EVs. This step causes the frequency to increase. The attacker's frequent switching between the two steps in a brief period leads to the oscillation of the frequency and voltage within the power grid. In addition to having an impact on how the power grid operates, the sudden variations in the amount of electricity demand also drastically vary the power generators' output. The lifespan and frequency of maintenance of the generators are impacted by this variation.

To protect the power grid against load-altering attacks, some interesting studies have been dedicated to this topic. The risks and vulnerabilities in the EV ecosystem that impact
the operation of the power grid were thoroughly examined by the authors of [6]. They also investigated the effects on the electrical system of oscillatory load attacks that the CSs started. As a result, they demonstrated how a weak charging ecosystem greatly increases the threat to the vital power infrastructure. Line tripping, unstable systems, etc., could result from this. Kabir et al. [7] introduced a centralized Back Propagation Neural Network-based technique for detecting oscillatory load attacks. To identify threats, the neural network model examines charging and discharging requests. Nevertheless, this approach results in a 30% false negative rate when the attacks last shorter than 20 seconds. In [8], the problem of load-altering attack under uncertainty in photovoltaic power generation was examined. They identified the problem as a Wasserstein metric-integrated robust optimization-based Volt/VAR optimization (DRO-VVO) problem. To lessen the attack's detrimental impact on voltage stability, PV planning and curtailment are also used. To detect and locate oscillatory load attacks, the authors of [9] suggested a distributed edge-based approach. To detect the attacks, they analyze the behavioral characteristics of the system's component elements using deep learning techniques. A charging process scheduling mechanism was proposed to lessen the impact of an attack on the power network [10]. To identify the best scheduling approach, the authors used particle swarm optimization. Even while the authors employ scheduling to maintain the stability of the power system, they did not incorporate a detection and mitigation strategy against load-altering attacks. Considering V2G operation for service supply in microgrids with renewable energy resources, an intrusion detection method was presented to detect cyber-physical attacks against fast charging stations early [11].

In our work, we focus on proposing a distributed two-stage defense approach against LA attacks based on Deep Reinforcement Learning (DRL). The proposal aims to prevent, detect, and mitigate LA attacks using compromised EVs and charging stations. In the first stage, we propose a proactive or preventive scheduling mechanism based on the charging stations switching between ON and OFF to prevent or reduce the probability that the compromised entities are charging/discharging at the same time. We also try to limit the power used by the charging system at each time slot in such a manner that even if the attack occurs, the power amount is insufficient to impact the power grid drastically. In addition, the charging scheduling allows the system to monitor the behavior of the system components. In the second stage, an attack detection and mitigation scheme is developed to deal with the attacks that bypass the preventive mechanism. This mechanism is based on behavior and event analysis. For the two defense mechanisms, we implement two multi-agent DRL models.

The attack and defense models are presented in Section II. We present the two multi-agent DRL models-based prevention, detection, isolation, and recovery approach against load manipulation attacks in Section III. Section IV provides the performance evaluation results. Section V concludes the paper.

## II. METHODOLOGY AND SYSTEM MODEL

We consider an EV charging system that consists of a Charging Station Management System (CSMS), a set $M$ of $M$ Charging Stations (CSs), and a set $N$ of $N_m$ Electric Vehicle Supply Equipment (EVSE). A CS $m$ hosts a set $N_m$ of $N_m$ EVSEs. We also consider a set of $V$ EVs that request charging service.

### A. Attack Model

An attacker that can monitor and control a large number of hacked EVs and CSs is considered. Numerous attack vectors can be used to initiate an attack against the electrical system. The different attack vectors are as follows:

* The attacker leverages the connected internal vehicle components, such as the On-Board Diagnostics (OBD) port, to hack EVs. The latter can be physically and remotely managed by getting access to the Controller Area Network (CAN) bus, which allows for control over the vehicle and charging procedure.

* The adversary could exploit the mobile application, which is the driving force behind the commercialization of the EV charging ecosystem, by taking advantage of the absence of end-to-end authentication between the user and his vehicle. This would allow the adversary to exploit vehicles connected to the charging station opportunistically.

* The attacker can take control of the CSs by physically and remotely hacking.

* By controlling a sizable distributed CSMS botnet, the attacker can launch attacks against the power grid and take advantage of one or more operators' management systems (multi-operator). By using several CSMSs, the attacker might develop several attack combinations.

* The attacker exploits the vulnerabilities of the communication protocol OCPP against the Man-In-The-Middle attack to bypass the centralized defense systems.

The adversary can leverage public charging stations as well as private charging stations to launch the LA attacks. However, the attacker needs to collect data about the grid operation and the response of the existing physical layer detection mechanism hosted by the utility operator. He may use interception and false data injection attacks to gather the required data to deceive the physical layer defense mechanism.

### B. Defense Model

The goal of the defender is to prevent, detect, and lessen attacks that try to disrupt the electric grid's operation. In our proposal, we suggest a two-phase defense approach: Preventive Defense System (P-DS), and Curative Defense System (C-DS). In order to react quickly to attacks, the P-DS schedules and organizes the EVSEs' actions. The C-DS detects, isolates, and recovers the attack in the second stage to assist the power grid in preserving the equilibrium between energy supply and demand.

LA attacks require a large number of EVs using the charging service simultaneously since need a significant quantity of
charging and discharging power to succeed. This is the ratio-
nale behind the charging/discharging scheduling. Our goal is
to thwart the attacker's plan and stop the attack. By alternating
the EVSEs' status between ON and OFF and only activating
a portion of them during each time slot, we first attempt
to lessen the likelihood that the compromised components
are simultaneously using the charging/discharging service.
Furthermore, we take into account limiting the overall power
use at each time slot to guarantee that even if every activated
entity at this time slot is compromised, the overall power usage
will not significantly affect the operation of the power grid.

At the start of each time period, the charging schedule is
completed. An hour, thirty minutes, twenty minutes, fifteen
minutes, etc., can all be considered periods. For the defense
system, a shorter duration is preferable. However, the overhead
in terms of CPU and energy consumption increases when
the scheduling method is run more frequently. To schedule
the charging stations' operation, we divide the time period
into shorter time slots and the status and the charging power
is determined for each EVSE. We define a binary decision
variable $x_{n,v}^t$ that determines the status of the EVSE for each
EV $v \in \mathcal{V}$ at EVSE $n \in \mathcal{N}$. This variable equals 1 if $n$ is ON
and 0 if it is OFF.

The total charging/discharging demand $P^t$ at time slot $t$ id expressed as:

$$P^t = \sum_{n \in \mathcal{N}} \delta_n^t P_n^t x_{n,v}^t \quad (1)$$

where $P_n^t$ represents the charging/discharging power. The variable $\delta_n^t$ checks the request of the EV connected to EVSE $n$; hence $\delta_n^t = 1$ if the vehicle requests for charging, and equals -1 if the request is discharging. If the EVSE is free, which means no vehicle is connected to it, $\delta_n = 0$.

The problem of charging system scheduling is formulated as a multi-objective constrained optimization problem expressed as:

$$\min_{P,x} F = [P^t]_{1<t<T-1} \quad (2)$$

where $P$ and $x$ represents the power vector and the status vector of all the EVSEs, respectively. $P^t$ represents the total charging system power at time slot $t$. The constraints of the optimization problem are as follows:

$$C1: x_{n,v}^t \in \{0,1\}, \forall n \in \mathcal{N}, \forall 1 \le t \le T$$

$$C2: SOC_v^{min} \le SOC_v \le SOC_v^{max}, \forall v \in \mathcal{V}$$

$$C3: 0 \le P_n^t \le \min(P_n^{max}, P_v^{max}),$$

Constraint $C1$ shows that the decision variable $x_{n,v}^t$ is binary. $C2$ is utilized to make the batteries' State of Charge (SOC) adhere to the standards. Constraint $C3$ ensures that the charging and discharging power doesn't go beyond the limit set by the EV and EVSE's technical specifications.

Attackers can still overcome the P-DS tactic, especially if they take over the CSs or CSMS directly, even if this proactive or preventative security approach may help avoid or at least reduce the likelihood of an attack occurring. However, during

the reactive defensive stage, the charging scheduling greatly aids the system in detecting, identifying, and mitigating the attacks. To protect the system against LA attacks that bypass the P-DS, we propose Curative Defense System C-DS, which monitors the behavior of the system using the predetermined schedules and the events that occur within it. C-DS then takes action based on what happens in the system. For P-DS and C-DS, we define a multi-agent DRL model for each defense system, where a DRL agent is deployed in each CS. We opt for a distributed solution to counter the Man-In-The-Middle attacks by making decisions locally without the need to exchange data over the communication network.

### III. MULTI-LEVEL MULTI-AGENT DRL BASED ATTACK PREVENTION, DETECTION AND MITIGATION APPROACH

In this section, we present the two DRL-based defense systems: P-DS and C-DS.

#### A. Multi-Agent DRL-Based Charging Stations' Scheduling

The multi-objective charging scheduling problem presented in the previous section is NP-hard. Directly solving it is extremely difficult, and we are unable to find a solution in polynomial time. We can obtain an exact optimal solution using certain exhaustive procedures. However, as the number of EVSEs grows, the complexity rises exponentially. Furthermore, even with a centralized solution, the central server must get global network knowledge, which is impractical given the volume of data to exchange in addition to security issues (Man-In-The-Middle). To address the scheduling in a distributed and intelligent way, we therefore choose a DRL-based approach where a deep Q-learning model is created for each CS $m$.

1) Markov Decision Process: For each DRL agent, we formulate the problem as a Markov Decision Process (MDP). Typically, an MDP is represented as $< S_m, A_m, F_m, R_m, S'_m >$.

In the state space $S_m$, a state vector represents the perception of the environment. The action $a_m(t) \in A_m$ represents the action taken by the agent when the system's current state is $s_m(t)$. The probability distribution $F_m$ includes the transition probabilities. Note that the agents cannot predict the states, rewards, and transitions before they make a decision. Consequently, we propose a model-free deep Q-learning model with an unknown transition probability distribution.

The immediate feedback that the environment provides for activities is reflected in the reward function. In the scheduling problem, the objective is to reduce the total power at each time slot; hence, the reward function will be inversely proportional to the total power. The immediate reward function for each deep Q-learning model can be defined as:

$$r_n(t) = - \sum_{n \in \mathcal{N}_m} \delta_n^t P_n^t x_{n,v}^t \quad (3)$$

The optimal Q-value can be found by iteratively updating the Bellman equation. After $t \to \infty$, the Q-value rises and tends to the optimum value. However, it is not feasible to
iterate $\infty$ times, and this could result in a deviation from the
optimal strategy. This problem can be resolved by employing a
deep neural network as a non-linear function that approximates
complex states, which greatly reduces the search space.

**2) Deep Q-Learning Model:** The primary benefit of the DRL model is its ability to solve complex problems by merging deep learning and Q-learning, which solves the problem of dimensionality in Q-learning. In this paradigm, a Deep Neural Network (DNN) represents the input states, and the probability of any possible action is computed concurrently. Based on interactions with the environment and these probabilities, the agents decide what to do.

We show the proposed DRL model for each agent in Figure 1. In the suggested model, the approximation function is a neural network, also called a Q-Network, with parameters $w$. However, combining reinforcement learning with a Deep Q Network (DQN) makes training the model more challenging because of the variable feedback from a dynamic environment. Fixation strategies are introduced to solve this issue and avoid divergence during training. An approximator neural network, sometimes referred to as the primary or local learning network, has a copy with fixed parameters $\nabla_w$, in which the weights remain constant for a predefined number of episodes. This duplicate network is referred to as the target network. The learning network continues to learn from the replay memory data, and the weights $w$ are copied to the target network after each $Z$ episode.

The DQN's output is $Q(s(t), a(t); w(t))$ for each input state $s(t)$ and action $a(t)$ in the agent's DRL model, where $w(t)$ represents the DQN weights. Using the $\epsilon$-greedy policy, the agents use a greedy algorithm with probability $1 - \epsilon$ to select the best actions and randomly choose other actions with a probability of $\epsilon$.

Additionally, the agent saves the experience $\langle s(t), a(t), r(t), s'(t) \rangle$ in a replay memory $\mathcal{D}$ each time $s(t)$ is updated to $s'(t)$. In each training phase, a mini-batch of size $B$ is chosen at random from $\mathcal{D}$ to update the DQN parameters. The goal is to minimize the loss function, also known as the mean-square-error, between the current and target Q values.

The multi-agent DRL models are trained offline in the CSMS. The trained models are then sent to the CSs for the decision-making.

The system anticipates adherence to all schedules following the establishment of each EVSE's operating schedule. Any modification in operation will alert the system, which responds appropriately. In the following section, we introduce the C-DS for detecting and mitigating attacks that stops load-altering attacks from affecting the power grid. It allows the grid time to identify, isolate, and recover the compromised components in order to counter the attack. We opt for a multi-level multi-agent DRL-based approach.

## B. Multi-Agent DRL-Based Attack Detection and Mitigation

The charging/discharging procedure starts according to the preset schedules after the operation scheduling process is com-

<figure><img src="image_3.png" /><figcaption>Fig. 1. The DRL model</figcaption></figure>

plete. To address any problem before it affects the electrical grid, C-DS continuously monitors the system. Its function is to identify anomalies and attacks carried out by EVs and CSs that have been compromised. It keeps track of whether EVs' actions adhere to the established schedules or not. The CS determines whether an event is suspicious, malicious, or normal based on the analysis of events that have occurred. We choose Deep Reinforcement Learning for the decision-making process, and for each CS, we define a DRL agent. The DRL model characterizes the event using data like charging schedules, the state of EVSEs, request types, previous events, CS logs, etc. In addition to the local parameters, the C-DS can immediately record the frequency of the power grid, which is directly related to the speed of the generators, with high granularity by measuring the duration of the voltage waveforms that are sampled over time. This information is recorded in the log files of the CSs. The main events that can occur in one or more EVSEs are the following:

* $\delta_n$ value changes from 0 to 1 or -1 (i.e., new request);

* $\delta_n$ changes from 1 to -1 or vice versa;

* EVSE status changes from ON to OFF ($x_{n,v}$ changes from 1 to 0) or vice versa;

The information about the event, as well as the data extracted from the interaction with the environment, are fed into the DRL model to detect the maliciousness of the events that occurred. In general, local data and events are used to detect and identify local attacks, while the grid frequency is an addition to detect cooperative large-scale LA attacks.

The action taken by the C-DS will depend on the output of the DRL model:

* Cancel the demand of the one or many EVs identified as malicious.

* Isolate the CSs identified as compromised.

* Update the schedules for some EVSEs;

* Integrate new connecting EVs in the charging scheduling;

* Switch EVSEs' status from charging to discharging or vice versa;
* Replace the canceled demands with backup EVSEs demands;

* If a sequence of events is identified as malicious, the agent creates a switching block that will randomly switch charging stations between on and off to disrupt the synchronization of attacks.

For the recovery strategy, P-DS replaces the canceled power demands with new demands. It uses either new charging requests or backup EVSEs. This strategy makes it possible to re-stabilize the system with little changes to its current functioning. The C-DS decides to use the backup EVSEs to replace the canceled EVSEs when there aren't any new EVs joining the charging network or not enough of them to produce a stable situation. The backup EVSEs are chosen from the operational EVSEs that already have their schedules. However, the replacement EVSEs will adopt the schedules of the canceled ones. The C-DS agents also inform the CSMS and grid operator of the LA attacks and the identities and locations of the compromised CSs.

#### IV. PERFORMANCE EVALUATION

The WSCC 9-bus system 2, a widely used system in academic research, is the system on which we execute our simulation. We consider a 0.6 lagging EV charging power factor $pf$.

<figure><img src="image_4.png" /><figcaption>Fig. 2. WSCC 9-Bus system</figcaption></figure>

Adding 21 MW to bus 6 of the WSCC 9-bus system, which equates to 2900 EVs charging at 7.2 kW, and injecting a 60 MW negative load in bus 5, which corresponds to 8300 EVs discharging, allows us to replicate an oscillatory attack and demonstrate its effects on the power grid. Closing bus 6 and then opening it and closing bus 5 is how the attack is carried out. At t=15 s, t=35 s, t=45 s, and t=55 s, this procedure is repeated.

As seen in Fig 3(a), the frequency fluctuates with the oscillation of the charging/discharging load. As shown in Fig 3(b) for bus 8, the voltage at the load buses also varied. Thus, we can conclude that such an attack can impact the electrical grid without a significant power load. Due to the quick acceleration and deceleration durations, this attack can damage the turbines even when there are fewer EVs.

The idea behind our suggestion is that the system can detect any alteration in the behavior of the compromised EVs and/or CSs when they fail to adhere to the established schedules. The system can foresee LA attacks as a result. We observe the frequency and voltage response of the system after applying the proposed strategies to the simulated attack.

To test the effectiveness of our approach, we carried out the same attack on the system while using the developed methods for operation scheduling and attack detection and neutralization. We compare and contrast two scenarios: In the first scenario, 20% of the entities that request charging and discharging services at the same time are compromised EVs and CSs. The percentage of compromised entities was then increased to 50%.

<figure><img src="image_5.png" /><figcaption>Fig. 3. Transient response to the oscillatory attack with DRL-based defense systems.</figcaption></figure>

Figure 3 shows that in both situations, the attack is detected as soon as it begins, but it takes a few seconds to be isolated and neutralized. Additionally, even before the attack is neutralized, frequency and voltage differences can
<table><caption>TABLE I
DETECTION ACCURACY, FALSE NEGATIVE RATE AND FALSE POSITIVE RATE</caption><thead><tr><th></th><th>ACC</th><th>FNR</th><th>FPR</th></tr></thead><tbody><tr><td rowspan="2">Simultaneous attacks</td><td>S1: 100%</td><td>S1: 0%</td><td>S1: 0%</td></tr><tr><td>S2: 100%</td><td>S2: 0%</td><td>S2: 0%</td></tr><tr><td rowspan="2">Small-scale attacks</td><td>S1: 99.65%</td><td>S1: 2%</td><td>S1: 3%</td></tr><tr><td>S2: 98.5</td><td>S2: 4%</td><td>S2: 5%</td></tr></tbody></table>

be reduced thanks to the recovery and replacement processes. As a result, the differences between those with and without defense mechanisms are more pronounced. However, a higher percentage of attackers causes the system to re-stabilize more slowly.

We test the detection accuracy by implementing two scenarios depending on the types of events that occur: S1 (70% malicious, 30% benign) and S2 (30% malicious, 70% benign), as indicated in Table I. The results showed that we achieved a 100% detection rate of large-scale load manipulation or simultaneous cooperative attacks in all cases. However, certain individual or small-scale attacks are not detected, and their false negative rates (FNR) are 2% and 4% for the two cases, respectively. For the two cases, the defense system produces false positive rates (FPR) of 3% and 5%. The DRL agents determine the current event's character based on previous occurrences, and it is evident that the agents categorize more events as malicious as the number of malicious events rises. Most likely, the electrical grid is unaffected by these attacks. On the other hand, as the number of harmful events rises, the FPR rises as well because the DRL agents become more watchful and suspicious of the significant number of anomalies and aberrant events, which causes them to mistakenly label certain regular behaviors as suspicious or malicious. Given the system's scalability and the fact that these rates do not affect the electrical grid, the numbers of false positives and false negatives are still extremely low.

## V. CONCLUSION

The increasing number of EVs makes it more difficult to protect the power grid's infrastructure from attacks. Exploiting the vulnerabilities in the EV charging infrastructure, attackers can impair the stability and functionality of the grid. One of the most well-known attacks that target the electrical system via EV charging stations is load manipulation or load altering. These attacks influence loads by alternating between charging and discharging, which creates grid instability. In this paper, we proposed two multi-agent DRL-based schemes to prevent, detect, identify, isolate, and mitigate load-altering attacks. As a first step, we suggested scheduling charging station operations by altering their status between ON and OFF to disrupt the synchronization of eventual attacks. Moreover, the system can identify any behavior change and then anticipate the attack thanks to these preset schedules. Along with this proactive preventive mechanism, we developed a DRL-based curative defense scheme. This makes it possible for the system to identify and counteract the impact of attacks on the electrical

grid. Once the compromised entities are identified, they are separated. The canceled power requests are either fully or partially restored by the demands of certain backup charging stations. From the results obtained during performance evaluation, we proved that the suggested solution minimizes the impact of load manipulation attacks and delivers good results in terms of detection accuracy that equals 100% with a 0% false negative rate for simultaneous cooperative attacks.

## ACKNOWLEDGMENT

This work is partly financed by Région Normandie, France, under the ANR- 23-IAS4-0003 Project SHARP.

## REFERENCES

[1] A. Bourass, S. Cherkaoui, and L. Khoukhi, "Secure optimal itinerary planning for electric vehicles in the smart grid," *IEEE Transactions on Industrial Informatics*, vol. 13, no. 6, pp. 3236-3245, 2017.

[2] D. A. Chekired, L. Khoukhi, and H. T. Mouftah, "Fog-based distributed intrusion detection system against false metering attacks in smart grid," in *ICC 2019 - 2019 IEEE International Conference on Communications (ICC)*, 2019, pp. 1-6.

[3] C. D. Abd Eldjalil and K. Lyes, "Optimal priority-queuing for ev charging-discharging service based on cloud computing," in *2017 IEEE International Conference on Communications (ICC)*, 2017, pp. 1-6.

[4] S. Acharya, Y. Dvorkin, H. Pandzic, and R. Karri, "Cybersecurity of smart electric vehicle charging: A power grid perspective," *IEEE Access*, vol. 8, pp. 214434-214453, 2020.

[5] S. Acharya, Y. Dvorkin, and R. Karri, "Public plug-in electric vehicles + grid data: Is a new cyberattack vector viable?" *IEEE Transactions on Smart Grid*, vol. 11, no. 6, pp. 5099-5113, 2020.

[6] M. A. Sayed, R. Atallah, C. Assi, and M. Debbabi, "Electric vehicle attack impact on power grid operation," *International Journal of Electrical Power & Energy Systems*, vol. 137, p. 107784, 2022. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0142061521010048

[7] M. E. Kabir, M. Ghafouri, B. Moussa, and C. Assi, "A two-stage protection method for detection and mitigation of coordinated evse switching attacks," *IEEE Transactions on Smart Grid*, vol. 12, no. 5, pp. 4377-4388, 2021.

[8] P. Prabawa and D.-H. Choi, "Distributionally robust pv planning and curtailment considering cyber attacks on electric vehicle charging under pv/load uncertainties," *Energy Reports*, vol. 11, pp. 3436-3449, 2024. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S2352484724001677

[9] K. Sarieddine, M. A. Sayed, S. Torabi, R. Atallah, and C. Assi, "Edge-based detection and localization of adversarial oscillatory load attacks orchestrated by compromised ev charging stations," *International Journal of Electrical Power & Energy Systems*, vol. 156, p. 109735, 2024. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S0142061523007925

[10] N. M. M. Mohamed, H. M. Sharaf, D. K. Ibrahim, and A. El'gharably, "Proposed ranked strategy for technical and economical enhancement of evs charging with high penetration level," *IEEE Access*, vol. 10, pp. 44738-44755, 2022.

[11] Z. Warraich and W. Morsi, "Early detection of cyber-physical attacks on fast charging stations using machine learning considering vehicle-to-grid operation in microgrids," *Sustainable Energy, Grids and Networks*, vol. 34, p. 101027, 2023. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S2352467723000358