# Optimal Pricing Strategies for Charging Stations in the Frequency Containment Reserves Market for Vehicle-to-Grid Integration

Guillaume Gasnier, Carlos Canudas de Wit

► To cite this version:

Guillaume Gasnier, Carlos Canudas de Wit. Optimal Pricing Strategies for Charging Stations in the Frequency Containment Reserves Market for Vehicle-to-Grid Integration. ECC 2024 - 22nd European Control Conference, KTH Royal Institute of Technology; European control association, Jun 2024, Stockholm, Sweden. pp.1-8. hal-04538192

HAL Id: hal-04538192

https://hal.science/hal-04538192

Submitted on 9 Apr 2024

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_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Optimal Pricing Strategies for Charging Stations in the Frequency Containment Reserves Market for Vehicle-to-Grid Integration

Guillaume Gasnier, Carlos Canudas-de-Wit

**Abstract**— Electric vehicles and the electric vehicle charging station infrastructure play crucial roles in sustainable energy systems. We propose an innovative approach that utilizes aggregated electric vehicles for grid-balancing services in the auxiliary market. Our model gives electric vehicle state of charge (SoC) over time and space, considering factors like driver behavior, state of charge levels, and charging/discharging costs. This approach informs decisions about optimal charging times. Charging station operators participate in the frequency containment reserves market in collaboration with aggregators. We introduce an optimization framework which establishes pricing strategies to maximize profits for aggregators and charging station operators while minimizing charging costs for electric vehicle users. Our findings demonstrate the effectiveness of this strategy in realistic simulations, integrating electric vehicle mobility and the electricity frequency containment reserves market.

## I. INTRODUCTION

The future of electrification in transportation and use of renewable energy sources are in a transformation phase [1]. The global shift towards renewable energy sources introduces challenges due to their intermittent generation, requiring new energy storage solutions to address supply-demand imbalances [2]. Electrical Vehicles (EVs), with Vehicle-to-Grid (V2G) technology and rapid-response capabilities, can play a pivotal role in grid management [3]. This topics has gained attention recently. In [4], authors suggest that EVs should participate in auxiliary electricity markets. The primary reserve market, also known as "Frequency Containment Reserve" (FCR) stands out as one of the most natural markets for EVs [5], [6]. Numerous studies in the literature have explored this potential. They primarily vary in their approaches to forecasting energy demand at the CSs and in the diverse optimization formulations for their involvement in electricity markets.

For instance, [7] uses aggregated EVs in fast Charging Stations (CSs) lead by a Charging Station Operator (CSO) to participate in FCR market. Historical data from the CSs is employed to forecast the vehicles' charging demands. Differences between prediction and real demands are compensated by an additional battery energy storage system located at the CSs. Their goal is to optimize their participation to the electricity market while the prices of EV charging services are kept fixed. Meeting charging demands and bidding requirements are introduced here as a

constraint in the optimization problem. In [8], the authors use statistical data-based models to predict CSs occupancy. The cost function minimize EV battery degradation and maximize the operator earns from their participation to the electricity markets. [9] employs a macroscopic mobility PDE model and EV users behavior to forecast CSs occupancy. Authors compare different CSs pricing strategies to maximize CSs benefits when selling energy to EVs users. Participation in the FCR market is set as a constraint in the optimization formulation, but explicit frequency market models are not include in the study. Vagopoulos and al. [10] use a large EV fleet statistical patterns to design suitable energy demand forecasting at the CSs. With this prediction, the aggregator objective is energy purchased cost minimization (in day-ahead and real-time market) while maximizing the revenue from ancillary market participation. In [11] historical vehicles charging profiles (including public and private CS) are used to forecast energy charging demands. The study addresses the Nordic market, where the EV aggregator bids operate within a framework that separates FCR into two markets for downward and upward regulation. The optimization problem here aims at maximizing the expected profits of EV aggregators on a day-ahead basis.

In this work, we introduce an innovative approach that leverages aggregated electric vehicle charging station to participate in the auxiliary market, enabling grid-balancing services (see Fig.1). A significant contribution of this work, distinct from prior related authors publications [12], [13], and to the other approaches mentioned previously, is the introduction of a new graph model to forecast energy demand at the CSs. The proposed model is derived

<figure><img src="image_1.png" /><figcaption>Fig. 1: Day-ahead, CSO declares capacity amount with price. FCR market reports retained capacity and price. CSO decides charging and discharging prices for EVs. Decision variables are in blue.</figcaption></figure>

<footnote>Guillaume Gasnier, and Carlos Canudas-de-Wit are with Univ. Grenoble Alpes, CNRS, Inria, Grenoble INP, GIPSA-lab, 38000 Grenoble, France (e-mail: {guillaume.gasnier, carlos.canudas-de-wit} @gipsa-lab.fr)</footnote>
# Optimal Pricing Strategies for Charging Stations in the Frequency Containment Reserves Market for Vehicle-to-Grid Integration

Guillaume Gasnier, Carlos Canudas-de-Wit

**Abstract**— Electric vehicles and the electric vehicle charging station infrastructure play crucial roles in sustainable energy systems. We propose an innovative approach that utilizes aggregated electric vehicles for grid-balancing services in the auxiliary market. Our model gives electric vehicle state of charge (SoC) over time and space, considering factors like driver behavior, state of charge levels, and charging/discharging costs. This approach informs decisions about optimal charging times. Charging station operators participate in the frequency containment reserves market in collaboration with aggregators. We introduce an optimization framework which establishes pricing strategies to maximize profits for aggregators and charging station operators while minimizing charging costs for electric vehicle users. Our findings demonstrate the effectiveness of this strategy in realistic simulations, integrating electric vehicle mobility and the electricity frequency containment reserves market.

## I. INTRODUCTION

The future of electrification in transportation and use of renewable energy sources are in a transformation phase [1]. The global shift towards renewable energy sources introduces challenges due to their intermittent generation, requiring new energy storage solutions to address supply-demand imbalances [2]. Electrical Vehicles (EVs), with Vehicle-to-Grid (V2G) technology and rapid-response capabilities, can play a pivotal role in grid management [3]. This topics has gained attention recently. In [4], authors suggest that EVs should participate in auxiliary electricity markets. The primary reserve market, also known as "Frequency Containment Reserve" (FCR) stands out as one of the most natural markets for EVs [5], [6]. Numerous studies in the literature have explored this potential. They primarily vary in their approaches to forecasting energy demand at the CSs and in the diverse optimization formulations for their involvement in electricity markets.

For instance, [7] uses aggregated EVs in fast Charging Stations (CSs) lead by a Charging Station Operator (CSO) to participate in FCR market. Historical data from the CSs is employed to forecast the vehicles' charging demands. Differences between prediction and real demands are compensated by an additional battery energy storage system located at the CSs. Their goal is to optimize their participation to the electricity market while the prices of EV charging services are kept fixed. Meeting charging demands and bidding requirements are introduced here as a

constraint in the optimization problem. In [8], the authors use statistical data-based models to predict CSs occupancy. The cost function minimize EV battery degradation and maximize the operator earns from their participation to the electricity markets. [9] employs a macroscopic mobility PDE model and EV users behavior to forecast CSs occupancy. Authors compare different CSs pricing strategies to maximize CSs benefits when selling energy to EVs users. Participation in the FCR market is set as a constraint in the optimization formulation, but explicit frequency market models are not include in the study. Vagopoulos and al. [10] use a large EV fleet statistical patterns to design suitable energy demand forecasting at the CSs. With this prediction, the aggregator objective is energy purchased cost minimization (in day-ahead and real-time market) while maximizing the revenue from ancillary market participation. In [11] historical vehicles charging profiles (including public and private CS) are used to forecast energy charging demands. The study addresses the Nordic market, where the EV aggregator bids operate within a framework that separates FCR into two markets for downward and upward regulation. The optimization problem here aims at maximizing the expected profits of EV aggregators on a day-ahead basis.

In this work, we introduce an innovative approach that leverages aggregated electric vehicle charging station to participate in the auxiliary market, enabling grid-balancing services (see Fig.1). A significant contribution of this work, distinct from prior related authors publications [12], [13], and to the other approaches mentioned previously, is the introduction of a new graph model to forecast energy demand at the CSs. The proposed model is derived

<figure><img src="image_2.png" /><figcaption>Fig. 1: Day-ahead, CSO declares capacity amount with price. FCR market reports retained capacity and price. CSO decides charging and discharging prices for EVs. Decision variables are in blue.</figcaption></figure>

<footnote>Guillaume Gasnier, and Carlos Canudas-de-Wit are with Univ. Grenoble Alpes, CNRS, Inria, Grenoble INP, GIPSA-lab, 38000 Grenoble, France (e-mail: {guillaume.gasnier, carlos.canudas-de-wit} @gipsa-lab.fr)</footnote>
under principles of mass conservation and energy balance similar to our previous studies [12], [13], but incorporating fresh elements related to charging stations, including CS occupancy, average state of charge of electric vehicles at CS locations, and power exchange with the grid. This charging station model is seamlessly integrated with an electric vehicle mobility model, which takes into account various allocation ratios based on the average SoC of vehicles near the charging stations and the energy price at the charging station. Moreover, this model is connected with the frequency containment reserves market operation, enabling us to formulate a global optimization problem. Within this framework, we design new pricing strategies with the dual goals of maximizing profits for aggregators and charging station operators, while also minimizing energy charging costs for EV users. Our research findings highlight the effectiveness of this pricing strategy in achieving these objectives, as demonstrated through realistic simulations that encompass EV mobility and the electricity FCR market.

## II. AUXILIARY MARKETS

The Frequency Containment Reserve is a vital component of the ancillary service sector. This ancillary service is regulating grid frequency, safeguarding the stability of the power network. Within this domain, there are three distinct components: primary, secondary, and tertiary reserves. FCR is in the primary reserve category, which is characterized by its rapid response capability, acting in less than 15 seconds. Participation in the primary reserve market requires the ability to adjust power consumption, both upward and downward, ensuring a dynamic response to grid frequency fluctuations. The FCR market operates at a European level, featuring varying prices across individual countries, determined by the matching of supply and demand. Market resolution occurs on a day-ahead basis, segmented into six four-hour time blocks.

Throughout the remainder of the paper, we will employ the following upper index:

* M represents market.

* B represents bid.

* C represents CSO.

* D represents demand.

* S represents supply.

Fig. 1 illustrates two key time phases. In the Day ahead phase, market prices for the next day are determined. In this case the CSO is also a charging station. To participate in the FCR market, it must submit available power quantity $P^B \in \mathbb{N}$ in MW and minimum compensation price $\pi^B \in \mathbb{R}$ in €/MW for every time block. Once the FCR market settles, it returns the approved power quantity $P^M \in \mathbb{N}$ in MW and price $\pi^M \in \mathbb{R}$ in €/MW. In the Intraday phase, the CSO sets the charge prices $\pi^C \in \mathbb{R}^+$ in €/kWh. When participating in FCR, the CSO must be capable of both increasing and reducing its charging power. The CSO must also set price $\pi^C$ in a way that ensures there are always enough vehicles available to meet the grid operator's demands.

### A. FCR market settlement process

Settling the FCR market involves solving two Linear Programming (LP) problems. The first LP problem maximizes the amount of power exchanged while ensuring that the highest bid price is lower than the lowest asked price. The second determines the buying/selling price for all participants in the FCR market, ensuring an equitable outcome for all.

Let $P^S \in \mathbb{N}^{n_S}$, and $\pi^S \in \mathbb{R}^{n_S}$ represent vector of proposed supply quantities by the energy suppliers in the FCR market, and their associated prices. Where $n_S$ is the number of supply offers. Without loss of generality, we assume that the CSO makes only one offer and is ordered in the first component of vectors $P^S$, and $\pi^S$ i.e.

$$P^S = [P^B, \bar{P}^B]^T \quad (1)$$

$$\pi^S = [\pi^B, \bar{\pi}^B]^T \quad (2)$$

where $\bar{P}^B \in \mathbb{N}^{n_S-1}$, and $\bar{\pi}^B \in \mathbb{R}^{n_S-1}$ represent all other operators offers (see Fig.1). Likewise, $P^D \in \mathbb{N}^{n_D}$ and $\pi^D \in \mathbb{R}^{n_D}$ describe vectors of power demands by the transmission system operators and their respective prices. Here, $n_D$ represents the number of demand offers.

