# Self-Consumption and Frequency Reserve Provision with Energy Communities

Alyssa Diva Mustika, Rémy Rigo-Mariani, Vincent Debusschere, Amaury Pachurka

► To cite this version:

Alyssa Diva Mustika, Rémy Rigo-Mariani, Vincent Debusschere, Amaury Pachurka. Self-Consumption and Frequency Reserve Provision with Energy Communities. IEEE Access, 2023, 11, pp.83666-83679. 10.1109/ACCESS.2023.3301159. hal-04177884

HAL Id: hal-04177884

https://hal.science/hal-04177884

Submitted on 6 Aug 2023

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
# Self-Consumption and Frequency Reserve Provision with Energy Communities

ALYSSA DIVA MUSTIKA<fnref n="1" />,<fnref n="2" />, RÉMY RIGO-MARIANI<fnref n="1" />, VINCENT DEBUSSCHERE<fnref n="1" />, (Senior, IEEE) and AMAURY PACHURKA<fnref n="2" />

Corresponding author: Alyssa Diva Mustika (e-mail: alyssa-diva.mustika@g2elab.grenoble-inp.fr).

This work was supported in part by the Association Nationale Recherche Technologie (ANRT) for French CIFRE fellowship funding (n°2020/0783).

## ABSTRACT

The increased concern for greener and more sustainable energy has prompted the wide development of local initiatives such as energy communities (EC) in which several users can be gathered to reach more efficient energy usage. This paper presents an optimization method to evaluate the benefits of an EC along two axes – i) the self-consumption of the local generation and ii) the remuneration from participation in the balancing market, especially for the manual frequency restoration of the tertiary reserve. In the proposed method, a compromise is built between the energy management strategy of the local EC and its flexibility contribution to grid services. In particular, we provide a framework to define reference profiles that allows assessing actual contribution in balancing services – i.e., upward/downward actions. A sensitivity study on two activation parameters for the reserve provision is also performed, namely duration and level of activation. Our results highlight the necessary trade-off to allow a profitable EC with a minimum bill and high balancing revenues. A case study of real EC located in the south of France shows that participating in the balancing market could result in 4.8-13.3% cost savings, depending on the balancing price scenarios, with most revenues coming from the upward regulation. With a 25% activation ratio and a participation time of only three hours per day, the obtained cost saving remains significant, at 9.5%.

**INDEX TERMS** Energy management, Distributed energy resources, Flexibility market, Grid services, Local energy systems, Renewable energy

## NOMENCLATURE

### ABBREVIATIONS

<table><tr><td>CSC</td><td>Collective self-consumption</td></tr><tr><td>DER</td><td>Distributed energy resources</td></tr><tr><td>DSO</td><td>Distribution system operator</td></tr><tr><td>EC</td><td>Energy community</td></tr><tr><td>EMS</td><td>Energy management strategy</td></tr><tr><td>KOR</td><td>Keys of repartition</td></tr><tr><td>mFRR</td><td>Manual frequency restoration reserve</td></tr><tr><td>PMO</td><td>Moral organizing entity</td></tr><tr><td>PV</td><td>Photovoltaic</td></tr><tr><td>SOC</td><td>State of charge</td></tr><tr><td>TSO</td><td>Transmission system operator</td></tr><tr><td>SC</td><td>Self-consumption</td></tr><tr><td>SCR</td><td>Self-consumption ratio</td></tr><tr><td>SSR</td><td>Self-sufficiency ratio</td></tr><tr><td>RR</td><td>Replacement reserve</td></tr></table>

### SETS

$\mathcal{N}$ Community members, indexed by $n$

$\mathcal{T}$ Time intervals, indexed by $t$

### PARAMETERS

$\alpha_t^u / \alpha_t^d$ Binary parameter to represent the occurence of balancing activation for upward/downward direction at time $t$

$\beta$ Ratio between activated balancing energy and procured capacity

$\Delta t$ Simulation time step

$\mu_n^{bat}$ Battery efficiency of individual $n$

$\pi^{com+} / \pi^{gd+}$ Buying price in the community/grid

$\pi^{com-} / \pi^{gd-}$ Selling price in the community/grid

$\pi_t^{cap}$ Price for the capacity reserve at time $t$

<footnote n="1">¹Univ. Grenoble Alpes, CNRS, Grenoble INP, G2Elab, France</footnote>

<footnote n="2">²Sween, Montpelier, France</footnote>
$$ \pi_t^{ener,u} / \pi_t^{ener,d} $$

$$ P_{n,t}^{load} $$

$$ P_{n,t}^{PV} $$

$$ P_{n}^{subs} $$

$$ \text{SOC}_{\text{min},n}^{\text{bat}} / \text{SOC}_{\text{max},n}^{\text{bat}} $$

Price for the energy activated for upward/downward regulation at time t
Electricity consumption of individual n at time t

PV production of individual n at time t

Subscription power of individual n

Minimum/maximum SOC level of battery of individual n

$$ P_{coll,t}^{surplus} $$

$$ P_{n,t}^{bat,u} / P_{n,t}^{bat,d} $$

$$ P_{coll,t}^{u} / P_{coll,t}^{bat,d} $$

$$ P_{n,t}^{act,u} / P_{n,t}^{act,d} $$

individual n at time t

Collective surplus at time t

Capacity reserve power contributed to the balancing market for upward/downward direction of individual n at time t

Capacity reserve power contributed to the balancing market for upward/downward direction for the whole community at time t

Reserve power that is actually activated for upward/downward direction of individual n at time t

Reference power profile as forecast to measure actual balancing contribution for the whole community at time t

Reference power profile of individual n at time t

Reference power profile for net consumer/producer n

SOC of battery of individual n at time t

Binary variable for the pair ($P_{n,t}^{meter^+}$, $P_{n,t}^{meter^-}$) at time t

Binary variable for the pair ($P_{n,t}^{bat^+}$, $P_{n,t}^{bat^-}$) at time t

Binary variable for the pair ($P_{coll,t}^{u}$, $P_{coll,t}^{d}$) at time t

## VARIABLES

$$ \lambda_{n,t} $$

$$ B_n $$

$$ B_n^{gd} / B_n^{com} $$

$$ B_{coll} $$

$$ B_{coll}^{u} / B_{coll}^{d} $$

$$ B_n^{final} $$

$$ B_n^{bal} $$

$$ B_n^{base} $$

$$ B_n^{arbi} $$

$$ f_1 $$

$$ f_2 $$

$$ f_3 $$

$$ P_{n,t}^{com^+} / P_{n,t}^{gd^+} $$

$$ P_{n,t}^{com^-} / P_{n,t}^{gd^-} $$

$$ P_{n,t}^{meter^+} / P_{n,t}^{meter^-} $$

$$ P_{n,t}^{meter} $$

$$ P_{n,t}^{com} / P_{n,t}^{gd} $$

$$ P_{n,t}^{indsc} $$

$$ P_{n,t}^{bat^+} / P_{n,t}^{bat^-} $$

$$ P_{n,t}^{bat,EC^+} / P_{n,t}^{bat,EC^-} $$

$$ P_{n,t}^{alloc} $$

Keys of repartition applied to individual n at time t

Electricity bill for individual n

Grid/community bill for individual n

Total electricity bill for the whole community

Remuneration of balancing market for upward/downward regulation for the community

Final electricity bill for individual n

Revenue from the balancing market for individual n

Electricity bill in the baseline case (without balancing participation) for individual n

Electricity bill (for a scenario with balancing participation) that consists of energy arbitrage with the community and the grid for individual n

Objective function of EMS and balancing participation model

Objective function of community energy allocation through KOR

Objective function of balancing revenue allocation

Power imported from the community/grid of individual n at time t

Power exported to the community/grid of individual n at time t

Power imported/exported at the home meter of individual n at time t

Power measured physically at the home meter of individual n at time t

Power exchanged contractually with the community/grid of individual n at time t

Individual self-consumed power of member n at time t

Battery charge/discharge power of individual n at time t

Battery charge/discharge power that is used for energy arbitrage of individual n at time t

Power allocated from community to

$$ P_{coll,t}^{ref} $$

$$ P_{n,t}^{ref} $$

$$ P_{n,t}^{ref^+} / P_{n,t}^{ref^-} $$

