# A Simulation Tool for V2G Enabled Demand Response Based on Model Predictive
Control

Cesar Diaz-Londono, , Stavros Orfanoudakis , Pedro P. Vergara, Peter Palensky,
, Fredy Ruiz, , and Giambattista Gruosso Cesar is granted by Politecnico di
Milano within the IDEA League Alliance through the IDEA League Fellowship
Exchange Program 2023. Cesar is funded by FSE-REACT EU, PON “RICERCA e
INNOVAZIONE” 2014-2020, Azione IV.6 (Green). Stavros is funded by the HORIZON
Europe Drive2X Project 101056934.Cesar Diaz-Londono, Fredy Ruiz, Giambattista
Gruosso are with the Dipartimento di Elettronica, Informazione e
Bioingegneria, Politecnico di Milano, Milan, Italy (email: {cesar.diaz,
fredy.ruiz, giambattista.gruosso<EMAIL_ADDRESS>Stavros Orfanoudakis, Peter
Palensky, and Pedro P. Vergara are with the Intelligent Electrical Power Grids
(IEPG) Section, Delft University of Technology, Delft, The Netherlands
(emails: {s.orfanoudakis, p.palensky, p.p.vergarabarrios}@tudelft.nl).

###### Abstract

Integrating electric vehicles (EVs) into the power grid can revolutionize
energy management strategies, offering both challenges and opportunities for
creating a more sustainable and resilient grid. In this context, model
predictive control (MPC) emerges as a powerful tool for addressing the
complexities of Grid-to-vehicle (G2V) and vehicle-to-grid (V2G) enabled demand
response management. By leveraging advanced optimization techniques, MPC
algorithms can anticipate future grid conditions and dynamically adjust EV
charging and discharging schedules to balance supply and demand while
minimizing operational costs and maximizing flexibility. However, no standard
tools exist to evaluate novel energy management strategies based on MPC
approaches. Our research focuses on harnessing the potential of MPC in G2V and
V2G applications, by providing a simulation tool that allows to maximize EV
flexibility and support demand response initiatives while mitigating the
impact on EV battery health. In this paper, we propose an open-source MPC
controller for G2V and V2G-enabled demand response management. The proposed
approach is capable of tackling the uncertainties inherent in demand response
operations. Through extensive simulation and analysis, we demonstrate the
efficacy of our approach in maximizing the benefits of G2V and V2G while
assessing the impact on the longevity and reliability of EV batteries.
Specifically, our controller enables Charge Point Operators (CPOs) to optimize
EV charging and discharging schedules in real-time, taking into account
fluctuating energy prices, grid constraints, and EV user preferences.

###### Index Terms:

Electric Vehicles (EVs), Smart Charging, Open Source, Battery Degradation,
Vehicle-to-Grid (V2G), Model Predictive Control (MPC)

##  I Introduction

As the adoption of electric vehicles (EVs) continues to surge, the efficient
management of charging infrastructure becomes increasingly important[1]. Grid-
to-vehicle (G2V) technology facilitates energy flow in a unidirectional
manner, whereas vehicle-to-grid (V2G) technology enables bidirectional energy
flow between EVs and the grid, thereby unlocking the potential for EV
batteries to serve as flexible energy storage resources [2, 3]. However, the
effective implementation of G2V and V2G strategies faces numerous
uncertainties, including fluctuating energy demands, variable renewable energy
generation, inflexible loads, and dynamic EV schedules [4].

Several mathematical programming methods have emerged for tackling the smart
charging problem. For instance, in [5], a real-time approach is introduced to
manage EV charging schedules using satisfaction assignment and prioritized
charging strategies, all while considering operational constraints.
Additionally, in [6], a linear model is employed to maximize the utilization
of PV power generation during EV charging peaks, while ensuring the EVs’ state
of charge (SoC) constraints are met. Furthermore, Linear Programming (LP)
techniques have been utilized to optimize load factor during daily operations
of EV parking lots, considering uncertainties in EV behavior such as arrival
and departure times [7]. Similarly, [8] proposes a mixed-integer programming
model to maximize revenues for a V2G EV aggregator in the UK electricity
market. In [9], the synchronization of forecast-based optimization with
management operation is implemented for EV charging and discharging patterns.
Optimal dispatching methods can reduce the curtailment of wind turbines and PV
power [10] or reduce the generation cost [11] in distribution systems. While
these approaches provide linear models for both small and large-scale
problems, they are limited due to the absence of real-time control to handle
the inherent uncertainties.

Model Predictive Control (MPC) stands out as a powerful solution for
navigating the intricacies of G2V and V2G-enabled demand response management
[12]. In [13], a real-time MPC strategy was proposed, effectively reducing
operational costs by treating EVs as flexible loads, thereby enabling
adjustments in the power allocation and charging duration for each EV.
Similarly, in [14], an MPC method was introduced to coordinate EVs on a large
scale, enhancing grid robustness and cutting operational expenses. Moreover,
[15] proposed a scenario-based MPC approach, combining robust and stochastic
models to minimize the total operational cost for energy management. In [16],
a real-time cost-minimization energy management strategy was introduced,
aiming to maximize the economic potential of EVs while addressing battery
degradation, thus mitigating a single vehicle’s operating costs. Even though
many MPC methods have been developed, there remains a gap in achieving a
comprehensive real-time demand response solution while assessing battery
degradation.

Furthermore, while there are many open-source simulation tools for fleet
charging management, they often lack baseline MPC implementations. For
instance, FleetRL [17] provides a customizable environment for commercial
vehicle fleets, utilizing Reinforcement Learning (RL) for charging
optimization, assessing factors like economic feasibility, battery health, and
operational efficiency. Similarly, Chargym [18] and SustainGym [19] offer
simulation environments for EV charging, focusing on RL algorithm development
but with simplified models. Meanwhile, OPEN [20] addresses broader smart
energy systems but lacks MPC integration. Considering the effectiveness of MPC
in EV smart charging, a comparative analysis between existing implementations
and those incorporating MPC would be invaluable.

To bridge the identified gaps, we introduce open-source111Access the open-
source code at https://github.com/CesarDiazLondono/MPC-G2V-V2G (will be public
upon paper acceptance). MPC algorithms embedded within the EV2Gym [21]
platform, aimed at maximizing profits for Charge Point Operators (CPOs), while
accommodating the preferences of EV owners and addressing uncertainties
inherent in EV smart charging problems, such as inflexible loads, PV
generation, and demand response events. In summary, our primary contributions
are:

  * •

Development of a flexible open tool capable of executing various EV CPO case
studies to evaluate different performance indicators.

  * •

Novel formulation of an economic MPC method tailored for G2V and V2G real-time
smart charging, strategically crafted to optimize profits while accommodating
uncertainties intrinsic to demand response.

  * •

Innovative design of the Optimal control with maximum flexibility (OCMF) MPC
method for G2V and V2G real-time smart charging, geared towards enhancing
flexibility and profitability amidst the complexities of demand response
uncertainties.

  * •

Evaluation of the impact of smart charging strategies on the degradation of EV
batteries.

The paper proceeds as follows: We start by providing background information on
the simulation platform used, followed by a detailed introduction to smart
charging, including mathematical modeling formulations. Finally, we present a
thorough experimental evaluation to assess the effectiveness of the proposed
strategies.

##  II The EV2Gym Simulator Platform

EV2Gym [21] provides a complete simulator platform for conducting realistic
V2G simulations, encompassing configurable simulation parameters, realistic EV
models, charging station management, and complete transformer operations.

Figure 1: Overview of EV2Gym’s modules power and information flow.

###  II-A Simulation Models

In a simulation, there are $I$ chargers, where $i=1,2,\dots,I$, each one
having one Electric Vehicle Supply Equipment (EVSE). Each charger $i$ is
connected to one of the $G$ transformers, where $g=1,2,\dots,G$. There are
also, $J$ EVs that connect to EVSEs during the simulation. Finally, a
simulation consists of $K$ discrete time steps, where $k=1,2,\dots,K$. At each
step, the user-selected algorithm defines the power output $P_{i,k}$, for each
charger $i$. The algorithm can fully observe the current state of the
environment and can access future data, including electricity prices, load and
PV forecasts, and EV schedules. Fig. 1 illustrates the simulator models.

Each EV $j$ in the simulator features customizable parameters, including
battery capacity ($E_{j}$), charge ($\eta^{\textit{c}}$) and discharge
($\eta^{\textit{d}}$) efficiency, minimum SoC at departure
$\underline{SoC}_{j,d_{j}}$, and maximum charging ($\overline{P}^{c}_{i}$) and
discharging ($\overline{P}^{d}_{i}$) power limits that depend not only on the
EV battery management system but also on the EVSE rated power. At each time
step $k$ EVs can arrive at a charging station based on realistic EV behavior
probability distributions obtained from the ElaadNL repository [22], ensuring
the simulation accurately reflects real-world scenarios. Therefore, an EV’s
arrival time $a_{j}$, departure time $d_{j}$, and SoC at arrival $SoC_{a_{j}}$
are sampled from ElaadNL data. By leveraging this data, EV2Gym can replicate
various charging patterns observed in different settings, such as public
charging stations, workplaces, and residential areas.

Each transformer $g$ aggregates EV chargers in the set $\Phi_{g}$, to simulate
the electricity distribution network and its constraints. Additionally,
transformers incorporate realistic data about inflexible loads, solar
photovoltaic (PV) generation, and demand response events. For instance,
datasets from Pecan Street [23] and Renewables.ninja [24] are used to model
inflexible loads and PV generation profiles, respectively, while information
about demand response events can be configured by users based on specific
parameters such as start time and duration. Transformers have operational
constraints that must be followed. Violations of these constraints are tracked
throughout the simulation, enabling the evaluation of charging strategies
under realistic operating conditions. Furthermore, the platform generates
forecasts of inflexible loads and solar power generation to support the
development of algorithms that can handle uncertainty, enhancing the
robustness and reliability of charging strategies in real-world scenarios.

###  II-B Battery Degradation Model

TABLE I: Battery Degradation Model Parameters

$\epsilon_{0}$ | $\epsilon_{1}$ | $\epsilon_{2}$ | $\theta$ | $\zeta_{0}$ | $\zeta_{1}$ | $T^{\textit{tot}}$ | $Q^{acc}$
---|---|---|---|---|---|---|---
$6.23\cdot 10^{6}$ | $1.38\cdot 10^{6}$ | $6976$ | $28$ | $4.02\cdot 10^{-4}$ | $2.04\cdot 10^{-3}$ | $730$ | $11160$

Users often hesitate to offer their EVs for V2G services due to concerns about
battery degradation. For this reason, it is important to assess the impact of
the proposed smart charging algorithms using a validated battery degradation
model [25]. This model comprises both calendar ($d^{\textit{cal}}$) and cyclic
($d^{\textit{cyc}}$) capacity loss components. For a single EV, the capacity
degradation attributed to calendar aging over a simulation with duration $T$
is related to the mean $\widehat{\textit{SoC}}$ and is described as:

$d^{\textit{cal}}=0.75\cdot(\epsilon_{0}\cdot\widehat{\textit{SoC}}-\epsilon_{1})\cdot\text{exp}\left(-\frac{\epsilon_{2}}{\theta}\right)\cdot\frac{T}{(T^{\textit{tot}})^{0.25}}.$
(1)

Here, $T^{\textit{tot}}$ denotes the battery’s age in days, $\theta$
represents the battery temperature (∘C), and
$\epsilon_{0},\epsilon_{1},\epsilon_{2}$ are constants, as shown in Table I.

The cyclic capacity loss depends on the total energy exchanged by the battery
and the SoC at each simulation step as:

$d^{\textit{cyc}}=\left(\zeta_{0}+\zeta_{1}\frac{\sum|\widehat{\textit{SoC}}-\textit{SoC}_{k}|\,\Delta
t}{T}\right)\cdot\frac{\sum|P_{k}|\,\Delta t}{\sqrt{Q^{\textit{acc}}}},$ (2)

where $Q^{\textit{acc}}$ is the accumulated throughput during the battery’s
lifetime, and $\zeta_{0}$, $\zeta_{1}$ are constants defined in Table I.
Therefore, the total capacity loss of an EV battery is the sum:
$Q^{\textit{lost}}~{}=~{}d^{\textit{cal}}+d^{\textit{cyc}}$. In this work, the
capacity loss is evaluated but not included in the vehicle model within the
charging strategies presented in the next section.

##  III Smart Charging Strategies

The smart charging strategies adopted by the EV Charging Point Operator (EV
CPO) rely on the model predictive control (MPC) algorithm. The proposed
strategies are based on [26], in which only unidirectional strategies are
considered. In this paper, we are proposing four distinct smart charging
algorithms, each designed to achieve specific objectives while adhering to the
MPC framework. These strategies include:

  * •

eMPC G2V: Unidirectional economic MPC (eMPC) aimed at minimizing the
operational costs of the CPO.

  * •

eMPC V2G: Bidirectional eMPC aimed at minimizing the operational costs of the
CPO.

  * •

OCMF G2V: Unidirectional Optimal Control with Maximum Flexibility (OCMF) aimed
at minimizing the CPO’s operational costs while maximizing charger
flexibility.

  * •

OCMF V2G: Bidirectional OCMF aimed at minimizing the CPO’s operational costs
while maximizing charger flexibility.

###  III-A Solution Formulation

The proposed MPC algorithms are designed to maximize CPO profits, taking into
consideration constrains on energy and power limits imposed by the grid,
chargers and vehicles, the preferences of EV owners and the various
uncertainties associated with the charging pool, such as the inflexible loads
and the PV generation. MPC algorithm forms the basis of this approach, where
at each time step $k$, an optimization program is solved to determine the
optimal power exchange between each charger in the pool $I$ with an EV
connected, and the grid for an horizon of $H$ steps. Then, the algorithm
outputs are the demanded and delivered charger power levels for the current
time step $k$, denoted as $P^{c*}_{i,k}$ and $P^{d*}_{i,k}$, respectively.
Notice that only one of these power levels can be activated for every charger
at each interval $k$, i.e., the charger can only charge or discharge the EV at
$k$. On the other hand, the plant under control is the set of EVs connected to
the chargers. Power commands $P^{c*}_{i,k}$ and $P^{d*}_{i,k}$ are the inputs
to the actual EV charging pool, where the State-of-Charge (SoC) of the
vehicles’ batteries, represented as $x_{i,k}$, are the system state and model
outputs.

The MPC methodology involves four main steps:

  1. 1.

Given the SoC of the connected vehicles at time $k$, build a prediction model
to compute the evolution of the SoC of the EV charging pool $x_{i,k+h}$ over a
prediction horizon $H$ for any power profiles $P^{c}_{i,k+h}$ and
$P^{d}_{i,k+h}$, where $h~{}=~{}1,2,\dots,H$.

  2. 2.

Optimization process to determine the future inputs $P^{c*}_{i,k+h}$ and
$P^{d*}_{i,k+h}$, considering a cost function and operational constraints.

  3. 3.

Application of the first element of the optimal power profile $P^{c*}_{i,k}$
or $P^{d*}_{i,k}$ ($h{=}0$) to the chargers within the pool.

  4. 4.

Wait until the next time stem to measure the new system state $x_{i,k+1}$ and
forecasted variables, such as the inflexible loads and the PV generation.

These steps are iterated at each time step $k$, employing the concept of
receding horizon. This approach involves recalculating the power signals
$P^{c*}_{i,k}$ and $P^{d*}_{i,k}$ at each iteration, taking into account
updated information.

The MPC algorithm relies on a system model to predict future powers in the
charging pool. Therefore, this model must strike a balance between precision,
to factor in charger responses, and simplicity, to facilitate online
optimization for the Real-Time (RT) operation of the chargers. Hence, the EV
charger model depends on a signal $\xi_{i,k}$ indicating whether an EV is
plugged in at the $k$-th time slot, along with the SoC variation of the
plugged-in EV. The signal $\xi_{i,k}$ is a binary variable, $\xi_{i,k}=1$ if
the charger $i$ has a plugged-in EV.

The SoC evolution on the $j$-th EV plugged-in the charger $i$ (i.e.,
$\xi_{i,k}=1$) is:

$x_{i,k+1}=x_{i,k}+\frac{\Delta
t}{E_{j}}\left(\eta^{c}P^{c}_{i,k}-\frac{P^{d}_{i,k}}{\eta^{d}}\right),$ (3)

while the state space model for an EV charging pool considers three possible
conditions, as:

$x_{i,k+1}=\left\\{\begin{array}[]{ll}\widetilde{SoC}_{j,a_{j}}&\textup{if
}\quad k=a_{j},\\\ \text{Eq.~{}}\eqref{eq:EVch}&\textup{if }\quad
a_{j}<k<d_{j},\\\ 0&\textup{if }\quad\xi_{i,k}{=}0\lor k{=}d_{j}.\\\
\end{array}\right.$ (4)

The first condition corresponds to the estimated arrival SoC, denoted as
$\widetilde{SoC}_{j,a_{j}}$. The second condition represents the evolution of
the energy stored in the EV battery. The third condition applies when there is
no EV connected or when an EV is departing.

Then, the EV charging pool model for the time slot $k$ is defined as:

$\hat{\mathrm{x}}_{k+1}=A_{k}\hat{\mathrm{x}}_{k}+B_{k}\hat{\mathrm{P}}_{k},$
(5)

where, the charging pool outputs, i.e., the SoC in the chargers are presented
in the $\hat{\mathrm{x}}_{k}\in{\rm I\\!R}^{I}$, as:

$\hat{\mathrm{x}}_{k}=[x_{1,k}\ x_{2,k}\ \dots\ x_{I,k}]^{\text{T}},$

and the exchanged power pool inputs, i.e., the charging and discharging powers
are grouped in one vector denoted $\hat{\mathrm{P}}_{k}\in~{}{\rm
I\\!R}^{2I}$, as:

$\hat{\mathrm{P}}_{k}=[P^{c}_{1,k}\ P^{d}_{1,k}\ P^{c}_{2,k}\ P^{d}_{2,k}\
\dots\ P^{c}_{I,k}\ P^{d}_{I,k}]^{\text{T}}.$

Moreover, $A_{k}=\text{diag}(\xi_{i,k})$ containing information about the
plugged-in EVs in the chargers, then, $A_{k}\in~{}{\rm I\\!R}^{I\times I}$.
Considering $b^{c}_{i,k}$ and $b^{d}_{i,k}$ as:

$b^{c}_{i,k}=\frac{\xi_{i,k}\Delta t\eta^{c}}{E_{j}}\quad\land\quad
b^{d}_{i,k}=\frac{\xi_{i,k}\Delta t}{E_{j}\eta^{d}},$ (6)

the matrix $B_{k}\in~{}{\rm I\\!R}^{I\times 2I}$ is generated as:

$\footnotesize
B_{k}{=}\begin{bmatrix}b^{c}_{1,k}&-b^{d}_{1,k}&0&0&\cdots&\cdots&0&0\\\
0&0&b^{c}_{2,k}&-b^{d}_{2,k}&0&0&0&0\\\ \vdots&\vdots&0&0&\ddots&\ddots&0&0\\\
0&0&0&0&\cdots&\cdots&b^{c}_{I,k}&-b^{d}_{I,k}\end{bmatrix}.$ (7)

Note that the model in Eq. (5) accounts for all chargers during time slot $k$.
For the prediction horizon $H$, the MPC algorithm utilizes the following
prediction model.

$\mathbb{X}=\mathbb{A}\hat{\mathrm{x}}_{k}+\mathbb{G}\mathbb{P},$ (8)

where,

$\scriptsize\begin{split}\mathbb{X}{=}\begin{bmatrix}\hat{\mathrm{x}}_{k+1}\\\
\hat{\mathrm{x}}_{k+2}\\\ \vdots\\\
\hat{\mathrm{x}}_{k+H}\end{bmatrix},\quad\mathbb{P}=\begin{bmatrix}\hat{\mathrm{P}}_{k}\\\
\hat{\mathrm{P}}_{k+1}\\\ \vdots\\\
\hat{\mathrm{P}}_{k+H-1}\end{bmatrix},\quad\mathbb{A}=\begin{bmatrix}A_{k}\\\
A_{k}{A}_{k+1}\\\ \vdots\\\ {A}_{k}\cdots{A}_{k+H-1}\\\ \end{bmatrix},\\\
\mathbb{G}{=}\begin{bmatrix}{B}_{k}&0&0&0\\\ {A}_{k+1}{B}_{k}&{B}_{k+1}&0&0\\\
\vdots&\vdots&\ddots&0\\\
{A}_{k+1}\cdots{A}_{k+H-1}{B}_{k}&{A}_{k+2}\cdots{A}_{k+H-1}{B}_{k+1}&\cdots&{B}_{k+H-1}\end{bmatrix}\end{split}$
(9)

The algorithm considers the constraint that the SoC at the departure time
$d_{j}$ of each EV must be within predetermined bounds, i.e., the minimum
$\underline{SoC}_{j,d_{j}}$ and maximum $\overline{SoC}_{j,d_{j}}$ SoC levels
specified by the EV owner.

$\underline{SoC}_{j,d_{j}}\leq x_{i,d_{j}}\leq\overline{SoC}_{j,d_{j}}$ (10)

The SoC in the charger is always positive and depends on the maximum capacity
$\overline{x}_{i}$ of the plugged-in EV battery, as:

$\underline{x}_{i,k}\leq x_{i,k}\leq\overline{x}_{i}.$ (11)

To avoid deep discharges in the EV battery, a minimum SoC level is defined:

$\small\underline{x}_{i,k}{=}\left\\{\begin{array}[]{ll}\widetilde{SoC}_{j,{a_{j}}}&\textup{if
}\ k=a_{j},\\\ x_{i,k-1}&\textup{if }\ \xi_{i,k}{=}1\land
x_{i,k-1}<SoC_{j,min},\\\ SoC_{j,min}&\textup{if }\ \xi_{i,k}{=}1\land
x_{i,k-1}>SoC_{j,min},\\\ 0&\textup{if }\ \xi_{i,k}{=}0.\\\
\end{array}\right.$ (12)

The first condition for the minimum SoC assumes the arrival SoC at the time of
arrival. The second and third conditions depend on the minimum state of
charge, $SoC_{j,min}$, which represents the threshold at which an EV is
allowed to discharge. Consequently, if the actual SoC of the EV is below this
threshold, the minimum SoC remains at the actual SoC level until the threshold
is reached. Once the threshold is exceeded, the EV battery can be discharged
up to the threshold. The final condition applies when no EV is plugged in.

Moreover, commercial EVSE units are limited to a predefined range of current
pilot signals [27]. As per this specification, during EV charging, the lowest
pilot current allowed is 6 A, while the highest depends on the charger’s
capacity, with discrete control occurring in increments of 1 A. The voltage in
the charger is assumed to be constant. Consequently, the power levels are as
follows,

$P^{c}_{i,k}=P^{d}_{i,k}=VI_{i,k},\ \ \ \ I_{i,k}\in\\{0,6,7,\dots,32\\}.$
(13)

The algorithm is capable of reacting to RT market signals, including
fluctuations in price and demand response (DR) events. Specifically, DR
requests are represented by the variable $P^{DR}_{k}$, allowing the algorithm
to promptly respond to market requests as they occur.

The power limit imposed by the each transformer is specified as $\Psi_{g}$,
then the balance equation for transformer $g$ is constrained as

$\sum\phi_{g,k}+\tilde{l}_{g,k}-\tilde{w}_{g,k}\leq\Psi_{g}-P^{DR}_{g,k}$ (14)

where the net power consumed/supplied by the chargers connected to transformer
$g$ is $\phi_{g,k}={P^{c}_{i,k}-P^{d}_{i,k},\forall i\in\Phi_{g}}$, and
$\Phi_{g}$ denotes the set of EV chargers connected to cluster $g$.
$\tilde{l}_{g,k}$ is the predicted inflexible load, $\tilde{w}_{g,k}$ is the
predicted PV generation and $P^{DR}_{g,k}$ is the demand response command is
case of a market request.

In the following subsections, the MPC algorithms followed by the EV CPO are
presented.

###  III-B eMPC: EV CPO Cost Minimization

This strategy, known as eMPC, seeks to minimize the operational costs of the
CPO for the horizon $H$, by optimizing the EV charging profiles of the pool
the interval $[k,~{}k+H]$. The algorithm’s decisions rely on the RT energy
prices $\pi^{c}_{k}$ and $\pi^{d}_{k}$ for charging and discharging,
respectively. Therefore, the cost function for V2G in eMPC is formulated as
follows:

$O^{\textit{CM}}_{k}=\pi^{c}_{k}\sum_{i=1}^{I}P^{c}_{i,k}-\pi^{d}_{k}\sum_{i=1}^{I}P^{d}_{i,k}$
(15)

Then, the EV CPO deals with the following eMPC V2G problem:

$\displaystyle\min_{P^{c}_{i,k},P^{d}_{i,k},z_{i,k}}$ $\displaystyle\Delta
t\sum_{k=0}^{H-1}O^{\textit{CM}}_{k}$ (16a) s.t.
$\displaystyle\text{Eq.~{}}\eqref{eq:EVSE},\ \text{Eq.~{}}\eqref{eq:ConsSoC},\
\text{Eq.~{}}\eqref{eq:SoC},\ \text{Eq.~{}}\eqref{eq:ConsTra}$ $\displaystyle
0\leq P^{c}_{i,k}\leq\overline{P}^{c}_{i}z_{i,k}$ $\displaystyle 0\leq
P^{d}_{i,k}\leq\overline{P}^{d}_{i}(1-z_{i,k})$ $\displaystyle\forall\
k=1,2,\dots,H,\ i=1,2,\dots,I,$ $\displaystyle\ \ \ j=1,2,\dots,J,\
g=1,2,\dots,G.$

The decision variables of the problem include the charging ($P^{c}_{i,k}$) and
discharging ($P^{d}_{i,k}$) power profiles, and the binary variables
$z_{i,k}$, which determines whether charging or discharging is performed
during time slot $k$. Both the charging and discharging powers are constrained
to be between zero and their respective maximum powers, denoted as
$\overline{P}^{c}_{i}$ and $\overline{P}^{d}_{i}$, respectively. Note that
problem (16a) is Mixed-Integer Linear Program (MILP), for which efficient
solvers are available.

Notice that this eMPC problem also applies to the G2V strategy, with the only
difference being the absence of the remuneration price $\pi^{d}_{k}$ since
$P^{d}_{i,k}$ is always zero. Similarly, the binary variable $z_{i,k}$ is not
required, resulting in a much simpler Linear Program (LP), with fewer decision
variables.

###  III-C OCMF: CPO Flexibility Maximization

This strategy denoted as OCMF, aims to achieve two objectives simultaneously.
Firstly, it aims to minimize the operational cost of the charging pools, as
presented in Eq. (15). Secondly, it aims to maximize the flexibility of the
chargers’ power.

The base definitions of the charger flexibility for G2V charging strategies
were porposed in [26] as follows:

  * •

Upward flexibility: This refers to the power increase a charger can deviate
from the nominal dispatched power, reducing the charging time of the EV.

  * •

Downward flexibility: This refers to the power reduction a charger can deviate
from the nominal dispatched power. This flexibility can be utilized up to a
later time slot when the EV needs to be charged to achieve the required SoC by
its departure time.

Then, the G2V upward $F^{cu}_{i,k}$ and downward $F^{cd}_{i,k}$ flexibilities
that each EV charger can provide are depicted in Figure 2. Then, we propose to
define the charging flexibility $F^{c}_{i,k}$ as the minimum flexibility
between upward and downward, as,

$F^{c}_{i,k}=\textup{min}\\{F^{cu}_{i,k},~{}F^{cd}_{i,k}\\},$ (17)

Figure 2: Flexibility in an EV charger, considering G2V and V2G strategies.

In line with the charging flexibility discussed earlier, we introduce a
discharging V2G flexibility $F^{d}_{i,k}$, designed to adjust the discharging
power either upwards or downwards as needed by the CPO. Thus, to maximize both
the upward $F^{du}_{i,k}$ and downward $F^{dd}_{i,k}$ discharging
flexibilities, we consider the minimum of both as,

$F^{d}_{i,k}=\textup{min}\\{F^{du}_{i,k},~{}F^{dd}_{i,k}\\},$ (18)

Note that only one of the charging or discharging flexibilities can be offered
at each sample time when the EV is either charging or discharging. However,
when the charger power is zero, both the charging and discharging
flexibilities are available (refer to Figure 2). Furthermore, flexibility is
not available after the time $d_{m}$ as the EV must be charged to reach the EV
owner’s requested SoC upon departure.

Therefore, the second objective of the OCMF, which aims to maximize the
chargers’ flexibility, is formulated as follows:

$O^{\textit{FM}}_{k}=\pi^{c}_{k,\textup{Flex}}\sum_{i=1}^{I}F^{c}_{i,k}+\pi^{d}_{k,\textup{Flex}}\sum_{i=1}^{I}F^{d}_{i,k},$
(19)

where, the $\pi^{c}_{k,\textup{Flex}}$ and $\pi^{d}_{k,\textup{Flex}}$ are the
incentive prices for offering flexibility.

The EV CPO addresses the following OCMF V2G problem:

$\displaystyle\min$ $\displaystyle\Delta
t\sum_{k=0}^{H-1}\left(O^{\textit{CM}}_{k}-O^{\textit{FM}}_{k}\right)$ (20a)
s.t. $\displaystyle\text{Eq.~{}}\eqref{eq:EVSE},\
\text{Eq.~{}}\eqref{eq:ConsSoC},\ \text{Eq.~{}}\eqref{eq:SoC},\
\text{Eq.~{}}\eqref{eq:ConsTra}$ $\displaystyle F^{c}_{i,k}\leq
P^{c}_{i,k}\leq\left(\overline{P}^{c}_{i}-F^{c}_{i,k}\right)z_{i,k}$
$\displaystyle F^{d}_{i,k}\leq
P^{d}_{i,k}\leq\left(\overline{P}^{d}_{i}-F^{d}_{i,k}\right)(1-z_{i,k})$
$\displaystyle 0\leq F^{c}_{i,k}\leq\overline{P}^{c}_{i}$ $\displaystyle 0\leq
F^{d}_{i,k}\leq\overline{P}^{d}_{i}$ $\displaystyle\forall\ k{=}1,2,\dots,H,\
i{=}1,2,\dots,I,$ $\displaystyle\ \ \ j{=}1,2,\dots,J,\ g{=}1,2,\dots,G.$

The decision variables of this problem are the charging $P^{c}_{i,k}$ and
discharging $P^{d}_{i,k}$ power, the binary variable $z_{i,k}$, and the
charging $F^{c}_{i,k}$ and discharging $F^{d}_{i,k}$ flexibilities. The
charging and discharging powers are constrained by the charger flexibility,
with the charging and discharging flexibilities restricted to positive values
and bounded between zero and the maximum power.

Notice that as in the eMPC problem, this OCMF problem also applies to the G2V
strategy, with the difference being the absence of the remuneration price
$\pi^{d}_{k}$ since $P^{d}_{i,k}$ is always zero, the lack of the price
$\pi^{d}_{k,\textup{Flex}}$, the flexibility $F^{d}_{i,k}$, and the binary
variable $z_{i,k}$.

##  IV Experimental Setup

Algorithm 1 EV2Gym Simulation with eMPC V2G

1:from EV2Gym.ev2gym_env import EV2Gym

2:from ocmf_mpc import OCMF_V2G, OCMF_G2V

3:from eMPC import eMPC_V2G, eMPC_G2V

4:config_file = “config.yaml” $\triangleright$ Configuration file path

5:env = EV2Gym(config_file) $\triangleright$ Initialize simulation

6:$\boldsymbol{s}_{0}$ = env.reset()

7:agent = eMPC_V2G(env, control_horizon=$H$)

8:for $k$ in 0, 1, …, $T$ do

9: $\boldsymbol{a}_{1,\dots,I}$ = agent.get_action($\boldsymbol{s}_{k}$)
$\triangleright$ MPC optimization

10: $\boldsymbol{s}_{k+1}$, stats = env.step($\boldsymbol{a}_{1,\dots,I}$)
$\triangleright$ Simulate

11:end for

12:profits, total energy charged, … = stats

In this Section we describe how to integrate the execution of an EV2Gym
simulation, introduced in Section II, with the proposed MPC algorithms. Alg. 1
outlines the Python code necessary to run a simulation utilizing the
`eMPC_V2G` strategy. Initially, the simulator class `EV2Gym` (line $1$) and
the developed MPC classes `OCMF_V2G`, `OCMF_G2V`, `eMPC_V2G`, and `eMPC_G2V`
(lines $2$ and $3$) are imported. Lines $5$ and $6$ initialize the simulation
environment using a user-defined configuration file (`config_file`).
Subsequently, the MPC algorithm’s variables are set up in line $7$, allowing
users to customize the control horizon $H$ as needed.

The main simulation loop, spanning $T$ steps, commences thereafter. Firstly,
charging and discharging actions $\boldsymbol{a}_{1,\dots,I}$ for each
charging station $i\in I$ are determined by executing the MPC algorithm’s
optimization process (line $9$), using the current state
($\boldsymbol{s}_{k}$) of the simulation as input. The state
$\boldsymbol{s}_{k}$ includes essential information such as EVs’ SoC, time of
arrival and departure, load and PV forecasts, facilitating the decision-making
algorithm’s optimization. The actions vector $\boldsymbol{a}{1,\dots,I}$ is
constrained within the $[-1,1]^{I}$ interval, where $-1$ denotes maximum power
discharge, $1$ signifies maximum power charging, and $0$ indicates no action.
Subsequently, a simulation step is taken (`env.step()`) utilizing the action
vector $\mathbf{a}{1,\dots,I}$ as a parameter (line 10). Each step yields the
subsequent simulation state $\boldsymbol{s}_{k+1}$, while the final step
($k=T$) also provides simulation evaluation statistics (`stats`) such as total
profits (€), total energy charged and discharged (kWh), execution time (s),
and total battery degradation (line 12). These metrics are important for
evaluating the efficacy of smart charging algorithms.

###  IV-A Experimental Configuration

The EV2Gym simulator, allows us to fully configure the dynamics of the
simulation by modifying the configuration file. Table II showcases the general
simulation parameters and the values we used for our experiments.
Specifically, our simulations last 24 hours, with discrete time steps set at
15 minutes. Each simulation contains the connection of 5 to 60 EVSEs to either
$1$ or $3$ transformers, accommodating a fleet size ranging from 15 to 120
EVs, as determined by our experimental setups. The EVs’ time of arrival, time
of departure, and arrival SoC are based on residential EV transaction data
from ElaadNL [22]. Also, the discharge price is based on the charge price and
multiplier $m$, thus $\pi^{d}_{k}=m\cdot\pi^{c}_{k}$. The charging prices used
in these simulations are based on the historic Dutch day-ahead prices [28].

TABLE II: General Simulation parameters. Name | Symbol | Value
---|---|---
Sample time [min] | $\Delta t$ | 15
Operation time of the station [h] | $T$ | 24
Prediction horizon (2.5 h - 10 h) | $H$ |  {2.5$\times$4, 10$\times$4}
Number of EVSEs | $I$ | {5 - 50}
Number of EVs | $J$ | {15 - 120}
Number of Transformers | $G$ | {1, 3}
Discharge Price multiplier | $m$ | {0.8 - 1.2}
EV Scenario |  | “Residential”

Furthermore, the default model parameters, such as transformer power limit,
EVSE, and EV characteristics, can be found in Table III. Finally, the
transformer loads, generation, and demand response parameters can be found in
Table IV. The normalization multipliers refer to how many times greater the
inflexible load or generation peak (kW) is compared to the transformer power
limit. For example, $1$ means that the maximum inflexible load will be as much
as the transformer limit. The simulator also provides forecasts of the loads
using a Gaussian distribution $(\bar{l}_{g,k}=\mathcal{N}(\mu,\sigma))$ with
mean the $\mu=100\%\times{l}_{g,k}$ of the actual load at time $k$ and
standard deviation $\sigma=5\%\times{l}_{g,k}$ of it. Similarly, for PV
generation forecasts $\bar{w}_{g,k}$. Moreover, tool users have the
flexibility to customize demand response events by specifying parameters such
as the number of events, capacity reduction, duration, and notification time.
The start time of events follows a Gaussian distribution with a mean of 18:00
and a standard deviation of 1 hour.

TABLE III: Default Simulation Model Parameters. Name | Symbol | Value
---|---|---
Transformer power limit [kW] | $\Psi$ | $400$
Maximum EVSE output power [kW] |  $\overline{P}^{c}$, $\overline{P}^{d}$ | $22$
EVSE Voltage (V) | $V$ | $230$
EVSE Phases | $\phi$ | $3$
EV Battery Capacity [kWh] | $E_{j}$ | $50$
Maximum EV power [kW] |  $\overline{P}^{c}$, $\overline{P}^{d}$ | $22$
Minimum EV SoC when discharging | $SoC_{j,min}$ | $10\%$
Minimum EV SoC at departure | $\underline{SoC}_{j,d_{j}}$ | $80\%$
Minimum EV time of connection [h] |  | $3$
Charging Efficiency | $\eta^{c}$ | $100\%$
Discharging Efficiency | $\eta^{d}$ | $100\%$
TABLE IV: Default Transformer Loads Parameters. Name | Value
---|---
Inflexible Loads normalization multiplier | $1$
Inflexible Loads forecast mean | $100\%$
Inflexible Loads forecast standard deviation | $5\%$
PV Generation normalization multiplier | $3$
PV Generation forecast mean | $100\%$
PV Generation forecast standard deviation | $5\%$
Demand Response duration [h] | $1$
Demand Response in advance notification [min] | $15$
Number of Demand Response events in a day | $1$
Demand Response capacity reduction | $20\%$
Demand Response event start mean [h] | $18$
Demand Response event start standard deviation [h] | $1$

##  V Experimental Results

In this section, we provide a thorough experimental assessment of the proposed
MPC strategies. Initially, we delve into a detailed examination of a single
case study to understand the behaviors. Subsequently, we broaden our scope by
conducting multiple simulations to show average performance, facilitating a
comparative analysis across the main evaluation metrics including
profitability, flexibility, and battery degradation. Finally, we offer an
evaluation of the computational costs associated with the proposed methods,
thereby providing a holistic perspective on their efficacy.

(a) Charging and discharging prices.

(b) SoC of EVs in a single EVSE.

(c) Power output the same EVSE.

(d) Total power comparison for 30 EVSEs.

Figure 3: Comparison of proposed MPC approaches for a case study with $30$
EVSEs connected to a single transformer, and $75$ EVs.

###  V-A Performance Comparison

To begin our assessment of the proposed MPC methods, we first compare their
performance against baseline strategies in a single case study. In Fig.3, we
present a comparison between the charge as fast as possible strategy (AFAP)
and the proposed MPC methods with a prediction horizon of 10 hours ($H=40$),
examining four key aspects: pricing dynamics, SoC of EVs, charging station
power output, and aggregated power at the transformer level. Fig.3a displays
the charging and discharging prices observed during the simulation day, with
slightly higher prices for discharging to incentivize V2G operations.
Additionally, Fig.3b illustrates the fluctuation in SoC of EVs connected to an
EVSE throughout the day, highlighting the strategies employed to maximize
profits (eMPC) or flexibility (OCMF). Fig.3c shows the power output profile of
the same EVSE, indicating that eMPC methods utilize the maximum power output
($22$ kWh), whereas OCMF typically operates around $11$ kWh. This behavior
reflects the MPC methods’ focus on maximizing flexibility.

Furthermore, in Fig. 3d, we present a comparison of the total power output
from all methods controlling 75 EVs that are connected to $30$ EVSEs over a
day. This comparison accounts for inflexible loads, PV power generation, and a
demand response event. It is evident how the AFAP strategy risks transformer
overloads, whereas the MPC methods ensure smooth operation by effectively
utilizing the transformer’s capacity. Additionally, the MPC approaches
demonstrate adaptability by reducing power usage to adhere to a demand
response event occurring at 18:00. Notably, the demand response event is known
only 15 minutes (1 step) in advance, underscoring the necessity for MPC’s
real-time control capabilities.

###  V-B Performance Analysis

In the previous section, we evaluated the performance of the proposed
approaches within a single case study. However, a comprehensive assessment is
necessary across various scenarios. Table V presents the mean and standard
deviation derived from $50$ statistical runs across a configuration comprising
$10$ bidirectional chargers linked to one transformer, around $25$ EVs per
simulation, and discharge price multiplier $m=1.2$. These case studies
included elements such as inflexible loads, PV generation, and demand response
events, thereby mirroring real-world optimization challenges. Across all
scenarios, the MPC methods employed a 10-step prediction horizon (i.e., 2.5 h,
$H=10$) to drive their decision-making processes.

TABLE V: Averages of $50$ runs with 10 EVSEs, 25 EVs, 1 transformer, and
varying EV behavior.

Algorithm |  | Profits
---
(€)
| Energy
---
Charged/ Discharged
(kWh)
| $\sum Q^{\text{lost}}$
---
($\times 10^{-4}$)
| $\sum d^{\textit{cal}}$
---
($\times 10^{-4}$)
| $\sum d^{\textit{cyc}}$
---
($\times 10^{-4}$)
AFAP |  $-47.6$ ±$8.4$ |  $227$ ±$38$ / - |  $12.4$ ±$1.6$ |  $3.5$ ±$0.2$ |  $8.8$ ±$1.5$
OCMF G2V |  $-48.0$ ±$8.3$ |  $227$ ±$38$ / - |  $12.8$ ±$1.6$ |  $3.3$ ±$0.2$ |  $9.5$ ±$1.5$
OCMF V2G |  $11.9$ ±$8.8$ |  $927$ ±$73$ / $706$ ±$63$ |  $36.8$ ±$2.7$ |  $3.1$ ±$0.2$ |  $33.7$ ±$2.5$
eMPC G2V |  $-43.9$ ±$7.6$ |  $227$ ±$38$ / - |  $13.3$ ±$1.7$ |  $3.3$ ±$0.2$ |  $10.0$ ±$1.6$
eMPC V2G |  $50.8$ ±$10.3$ |  $1390$ ±$119$ / $1172$ ±$107$ |  $57.1$ ±$4.8$ |  $3.2$ ±$0.2$ |  $53.9$ ±$4.5$

Table V illustrates that across all G2V approaches (AFAP, OCMF G2V, and eMPC
G2V), the average energy consumption remains consistent at $227$ ±$38$ kWh.
However, OCMF G2V stands out for its ability to consistently maximize
flexibility, ensuring swift responses to demand response events. On the other
hand, eMPC G2V excels in cost optimization, reducing charging expenses from
$48$ to $43.9$€. While the direct cost savings of eMPC G2V compared to OCMF
G2V are only around $4$€, the significance lies in OCMF G2V’s capacity to
provide flexibility, underscoring its critical importance. Meanwhile, when V2G
is utilized both OCMF V2G and eMPC V2G, end up with a profit of around $11.9$
and $50.8$€, respectively. This shows that when V2G is utilized it is possible
to support the grid and make significant profits.

Figure 4: Average capacity loss per EV because of battery degradation.

Moreover, it is crucial to evaluate the impact of these methods on total
battery degradation. Table V provides insights into the total battery capacity
lost ($Q^{\textit{lost}}$) during the simulation for all EVs, split into
calendar aging ($d^{\textit{cal}}$) and cyclic degradation
($d^{\textit{cyc}}$) components, while Fig. 4 depicts histograms of the
percentage ($10^{-4}\times 100\%$) average capacity lost per EV. Remarkably,
V2G methods tend to mitigate calendar aging due to their maintenance of a
lower average SoC during the charging phase. However, this advantage is
counterbalanced by substantially higher cyclic degradation values (up to
$45\times 10^{-4}$ higher), stemming from their utilization of EV batteries
for both charging and discharging, totaling $2562$ kWh—$2335$ kWh more than
G2V methods. Conversely, all G2V methods display comparable battery
degradation ($\approx 13\times 10^{-4}$), with OCMF G2V offering maximal
flexibility and eMPC G2V focusing on minimizing charging costs. Overall, these
findings underscore the capabilities of the proposed algorithms and their
intricate trade-offs among profits, flexibility, and battery degradation.

###  V-C Cost Sensitivity Analysis

In the previous experiments, we observed how the V2G methods can be profitable
when the discharge price multiplier is set to $m=1.2$; however, it is
important to conduct a sensitivity analysis on alternative price scenarios. In
each scenario, the price is defined as:

$\pi^{d}_{k}=m\cdot\pi^{c}_{k},$ (21)

for $k=1,\dots,T$. Fig.5 illustrates the probability density functions of the
total costs and profits for $50$ statistical runs for each price scenario. In
every scenario, the G2V and AFAP methods have the same distribution since they
are not affected by the discharging prices. As observed in Fig.5, the eMPC_V2G
strategy always provides the highest cost reductions ($m={0.8,0.9}$) and the
highest profits ($m={1,1.1,1.2}$). OCMF_V2G is also profitable in all cases
except $m=0.8$, showcasing on average around $10$€ higher charging costs; this
happens because the cost of providing flexibility was less than discharging,
hence leading to this behavior. Notice that in this cost/profit analysis of
the OCMF strategy, the payments for flexibility have not been included.
Therefore, it can be inferred that this strategy would significantly increase
its profits when the flexibility offered and provided is considered.

Figure 5: Comparison of EV-user charging costs across different discharge
price multipliers ($m$). Note that these figures solely reflect EV-user
payments. However, it’s important to acknowledge that potential profits from
flexibility provision are not included here, which could significantly boost
overall profits.

###  V-D Computational Cost

The proposed MPC methods tackle real-time EV smart-charging challenges
efficiently. However, it’s noteworthy that as the number of decision variables
and constraints increases, the execution time of these approaches increases
too. To evaluate the performance of each method, we conducted an assessment by
measuring their execution times using high-performance hardware setups.
Specifically, we utilized the “AMD RYZEN 7 5700X 8-Core” processor paired with
32GB of RAM, and employed the Gurobi solver. Fig. 6 illustrates the comparison
of average per-step execution times for various case studies, with EVSEs
ranging from 5 to 60, all connected to three transformers. The execution time
mentioned includes the time needed for creating the matrices, creating the
model with the constraints, and then solving it having the MIP gap 222Notice
that, by using a higher MIP Gap can significantly reduce the execution time,
but at the cost of a solution quality. parameter set to 0. Initially, we can
observe in Fig. 6a, the slowly increasing step time when using 10-step
prediction horizons. On the other hand, in Fig. 6b, we see a larger growth in
per-step execution time with the 30-step prediction horizon. As expected, OCMF
V2G showcases the largest increase in execution time in both cases as it has
the most decision variables compared to the other approaches. Notably, in both
scenarios, the execution time for G2V methods scales at a slower rate,
requiring only half the time compared to V2G methods. Moreover, notice that in
the worst-case scenario, the execution time of the MPC algorithm is less than
$1.5\%$ of the time step of the control strategy, leaving room to manage
larger pools of chargers in real time.

(a) $h=10$

(b) $h=30$

Figure 6: Average step execution time for varying control horizons and EVSEs.

##  VI Conclusions

In this paper, we introduced four variations of MPC tailored to address real-
time EV G2V and V2G smart charging, while accounting for transformer loads and
demand response events. Through a comprehensive evaluation across diverse case
studies, we examine the effectiveness of our methods. Furthermore, we analyze
the impact of these strategies on EV battery degradation, highlighting the
intricate balance between profitability, operational flexibility, and battery
degradation.

## References

  * [1] K. M. Tan, V. K. Ramachandaramurthy, and J. Y. Yong, “Integration of electric vehicles in smart grid: A review on vehicle to grid technologies and optimization techniques,” _Renewable & Sustainable Energy Reviews_, vol. 53, pp. 720–732, 2016.
  * [2] A. Dubey and S. Santoso, “Electric vehicle charging on residential distribution systems: Impacts and mitigations,” _IEEE Access_ , vol. 3, pp. 1871–1893, 2015.
  * [3] L. Shi, T. Lv, and Y. Wang, “Vehicle-to-grid service development logic and management formulation,” _Journal of Modern Power Systems and Clean Energy_ , vol. 7, no. 4, pp. 935–947, 2019.
  * [4] A. Allehyani, A. Ajabnoor, and M. Alharbi, “Chapter 14 - demand response scheme for electric vehicles charging in smart power systems with 100% of renewable energy,” in _Power Systems Operation with 100% Renewable Energy Sources_ , S. Chenniappan, S. Padmanaban, and S. Palanisamy, Eds. Elsevier, 2024, pp. 247–268.
  * [5] S. H. Shamsdin, A. Seifi, M. Rostami-Shahrbabaki, and B. Rahrovi, “Plug-in electric vehicle optimization and management charging in a smart parking lot,” _2019 IEEE Texas Power and Energy Conference, TPEC 2019_ , 3 2019.
  * [6] K. Schulte and J. Haubrock, “Linear programming to increase the directly used photovoltaic power for charging several electric vehicles,” _2021 IEEE Madrid PowerTech, PowerTech 2021 - Conference Proceedings_ , 6 2021.
  * [7] I. Sengor, O. Erdinc, B. Yener, A. Tascikaraoglu, and J. P. Catalao, “Optimal energy management of EV parking lots under peak load reduction based DR programs considering uncertainty,” _IEEE Transactions on Sustainable Energy_ , vol. 10, no. 3, pp. 1034–1043, 7 2019.
  * [8] P. Meenakumar, M. Aunedi, and G. Strbac, “Optimal Business Case for Provision of Grid Services through EVs with V2G Capabilities,” _2020 15th International Conference on Ecological Vehicles and Renewable Energies, EVER 2020_ , 9 2020.
  * [9] F. Giordano, C. Diaz-Londono, and G. Gruosso, “Comprehensive aggregator methodology for evs in v2g operations and electricity markets,” _IEEE Open Journal of Vehicular Technology_ , vol. 4, pp. 809–819, 2023.
  * [10] X. Jiang, S. Wang, Q. Zhao, and X. Wang, “Optimized dispatching method for flexibility improvement of ac-mtdc distribution systems considering aggregated electric vehicles,” _Journal of Modern Power Systems and Clean Energy_ , vol. 11, no. 6, pp. 1857–1867, 2023.
  * [11] H. Patil and V. N. Kalkhambkar, “Grid integration of electric vehicles for economic benefits: A review,” _Journal of Modern Power Systems and Clean Energy_ , vol. 9, no. 1, pp. 13–26, 2021.
  * [12] J. S. Giraldo, N. B. Arias, P. P. Vergara, M. Vlasiou, G. Hoogsteen, and J. L. Hurink, “Estimating risk-aware flexibility areas for electric vehicle charging pools via ac stochastic optimal power flow,” _Journal of Modern Power Systems and Clean Energy_ , vol. 11, no. 4, pp. 1247–1256, 2023.
  * [13] C. Diaz-Londono, G. Fambri, P. Maffezzoni, and G. Gruosso, “Enhanced ev charging algorithm considering data-driven workplace chargers categorization with multiple vehicle types,” _eTransportation_ , vol. 20, p. 100326, 2024.
  * [14] M. Tahmasebi, A. Ghadiri, M. Haghifam, and S. Miri-Larimi, “Mpc-based approach for online coordination of evs considering ev usage uncertainty,” _International Journal of Electrical Power & Energy Systems_, vol. 130, p. 106931, 2021.
  * [15] Z. Ji, X. Huang, C. Xu, and H. Sun, “Accelerated model predictive control for electric vehicle integrated microgrid energy management: A hybrid robust and stochastic approach,” _Energies_ , vol. 9, no. 11, 2016.
  * [16] Y. Zhou, A. Ravey, and M.-C. Péra, “Real-time cost-minimization power-allocating strategy via model predictive control for fuel cell hybrid electric vehicles,” _Energy Conversion and Management_ , vol. 229, p. 113721, 2021.
  * [17] E. Cording and J. Thakur, “Fleetrl: Realistic reinforcement learning environments for commercial vehicle fleets,” _SoftwareX_ , vol. 26, p. 101671, May 2024.
  * [18] G. Karatzinis, C. Korkas, M. Terzopoulos, C. Tsaknakis, A. Stefanopoulou, I. Michailidis, and E. Kosmatopoulos, “Chargym: An EV Charging Station Model for Controller Benchmarking,” in _Artificial Intelligence Applications and Innovations_. Springer International Publishing, 2022, pp. 241–252.
  * [19] C. Yeh, V. Li, R. Datta, J. Arroyo, N. Christianson, C. Zhang, Y. Chen, M. M. Hosseini, A. Golmohammadi, Y. Shi, Y. Yue, and A. Wierman, “SustainGym: Reinforcement Learning Environments for Sustainable Energy Systems,” Nov. 2023.
  * [20] T. Morstyn, K. A. Collett, A. Vijay, M. Deakin, S. Wheeler, S. M. Bhagavathy, F. Fele, and M. D. McCulloch, “Open: An open-source platform for developing smart local energy system applications,” _Applied Energy_ , vol. 275, p. 115397, 2020.
  * [21] S. Orfanoudakis, C. Diaz-Londono, Y. E. Yılmaz, P. Palensky, and P. P. Vergara, “Ev2gym: A flexible v2g simulator for ev smart charging research and benchmarking,” _arXiv Preprints_ , 2024.
  * [22] “Elaadnl open datasets for electric mobility research — update april 2020,” https://platform.elaad.io/analyses/ElaadNL_opendata.php, accessed: [23/11/2023].
  * [23] “Pecan street data portal,” https://www.pecanstreet.org/dataport/.
  * [24] S. Pfenninger and I. Staffell, “Long-term patterns of european PV output using 30 years of validated hourly reanalysis and satellite data,” _Energy_ , vol. 114, pp. 1251–1265, 2016.
  * [25] C. F. Lee, K. Bjurek, V. Hagman, Y. Li, and C. Zou, “Vehicle-to-grid optimization considering battery aging,” _22nd IFAC World Congress_ , vol. 56, no. 2, pp. 6624–6629, 2023.
  * [26] C. Diaz-Londono, L. Colangelo, F. Ruiz, D. Patino, C. Novara, and G. Chicco, “Optimal strategy to exploit the flexibility of an electric vehicle charging station,” _Energies_ , vol. 12, no. 20, 2019.
  * [27] “SAE Electric Vehicle and Plug in Hybrid Electric Vehicle Conductive Charge Coupler J1772 201710,” SAE International, Standard, Oct. 2017.
  * [28] “Entso-e transparency platform,” https://transparency.entsoe.eu/.