Let $y^S \in \mathbb{N}^{n_S}$ and $y^D \in \mathbb{N}^{n_D}$ represent the vectors representing the energy proportions of each retained offer. Then, the day-ahead market settlement process computes $y^S$ and $y^D$, by solving the following optimization problem for each of the 4-hours time-sequences:

$$\max_{\{y_i^D\}, \{\bar{y}_j^S\}} \left\{ \sum_{i}^{n_S} \pi_i^D y_i^D - \sum_{j}^{n_D} \pi_j^S \bar{y}_j^S \right\} \quad (3)$$

under

$$\sum_{j}^{n_S} y_j^S - \sum_{i}^{n_D} y_i^D = 0 \\ 0 \le y_i^D \le P_i^D, \quad i = 1, \dots, n_D \\ 0 \le y_j^S \le P_j^S, \quad j = 1, \dots, n_S$$

The approved power quantity for the CSO is then,

$$P^M = y_1^S \quad (4)$$

The approved price $\pi^M$ is obtained by the dual problem. Let $\nu^S \in \mathbb{R}^{n_S}$ and $\nu^D \in \mathbb{R}^{n_D}$ represent Lagrange multipliers for the unitary benefits associated with the various supply and demand offers if the market is cleared at price $\pi^M$.

$$\min_{\pi^M, \{\nu_i^D\}, \{\bar{\nu}_j^S\}} \left\{ \sum_{i}^{n_D} \nu_i^D P_i^D + \sum_{j}^{n_S} \bar{\nu}_j^S P_j^S \right\} \quad (5)$$

under

$$\pi^M - \nu_j^S \le \pi_j^S, \quad j = 1, \dots, n_S \\ -\pi^M - \nu_i^D \le -\pi_i^D, \quad i = 1, \dots, n_D \\ \nu_j^S \ge 0, \quad j = 1, \dots, n_S \\ \nu_i^D \ge 0, \quad i = 1, \dots, n_D$$

Table I, illustrates organized offers in the FCR market for a 4-hour time window. The price $\pi^M$ is determined by the variable in problem (5). Fig. 2 depicts the market resolution
under principles of mass conservation and energy balance similar to our previous studies [12], [13], but incorporating fresh elements related to charging stations, including CS occupancy, average state of charge of electric vehicles at CS locations, and power exchange with the grid. This charging station model is seamlessly integrated with an electric vehicle mobility model, which takes into account various allocation ratios based on the average SoC of vehicles near the charging stations and the energy price at the charging station. Moreover, this model is connected with the frequency containment reserves market operation, enabling us to formulate a global optimization problem. Within this framework, we design new pricing strategies with the dual goals of maximizing profits for aggregators and charging station operators, while also minimizing energy charging costs for EV users. Our research findings highlight the effectiveness of this pricing strategy in achieving these objectives, as demonstrated through realistic simulations that encompass EV mobility and the electricity FCR market.

## II. AUXILIARY MARKETS

The Frequency Containment Reserve is a vital component of the ancillary service sector. This ancillary service is regulating grid frequency, safeguarding the stability of the power network. Within this domain, there are three distinct components: primary, secondary, and tertiary reserves. FCR is in the primary reserve category, which is characterized by its rapid response capability, acting in less than 15 seconds. Participation in the primary reserve market requires the ability to adjust power consumption, both upward and downward, ensuring a dynamic response to grid frequency fluctuations. The FCR market operates at a European level, featuring varying prices across individual countries, determined by the matching of supply and demand. Market resolution occurs on a day-ahead basis, segmented into six four-hour time blocks.

Throughout the remainder of the paper, we will employ the following upper index:

* M represents market.

* B represents bid.

* C represents CSO.

* D represents demand.

* S represents supply.

Fig. 1 illustrates two key time phases. In the Day ahead phase, market prices for the next day are determined. In this case the CSO is also a charging station. To participate in the FCR market, it must submit available power quantity $P^B \in \mathbb{N}$ in MW and minimum compensation price $\pi^B \in \mathbb{R}$ in €/MW for every time block. Once the FCR market settles, it returns the approved power quantity $P^M \in \mathbb{N}$ in MW and price $\pi^M \in \mathbb{R}$ in €/MW. In the Intraday phase, the CSO sets the charge prices $\pi^C \in \mathbb{R}^+$ in €/kWh. When participating in FCR, the CSO must be capable of both increasing and reducing its charging power. The CSO must also set price $\pi^C$ in a way that ensures there are always enough vehicles available to meet the grid operator's demands.

### A. FCR market settlement process

Settling the FCR market involves solving two Linear Programming (LP) problems. The first LP problem maximizes the amount of power exchanged while ensuring that the highest bid price is lower than the lowest asked price. The second determines the buying/selling price for all participants in the FCR market, ensuring an equitable outcome for all.

Let $P^S \in \mathbb{N}^{n_S}$, and $\pi^S \in \mathbb{R}^{n_S}$ represent vector of proposed supply quantities by the energy suppliers in the FCR market, and their associated prices. Where $n_S$ is the number of supply offers. Without loss of generality, we assume that the CSO makes only one offer and is ordered in the first component of vectors $P^S$, and $\pi^S$ i.e.

$$P^S = [P^B, \bar{P}^B]^T \quad (1)$$

$$\pi^S = [\pi^B, \bar{\pi}^B]^T \quad (2)$$

where $\bar{P}^B \in \mathbb{N}^{n_S-1}$, and $\bar{\pi}^B \in \mathbb{R}^{n_S-1}$ represent all other operators offers (see Fig.1). Likewise, $P^D \in \mathbb{N}^{n_D}$ and $\pi^D \in \mathbb{R}^{n_D}$ describe vectors of power demands by the transmission system operators and their respective prices. Here, $n_D$ represents the number of demand offers.

Let $y^S \in \mathbb{N}^{n_S}$ and $y^D \in \mathbb{N}^{n_D}$ represent the vectors representing the energy proportions of each retained offer. Then, the day-ahead market settlement process computes $y^S$ and $y^D$, by solving the following optimization problem for each of the 4-hours time-sequences:

$$\max_{\{y_i^D\}, \{\bar{y}_j^S\}} \left\{ \sum_{i}^{n_S} \pi_i^D y_i^D - \sum_{j}^{n_D} \pi_j^S \bar{y}_j^S \right\} \quad (3)$$

under

$$\sum_{j}^{n_S} y_j^S - \sum_{i}^{n_D} y_i^D = 0 \\ 0 \le y_i^D \le P_i^D, \quad i = 1, \dots, n_D \\ 0 \le y_j^S \le P_j^S, \quad j = 1, \dots, n_S$$

The approved power quantity for the CSO is then,

$$P^M = y_1^S \quad (4)$$

The approved price $\pi^M$ is obtained by the dual problem. Let $\nu^S \in \mathbb{R}^{n_S}$ and $\nu^D \in \mathbb{R}^{n_D}$ represent Lagrange multipliers for the unitary benefits associated with the various supply and demand offers if the market is cleared at price $\pi^M$.

$$\min_{\pi^M, \{\nu_i^D\}, \{\bar{\nu}_j^S\}} \left\{ \sum_{i}^{n_D} \nu_i^D P_i^D + \sum_{j}^{n_S} \bar{\nu}_j^S P_j^S \right\} \quad (5)$$

under

$$\pi^M - \nu_j^S \le \pi_j^S, \quad j = 1, \dots, n_S \\ -\pi^M - \nu_i^D \le -\pi_i^D, \quad i = 1, \dots, n_D \\ \nu_j^S \ge 0, \quad j = 1, \dots, n_S \\ \nu_i^D \ge 0, \quad i = 1, \dots, n_D$$

Table I, illustrates organized offers in the FCR market for a 4-hour time window. The price $\pi^M$ is determined by the variable in problem (5). Fig. 2 depicts the market resolution
<figure><img src="image_2.png" /><figcaption>Fig. 2: FCR market price settlement based on Table I and Evolution of FCR prices during a day. In yellow, the price settled on top.</figcaption></figure>

<table><caption>TABLE I: Demand and Supply Data</caption><thead><tr><th colspan="2">Demand</th></tr></thead><tbody><tr><td>π<sup>D</sup> (€/MW)</td><td>[48,47,46,41,41,39,37,33,28,28,26,25,16,13,9,4,4,1,0]</td></tr><tr><td>P<sup>D</sup> (MW)</td><td>[31,22,36,17,1,16,38,17,22,12,22,28,16,8,13,31,23,4,27,34]</td></tr></tbody><thead><tr><th colspan="2">Supply</th></tr></thead><tbody><tr><td>π<sup>S</sup> (€/MW)</td><td>[2,5,5,8,8,9,12,13,13,15,16,17,18,20,22,29,32,42,45,46,46]</td></tr><tr><td>P<sup>S</sup> (MW)</td><td>[33,1,10,40,23,18,2,18,1,22,3,38,30,32,21,36,3,16,18,39]</td></tr></tbody></table>

process. Offers positioned before the intersection point of the demand curve and the supply curve are considered retained offers. The point where these two curves intersect also determines the price per MW. It is important to note that the values provided in this example are fictional, provided for clarity and comprehension of Fig. 2. Fig. 2 also displays the evolution of the settled price in the FCR market for a day across 6 time slots.

### III. EVS MOBILITY AND STATE-OF-CHARGE MODELS

<table><caption>TABLE II: Notation summary of the model.</caption><thead><tr><th>Symbol</th><th>Description</th><th>Domain</th><th>Unit</th></tr></thead><tbody><tr><td>N, N<sub>1</sub>, N<sub>2</sub></td><td>Number of EVs at the CS, nodes 1 and 2</td><td>R<sup>+</sup></td><td>veh</td></tr><tr><td>N&#775;</td><td>CS maximum EVs number</td><td>R<sup>+</sup></td><td>veh</td></tr><tr><td>&epsilon;, &epsilon;<sub>1</sub>, &epsilon;<sub>2</sub></td><td>SoC at the CS, nodes 1 and 2</td><td>[0, 1]</td><td>-</td></tr><tr><td>&epsilon;<sub>l</sub></td><td>SoC EVs start leaving CS</td><td>[0, 1]</td><td>-</td></tr><tr><td>&beta;</td><td>Split ratio</td><td>[0, 1]</td><td>-</td></tr><tr><td>&sigma;, &sigma;<sub>1</sub>, &sigma;<sub>2</sub></td><td>Gating function for CS and nodes 1 and 2</td><td>[0, 1]</td><td>-</td></tr><tr><td>&phi;<sub>1,2</sub>, &phi;<sub>2,1</sub></td><td>Flow from nodes 1 to 2 and form 2 to 1,</td><td>R<sup>+</sup></td><td>veh/h</td></tr><tr><td>&phi;<sub>in</sub>, &phi;<sub>out</sub></td><td>Flows entering CS and exiting CS</td><td></td><td></td></tr><tr><td>&phi;&#775;<sub>CS</sub>, &phi;&#775;<sub>1</sub>, &phi;&#775;<sub>2</sub></td><td>Flow maximum CS and nodes 1 and 2</td><td>R<sup>+</sup></td><td>veh/h</td></tr><tr><td>c<sub>i</sub></td><td>Constants</td><td>R</td><td>-</td></tr><tr><td>D</td><td>Demand function</td><td>R<sup>+</sup></td><td>veh/h</td></tr><tr><td>S</td><td>Supply function</td><td>R<sup>+</sup></td><td>veh/h</td></tr><tr><td>&Delta;<sub>1</sub>, &Delta;<sub>2</sub></td><td>Travel energy loss on portion 1 and 2</td><td>[0, 1]</td><td>-</td></tr><tr><td>P<sub>in</sub>, P<sub>out</sub></td><td>Entering/exiting power</td><td>R<sup>+</sup></td><td>kW</td></tr><tr><td>P<sub>CS</sub></td><td>Maximum CS charging power</td><td>R<sup>+</sup></td><td>kW</td></tr><tr><td>P&#775;</td><td>CS charging power</td><td>R<sup>+</sup></td><td>kW</td></tr><tr><td>&Delta;P</td><td>Power regulation</td><td>R</td><td>kW</td></tr></tbody></table>