$$ SOC_{n,t}^{bat} $$

$$ u_t^{meter} $$

$$ u_t^{bat} $$

$$ u_t^{bal} $$

# I. INTRODUCTION

SHIFTING from fossil fuels to cleaner renewable energy in the context of energy transition creates the need of integrating more distributed energy resources (DER), which usually consist of small-scale electricity generation and storage technologies. In particular, the decentralization of the electricity system is driving the growth of renewable energy closer to the point of consumption in residential areas. Thus, consumers nowadays have the possibility to be at the heart of the energy transition with the possibility to own individual energy assets and turn into *prosumers* – i.e., electricity end-users that can act as consumers and producers thanks to the installed local generation. Those users can then be more independent from the conventional electricity system by performing self-consumption (SC) where the generated energy from DERs is consumed locally [1].

Furthermore, several individuals can now organize themselves as an energy community (EC) to create a more significant environmental impact while sharing clean energy locally and acting as a single entity to offer more services. Numerous studies have investigated different benefits of ECs such as increased energy efficiency and lower bill for community members [2]. In this context, the European Union has published a document called the “Clean Energy for All Europeans”, which is commonly referred to as the “Clean Energy Package” (CEP). This package aims to promote re-
newable energy among citizens. Today, Germany, Denmark, and the Netherlands are leading in the implementation of EC initiatives in Europe [3], [4]. In 2015, France was the first EU Member State to propose a scheme for local actors to invest together in renewable projects [5].

In this paper, energy communities are analyzed through the concept of *collective self-consumption* (CSC). While traditional SC refers to a single and independent end-user consuming the energy it produces locally, the idea of CSC is to aggregate different production as well as consumption profiles and take advantage of heterogeneous energy usages. In other words, any surplus of local generation at the individual level can be self-consumed by other users in the community, which then buy less energy from their energy retailers. It allows exploiting the full potential of DER by clustering the resources and reducing the degree of uncertainty coming from domestic load and variable generation (variance effect). The implementation of CSC in most countries is rather slow due to the lack of an appropriate regulatory landscape [6] and citizen awareness, but it is expected to speed up in the coming years.

An operation of SC in France is considered collective when there are one or more producers and one or more consumers organized together around a legal entity called “*Personne Morale Organisatrice*” (PMO, for Moral Organizing Entity), which serves as a community manager. The points of energy delivery of all the community members shall be located on the low-voltage grid [7] within a 2 km maximum geographical perimeter and a 3 MW maximum cumulative installed generation [8]. Moreover, each member shall be equipped with smart meters that enable data collection of energy measurement performed by the distribution system operator (DSO) [9].

CSC naturally leads to more efficient energy usage and lower electricity bills as users tend to purchase less from their conventional retailers. Additional revenue streams could come from the participation of EC in the balancing market to further improve the profitability of energy communities [10]. Indeed, the modern electricity network requires more balancing between production and consumption, notably due to the intermittency and volatility of renewable energy [11]. European Network of Transmission System Operators (ENTSO-E) defines “*balancing*” as actions performed by the transmission system operator (TSO) to ensure supply is equal to demand in and near real-time after markets have closed (gate closure) [12]. Different balancing market frameworks in some European countries have been described by [13] related to their characteristic and compatibility for small actors. The resulting revenues from grid services depend greatly on the administration and technical requirements such as minimum bid size (i.e., quantity), symmetric offer, product resolution, and activation (occurrence and duration). However, the provision of reserve services can be at the expense of the energy sufficiency of the community [14]. Additionally, even though there is remaining energy in storage systems after community consumption, the amount may not be adequate to provide reserves to the upstream grid.

In France, the balancing is divided into ancillary services

(automatic activation – primary and secondary reserve) and balancing mechanisms (manual activation – tertiary reserve). On the latter, there are two different market products: (1) mFRR, for manual frequency restoration reserve, that can be dispatched in less than 15 min and for at least 2 h, and (2) RR, for replacement reserve, that can be activated in less than 30 min and for at least 1.5 h [15]. We focus only on mFRR product as it was not worth investigating two reserve products at the same time for some reasons. It may reduce the understanding and shift focus from the provision by the energy community itself, and preliminary studies show that settlement for RR is not significant compared to mFRR.

The scope of the paper is to investigate the opportunities for an EC to provide mFRR in addition to conventional operations that maximize the self-consumption (SC) for more efficient energy usage [3]. For instance, a residential EC can coordinate batteries belonging to different users to provide upward/downward reserve upon receiving activation signals. This will result in a modified overall *community power*, different from the one scheduled for conventional operations [14].

A study by [16] proposes a stochastic optimization model for aggregated residential users with PV-battery systems to provide flexibility in the balancing market. To perform both the energy arbitrage (maximum SC) and frequency control services, a study by [17] allocates a fraction of the energy storage's capacity (both in terms of power and energy) for energy management strategy while the remaining is dedicated to the reserve provision. This “partition” approach between energy scheduling/management and balancing services has been widely used in the literature [2]. Similarly, this concept is applied to renewable generation (e.g., PV and wind) and called the de-rating percentage – for instance allocating 5% to 20% of production for reserve purposes [18].

The participation in balancing markets, particularly for mFRR products, has been studied with regulation provided by aggregated prosumers using controllable generation, storage, and programmable loads [19] or by a local EC that determines reserve capacity first and real-time operation to fulfill the activated balancing energy next [20]. The latter work estimates flexibility in day-ahead scheduling by considering load and PV forecasts, then updates both in real-time simulations upon receiving activation signals from TSO.

The majority of the existing literature focuses on power aggregation that can be offered as flexibility but ignores the internal exchange/sharing between community members that are at the core of the EC organization with the priority for local energy use. In other words, the provision of flexibility services shall be designed to maintain the EC's performance in terms of energy management. Moreover, it is still unclear how the participants of an EC can individually benefit from the integration in the balancing market.

This paper then proposes an optimization formulation that simulates energy communities participating in the balancing mechanism as an additional service to the main grid. It also allows us to analyze the results both from the collective and
individual member perspectives. The main contributions of this paper are the following:

* An optimization model for an energy community that provides balancing grid services in the form of mFRR, aiming to determine the best trade-off between the self-consumption of an energy community and the revenues from the balancing market;

* A framework to define the actual balancing contribution of an energy community that is based on a reference profile for verification purposes;

* An allocation strategy to distribute community energy, followed by the sharing rules of balancing revenues among its members;

* A sensitivity analysis on the model parameters of activation signals used for reserve provision.

The rest of this paper is organized as follows. Section II introduces the EC framework and describes the balancing concept as well as the proposed optimization model. The use case is then described in Section III where results are analyzed in terms of economic performances at both community and individual levels. Finally, Section IV concludes this paper and provides points for future works.

## II. MODEL DESCRIPTION

### A. ENERGY COMMUNITY FRAMEWORK

The regulatory landscape of typical ECs is shown in Fig. 1 where a community manager takes care of the overall community and facilitates communication with third parties. The community manager has the important task of sending the energy allocation ratio among members to the DSO. In France, the CSC regulation defines this energy-sharing ratio among community members as keys of repartition (KOR). Those coefficients represent the share of collective energy that is distributed to each member of the community [21]. Using the KOR and actual measurements from the individual smart meter of each member, the DSO can compute the part of users' energy that is purchased or sold from/to the community or the conventional retailer at 30 min intervals. These KOR values then impact the final individual bill based on the amount of community generation end-users buy or sell relative to their local consumption or generation.

When ECs participate in the balancing market, the community manager has additional tasks of sending the balancing offer to the TSO and receiving activation orders from the TSO [22]. Then, the community manager forwards the activation orders from the TSO to the prosumers in the community. According to the French TSO, remuneration from the balancing market is settled and paid monthly. In the case of participation from energy communities, we propose that the balancing revenue be coordinated between the TSO and the community manager, who will then distribute it among community members.

The architecture of a typical EC is illustrated in Fig. 2 where the output of DERs such as PV and battery, as well as the power flows from/to the grid and community are

<figure><img src="image_2.png" /><figcaption>FIGURE 1. Different stakeholders in energy communities.</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>FIGURE 2. Typical energy community architecture.</figcaption></figure>

highlighted for each member $n$ at time $t$. Note that the only physical measurable flows are at the meter level ($P_{n,t}^{meter}$). The measured value is then mathematically decomposed as the grid ($P_{n,t}^{gd}$) and community ($P_{n,t}^{com}$) contributions, as expressed in (1). To facilitate bidirectional power flows that may occur as exchanges with the main grid and community, we model import power flows with positive superscript (+) while exports with negative superscript (-) which are described in (1).

$$P_{n,t}^{meter} = P_{n,t}^{gd} + P_{n,t}^{com} \quad \text{with} \quad \begin{cases} P_{n,t}^{meter} = P_{n,t}^{meter} + P_{n,t}^{meter} \\ P_{n,t}^{gd} = P_{n,t}^{gd} - P_{n,t}^{gd} \\ P_{n,t}^{com} = P_{n,t}^{com} - P_{n,t}^{com} \end{cases} \quad (1)$$

The cost or revenue for every member (and thus the community as a whole) ultimately depends on the amount of energy traded with either the community or the grid (i.e., through conventional retailers). This amount is determined with the KOR ($\lambda_{n,t}$) for all members that shall be lower than 100%, as described in (2). Those KOR are applied to the total net production measured at the individual power meter level (i.e., the summation of prosumers that generate energy at a given time step) which allows computing the share for every end-users, as expressed in (3). However, if the KOR are not properly designed, some of the allocated
power ($P_{n,t}^{alloc}$) may not be absorbed by the members due to the net consumption ($P_{n,t}^{meter^+}$) being lower than the allocation provided by the community, as expressed in (4). Remind that any deficit (i.e., the demand of a user that is not covered by its share of community generation), on 30 min basis, is supplied by traditional energy retailers in the CSC framework (5).

$$ \sum_{n \in \mathcal{N}} \lambda_{n,t} \le 100\% \qquad (2) $$

$$ P_{n,t}^{alloc} = \lambda_{n,t} \times \sum_{n \in \mathcal{N}} P_{n,t}^{meter^{-}} \qquad (3) $$

$$ P_{n,t}^{com^+} = \min \left( P_{n,t}^{alloc}; P_{n,t}^{meter^+} \right) \qquad (4) $$

$$ P_{n,t}^{gd^+} = P_{n,t}^{meter^+} - P_{n,t}^{com^+} \qquad (5) $$

Furthermore, the collective surplus power ($P_{coll,t}^{surplus}$) perceived by the main grid is the total net production minus the total power exchange at the community level at a given time step – i.e., the part of the community generation that is not absorbed by community members, as expressed in (6). Then, this surplus is sold to the upstream grid and distributed among the net producers in the community based on their level of production (i.e., prorate of production), as described in (7). Hence, the amount of energy sold to the community ($P_{n,t}^{com^-}$) is the difference between the net generation measured at the meter and the exported energy to the grid, as shown in (8).

$$ P_{coll,t}^{surplus} = \sum_{n \in \mathcal{N}} P_{n,t}^{meter^{-}} - \sum_{n \in \mathcal{N}} P_{n,t}^{com^+} \qquad (6) $$

$$ P_{n,t}^{gd^{-}} = \frac{P_{n,t}^{meter^{-}}}{\sum_{n \in \mathcal{N}} P_{n,t}^{meter^{-}}} \times P_{coll,t}^{surplus} \qquad (7) $$

$$ P_{n,t}^{com^{-}} = P_{n,t}^{meter^{-}} - P_{n,t}^{gd^{-}} \qquad (8) $$

Ultimately, individual energy bills can be computed monthly using the observed meter flows (with a 30 min time-step resolution) and a chosen strategy for community energy sharing (i.e., allocation through KOR with a time resolution of 30 min). For every member, the bill consists of one payment/invoice from the upstream grid through conventional power suppliers ($B_n^{gd}$) and another from the community ($B_n^{com}$), as expressed in (9) and (10) where $\Delta t$ is the used time resolution compared to the hourly energy price. The monthly individual bill ($B_n$) that considers the grid electricity price ($\pi^{gd^+}$), the feed-in tariff ($\pi^{gd^-}$), and the internal community prices ($\pi^{com^+}$, $\pi^{com^-}$) is computed following (11) to finally assess the community bill as the sum of individual ones in (12).

$$ B_n^{gd} = \left( \pi^{gd^+} \times \sum_{t \in \mathcal{T}} P_{n,t}^{gd^+} - \pi^{gd^-} \times \sum_{t \in \mathcal{T}} P_{n,t}^{gd^-} \right) \times \Delta t \qquad (9) $$

$$ B_n^{com} = \left( \pi^{com^+} \times \sum_{t \in \mathcal{T}} P_{n,t}^{com^+} - \pi^{com^-} \times \sum_{t \in \mathcal{T}} P_{n,t}^{com^-} \right) \times \Delta t \qquad (10) $$

$$ B_n = B_n^{gd} + B_n^{com} \qquad (11) $$

$$ B_{coll} = \sum_{n \in \mathcal{N}} B_n \qquad (12) $$

## B. BALANCING MARKET

This paper aims to investigate balancing mechanisms as an additional revenue stream for the community. Rather than ancillary services (primary and secondary reserve with automatic activation), the tertiary reserve with manual activation is considered, more precisely the mFRR product. We focus on the mFRR as it is more rewarding compared to RR based on preliminary studies, and observing only one balancing product allows us to give attention more to the performance of EC itself. In France, the TSO defines two markets and remunerations related to those services [13]:

* **Reserve capacity<fnref n="1" />** – Paid for the available power (in €/MW) through daily tender at a marginal price ($\pi_t^{cap}$). Bids for the capacity reserve are available only in the upward direction to mitigate the shortage of generation. However, in the paper, this product is modeled through a symmetric formulation (i.e., includes both upward and downward regulation similar to typical balancing products), leading to simpler results interpretation.

* **Activated energy<fnref n="2" />** – Paid for the energy (in €/MWh) that is activated with different energy prices for upward ($\pi_t^{ener,u}$) and downward ($\pi_t^{ener,d}$) reserve. Participants who have been accepted in the capacity reserve market and others who did not participate in the capacity reserve market can submit energy bids to the balancing energy market.

The participation of an EC in the balancing market is modeled here as the aggregated participation of all the members of the community by considering only the residential batteries as the source of flexibility offered to the grid (see Fig. 3) – for both upward ($P_{n,t}^{bat,u}$) and downward ($P_{n,t}^{bat,d}$) regulation at a given time step. In other words, we simply consider the upward regulation as an increase in battery discharge and the downward regulation as an increase in battery charge.

In the implemented simulation setup, activation signals of the reserve in terms of occurrences and quantity are represented through two input parameters: (1) $\alpha_t^u$ and $\alpha_t^d$ – binary values representing the occurrence of activation in each direction at a given time step and (2) $\beta$ – a ratio between the

<footnote n="1">¹Manual frequency restoration reserve and replacement reserve terms and conditions by Réseau de transport d'électricité (RTE), Paris, 2022.</footnote>

<footnote n="2">²Terms and Conditions relating to Scheduling, the Balancing Mechanism and Recovery of Balancing Charges Section 1, by Réseau de transport d'électricité (RTE), Paris, 2021.</footnote>
<figure><img src="image_4.png" /><figcaption>FIGURE 3. Flows in an EC participating in the balancing market.</figcaption></figure>

reserve that is activated and the procured capacity [23]. Thus, the activated balancing energy ($P_{n,t}^{act,d}$, $P_{n,t}^{act,u}$) for downward and upward regulation from the batteries can be computed with (13) and (14). The total capacity that is offered by the whole EC in the procured reserve market is the summation of the offer by each residential battery as in (15) and (16).

$$P_{n,t}^{act,u} = \alpha_t^u \times \beta \times P_{n,t}^{bat,u} \quad (13)$$

$$P_{n,t}^{act,d} = \alpha_t^d \times \beta \times P_{n,t}^{bat,d} \quad (14)$$

$$P_{coll,t}^{u} = \sum_{n \in \mathcal{N}} P_{n,t}^{bat,u} \quad (15)$$

$$P_{coll,t}^{d} = \sum_{n \in \mathcal{N}} P_{n,t}^{bat,d} \quad (16)$$