The studied system, illustrated in Fig. 3, consists of a single route connecting two nodes, featuring road links in both directions. A public charging station is positioned along this route. The flow of EVs traveling on this road is divided to access the charging station, based on factors such as the EVs’ SoC and the prevailing charging/discharging prices. In the model used, vehicles at the charging station are interconnected. They can both charge and discharge. Once the EVs have completed their charging, the outflow from the charging station returns to the relevant node. Finally, and

<figure><img src="image_3.png" /><figcaption>Fig. 3: Studied system mobility and energy visualisation. Yellow circles represent nodes, while green circle symbolizes the dynamics of the charging station.</figcaption></figure>

without loss of generality, EVs return to their origin node to complete the journey.

#### A. Mobility model

The aggregated mobility model used is based on a set of coupled conservation Ordinary Differential Equations (ODEs) for all time $t$. It can be easily generalized and validated for a large number of nodes and CSs. Time is implicit in all the following equations of number of vehicles and SoC, $N = N(t)$ and $\epsilon = \epsilon(t)$.

The quantity of EVs at the CS, node 1 and node 2 at any given time, denoted as $N$, $N_1$ and $N_2$, is defined by system $\Sigma_N$,

$$ \Sigma_N : \quad \dot{N} = \varphi_{in} - \varphi_{out} \quad (6) $$

$$ \dot{N}_1 = \varphi_{2,1} - \varphi_{1,2} - \varphi_{in} \quad (7) $$

$$ \dot{N}_2 = \varphi_{1,2} + \varphi_{out} - \varphi_{2,1} \quad (8) $$

Here, $\varphi_{j,i}$ represents the flow of EVs from node $j$ to node $i$. $\varphi_{in}$ and $\varphi_{out}$ are flows entering and exiting the CS. It is important to note that vehicles leaving the CS directly merge with the vehicles at node 2. Entering and exiting CS flows are defined as follows.

$$ \varphi_{in} = \min\{\beta D_1, S\} \quad (9) $$

$$ \varphi_{out} = \min\{D, S_2\} = D \quad (10) $$

$$ \varphi_{1,2} = \min\{(1 - \beta)D_1, S_2\} = (1 - \beta)D_1 \quad (11) $$

$$ \varphi_{2,1} = \min\{D_2, S_1\} = D_2 \quad (12) $$

The demand functions $D$, $D_1$, and $D_2$ describe the flow of EVs that would like to leave, while the supply functions $S$, $S_1$, and $S_2$ represent the inflows that can be allowed to enter. The split ratio $\beta$ represents the proportion of vehicles departing from node 1 and desiring to charge. For the sake of simplicity, and except for the charging station node, we do not consider congestion propagation in the origin/destination nodes. The underlying assumption is that all demand can be fully served in the nodes one and two. As a consequence, at the exception of equation (9), the expression of (10),(11) and (12) simplifies as described above, with:
<figure><img src="image_3.png" /><figcaption>Fig. 2: FCR market price settlement based on Table I and Evolution of FCR prices during a day. In yellow, the price settled on top.</figcaption></figure>

<table><caption>TABLE I: Demand and Supply Data</caption><thead><tr><th colspan="2">Demand</th></tr></thead><tbody><tr><td>π<sup>D</sup> (€/MW)</td><td>[48,47,46,41,41,39,37,33,28,28,26,25,16,13,9,4,4,1,0]</td></tr><tr><td>P<sup>D</sup> (MW)</td><td>[31,22,36,17,1,16,38,17,22,12,22,28,16,8,13,31,23,4,27,34]</td></tr></tbody><thead><tr><th colspan="2">Supply</th></tr></thead><tbody><tr><td>π<sup>S</sup> (€/MW)</td><td>[2,5,5,8,8,9,12,13,13,15,16,17,18,20,22,29,32,42,45,46,46]</td></tr><tr><td>P<sup>S</sup> (MW)</td><td>[33,1,10,40,23,18,2,18,1,22,3,38,30,32,21,36,3,16,18,39]</td></tr></tbody></table>

process. Offers positioned before the intersection point of the demand curve and the supply curve are considered retained offers. The point where these two curves intersect also determines the price per MW. It is important to note that the values provided in this example are fictional, provided for clarity and comprehension of Fig. 2. Fig. 2 also displays the evolution of the settled price in the FCR market for a day across 6 time slots.

### III. EVS MOBILITY AND STATE-OF-CHARGE MODELS

<table><caption>TABLE II: Notation summary of the model.</caption><thead><tr><th>Symbol</th><th>Description</th><th>Domain</th><th>Unit</th></tr></thead><tbody><tr><td>N, N<sub>1</sub>, N<sub>2</sub></td><td>Number of EVs at the CS, nodes 1 and 2</td><td>R<sup>+</sup></td><td>veh</td></tr><tr><td>N&#775;</td><td>CS maximum EVs number</td><td>R<sup>+</sup></td><td>veh</td></tr><tr><td>&epsilon;, &epsilon;<sub>1</sub>, &epsilon;<sub>2</sub></td><td>SoC at the CS, nodes 1 and 2</td><td>[0, 1]</td><td>-</td></tr><tr><td>&epsilon;<sub>l</sub></td><td>SoC EVs start leaving CS</td><td>[0, 1]</td><td>-</td></tr><tr><td>&beta;</td><td>Split ratio</td><td>[0, 1]</td><td>-</td></tr><tr><td>&sigma;, &sigma;<sub>1</sub>, &sigma;<sub>2</sub></td><td>Gating function for CS and nodes 1 and 2</td><td>[0, 1]</td><td>-</td></tr><tr><td>&phi;<sub>1,2</sub>, &phi;<sub>2,1</sub></td><td>Flow from nodes 1 to 2 and form 2 to 1,</td><td>R<sup>+</sup></td><td>veh/h</td></tr><tr><td>&phi;<sub>in</sub>, &phi;<sub>out</sub></td><td>Flows entering CS and exiting CS</td><td></td><td></td></tr><tr><td>&phi;&#775;<sub>CS</sub>, &phi;&#775;<sub>1</sub>, &phi;&#775;<sub>2</sub></td><td>Flow maximum CS and nodes 1 and 2</td><td>R<sup>+</sup></td><td>veh/h</td></tr><tr><td>c<sub>i</sub></td><td>Constants</td><td>R</td><td>-</td></tr><tr><td>D</td><td>Demand function</td><td>R<sup>+</sup></td><td>veh/h</td></tr><tr><td>S</td><td>Supply function</td><td>R<sup>+</sup></td><td>veh/h</td></tr><tr><td>&Delta;<sub>1</sub>, &Delta;<sub>2</sub></td><td>Travel energy loss on portion 1 and 2</td><td>[0, 1]</td><td>-</td></tr><tr><td>P<sub>in</sub>, P<sub>out</sub></td><td>Entering/exiting power</td><td>R<sup>+</sup></td><td>kW</td></tr><tr><td>P<sub>CS</sub></td><td>Maximum CS charging power</td><td>R<sup>+</sup></td><td>kW</td></tr><tr><td>P&#775;</td><td>CS charging power</td><td>R<sup>+</sup></td><td>kW</td></tr><tr><td>&Delta;P</td><td>Power regulation</td><td>R</td><td>kW</td></tr></tbody></table>

The studied system, illustrated in Fig. 3, consists of a single route connecting two nodes, featuring road links in both directions. A public charging station is positioned along this route. The flow of EVs traveling on this road is divided to access the charging station, based on factors such as the EVs’ SoC and the prevailing charging/discharging prices. In the model used, vehicles at the charging station are interconnected. They can both charge and discharge. Once the EVs have completed their charging, the outflow from the charging station returns to the relevant node. Finally, and

<figure><img src="image_4.png" /><figcaption>Fig. 3: Studied system mobility and energy visualisation. Yellow circles represent nodes, while green circle symbolizes the dynamics of the charging station.</figcaption></figure>

without loss of generality, EVs return to their origin node to complete the journey.

#### A. Mobility model

The aggregated mobility model used is based on a set of coupled conservation Ordinary Differential Equations (ODEs) for all time $t$. It can be easily generalized and validated for a large number of nodes and CSs. Time is implicit in all the following equations of number of vehicles and SoC, $N = N(t)$ and $\epsilon = \epsilon(t)$.

The quantity of EVs at the CS, node 1 and node 2 at any given time, denoted as $N$, $N_1$ and $N_2$, is defined by system $\Sigma_N$,