Ultimately, the expected remuneration from the balancing market is computed using (17) and (18) where a positive value for upward energy price ($\pi_t^{ener,u}$) indicates that the TSO pays the EC, while a positive value for downward energy price ($\pi_t^{ener,d}$) indicates that the EC pays the TSO by convention.

$$B_{coll}^{u} = \sum_{t \in \mathcal{T}} \left( P_{coll,t}^{u} \times (\pi_t^{cap} + \alpha_t^u \times \beta \times \pi_t^{ener,u} \times \Delta t) \right) \quad (17)$$

$$B_{coll}^{d} = \sum_{t \in \mathcal{T}} \left( P_{coll,t}^{d} \times (\pi_t^{cap} - \alpha_t^d \times \beta \times \pi_t^{ener,d} \times \Delta t) \right) \quad (18)$$

### C. OPTIMIZATION STRATEGY TO ASSESS COMMUNITY COST

We model both the energy management strategy for internal community operations and the participation of the EC in the balancing market as a single mixed-integer linear programming (MILP) optimization in which the energy and

power from the individual members, community, and balancing mechanism are modeled as constraints. The decision variables are formulated as positive semi-definite for every household n and at every time step t while the physical degree of freedom consists of the charge/discharge of the battery.

#### 1) Problem Formulation

As specified in Section II-B, the actual reserve contribution consists of a portion of the battery capacity at each time step. Apart from that, the batteries are also used for energy arbitrary purposes in the community ($P_{n,t}^{bat,EC^+}$, $P_{n,t}^{bat,EC^-}$) such that the total battery output for each household ($P_{n,t}^{bat^+}$, $P_{n,t}^{bat^-}$) can be computed through (19) and (20). Hence, the physical power measured at the meter level is formulated based on the scheduled power flow of the EC and its contribution to the balancing grid services as in (21) and (22).

$$P_{n,t}^{bat^+} = P_{n,t}^{bat,EC^+} + P_{n,t}^{act,d} \quad (19)$$

$$P_{n,t}^{bat^-} = P_{n,t}^{bat,EC^-} + P_{n,t}^{act,u} \quad (20)$$

$$P_{n,t}^{meter^+} = P_{n,t}^{gd^+} + P_{n,t}^{com^+} + P_{n,t}^{act,d} \quad (21)$$

$$P_{n,t}^{meter^-} = P_{n,t}^{gd^-} + P_{n,t}^{com^-} + P_{n,t}^{act,u} \quad (22)$$

To restrict the direction of some power flows (whether import or export, upward or downward) in the model, binary decision variables are introduced: $u_{n,t}^{meter}$ for the pair ($P_{n,t}^{meter^+}$, $P_{n,t}^{meter^-}$), $u_{n,t}^{bat}$ for ($P_{n,t}^{bat^+}$, $P_{n,t}^{bat^-}$), and $u_{n,t}^{bal}$ for ($P_{coll,t}^{u}$, $P_{coll,t}^{d}$). The last binary variable is modeled to make sure that all members have the same regulation direction (either upward or downward) at every time step, ensured with constraints in (23) and (24). The import and export power flows at the meter level – refer to (21) and (22) – are constrained by the subscribed power ($P_n^{subs}$) of each household as expressed in (25) and (26).

$$P_{coll,t}^{u} \le \left( \sum_{n \in \mathcal{N}} P_{max,n}^{bat} \right) \times u_{n,t}^{bal} \quad (23)$$

$$P_{coll,t}^{d} \le \left( \sum_{n \in \mathcal{N}} P_{max,n}^{bat} \right) \times (1 - u_{n,t}^{bal}) \quad (24)$$

$$P_{n,t}^{meter^+} \le P_n^{subs} \times u_{n,t}^{meter} \quad (25)$$

$$P_{n,t}^{meter^-} \le P_n^{subs} \times (1 - u_{n,t}^{meter}) \quad (26)$$

The battery output is limited by its maximum charge/discharge power and the operating range of state of charge (SOC) as in (27) - (29). Besides, the SOC value at the beginning and at the end of the simulation horizon should be equal to ensure energy conservation, as expressed in (30). The SOC update at the next time step follows the constraint in (31) considering the battery's efficiency ($\mu_n^{bat}$) that represents the considered model for the storage assets. Remind that $P_{n,t}^{bat^+}$, $P_{n,t}^{bat^-}$ refers to equations (19) and (20) that includes a part for community energy use and another for the activated balancing energy.
$$P_{n,t}^{bat,EC^+} + P_{n,t}^{bat,d} \le P_{max,n}^{bat} \times u_{n,t}^{bat} \quad (27)$$

$$P_{n,t}^{bat,EC^-} + P_{n,t}^{bat,u} \le P_{max,n}^{bat} \times (1 - u_{n,t}^{bat}) \quad (28)$$

$$SOC_{min,n}^{bat} \le SOC_{n,t}^{bat} \le SOC_{max,n}^{bat} \quad (29)$$

$$SOC_{n,1}^{bat} = SOC_{n,end}^{bat} = SOC_{init}^{bat} \quad (30)$$

$$SOC_{n,t+1}^{bat} = SOC_{n,t}^{bat} + \left( P_{n,t}^{bat^+} \times \mu_n^{bat} - \frac{P_{n,t}^{bat^-}}{\mu_n^{bat}} \right) \times \Delta t \times \frac{100}{E_{max,n}^{bat}} \quad (31)$$

The next constraints are the power balance at the member level at every time step considering the instantaneous local load ($P_{n,t}^{load}$) and generation ($P_{n,t}^{PV}$). The balance expressed in (32) also embeds the battery dedicated for community use, which is then consumed individually ($P_{n,t}^{indsc}$) or exported to the grid/community. Similarly, the total demand of the household comes not only from the house's electricity usage but also the battery charging (33). Furthermore, the last constraint is related to the overall power balance at the community level (34).

$$P_{n,t}^{PV} + P_{n,t}^{bat,EC^-} = P_{n,t}^{indsc} + P_{n,t}^{gd^-} + P_{n,t}^{com^-} \quad (32)$$

$$P_{n,t}^{load} + P_{n,t}^{bat,EC^+} = P_{n,t}^{indsc} + P_{n,t}^{gd^+} + P_{n,t}^{com^+} \quad (33)$$

$$\sum_{n \in \mathcal{N}} P_{n,t}^{com^+} = \sum_{n \in \mathcal{N}} P_{n,t}^{com^-} \quad (34)$$

Based on the presented models, the objective function is to minimize the overall cost that consists of the community cost defined in (12) minus the balancing market revenue from (17) and (18).

$$f_1 = \min \left[ B_{coll} - (B_{coll}^u + B_{coll}^d) \right] \quad (35) \\ \text{s.t.} \quad (19) - (34)$$

## 2) Performance Metrics

In addition to the economic criteria, two metrics are introduced to assess the performance of the community: 1) self-sufficiency ratio (SSR) and 2) self-consumption ratio (SCR). The metric SSR is the ratio of consumption that can be supplied by local generations while SCR is the portion of local generations that are absorbed locally. These metrics are important, especially for ECs that provide balancing services where some of the local energy will be transacted for external usage. Mathematically, SSR can be computed by excluding the amount of imported energy obtained from grid arbitrage and the activated downward energy, as expressed in (36). Similarly, the calculation of SCR is performed by excluding the exported energy from the grid and the activated upward energy, as shown in (37).

$$SSR = 1 - \frac{\sum_{n \in \mathcal{N}} \sum_{t \in \mathcal{T}} \left( P_{n,t}^{gd^+} + P_{n,t}^{act,d} \right)}{\sum_{n \in \mathcal{N}} \sum_{t \in \mathcal{T}} P_{n,t}^{load}} \quad (36)$$

$$SCR = 1 - \frac{\sum_{n \in \mathcal{N}} \sum_{t \in \mathcal{T}} \left( P_{n,t}^{gd^-} + P_{n,t}^{act,u} \right)}{\sum_{n \in \mathcal{N}} \sum_{t \in \mathcal{T}} P_{n,t}^{PV}} \quad (37)$$

After the simulation for the energy management strategy and balancing participation has been run, the next step is to perform the cost/benefit allocation to community members. The allocation of community energy through the KOR that minimizes the total bill for the internal community and the grid is executed based on previous work [24]. Then, the remuneration from the balancing market is distributed to each member in the fairest possible way. This topic on individual bill calculation will be further described in Section III-B2.

# D. REFERENCE PROFILE TO MEASURE ACTUAL RESERVE CONTRIBUTION

The remuneration for the balancing energy provided is based on the expected volume to be delivered upon receiving the balancing order (activation) [25]. One key aspect is to measure the volume activated. Indeed, this is not obvious as the flow at the meter level is a superposition of the community energy usage and the activated reserve.

In particular, frameworks for balancing mechanisms usually define the activated volume as the difference between a reference curve and the actual load (i.e., actual measurement). Three methods can be potentially applied to define the reference profile [25].

1) Single rectangle: the reference is the average power observed at the previous half-hour interval.

2) Demand forecast: the forecast is in advance (e.g., one day before delivery) in the form of a baseline curve that may be updated up until one hour before the delivery time.

3) Consumption history:

* 10-day mean variant (moving average): the reference is equal to the average value at the same time step over the past 10 days.

* 10-day median variant: similar to the 10-day mean variant but takes the median value instead of the average value.

* 4-week mean variant: similar to the 10-day mean variant but computed over 4 weeks of data instead of 10 days.

* 4-week median variant: similar to the 4-week mean variant but takes the median value instead of the average value.

Among the three options mentioned above, the most popular in the literature is the demand forecast which is computed through day-ahead operational scheduling [26], [27]. However, it is important to note at this stage that, in this paper, simulations are performed in an offline mode. Rather than proposing an actual strategy for operational planning,
the objective here is to assess the potential arbitrage between energy management and the provision of balancing grid services. Data are deterministic such that we suppose to have perfect forecast data for household consumption and solar PV production in the energy community. A more accurate approach shall be investigated, for example, a method of model predictive control, which is not the scope of this paper.

In the proposed optimization model, we differentiate the power offered to the balancing market from the community management – i.e., after the simulation is done, we take the part of community energy management to be the reference profile (as a forecast in the demand forecast method). This reference profile for the whole community is expressed in (38) which comes from the summation of individual reference curves computed in (39).

$$P_{\text{coll},t}^{\text{ref}} = \sum_{n \in \mathcal{N}} P_{n,t}^{\text{ref}} \qquad (38)$$

$$P_{n,t}^{\text{ref}} = P_{n,t}^{\text{gd}^{+}} + P_{n,t}^{\text{com}^{+}} - P_{n,t}^{\text{gd}^{-}} - P_{n,t}^{\text{com}^{-}} \qquad (39)$$

## E. ENERGY ALLOCATION AND BENEFIT SHARING

After running the operational phase that determines the battery control in the community, this section analyzes: i) the allocation strategy of the community energy among members through KOR computation that affects the energy bills considering exchanges with the upstream grid and with the community, and ii) the sharing of the balancing revenues that could lower the final bills.

### 1) Allocation Strategy of Community Energy

The individual bill of each member of the EC is based on the sharing rules (i.e., KOR) of the total generated community energy. Several options to define the KOR have been discussed in previous work [24]. In this paper, we adopt the KOR that minimize the total individual bills coming from the energy trading with the main grid (through energy retailers) and within the community, excluding the remuneration from the balancing market, as expressed in (40).

$$f_2 = \min_{s.t.} B_{\text{coll}} \qquad (40)$$

Here, the KOR at each time step for every user are decision variables in the optimization formulation while the constraints refer to the equations of KOR ($\lambda_{n,t}$) described previously in Section II-A. The reference power meter ($P_{n,t}^{\text{ref}}$) from the result of the previous optimization will be the input parameter for the second optimization performed monthly. The KOR is imposed on the reference profiles that act as the net individual powers for the benefit allocation of collective self-consumption – i.e., $P_{n,t}^{\text{meter}^{+}}$, $P_{n,t}^{\text{meter}^{-}}$ in (3) – (8) are replaced with $P_{n,t}^{\text{ref}^{+}}$, $P_{n,t}^{\text{ref}^{-}}$. The members who act as net consumers (positive $P_{n,t}^{\text{ref}^{+}}$) and net producers (positive $P_{n,t}^{\text{ref}^{-}}$) at each time step can be determined with (41) and (42).

$$P_{n,t}^{\text{ref}^{+}} = \max \left( P_{n,t}^{\text{ref}}, 0 \right) \qquad (41)$$

$$P_{n,t}^{\text{ref}^{-}} = -\min \left( P_{n,t}^{\text{ref}}, 0 \right) \qquad (42)$$

Similar to the energy allocation through the KOR concept, the balancing revenue can be distributed among the community members in such a way that all individuals benefit from the collective decision to enter the balancing market, as we will discuss in the following section.

### 2) Allocation Strategy for Balancing Revenue

Individual users could participate in the balancing services thanks to the aggregation in the EC (e.g., to reach the minimum bid quantity). Remind that the community manager is the actual balancing service provider – i.e., members cannot bid to the balancing market individually without the existence of a community. Thus, it is reasonable to distribute the benefits among all parties involved, including the community manager, based on their respective contributions and responsibilities. In this context, a business model can be proposed, for instance by assigning a percentage of collective balancing revenue that can be used to fund the future installation of DER. A study by [10] assigns 80% of the total income to the prosumers while the rest is used for community management. However, this subject is out of the scope of this paper.

Instead, in this paper, the monthly balancing revenue is shared among the community members only, in such a way that everyone can at least gain something from the collective decision to enter the balancing market. From the previous sections, we perform simulations for a case where the community engages in the balancing market and the opposite case – i.e., without participation in the balancing market (the baseline case). The energy allocation (through KOR) for the baseline case yields individual energy bills denoted as $B_n^{\text{base}}$ while the other case with participation in the balancing market has individual bills denoted as $B_n^{\text{arbi}}$. Note that $B_n^{\text{arbi}}$ contains only the energy arbitrage with the grid and the community and the members’ revenue from the balancing market ($B_n^{\text{bal}}$) is computed in this section. The final cost ($B_n^{\text{final}}$) for each member is the energy arbitrage cost ($B_n^{\text{arbi}}$) minus the revenue from the balancing market ($B_n^{\text{bal}}$), as expressed in (43).

$$B_n^{\text{final}} = B_n^{\text{arbi}} - B_n^{\text{bal}} \qquad (43)$$

Similar to the KOR computation, the sharing of balancing revenue is modeled as an optimization problem that maximizes the minimum bill reduction ratio in the community, as expressed in (44). This objective is to reach the fairest distribution among the members. It is necessary to separate the optimization for the balancing revenue from the two previous optimization models so that each member could benefit from the joint decision to provide grid services – i.e., not only users who have storage systems “behind-the-meter”.

$$f_3 = \max \min \left\{ \frac{B_n^{\text{base}} - B_n^{\text{final}}}{B_n^{\text{base}}} \mid \forall n \in \mathcal{N} \right\} \qquad (44)$$
<table><caption>TABLE 1. DER assets of members in the community</caption><thead><tr><th>House</th><th>PV (kW)</th><th>Battery (kW/kWh)</th><th>Subscription Power (kVA)</th></tr></thead><tbody><tr><td>1</td><td>3.2</td><td>5/9.8</td><td>18</td></tr><tr><td>2</td><td>6.12</td><td>5/9.8</td><td>36</td></tr><tr><td>3</td><td>-</td><td>5/9.8</td><td>9</td></tr><tr><td>4</td><td>3.2</td><td>-</td><td>9</td></tr><tr><td>5</td><td>3.2</td><td>-</td><td>9</td></tr><tr><td>6</td><td>-</td><td>-</td><td>9</td></tr><tr><td>7</td><td>-</td><td>-</td><td>9</td></tr></tbody></table>

At this stage, the only decision variables are the individual revenue from the balancing market ($B_n^{bal}$) which are positive and semi-definite. The first constraint considered in this model is that the sum of individual revenues shall match the collective revenue, as described in (45). Besides, the final individual bill after the EC takes part in the balancing market shall be less than the baseline case (i.e., without participation in the balancing market), as shown in (46).

$$ \sum_{n \in \mathcal{N}} B_n^{bal} = B_{coll}^{u} + B_{coll}^{d} \quad (45) $$