$$ \Sigma_N: \left\{ \begin{aligned} \dot{N} &= \varphi_{in} - \varphi_{out} \\ \dot{N}_1 &= \varphi_{2,1} - \varphi_{1,2} - \varphi_{in} \\ \dot{N}_2 &= \varphi_{1,2} + \varphi_{out} - \varphi_{2,1} \end{aligned} \right. \quad (6) \quad (7) \quad (8) $$

Here, $\varphi_{j,i}$ represents the flow of EVs from node $j$ to node $i$. $\varphi_{in}$ and $\varphi_{out}$ are flows entering and exiting the CS. It is important to note that vehicles leaving the CS directly merge with the vehicles at node 2. Entering and exiting CS flows are defined as follows.

$$ \varphi_{in} = \min \{\beta D_1, S\} \quad (9) $$

$$ \varphi_{out} = \min \{D, S_2\} = D \quad (10) $$

$$ \varphi_{1,2} = \min \{(1 - \beta)D_1, S_2\} = (1 - \beta)D_1 \quad (11) $$

$$ \varphi_{2,1} = \min \{D_2, S_1\} = D_2 \quad (12) $$

The demand functions $D$, $D_1$, and $D_2$ describe the flow of EVs that would like to leave, while the supply functions $S$, $S_1$, and $S_2$ represent the inflows that can be allowed to enter. The split ratio $\beta$ represents the proportion of vehicles departing from node 1 and desiring to charge. For the sake of simplicity, and except for the charging station node, we do not consider congestion propagation in the origin/destination nodes. The underlying assumption is that all demand can be fully served in the nodes one and two. As a consequence, at the exception of equation (9), the expression of (10),(11) and (12) simplifies as described above, with:
<figure><img src="image_4.png" /><figcaption>Fig. 4: An example of the splitting ratio function as a function of the state of charge for different charging station prices $\pi^C$, $c_1 = 0.83$, $c_2 = 1.3$ and $c_3 = 0.06$.</figcaption></figure>

$$S = \min\{\omega(\bar{N} - N), \bar{\varphi}_{CS}\} \quad (13)$$

$$D = \sigma(\varepsilon) \min\{v_c N, \bar{\varphi}_{CS}\} \quad (14)$$

$$D_1 = \sigma_1(t) \min\{v_1 N_1, \bar{\varphi}_1\} \quad (15)$$

$$D_2 = \sigma_2(t) \min\{v_2 N_2, \bar{\varphi}_2\} \quad (16)$$

where $\bar{N}$ is the maximum CS capacity, $\bar{\varphi}_{CS}$ the maximum inflow/outflow (we assume they are equal) to enter or to leave the CS, and $\omega$ the "speed" of filling of the CS. $\sigma(\varepsilon) \in [0, 1]$ is a gating function depending on the average charge level $\varepsilon$ of all vehicles parking at the CS. We propose the following function

$$\sigma(\varepsilon) = \begin{cases} 0, & \varepsilon < \varepsilon_l \\ \frac{\varepsilon - \varepsilon_l}{1 - \varepsilon_l}, & \varepsilon \ge \varepsilon_l \end{cases} \quad (17)$$

Our hypothesis allows vehicles to leave (linearly) only after the SoC reaches the average value of $\varepsilon_l < 1$. The constant $v_c > 0$ defines the "charging speed" depending on the average power of the charging stations. For nodes 1 and 2, $v_1$ and $v_2$ define the speeds at which vehicles leave their respective nodes, and $\varphi_1$ and $\varphi_2$ represent the maximum exit flows of nodes 1 and 2, respectively. Finally, $\sigma_1(t) \in [0, 1]$, and $\sigma_2(t) \in [0, 1]$ are the time-depending gating functions as defined in [12]. They provide operational time profiles during the journey for the considered case. The last parameter is the split ratio $\beta$ that defines the EVs flow proportion that want to charge as defined in [9]. We assume that this utility function will depend on both: the state of charge $\varepsilon_1$, and the charging station price $\pi^C$.

$$\beta(\varepsilon_1, \pi^C) = 1 - \left(1 + e^{-\frac{\varepsilon_1 - c_1 + c_2 \pi^C}{c_3}}\right)^{-1} \quad (18)$$

where $c_i$ are constants. $c_1 > 0$ allows to change the position of the sigmoid's inflection (decaying) point. $c_2 > 0$ weights the influence of the variation in $\pi^C$ on the inflection point, and $c_3 > 0$ tunes the sigmoid's slope.

## B. Energy model

Let $E$, $E_1$ and $E_2$ denote the aggregated energy in the CS and in each node, respectively, then

$$E = c\varepsilon N \quad (19)$$

$$E_1 = c\varepsilon_1 N_1 \quad (20)$$

$$E_2 = c\varepsilon_2 N_2 \quad (21)$$

where $\varepsilon, \varepsilon_1, \varepsilon_2 \in [0, 1]$ describe the state of charge at each node, and $c$ is the average battery capacity of vehicles. Now from energy balance at each node we have:

$$\dot{E} = P_{in} - P_{out} + \tilde{P} \quad (22)$$

$$\dot{E}_1 = P_{in,1} - P_{out,1} \quad (23)$$

$$\dot{E}_2 = P_{in,2} - P_{out,2} \quad (24)$$

The power vehicle flows (with units kW·vehicles) are defined as the product of the vehicle flows [vehicles/hr], the state of charge at the inputs/outputs of each node, and the mean battery capacity [kWh].

$$P_{in} = c\varepsilon_{in}\varphi_{in} = c(\varepsilon_1 - \Delta_1)\varphi_{in} \quad (25)$$

$$P_{out} = c\varphi_{out} \quad (26)$$

$$P_{in,1} = c(\varepsilon_2 - \Delta_1 - \Delta_2)\varphi_{1,1} \quad (27)$$

$$P_{out,1} = c\varepsilon_1\varphi_{1,2} \quad (28)$$

$$P_{in,2} = c((\varepsilon - \Delta_2)\varphi_{out} + \varphi_{1,2}(\varepsilon_1 - \Delta_1 - \Delta_2)) \quad (29)$$

$$P_{out,2} = c\varepsilon_2\varphi_{2,1} \quad (30)$$

where $\Delta_1$ and $\Delta_2$ represent the traveling losses between nodes (see Fig. 3). $\tilde{P}$ is the injected/extracted power Kw from the grid at the CS. It is defined as follows

$$\tilde{P} = \begin{cases} 0, & \varepsilon = 1 \\ P_{CS}N + (\Delta P - P^M) & \varepsilon < 1 \end{cases} \quad (31)$$

The first terms $P_{CS}N$ indicate the "nominal" power injected per charge station point, with $P_{CS}$ being the average power per charging station point. The terms within the parenthesis represent the difference between the approved power $P^M$ as settled in the day-ahead and intraday market, and $\Delta P$, representing the power that the Transmission System Operator (TSO) requests the CSO as a consequence of the mismatch between the power supply and the load demand. By definition, $\Delta P$ falls within the range of $[-P^M, P^M]$ and changes every 15 minutes. For the purpose of this study, we assume that $\Delta P$ is a random variable with $|\Delta P| \le P^M$.

Finally, to derive the time variation of the state of charge equations at the CS (a similar procedure can be followed for the other nodes), we first take the time derivatives of $E$,

$$\dot{E} = c(\dot{N}\varepsilon + N\dot{\varepsilon}) \quad (32)$$

then, we insert (22), and (6) in the above equation, yielding

$$(\varphi_{in} - \varphi_{out})\varepsilon + \dot{\varepsilon}N = (\varepsilon_1 - \Delta_1)\varphi_{in} - \varepsilon\varphi_{out} + \frac{\tilde{P}}{c} \quad (33)$$

from which we get

$$\dot{\varepsilon} = \frac{1}{N} \left[ (-\varepsilon + \varepsilon_1 - \Delta_1)\varphi_{in} + \frac{\tilde{P}}{c} \right] \quad (34)$$

$$\dot{\varepsilon}_1 = \frac{1}{N_1}[-\varepsilon_1 + \varepsilon_2 - \Delta_1 - \Delta_2]\varphi_{2,1} \quad (35)$$

$$\dot{\varepsilon}_2 = \frac{1}{N_2}[(\varepsilon - \varepsilon_2 - \Delta_2)\varphi_{out} + (\varepsilon_1 - \varepsilon_2 - \Delta_1 - \Delta_2)\varphi_{1,2}] \quad (36)$$

where (35) and (36) are obtained following the same procedure that (34).

## IV. MODEL INSTANTATION

In this section, we assemble the full model and provide detailed explanations of how all the components depicted in Fig. 1 are interconnected.

### A. mobility and SoC model

We rewrite the mobility and SoC model in a compact form, by defining $x \in \mathbb{R}^6$ as

$$x = [N, N_1, N_2, \varepsilon, \varepsilon_1, \varepsilon_2]^T \quad (37)$$

and

$$\dot{x} = \begin{bmatrix} f_N(x, \pi^C, t) \\ f_\varepsilon(x, \pi^C, P^M, \Delta P, t) \end{bmatrix} = f(x, \pi^C, P^M, \Delta P, t) \quad (38)$$
<figure><img src="image_5.png" /><figcaption>Fig. 4: An example of the splitting ratio function as a function of the state of charge for different charging station prices $\pi^C$, $c_1 = 0.83$, $c_2 = 1.3$ and $c_3 = 0.06$.</figcaption></figure>

$$S = \min\{\omega(\bar{N} - N), \bar{\varphi}_{CS}\} \quad (13)$$

$$D = \sigma(\varepsilon) \min\{v_c N, \bar{\varphi}_{CS}\} \quad (14)$$

$$D_1 = \sigma_1(t) \min\{v_1 N_1, \bar{\varphi}_1\} \quad (15)$$

$$D_2 = \sigma_2(t) \min\{v_2 N_2, \bar{\varphi}_2\} \quad (16)$$

where $\bar{N}$ is the maximum CS capacity, $\bar{\varphi}_{CS}$ the maximum inflow/outflow (we assume they are equal) to enter or to leave the CS, and $\omega$ the "speed" of filling of the CS. $\sigma(\varepsilon) \in [0, 1]$ is a gating function depending on the average charge level $\varepsilon$ of all vehicles parking at the CS. We propose the following function

$$\sigma(\varepsilon) = \begin{cases} 0, & \varepsilon < \varepsilon_l \\ \frac{\varepsilon - \varepsilon_l}{1 - \varepsilon_l}, & \varepsilon \ge \varepsilon_l \end{cases} \quad (17)$$

Our hypothesis allows vehicles to leave (linearly) only after the SoC reaches the average value of $\varepsilon_l < 1$. The constant $v_c > 0$ defines the "charging speed" depending on the average power of the charging stations. For nodes 1 and 2, $v_1$ and $v_2$ define the speeds at which vehicles leave their respective nodes, and $\varphi_1$ and $\varphi_2$ represent the maximum exit flows of nodes 1 and 2, respectively. Finally, $\sigma_1(t) \in [0, 1]$, and $\sigma_2(t) \in [0, 1]$ are the time-depending gating functions as defined in [12]. They provide operational time profiles during the journey for the considered case. The last parameter is the split ratio $\beta$ that defines the EVs flow proportion that want to charge as defined in [9]. We assume that this utility function will depend on both: the state of charge $\varepsilon_1$, and the charging station price $\pi^C$.

$$\beta(\varepsilon_1, \pi^C) = 1 - \left(1 + e^{-\frac{\varepsilon_1 - c_1 + c_2 \pi^C}{c_3}}\right)^{-1} \quad (18)$$

where $c_i$ are constants. $c_1 > 0$ allows to change the position of the sigmoid's inflection (decaying) point. $c_2 > 0$ weights the influence of the variation in $\pi^C$ on the inflection point, and $c_3 > 0$ tunes the sigmoid's slope.

## B. Energy model

Let $E$, $E_1$ and $E_2$ denote the aggregated energy in the CS and in each node, respectively, then

$$E = c\varepsilon N \quad (19)$$

$$E_1 = c\varepsilon_1 N_1 \quad (20)$$

$$E_2 = c\varepsilon_2 N_2 \quad (21)$$

where $\varepsilon, \varepsilon_1, \varepsilon_2 \in [0, 1]$ describe the state of charge at each node, and $c$ is the average battery capacity of vehicles. Now from energy balance at each node we have:

$$\dot{E} = P_{in} - P_{out} + \tilde{P} \quad (22)$$

$$\dot{E}_1 = P_{in,1} - P_{out,1} \quad (23)$$

$$\dot{E}_2 = P_{in,2} - P_{out,2} \quad (24)$$

The power vehicle flows (with units kW·vehicles) are defined as the product of the vehicle flows [vehicles/hr], the state of charge at the inputs/outputs of each node, and the mean battery capacity [kWh].

$$P_{in} = c\varepsilon_{in}\varphi_{in} = c(\varepsilon_1 - \Delta_1)\varphi_{in} \quad (25)$$

$$P_{out} = c\varphi_{out} \quad (26)$$

$$P_{in,1} = c(\varepsilon_2 - \Delta_1 - \Delta_2)\varphi_{1,1} \quad (27)$$

$$P_{out,1} = c\varepsilon_1\varphi_{1,2} \quad (28)$$

$$P_{in,2} = c((\varepsilon - \Delta_2)\varphi_{out} + \varphi_{1,2}(\varepsilon_1 - \Delta_1 - \Delta_2)) \quad (29)$$

$$P_{out,2} = c\varepsilon_2\varphi_{2,1} \quad (30)$$

where $\Delta_1$ and $\Delta_2$ represent the traveling losses between nodes (see Fig. 3). $\tilde{P}$ is the injected/extracted power Kw from the grid at the CS. It is defined as follows

$$\tilde{P} = \begin{cases} 0, & \varepsilon = 1 \\ P_{CS}N + (\Delta P - P^M) & \varepsilon < 1 \end{cases} \quad (31)$$

The first terms $P_{CS}N$ indicate the "nominal" power injected per charge station point, with $P_{CS}$ being the average power per charging station point. The terms within the parenthesis represent the difference between the approved power $P^M$ as settled in the day-ahead and intraday market, and $\Delta P$, representing the power that the Transmission System Operator (TSO) requests the CSO as a consequence of the mismatch between the power supply and the load demand. By definition, $\Delta P$ falls within the range of $[-P^M, P^M]$ and changes every 15 minutes. For the purpose of this study, we assume that $\Delta P$ is a random variable with $|\Delta P| \le P^M$.

Finally, to derive the time variation of the state of charge equations at the CS (a similar procedure can be followed for the other nodes), we first take the time derivatives of $E$,

$$\dot{E} = c(\dot{N}\varepsilon + N\dot{\varepsilon}) \quad (32)$$

then, we insert (22), and (6) in the above equation, yielding

$$(\varphi_{in} - \varphi_{out})\varepsilon + \dot{\varepsilon}N = (\varepsilon_1 - \Delta_1)\varphi_{in} - \varepsilon\varphi_{out} + \frac{\tilde{P}}{c} \quad (33)$$

from which we get

$$\dot{\varepsilon} = \frac{1}{N} \left[ (-\varepsilon + \varepsilon_1 - \Delta_1)\varphi_{in} + \frac{\tilde{P}}{c} \right] \quad (34)$$

$$\dot{\varepsilon}_1 = \frac{1}{N_1}[-\varepsilon_1 + \varepsilon_2 - \Delta_1 - \Delta_2]\varphi_{2,1} \quad (35)$$

$$\dot{\varepsilon}_2 = \frac{1}{N_2}[(\varepsilon - \varepsilon_2 - \Delta_2)\varphi_{out} + (\varepsilon_1 - \varepsilon_2 - \Delta_1 - \Delta_2)\varphi_{1,2}] \quad (36)$$

where (35) and (36) are obtained following the same procedure that (34).

## IV. MODEL INSTANTATION

In this section, we assemble the full model and provide detailed explanations of how all the components depicted in Fig. 1 are interconnected.

### A. mobility and SoC model

We rewrite the mobility and SoC model in a compact form, by defining $x \in \mathbb{R}^6$ as

$$x = [N, N_1, N_2, \varepsilon, \varepsilon_1, \varepsilon_2]^T \quad (37)$$

and

$$\dot{x} = \begin{bmatrix} f_N(x, \pi^C, t) \\ f_\varepsilon(x, \pi^C, P^M, \Delta P, t) \end{bmatrix} = f(x, \pi^C, P^M, \Delta P, t) \quad (38)$$
Here, $f_N(x, \pi^C, t)$ and $f_\epsilon(x, \pi^C, P^M, \Delta P, t)$ represent the right-hand functions of systems $\Sigma_N$ and $\Sigma_\epsilon$, respectively. It is important to note that $\pi^C$ serves as our control variable to be optimized by the CSO, which will be defined in the following section in connection with the optimization problem. Additionally, $\pi^C$ is assumed to remain constant for the duration of a day.

## B. FCR market model

The CSO proposes a pair of bids ($P_k^B, \pi_k^B$) every 4 hours, at time instants $t_k = 4(k-1)$ [hr], where $k \in \mathbb{Z}_k \triangleq 1, 2, \dots, 6$. Subsequently, the FCR market settlement returns the corresponding approved power and prices ($P_k^M, \pi_k^M$).

The CSO's objective is to maximize $P_k^B$ to increase its potential power bid based on the predicted power of the connected EVs to the charging stations: $P_{CS}N(\tau)$, where $\tau$ represents the relevant time instance.

$$P_k^B = \Phi(N(\tau)) \triangleq \min_{t_k < \tau < t_{k+1}} \left\{ \frac{P_{CS}N(\tau)}{2} \right\} \quad (39)$$

Here, $\Phi$ is a function dependent on $N$ that maximizes the allocated capacity (EVs flexibility) to enter the FCR market. We take half of this capacity to participate in the entire upward/downward regulation mechanism, allowing the CSO to offer $\pm P_k^B$ power regulation.

The bid price $\pi_k^B$ is generally set through complex economic mechanics beyond the scope of this study. For the purposes of this work, we assume $\pi_k^B = 0$, ensuring that the entirety of the bid offer $P_k^B$ will be retained during the market settlement process. Therefore, we have:

$$P_k^M = P_k^B \quad \forall k \in \mathbb{Z} \quad (40)$$

Finally the returned price from the FCR market is given by:

$$\pi_k^M = \Psi(P_k^B, \pi_k^B) \quad (41)$$

where $\Psi$ represents the map associated to the optimisation problem (3)-(5).

## C. TSO power requests

The last component to be defined in the model, which introduces time-dependence in the right-hand side of equation (38), is $\Delta P(t) \in [-P^M, P^M]$. This term describes the real-time power requested by the TSO from the CSO. It is related to the mismatch between power supply and load demand, primarily caused by uncertainty in renewable energy sources (RES) production, among other factors. Here, we model $\Delta P(t)$ as a discrete function with time steps $t_l$:

$$\Delta P_l \triangleq \text{Rand}_l P_k^M \quad (42)$$

where $\text{Rand}_l$ represents a random number uniformly distributed between $[-1, 1]$. Each realization of $\text{Rand}_l$ occurs every 15 minutes at time instants $t_l = (l-1)/4$ [hr], where $l \in \mathbb{Z}_l \triangleq 1, 2, \dots, 96$, as mandated by the TSO during real-time operation (see [5]).

## D. Integrated model

Integrating the previous components into the general model (38), we have, $\forall \tau \in \mathbb{I}k \triangleq [tk, t_{k+1})$, $\forall k \in \mathbb{Z}_k$ and $l \in \mathbb{Z}_l$.

$$\dot{x}(t) = f(x(t), \pi^C, \Phi(x(\tau))), \Delta P_l, t) \quad (43)$$