$$ B_n^{final} \leq B_n^{base} \quad (46) $$

### III. RESULTS AND DISCUSSION

#### A. CASE STUDY AND OPERATIONAL HYPOTHESES

An actual energy community located in the south of France and operated by our industrial partner, Sween, is considered a case study. The community consists of seven members with different DERs combinations of energy assets: solar PV and batteries. Table 1 describes each DER’s installed capacities and properties in the community area.

The retailer buying price ($\pi_n^{buy,gd}$) is 13.31 €/kWh and the selling price ($\pi_n^{sell,gd}$) is 6.5 €/kWh (flat rates). Besides, we adopt a business model for the energy community with different community exchange tariffs for buying (7.5 €/kWh) and selling (7 €/kWh) such that it is always more interesting for end-users to trade energy with the community rather than with the conventional energy retailer. The storage systems’ round trip efficiency is set at 95 % and the initial, as well as the final value of SOC, is 50 %.

The activation signals ($\alpha_t^u, \alpha_t^d$) are obtained from the half-hourly activated energy data extracted from the French’s TSO open-data repository [28]. If the activated energy is observed in both upward and downward directions at the same time step, we complement it with the frequency deviation data to ensure that the activation signal for the EC at that time step is only in one direction (i.e., either upward or downward). Different scenarios of the activation signal in terms of daily occurrences are investigated.

Furthermore, the value of $\beta$ (ratio of activation over the reserve capacity offered) for the tertiary reserve is based on a study by [29] that specifies that the probability of activation for the tertiary reserve is at 2 %. However, later in this paper, we present a sensitivity study of this parameter.

<figure><img src="image_5.png" /><figcaption>FIGURE 4. a) Balancing energy prices over a sample day, b) Procured reserve prices for all days in the month.</figcaption></figure>

The simulation is performed over a month with the solar PV and load profiles at a 30 min resolution obtained from local measurements in March 2021. Remind that the simulation performed here is offline, and run to estimate the potential arbitrage between community energy management and balancing grid services. Especially, we use three scenarios of balancing prices taken from the French’s TSO published data. Scenario 1 refers to the month of July, Scenario 2 to the month of October, and Scenario 3 to the month of December 2021. The activated energy prices over a sample day for the different scenarios are shown in Fig. 4a, while the procured reserve prices are described in Fig. 4b and are constant all along the day. The balancing prices for the capacity reserve are extremely lower than the balancing energy price (around one-thousandth) for all scenarios such that the remuneration from the balancing market presented in the next sections mostly comes from the activated energy part.

Simulations consist of successive daily runs to avoid prohibitive computational time due to the introduced binary variables in the models. The optimization problem is written in MATLAB using YALMIP [30] and solved with Gurobi.

#### B. RESULTS

The results for the optimal operation of the EC are presented first in the next section. Then, an allocation strategy of community energy among the members is performed while adopting the concept of KOR. Similarly, we address the sharing problem of the obtained balancing revenue such that everyone could gain benefit from the collective contribution to the balancing market. Lastly, we present a sensitivity study on the two balancing parameters used in the model ($\alpha_t^u, \alpha_t^d$ and $\beta$).
<figure><img src="image_6.png" /><figcaption>FIGURE 5. Total community bill with positive values mean cost and negative values mean revenue.</figcaption></figure>

## 1) Cost-Driven Arbitrage Between Community Sufficiency and Grid Services

The EC of seven households displays an overall monthly bill of 336 € when there is no contribution to the balancing market (i.e., the baseline case where the community is managed for energy sufficiency only – $P_{n,t}^{bat,u}$, $P_{n,t}^{bat,d} = 0$ thus $B_{coll}^{u}$, $B_{coll}^{d} = 0$ in the objective function $f_1$), as shown in Fig. 5. Assuming $\beta=2\%$, participating in the balancing grid services can noticeably reduce the total bill by as much as 16 € (4.8%) in Scenario 1, 30 € (8.9%) in Scenario 2, and 44 € (13.3%) in Scenario 3 – higher balancing prices lead to higher revenues. It shall be noted that the collective bill (refer to buying cost and selling income in Fig. 5) from retailers and the community manager increases compared to the baseline to fulfill the EC's need – i.e., the battery is also used to balance the grid in the upward direction. Indeed, this is the optimal trade-off between using the DER resources for internal community consumption or balancing reserve provision. Participation in the upward direction yields significant revenue in all the investigated balancing price scenarios. On the contrary, very low benefits are obtained with participation in the downward regulation. The benefit from the balancing market depends on the balancing prices from TSO and in this case, Scenario 3 yields the highest collective welfare.

Table 2 describes the SSR and SCR for each scenario of balancing prices. It can be seen that participating in the balancing market will lower both performance metrics (SSR and SCR) for the overall community. Also, the lowest collective cost occurred in Scenario 3, corresponding to the lowest SSR and SCR among all scenarios simulated due to the less CSC and more reserve provided.

Looking in detail per half-hourly time step, the participation in the balancing market over a sample day is shown in Fig. 6a, where the community offers upward reserve most of the time and can be activated based on the activation

<table><caption>TABLE 2. SSR and SCR for different scenarios of balancing prices.</caption><thead><tr><th></th><th>SSR (%)</th><th>SCR (%)</th></tr></thead><tbody><tr><td>Baseline (no balancing)</td><td>42.1</td><td>98.6</td></tr><tr><td>Scenario Price 1</td><td>41.4</td><td>97.2</td></tr><tr><td>Scenario Price 2</td><td>40.3</td><td>95.3</td></tr><tr><td>Scenario Price 3</td><td>40.0</td><td>94.8</td></tr></tbody></table>

<figure><img src="image_7.png" /><figcaption>FIGURE 6. a) Balancing capacity and activated energy and b) Reference and measurement curve at the community level for a sample day.</figcaption></figure>

signals given by the TSO. These activation signals vary over time based on the grid's balancing need (either upward or downward, or not at all) that are translated into orders sent by the TSO to appointed balancing service providers. Note that only some of the balancing providers are called so that the total procured reserve is always much greater than the energy activated. At the level of a single provider (the community here), the activation is also much smaller than the committed reserve capacity – i.e., the reserve capacity offered multiplied by $\beta$, the ratio of activation. For the sake of visibility in Fig. 6, we use $\beta=10\%$ to illustrate the portion of energy activated compared to the capacity offered.

Fig. 6b illustrates the reference profile and measurement at the meter for the overall community on a sample day. The collective measurement in the figure shows the participation in the balancing market. As mentioned earlier, the contribution of an EC to the balancing market shall be measured concerning a reference curve. In this paper, with offline simulation, the reference is reconstructed by neglecting the mFRR contribution once the optimal values of the physical and contractual flows are computed — i.e., only considering the power exchanged arbitrarily with the main grid and the internal community exchange, at the community level (38). The difference between the reference and measurement curve is the energy activated for mFRR provision in both upward and downward directions.
<figure><img src="image_8.png" /><figcaption>FIGURE 7. Individual bill decomposition for Scenario 3 with equal individual bill savings of 12%.</figcaption></figure>

In the next section, the individual economic aspects of the participation in the balancing market are presented with a focus on Scenario 3 since it is the most profitable among all the balancing price scenarios previously simulated.

## 2) Individual Bill Decomposition

To differentiate between the benefits of collective energy management and the additional revenues from the balancing market, individual bills are discussed along both axes successively.

### a: Allocation of Community Energy

The optimal individual bill decomposition resulted from the KOR computation (Section II-E1) for the baseline case and Scenario 3 are shown in Fig. 7. It shows that the total individual bills from energy arbitrage increase by 3.6% to 348 € when participating in the balancing market compared to the baseline case (336 €). Later, this higher cost is compensated by balancing revenues presented in the next section.

### b: Allocation of Balancing Revenue

From the previous section, we have the individual bill repartition from the allocation of community energy through KOR computation for the “Baseline” case ($B_n^{base}$) with a total of 336 €. Similarly, “Energy Arbitrage” with the grid and the community for Scenario 3 ($B_n^{arbi}$) has been computed in the previous section with a total individual bill of 348 €. Then, the result of the optimal balancing revenue allocation to each member (Section II-E2) is shown in the third bar plot “Balancing Services” in Fig. 7. Hence, for the presented case study, the final individual cost ($B_n^{final}$) can be obtained. It

<figure><img src="image_9.png" /><figcaption>FIGURE 8. Sensitivity of the bill to the parameter $β$ (average activation energy per power offered).</figcaption></figure>

<table><caption>TABLE 3. SSR and SCR for different values of $β$.</caption><thead><tr><th>β (%)</th><th>2</th><th>5</th><th>10</th><th>15</th><th>20</th><th>25</th></tr></thead><tbody><tr><th>SSR (%)</th><td>40.0</td><td>37.2</td><td>32.6</td><td>28.2</td><td>24.2</td><td>20.6</td></tr><tr><th>SCR (%)</th><td>94.8</td><td>88.6</td><td>78.4</td><td>68.6</td><td>59.8</td><td>51.7</td></tr></tbody></table>

returns equal cost savings (12.0%) for all members thanks to the proposed method that achieves fair repartition among the participants in the community.

## 3) Sensitivity Analysis on the Balancing Parameters

### a: Parameter $β$ as the ratio of activation

One additional set of simulations is performed while varying the parameter $β$ (ratio between the activated energy and the capacity offered) using Scenario 3 for the balancing prices. As displayed in Fig. 8, the higher the value of $β$, the lower the collective bill for the whole EC – i.e., greater revenues from the balancing market. Most of this income is generated with the increased activated energy (mostly upward regulation) provided to the grid. While the selling income from the energy arbitrage is constant (57-58 €) for different values of $β$, the buying energy cost increases (from 406 € for $β$ = 2% to 508 € for $β$ = 25%) to charge more the batteries in the community. At other times, this higher charging energy is then discharged for the provision of balancing services.

Table 3 shows the SSR and SCR for different values of $β$. Similar to significant reductions in the resulting collective bills, the SSR and SCR values also decrease remarkably. At $β$ = 25%, both metrics lose about half of their value compared with $β$ = 2%.
<figure><img src="image_10.png" /><figcaption>FIGURE 9. Sensitivity of the bill to the maximum number of activations per day with $\beta = 25\%$.</figcaption></figure>

b: Parameter $\alpha_t^u, \alpha_t^d$ as the occurrence of activation signals

The last simulations investigate different scenarios regarding the occurrence of the upward/downward activation signals –represented with $\alpha_t^u, \alpha_t^d$ – while using Scenario 3 for balancing prices. We set the activation signals at certain periods – i.e., the EC chooses to participate in the balancing market for a maximum of three hours a day, for better understandability and higher acceptance in the viewpoint of the community members. The sensitivity study is performed in four different periods which are two peak load times (06:00-09:00 and 18:00-21:00) and two off-peak times (10:00-13:00 and 14:00-17:00). The activation signals are assumed to be able to take place only during the three hours participation period.

Fig. 9 illustrates the overall bill for different assumptions on parameters $\alpha_t^u, \alpha_t^d$ and using $\beta = 25\%$ (the best result in the previous section). The largest reduction in collective billing occurs when the EC participates during off-peak periods rather than peak periods, although the difference is not significant. The higher balancing revenue during off-peak is due to the higher contribution in the upward direction, where the off-peak period typically has higher upward energy prices compared to the peak period, as shown in Fig. 4a for Scenario 3. During peak times, the optimal operation of the EC is to fulfill its consumption rather than provide reserves for the main grid. However, even with a narrow window time participation, at 10:00-13:00, the EC can still have significant revenues from the balancing market and achieve a total of 9.5% cost savings compared to the baseline.

The impact of different balancing participation periods on SSR and SCR metrics is described in Table 4. Compared to the SSR and SCR values for the baseline (see Section III-B1), assuming $\beta = 25\%$, participating in the balancing market

<table><caption>TABLE 4. SSR and SCR for different activation signals ($\alpha$).</caption><thead><tr><th>Period</th><th>6-9 am</th><th>6-9 pm</th><th>10 am-1 pm</th><th>2-5 pm</th></tr></thead><tbody><tr><td>SSR (%)</td><td>41.1</td><td>41.1</td><td>40.7</td><td>41.0</td></tr><tr><td>SCR (%)</td><td>96.9</td><td>96.6</td><td>95.8</td><td>96.4</td></tr></tbody></table>

for only three hours per day returns a very marginal reduction of those two performance metrics. Therefore, having a firm balancing contract for three hours could reduce the risk of bidding in the market throughout the entire day, allowing ECs to focus solely on SC for the rest of the day.

## IV. CONCLUSION

An additional revenue stream for the energy communities has been presented in this paper by providing tertiary reserves, especially the mFRR product. It offers the community manager a) a simultaneous optimization formulation of the energy management strategy and its participation model to the balancing market, b) an analysis of the benefit allocation to the individual members, and c) a sensitivity study on the balancing parameters. It breaks new ground by dealing with the issue from a bottom-up perspective to determine the optimal trade-off between the community's needs and its contribution to grid services. Furthermore, with offline simulations, a constant parameter of activation ratio is defined and historical data of activation signal simplify the computation. Different assumptions on these parameters could reflect the real activation that depends on TSO's need (unknown for the balancing provider). The model is implemented in a real project of an energy community located in the south of France that consists of seven members equipped with different combinations of solar PVs and battery storage systems. The results show that the community can expect savings of 4.8-13.3% compared to the total cost in the baseline case. The majority of the balancing revenues come from the upward regulation. Moreover, the EC can participate only 3 h a day in the balancing market and still obtain 9.5% of savings. Although illustrated on a French case, the proposed optimization method is not restricted and can be replicable for other EC worldwide. Future works will address the real-time operation of EC in the balancing market considering forecast data and establish the reference profile to compute the actual contribution from the energy community.

## REFERENCES

[1] R. Luthander, J. W. en, D. Nilsson, and J. Palm, “Photovoltaic self-consumption in buildings: A review,” *Applied Energy*, vol. 142, pp. 80–94, 2015.

[2] H. Nagpal, I.-I. Avramidis, F. Capitanescu, and A. G. Madureira, “Local Energy Communities in Service of Sustainability and Grid Flexibility Provision: Hierarchical Management of Shared Energy Storage,” *IEEE Transactions on Sustainable Energy*, vol. 13, no. 3, pp. 1523–1535, 2022.

[3] A. Caramizaru and A. Uihlein, “Energy communities: an overview of energy and social innovation,” Scientific analysis or review, Policy assessment KJ-NA-30083-EN-N, Publications Office of the European Union, Luxembourg, 2020.

[4] European Commission, “EU energy communities map,” 2023.

[5] French Government, “Article L314-28,” Tech. Rep. III, Code de l'énergie, Aug. 2015.
[6] B. Fina, H. Auer, and W. Friedl, “Profitability of PV sharing in energy communities: Use cases for different settlement patterns,” *Energy*, vol. 189, p. 116148, 2019.

[7] French Government, “Ordinance No. 2016-1019 of July 27, 2016 Related to Self-consumption of Electricity (in French, original title: “Ordinance No 2016-1019 du 27 Juillet 2016 Relative à l'Autoconsommation d'Electricité” ),” Tech. Rep. 5, Journal Officiel De La République Française, July 2016. [Online].