where $\Phi(x(\tau)) = \Phi(N(\tau)) = P_k^M$.

**Remark 1:** Unlike conventional players in the FRC market, who have backup power from generators under their control, the power supply for a CSO depends on the mobility of EVs and their presence at the charging station. Therefore, it is crucial for the CSO to have an electromobility model that can forecast the potential occupancy at the CS. This prediction, in turn, enables the calculation of the variable $P^M$ to participate in the day-ahead market.

**Remark 2:** It is important to note that solving equation (43) is not a straightforward task, primarily due to non-causal components arising from the computation of $P_k^M$. Additionally, it contains random elements resulting from $\Delta P_l$. Nevertheless, we can address this challenge by transforming equation (43) into two optimization problems with associated constraints, as demonstrated below.

**Problem 1:** Solving the differential equation (43) is equivalent to solve the following optimization problem. $P_1$: Given $\Delta P_l$, solve $\forall k \in \mathbb{Z}_k$:

$$P_k^M = \max_{\lambda_k \ge 0} \lambda_k \quad (44)$$

under

$$\dot{x}(t) = f(x(t), \pi^C, \lambda_k, \Delta P_l, t) \quad (45)$$

$$0 \le \lambda_k \le \min_{\tau \in \mathbb{I}k} \left\{ \frac{P_{CS}N(\tau)}{2} \right\} \quad (46)$$

## E. Numerical model evaluation: study case

For a numerical evaluation of the proposed model, we consider a highly aggregated representation of mobility in a mid-sized city in France, specifically Grenoble. By 2030, it is expected that there will be approximately 30% of EVs, corresponding to a total of $N + N_1 + N_2 = 100,000$ EVs in circulation within the metropolitan area. Let's assume that there is one public charging station for every 10 EVs, resulting in an aggregated CS capacity of $\bar{N} = 10,000$. The nominal charging cost is defined based on current rates as $\pi_n^C = \pi^C = 0.40 \text{ €/kWh}$. The average battery capacity of the vehicles is $c = 40 \text{ kWh}$, and the average maximum charging station power for one vehicle is $P_{CS} = 40 \text{ kW}$. We assume that the average round trip between origins/destinations results in a daily energy loss of 20% of the battery capacity, i.e., $\Delta_1 = \Delta_2 = 0.05$. All parameters for the model are given in Table III. The initial values of the system are $N(0) = 500$, $N_1(0) = 79,500$, $N_2(0) = 20,000$, $\varepsilon(0) = 0.8$, $\varepsilon_1(0) = 0.36$, and $\varepsilon_2(0) = 0.47$.

<table><caption>TABLE III: Simulation parameters and their values.</caption><thead><tr><th>Symbol</th><th>Value</th><th>Unit</th><th>Symbol</th><th>Value</th><th>Unit</th></tr></thead><tbody><tr><td>w</td><td>50</td><td>km/h</td><td>ε<sub>l</sub></td><td>0.9</td><td>l</td></tr><tr><td>vc</td><td>50</td><td>km/h</td><td>P<sub>CS</sub></td><td>40</td><td>kW</td></tr><tr><td>v<sub>1</sub></td><td>50</td><td>km/h</td><td>c</td><td>40</td><td>kWh</td></tr><tr><td>v<sub>2</sub></td><td>50</td><td>km/h</td><td>Δ<sub>1</sub></td><td>0.05</td><td>l</td></tr><tr><td>N̄</td><td>10000</td><td>veh</td><td>Δ<sub>2</sub></td><td>0.05</td><td>l</td></tr><tr><td>φ<sub>CS</sub></td><td>20000</td><td>veh/h</td><td>c<sub>1</sub></td><td>0.83</td><td>l</td></tr><tr><td>φ<sub>1</sub></td><td>20000</td><td>veh/h</td><td>c<sub>2</sub></td><td>1.3</td><td>l</td></tr><tr><td>φ<sub>2</sub></td><td>20000</td><td>veh/h</td><td>c<sub>3</sub></td><td>0.06</td><td>l</td></tr></tbody></table>
Here, $f_N(x, \pi^C, t)$ and $f_\epsilon(x, \pi^C, P^M, \Delta P, t)$ represent the right-hand functions of systems $\Sigma_N$ and $\Sigma_\epsilon$, respectively. It is important to note that $\pi^C$ serves as our control variable to be optimized by the CSO, which will be defined in the following section in connection with the optimization problem. Additionally, $\pi^C$ is assumed to remain constant for the duration of a day.

### B. FCR market model

The CSO proposes a pair of bids $(P_k^B, \pi_k^B)$ every 4 hours, at time instants $t_k = 4(k - 1)$ [hr], where $k \in \mathbb{Z}_k \triangleq 1, 2, \dots, 6$. Subsequently, the FCR market settlement returns the corresponding approved power and prices $(P_k^M, \pi_k^M)$.

The CSO's objective is to maximize $P_k^B$ to increase its potential power bid based on the predicted power of the connected EVs to the charging stations: $P_{CS}N(\tau)$, where $\tau$ represents the relevant time instance.

$$P_k^B = \Phi(N(\tau)) \triangleq \min_{t_k < \tau < t_{k+1}} \left\{ \frac{P_{CS}N(\tau)}{2} \right\} \quad (39)$$

Here, $\Phi$ is a function dependent on $N$ that maximizes the allocated capacity (EVs flexibility) to enter the FCR market. We take half of this capacity to participate in the entire upward/downward regulation mechanism, allowing the CSO to offer $\pm P_k^B$ power regulation.

The bid price $\pi_k^B$ is generally set through complex economic mechanics beyond the scope of this study. For the purposes of this work, we assume $\pi_k^B = 0$, ensuring that the entirety of the bid offer $P_k^B$ will be retained during the market settlement process. Therefore, we have:

$$P_k^M = P_k^B \quad \forall k \in \mathbb{Z} \quad (40)$$

Finally the returned price from the FCR market is given by:

$$\pi_k^M = \Psi(P_k^B, \pi_k^B) \quad (41)$$

where $\Psi$ represents the map associated to the optimisation problem (3)-(5).

### C. TSO power requests

The last component to be defined in the model, which introduces time-dependence in the right-hand side of equation (38), is $\Delta P(t) \in [-P^M, P^M]$. This term describes the real-time power requested by the TSO from the CSO. It is related to the mismatch between power supply and load demand, primarily caused by uncertainty in renewable energy sources (RES) production, among other factors. Here, we model $\Delta P(t)$ as a discrete function with time steps $t_l$:

$$\Delta P_l \triangleq \text{Rand}_l P_k^M \quad (42)$$

where $\text{Rand}_l$ represents a random number uniformly distributed between $[-1, 1]$. Each realization of $\text{Rand}_l$ occurs every 15 minutes at time instants $t_l = (l - 1)/4$ [hr], where $l \in \mathbb{Z}_l \triangleq 1, 2, \dots, 96$, as mandated by the TSO during real-time operation (see [5]).

### D. Integrated model

Integrating the previous components into the general model (38), we have, $\forall \tau \in \mathbb{I}k \triangleq [tk, t_{k+1})$, $\forall k \in \mathbb{Z}_k$ and $l \in \mathbb{Z}_l$.

$$\dot{x}(t) = f(x(t), \pi^C, \Phi(x(\tau))), \Delta P_l, t) \quad (43)$$

where $\Phi(x(\tau)) = \Phi(N(\tau)) = P_k^M$.

**Remark 1:** Unlike conventional players in the FRC market, who have backup power from generators under their control, the power supply for a CSO depends on the mobility of EVs and their presence at the charging station. Therefore, it is crucial for the CSO to have an electromobility model that can forecast the potential occupancy at the CS. This prediction, in turn, enables the calculation of the variable $P^M$ to participate in the day-ahead market.

**Remark 2:** It is important to note that solving equation (43) is not a straightforward task, primarily due to non-causal components arising from the computation of $P_k^M$. Additionally, it contains random elements resulting from $\Delta P_l$. Nevertheless, we can address this challenge by transforming equation (43) into two optimization problems with associated constraints, as demonstrated below.