[8] French Government, “Decree of November 21, 2019 Setting the Geographic Proximity Criterion for Extended Collective Self-consumption (in French, original title: “Arrêté du 21 Novembre 2019 Fixant le Critère de Proximité Géographique de l'Autoconsommation Collective Etendue”),” Tech. Rep. 18, Journal Officiel De La République Française, Nov. 2019. [Online].

[9] Customers and Territories Department - Europe, “Methods of Implementing an Operation of Collective Self-consumption (in French, original title: “Modalité de Mise en Œuvre d'une Opération d'Autoconsommation Collective”),” Tech. Rep. 3, Enedis, Dec. 2019.

[10] M. Gomez-Gonzalez, J. C. Hernandez, D. Vera, and F. Jurado, “Optimal sizing and power schedule in PV household-prosumers for improving PV self-consumption and providing frequency containment reserve,” *Energy*, vol. 191, p. 116554, 2020.

[11] H. Zsiborács, G. Pintér, A. Vincze, Z. Birkner, and N. H. Baranyai, “Grid balancing challenges illustrated by two European examples: Interactions of electric grids, photovoltaic power generation, energy storage and power generation forecasting,” *Energy Reports*, vol. 7, pp. 3805–3818, 2021.

[12] ENTSO-E, “Balancing and Ancillary Services Markets.” Online. Accessed: 2022-12-05.

[13] M. Barbero, C. Corchero, L. Canals Casals, L. Igualada, and F.-J. Heredia, “Critical evaluation of European balancing markets to enable the participation of Demand Aggregators,” *Applied Energy*, vol. 264, p. 114707, 2020.

[14] S. W. Alnaser, S. Z. Althaher, C. Long, Y. Zhou, and J. Wu, “Residential community with PV and batteries: Reserve provision under grid constraints,” *International Journal of Electrical Power & Energy Systems*, vol. 119, p. 105856, 2020.

[15] Réseau de transport d'électricité (RTE), Paris, *Manual frequency restoration reserve and replacement reserve terms and conditions*, 2022.

[16] P. Siano and D. Mohammad, “MILP Optimization model for assessing the participation of distributed residential PV-battery systems in ancillary services market,” *SEE Journal of Power and Energy Systems*, vol. 7, no. 2, pp. 348–357, 2021.

[17] A. Lopez, B. Ogayar, J. C. Hernández, and F. S. Sutil, “Survey and assessment of technical and economic features for the provision of frequency control services by household-prosumers,” *Energy Policy*, vol. 146, p. 111739, 2020.

[18] M. Agostini, M. Bertolini, M. Coppo, and F. Fontini, “The participation of small-scale variable distributed renewable energy sources to the balancing services market,” *Energy Economics*, vol. 97, p. 105208, 2021.

[19] A. La Bella, A. Falsone, D. Ioli, M. Prandini, and R. Scattolini, “A mixed-integer distributed approach to prosumers aggregation for providing balancing services,” *International Journal of Electrical Power & Energy Systems*, vol. 133, p. 107228, 2021.

[20] H. Firoozi, H. Khajeh, and H. Laaksonen, “Optimized Operation of Local Energy Community Providing Frequency Restoration Reserve,” *IEEE Access*, vol. 8, pp. 180558–180575, 2020.

[21] J. E. Contreras-Ocaña, A. Singh, Y. Bésanger, and F. Wurtz, “Integrated Planning of a Solar/Storage Collective,” *IEEE Transactions on Smart Grid*, vol. 12, no. 1, pp. 215–226, 2021.

[22] G. Barone, G. Brusco, D. Menniti, A. Pinnarelli, N. Sorrentino, P. Vizza, A. Burgio, and A. A. Bayod-Rújula, “A Renewable Energy Community of DC Nanogrids for Providing Balancing Services,” *Energies*, vol. 14, no. 21, 2021.

[23] J. Iria and F. Soares, “Real-time provision of multiple electricity market products by an aggregator of prosumers,” *Applied Energy*, vol. 255, p. 113792, 2019.

[24] A. D. Mustika, R. Rigo-Mariani, V. Debusschere, and A. Pachurka, “A two-stage management strategy for the optimal operation and billing in an energy community with collective self-consumption,” *Applied Energy*, vol. 310, p. 118484, 2022.

[25] Réseau de transport d'électricité (RTE), Paris, *Terms and Conditions relating to Scheduling, the Balancing Mechanism and Recovery of Balancing Charges Section 1*, 2021.

[26] J. Hu, G. Yang, C. Ziras, and K. Kok, “Aggregator Operation in the Balancing Market Through Network-Constrained Transactive Energy,” *IEEE Transactions on Power Systems*, vol. 34, no. 5, pp. 4071–4080, 2019.

[27] Y. Zhou, J. Wu, G. Song, and C. Long, “Framework design and optimal bidding strategy for ancillary service provision from a peer-to-peer energy trading community,” *Applied Energy*, vol. 278, p. 115671, 2020.

[28] RTE, “Download data published by RTE.” Online. Accessed: 2023-02-22.

[29] R. Loisel, A. Mercier, C. Gatzen, and N. Elms, “Market evaluation of hybrid wind-storage power systems in case of balancing responsibilities,” *Renewable and Sustainable Energy Reviews*, vol. 15, no. 9, pp. 5003–5012, 2011.

[30] J. Löfberg, “YALMIP : A Toolbox for Modeling and Optimization in MATLAB,” in *CACSD Conference*, (Taipei, Taiwan), pp. 1–5, 2004.

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

**ALYSSA DIVA MUSTIKA** received the B.S. in electrical power engineering in 2017 and M.S. degrees in electrical engineering in 2018 from the Bandung Institute of Technology (ITB), Bandung, Indonesia. She also obtained another M.S. degree in electrical engineering for smart grids and buildings from the Grenoble Institute of Technology (Grenoble INP), Grenoble, France, in 2020.

She is currently pursuing the Ph.D. degree in electrical engineering at University Grenoble Alpes (UGA) and Grenoble Electrical Engineering laboratory (G2Elab), France. Simultaneously, she works as a Research and Development Engineer at SWEEN, Montpellier, France, benefiting from the French CIFRE funding from that facilitates collaboration between industry and laboratories. Her research interests include the optimization of local energy systems, specifically in the areas of operation, design, and fair allocation of energy communities. Additionally, she investigates the provision of local flexibility for grid services and the value of electric vehicles.

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

**RÉMY RIGO-MARIANI** got his MsC and PhD in Electrical Engineering from the Toulouse Institute of Technology (INP) in 2009 and 2014 respectively. He was then a Postdoctoral Fellow at the University of Washington (UW), Seattle, before joining the Cambridge Advance Research Centre for Education (CARES) and the Energy Research Institute at Nanyang Technological University (ERI@N) in Singapore. Since 2020, he is a Research Scientist at the French National Centre

for Scientific Research (CNRS) and works at the Grenoble Electrical Engineering (G2Elab) in France.

His research interest lies in modeling and optimization techniques for the management and design of energy systems over three areas – i) operation and planning of distributed energy resources in transmission and distribution networks, ii) integrated management and design of multi-energy systems, and iii) value of flexibility and emerging energy markets.
<figure><img src="image_13.png" /></figure>

**VINCENT DEBUSSCHERE** (M'11-SM'21) received the B.S. and M.S. degrees in applied physics from the (now) University of Paris-Sacaly, in 2004 and the Ph.D. degree in electrical engineering from the Ecole Normale Supérieure de Cachan, Rennes, France, in 2009.

From 2009 to 2010, he was a Research Assistant with the Ecole Normale Supérieure de Rennes. Since 2010, he has been an Associate Professor with the Electrical Engineering Laboratory G2ELab, Grenoble Institute of Technology, University Grenoble Alpes. He is the author of more than 100 articles. His research interests include electric power systems with a specific focus on power system operation and optimization, design of electricity markets, techno-economic and environmental evaluation of future energy systems and application of machine learning algorithms. He is an Associate Editor of the journal Sustainability, and holds four patents.

Dr. Debusschere was the recipient of the best Ph.D. thesis award from French national association on Electrical Engineering for Society in 2010. He was the covenor of two CIRED working groups on microgrids and artificial intelligence for distribution grids.

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

**AMAURY PACHURKA** received a Master of Engineering from the EIGIP (INSA Hauts de France) in 2001. He completed his education with a master degree from the IMT Nord Europe in 2002 and a master degree in legal and technical expertise in environment in 2003 from the Université d'Artois. Finally, he recently obtained a global MBA from the Alliance Manchester Business School in Hong Kong.

With almost 12 years of experience as an operational manager and waste treatment expert in Europe, the South Pacific Area, and Asia for Veolia, a global leader in environmental services, he embarked on founding the first company dedicated to research and development activities in the energy sector, specifically focusing on collective self-consumption. Subsequently, he also established a purpose-driven start-up named SWEEN, which focuses on implementing research and development activities in the field of smart cities, encompassing energy services, grid services, and mobility.

Mr. Amaury Pachurka is currently an active member of the ANRT (Association Nationale Recherche et Technologie) and regularly participates in the working group on the French national strategy for energy research. He serves as a co-author, industrial referent, and research and development manager for scientific papers in this domain.