**Problem 1:** Solving the differential equation (43) is equivalent to solve the following optimization problem. $P_1$: Given $\Delta P_l$, solve $\forall k \in \mathbb{Z}_k$:

$$P_k^M = \max_{\lambda_k \ge 0} \lambda_k \quad (44)$$

under

$$\dot{x}(t) = f(x(t), \pi^C, \lambda_k, \Delta P_l, t) \quad (45)$$

$$0 \le \lambda_k \le \min_{\tau \in \mathbb{I}k} \left\{ \frac{P_{CS}N(\tau)}{2} \right\} \quad (46)$$

### E. Numerical model evaluation: study case

For a numerical evaluation of the proposed model, we consider a highly aggregated representation of mobility in a mid-sized city in France, specifically Grenoble. By 2030, it is expected that there will be approximately 30% of EVs, corresponding to a total of $N + N_1 + N_2 = 100,000$ EVs in circulation within the metropolitan area. Let's assume that there is one public charging station for every 10 EVs, resulting in an aggregated CS capacity of $\bar{N} = 10,000$. The nominal charging cost is defined based on current rates as $\pi_n^C = \pi^C = 0.40 \text{ €/kWh}$. The average battery capacity of the vehicles is $c = 40 \text{ kWh}$, and the average maximum charging station power for one vehicle is $P_{CS} = 40 \text{ kW}$. We assume that the average round trip between origins/destinations results in a daily energy loss of 20% of the battery capacity, i.e., $\Delta_1 = \Delta_2 = 0.05$. All parameters for the model are given in Table III. The initial values of the system are $N(0) = 500$, $N_1(0) = 79,500$, $N_2(0) = 20,000$, $\varepsilon(0) = 0.8$, $\varepsilon_1(0) = 0.36$, and $\varepsilon_2(0) = 0.47$.

<table><caption>TABLE III: Simulation parameters and their values.</caption><thead><tr><th>Symbol</th><th>Value</th><th>Unit</th><th>Symbol</th><th>Value</th><th>Unit</th></tr></thead><tbody><tr><td>w</td><td>50</td><td>km/h</td><td>ε<sub>l</sub></td><td>0.9</td><td>l</td></tr><tr><td>vc</td><td>50</td><td>km/h</td><td>P<sub>CS</sub></td><td>40</td><td>kW</td></tr><tr><td>v<sub>1</sub></td><td>50</td><td>km/h</td><td>c</td><td>40</td><td>kWh</td></tr><tr><td>v<sub>2</sub></td><td>50</td><td>km/h</td><td>Δ<sub>1</sub></td><td>0.05</td><td>l</td></tr><tr><td>N̄</td><td>10000</td><td>veh</td><td>Δ<sub>2</sub></td><td>0.05</td><td>l</td></tr><tr><td>φ<sub>CS</sub></td><td>20000</td><td>veh/h</td><td>c<sub>1</sub></td><td>0.83</td><td>l</td></tr><tr><td>φ<sub>1</sub></td><td>20000</td><td>veh/h</td><td>c<sub>2</sub></td><td>1.3</td><td>l</td></tr><tr><td>φ<sub>2</sub></td><td>20000</td><td>veh/h</td><td>c<sub>3</sub></td><td>0.06</td><td>l</td></tr></tbody></table>
<figure><img src="image_5.png" /><figcaption>Fig. 5: Numerical results from problem $\mathbb{P}_1$. a) Time-profiles of the used mobility gating functions $\sigma_1(t)$ and $\sigma_2(t)$, b) resulting charging power, and c) Maximum bid capacity $P^B = P^M$, as a function of different prices $\pi^C = 0.2, 0.4, 0.6$ €/kWh.</figcaption></figure>

Traffic flow profiles represent typical ring road flows, allowing us to define the gating functions $\sigma_1(t)$ and $\sigma_2(t)$ as shown in Fig. 5a. These time-profiles reflect minimal night traffic, with significant peaks occurring during morning and evening rush hours, as expected, and smaller peaks during the midday break. Fig. 5b illustrates the injected energy at the charging station throughout the day, defined as $\tilde{P}$. Additionally, Fig. 5b provides information about the number of vehicles at the charging station. The three mobility peaks during the day are reflected in the charging station. The number of vehicles directly affects the capacity that a charging station can offer for sale in the FCR market, as shown in Fig. 5c.

## V. OPTIMAL ENERGY-PRICE STRATEGY

In this section, we start by introducing the utility function earmarked for optimization. Next, we present a feasible forecasting model, along with an upper limit on utility to guide the optimization procedure. Finally, we outline and propose a solution for the optimal energy-price optimization problem.

### A. Utility function

For each day, the CSO must set $\pi^C$ while seeking to maximize the gains achieved during the day. The CSO has two different sources of revenue. The first source is the earnings from selling energy to EVs, given by $\int_0^t \pi^C \tilde{P} dt$, while the second source is the earnings from selling capacity in the FCR market, calculated as $\sum_{k=1}^6 \pi_k^M P_k^M$ for each 4-hour block $k$. Therefore, we have the function $J$ that calculates the total earnings for the full day, i.e., $t \in [0, T]$, with $T = 24$ hrs:

$$J(x, \pi^C, P^M, \pi^M) = \int_0^T \pi^C \tilde{P} dt + \sum_{k=1}^6 \pi_k^M P_k^M \quad (47)$$

The ideal optimization problem aims to find the values of $\pi^C$ that maximize the earnings given by the function $J$ under the system dynamics (43), or equivalently, under the solution of $\mathbb{P}_1$, i.e.

$$\pi^{*C} = \max_{\pi^C \in \Pi^C} J(x, \pi^C, P^M, \pi^M) \quad (48)$$

under $\mathbb{P}_1$

The optimization is mathematically solvable under the condition that we possess the following information: 1) the results of the FCR market settlement, which provide $P^M$ and $\pi^M$, and 2) the grid's regulation demands $\Delta P_l$. However 1) and 2) are unknown when we want to solve $\mathbb{P}_1$, it is important to note that $\pi^M$ becomes known only after the market clears and cannot be predicted in advance. Additionally, real-time knowledge is required for $\Delta P_l$. Hence, to make the optimization problem feasible within the constraints of day-ahead market deadlines, we must rewrite the "ideal" optimization problem.

To accomplish this, we initially introduce a modified model that supports forecasting and optimization, where problem $\mathbb{P}_1$ is modified through the incorporation of bounds on $\Delta P_l$, resulting in additional inequality constraints. Subsequently, we present a quantifiable upper limit on $J$. This process allows us to form the practical and achievable optimization problem.

### B. Model for forecasting and optimization

Given that $\Delta P_l \le P^M$ is unknown, but upper bounds are known by construction, expressed as $|\Delta P_l| \le P^M$, Problem $\mathbb{P}_1$ can then be modified by explicitly incorporating these bounds, resulting in additional inequality constraints.

**Problem 2:** The only feasible solution, considering both the upper and lower bounds of the random variable $\Delta P_l$, for solving the differential equation (43), is given by the solution of the following optimization problem.
$\mathbb{P}_2$: For all $k \in \mathbb{Z}_k$, $l \in \mathbb{Z}_l$ solve:

$$\hat{P}_k^M = \max_{\lambda_k \ge 0} \lambda_k \quad (49)$$

under

$$\dot{x}(t) = f(x(t), \pi^C, \lambda_k, \Delta \hat{P}_l, t) \quad (50)$$

$$0 \le \lambda_k \le \min_{\tau \in \mathbb{I}_k} \left\{ \frac{P_{CS} \hat{N}(\tau)}{2} \right\} \quad (51)$$

$$\Delta \hat{P}_l \le \lambda_k \quad (52)$$

$$\Delta \hat{P}_l \ge -\lambda_k \quad (53)$$
<figure><img src="image_6.png" /><figcaption>Fig. 5: Numerical results from problem $\mathbb{P}_1$. a) Time-profiles of the used mobility gating functions $\sigma_1(t)$ and $\sigma_2(t)$, b) resulting charging power, and c) Maximum bid capacity $P^B = P^M$, as a function of different prices $\pi^C = 0.2, 0.4, 0.6$ €/kWh.</figcaption></figure>

Traffic flow profiles represent typical ring road flows, allowing us to define the gating functions $\sigma_1(t)$ and $\sigma_2(t)$ as shown in Fig. 5a. These time-profiles reflect minimal night traffic, with significant peaks occurring during morning and evening rush hours, as expected, and smaller peaks during the midday break. Fig. 5b illustrates the injected energy at the charging station throughout the day, defined as $\tilde{P}$. Additionally, Fig. 5b provides information about the number of vehicles at the charging station. The three mobility peaks during the day are reflected in the charging station. The number of vehicles directly affects the capacity that a charging station can offer for sale in the FCR market, as shown in Fig. 5c.

## V. OPTIMAL ENERGY-PRICE STRATEGY

In this section, we start by introducing the utility function earmarked for optimization. Next, we present a feasible forecasting model, along with an upper limit on utility to guide the optimization procedure. Finally, we outline and propose a solution for the optimal energy-price optimization problem.

### A. Utility function

For each day, the CSO must set $\pi^C$ while seeking to maximize the gains achieved during the day. The CSO has two different sources of revenue. The first source is the earnings from selling energy to EVs, given by $\int_0^t \pi^C \tilde{P} dt$, while the second source is the earnings from selling capacity in the FCR market, calculated as $\sum_{k=1}^6 \pi_k^M P_k^M$ for each 4-hour block $k$. Therefore, we have the function $J$ that calculates the total earnings for the full day, i.e., $t \in [0, T]$, with $T = 24$ hrs:

$$J(x, \pi^C, P^M, \pi^M) = \int_0^T \pi^C \tilde{P} dt + \sum_{k=1}^6 \pi_k^M P_k^M \quad (47)$$

The ideal optimization problem aims to find the values of $\pi^C$ that maximize the earnings given by the function $J$ under the system dynamics (43), or equivalently, under the solution of $\mathbb{P}_1$, i.e.

$$\pi^{*C} = \max_{\pi^C \in \Pi^C} J(x, \pi^C, P^M, \pi^M) \quad (48)$$

under $\mathbb{P}_1$

The optimization is mathematically solvable under the condition that we possess the following information: 1) the results of the FCR market settlement, which provide $P^M$ and $\pi^M$, and 2) the grid's regulation demands $\Delta P_l$. However 1) and 2) are unknown when we want to solve $\mathbb{P}_1$, it is important to note that $\pi^M$ becomes known only after the market clears and cannot be predicted in advance. Additionally, real-time knowledge is required for $\Delta P_l$. Hence, to make the optimization problem feasible within the constraints of day-ahead market deadlines, we must rewrite the "ideal" optimization problem.

To accomplish this, we initially introduce a modified model that supports forecasting and optimization, where problem $\mathbb{P}_1$ is modified through the incorporation of bounds on $\Delta P_l$, resulting in additional inequality constraints. Subsequently, we present a quantifiable upper limit on $J$. This process allows us to form the practical and achievable optimization problem.

### B. Model for forecasting and optimization

Given that $\Delta P_l \le P^M$ is unknown, but upper bounds are known by construction, expressed as $|\Delta P_l| \le P^M$, Problem $\mathbb{P}_1$ can then be modified by explicitly incorporating these bounds, resulting in additional inequality constraints.

**Problem 2:** The only feasible solution, considering both the upper and lower bounds of the random variable $\Delta P_l$, for solving the differential equation (43), is given by the solution of the following optimization problem.

$\mathbb{P}_2$: For all $k \in \mathbb{Z}_k$, $l \in \mathbb{Z}_l$ solve:

$$\hat{P}_k^M = \max_{\lambda_k \ge 0} \lambda_k \quad (49)$$

under

$$\dot{x}(t) = f(x(t), \pi^C, \lambda_k, \Delta \hat{P}_l, t) \quad (50)$$

$$0 \le \lambda_k \le \min_{\tau \in \mathbb{I}_k} \left\{ \frac{P_{CS} \hat{N}(\tau)}{2} \right\} \quad (51)$$

$$\Delta \hat{P}_l \le \lambda_k \quad (52)$$

$$\Delta \hat{P}_l \ge -\lambda_k \quad (53)$$
where $\Delta \hat{P}_l$ acts here as a slack variable. Note that for each run of $k$, we consider all possible values of $\Delta P_l$ in the corresponding time slot $\mathbb{I}_k$. A solution with reduced complexity could alternatively be found by assuming that $\Delta P_l$ is constant in the time interval $\mathbb{I}_k$, albeit at the cost of some conservatism in the solutions.

### C. Computable utility upper bound

From the definition of $\tilde{P}$, and the fact that $-P^M \le \Delta P \le P^M$, we have

$$ \tilde{P} = P_{CS}N + (\Delta P - P^M) \le P_{CS}N \quad (54) $$

Therefore,

$$ J = \int_{0}^{T} \pi^{C} \tilde{P} dt + \sum_{k=1}^{6} \pi_{k}^{M} P_{k}^{M} \quad (55) $$

$$ \le \int_{0}^{T} \pi^{C} P_{CS} N dt + \sum_{k=1}^{6} \pi_{k}^{M} P_{k}^{M} \quad (56) $$

$$ \le \int_{0}^{T} \pi^{C} P_{CS} N dt + \pi_{max}^{M} \sum_{k=1}^{6} P_{k}^{M} \quad (57) $$

where $\pi_{max}^M$ is an upper bound on $\pi_k^M$. Based on this upper bound, we introduce the utility $\hat{J}$, which depends only on computable quantities derived from the forecasting model, i.e.

$$ \hat{J}(\hat{x}, \pi^C, \hat{P}^M) = \int_{0}^{T} \pi^C P_{CS} \hat{N} dt + \pi_{max}^{M} \sum_{k=1}^{6} \hat{P}_{k}^{M} \quad (58) $$

where $\hat{N}$, and $\hat{P}_k^M$ are obtained from Problem P2. We are now in position to formulate our final optimal energy-price strategy.

**Problem 3:** The computable optimal energy-price strategy consists in solving the following optimal problem. P3: For all $k \in \mathbb{Z}_k$, $l \in \mathbb{Z}_l$ solve:

$$ \hat{\pi}^{*C} = \max_{\pi^{C} \in \Pi^{C}} \hat{J}(\hat{x}, \pi^{C}, \hat{P}^{M}) \quad (59) $$

under P2

Note that the evaluation of the actual revenues needs to be done using the true cost function $J$. This involves replacing the computed optimal prices $\hat{\pi}^{*C}$ and $\hat{P}^M$ obtained from P3 in the ground truth equation (43), i.e.

$$ \dot{x}^*(t) = f(x^*(t), \hat{\pi}^{*C}, \hat{P}^M, \Delta P_l, t) \quad (60) $$

Finally, we use this ground truth solution to evaluate the effective utility revenues $J(x^*, \hat{\pi}^{*C}, \hat{P}^M, \pi^M)$. Note that this value will depend on the particular sequence $\Delta P_l$, resulting from the difference between power demand and power production variability in the daily profile.

## VI. SIMULATION RESULTS

In this section, we showcase two simulation scenarios. The first is devoted to evaluating the distance to the optimal solution, while the second intends to evaluate the cost revenue for the EV users and the CSO resulting from participation in the FCR market.

<figure><img src="image_6.png" /><figcaption>Fig. 6: Comparisons are made between $\hat{J}$ (red curve) and $J_k$ (black curve). The vertical red line represents $\hat{\pi}^{*C} = 0.34$, while the black dashed lines represent various $\pi_m^{*C} \in 0.33, 0.34$ obtained. The green dashed line represents the nominal price $\pi_n^C = 0.4$. The purple bar plot illustrates the distribution of $\pi_m^{*C}$.</figcaption></figure>

### A. Distance to optimal

Let $\pi^C \in \Pi^C \triangleq \{0.2, 0.21, 0.22, \dots, 0.6\}$, with $\Pi^C$ being the admissible set for $\pi^C$. Let us also consider a set, $\Lambda_P \triangleq \{\Delta P_l^m, \forall m = 1, 2, \dots, 10\}$, of realizations for $\Delta P_l$ that will be used for this evaluation. Note that $\Delta P_l^m$ is stochastic in our simulations. We consider the following experiment.

1) For all $\pi^C \in \Pi^C$, and for each realization $\Delta P_l^m \in \Lambda_P$, solve $P_1$ (i.e. compute $\pi_m^{*C}, \forall m$), and record the resulting ideal cost $J_m(x_m, \pi^C, P_m^M, \Delta P_l^m)$.

2) For all $\pi^C \in \Pi^C$ solve $P_3$ (i.e. compute $\hat{\pi}^{*C}$), and record the resulting cost upperbound $\hat{J}(\hat{x}, \pi^C, \hat{P}^M)$.

Fig. 6 shows the results. From this figure we can first observe that the optimization problem is indeed convex. We can also see that the upper bound $\hat{J}$ results in a tight bound for $J$, and allows us to obtain a value for $\hat{\pi}^{*C} = 0.34$ which is very close to those of $\pi_m^{*C}$ obtained from solving the "ideal" optimal problem. Finally, note that all the resulting $\pi_m^{*C}$ are concentrated in only two values, $\{0.33, 0.34\}$ for the 10 random realization of $\Delta P_l$, and that the value $\pi_m^{*C} = 0.34$ repeats 9 times out of 10. Therefore, 90% of the time, $\pi_m^{*C} = \hat{\pi}^{*C}$, and 10% of the time, there is a 0.01€ difference.

Finally, note that the electricity price to be sold to the EV users with this optimisation strategy is substantially lower than the one of the "nominal" (without entering the FCR market) electricity price $\pi_n^C = 0.4€$. Specifically, $\hat{\pi}^{*C}$ is 15% lower than $\pi_n^C$, resulting in:

$$ 0.34\epsilon = \hat{\pi}^{*C} < \pi_n^C = 0.4\epsilon \quad (61) $$

### B. FCR market profit evaluation

Let us now evaluate the profits incurred by the CSO thanks to its participation to the FCR market. Consider the previous realization set $\Lambda_P$ for $\Delta P_l$. Assume that the CSO sells electricity at the nominal price $\pi_n^C = 0.4€$ without participating to the FCR market. The CSO revenues are:

$$ J_n = \int_{0}^{T} \pi_{n}^{C} \tilde{P}_{n} dt \quad (62) $$
where $\Delta \hat{P}_l$ acts here as a slack variable. Note that for each run of $k$, we consider all possible values of $\Delta P_l$ in the corresponding time slot $\mathbb{I}_k$. A solution with reduced complexity could alternatively be found by assuming that $\Delta P_l$ is constant in the time interval $\mathbb{I}_k$, albeit at the cost of some conservatism in the solutions.

### C. Computable utility upper bound

From the definition of $\tilde{P}$, and the fact that $-P^M \le \Delta P \le P^M$, we have

$$ \tilde{P} = P_{CS}N + (\Delta P - P^M) \le P_{CS}N \quad (54) $$

Therefore,

$$ J = \int_{0}^{T} \pi^{C} \tilde{P} dt + \sum_{k=1}^{6} \pi_{k}^{M} P_{k}^{M} \quad (55) $$

$$ \le \int_{0}^{T} \pi^{C} P_{CS} N dt + \sum_{k=1}^{6} \pi_{k}^{M} P_{k}^{M} \quad (56) $$

$$ \le \int_{0}^{T} \pi^{C} P_{CS} N dt + \pi_{max}^{M} \sum_{k=1}^{6} P_{k}^{M} \quad (57) $$

where $\pi_{max}^M$ is an upper bound on $\pi_k^M$. Based on this upper bound, we introduce the utility $\hat{J}$, which depends only on computable quantities derived from the forecasting model, i.e.

$$ \hat{J}(\hat{x}, \pi^C, \hat{P}^M) = \int_{0}^{T} \pi^C P_{CS} \hat{N} dt + \pi_{max}^{M} \sum_{k=1}^{6} \hat{P}_{k}^{M} \quad (58) $$

where $\hat{N}$, and $\hat{P}_k^M$ are obtained from Problem P2. We are now in position to formulate our final optimal energy-price strategy.

**Problem 3:** The computable optimal energy-price strategy consist in solving the following optimal problem. P3: For all $k \in \mathbb{Z}_k$, $l \in \mathbb{Z}_l$ solve:

$$ \hat{\pi}^{*C} = \max_{\pi^{C} \in \Pi^{C}} \hat{J}(\hat{x}, \pi^{C}, \hat{P}^{M}) \quad (59) $$

under P2

Note that the evaluation of the actual revenues needs to be done using the true cost function $J$. This involves replacing the computed optimal prices $\hat{\pi}^{*C}$ and $\hat{P}^M$ obtained from P3 in the ground truth equation (43), i.e.

$$ \dot{x}^*(t) = f(x^*(t), \hat{\pi}^{*C}, \hat{P}^M, \Delta P_l, t) \quad (60) $$

Finally, we use this ground truth solution to evaluate the effective utility revenues $J(x^*, \hat{\pi}^{*C}, \hat{P}^M, \pi^M)$. Note that this value will depend on the particular sequence $\Delta P_l$, resulting from the difference between power demand and power production variability in the daily profile.

## VI. SIMULATION RESULTS

In this section, we showcase two simulation scenarios. The first is devoted to evaluating the distance to the optimal solution, while the second intends to evaluate the cost revenue for the EV users and the CSO resulting from participation in the FCR market.

<figure><img src="image_7.png" /><figcaption>Fig. 6: Comparisons are made between $\hat{J}$ (red curve) and $J_k$ (black curve). The vertical red line represents $\hat{\pi}^{*C} = 0.34$, while the black dashed lines represent various $\pi_m^{*C} \in 0.33, 0.34$ obtained. The green dashed line represents the nominal price $\pi_n^C = 0.4$. The purple bar plot illustrates the distribution of $\pi_m^{*C}$.</figcaption></figure>

### A. Distance to optimal

Let $\pi^C \in \Pi^C \triangleq \{0.2, 0.21, 0.22, \dots, 0.6\}$, with $\Pi^C$ being the admissible set for $\pi^C$. Let us also consider a set, $\Lambda_P \triangleq \{\Delta P_l^m, \forall m = 1, 2, \dots, 10\}$, of realizations for $\Delta P_l$ that will be used for this evaluation. Note that $\Delta P_l^m$ is stochastic in our simulations. We consider the following experiment.

1) For all $\pi^C \in \Pi^C$, and for each realization $\Delta P_l^m \in \Lambda_P$, solve $P_1$ (i.e. compute $\pi_m^{*C}, \forall m$), and record the resulting ideal cost $J_m(x_m, \pi^C, P_m^M, \Delta P_l^m)$.

2) For all $\pi^C \in \Pi^C$ solve $P_3$ (i.e. compute $\hat{\pi}^{*C}$), and record the resulting cost upperbound $\hat{J}(\hat{x}, \pi^C, \hat{P}^M)$.

Fig. 6 shows the results. From this figure we can first observe that the optimization problem is indeed convex. We can also see that the upper bound $\hat{J}$ results in a tight bound for $J$, and allows us to obtain a value for $\hat{\pi}^{*C} = 0.34$ which is very close to those of $\pi_m^{*C}$ obtained from solving the "ideal" optimal problem. Finally, note that all the resulting $\pi_m^{*C}$ are concentrated in only two values, $\{0.33, 0.34\}$ for the 10 random realization of $\Delta P_l$, and that the value $\pi_m^{*C} = 0.34$ repeats 9 times out of 10. Therefore, 90% of the time, $\pi_m^{*C} = \hat{\pi}^{*C}$, and 10% of the time, there is a 0.01€ difference.

Finally, note that the electricity price to be sold to the EV users with this optimisation strategy is substantially lower than the one of the "nominal" (without entering the FCR market) electricity price $\pi_n^C = 0.4€$. Specifically, $\hat{\pi}^{*C}$ is 15% lower than $\pi_n^C$, resulting in:

$$ 0.34\text{€} = \hat{\pi}^{*C} < \pi_n^C = 0.4\text{€} \quad (61) $$

### B. FCR market profit evaluation

Let us now evaluate the profits incurred by the CSO thanks to its participation to the FCR market. Consider the previous realization set $\Lambda_P$ for $\Delta P_l$. Assume that the CSO sells electricity at the nominal price $\pi_n^C = 0.4€$ without participating to the FCR market. The CSO revenues are:

$$ J_n = \int_{0}^{T} \pi_{n}^{C} \tilde{P}_{n} dt \quad (62) $$
<figure><img src="image_7.png" /><figcaption>Fig. 7: Numerical results for CSO revenues from equation (64) and number of vehicles charged by the charging station.</figcaption></figure>

where $\tilde{P}_n$ results from solving problem $\mathbb{P}_1$ with $\pi^C = \pi_n^C$. However, when the CSO enters the market, the CSO optimal revenues are:

$$J^* = \int_{0}^{T} \hat{\pi}^{*C} \tilde{P}^* dt + \sum_{k=1}^{6} \pi_{k}^{M} \hat{P}_{k}^{M} \quad (63)$$

where $\hat{\pi}^{*C}$ comes from solving problem $\mathbb{P}_3$, and $\tilde{P}^*(x^*)$ from solving the ground truth system (60), with the optimal value $\hat{\pi}^{*C}$. Revenues for the CSO are then computed:

$$\$^{\text{CSO}} = J^* - J_n \quad (64)$$

The total profit generated by the CSO $\$^{profit}$ can be determined by deducting the electricity purchase cost from the revenue earned:

$$\$^{\text{profit}} = \int_{0}^{T} (\hat{\pi}^{*C} - \pi^{\text{spot}}) \tilde{P}^{*} dt + \sum_{k=1}^{6} \pi_{k}^{M} \hat{P}_{k}^{M}$$

Where $\pi^{spot}$ refers to the fluctuating electricity purchase price throughout the day.

An EV is considered charged when it leaves the charging station. We compute the number of EVs served (charged) at the CS during a 24hr day period, $\mathcal{N}$, $\mathcal{N}^*$ for nominal price $\pi_n^C$, and optimal price $\hat{\pi}^{*C}$, respectively.

$$\mathcal{N} = \int_{0}^{T} \varphi_{out,n} dt, \quad \mathcal{N}^* = \int_{0}^{T} \varphi_{out}^* dt \quad (65)$$

$\varphi_{out,n}$ and $\varphi_{out}^*$ results from solving (60) for $\pi_n^C$ and $\hat{\pi}^{*C}$.

Fig. 7 illustrates the respective revenues as a function of the different realizations. The average profit increase for the CSO, denoted as $\$^{CSO}$, is 22,700€, with 1,476.80€ coming from the sale of capacity on the FCR market. The remainder of the profit increase is attributed to a higher influx of EVs due to the more attractive pricing, as depicted by the comparison between $\mathcal{N}$ and $\mathcal{N}^*$.

## VII. CONCLUSIONS

In this study, we have presented an approach for integrating CSO into the FCR market using a mobility model, an aggregated charging station model, and an FCR market model. Despite the challenge of predicting the FCR market settlement price, we have proposed a bidding strategy for

CSO in the FCR market and an energy pricing strategy. Our findings suggest that CSO participation in the FCR market leads to increased revenue for CSO while simultaneously reducing charging costs for EV users. Future research could extend this work by considering competition among multiple charging stations and exploring the applicability of this strategy to larger-scale mobility models. Additionally, further investigation into the impact of CSO participation on grid stability and overall market dynamics would be valuable.

## REFERENCES

[1] A. Razmjoo, A. Ghazanfari, M. Jahangiri, et al., “A comprehensive study on the expansion of electric vehicles in europe,” Applied Sciences, vol. 12, no. 22, p. 11656, 2022.

[2] A. Clerjon and F. Perdu, “Matching intermittent electricity supply and demand with electricity storage-an optimization based on a time scale analysis,” Energy, vol. 241, p. 122799, 2022.

[3] S. S. Ravi and M. Aziz, “Utilization of electric vehicles for vehicle-to-grid services: Progress and perspectives,” Energies, vol. 15, no. 2, p. 589, 2022.

[4] W. Kempton and J. Tomić, “Vehicle-to-grid power fundamentals: Calculating capacity and net revenue,” Journal of power sources, vol. 144, no. 1, pp. 268–279, 2005.

[5] Intertface. “Tso-dso-consumer interface architecture to provide innovative grid services for an efficient power system.” (2019), [Online]. Available: https://ec.europa.eu/research/participants/documents/downloadPublic?documentIds=080166e5c735ee44&appId=PPGMS.

[6] P. Codani, M. Petit, and Y. Perez, “Participation of an electric vehicle fleet to primary frequency control in france,” International Journal of Electric and Hybrid Vehicles, vol. 7, no. 3, pp. 233–249, 2015.

[7] X. Duan, Z. Hu, and Y. Song, “Bidding strategies in energy and reserve markets for an aggregator of multiple ev fast charging stations with battery storage,” IEEE Transactions on Intelligent Transportation Systems, vol. 22, no. 1, pp. 471–482, 2020.

[8] S.-A. Amamra and J. Marco, “Vehicle-to-grid aggregator to support power grid and reduce electric vehicle charging cost,” IEEE Access, vol. 7, pp. 178528–178538, 2019.

[9] M. Čičić, G. Gasnier, and C. Canudas-de-Wit, “Electric vehicle charging station pricing control under balancing reserve capacity commitments,” in IEEE Conference on Decision and Control (CDC), 2023.

[10] S. I. Vagropoulos and A. G. Bakirtzis, “Optimal bidding strategy for electric vehicle aggregators in electricity markets,” IEEE Transactions on power systems, vol. 28, no. 4, pp. 4031–4041, 2013.

[11] L. Herre, J. Dalton, and L. Söder, “Optimal day-ahead energy and reserve bidding strategy of a risk-averse electric vehicle aggregator in the nordic market,” in IEEE Milan PowerTech, 2019.

[12] M. Rodriguez-Vega, C. Canudas-de-Wit, G. De Nunzio, and B. Othman, “A graph-based mobility model for electric vehicles in urban traffic networks: Application to the grenoble metropolitan area,” in European Control Conference (ECC), Bucarest, Rumania, 2023.

[13] R. Mourgues, M. Rodriguez-Vega, and C. Canudas-De-Wit, “Optimal location of evs public charging stations based on a macroscopic urban electromobility model,” in IEEE Conference on Decision and Control (CDC), 2023.
<figure><img src="image_8.png" /><figcaption>Fig. 7: Numerical results for CSO revenues from equation (64) and number of vehicles charged by the charging station.</figcaption></figure>

where $\tilde{P}_n$ results from solving problem $\mathbb{P}_1$ with $\pi^C = \pi_n^C$. However, when the CSO enters the market, the CSO optimal revenues are:

$$J^* = \int_0^T \hat{\pi}^{*C} \tilde{P}^* dt + \sum_{k=1}^6 \pi_k^M \hat{P}_k^M \quad (63)$$

where $\hat{\pi}^{*C}$ comes from solving problem $\mathbb{P}_3$, and $\tilde{P}^*(x^*)$ from solving the ground truth system (60), with the optimal value $\hat{\pi}^{*C}$. Revenues for the CSO are then computed:

$$\$^{\text{CSO}} = J^* - J_n \quad (64)$$

The total profit generated by the CSO $\$^{profit}$ can be determined by deducting the electricity purchase cost from the revenue earned:

$$\$^{\text{profit}} = \int_0^T (\hat{\pi}^{*C} - \pi^{\text{spot}}) \tilde{P}^* dt + \sum_{k=1}^6 \pi_k^M \hat{P}_k^M$$

Where $\pi^{\text{spot}}$ refers to the fluctuating electricity purchase price throughout the day.

An EV is considered charged when it leaves the charging station. We compute the number of EVs served (charged) at the CS during a 24hr day period, $\mathcal{N}$, $\mathcal{N}^*$ for nominal price $\pi_n^C$, and optimal price $\hat{\pi}^{*C}$, respectively.

$$\mathcal{N} = \int_0^T \varphi_{\text{out},n} dt, \quad \mathcal{N}^* = \int_0^T \varphi_{\text{out}}^* dt \quad (65)$$

$\varphi_{\text{out},n}$ and $\varphi_{\text{out}}^*$ results from solving (60) for $\pi_n^C$ and $\hat{\pi}^{*C}$.

Fig. 7 illustrates the respective revenues as a function of the different realizations. The average profit increase for the CSO, denoted as $\$^{CSO}$, is 22,700€, with 1,476.80€ coming from the sale of capacity on the FCR market. The remainder of the profit increase is attributed to a higher influx of EVs due to the more attractive pricing, as depicted by the comparison between $\mathcal{N}$ and $\mathcal{N}^*$.

## VII. CONCLUSIONS

In this study, we have presented an approach for integrating CSO into the FCR market using a mobility model, an aggregated charging station model, and an FCR market model. Despite the challenge of predicting the FCR market settlement price, we have proposed a bidding strategy for

CSO in the FCR market and an energy pricing strategy. Our findings suggest that CSO participation in the FCR market leads to increased revenue for CSO while simultaneously reducing charging costs for EV users. Future research could extend this work by considering competition among multiple charging stations and exploring the applicability of this strategy to larger-scale mobility models. Additionally, further investigation into the impact of CSO participation on grid stability and overall market dynamics would be valuable.

## REFERENCES

[1] A. Razmjoo, A. Ghazanfari, M. Jahangiri, et al., “A comprehensive study on the expansion of electric vehicles in europe,” Applied Sciences, vol. 12, no. 22, p. 11 656, 2022.

[2] A. Clerjon and F. Perdu, “Matching intermittent electricity supply and demand with electricity storage-an optimization based on a time scale analysis,” Energy, vol. 241, p. 122 799, 2022.

[3] S. S. Ravi and M. Aziz, “Utilization of electric vehicles for vehicle-to-grid services: Progress and perspectives,” Energies, vol. 15, no. 2, p. 589, 2022.

[4] W. Kempton and J. Tomić, “Vehicle-to-grid power fundamentals: Calculating capacity and net revenue,” Journal of power sources, vol. 144, no. 1, pp. 268–279, 2005.

[5] Intertface. “Tso-dso-consumer interface architecture to provide innovative grid services for an efficient power system.” (2019), [Online]. Available: https://ec.europa.eu/research/participants/documents/downloadPublic?documentIds=080166e5c735ee44&appId=PPGMS.

[6] P. Codani, M. Petit, and Y. Perez, “Participation of an electric vehicle fleet to primary frequency control in france,” International Journal of Electric and Hybrid Vehicles, vol. 7, no. 3, pp. 233–249, 2015.

[7] X. Duan, Z. Hu, and Y. Song, “Bidding strategies in energy and reserve markets for an aggregator of multiple ev fast charging stations with battery storage,” IEEE Transactions on Intelligent Transportation Systems, vol. 22, no. 1, pp. 471–482, 2020.

[8] S.-A. Amamra and J. Marco, “Vehicle-to-grid aggregator to support power grid and reduce electric vehicle charging cost,” IEEE Access, vol. 7, pp. 178 528–178 538, 2019.

[9] M. Čičić, G. Gasnier, and C. Canudas-de-Wit, “Electric vehicle charging station pricing control under balancing reserve capacity commitments,” in IEEE Conference on Decision and Control (CDC), 2023.

[10] S. I. Vagropoulos and A. G. Bakirtzis, “Optimal bidding strategy for electric vehicle aggregators in electricity markets,” IEEE Transactions on power systems, vol. 28, no. 4, pp. 4031–4041, 2013.

[11] L. Herre, J. Dalton, and L. Söder, “Optimal day-ahead energy and reserve bidding strategy of a risk-averse electric vehicle aggregator in the nordic market,” in IEEE Milan PowerTech, 2019.

[12] M. Rodriguez-Vega, C. Canudas-de-Wit, G. De Nunzio, and B. Othman, “A graph-based mobility model for electric vehicles in urban traffic networks: Application to the grenoble metropolitan area,” in European Control Conference (ECC), Bucarest, Rumania, 2023.

[13] R. Mourgues, M. Rodriguez-Vega, and C. Canudas-De-Wit, “Optimal location of evs public charging stations based on a macroscopic urban electromobility model,” in IEEE Conference on Decision and Control (CDC), 2023.