Docteur

Génie Electrique

Jonathan Coignard

Thèse Dirigée Par

Raphaël Caire

Vincent Debusschere

Stéphanie Chollet

M Seddik Bacha

M Bruno

Sareni Professeur

M Pierre

Pinson Professeur

M Stéphane

M Raphaël Caire

Mme Stéphanie

M Vincent Debusschere

M Loïc

Raillon Docteur

THÈSE Pour obtenir le grade de

Keywords: Local energy community, self-sufficiency, coordination strategies, distributed energy resources, energy management systems, carbon footprint Communauté locale de l'énergie, auto-production, stratégie de coordination, ressources distribuées, système de gestion de l'énergie, empreinte carbone

Local energy communities offer a place to rethink our view on energy consumption, and although, those communities have always existed, they have recently gained momentum. From a regulatory perspective, since , all member states of the European Union are required to implement renewable energy communities in their national law. Additionally, and at least in France, due to higher electricity prices, selling electricity to neighbors might prove to be more profitable than selling to a supplier at a regulated price. In a nutshell, local energy communities could be described as a group of neighbors selling electricity to each others. However, key to this definition is that communities are subject to a spatial limit preserving a proximity between members, as well as, a temporal limit ensuring that local energy production overlap with local consumption. This temporal limit is one of the principal challenge of communities, which justifies our scientific work in assessing coordination strategies to match local energy consumption with production. Our contribution is multi-fold: first, we bring a novel perspective on what is expected of coordination strategies for local energy communities, and how does it synergies with existing socio-economic coordination mechanisms. Second, we take a critical look at whether coordination is worth the investment, and the carbon footprint shift of communities. Third, we provide two actionable solutions for communities where coordination of flexible assets is relevant: a predictive, and reactive approach. While the predictive approach partially relies on a good knowledge of the future, the reactive approach relies on a good knowledge of the recent past. Our results show that both strategies perform well in a simulation environment. The reactive approach is in some way the "least bad" option. Although, it cannot achieve the minimum cost of the predictive approach under a perfect forecast, it is not subject to making poor decisions from erroneous forecasts. One of the main direction to extend the work carried throughout in this thesis will be to test the proposed coordination strategies in a real-world environment.

List of Figures

. Illustration of considering the storage power profile as a) a pure production (bottom left graph), or b) a production only when the storage is discharging and a consumption when the storage is charging (bottom right graph). . . . . . Arbitrage scenario where the battery is charging from the grid (top graph) and resulting self-sufficiency from definition and (bottom graph). Definition gives a negative self-sufficiency thus demonstrating that the metric is not bounded by %. Python notebook available at https://github.com/Jonatha n56/supplementary _ thesis/tree/master/2 _ chapter. . . . . . . . . . . . . . . Second scenario (top graph) and resulting self-sufficiency from definition and (bottom graph). Definition leads to a self-sufficiency better than the "net-metering" approach, which is counter-intuitive. Python notebook available at https://github.com/Jonathan56/supplementary _ thesis/tr ee/master/2 _ chapter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sample timeseries from running Alg. with kWh and . kW storage asset per household for households. Python notebook available at https://github .com/Jonathan56/supplementary _ thesis/tree/master/2 _ chapter. . . . . .

. Sample timeseries from Quoilin open dataset [ ] and PVGIS solar production

for Valence, France, households with each a kWp solar panel. . . . . . . . . Impact of solar panel capacity on the community self-sufficiency for a "no storage" self-sufficiency, a "daily" self-sufficiency, and "yearly" self-sufficiency.

We define three zones based on the impact that storage systems can theoretically have. Python notebook available at https://github.com/Jonathan56/supp lementary _ thesis/tree/master/2 _ chapter. . . . . . . . . . . . . . . . . . . : Note that, we consider the term "energy transition" with caution as history always shows "energy addition", e.g., we have never consumed more wood than today. The term "energy transition" projects a past that does not exist onto a future that remains uncertain [ ].

List of Tables

: At VDC the power plant could not reach much further than a mile. .

Why work on local energy communities?

Simply put, local energy communities seem to be a relevant approach for an energy transition that is respectful of the environment. To reduce the impact of the energy sector on global warming three levers are commonly accepted: energy sufficiency (reducing usages), energy efficiency, and energy consistency (producing renewable energies) [ ]. Local energy communities create the environment to activate each of those levers. First energy consistency as communities are often equipped with solar panels, but also energy sufficiency and efficiency as community members have a desire to better manage their consumption to respect the limits of local production.

Sufficiency, efficiency, and consistency are keys aspects of the energy transition, as illustrated by the recent four major road maps for the French energy sector [ ], [ ], [ ], and [ ]. In addition to activating those levers, we postulate that local energy communities offer a communal space to understand the hold of energy in our society, and as such the opportunity to reconsider structural choices.

This postulate is initiated by the proximity that local energy communities bring with the experience of a limited energy production. This proximity is a fairly new resurgence, and definitively not the norm for our current energy supply chain. Throughout the th century, the energy supply chain has been extended with greater distances between the extraction and usage of energy. The experience of turning on a car seems pretty far away from the vision of offshore oil platforms.

Of course, they are very legitimate reasons to extend the energy supply chain. In that endeavor, the electricity grid has been very efficient at moving the production of energy away from city centers. This is particularly well illustrated by Edison's power plant, Pearl Street Station. In , the coal power plant at the heart of Manhattan, New-York provided direct current to , lamps. Arguably "a messy way to make power in a place as densely populated as lower Manhattan, where horses laden : The synchronous grid of continental Europe supplies over million customers with GW of production capacity.

: Among others, the grid enables to install much less production capacity than what would be needed otherwise. Indeed mutualizing takes advantage that consumption happens at different times for different consumers.

with black dusty coal arrived in a constant train clogging the narrow street" [ ]. So we can turn on lights in large cities, and for other reasons, the alternative current electricity grid is a major invention of the late th century. As a result, during the th century, it grew to be the biggest machine ever built , and yet, at the same time it remains very much invisible to our eyes. In that regard, the proximity brought by local energy communities is a striking shift from the incommensurable scale and invisibility of the larger grid.

Our point is definitively not to say that we should give up our grid infrastructures. In fact, in our work, local energy communities are entirely dependent on the grid. However, we want to nuance the efficiencies of scale brought by a large grid , with the physical and social understanding of sufficiency brought by the proximity of local energy communities. This complex trade-off motivates our work.

Physical and social understanding of sufficiency

Before closing this section, we provide some elements to reflect on the importance of this trade-off.

First, the idea of proximity or right scale echoes the work of Leopold Kohr. For Kohr, "there seems to be only one cause behind all forms of social misery: bigness. [...] Whenever something is wrong, something is too big". Kohr insists on the difference between the nature and the scale of our difficulties.

"The young people of today [...] have yet to become aware that what matters is no longer war, but big war; not unemployment, but massive unemployment." [ ] For Kohr, the heart of the problem is perhaps not the energy transition but the massive energy transition.

"[The small state] is democratic because of its physical inability to overwhelm the citizen, who is at all times capable not only of participating in government but also of resisting governmental encroachments without the intermediary of powerful organizations." [ ] page .

As massive solutions for the energy transition, e.g., large-scale grid infrastructures, might further distance individuals from their ability to weigh on energy matters, and in a way engage in energy sufficiency activities.In that sense, local energy communities offer an alternative from an "overwhelming energy transition". However, whether this alternative is at the right scale from social and technical perspectives, remains to be seen.

Ivan Illich asserts the idea that a limited energy production is desirable for social structures. For a sustainable society, Illich insists on recognizing "a threshold in energy consumption beyond which technical processes begin to dictate social relations" [ ]. In that sense solutions based on large-scale grid infrastructure may appear as "unlimited energy" without a "maximum per capita energy use". For Illich, this results in further equity issues, as it opens up a race for energy that potentially deepen social inequalities. Local energy communities do not impose a limited consumption, but they provide an implicit limit as local production is not unlimited.

A third perspective lies in the relationship that we cultivate with technical objects. Having access to a large amount of energy multiplies our machines, e.g., toasters, blenders, dishwashers, etc. but also shapes the relationship that we cultivate with those machines. For Gilbert Simondon:

"the first condition for incorporating technical objects into the culture would be that man is neither inferior nor superior to the technical objects, that he can approach them and learn to know them by maintaining with them a relation of equality, of reciprocity of exchanges: a social relationship in some way." [ ] For instance, bikes are sometimes subject to this type of relationship, where a certain care is given, but also a certain understanding and acceptance of the little flaws exist. Whether local energy communities with the physical proximity of production units, e.g., solar panels, and their limited production can cultivate this "social relationship" with technical objects is unclear, but motivating.

Finally, for Bruno Latour, it is a question of reconciling the world "in which we live" and the world "from which we live". For instance, the daily life where we consume energy, and the world that produces this energy. In a global society, where supply chains are stretched across continents, the world "in which we live" does not have much in common with the world "from which we live". Local energy communities are an attempt to reconcile those two worlds. We have discussed those worlds from the perspective of energy, but this gap is not only inherent to energy. Until the th century, % to % of the population was employed in agriculture, against just . % in France nowadays. In the energy sector, we believe that local energy communities can offer a certain proximity that fosters a reconciliation with sufficiency values, and this motivates our technical work.

. What are local energy communities?

The term local energy community refers to the generic concept of an energy community [ ], which can also be found under renewable energy community.

A universal and clear definition of renewable energy communities does not exist, as there are many ways in which a community can engage in energy projects [ ], with different objectives, legal forms, governance, etc. This lack of universal definition also applies to local energy communities, even if the adjective local sets a certain geographic scope. This section is not intended to provide a universal definition, but rather to synchronize the reader with our definition of a local energy community.

In a nutshell, a local energy community could be described as a group of neighbors selling electricity to each other. In France, those communities are referred to as "collective self-consumption" communities. Key to this definition is that electricity is directly sold to neighbors rather than to distant energy suppliers. This aspect not only involves a limited geographic scope, but also a limited temporal scope as there exists a limited time between the production and the consumption of an electron, e.g., min in France [ ]. Local energy communities manage to overlap their energy : We note that energy is understood as electricity rather than heat. District heating is out of our scope, but a relevant example nonetheless.

consumption with local production, in opposition to some communities, e.g., energy cooperatives, which rather sell all their production to a supplier.

From the electrical grid's perspective, local energy communities are not limited to microgrids and fundamentally rely on the larger grid. In fact, we consider that neighbors connected to different parts of the network can still be part of the same local energy community for two reasons. To take advantage of existing infrastructures, and because individual smart metering systems can virtually aggregate neighbors under the same meter.

Our vision of local energy communities follows the guidelines of renewable energy communities defined by the European Commission [ ]: a primary purpose aimed at generating social and environmental benefits rather than a focus on financial profits. a geographic scope in the proximity of communities; a governance with the participation and effective control of local members whose primary economic activity is not the energy sector;

The contours of our definition can be further clarified with the tool developed in [ ], illustrated in Tab. . . Tab. . is based on five dimensions associated with five levels with one being the minimum. The cells highlighted in green define the minimum level that still constitutes a local energy community for us. Although . What are local energy communities : In a rural area this limit can be extended to a km radius upon a derogation as of .

we mostly discuss the dimension called "scale of technology", the transdisciplinary of local energy communities also requires that we position ourselves in social and economic terms (this is further developed in chapter ).

These descriptions provide a good framework to consider local energy communities. To sum up, two ingredients stand out for us. First, a limited geographic scope in the proximity of communities, as opposed to nationwide communities. Second a temporal scope to overlap consumption with local production, as opposed to investing in production units to sell at a national scale. Those ingredients are fundamental in our vision of local energy communities. Fig. . shows a consumption and a production profile with their intersection representing the "local consumption". Our goal throughout this thesis will be to maximize local consumption.

Power [kW]

Morning Noon Evening

Surplus

Grid consumption Local consumption

Consumption Production

. . The case of local energy communities in France

To provide an illustrative example of local energy communities, and because the French implementation has driven our work, we further detail "collective self-consumption" communities (Fig. . ). Collective self-consumption stems from a French law of July which evolves regularly to account for new geographic perimeters and eligibility to different tariff structures. As of today, the geographic scope of French local energy communities is limited to a km radius, i.e., a maximum of km between the furthest members of the community. Further, the temporal scope defining local consumption is set to min between the moment where electrons are produced and consumed by the community.

Consumers and producers are regrouped together in a legal entity whose main role is to define how the local production is shared among consumers (also called "sharing keys"). Associations, local authorities, and social landlords, among others, can play the role of the organizing legal entity for collective self-consumption operation. To share local production different types of sharing keys are possible, which, in a way, decouple the consumption that is physically measured from financial flux.

Available sharing keys:

Static keys: For all min time windows a static coefficient is applied to determine the portion of local energy for each consumer. For instance, % for consumer # and % for consumer # . Those coefficients can represent financial investments in the operation or other aspects. The main disadvantage of static keys is that consumer may not be able to absorb % of the production which is then accounted for as a surplus of the community.

Dynamic by default: For each min coefficients are directly calculated by the Distribution System Operator (DSO) as a pro-rata of members' consumption. If consumer # represents % of the consumption on a min window then he/she is entitled to % of the total production on that time window.

Dynamic keys:

For each min coefficients are set by the organizing legal entity. This type of key enables to completely customize the share of energy across the community, but requires communicating coefficients each month to the DSO. We note that ENEDIS, the principal French DSO, is developing a fourth type of sharing key to enable different producers within a community to have their own set of sharing keys. : Quite logically, it is also better to selfconsume before selling it to a neighbor, as it offsets the full regulated price of electricity at . cente/kWh after taxes : To avoid too much repercussions on consumers a tax referred to as CSPE was nearly removed for .

: In there are only communities of collective self-consumption in France.

. . . Economics of selling energy within local energy communities.

Does it financially make sense to sell power to a neighbor? Although this is not the only condition for local energy communities to exist (cf. "why local energy communities?"), a profitable business model is helpful. We propose a back-of-the-envelope calculation to assess at what price electricity can be sold within local energy communities.

When selling power to a neighbor, i.e., a local energy community member, we expect producers to provide a competitive price in comparison to the regulated price of electricity which is always available. In other words, producers within a community must sell at no more than the regulated price of electricity. In August , the regulated price of electricity is . cente/kWh before taxes [ ], and includes . cente/kWh for network fees (TURPE) which means that producers can expect to sell electricity at about cente/kWh.

In comparison with other options to sell electricity at the retail level, cente/kWh is not so great. The different retail options for selling electricity are given in Tab. . , those options are subsidized to develop renewable energy production. For a solar capacity under kWp, the feed-in tariff guarantees cente/kWh, which is three times more than the cente/kWh calculated. The other option, when opting for a selfconsumption tariff (further explained in chapter ), still enables to sell surplus of electricity at cente/kWh under kWp .

For those reasons, collective self-consumption projects are usually not seen as the best economic outcome. However, this could be changing for a few reasons: the regulated price of electricity continues to rise, grid fees are being modified for local energy communities, but also increasing uncertainties regarding subsidized feed-in tariff.

Solar capacity kW Feed-in tariff per kWh Self-consumption tariff for surplus per kWh In , the regulated electricity price before taxes increased by %, which brings the new regulated price to . cente/kWh before taxes. With the regulated price, and if we remove . cente/kWh for grid fees, this leaves a potential value of cente/kWh for producers selling within a community, which is equivalent to the self-consumption tariffs for surplus of Tab. . . As such, the individual self-consumer in France could imagine gathering in local energy communities , and selling their electricity surplus to their neighbors instead of relying on a subsidized energy supplier. It is unclear how regulated prices will evolve in particular with tensions on Russian fossil fuels, however, local energy communities may have reached a stage where financial aspects can partially drive developments.

≤ kWp cente cente ≤ kWp cente ≤ kWp cente cente ≤ kWp . cente
: It is also possible to benefit from a variable TURPE without being part of a local energy community. Corresponding tariffs are . , . , . , and . cente/kWh for respectively winter on peak, off peak and summer on peak, off peak.

: This is approximately the price of electricity in Germany.

Financial gains can also be expected from switching to a special regime of network fees. The basic TURPE as mentioned before is at . cente/kWh, whereas the specific local energy community TURPE is based on four different tariffs covering winter/summer seasons, and on/off peak hours. Although the specific TURPE is greater for grid consumption in the winter at . and . cente/kWh respectively, it is also much lower in summer at . and . cente/kWh depending on hours and locations. This TURPE with different values demands a case-by-case analysis that goes beyond a simple back-of-the-envelope calculation. Nonetheless, we can expect this specific TURPE to enable more value to fall in the hands of local producers. If consumers are willing to accept a larger TURPE in the winter, solar power could be sold at about cente/kWh with a . cente/kWh TURPE and still fall below the regulated electricity price. Note that this specific TURPE for local energy communities only applies to communities connected behind the same low voltage transformer and not for communities with a km radius geographic scope. At cente/kWh selling power within a community becomes the best retail option for solar capacities above kWp.

Finally, subsidized tariffs for retail producers to sell electricity shown in Tab. . may not exist forever. Without those regulated tariffs, the bar to reach becomes the Levelized Cost Of Energy (LCOE) of solar panels (i.e., the price of each kWh in order to reimburse the initial and operational investments for a given lifetime). A report from the Fraunhofer institute for solar energy systems shows that LCOE for small-scale solar panels is between and cente/kWh [ ], which is potentially a price range already matched by local energy communities in France as they can expect cente/kWh from local production in .

For a technological scenario with solar plus storage LCOE are more uncertain with variation from to cente/kWh [ ]. If we take an LCOE of cente/kWh storage systems are almost viable for individual usage as the regulated price of electricity after tax is close to cente/kWh. However, using storage systems to sell power within local energy communities would require that the regulated electricity price increases to about

. cente/kWh after taxes . This would enable a price of electricity at cente/kWh plus . cente/kWh and . cente/kWh in TURPE and local taxes and a % VAT for a total cost after tax of . cente/kWh. This analysis is meant as a back-of-the-envelope calculation of electricity price per kWh, but there are many other economic aspects to consider. In particular, local energy communities may also incur additional operational costs, e.g., organizing events and meetings, and monitoring activities, as they can also unlock value from: installing larger solar panels on unused roof areas, not having to pull a cable from the roof for each apartment to inject solar power behind their meter, sharing the costs of electricity within the community (e.g., as a pro-rata of revenues).

To sum up, in France, might be the tipping point where selling solar production to neighbors becomes financially attractive. However, selling power from solar panels plus storage systems has yet to become cost-effective in France.

: All member states of the European Union are required to have a framework for renewable energy communities in , however, it is still an ongoing process in many countries.

. . The case of other European countries

Large differences exist among members of the European Union with regard to the implementation of renewable energy communities in national laws . In particular, several topics emerge: types of energy included, capacity limits, grid tariffs, organisation rules, and physical expansion [ ]. In particular, physical expansion categorizes two kinds of local energy communities: communities that use the public grid, and communities that do not. Some countries authorize local energy communities to be developed on the public grid infrastructure. This is the case of France within a km limit, but also Spain with a more restrictive limit at m and the necessity to be behind the same low-voltage transformer. Italy, and Austria impose to be behind the same low-voltage or medium-voltage transformer. Wallonia, Belgium defines a "local perimeter" which depends on case-by-case assessments. Defining proximity as a distance is more transparent and easier to understand, however, requiring knowledge about grid infrastructures fosters an organization that may reduce network constraints in terms of voltage or loading. We note that a caseby-case methodology might provide flexibility but can also induce a lack of certainty for planners.

Using public infrastructures brings up the question of their cost. As we have seen in France, it is often a crucial question when looking at the profitability of a project. On that topic, the European guideline express a certain ambiguity, while member states should "generally not apply charges to electricity produced and consumed within the same premises", they "should be allowed to apply non-discriminatory and proportionate charges to such electricity if necessary to ensure the financial sustainability of the electricity system"[ ]. In particular, Italy proposes a refund for the network fees related to transmission lines ( . cente/kWh). France has a special TURPE as mentioned earlier, and Belgium offers a case-by-case price depending on the profits of the community. Some countries, however, do not authorize local energy communities to develop over the public grid infrastructures. As such, communities are usually limited to apartment buildings under the same metering system. This is the case for Denmark, Estonia, Finland, and Sweden where exceptions are accepted to "interconnect single parts of a power plant" with an internal grid between different buildings. In Switzerland, this exception is the rule as local energy communities have the right to develop their own private network unified under a common point of coupling with the larger network. This choice of a common point of coupling for communities brings several advantages. For instance, communities do not rely on DSO to virtually aggregate meters, but rather on an actual physical meter which is much simpler in terms of data processing. This might also be an advantage for coordinating consumption and production, as control strategies can be based on a single metering system. Further, it also opens the door to control strategies based on physical measures within the microgrid instead of relying on communication protocols. However, communities take more responsibilities (and costs) to safely operate an extended electrical network. Communities are also harder to form as geographical proximity is critical to interconnecting buildings. Further, it might also lead to a certain waste in the form of new cables instead of using existing cables from the public infrastructure.

Highlights:

Two ingredients stand out in our definition of local energy communities: a limited geographical scope and a limited temporal scope, With the regulated electricity price in , producers can expect cente/kWh from selling electricity within a community, Whether local energy communities can extend on the public grid or not is a major difference between national implementations in Europe.

. Research questions

Local energy communities cannot simply install a large surface of solar panels that covers their annual energy consumption. The challenge for communities is the need to organize their consumption to match the local production at a sub-hourly rate rather than yearly or even weekly. Otherwise, the local energy produced that is not consumed within a certain time limit is a surplus lost to the larger grid.

In this context, our research looks at how to coordinate local consumption with local production across multiple community members. In addition, we provide a critical look at when coordination strategies are coherent with the community.

Research question # :

When and how to coordinate local consumption with local production within communities?

In the end, what is the carbon impact of local energy communities when installing renewable energy systems? This question is fundamental to keep the "raison d'être" of local communities despite the embodied carbon emission in solar panels and batteries. To assess the carbon footprint of renewable energy systems, methodologies in the literature do not consider both self-sufficiency at a sub-hourly rate, and long-term investment horizons. We propose a method that accounts for local energy communities' aspects to size solar panels and batteries to minimize carbon impact.

Research question # :

Is more renewable energy systems always better for local energy communities?

. Organisation

This thesis is built around chapters. Literature review and bibliographic work are spread across the different chapters.

. Contributions

: https://www.lancey.fr/?lang=en Chapter : defines the concept of self-consumption, i.e., having a limited time to consume local production which is a cornerstone of this work. This chapter is also the place to define methods for estimating lower and upper bounds on self-consumption.

Chapter : presents a review of coordination strategies. We take a critical look at coordination within local energy communities. What are some requirements, what are the roles, and synergies with other forms of socio-economics coordination?

Chapter : assumes that flexible assets, e.g., batteries, are distributed within a community, and explore a predictive and a reactive strategy to coordinate flexible assets.

Chapter : takes a step back from the operation of local energy communities, to look at the initial sizing of energy systems. In particular, we look at the evolution of greenhouse gas emissions as a function of self-sufficiency for communities.

. Contributions

Throughout this work, we view scientific contributions as the remodeling of existing theories by combining various ideas, and observations specific to a novel context. In that sense, our contribution is to remodel coordination strategies in the light of temporally and spatially limited energy communities with existing socio-economic structures. This type of scientific contribution is referred to, in a non-pejorative way, as a "bricolage" approach [ ]. This approach is different from an evolutionary view of scientific contributions, "filling the gaps" of existing coordination strategies. Our scientific contributions are not limited to "instrumental knowledge", providing coordination methodologies. It also includes "reflexive knowledge", questioning the sense of coordination strategies. This approach which might be unexpected, is key to fitting coordination strategies to local energy communities, if some coordination is needed.

We have listed some of the principal contributions in this work, more contributions are given in the "highlight" frames. This study was funded by LANCEY Energy Storage.

Contribution :

A methodology to estimate the self-sufficiency that lies at different storage cycles, i.e., the needs for storage between days and nights, versus seasonal storage.

Contribution :

A methodology to create realistic load profiles where the amount of overlap with solar irradiance profiles is controlled.

Contribution : An analysis of the requirements, roles, and methods of coordination for distributed flexible assets. In particular, the analysis is built around two axes: centralized / decentralized strategies and competitive / cooperative strategies.

Contribution :

A model predictive approach to coordination in local energy communities which includes network fees, and a market-like approach for flexible assets' participation.

Contribution :

A reactive approach to coordination in local energy communities.

Contribution :

A methodology to minimize carbon impacts over a long horizon when sizing solar panels and batteries in the context of local energy communities.

. Publications

Jonathan Coignard, Sacha Hodencq, Nana Kofi Twum-Duah, Rémy Rigo-Mariani. Solar panels: Is more always better? Assessing the carbon footprint of communities. This chapter develops the concept of self-consumption which is a pillar of local energy communities. What does it mean to consume locally produced electricity? This may seem trivial, yet measuring the selfconsumption of communities with storage assets is fuzzy in the literature. This chapter aims at getting the reader familiar with self-consumption metrics while developing tools and methodologies for the next chapters.

In France, the concept of self-consumption is fairly new from a retail perspective. In the traditional feed-in-tariff structure, households directly sell all their production at ce/kWh, and then re-buy all their energy needs at a lower price. In this scheme, the energy produced is always entirely injected into the grid without first being "self-consumed" by plant owners Fig. . . Self-consumption was only recently defined and authorized in France for individual households and local communities. With this scheme, the energy produced is injected behind the meter which profits plant owners before going into the larger grid. In France, the metering of what is injected versus what is self-consumed is done over a time window of minutes, thus tolerating some mismatch between consumption and production.

Distribution grid

Meter #1

Meter #2 In a way, self-consumption is the first ingredient of local energy communities, as it brings a limited temporal scope. This chapter is dedicated to understanding this limit, which is the critical link between local energy production and energy consumption. Without this limit, the focus of local energy communities could be to produce greener electricity, without considering aspects related to consuming less energy.

Demand Production

Feed-in-tariff

Distribution grid

Meter #1

Demand Production

Self-consumption

: It is easier to self-consume in winter as solar-based generation tends to be lower than in the summer. On the contrary, it is harder to be self-sufficient for the same reason. Thus giving self-consumption only for the winter months is biased.

Through exploring the limited time window between consumption and production of electricity, we develop several tools also relevant for the next chapters:

A method to estimate whether it is worth considering scheduling batteries on a yearly, monthly, or daily horizon, e.g., how much value is there in transferring energy from one week to another.

An algorithm to find the maximum self-sufficiency achievable for a given battery model and characteristics, A clustering method to accurately represent year-long time-series with a few weeks, A metric and a methodology to characterize and modify load profiles to overlap more with solar production. This chapter starts by defining self-consumption and self-sufficiency to measure the influence of a temporal limit. The two metrics measure the ability to export less power and the ability to import less power from the upstream grid.

. How to measure self-consumption?

To calculate self-consumption and self-sufficiency ratios, it is commonly accepted to use Eq. . and Eq. . [ ]. Intuitively, self-sufficiency is a metric to evaluate the ability of a household to provide for its own energy needs, i.e., to rely less on the grid. Whereas, self-consumption assesses the amount of generation that remains within the household, i.e., it gets worse as surplus is injected into the grid. Those two metrics are scale-independent, and bounded between % and %, thus easily interpretable especially when calculated over a year to account for seasonal effects .

self-consumption = =1 min load( ), prod( )

=1 prod( ) ( . ) self-sufficiency = =1 min load( ), prod( ) =1 load( ) ( . )
Where prod( ) ≥ 0 is the local energy generation, and load( ) ≥ 0 is the local energy demand.

Achieving both

% self-sufficiency and % self-consumption would indicate that a household does not import energy, and fully uses local generation. A more common situation might be a household close to % on self-consumption with a small self-sufficiency. It is often the result of a rather small solar panel which only produces a fraction of the house's energy consumption.

. How to measure self-consumption

Power [kW]

Morning

Noon Evening

Surplus

Grid consumption Local consumption

Consumption Production

Self-consumption = +

Self-sufficiency = +

. . What is the impact of time intervals?

Since France has adopted a minutes time interval between local energy production and consumption, but other European countries have suggested minutes intervals, we may wonder the impact that different time intervals can have on the ease of achieving higher level of selfsufficiency. Additionally, extending time intervals to days or even seasons might provide a theoretical upper limit on the self-sufficiency achievable with storage units.

It does not show in Eq. . and Eq. . , yet the time resolution of load( ) and prod( ) is a critical information [ ]. In a way, varying time intervals can depict a spectrum of scenarios from microgrids with stability issues where time intervals are reduced to microseconds, to net-metering scheme with large time intervals related to billing periods (i.e., time intervals can be extended to a year). Self-consumption schemes lie in the middle, where an hourly or sub-hourly match is expected between production and demand.

With 30 min intervals: self-sufficiency = 100% Self-consumption metrics are sensitive to the time resolution of prod( ) and load( ) profiles, Fig. . . Intuitively, larger time intervals leave more "space" for local production to cover consumption. For instance, when : that is to say that load( ) and prod( ) series are in fact aggregated (i.e., summed) to a single data point. self-consumption is metered at a minutes rate, the energy consumption of kWh at : am counts as locally consumed as long as kWh is produced before : am. In fact, we can show that self-consumption and self-sufficiency monotonically increase with larger time intervals.

To illustrate the impact of time intervals on a more realistic scenario, we take a load profile with a minutes time resolution for a single household from the REFIT open dataset [ ], and solar irradiance from the PVGIS open dataset [ ] with a minutes resolution linearly interpolated to minutes. The data runs from May to May to capture a full year. Note that this is an illustrative scenario that is not representative of all households with solar panels. In particular, this example does not consider rapid cloud cover and focuses on northern latitudes (Loughborough, UK). Nonetheless, this highlights some interesting diurnal, weekly, and seasonal trends. In particular, Fig. . shows the self-sufficiency achieved for a load profile as the solar panel installed goes from kWp to kWp. The different curves represent different time intervals, whether a minutes time interval is used, or at the extreme, a -year interval is applied. Solar production

Load profile

First, it is interesting to note that self-sufficiency taken with a year granularity corresponds to the maximum achievable self-sufficiency (dashed line on Fig. . ). As such, we can always determine an upper bound on self-sufficiency for a given energy production, i.e., which intuitively corresponds to using all the energy. Notably, this is also where the concept of self-sufficiency meets with "net-metering". As shown in Fig.

. , this maximum self-sufficiency increases linearly with the number of solar panels installed (below % self-sufficiency).

For the specific load and production profiles chosen, using intervals of minutes or minutes which is the default interval in France, does not significantly impact self-sufficiency metrics ( % difference). In this work, we choose to calculate self-consumption on a minutes basis as per [ ].

. How to measure self-consumption : here a diurnal cycle refers to a battery passing by a discharged state every day, e.g., % state of charge.

: one implication is that self-sufficiency gains will not be proportional to storage sizes, as passing from daily to seasonal cycles implies a significant energy step in storage capacity from kWh to kWh (this note is further detailed in the next sections) Further, and perhaps more interestingly, we can estimate an upper bound of the self-sufficiency that a storage asset could achieve, if it can work on a diurnal, weekly, or seasonal cycle. A storage asset that is only able to have a diurnal cycle can not bring self-sufficiency higher than the selfsufficiency calculated with a daily granularity. Indeed, the best outcome of diurnal storage is to match all production with some consumption (without losses), which is done by definition when calculating selfsufficiency on a daily granularity. Fig. . clearly shows the potential for diurnal battery cycles. Under a kWp solar panel, an infinite battery with a daily cycle can push self-sufficiency up to % from the % without storage. Yet, the full potential as shown by the yearly curve is % of self-sufficiency. Thus when larger solar panel capacities are installed storage is also needed on a seasonal scale (i.e., storing in summer to discharge in the winter). We note that for this specific household the weekly value gap is small . We see that simply "playing" with the self-sufficiency metric is quite informative. In fact, varying time intervals already constitutes a useful pre-analysis to assess the potential of storage assets. For a following chapter on coordination strategies, this pre-analysis will give us an estimate of whether it is worth considering scheduling batteries on a monthly horizon, i.e., is there value in transferring energy from one week to another. It also provides lower and upper bounds on self-sufficiency to provide relative results in the upcoming chapters.

0

Highlight:

Self-sufficiency taken for different time intervals reveals the theoretical value gap for storage devices to consider diurnal, weekly, and seasonal cycles.

: We note that intrinsically energy is never "produced", but rather transformed by storage assets or solar panels. Nonetheless, we use the word "produced" as it is in common usage.

. . How to account for storage assets?

Storage assets perturb the binary vision of self-consumption metrics, where an asset is either accounted for as a production, e.g., solar panels, or as a consumption, e.g., a washing machine. A storage asset may both produce energy at night , and consume energy during the day. In the literature, a large panel of publications include storage in selfconsumption metrics as "production" assets [ ], [ -]. With this vision, the storage power profile ( ) is simply subtracted to the production profile prod( ), with the receptor convention such that ( ) < 0 when the battery is discharging, and ( ) > 0 when the battery is charging (Eq. . and Eq. . ). This definition from the literature is illustrated by Fig.

. a and explicited with Eq. . and Eq. . .

Definition : self-consumption 1 = =1 min load( ), prod( ) -( ) =1 prod( ) ( . ) self-sufficiency 1 = =1 min load( ), prod( ) -( ) =1 load( ) ( . )
An other option to account for storage in self-sufficiency is to merge the storage power profile with consumption and production as illustrated in

. How to measure self-consumption Thus charging is accounted as a consumption and discharging as a production. This vision leads to Eq. . where ¯ ( ) > 0 represents the storage profile when charging, and ( ) > 0 represents the storage profile when discharging.

Definition :

self-consumption 2 = =1 min load( ) + ¯ ( ), prod( ) + ( ) ) In many scenarios, definition simply leads to higher self-sufficiency than definition , without that one definition is better than the other. We propose to look at two scenarios to test the limits of both definitions.

=1 prod( ) + ( ) ( . ) self-sufficiency 2 = =1 min load( ) + ¯ ( ), prod( ) + ( ) =1 load( ) + ¯ ( ) ( .
The objective is to have a self-sufficiency metric that remains coherent regardless of how a storage asset is operated. For instance, whether the storage is charged from solar panels or the main grid, or whether the storage comes back to its initial state of charge. The following section attempts a proof by the absurd to differentiate both metrics.

. . . The "arbitrage" scenario.

In this first scenario called "arbitrage", a storage is charging from the grid, either because it was poorly controlled, or because it has an arbitrage role in the wholesale energy market (Fig. . ). We choose to have the storage discharge during the day from the same quantity it was charged, to maintain a neutral energy balance. The arbitrage scenario is less common in the literature, as most often the storage is perfectly controlled to charge on solar production and discharge : Note that in Eq. . =1 is inside the min() function, as opposed to the classic self-sufficiency Eq. . .

for local energy demand. However, in real-world applications some arbitrage might be justified, or alternatively, degraded battery control can happen for various reasons, such as uncertain load forecast, and communication errors. Fig. . shows that considering storage as a production (i.e., definition ) leads to negative self-sufficiency. This is problematic as self-sufficiency without storage was originally bounded by %, and bounded metrics are easier to understand. Definition of self-sufficiency does not have a lower bound and thus loses a reference point. In that regard, definition is better as it is by definition bounded between % and %.

. . . Validity of the "net-metering" upper bound.

While the first scenario looks at the lower bounds of self-sufficiency definitions, the second scenario looks at the upper bounds. By definition, both approaches are bounded by %. However, both definitions should also respect the upper bound given by the "net-metering" self-sufficiency Eq. . , also represented by the dashed upper limit on Fig. This is a relevant characteristic to frame the potential of storage assets.

As storage assets attempt to match production and consumption, their best outcome should be limited to a scenario where all production is matched with some consumption which happens by definition in the "net-metering" approach. In practice, that means that even with storage assets self-sufficiency should not pass the dashed line on Fig. . .

The second scenario is illustrated in Fig . . The battery profile ensures that the battery start and end at the same state of charge given a % round-trip losses. As such, the battery does not bring additional energy production. Yet, self-sufficiency, as calculated by definition , is higher than when there are no concerns of matching time (i.e., the "netmetering" approach). This is problematic as this upper limit is intuitive and informative.

We did not prove that one definition is "perfect", but rather that they both have flaws. Nonetheless, we select definition to account for storage in self-sufficiency for the rest of this manuscript. The two main reasons are: it is the most generally accepted definition in the literature, and it preserves the upper limit given by the "net-metering" approach.

Highlight:

For the purpose of self-consumption metrics, storage is considered as a production asset (definition ).

. . How to expand self-consumption to communities?

Expanding self-consumption metrics to a community as a whole is not so different than the metrics for a single household. The same selfconsumption metrics apply, to the difference that consumption and production profiles are summed over the community members (Eq. . and Eq. . ).

self-cons

= =1 min =1 load ( ), =1 (prod ( ) -( )) =1 =1 prod ( ) ( . ) self-suff = =1 min =1 load ( ), =1 (prod ( ) -( )) =1 =1 load ( ) ( . )
However, expanding self-consumption metrics for individual houses in a community requires that we consider the status of power exchanged within the community. If we consider the energy production bought or exchanged with other members as part of the household local production, then follows Eq. . and Eq. . .

self-cons = =1 min load( ), prod( ) -( ) + prod . ( ) =1 prod( ) + prod . ( ) ( . ) self-suff = =1 min load( ), prod( ) -( ) + prod . ( ) =1 load( ) ( . )
Where prod . ( ) corresponds to the energy bought from other community members.

: Note that Δ = 1/4 corresponds to a time interval of minutes.

. Do we need storage to self-consume?

We began to estimate the value of storage when calculating self-sufficiency with daily time intervals in Fig. . . In other words, the self-sufficiency achieved by an ideal unlimited storage with daily cycles. In this section, we aim at estimating the value of storage when accounting for storage physics such as power constraints, energy constraints and charging/discharging efficiencies. Alg. provides a methodology as in [ ] to maximize selfsufficiency with such model of storage asset. Intuitively, this method consists of charging/discharging a storage asset as soon as possible to cover solar production, or load demand. For this solution to be optimal, we assume that there is no benefits in delaying charging/discharging activities at a later time.

( ) = max(0, -( -1) Δ × 1 ) if ( ) ≥ ( ) then ( ) = ( ) ( ) = min(0, -( -1) Δ × ) if ( ) ≤ ( ) then ( ) = ( ) if ( ) ≥ then ( ) = if ( ) ≤ - then ( ) = - //Update state of charge if ( ) ≥ 0 then ( ) = ( -1) + ( ) × Δ × else ( ) = ( -1) + ( ) × Δ × 1 = + 1 return ( ), ( )
Alg. takes a few input parameters load( ), and prod( ), the consumption and the production measured at a smart meter. The battery model set physical limits in terms of energy contraints ( , ) and power constraints ( , ). The initial state of charge (0) is set to , but it has a limited influence when looking at results for an entire year. The storage power is set to ( ) = prod( )load( ) on line , to maximize self-sufficiency at . We note that Alg. is used on offline measures of load( ) and prod( ), as such the influence of ( ) does not need to be discounted in the measurements of load( ) and prod( ). For . Do we need storage to self-consume the rest, we apply energy constraints from the storage (lines -), then power constraints (lines -), and finally we update the storage state of charge. Fig. . shows a resulting storage power profile ( ) when = , = kWh/house, and = = . kW/house for households. As expected, the storage profile is limited to kW ( . kW × households), and the state of charge to kWh. Further the storage only charges when there is a surplus of solar production, and only discharge when there is a surplus of demand.

. . Illustrative results

To illustrate the outcome of storage on self-sufficiency, we select a collection of

households from an open dataset of load profiles from France for a full year at a minutes resolution [ ]. This collection of load profiles both contains residential buildings with and without electric heating so that their average yearly consumption matches the larger database at . MWh/house/year. Separately, solar panel production data is extracted from the open-source PVGIS platform for Valence, France. [ ]. We illustrate a sample of the resulting time-series load( ), and prod( ) for a few days in May on Fig. Before illustrating the outcome of storage system controlled via Alg. , we highlight that simply calculating self-sufficiency at different time intervals already provides some information. On Fig. . , we vary solar panel sizes from from kWp to kWp, and plot self-sufficiency calculated at minutes intervals (denoted as "No storage"), hours intervals, and yearly intervals. Based on the different lower and upper bounds we can define three zones: A, B, and C, if we assume that no more than % of local energy production should be sold or donated to the upstream grid. Zone A corresponds to a regime where storage does not have the margin to improve self-sufficiency by more than %. Zone B corresponds to a regime where storage can follow the maximum achievable self-sufficiency. In zone C inter-seasonal challenges must be addressed to remain within % of the maximum achievable value [ ].

Figure . :

Impact of solar panel capacity on the community self-sufficiency for a "no storage" self-sufficiency, a "daily" selfsufficiency, and "yearly" self-sufficiency.

We define three zones based on the impact that storage systems can theoretically have.

Python notebook available at https://gi thub.com/Jonathan56/supplementar y _ thesis/tree/master/2 _ chapter. from kWh to kWh (respectively storage charging power from kW to kW). To obtain those curves, storage systems are controlled via Alg. for a year, and self-sufficiency is calculated with definition of section . . . Fig. . shows interesting trends, even though none of the results have an absolute value, since they correspond to a specific community of households. For a storage as large as kWh per household the "daily net-metering" upper bound on self-sufficiency of section . . is respected. In fact, this upper limit is only matched with a . kWh storage. Thus, as previously hypothesized self-sufficiency calculated with daily time intervals seems to be a good estimation of the maximum value achievable by storage assets under kWh per household. This theoretical limit can be writen as Eq. . where represent the set of days in a year.

self-sufficiency

= =1 min ∀ ∈ load( ), ∀ ∈ prod( ) =1 load( ) ( . )
Further, the incremental gain of self-sufficiency is not proportional to the storage size. For a solar panel of kWp, we see a self-sufficiency increase of % between no storage and kWh, when there is only a % increase between kWh and kWh storage.

. Can a few weeks represent a whole year : https://scikit-learn.org/stable/ modules/generated/sklearn.preproce ssing.MinMaxScaler.html

Highlights:

Calculating self-sufficiency on a daily interval gives an upper bound for what residential storage under kWh can do.

A storage asset ( ) maximizes self-sufficiency by following ( ) = prod( )load( ).

. Can a few weeks represent a whole year?

A whole year of data with relatively frequent time intervals of minutes can potentially lead to long and unmanageable optimization problems. This section explores reducing the number of weeks to simulate yearly scenarios without loss of accuracy with regard to self-sufficiency results.

The methodology is inspired from [ ], as such our contribution is limited to an adaptation of the selection of the optimal number of clusters. To introduce the general method, we provide a brief description of the clustering steps from pre-processing data to K-Means clustering and post-processing.

Before applying a clustering method, the load profile and the solar production profile are individually standardized with a min-max scaler to lie between zero and one. To match the format required by the K-Means clustering algorithm, the data is reshaped as a list of elements, i.e., one element for each week of a year. Each week consists of both load and solar data concatenated to form a single vector. The reshaped data is passed to a K-Means clustering algorithm which solves a minimization problem to find cluster centers. With an input of the clustering function, that represents the number of weeks to mimic the whole data set.

To select actual weeks and not the hypothetical center of clusters, we compute the euclidean distance between a center and each week of the corresponding cluster. The closest week to the hypothetical center is selected to represent the whole cluster. As such weeks are selected to represent the entire data set. To assign different weights for different weeks, a coefficient is calculated from the number of weeks in a cluster divided by the total number of weeks, i.e., weeks. Finally, the actual weeks selected can be adjusted to match the full data set in terms of energy. If so, a multiplicative coefficient is applied to scale up or down power profiles. As such, the power profiles are modified from the original data set, however, it enables to match the larger data set in terms of energy which is important for self-sufficiency metrics.

. . Determining the number of representative weeks

The objective is to find the lowest number of clusters under while ensuring that the selected weeks are representative of the whole data set.

To select the number of clusters giving a satisfactory result [ ] proposes five performance indicators related to load profiles to measure the quality of clusters. However, as we are interested in days representative of the synergies between load and production profiles, as such we propose to only use self-sufficiency as a performance indicator. In particular, we look at self-sufficiency for a variety of solar panel sizes and battery capacities.

As we look at the self-sufficiency achieved by batteries and solar panels on weeks, but also on the whole data set, we rely on Alg. to maximize self-sufficiency in an efficient way. The resulting metric is the mean absolute percentage error applied to self-sufficiency between the weeks and the whole data set Eq. . . error (pv, bt) = self-sufficiency -year (pv, )self-sufficiency K weeks (pv, )

MAPE = 1 card(PV × Battery) PV pv Battery bt |error (pv, bt)| self-sufficiency -year (pv, bt) ( . )
Where Battery represents the set of battery capacity tested, PV is the set of solar panel capacity tested. The term error is the error in self-sufficiency between the full dataset and the dataset of weeks.

. . Illustrative results

To illustrate the methodology, we attempt to reduce the number of weeks representing the households energy community in the previous example two different scenarios. A scenario for the extended scope of solar panel and battery sizes, and a scenario for a more limited scope which represents reasonable sizes for energy systems, PV ∈ [1, 5] and Battery ∈ [0, 10]. First, MAPE converges to zero as expected, since for = 52 the clustered data is strictly equivalent to the full data set. Our results suggest that = 5 is a satisfying number of representative weeks that only lead to an average . % error on self-sufficiency in the limited scope. What does it mean to "self-consume" Among other application, this methodology for data reduction provides a way to simplify optimal sizing problems constrained by both a long-term horizon of years, and minutes intervals for the operations of flexible assets.

Hightlight:

A full year data set can be summarized in five weeks with regard to self-sufficiency results when applying Alg. to find battery schedules maximizing self-sufficiency.

. What is the impact of load profiles on self-sufficiency?

While the previous sections take load profiles load( ) as a fixed parameter, this section sees load( ) as a variable to achieve a target self-sufficiency. This is useful when studying the optimal sizing of solar panels plus storage systems in local energy communities, as the solution to those problems is highly dependent on load profiles. Indeed, some load profiles are naturally more inclined to be self-sufficient when coupled with solar panels. For instance, an office building with greater consumption during the daytime is naturally better fitted to consume solar generation, than a residential building with an : pm peak demand.

Unfortunately, real-world consumption profiles are scarce resources, especially when looking for a variety of consumer types. The existence of open-source databases is one solution to study the effect of various load profiles on the sizing of solar panels and storage capacities [ ]. However, this only provides discrete answers, without offering a continuous analysis for degrees of "alignment" between load profiles and solar production.

In this section we develop a new metric the Natural Self-Sufficiency (NSS) index, and a method to create new load profiles for a given NSS index.

. . Defining natural self-sufficiency

The NSS index provides a solution to quantify the "alignment" of any load profile with solar production on a continuous domain from %, e.g., only nighttime consumption to %, e.g., a profile that perfectly follows solar panel production. As such, NSS quantifies the relative ability of a load profile to overlap with solar production. We aim for a relative metric, as we expect to compare different load profiles at the same location but with unequal energy demands.

To build such a metric, we rely on the well-established self-sufficiency metric from section . . However, to provide a metric relative to a load profile and a location, we calculate self-sufficiency for a solar panel capacity that generates the same amount of yearly energy as consumed by the load profile (i.e., a net-zero energy balance). Taking this solar capacity enables us to theoretically reach a % natural self-sufficiency for any load profile. From this definition, it follows that NSS is bounded between . What is the impact of load profiles on self-sufficiency % and %. Interestingly, the NSS also corresponds to the point where self-sufficiency meets self-consumption as shown in Fig. . . Proof. By definition at the natural self-sufficiency point:

=1 prod( ) = =1 load( ) =1 min load( ), prod( ) =1 prod( ) = =1 min load( ), prod( ) =1 load( ) self-consumption = self-sufficiency
The resulting NSS metric provides a way to differentiate the load profiles' ability to absorb solar production. For instance, to differentiate a residential load profile from an office building load profile. The latter is more likely to have a higher NSS as the majority of its consumption occurs during daylight hours as opposed to a residential scenario.

. . Methodology to set natural self-sufficiency

To generate a new load profile (profile( )), we start from an original load profile (load( )) and implement an optimization-based approach. The objective of the optimization is to make as few changes as possible from the original profile, i.e., minimum mean square error as an objective, to match a certain NSS target. Further, we impose that the energy consumption remains unchanged and that the previous maximum power demand is not exceeded as additional constraints. The problem results in a mixed-integer quadratic programming problem.

What does it mean to "self-consume"

: https://www.gurobi.com/ Min. =1 profile change ( ) 2 ( . a) profile( ) = load( ) + profile change ( ) ( . b) 0 ≤ profile( ) ≤ max(load( )) ( . c) =1 profile change ( ) = 0 ( . d) grid + ( ) -grid -( ) = profile( ) -pv × pv 1 ( ) ( . e) 0 ≤ grid + ( ) ≤ ( ) × max load( ) ( . f) 0 ≤ grid -( ) ≤ 1 -( ) × pv × pv 1 ( ) ( . g) =1 grid + ( ) =1 load( ) = 1 -target self-suff ( . h)
Where load( ) represents the original load profile, pv the solar panel size in kWp at the point of NSS, and pv 1 ( ) the power production for a kWp solar panel. The variables grid + ( ) and grid -( ) have been added to calculate the self-sufficiency of the new load profile profile( ). They represent respectively energy imports and energy exports. In order to ensure that power exports are zero when power imports are non-null and vice versa, we introduce the binary variable ( ). Finally, target self-suff represents the natural self-sufficiency to reach while minimizing the profile changes profile change ( ). To solve those equations, we use the Gurobi solver.

To illustrate both the concept of natural self-sufficiency and the optimization problem, Fig. . shows resulting load profiles when a % or a % NSS target is applied to an actual load profile with a NSS of %. The lower NSS target results in little load demand during the day (typically a community built around residential profiles). Whereas the % target increases demand during daylight hours as compared to the original load profile. For all the profiles, peak demand and overall energy consumption remain the same. As discussed previously, self-consumption metrics are most interpretable when calculated over a year. However, creating a load profile with a minutes resolution over a year involves more than data points.

This leads to a large quadratic mixed-integer problem, which cannot be solved on a normal laptop. To surpass this limitation we use the data reduction tool developed in the previous section. To reduce the full-year data set to five weeks of data.

. . Results

Following the methodology presented, we generate nine load profiles of five weeks representative of a full year with natural self-sufficiency from % to %. Each of those nine load profiles is derived from the original load profile describing the households in the previous section, The objective is to illustrate that we can study a variety of building compositions with the proposed approach. In particular communities with different lower bounds on self-sufficiency (i.e., equivalent to different "no storage curves" on Fig. . ). A higher "no storage curve" is representative of a community capable of intrinsically absorbing more local production without storage assets (e.g., office buildings), i.e., a higher natural self-sufficiency.

Similar to other figures in this chapter, Fig. . shows self-sufficiency on the y-axis and solar panel capacity per household on the x-axis. Although this time instead of having a fixed lower bound on self-sufficiency (thicker blue curve), we can study the impact of changing this lower bound (thinner grey curves). Among other, this type of sensitivity analysis on load profiles is useful to assess the importance of storage assets for a variety of communities. For instance, in the % NSS case storage assets are not relevant before kWp of solar panels per household, whereas in the % NSS case storage assets are relevant as soon as . kWp of solar panels per household.

What does it mean to "self-consume"

Highlights:

Natural self-sufficiency gives a reference to quantify the alignement of consumption with local production on a continious range.

The optimization formulation Eq. . a provides a way to generate new load profiles.

. Partial conclusion

In chapter , we seek to explore "what does it mean to self-consume?" from a technical viewpoint. Simply put, it is the ability to consume energy that was produced locally within a short period of time. To illustrate this concept, we explore three perspectives: the properties of self-consumption metrics, the impact of storage assets on individual self-sufficiency, and the natural "alignment" of load profiles with local production.

Throughout those different perspectives, we illustrate the concept of self-consumption, and more importantly, we highlight relevant lower and upper bounds for the next chapters.

Self-sufficiency taken for different time intervals reveals the theoretical value gap for storage devices to consider diurnal, weekly, and seasonal cycles.

Calculating self-sufficiency on a daily interval gives an upper bound for what residential storage under kWh capacity can do.

A storage asset ( ) maximizes self-sufficiency by following ( ) = prod( )load( ).

In this chapter, we build the ground knowledge to understand local energy communities, yet when we control storage assets (Alg. ) we put aside coordination issues. This is the topic of the next chapter and a core question for this manuscript. Controlling storage assets in local energy communities opens up discussions on centralized versus distributed control, or competitive versus collaborative actions.

How to coordinate local consumption with production?

Part I: Review .

What do we mean by coordination?

Generally speaking, to coordinate is to organize different activities into a coherent ensemble. For local energy communities defined in chapter , we imagine coordination as shifting or prioritizing consumption activities to overlap with local energy production. For instance, if between noon and : pm the available solar production is kWh and two electric bikes (A and B) must share this resource, but bike A has to leave at : pm and bike B two hours later, then a coordination strategy would prioritize bike A, and charge B once A is gone.

This example illustrates some of the ingredients that must be considered when deploying a coordination strategy. Ingredients also found when evaluating the value of a forecast [ ]:

a decision space: i.e., flexible assets which can be controlled or behaviors that can be nudged to consume or produce energy, a payoff structure: i.e., benefits or expenses associated with the decision making process, e.g., if bike A is not prioritized then it may not leave at PM, the quality of decision in the absence of coordination: i.e., the incremental benefits when decisions are taken with the aid of a coordination strategy, e.g., in the absence of coordination, bike A is not prioritized.

In France, collective self-consumption operations often have a limited decision space, e.g., one storage asset, or a limited amount of thermal storage and electric vehicles. This is representative of a modest payoff structure with limited benefits for power shared within a community, as discussed in chapter . As such, solar panels are often sized to overlap with consumption profiles in the absence of coordination.

How to coordinate local consumption with production Part I Review

One of the major challenges in coordinating local energy communities is that it involves multiple people, i.e., a community. In comparison, coordination at the scale of a single household is simpler. Communal aspects open consideration for competition and cooperation, but also decentralized and centralized decision making further detailed in section . . . Fortunately, coordination strategies are not meant to maintain grid stability which is left to the larger electrical network with frequency regulation mechanisms, or specific microgrid controllers. For coordination, local energy communities can rely on communication networks and optimization algorithms even taking minutes to solve.

Finally, before diving further into coordination strategies for local energy communities, we must acknowledge that such coordination strategies have already been discussed. In particular, as early as , when Fred Schweppe describes the concept of "Homeostatic control" [ ]. Schweppe combines customers and energy providers into a single system, a marketplace, in which everyone can enter, trade, and benefit. In the residential homeostatic day, Schweppe illustrates this idea: "at : PM the computer reacts to very high spot prices by turning off everything except the refrigerater, freezer and itself". Later in , the Pacific Northwest Smart Grid (USA) proposed a large-scale demonstration of a similar concept called "transactive energy" with , smart meters and MW of controllable equipment [ ]. The outcomes and the conclusions in this large body of literature are discussed in the next sections. However, we can already distinguish our vision of coordination strategies from this large body of literature [ ] on the emphasis put on scalability and privacy. Our approach to local energy communities does not prioritize those aspects as we face relatively small pools of objects to control (often below a thousand), and sufficient trust in a community manager to share consumption data.

Highlights:

Do we need to coordinate flexible assets? In part, this question depends on the decision space, the payoff structures, and the quality of decisions in absence of coordination in a community.

Coordinating consumption and production of electricity at the retail scale is not new.

. What do we expect from coordination strategies?

Simply put, we expect that a coordination strategy meets the objectives defined by the community while respecting a set of constraints. The subsections "general objectives" and "general constraints" provide an overview of what might be expected from coordination strategies in the literature. We then formulate a list to highlight the most salient aspects in our view for communities to consider when defining a coordination strategy.

. What do we expect from coordination strategies

General objectives

First of all, we expect coordination strategies to reach an objective that community members could not have achieved if they were to control their flexible assets individually. In comparison with an individual control scheme, the coalition value stems from better management of the common goods, e.g., the local solar production, and mutual support providing more options for flexible assets to charge or discharge.

The objective of coordination strategies is most often expressed as a reduction of costs [ ] [ ], even though some literature also includes greenhouse gas emissions [ ] as minimization objectives. The difference between coordination strategies often lies in what constitutes the operational cost of a community. Depending on the desired level of complexity, we find strategies accounting for a cost of energy inside and outside of the community [ ], a cost of using the distribution grid [ ], a cost for peak demand, a cost of equipment aging [ ], or a cost of lost comfort from shifting consumption [ , ]. In addition, those cost categories can be modeled differently, for instance, the cost of energy outside the community is sometimes a piece-wise linear function to represent time-of-use pricing specific for each member, or a constant price for all at all times.

Beyond categories of costs and their modeling, the objective may embed considerations on the fairness of costs distribution among members [ ], or not. The objective might be to simply minimize the cost for the community as a whole [ ], i.e., seeing the community as one entity, or to minimize the cost for all members [ ], [ ]. The latter option implies at least finding an equilibrium where no member is better off without penalizing another member. Fairness may also result in a competitive process, where each participant is subject to the same rules to minimize their cost, i.e., a market-based approach [ ].

Outside of cost-related objectives, coordination strategies can be expected to value empowerment of community members. This objective is among others related to the way coordination decisions are taken. Potentially, to satisfy the objective of empowering members, coordination strategies can give more resonsabilities to individuals in deciding when to activate their flexible assets. Market-based approaches [ ] and gamification [ ] of coordination mechanisms are some option from the literature to interact with community members. However, empowerment may also result from proposing easy to understand coordination strategy.

General constraints

We also expect coordination strategies to respect constraints set by the community and the physical limits of flexible assets. In particular, the community may desire a coordination scheme with strict privacy rules where members' personal information is being collected, shared, and used in appropriate ways. This may require metering information to be anonymized, or simply not transmitted to a community manager [ ]. The community may also require a scalable coordination scheme, as they expect a large number of members, e.g., when the geographical scope of a community is loosely restricted [ ]. The coordination strategy may be constrained to include future knowledge of flexible assets, i.e., when an electric vehicle must be fully charged to leave [ ]. As such,

How to coordinate local consumption with production Part I Review

: The concept of shapeable assets is further described in section . . . It describes a category of flexible assets that can only consume, but have some flexibility in their power profile. coordination strategies may be expected to predict future consumptions and production profiles to schedule flexible assets ahead of time.

Perhaps, one of the most constraining aspects of coordination strategies is the adaptability they need vis-à-vis of flexible assets. We expect coordination strategies to include different types of flexible assets, potentially with chemical constraints, e.g., for batteries, or thermal constraints, e.g., for cooling systems, or even constraints related to mobility in the case of electric vehicles [ ]. Beyond categories of flexible assets, we expect coordination strategies to be compatible with different manufacturers for the same type of flexible asset, e.g., Sonnen batteries but also Tesla Powerwall. Additionally, coordination strategies may be expected to adapt to the network connecting community members, so coordination can account for voltage and loading constraints on grid equipment, e.g., transformers and cables.

Further, the robustness of a coordination strategy to unexpected events can be seen as an additional constraint, in particular, to maintain coordination even when some flexible assets are not responding. Or, alternatively, to ensure that even in the worst-case scenario the price of energy remains on average below a given threshold. We note that robustness may be considered as a cost for the community, i.e., as a price representing the risk a community is willing to accept.

Application to local energy communities

We formulate a list of features that we consider salient aspects potentially leading to different coordination strategies. Coordination strategies can be different in their objective, or how they model their objective, how they account for fairness, or empowerment of members, but also in their specific adaptability to different flexible assets, and specificities of community members, grid constraints, and regulation. The following check list covers seven categories with each several yes/no propositions to frame local energy communities.

Flexible assets:

flexible assets come from different providers, members own short-term storage assets that can charge and discharge on daily cycles, e.g., chemical batteries, members own long-term storage assets capable of charging and discharging on seasonal cycles, e.g., fuel cells, members own controllable shapeable assets with mobility constraints, e.g., electric vehicles, members own controllable shapeable assets with thermal constraints, e.g., heating ventilation and air conditioning, members own controllable deferrable assets with a fix load profiles that can be moved in time, e.g., dishwasher.

The cost of energy:

each member when buying power outside of the community can access different time-of-use prices, different producers within the community can have different selling prices, network fees for exchanging power within the community are considered, costs for equipment aging are considered, e.g., related to cycling batteries, costs of lost comfort are considered, e.g., related to the effort of shifting power usage at a different time, additional revenues from providing grid services are considered, e.g., participating in primary frequency control, or load shaving.

the distribution of costs among members is done a posteriori through sharing keys, the distribution of costs is the result of a competitive mechanism before the operation.

Members and the community:

there exists a trusted community manager, members want strict privacy rules with regard to sharing metering data, e.g., requiring to anonymize data, there is a large number of participants, e.g., more than members, there is a rapid turnover of participants, e.g., the average duration of an apartment lease is less than a year, the financial investment of individual members is heterogeneous, e.g., some participants have financed most renewable energy systems, members accept a community-wide coordination mechanism, members accept competitive coordination mechanisms (developped in section . . ), members accept to receive nudges to influence their consumption patterns.

Production units:

some production units are controllable, e.g., biomass cogeneration power plants, the spread of production units is heterogeneous in the community, e.g., a single member owns most of the production units, the ownership of production units, can be different from the owner of the meter where the resource is connected,

How to coordinate local consumption with production Part I Review

Communication channels:

flexible assets are securely connected to the wide area network, flexible assets are limited to one-way communication, i.e., react to a broadcast, community members are connected to the same microgrid, and may rely on local voltage measurements for coordination,

Grid constraints:

voltage constraints must be accounted for in the dispatch of flexible assets, thermal constraints for line and transformers are limiting factors,

Regulation:

the duration of self-consumption intervals is minutes, the General Data Protection Regulation (GDPR) applies to metering data, the community can inject surplus production onto the upstream grid, Although it could be tempting to design a control algorithm that would "work" in all situations, at each scale, the individual scale, the collective, and the larger grid. This algorithm may very well be over-complicated and time-consuming to solve. As such, the design phase which consists of carefully selecting the right level of complexity at each scale is critical. Additionally, it may be interesting to provide the means for a coordination strategy to mutate, i.e., experiment with changes and keep positive changes, as local communities are complex systems bound to unforeseen evolution. To consider evolutionary coordination mechanisms, the science of complex systems might provide an interesting perspective that requires further work.

Highlights:

An algorithm that accounts for all phenomena at each scale may very well be over-complicated and time-consuming with regards to the payoff structure and the added value of controlling assets.

Local energy communities are complex systems bound to unforeseen evolution, as such, coordination strategies may want to include evolutionary processes.

. What synergies between social, economic, and physical coordination . What synergies between social, economic, and physical coordination?

Local energy communities already involve some coordination at different levels. For instance, social coordination as communities follow governance rules, but also economic coordination through contractual agreements, and sharing rules as described in section . . . . As we add another layer for the physical coordination of flexible assets, e.g., scheduling batteries and electric vehicles to minimize costs for the community, we can choose to replace socio-economic coordination mechanisms already in place or build around them as shown in Fig. . . Sharing value among community members is often a complex problem in itself as it requires members to agree on a definition of fairness. Thus, a coordination algorithm that simply maximizes value for a community as a whole is often simpler than a coordination algorithm that expects to share this value among all members. Accepting that sharing value can both come as a subsequent process, and result from a collective decision of community members enables us to consider simpler coordination strategies.

Similar to sharing value among community members, empowering community members is a complex problem as it requires involving members without overwhelming them with too much information. Thus, a coordination algorithm that does not seek to empower community members is often simpler than a coordination algorithm that includes this objective.

To be clear, we continue to advocate for empowering community members as this is one of the "raison d'être" of the community[ ]. However, this role of empowerment may not have to fall on the physical coordination when also considering the presence of a social organization. installation is small enough ( kWp) to be fully self-consumed by the community members counting local businesses. In this scenario, fairness, and empowerment are present, even though there are no physical coordination mechanisms. Physical coordination might benefit from working with existing coordination schemes rather than proposing a new paradigm. In part, because this leads to a simpler implementation process, but also because enforcing a technical solution as the central piece of local energy communities that might be misaligned with the desired social outcomes.

When considering the sharing process as a subsequent step after the physical coordination, it is important to ensure that the sharing rules have some degrees of freedom in regard to the metering data that serves billing purposes. Fig. . illustrates the degrees of freedom for two sharing rules applied to different members. For the time window between : PM and : PM the physical flux of electricity is such that producer # produces kWh, member # consumes kWh, and member # consumes kWh. There exist a multitude of ways to economically share the value of the kWh of local production among the kWh of consumption, in [ ] authors propose ten different approaches. We illustrate two schemes to share the value of local production. Based on the first rule "pro-rata of the total consumption" member # receives . kWh and member # receives . kWh, whereas with the second rule "prioritization of consumer # " leads to member # receiving kWh and member # receives kWh. Thus sharing mechanisms have relative freedom from the physical flux, and even more if we consider that prices (cente/kWh) can be different between members # and # . This distinction between physical flux and economic flux opens the door to physically coordinate all resources "together", and still economically reward certain members selected by the community, e.g., resource owners.

In other words, the problem of maximizing the "the size of the cake", and "sharing the cake slices" are loosely coupled, which may facilitate physical collaboration independently of how the economic dispatch is carried out.

.

What is the value of coalition

Highlights:

To manage the complexity of local energy communities, physical coordination does not necessary need to play the central piece when socio-economic constructs offer potentially interesting synergies.

There is some level of decoupling between physical flux and contractual agreements on how to share local production.

. What is the value of coalition?

In the first section . , we have seen that some conditions are required to design control mechanisms, namely: a decision space, a payoff structure, and some plus-value with regard to what would happen in the absence of control. Another aspect is whether there is some value to coordinating flexible assets "together", in comparison to flexible assets being controlled separately by each individual member. This value gap that we refer to as coalition value must compensate for the additional efforts of deploying community-scale coordination. Note that, as illustrated in the previous section, physical coordination at the community scale is not a requirement to form local energy communities. As such, we can perfectly imagine local energy communities bounded by sharing rules, and yet each participant controlling their flexible assets on their own. In particular, when flexible assets, such as batteries, are already too small to cover individual needs, and therefore not apt to share capacity with the community.

The objective of this section is to propose a method to assess coalition value in terms of self-sufficiency. Note that we do not take a cooperative game theory approach, as such, we always consider the "coalition" to represent the entire community and not a subset of it [ ]. The coalition value depends on the capacity of flexible assets to go beyond individual needs. In some situations the existence of a coalition value is clear. In particular, when there is a single solar panel for several flexible assets. However, when community members have their own solar panels and flexible assets the answer is less certain.

Methodology

We define the value of coalition as the self-sufficiency benefits obtained by forming the coalition. It is the difference between the community self-sufficiency when households are scheduled collectively, and the community self-sufficiency when each household schedules its flexible assets individually. To schedule batteries we use Alg. both for individual members, and for the aggregated community. As such, we apply Alg. to individual load ( ) and prod ( ) and sum the resulting battery schedules ( ), or we apply Alg. directly on the community load and production profiles to obtain a coodinated battery schedule ( ). Alg. provides the details of the methodology, and a Python implementation is available at https://github.com/Jonathan56/supplementary _ thesis/tree/m aster/3 _ chapter. This illustration does not provide an absolute answer on the value of any coalition. For this specific scenario, households individually controlled achieve between and % of self-sufficiency with kWh of battery per household, whereas the coalition reaches % of self-sufficiency. Beyond kWh of battery per household the differences become exacerbated both between the collaborative approach and the individual strategy, but also between scenarios with different spreads of batteries. Finally, achieving the upper limit, i.e., the self-sufficiency calculated on daily time intervals, seems challenging when only considering individual scales.

How to coordinate local consumption with production Part I Review

For this specific community, those results suggest that for batteries below kWh per household, the absence of coordination at the community-scale is not so damageable. It leads to or % of self-sufficiency losses, i.e., the coalition value. Further, this coalition value could be smaller with heterogeneous battery capacities among households, e.g., households with a greater consumption could be given a larger battery capacity. For larger battery capacity some community scale coordination seems relevant as it increases self-sufficiency up to % in comparison to individual scenarios. Those values are very much dependent on initial assumptions, in particular, that each household has a solar panel. Different spreads of flexible resources may very well prove that the coalition value is significant with small battery capacities. It is interesting to highlight the coalition value as a decision criterion that is not binary, but rather to compare with the payoff structure and the complexity that is required to achieve community-scale coordination.

We note that for this example, we have measured the coalition value in terms of self-sufficiency and not in euros. However, we can reasonably say that self-sufficiency is strongly correlated with electricity costs in cente/kWh, meaning the more local power is consumed the smaller the electricity bill will be. Nonetheless, in the financial case, grid fees for exchanging power would also be accounted for. We extend this methodology for financial coalition value in chapter .

. A review of coordination strategies

To avoid listing coordination strategies, we choose to construct our review in two steps. First, we discuss the typology of coordination strategies, whether all decisions are taken centrally, or aggregated from the decisions of individual members. Then, we explore the inner workings of strategies whether they rely on competition or collaboration, or both.

. . Decentralized versus centralized strategies

A large body of scientific literature favors decentralized approaches. This is in line with larger allocation problems such as food allocation for metropolitan areas. It usually requires decentralized mechanisms to coordinate the participation of thousands of small and large supermarkets, and tens of thousands of restaurants, each with specific needs for different categories of foods and transportation [ ]. A central entity with imperfect knowledge of the participants is usually not recommended. However, here, we do not have the scale of a metropolitan area but the limited geographical scope of local energy communities, as such, we believe that centralized coordination strategies are relevant to include.

How to coordinate local consumption with production Part I Review

This single dimension, i.e., centralized or decentralized is convenient to express a general idea on the topology of coordination strategies, however, it is simplistic and does not discriminate between the different aspects of coordination. To extend what we mean by centralized and decentralized, we consider different domains [ ]:

Communication: which refers to the topology of communication networks. In particular, we consider several options whether there is no computerized communication, communication with a central entity in a -way or -ways direction, or peer-to-peer communications, Control: which refers to where the decision is taken. We consider two options if decisions are only taken by a central entity, or whether individual entities are also part of the decision process, Physical: which refers to the spread of consumption and production resources, and whether they can be controlled or not. An individual self-consumption operation has no "spread" as everything happens behind the same meter. This is not the case for most local energy communities, especially collective self-consumption operations which necessarily involve multiple metering systems. As a result, we only consider scenarios where some spread exists, i.e., multiple batteries or metering systems. Scenarios with no spread can often be handled with Alg. from chapter . This analysis by domain is also useful to lift some of the confusion around the "peer-to-peer" appellation. If it refers to the physical domain, it may simply be that two neighbors trade energy, regardless of the communication and control infrastructure. In that sense, any local energy community engages in peer-to-peer activities. However, if peer-to-peer refers to the communication and control infrastructure, local energy communities are not always "peer-to-peer". We can imagine peer-to-peer scenarios with regard to decision making but not to communication infrastructures. This is the case for local energy markets hosted on a central platform and using a peer-to-peer decision-making such as a first come first serve design. For instance, similarly to well-known central platforms: Craigslist, or Leboncoin in France, yet involving peer-to-peer decision making. . A review of coordination strategies Instead of the centralized/decentralized duality, we obtain a D map representing the different intersections of communication and control domains (Fig. . ). This mapping is inspired by [ ], and it distinguishes four categories of coordination mechanisms based on communication capabilities between devices and a platform (i.e., -way or -way), and whether local decisions are taken locally or not. It is further extended by two categories (in blue dashed lines), no computerized communication, and peer-to-peer communication. The classification is not strict, and coordination strategies may include more than one category. Nonetheless, this mapping is useful to organize our review of coordination strategies.

#1 #3 #2 Local control
While it goes beyond simply centralized or decentralized methods, the concept remains present, e.g., between categories such as centralized optimization and peer-to-peer distributed optimization. The following subsections highlight each category.

Droop controllers

Coordination in this category is possible as control elements influence each other via the physical properties of the controlled process, but not through direct communication. Droop controllers for power system applications are very common, such as in power/frequency droop serving primary frequency control or for local voltage control, e.g. with a reactive power/voltage droop [ ]. This type of controller is typically targeted at mitigating grid constraints, e.g., reducing tap changes, or allowing network planners to approve higher DERs penetration and higher loads than would otherwise be feasible [ ].

Nonetheless, in [ ] a similar control algorithm shows that it can shape water heater consumption to better match solar panel production, which corresponds to a self-sufficiency objective. As such [ ] makes use of thermal storage, where the resulting power consumption depends on voltage and current water temperature. This strategy applies to other forms of storage. For instance, batteries, where inputs variables become voltage and current state of charge as in Nanoé's DC interconnected micro-grids [ ]. To avoid noise, input data can be filtered, e.g., through an exponential moving average, and the transition between the different states of the controllable system can be smoothed, e.g., with dead-bands, or fuzzy logic methods.

In this category, the control loop is closed locally and no internal information needs to be shared; thus offering resilience to communication outages, but also an ease for large-scale deployment. However, the dependence on design-time parameters and assumptions may cause severe incidents such as system collapse described in [ ]. Further, as the system information is not concentrated anywhere but distributed along with control elements, it requires some effort to understand how and why the control system responds to disturbances. For local energy communities developed across multiple feeders including non-community members this form of coordination strategy is therefore not applicable.

Price reaction

This is perhaps the most common coordination strategy, at least in France, as roughly one of two consumers opted for an on/off peak hours pricing scheme. The price reaction approach is based on one-way signaling of pricing. Strategies can be further differentiated from the frequency at which price signals may change, whether signaling is fairly static with on/off peak hours, dynamic with frequent updates on upcoming hourly prices, or both as in [ ].

How to coordinate local consumption with production Part I Review

This coordination strategy benefits from being rather simple to understand. In fact, the difficulty lies in the coordinator which is tasked to define what hours are on or off peak without full knowledge of individual devices' constraints. In France, on/off peak hours vary from city to city. For instance, in Paris off peak hours are at nighttime between : pm and : am, whereas in Nantes off peak hours includes daylight hours ( : pm to : pm). In the case of dynamic pricing schemes, wholesale energy markets are usually directly driving prices to be cost-representative for end customers.

In the context of local energy communities, price reaction mechanisms could broadcast current local production as in [ ]. In this way, individual assets gain a global view of the community, enabling automatic responses or nudging behaviors during high production time. Nonetheless, this mechanism does not prevent assets from rushing all at once on available local production. As such this mechanism may require more frequent updates, thresholds to account for uncontrolled demand, and potentially random response times to de-synchronize automatic assets.

In the recent collective self-consumption operation "ABC" , the coordination of the principal storage system is based on a similar scheme to price reaction. The storage system receives the local power production i.e., the signal, and only starts charging after a certain power threshold is reached, which represents the expected base consumption from the community.

The system discharges at nighttime during a fixed number of hours. We note that broadcasting the community's netload instead of local production would carry additional information on current consumption, but would also require retrieving information at individual metering systems, e.g., closer to a -way communication scenario.

This type of strategy, broadcasting signals, is not new, as explained in the following section on "top-down switching". On/off peak hours could be triggered by radio signals from the s. However, with the advent of the Internet of Things, recent devices often have -ways communication capabilities, and therefore only using -way communication is not a necessity anymore and may not justify a sub-optimal dispatch. Nonetheless, price reaction schemes remain interesting as they provide a solution that can be easily explained in the context of local energy communities.

Top-down switching

One of the earliest top-down switching mechanisms has been the radio teleswitch system in the UK in the s. Distribution system operators (DSOs) had specific codes for teleswitches operating on their networks. As such, DSOs could provide instructions to the central teleswitch control unit in London, which would then be passed on to the British Broadcasting Corporation (BBC) for long wave-transmission over the UK [ ]. Upon receiving the right signal teleswitches would activate the corresponding switch with a random time offset of ± . minutes (or alternatively switch between tariff rates) [ ].

. A review of coordination strategies In , this top-down switching mechanism is still available for DSOs on the recently deployed French smart meters, however, it uses broadband over power line communication. Some companies have also developed their own "teleswitch", e.g., Voltalis is a company connecting heating elements to a switch that can be triggered over the Internet. Consumers receive the guarantee that such service inhibitions occur for a total duration of at most minutes per day. In short, consumers are exposed to delayed supply rather than price volatility [ ].

#1 #2 Local control Communication & control
Top-down switching schemes tend to find applications in large-scale demand response control rather than in local energy communities where -ways communication is often enabled. Nonetheless, it is certainly possible to imagine applications for local energy communities with water heaters and HVAC systems.

Transactive control

This category of coordination strategies involves both -ways communication with a central platform and local decisions from community members. As such, individual community members participate in the overall coordination process through their individual controller. Empowerment of community members and scalability with regard to participants are often cited as advantages of this category. Two types of strategies are typically found in this category: decomposition methods for distributed optimization, and market-based solutions. prosumers according to their contributions to system loss reduction, and by doing so, increases the social welfare of the community.

In this type of coordination strategy, individual members are asked to optimize their own strategy, and as such competitive aspects are more salient. However, as community members cannot possibly personally bid their energy consumption every minutes of the day, individual energy management systems are needed. From an end-user's perspective, this might not be so different from a fully centralized platform, unless individual energy management systems are intuitive and accurately represent individual preferences.

Centralized optimization

In this category, coordination strategies rely on a central controller with access to local information. This category includes multiple strategies as it is not restricted by communications nor required to include decisions from multiple actors. Decision making may take the form of heuristic rules, use more recent machine learning methods, e. Centralized platforms allow companies to stay in control of the equipment they deploy in communities. For instance, companies such as LANCEY Energy Storage with their electric heater plus storage may wish to remain in control of their flexible fleet to ensure that it is properly used. As such LANCEY Energy Storage uses a centralized MPC to coordinate heating and battery management with regard to variables such as upcoming electricity prices and weather forecasts. Note that although we classify LANCEY's MPC algorithm as a centralized strategy, it also involves local decisions at some level through user preferences with regard to temperature planning. In the end, this level of end-user interaction and experience, i.e., empowerment, might be similar to the empowerment of local energy markets, if it also comes down to setting preferences in a software.

Distributed ledgers

This category of coordination strategy involves both peer-to-peer communication and control. In other words, no single entity keeps all information nor does it take all the decisions. Although this might be a simplification we understand peer-to-peer communication as the presence of distributed ledgers, i.e., a distributed database. This category of mechanism is relevant for coordinating non-trusting entities.

A good illustration of this double requirement is proposed in [ ], where both a distributed ledger through the Ethereum network and a distributed optimization method are combined. The Ethereum network not only : https://blog.chain.link/smartcontract-automation/ last visited May . provides a distributed data storage for metering and billing data but also a distributed computation platform through "smart contracts". A smart contract is a piece of executable code shared by every node that defines immutable rules, running directly in the Blockchain. Practically, they are stored in specific blocks in the chain and the rules they define trigger subsequent logic to write data in the rest of the chain. This replaces the need for a centralized trusted entity to hold the algorithm logic [ ].

Alone the ADMM for distributing an optimization problem falls in the "transactive control" as it still involves a central aggregation step, however, with the Ethereum blockchain this aggregation step is done in a transparent manner through smart contracts. Thus enabling all participants to audit the progress of the coordination algorithm, the accuracy of the solution, and the veracity of their scheduled commitments. Further, the ADMM is a natural fit for implementation on a blockchain, as it both guarantees convergence for convex problems yet has a computationally cheap aggregation step [ ]. As most of the optimization problem is solved by individual participants outside of the blockchain, this strategy can be applied to solve complex linear programs. In [ ] authors maximize social welfare while dispatching batteries, shapeable load, deferrable loads, and considering linearized grid constraints.

In [ ], an ADMM decomposition is also used to solve a matching problem between consumers and prosumers. However, additional care is given to the consensus mechanism that selects the "miner" in charge of writing to the blockchain. A proof of stake is used which is far less energygreedy than the classical proof of work method used in Bitcoin. The miner node selection is made according to a density function capturing the trade-off between the exploitation of nodes with a good reputation and the exploration of new nodes. In [ ], and [ ], a communication strategy is proposed for solving a fully decentralized DC optimal power flow using the ADMM, in which only limited information on boundary buses are exchanged among adjacent branches of the grid (eliminating the traditional central aggregation in ADMM). In [ ] author proposes a randomized ADMM consensus which also only requires neighbor-wise asynchronous communications between community members.

Full peer-to-peer market designs are based on peers directly negotiating with each other, in order to sell and buy electric energy. In [ ] prosumers and consumers trade with each other individually and in a randomized order on a pay-as-bid basis. In every time slot, each buying consumer is randomly paired with selling prosumers in an iterative fashion until she/he has procured all of her/his electricity or has been paired with all potential sellers. Peer-to-peer market designs may also include considerations for grid constraints as in [ ]. Traditional auction-based markets can also gain a peer-to-peer characteristic if they are executed through smart contracts as in the iconic Brooklyn experiment [ ]. However, [ ] shows that there are some limitations to smart contracts, in particular the need to incentivize participants to trigger smart contracts that would otherwise represent a central actor. As an alternative to ADMM, randomized trade matching, or smart contracts on a blockchain, [ ] describes consensus+innovation decomposition techniques.

Distributed ledgers, e.g., blockchain technologies are the backbones of such coordination strategies. Although they offer certain advantages, e.g., Part I Review working with non-trusted entities, they also increase the complexity of coordination strategies. In particular, [ ] proposes a diagram to choose whether a blockchain technology is needed or not as shown in Fig. . . In the case of local energy communities defined in chapter (the red path on Fig. . ), an always-online trusted third party is available, e.g., the community manager. As such, trust-less environments are misaligned with local energy communities expecting to form a trusted entity.

Highlights:

A single dimension, i.e., centralized or decentralized is convenient to express a general idea on the topology of coordination strategies, however, it is simplistic and does not discriminate between the different aspects of coordination.

Strategies that we named "droop controller" and "distributed ledgers and optimization" are not adequate for the local energy communities described in chapter .

Among the possible strategies, model predictive controllers, market-based approaches, optimization decomposition methods, and heuristic rules for price reaction strategies have been proposed in the literature.

. A review of coordination strategies

. . Competitive versus collaborative strategies

A competitive strategy suggests winning individually, whereas a collaborative strategy suggests winning as a group. The literature on energy trading is often focused on the competitive implementations and models, whereas the new European regulation through their definition of renewable energy communities seems to favor a collaborative model [ ].

While top-down switching and centralized optimization schemes impose members to collaborate toward the same objective. The rest of the topologies presented in Fig. . , can have both competitive and collaborative aspects. In particular, transactive control and peer-to-peer mechanisms are not limited to competitive mechanisms.

In [ ], a peer-to-peer framework is proposed to allow participants to collectively optimize local energy consumption. To avoid issues related to market-based transactions, [ ] proposes a solution in which cooperation prevails over competition. Such a solution consists of sharing the aggregated flexibility in a fair and optimal manner based on objective costs, needs, and constraints. To share value while incentivizing cooperation [ ] and [ ] propose a K-mean clustering and a randomized approach to estimating the Shapley value in order to financially reward prosumers based on their contributions to the local energy community.

On the one hand, for [ ] competitive strategies are much easier to implement, they simply need to be created and players allowed to participate. Local energy markets rely on this competition and profit maximization for participants to behave in a socially optimal way [ ]. However, competition is also a source of challenges for local energy communities. In particular, market liquidity (e.g., communities with a single producer) is often mentioned as a problem but not solved [ ].

Further, since individual household consumption is hard to predict, e.g., for sub-hourly dispatch intervals, settlement mechanisms may play a dominant role [ ]. Those issues may prevent market pricing to be cost-representative, potentially resulting in sub-optimal scheduling of flexible resources.

On the other hand, cooperation requires the ability to create and enforce contracts, so that players are "forced to cooperate" [ ]. In centralized optimization, participants are "forced" through command and control to do the right thing for society, however, potentially at the detriment of member empowerment considerations. Further, even if the physical coordination is collaborative, an economic dispatch must also be agreed upon among community members which is a complex topic. For instance, the literature on tariff designs suggests that sharing rules should: enable the recovery of investment costs, incentivize self-consumption, and be attractive for all customers meaning they are transparent, simple, and fair [ ]. We note that the lack of empowerment from a centralized control algorithm could be counter-balanced by discussions of the appropriate economic dispatch among the community.

. . . Competitive and collaborative environments

Are some environments more likely to develop competitive strategies than others? As mentioned in [ ] collaborative mechanisms require an

How to coordinate local consumption with production Part I Review environment that can "enforce" contracts for players to collaborate. As David Vercauteren analyzes in his book "Micropolitique des groupes", one is not born a group, one becomes a group [ ]. When it comes to creating a group, we are paradoxically accustomed to trusting our intuition that it will naturally work. On the contrary, it requires detailed knowledge of the mechanisms at play to enable successful collaboration. In [ ] three ingredients are highlighted to create a favorable environment for collaboration: a feeling of security, a feeling of equity, and a feeling of trust. Whether local energy communities are deployed in large cities among strangers with a rapid turnover due to apartment leasing, or in smaller cities with a few house owners that know each other, the process is very different to cultivate security, equity, and trust. As such, the coordination strategy to deploy depends on the environment of the community. A community of strangers might perceive collaborative mechanisms as unfair, and alternatively, a strong community might perceive competitive mechanisms as sapping unity.

In nature, competition often arises in abundant environments, e.g., competition for light between trees, whereas cooperation between species is found in hostile environments as a non-negligible advantage for survival, e.g., in mountains and deserts. In the literature, some energy communities are portrayed as an abundant pool of prosumers trading energy, as such competitive mechanisms seem well aligned. However, the local energy communities described in this work are more ambiguous. From one angle, they are connected to the national grid and therefore benefit from a certain abundance of energy, but from another perspective, they also experience "shortages" of power from their limited local resources, e.g., solar panels and batteries. As regulated electricity prices increase, this "shortage" of local power might gain attention and favor the collaboration naturally found in "hostile" environments.

. Partial conclusion

For local energy communities, the challenge is to match load and production in a limited time window, and to do so, collectively. To answer this challenge, coordination strategies may take different forms depending on the specific attributes of a community. For instance, a community can be operating a microgrid with voltage constraints, or rather pay fees to use the public distribution grid. As such, we propose a list of the most salient aspects that may result in different coordination approaches.

Further, we suggest that local energy communities are complex systems bound to unforeseen changes, e.g., in the definition of fairness, or the composition of flexible assets. Thus, coordination strategies should be able to mutate at some level to follow the dynamic needs of communities. A potential approach is then to start simple and progressively complexify a coordination strategy. We also highlight external socio-economic mechanisms can reduce the complexity of coordination strategies, in particular, for aspects related to fairness and empowerment.

The literature proposes a large panel of coordination strategies which we categorize based on the communication channels available, where decisions are made, and whether the approach is competitive or cooperative.

We believe that this classification clarifies the characteristics of the different approaches, and as such, simplifies the process of picking the right methods to answer specific attributes of local energy communities.

In the next chapter, we consider local energy communities with a trusted community manager to perform data collection from smart meters, and to schedule flexible assets. We note that those types of privileges are already granted to companies like LANCEY Energy Storage to manage flexible heating systems. As such, we develop coordination strategies that belong to the centralized optimization category while relying on external socio-economic mechanisms for fairness and empowerment aspects. The objective of the next chapter is to provide clear solutions for communities, but also to highlight issues and limits that arise when implementing a strategy.

You are engaging in madness. I feel obliged to accompany you.

-Alejandro Jodorowsky

In the previous chapter, we reviewed the requirements, and the roles of coordination strategies, as well as, a panel of approaches from the literature. For communities to coordinate their consumption, this chapter develops and compares two strategies, a predictive approach, and a reactive approach. In relation to the previous chapter, we consider both of those strategies as centralized optimization, since they rely on a central community manager orchestrating available assets. While the predictive approach partially relies on a good knowledge of the future, the reactive approach relies on a good knowledge of the recent past. This chapter describes both of those approaches and compares them.

. Which local energy communities?

Before developing coordination strategies, we must clarify where do we apply them and what do we expect of the predictive and reactive approaches. This section reflects the discussion from chapter on the prior requirements to seek some coordination between community members, as well as, on the role that physical coordination strategies have in the community.

Conditions for a coordination strategy

We place ourselves in local energy communities that have (i) a decision space, i.e., significant flexible assets in comparison to their energy consumption (ii) a financial payoff structure, for instance, French regulated electricity tariffs and (iii) some coalition value, i.e., value to act together rather than act as individual actors.

Note that, although French regulated tariffs create incentives to control flexible assets, they are possibly too low to achieve a return on investments within the systems' lifetime as discussed in section . . . . Further, note that a different methodology is presented in section . . . to assess coalition values in euros, as opposed to the methodology of section . limited to coalition values terms of self-sufficiency. In the latter methodology, network fees are accounted for, as they will decrease the coalition value of a community.

Complexity of the coordination strategy

Following the bullet list of section . , we frame the complexity aspects of local energy communities that coordination strategies should account for.

How to coordinate local consumption with production Part II Methodology

: At least in France, the dispatch may rely on default dynamic keys from section . . , which avoids communities sending custom sharing keys every month to a distribution system operator.

Flexible assets: local energy communities may be equipped with batteries and shapeable loads such as electric vehicles, heating and air conditioning systems, and water heaters from different manufacturers.

The cost of energy: for the community as a whole must be minimized while considering costs incurred through grid fees. The economic value of local power production is shared among the community a posteriori, i.e., after the physical coordination. Community members may have different energy providers and thus different time-of-use prices.

Members and the community: all types of consumers are connected with a smart meter with a sub-hourly granularity. All community members even if they do not have flexible assets must share their smart meter data. Communities are limited geographically and count less than members, for which there exist a trusted community manager. The financial investment of community members is heterogenous.

Production units: are intermittent sources such as solar panels, wind turbines. Production units must be connected behind a smart meter. The spread and ownership of production units can be heterogenous among community members.

Communication channels: each community member must have access to the wide area network, however, the connectivity issues of a few flexible assets are not critical to the system. Grid constraints: voltage and loading constraints are assumed to remain within the normal limits planned for at the design of the local energy community. As such they are not considered at the operational level. Note that local energy communities may spread on different sections of the distribution grid, i.e., all members are not behind the same low-voltage transformer. As such, increasing selfproduction does not necessarily mean reducing grid constraints. Nonetheless, in many scenarios, those two aspects are in line as they both depend on synchronizing consumption and production.

Regulation: self-consumption interval last minutes. Although, the community does not have strict privacy rules, it respects the GDPR, e.g., giving members the right to be forgotten. The community may inject power onto the upstream grid without costs nor gains.

The community is in charge of defining sharing rules to split financial benefits among members. Several sharing rules are available as presented in section . . We note that including grid fees in the scheduling problem implies prioritizing flexible assets for individual needs. As such, it potentially simplifies the subsequent economical dispatch.

The notion of empowerment in the physical coordination is limited to the decision of members (i) to participate or not in a centrally managed process, and (ii) to set power, energy, and time limits on flexible assets. Empowerment is expected outside of the physical coordination, when discussing sharing rules, during community events, and through user interfaces providing feedback on energy management. Local energy communities targeted in this chapter favor cooperative environments suitable to have a trusted community manager, potentially made of several members, which can schedule flexible resources for individual community members. In the following MPC approach, we propose a unique combination of models, predictive algorithms and control formulation. We model assets via standardized flexible bids which are inspired by [ ]. Flexible bids convey information on the status and the limits of flexible assets, and are described in the next section. This approach aims at facilitating the interface with a wide range of assets whether they have chemical, thermal, or time constraints, as well as, a wide range of manufacturers and providers. The optimal control schedule is solved through a linear program. We distinguish our approach from other MPC in the literature by including the cost of exchanging power within the community from distribution grid fees. However, a consequence of accounting for power exchange is that we must forecast netloads for individual members. As such, predictive models must handle small-scale short-term netload forecasts which is fairly challenging due to the high volatility and uncertainty involved at the scale of a single household [ ].

. A model predictive control

This implementation is conceptually illustrated in Fig. . . The next sections detail the building blocks of the MPC strategy: the order book included in the data layer, the optimal scheduling, and the forecasting of netloads. In addition, the result sections illustrate the impact of frequently updating forecasts and schedules, as well as, options to mitigate the impact of forecasting errors.

How to coordinate local consumption with production Part II Methodology

. . The order book

The order book maintains a list of all participating resources. To participate, a resource must submit a flexible bid with some information related to its current status and available capacity. This intermediary order book adds a level of abstraction between flexible resources and the scheduling mechanism, which provides adaptability and avoids issues related to directly interfacing with flexible resources. Flexible resources must respect a specific format to be added to the order book. Four types of flexible resources are standardized on the platform: batteries, shapeable, shapeable at a price, and deferrable devices with power injection/withdrawals denoted as follows: Several reasons motivate modeling flexible assets through a standardized and limited bidding format. The main reason is to provide an interface for flexible assets with a variety of embedded software to cooperate, e.g., batteries from Sonnen or Telsa with electric vehicles from Renault. It also enables providers of flexible assets to remain in control of their devices, as they only delegate control to our proposed MPC platform. The order book approach is also adaptive to new or removed assets, as it is built around a changing list of flexible bids. In a way, this approach mimics energy markets in their ability to create a common ground for a variety of actors [ ].

We provide a panel of bidding options to represent most flexible assets, in particular, electric vehicles (i.e., either as a storage or a shapeable), heating ventilation and air conditioning as shapeable loads at a price, and washing machines as deferrable loads. max(0, ( ))

Import at the community level ( . ) We note that deferrable loads turn the problem from a linear program to a mixed-integer linear program. Thus, in the case with no deferrable loads, the optimization problem is then faster to solve. Eq. . ensures that the maximum and the minimum deviation from a pre-defined shapeable schedule is penalized with cost .

. . . Scalability of the proposed linear programming approach

We demonstrate the ability of this optimization formulation to manage up to a hundred participants each with their own flexible assets. To do so, we measure the CPU time to write the optimization problem using Pyomo and solve it using the GLPK solver on a laptop with a . GHz processor. We run the optimization for two days at min intervals, which represents a total of 4 intervals × 24 hours × 2 days = 192 time steps.

The same data source is selected as for the previous examples, however, the number of households is increased from to . Each household is equipped with a kWp solar panel and a kWh battery. Grid fees are set to . cente/kWh and the electricity price outside of the community at . cente/kWh.

Number of participants Time [minutes] 100 households under 75s

The results in Fig. . show that the optimization can be solved in . minutes for a community of a hundred participants with a time horizon of days. This is faster than the minutes time intervals for collective self-consumption in France, even though this optimization process is rather intended to run a few times per day, hence we show that this portion of our coordination algorithm is scalable for our desired complexity. In terms of memory, for a hundred households the problem used MB of RAM. We note that extending the time horizon to a full week for a hundred households takes minutes to solve. However, as highlighted in Fig. . (the impact of time intervals on self-sufficiency) the potential of the weekly value gap must be assessed before, as well as the battery capacity required to reach such a temporality beyond diurnal cycles as illustrated on Fig. . .

. . . The value of coalition in euros

In this section, we illustrate the optimal scheduling problem on finding the coalition value of a community. To the difference of section . , we define the value of a coalition as the financial benefits obtained from forming a coalition. It is the difference between the overall energy cost when each household schedules its flexible assets individually and the overall cost when households are scheduled "together".

Methodology

The linear programming formulation described above Eq. . enables us to compute the minimum energy cost for a community, including the cost of imports, and exchanges when households are scheduled together. As such, the linear programming formulation provides one side of the coalition value, the mimimum energy cost when households are coordinated together.

To find the minimum cost of energy when each household schedules their flexible assets individually, we use Alg. . This algorithm computes the battery schedule to reach the maximum self-sufficiency achievable for a single household. Further, we make the assumption that a household achieving a maximum self-sufficiency also achieves a minimum energy cost. This equivalence between self-sufficiency and energy cost holds when reducing energy imports is the only way to reduce costs. Note that it does not hold with time-of-use pricings, as a cost minimization would also depend on moving usage from high to low price hours. We place ourselves in a context without time-of-use pricings.

To compute the coalition value, on one side, we use the optimal scheduling problem Eq. . to obtain battery schedules minimizing cost using a community wide coordination, and on the other side, Alg. to obtain battery schedules minimizing cost for separately controlled households. Instead of comparing self-sufficiency achieved by both scheduling approaches as in Alg. , we compare the energy cost calculated with Eq.

. .

cost = =1 × max 0, ( ) + ℎ × max 0, ( ) -max 0, ( ) ( . )
Where Eq. . is essentially the objective function of the optimal scheduling problem Eq. . , where ( ) is the netload of member . Note that in Eq. . as in the definition of the self-consumption metrics, changing the time granularity of the time series data can be helpful to estimate a theoretical lower bound on energy cost. Part II Methodology

Results

We look at the value of coalition as a function of grid fees on the energy exchange among community members in cente/kWh. To illustrate the outcome of the value of coalition, we select the same data sample as in chapter section . . However, to avoid the burden of optimizing a full year, we select a single week in spring between the th of May and the th of June. For the households selected (as in previous examples), we fix the solar panel capacity per household to kWp, and the battery capacity per household at kWh. Note that battery power constraints are taken has half the energy capacity, i.e., for a kWh battery power limits are ± . /kW. Grid fees vary from to . cente/kWh, and the price for electricity outside of the community is fixed at . cente/kWh (which is representative of the regulated tariff in France in ), costs for battery aging are not accounted for over the course of one week. France in ), and finally the coalition value is null when grid fees are the same as the cost of electricity. Both upper and lower limits have been added to Fig. . to show the cost of electricity in the absence of batteries, or the cost of electricity with an ideal infinite battery, i.e., ( ) is aggregated to a single point. Those limits follow the methodology defined in chapter section . . . A perfect battery leads to a cost of e when grid fees are null as all power is provided by local solar panels. Although, the community as a whole is fully self-sufficient, power exchanges between members are needed, and thus even in the theoretical scenario, the cost for the community is proportional to grid fees. Those results illustrate and also participate in validating the optimization formulation. Indeed, when grid fees are the same as electricity tariff the optimal scheduling leads to the same cost of electricity as Alg. , even though both approaches are significantly different. This is due to the fact that there is no interest in exchanging power and thus the individual strategy Alg. also leads to an optimal outcome. As mentioned in section . network fees penalize exchanging power and thus collaborative strategies. The magnitude of grid fees is therefore another determinant of the coalition value.

. . Forecasting

Only flexible resources are submitted to the order book, the rest, uncontrollable load demand, and solar production are included as day-ahead forecasts. This section describes the method selected to forecast short-term netloads for individual households.

Picking the right forecasting method depends heavily on the nature of the data, and thus on a specific scenario. The literature offers a large panel of forecasting methods, whether they are based on traditional statistics (e.g., exponential smoothing, ARIMA models), classification methods (e.g., k-nearest neighbors, decision trees), or neural networks [ ]. For instance, extreme gradient boosting regressor have been described as suitable to handle non-linearity in load profiles [ ]. Among those options, we choose to use the prophet algorithm [ ] which mixes piece-wise linear functions and Fourier series. As such, it works well on time series that have piece-wise trends and daily, weekly, or yearly seasonality. The Prophet method does not require data to be stationary, and offers several advantages which decided our choice: Part II Methodology the simple and insightful formulation decoupling trends and seasonal components Eq. . , the possibility of adding exogenous weather variables and autoregressors, the ability to provide confidence intervals on the forecast.

Later, we refer to Eq. . as a Generalized Additive Model (GAM).

unctrl ( ) = growth( ) + season( ) + ℎ( ) + ( ) + ( . )

Here growth( ) is the trend function that models non-periodic changes in the time series through a piece-wise linear function, season( ) represents periodic changes through a Fourier series, and ℎ( ) represents the effects of holidays that occur on potentially irregular schedules, is the error term. Further details are available in [ ]. Besides capturing the overall trend and periodicity, additional regressors can be added to Eq. . through ( ).

. . . Illustrative example

This section is meant to illustrate the different ways of creating a GAM, e.g., with regressors and autoregressive variables, as well as, the difficulties to forecast small scale load profiles. The following example is based on a real-world household equipped with a "linky" smart meter. The data is recorded from March the nd to May the th at minutes intervals and includes the power imported and the power exported for a single household equipped with solar panels but no flexible assets. Note that the data is the propriety of LANCEY Energy Storage, and thus not for public use. Along with data from the smart meter, weather series such as apparent temperature, humidity, wind speed, and Global Horizontal Irradiance (GHI) are available from a weather service at the location of the building.

Netload

GHI

As the consumption and the production time-series are not measured separately, i.e., we do not have data from the solar panel directly, we can only forecast the netload. We denote this netload unctrl ( ), for actual uncontrolled netload. As shown in Fig. . the netload profile is noisy at least in comparison with the global horizontal irradiance data. To train the different GAM models, we select thirty-one days from March the nd to April the th , and we then illustrate the models' predictions on the next two days. In order to get the score achieved by each model, we use the normalized root mean square error also referred to as the Goodness of Fit (GOF) Eq. . . Although the mean absolute percentage error is often simpler to understand, it is not applicable here, as the time series cross zero, and thus potentially lead to a division by zero.

Goodness of fit

= 1 - unctrl ( ) -unctrl ( ) 2 unctrl ( ) -1 =1 unctrl ( ) 2 ( . )
We illustrate three different models Fig. While model does not need to be updated within the two days to forecast, i.e., re-training the model does not drastically influence the results, models and benefit from periodically updating regressors and autoregressive variables. Note that in our case model uses historical GHI data which does not need to be updated, however, in an operational scenario GHI data might gain in accuracy and thus trigger a new netload forecast. Model must be updated every minutes in order for the lagged value at -1 to always represent the previous observation. However, to

How to coordinate local consumption with production Part II Methodology

: https://otexts.com/fpp2/useful -predictors.html last consulted in June . : Note that, in the next sections, the calibration of models is done the two days prior to the prediction.

reduce the number of forecasts, model is only updated every hours and relies on the results of prior forecasts for lagged values.

The results in Fig. . show predictions for the three models. The best goodness of fit is reached by model with . %, yet the prediction is far from perfect. Model and model provide smooth results as the Fourier series and the GHI data cannot capture sudden changes. However, GHI data provide a significant improvement to model in comparison to model which can only capture the average daily seasonality. Updating model every minutes increases the goodness of fit to . %.

As an addition to model , we add a regressor to represent each hour of the day, i.e., regressors. We build such regressor variable with zeros outside of the designated hour, and one on the designated hour. For instance, the regressor for hour two consists of zeros except between : am and : am included. Notice that only dummy variables are needed to code categories. That is because the th category (in this case midnight) is captured by the intercept, and is specified when the dummy variables are all set to zero. This addition enables model to reach slightly higher goodness of fit of . %.

In order to explore the meta-parameters of model , we run a random search to find the best combination of parameters for the day to predict. We explore different numbers of lagged values from to , and different levels of relative importance for regressors (GHI, seasonal components, hour of the day, and lagged variables). We find that the default parameters where all regressors have the same relative importance, and four lagged values are added is the best option from a limited random search. Fig. .  shows the % incertitude interval associated with model as given by the Prophet algorithm. The incertitude interval suggests that the model is not able to capture the sudden minutes consumption peaks. Although far from perfect, model provides a base that can be modified depending on the time series to predict. We use model in the next section where each instance of the model is calibrated to represent a specific community member.

: As per other simulations in this thesis, data and code are available as Python notebooks at https://github.com/Jon athan56/supplementary _ thesis/tree /master/4 _ chapter Before closing this section, we should acknowledge that the quality of a forecast (measured in goodness of fit) is not necessarily driving the value of a forecast, (measured in euros saved for the community). Although counter-intuitive, a forecast with greater goodness of fit can lead to a lesser value in the end. For instance, a forecast with a better prediction of large negative netload values may not change the value for the community if batteries are caped in their charging power. In general, a forecast should be accurate or show quality when flexible assets represent a significant portion of the netload. For instance, when the netload is close to zero at : am or in the afternoon at : pm. However, quality is not critical in the middle of the afternoon when all batteries are full, or at : am when batteries are already empty.

. . Results

In this section, we combine forecasting and scheduling (also referred to as a "dispatch") to assess how much erroneous forecasts affect the benefits of the predictive strategy.

For this example, we use the data already illustrated in chapter section

. from the open-source database described in [ ]. We assume that we only have access to smart meter data and no raw production time series. Similarly to the previous section, we cannot separate consumption and production profiles, and we directly forecast netloads. In order, to keep this example repeatable via Python notebooks and to avoid long simulation time, we run forecasts and optimal dispatch for a single week and five households. This section illustrates implementation details, and the relation between frequency of dispatch, i.e, minutes or days, and relative gains for the community. Although yearly results include a greater diversity of netloads, we show that a week already includes interesting dynamics with regards to the periodicity and timing of dispatch. We select a week to predict from May the th to June the th that contains a day without solar production. To mimic access to weather data, and because GHI data is often available, we include the historical GHI time series for the week studied. As such, the GHI data included as a regressor does not contain errors and constitutes a best-case scenario. Prior to the week of interest, we include days to calibrate and train a GAM for each household. As a first step, we calibrate an instance of model from the previous section for each household. The calibration process is simple and consists

How to coordinate local consumption with production Part II Methodology

for each household of running a set of forecasts on the two days prior to the prediction for different preset configurations. The best configuration of parameters, i.e., number of lagged variables and relative importance of regressors, is selected for the highest goodness of fit (Eq.

. ). Once models for each household are calibrated, we forecast the week of interest. To illustrate the impact of frequent forecasts we predict the netload of each household at different periodicity: days, day, hours, hours, hours, hour, and minutes. Note that the forecasting horizon remains days for all periodicity, as it corresponds to the horizon of the optimization problem. As such forecasting with a periodicity of minutes for a week involves 7 days×24 hours×4 intervals = 672 forecasts with an horizon of days, i.e., 2 days × 24 hours × 4 intervals = 192 time steps. This requires a substantial amount of time, which justifies limiting simulation to a week to facilitate repeatability. Fig. . shows the resulting netload at household # when forecasts are run every days. With this periodicity, auto-regressive variables have little impact on resulting netloads.

Netload [kW]

Actual netload Predicted netload Fig. . shows the goodness of fit taken over the predicted week for each of the five households as a function of the forecast periodicity. As expected when forecasts are run more often goodness of fit improves. However, until a periodicity of three hours goodness of fit is only slightly improved as auto-regressive variables have little influence. At a periodicity of minutes, the auto-regressive variable at -1 always has information on the last observed netload value which results in better forecast quality. At this stage, we should note that forecasting and scheduling problems

. A model predictive control can be decoupled. However, this might not always be the case. In a situation where we only have access to smart meter data, then forecasting and scheduling are coupled, as the impact of scheduling flexible assets is measured by the smart meter which influences future forecasts. To avoid this situation, we consider that the power profile of flexible assets is known, either because they follow perfectly their schedules, or because they communicate with a community manager. As such, we can subtract the influence of flexible assets in the netload, so that the forecasting process only observes uncontrollable demand and production also referred as unctrl ( ). In the present simulation setting, it enables us to first get all the predicted netloads and then run optimal schedulings as a second step. This is relevant to notice, as this requirement might be harder to achieve in practice.

The optimal scheduling controls kWh battery installed at each of the five households. Optimal scheduling is run at the same periodicity as forecasts, i.e., each forecast corresponds to an optimal schedule that covers the horizon of days. For the one hour periodicity, this leads to running an optimization every hour for a week to schedule five batteries over the next two days. This is further detailed in Alg. , where represent the training horizon (a month), the simulation horizon (a week), dispatch ℎ the horizon of optimal schedules ( days), nb the number of autoregressor in the GAM, and periodicity a number of minutes between dispatch. Further, weather ( ) is a matrix containing the weather data, and schedule ( ) a matrix containing the power profiles for all flexible assets of any type.

How to coordinate local consumption with production Part II Methodology

An important point of attention is the starting and ending times of the scheduling process. We found that a schedule starting at midnight and ending at : pm two days later leads to a sub-optimal dispatch. When the schedule starts at midnight the battery tends to be inactive until it can charge from solar power at : am, further, on the next day, the battery may not charge completely as the energy consumption before : pm at the end of the horizon does not require the full battery capacity. On the contrary, when scheduling starts around : am, there is no period of inactivity. As rule of thumb, consumption and production cycles should not be cut at the start or end of the scheduling process to limit sub-optimal schedules from a finite horizon. As such, we start forecasts and optimal schedules at : am on the first day of the simulated week. . shows the cumulative energy imports from the community resulting from dispatch in four different scenarios. On the one hand, two scenarios to mark limits, a perfect scenario where the schedule is based on a perfect knowledge of the netload, and a scenario without batteries that provides an upper limit on community imports. On the other hand, two scenarios represent different periodicity of dispatch, a long periodicity of days and a short periodicity of minutes. The result shows that both the two days and minutes periodicity achieve a similar value, respectively % and % of the value gap between the lower and upper limits on energy import from the community. This result is similar when considering energy costs at the end of the week which also includes the prices of exchanging power, then the two days dispatch . A model predictive control achieves % of the value gap between a scenario without batteries and the perfect schedule, whereas the minutes dispatch achieves %.

May 31 2019

Jun In this section, we show that a faster periodicity in the dispatch, i.e., forecast and optimal scheduling, does not necessarily translate into more value for the community. In particular, in our scenario, a better quality of forecast does not translate to a lower cost for the community. In the end, a dispatch every two days demands less computing time, and capture % of the value gap between a scenario without batteries and a scenario with perfect knowledge of the netload. Although, a faster periodicity of forecast was not significant in this scenario, a faster periodicity of scheduling migth be required if battery models deviate from their physical counter part, i.e., to cope with the uncertainties on flexible assets. The next sections explore methods other than through a faster periodicity to cope with uncertainties in the forecast.

. . . Mitigating the impact of forecasting errors

Minimizing the cost of energy for the community accepts different solutions that leads to the same minimum cost. This optimal front is particularly large when flexible assets are small compared to the netload, e.g., when a battery can be fully charged in one hour, yet has six hours to do so. As such, for the same outcome, we should choose a schedule for flexible assets that is the least subject to perturbations, i.e., the safest path.

In order to obtain information on which path is the safest, deterministic GAM forecasts can be extended with probabilistic distributions through a Markov Chain Monte Carlo sampling method implemented in Prophet, as shown in Fig. . . Although it takes longer to solve, it can provide a distribution of values at each time . To use this information at the decision-making stage, a variety of approaches exist in the literature [ ]. In particular, stochastic programming is close to our linear programming formulation. However, we did not pursue this option as the number of scenarios to consider grows significantly with the size of the community, since members may have Ω scenarios with time step values. We note How to coordinate local consumption with production Part II Methodology that further work could involve applying methods such Sample-Average Approximation to reduce the number of scenarios [ ].

To pick the path that is least impacted by forecasting errors, we make the assumption that charging and discharging activities should rather happen when the absolute netload is larger. For instance, a forecasting error of kW on a -kW netload has no consequences for a battery that is caped at a charging power of . kW. As such, we propose to add a penalty for charging or discharging when the netload is close to zero, i.e., a penatly proportional to 1/unctrl 2 . The new objective function without the component in for shapeable load at a price becomes:

Minimization =1 × max(0, ( ))
+ ℎ × ( max(0, ( )) -max(0, ( ))) + × 1 unctrl ( ) × ( ) + ( ) 2 ( . )
Where unctrl ( ) represents the forecasted uncontrolled netload at the point of connection with battery .

The direct effect of this penalty is to enforce a path that mirrors the netload as shown in Fig. . . The optimal scheduling places as much charging as possible when the netload is very negative, and discharging when the netload is very positive. This additional term turns the optimization to a quadratic problem that is not handled by GLPK, as such we use Gurobi to solve this problem. The line with no penalty, i.e., = 0, corresponds to the two days dispatch scenario from the previous example in Fig. . . Note that, we ensure that a penalty coefficient of = 1e-is small enough to provide the same minimum costs as a scenario without a penalization coefficient, while ensuring a "safer" schedule for forecasting errors. A = 1e-is an upper limit where the penalization factor starts to induce a deviation from the minimum cost otherwise achieved without penalization. Without certainties for the whole year, this approach reduces the amount of energy imports at the end of the simulated week as shown in : Cumulative community imports for the community of five households. Four scenario are illustrated, a periodicity of two days with penalties of = 0 and = 1e-, as well as, a scenario without batteries and a scenario based on a perfect forecast. Python notebook available at https://github.com/Jonathan5 6/supplementary _ thesis/tree/maste r/4 _ chapter.

. . . Influence of battery capacities and community size

The capacity of flexible assets, i.e., the decision space of the predictive strategy, is critical to the impact that forecasting errors may have. As a general rule, smaller flexible assets will be less impacted by inaccurate forecasts as they are either already at full or empty, or their power range could not match the forecasted netload.

The impact of the decision space on the cost of energy is shown in Fig.

. for a range of battery size per community member of to kWh and to kW of charging and discharging power capacity respectively. The results correspond to a scenario where a dispatch is calculated every two days with a penalty coefficient of = 1e-(orange line). For comparison, we show the result of the perfect dispatch derived from the actual netload.

How to coordinate local consumption with production Part II Methodology

Similarly to battery size, we run a sensitivity analysis for community size in numbers of members. For this simulation, we randomly draw households from a pool of households, where is the community size. For each household a forecast with a periodicity of two days is used to optimally schedule a kWh battery with a penalty coefficient of = 1e-for the week illustrated in Fig. . . participants, the community size is not a factor impacting the cost of energy per member, i.e., reducing the impact of forecasting errors. One of the reasons for this observation is that forecasting is done on the basis of individual netloads, and do not benefit from learning the patterns of the aggregated community. For small communities the cost of energy per member has a significant variability from the random draw of households, i.e., some households consume more than others. This variability is reduced with larger community size, however, larger communities do not show a trend to reduce the cost of energy per member.

. . Limits

Beyond the relative results at different periodicity, battery, and community sizes, the previous section is interesting because it highlights the limits and assumptions that the model predictive control brings. We list the points of attention that can be problematic.

Forecasting consumption and production profile independently. Recovering raw production time series, e.g., from solar panel inverters, is often possible but requires adapting to a variety of manufacturers' API. As such, while it is easier to forecast consumption and production independently, it brings an additional communication brick that might require some customization from community to community.

Decoupling predictive and control problems requires to remove the influence of flexible assets in metering data. Either the power profile of assets is communicated to the community manager, or the community manager makes the assumption that flexible assets perfectly follow their schedule.

. A model predictive control Accurate modeling of flexible assets. Physical batteries are likely to deviate from their digital twin in the MPC, for a number of reasons including: non-linearity in the battery management system, the influence of temperature, non-linear efficiency, or capacity reduction through aging. The MPC is capable of handling such discrepancies with frequent update of flexible asset states. However, this would require flexible assets to regularly post onto the order book. The management of expected state versus actual state, e.g., state of charge, can be challenging as the discretion to post onto the order book is left to flexible assets.

Frequently rescheduling flexible assets must not completely change the schedules for all flexible assets throughout the community. As such the MPC stability to minor changes must be studied. The risk of often re-shuffling control orders is to have flexible assets on different versions of a schedule.

Tuning and training forecasting models is also an integral part of the MPC process that should not be overlooked, e.g., when should the model be re-trained. We note that, tuning meta-parameters with metrics of forecast quality might be misaligned when forecast quality and value for the community are not necessary correlated.

Long simulation times. Fast algorithms such as Alg. enable to explore the influence of local energy community designs, e.g., the spread of flexible assets, the capacity of flexible assets, the capacity of production units, the types of consumer profile, etc. . However, training models and forecasting netload for individual households is more cumbersome, especially with the auto-regressive approach that requires step by step forecasts for each time of horizon , and re-dispatch at a higher frequency than every two days. Selecting representative weeks with a clustering approach is an option discussed in section . , but it must be adapted to leave data prior to a representative week to train models.

. . Perspectives and mutations

As mentioned in section . , it is important to provide the means for a coordination strategy to mutate, i.e., experiment changes and keep positive ones. This section describes four changes that either answer some of the limits mentioned above, or add aspects that have not yet been considered.

Relaxing complexity

Not considering network fees. Network fees for power exchange brings several limits related to forecasting individual netloads, for instance, longer simulation time, larger uncertainties in forecasts, combinatorial aspects in stochastic programming. As such, ignoring network costs would simplify the MPC approach. In some situation this might even be possible without lost of optimality. In particular, when only one or two large storage systems support the community, and thus are required to transit most of their capacity through the distribution grid anyway. This switch to only considering the community netload can be tested without in a predictable way without forbidding any options or significantly changing their economic incentives" [ ]. For instance, nudging could take the form of a traffic light, green when some surplus is available and red otherwise. To influence the uncontrollable demand, we propose to add an additional layer which send nudges, e.g., a text message that some solar production will be available in two hours, to community members from the expected community netload. This potentially enables members to plan to increase their consumption, e.g., manually increase room cooling, heat cooking water, or use household appliances. One of the difficulties of this approach is that the influence of nudging on the netload is hard to isolate. As such, it complexifies the role of forecasting models that might require additional regressors encoding when nudges were sent.

Highlights:

In a simulation environment, the MPC approach can recover up to % of the value available over the week simulated.

The MPC can follow an evolutionary approach to include or remove certain aspects of complexity depending on their added value, e.g., include nudges, or remove network fees .

. A reactive approach

As opposed to the predictive approach which anticipates future states, the reactive approach consists of acting based on past observations. Fig.

. illustrates the idea of a reactive strategy. This approach requires to relax some of the complexity expected for a coordination strategy, as discussed in section . . In particular, this approach as presented in this section only applies to one type of flexible assets: batteries. As scheduling shapeable loads and deferrable loads usually requires some knowledge of future events. For instance, scheduling electric vehicles often requires the anticipation of driving cycles. Secondly, this approach requires a tight coupling between batteries and the community manager as frequent updates are the basis of this control strategy. Third, costs from network fees cannot be minimized over an horizon but simply at each time , as such the resulting schedule is sub-optimal at minimizing the cost of power exchanges in comparison to the predictive approach. Nonetheless, the reactive approach answers the limits expressed in the predictive strategy, section . . . In particular, it avoids limits related to

How to coordinate local consumption with production Part II Methodology forecasting netloads, and accurately modeling the future states of flexible assets, while minimizing at energy imports and exchanges within the community.

. . Methodology

Alg. describes each step of the reactive strategy. This algorithm is based on dividing self-consumption intervals which last minutes into subintervals of minutes, i.e., Δ = 1/20. On the first sub-interval, batteries are sent idling orders to wait for observations. The next sub-interval and until the last sub-interval, batteries react to netload observations at -1. For the last sub-interval, i.e., minutes before the end of a minutes interval, batteries react to the previous netload, but also to the expected netload during the sub-interval. Fig. . illustrates Alg. , where the first sub-interval is an observation round, and the last sub-interval includes the observed netload at -1 and the expected netload at . Note that some uncertainties arise at the last sub-interval as the netload must be anticipated for batteries to react before then end of the self-consumption interval.

Each battery reacts to the previous netload observation in two steps, firstly at the individual level, and secondly at the community level. At the individual level the Alg. is used, and as such battery orders for member is ( ) = -unctrl ( -1) while being subject to power and energy constraints.

The community level starts on line , the first step is to get the expected community ( -1) with battery orders ( ). If the community netload is negative, i.e., there remains more local production to absorb, then batteries for each member are ordered from the most empty to the fullest (line to ). In the opposite situation, for a positive community netload, batteries are ordered from the fullest to the most empty. This merit order provides the prioritization for which batteries answer community-scale needs first. The first battery on the list attempts to change power set point such that ( ) = ( ) -( -1) while respecting power and energy constraints (line to ). Then the expected community netload is updated and the following battery on the merit order attempts to provides support to the community. Note that Alg. does not consider sub-intervals to adjust battery schedules ( ) , as such it considers that unctrl ( ) can be observed and reacted to instantaneously, as if Δ tends to zero. This is relatively realistic as Alg. only depends on local data and does not communicate with a community manager, e.g., as in the droop controllers of section . . . However, in Alg. discrete intervals must be considered to leave time for communication with a community manager.

. . Results

To illustrate the reactive approach and compare it to the predictive strategy described in the previous section, we select the the same data as in section . . from May the th to June the th for five households. As in the previous section households are equipped with kWp solar panels and a kWh battery. Fig. . shows the cumulative energy imports of the reactive approach along with three other scenarios. The scenario with only solar panels and no batteries, a scenario derived from a perfect forecast, and the result of the predictive approach from Fig. . . The results show that the reactive approach perfectly matches an optimal schedule in terms of energy imports at the end of the week, however, the overall cost is slightly increased as a result of more power exchanges between participants. Nonetheless, the cost at the end of the week of the reactive strategy . e is still below the cost from the predictive strategy at . e . Note that energy imports in the reactive case momentarily go below those of the perfect schedule, especially on June the th . This behavior is expected as the reactive strategy uses flexible assets as soon as possible, in comparison to the predictive schedule that can postpone charging or discharging on the time horizon . . is that netload data is constant over minute intervals and thus each sub-interval of minutes observes the same netload value. This illustrates a best case scenario for Alg. as the netload on the last sub-interval is always the netload at -1 as expected.

. A reactive approach To test the sensitivity of Alg. to varying netload values every minutes, we add to the netload profile a random uniform noise centred on zero with a variance of 2 = 0.3. Further, to maintain the same cumulative energy demand, we ensure that the added noise is zero mean every two hours. To draw representative distributions of possible costs, we simulate the same week a thousand times with random uniform noise added.

The result of Fig. . suggests that the reactive strategy is significantly affected by a more noisy netload, as this moves the costs at the end of the week to under e in only % of the scenario and under . e in % of the scenarios.

Yearly results

Since Alg. is fast to solve, as well as, the linear optimization problem Eq. . we can apply both the reactive and the perfect predictive strategy to a complete year. In practice, we limit the problem size for the linear optimization to week long horizons. We solve each week separately using historical data to obtain the perfect schedule. This is possible without lost of optimality as the battery capacity per household is limited to kWh, which is not enough to have significant intra-week effects. To run a complete year comparison we pick the same twenty household community as the example in section . . Each household is equipped with a kWp solar panel.

The results from Fig. . suggest that the reactive strategy can achieve the same energy import over a complete year as the predictive strategy with a perfect knowledge of the futur. However, the reactive approach leads to a slightly higher energy cost of e per member and per year due to more power exchanges between community members. Note that this is a best case scenario for the reactive approach as on the last sub-interval the netload is always known, i.e., equal to the netload from the previous minutes.

How to coordinate local consumption with production Part II Methodology

. . Perspectives

Several aspects of the reactive approach could be improved to reduce erroneous decisions that might happen when predicting netloads on the last sub-interval, as well as, to include a broader category of flexible assets.

Include predictive models such as decision trees or neural networks to estimate the netload expected on the last minutes of a selfconsumption interval. In Alg. the expected netload is simply the netload at -1.

Faster updates, thus shortening sub-intervals to limit the impact of the last interval. If sub-intervals are reduced to minute, then only 1/15 of the time has some unexpected netload value.

Act on the first sub-interval to avoid switching on and off batteries, and thus obtain a more homogenous schedule with less variability.

Include shapeable loads such as electric vehicles as flexible assets that can only charge and have a higher priority than battery assets. Further, some conditions are required to enable Alg. to charge electric vehicles from the upstream grid when they are close to their departure time.

Mix predicitve and reactive strategies Mix the predictive approach with some safety built in a reactive fashion. In particular, we propose in appendix A an approach to train a model to learn the best course of action when seeing a perturbation. Other reactive adjustments are possible, in particular, adjustments that only ensure that the predictive strategy remains within acceptable limits. In other words, that the predictive strategy never leads any battery to charge or discharge from the upstream grid.

.

Partial conclusion

Highlights:

In a simulation environment, over a full year, the reactive approach can recover % of the value that a perfect dispatch would achieve.

The reactive approach requires a close integration with the energy management systems of flexible assets which might be challenging when it involves different providers of assets.

. Partial conclusion

To provide a solution for local energy communities to coordinate their consumption within a short interval of the local production, we present two solutions. Both solutions, a predictive and a reactive approach rely on a trusted community manager.

The predictive approach has the potential to schedule flexible assets such that the community achieves a minimum cost of energy. However, in practice, forecasting errors when predicting future netloads lead to sub-optimal schedules. In fact, for the week simulated, due to erroneous forecasts, the predictive strategy captures only % of the available value.

The reactive approach is in some ways the "least bad" option. As it cannot capture the minimum value given by the predictive approach under a perfect forecast, since the reactive approach does not consider decision making over a time horizon , but simply at time . However, it is not subject to forecasting errors, as such for the week simulated it captures % of the available value.

The reactive approach, as opposed to the predictive approach, relies on a fast communication with battery management systems, which is potentially challenging. Further, the predictive approach offers a simpler modeling for flexible assets that depend on future events, e.g., electric vehicles that need to be charged before a departure time. When both the predictive and reactive approaches are suitable for a local energy community, a simulation can decide which approach is likely to recover the most value, i.e., how much erroneous forecasts influence the predictive approach.

We can ask ourselves if other strategies, outside of the centralized optimization category of Fig.

. would avoid some of the limits encountered with the predictive strategy. With regards to erroneous forecasts, most strategies are also subject to this issue. In particular, for distributed strategies and market based approaches, instead of being an issue for a central community manager, forecasting errors become an issue for individual members.

Since we make the assumption of a trusted community manager, strategies based on distributed legders do not solve a particular need of the community, while adding issues related to a consensus mechanisms, e.g., proof of stake. Market-based approaches have the advantage of simplifying the role of a central community manager as decisions are

How to coordinate local consumption with production Part II Methodology partially taken by community members themselves. However, it implies that individual members may have to solve a complex decision problem. In particular, individual members have less knowledge on flexible assets in the community than a community manager while not necessarily benefiting from more knowledge on their own flexible assets. Additionally, community members that produce power may not provide a relevant price signal if they decide to sell their production at the constant maximum price of electricity, i.e., the price otherwise available from traditional suppliers. As such, we believe that among the large panel of strategies, the proposed predictive and reactive strategies offer good solutions for the local energy communities envisioned.

: The carbon's perspective highlights the paradox of manufacturing solar panels in China with an average grid emission of gCO -eq/kWh to offset grid emissions in France around gCO -eq/kWh.

Solar panels: is more always better?

. This last chapter takes a radically different perspective on local energy communities, we move away from financial aspects to look at carbon impacts, and from operating communities to sizing communities, i.e., energy systems. This chapter has two main motivations; to assess if local energy communities preserve their "raison d'être" despite the embodied carbon emissions in solar panels and batteries, and to show that self-sufficiency can be included in sizing problems.

We start with a simple back-of-the-envelop calculation to answer if "more solar panels are always better". Then, we show that if the national grid is not considered as an ideal infinite storage option, the answer is not trivial. As such we propose an optimization method for local energy communities to find the optimal sizing of solar panels plus batteries that minimizes Greenhouse Gas (GHG) emissions. We apply our methodology to both a French and a German community to draw results from grids with significantly different hourly carbon emissions. Finally, we use the natural self-sufficiency index developed in section . to explore the sensitivity of our results with regard to load profiles.

. Are more solar panels always better?

At first sight, yes, more solar panels always reduce GHG emissions. At least, this is the answer from a simple back-of-the-envelope calculation.

Manufacturing and retiring solar panels have an average GHG cost of kgCO -eq/kWp [ ]. While producing electricity from a kWp solar panel avoids on average kgCO -eq per year in Germany and kgCO eq per year in France [ ], [ ]. It follows that after years in Germany or years in France, a solar panel has virtually reimbursed its carbon impact. If we assume that the lifetime of a solar panel is longer than years, we can conclude that more solar panels always reduce GHG emissions.

However, this brief calculation makes the hypothesis that the electrical grid acts as infinite and ideal storage. In other words, it is always possible to import or export from or to the grid.

Let's consider the hypothesis where power injection into the upstream grid is possible but no longer desired. In such a scenario, more solar panels are not always better in terms of GHG emissions. In particular, it depends on the proportion of solar energy that can be absorbed locally. With that hypothesis, only the energy production that overlaps with local Solar panels is more always better consumption is accounted for to reimburse the initial carbon cost of solar panels. Why would we consider this more conservative hypothesis? We propose two reasons, first from a technical point of view, and second from a more social or energy sufficiency-oriented perspective. In reality, the electrical grid is far from an infinite storage, and exporting solar power also has a carbon cost. For instance, solar power does not replace the stability brought by large rotating machines (i.e., spinning reserve for frequency regulation), nor does it change the number of thermal power plants required to meet the electricity demand at night in winter. In some cases, it actually calls for more thermal power plants to increase "ramp up" capacities when evening consumptions increase as the sun sets (Calero ). Exporting more solar power may also imply additional grid reinforcements and emissions from unintentional start-up and shutdown sequences of conventional thermal units.

The second reason to consider the hypothesis of constrained grid exports is of a social nature. We believe that there is a trade-off to consider between the different scales of the grid, in particular between the national scale and the scale of local energy communities. A trade-off between efficiency gains from large-scale infrastructures, versus what the proximity to a limited production can bring in terms of energy sufficiency (Illich ). To be clear, we do not advocate for grid-independent energy communities. In this chapter, we consider grid-dependent communities that chose to situate their actions for the energy transition at a local scale, rather than at a national scale. Then the question becomes: From a GHG emission's perspective, what is the right number of solar panels and size of batteries, when exporting power is not a desired option?

To answer this question, we formulate an optimization problem. In addition, for the optimization to be more insightful than just providing a minimum scenario, i.e., GHG emissions are minimized for solar panels and batteries which coincide with achieving % of self-sufficiency, we add the constraint to achieve a given self-sufficiency level. Thus, we get a better overview of how emissions vary on the complete range of possible self-sufficiency, from %, i.e., forcing that no solar panels are installed, to % which demands solar panels but also significant storage capabilities. This approach is illustrated in Fig. . where the expected shape of results is intuited. At first, when self-sufficiency increases GHG emissions are reduced, since all local solar production is absorbed by consumption, similarly to when the grid is equivalent to an infinite storage, i.e., the back-of-the-envelop calculation. However, at some point reaching higher self-sufficiency will inverse the trend, and increase GHG emissions. As reaching higher self-sufficiency requires either oversize solar panels, i.e., not benefiting from all the solar production as some is exported to the larger grid, or investing in storage capabilities which tend to increase carbon costs per kWh. As such, we expect our results to form a bell curve as shown in Fig. . , where the starting point at % self-sufficiency corresponds to the average emission of the upstream grid.

GHG emission [gCO

. Methodology

In this section, we provide the mathematical formulation for the optimization problem that sizes solar panels plus batteries to reach a given self-sufficiency with a minimum amount of carbon emissions. The emissions estimations account for the solar and battery manufacturing, i.e., "capital" emissions, as well as the emissions incurred by energy imports from the grid, i.e., "operational" emissions. As such, minimizing GHG emissions involves both long-term decisions, e.g., investment decisions with aging equipment, and short-term operational aspects, e.g., hourly data to assess how much grid emissions are offset. This multi-temporal scale is problematic, as the size of the optimization problem becomes significant, and bridging between short and long-term time scales is challenging.

The But also account for shorter terms dynamics in the same "all-in-one" optimization:

energy balance at the community level every minutes, sub-hourly greenhouse gas emissions from the grid, battery constraints and scheduling.

In the following mathematical formulation, solar panel size PV as well as initial and replacement battery capacities Battery ( ) are the critical decision variables. Those decision variables are used to minimize capital and operational grid emissions, i.e., CAPEX and OPEX, while reaching a specific self-sufficiency.

Min. CAPEX + =1 OPEX( ) ( . )

CAPEX and OPEX, are defined in units of kgCO -eq. CAPEX represents emissions from manufacturing and retiring solar panels and batteries. OPEX of year represents emissions from the consumption of electricity on the grid. Within a year , we consider a set of periods with intervals, so time is defined by a year, a period, and an interval = ( , , ). represents the set of years when the battery capacity can be renewed, i.e., years , , and .

CAPEX = PV × PV + Battery × (Battery ( ) × Battery ( ) Battery ) ( . ) OPEX( ) = grid + ( , , ) × grid ( , , ) ( . )
The Global Warming Potential (GWP) of both solar panels and batteries is represented, Battery is defined in kgCO -eq/kWh, and PV in kgCO -eq/kWp. Battery emissions are calculated taking into account the number of years a battery is in service in relation to its lifetime, this discounts remaining years of service after the optimization horizon. For solar panels the lifetime is assumed to be years, the optimization horizon. The OPEX of different periods is weighted by a coefficient which is given by the clustering algorithm when reducing the number of As mentioned in the methodology section, a phase of data reduction is necessary to reduce the complexity of the optimization. As such, we use the K-Means clustering methodology explained in section . . However, in this chapter, the clustering is not only performed on the load profile, and solar production, but also on the CO emission profile. To verify that the weeks selected by the K-Means clustering are representative of the whole year, we calculate carbon OPEX and self-sufficiency metrics. Both in the French case and the German case, we have validated that five weeks are sufficient to represent a whole year. that the optimization accounts for operational constraints. In themselves, those figures are not the final results that we are interested in, they are merely one week over five in the first year of a twenty years life cycle, however, they highlight some of the dynamics at play. In both scenarios the target self-sufficiency to reach is %, however, the German scenario requires more batteries as shown by the upper limit on the battery state of charge. This is mostly due to a lesser solar production overall in Berlin compared to Grenoble.

For the German case, the grid emissions vary significantly between day and night as opposed to the French case where they remain around gCO -eq/kWh. Those high variations in the German case open the door for "arbitrage" activities which we choose to limit to remain within the community's perimeter. As mentioned in the methodology arbitrage activities are limited below the solar panel production Eq. . . We note that Fig. . shows some arbitrage activity on September the th , since the community imports electricity and yet the battery is charging, . What is the right number of solar panels however, the battery is charging at a slow rate to remain below the solar production. In both countries, at low self-sufficiency targets, i.e., % self-sufficiency, the GHG emissions incurred by manufacturing solar panels are compensated by reducing day-to-day emissions from the main grid. However, greater self-sufficiency targets require the installation of larger solar panel and battery systems, which incurs significant emissions. Especially, as batteries need to cope with successive days of moderate solar production, and supply power peaks. In those cases, the operational carbon savings do not compensate for the manufacturing emissions, and the global system GHG emissions can reach values well above those of national grids.

Looking at GHG emissions per kWh in France and Germany tells a different story. Since GHG emissions for electricity are much lower in France, it is harder to reimburse the initial cost of solar panels and batteries. As such, shedding kgCO -eq/MWh from the initial kgCOeq/MWh grid only emission is the best case scenario which is realized for % self-sufficiency. In Germany, the best-case scenario is to shed kgCO -eq/MWh at % self-sufficiency from the initial kgCOeq/MWh grid only emission. Although both scenarios must achieve exactly the same self-sufficiency, the German case demands greater solar panel and battery capacities due to a lesser irradiance. In the French case, the minimum carbon emissions are reached for a kWp solar panel and no battery, whereas, in the German case the minimum carbon emissions are . What is the impact of load profiles reached for a . kWp solar panel and a battery capacity of . kWh.

Dividing the global warming impact of solar panels by two, i.e., kgCOeq/kWp instead of kgCO -eq/kWp, does not drastically change the results in France. In this scenario, the minimum carbon emissions are achieved around % self-sufficiency with a resulting kgCOeq/MWh instead of kgCO -eq/MWh when the solar panel GWP is kgCO -eq/kWp. This small difference in the end, is due to two reasons. Firstly, solar panel capital emissions at % self-sufficiency are small, i.e., only related to a . kWp solar panel, in comparison to the operational emissions from grid imports. Secondly, to go beyond % self-sufficiency, although solar panel capacities are increased, batteries are still required, however, with a GWP at kgCO -eq/kWh for an -years lifetime, batteries end up being more costly than importing power from the grid.

Highlights:

For the local energy community of residential buildings studied in France, a solar panel capacity beyond kWp per household increases GHG emission, if we consider that exporting power is not desired.

Reducing in half the global warming potential of solar panels to kgCO -eq/kWp has a limited impact of kgCO -eq/MWh in France.

. What is the impact of load profiles?

The previous example is relative to a twenty household community from which we have load profile data. However, minimizing GHG emissions by installing solar panels and storage systems is highly dependent on load profiles. As some load profiles are more inclined to absorb solar production, i.e., self-consume. For instance, an office building with greater consumption during daytime is naturally better equipped to consume solar generation, than a residential building with an pm peak demand.

Unfortunately, real-world consumption profiles are scarce resources, especially when looking for a variety of consumer types. The existence of open-source databases is one solution to study the effect of various load profiles on the optimal sizing of solar panels and storage capacities [ ]. Another option is to use bottom-up approaches which consider the number, use patterns, and technical characteristics of individual appliances to reflect load profiles [ ]. However, those solutions only provide discrete answers, without offering a continuous analysis for degrees of "alignment" between load profiles and solar production. To provide this continuous analysis, we use the concept of Natural Self-Sufficiency (NSS) developed in section . , as well as the methodology to modify load profiles to match a given NSS.

There are several reasons to create new load profiles with modified NSS. One reason is to provide lower and upper bounds with regard to variations in load profiles when optimally sizing solar panels for a Solar panels is more always better community. This approach is potentially faster than running large Monte-Carlo simulations. Another reason, which we explore in Fig. . , is to summarize the impact of any load profile, i.e., with different load patterns, and energy demands, on the optimal sizing of solar panels through a single NSS index. If NSS can represent the diversity of load profiles, then this methodology is useful to exhaustively explore the impact of any load profiles on GHG emissions, as load profiles are necessarily within to % NSS. In a way, we estimate the minimum GHG emission for any local energy community, i.e., for any NSS, at a given location.

Intuitively, a community expecting to be fully self-sufficient with a NSS index close to zero will need large storage capacities leading to a high GHG impact due to carbon installation costs. On the contrary, achieving % self-sufficiency for a community with an already high natural selfsufficiency of % might avoid any storage, or oversized solar panels, and thus lead to a low GHG impact.

. . Reference chart for France and Germany

In this section, we provide numerical results which explore the impact of load profiles on GHG emissions associated with solar panel production. The data for this example is the same as for the previous example both for France and Germany, from section . . We then apply the NSS methodology explained in chapter to both the German and the French load profiles to match NSS values from % to %, which results in different load profiles of five weeks for each country. Each profile for France and Germany is optimized for self-sufficiency targets from % to % to give Fig. % NSS which corresponds to a common NSS for residential buildings. Since GHG emissions for electricity usage are much lower in France, shedding gCO -eq/kWh is challenging, i.e., it requires a starting NSS of around % with kWp solar panels per house. In Germany, where the grid emissions are much higher, we can hope to shed gCO -eq/kWh realistically, i.e., with a moderate NSS at %, . kWp of solar panels, and kWh of batteries per household. We note that since average grid emissions are used instead of dynamic emissions, arbitrage activities are not present, which results in slightly higher carbon emissions in the German case in comparison with Fig. . .

. . Verifying the hypothesis on natural self-sufficiency

As mentioned earlier, we hypothesize that load profile differences can be summarized through the concept of natural self-sufficiency when it comes to sizing renewable energy systems for a given location. To verify this hypothesis, we expect that two load profiles with the same NSS will give identical results in Below % self-sufficiency, Fig. . shows that our hypothesis holds, as all the curves remain within the % to % boundaries. This is a significant result as energy communities most often remain below % self-sufficiency [ ]. Beyond % self-sufficiency, the NSS index is not the only parameter to consider, as the GHG impact of batteries becomes significant. In particular, the maximum peak demand, and consecutive Solar panels is more always better days with large energy demand influence the size of the battery required to reach a certain self-sufficiency. It ultimately leads to deviations from the expected GHG emissions given by the reference chart generated with load profiles computed following our methodology.

Highlight:

Natural self-sufficiency provides a metric to summarize the impact of a variety of load profiles on optimization results.

. Partial conclusion

In this chapter, we address the sizing of solar panels plus storage in view of minimizing GHG emissions. We place ourselves in a context where power injection into the upstream grid, i.e., outside of a local energy community is possible but no longer desired for technical and social reasons.

From our results, we draw trends rather than absolute certitudes. For instance, in the French case further reducing emissions by gCOeq/kWh is challenging. However, in Germany, communities can hope to shed gCO -eq/kWh realistically, with an overall natural self-sufficiency of %, and households equipped with . kWp solar panels, and kWh batteries. Our results also speak to the limits of relying on high selfsufficiency levels to reduce the carbon intensity per kilowatt-hour, when simply reducing the amount of kilowatt-hour consumed might be better at the end of the day. This is clear in France, less in Germany as GHG emission per kilowatt-hour can be lowered by a third in comparison to the national grid.

We believe that our proposition for a natural self-sufficiency index and the methodology to modify load profiles is interesting to estimate results on a variety of load profiles (which is often not possible due to the scarcity of available data). In particular, this is a valid solution when load profiles cannot be modified from the ground up using individual appliances' consumption. If local energy communities want to gain confidence in regard to potential load profile changes, e.g., due to unexpected new members, they may use our methodology to apply some variations to their load profile. Further, we expect that this methodology can evolve, by including other parameters like consecutive days without solar production.

Conclusion

. Overview of the main results

Local energy communities offer a place to rethink our view on energy consumption, and although these communities have always existed, they have recently gained momentum. From a regulatory perspective, since , all member states of the European Union are required to implement renewable energy communities in their national law. Additionally, and at least in France, due to higher electricity prices, selling electricity to neighbors might prove to be more profitable than selling to a supplier at a regulated price.

In our view, local energy communities rely on at least two principles a spatial limit and a temporal limit. The spatial limit ensures that communities remain in the physical proximity of production units, and in practice, that communities have a limited number of participants. The temporal limit provides the necessary link to ensure a physical relation between local energy production and consumption. This temporal limit is also the principal challenge of local energy communities which justifies our scientific work in assessing coordination strategies.

Throughout this work, we adopt a specific posture on scientific contributions. Rather than producing knowledge through the evolutionary process of "filling gaps" on existing coordination strategies, we follow a "bricolage" approach as defined in [ ]. This approach views scientific contributions as a remodeling of existing theories by combining various ideas, and observations specific to a novel context. As such, we consider that one of our main contributions is to cast the perspective of spatially and temporally limited energy communities on existing coordination strategies. Additionally, we situate our scientific contributions as both "reflexive knowledge" and "instrumental knowledge" [ , ]. In that order, we question the purpose of local energy communities and coordination strategies, and then, the means to achieve coordination of local energy production with local consumption.

To question and frame the potential of coordination strategies, we first look at estimating the theoretical lower and upper self-sufficiency limits of communities. In chapter , we show that self-sufficiency calculated with a daily granularity represents a good theoretical upper limit below kWh of storage capacity per household for a residential community in France. On a longer time-scale, we show that for the community studied, storing energy from one day to another within a week has a very limited % impact on self-sufficiency below kWp solar panel per household. This methodology, which looks at different storage cycles is interesting to justify the length of a coordination horizon . Additionally, although it is important to calculate self-sufficiency over a complete year to provide meaningful results, we show that it is possible to represent a full year with only five weeks of data using a clustering method.

Conclusion

One of the difficulties in designing coordination strategies is understanding how existing strategies relates to each other, and how they relate to the local energy communities they are designed for. This is not trivial as local energy communities take many shapes in the literature, often with larger geographical scopes, as do coordination strategies from different market-based approaches to convex optimization, or heuristic rules. In chapter , we list objectives and constraints that communities may expect coordination strategies to include: in terms of adaptability to different flexible assets, granularity in calculating the cost of energy, or acceptability by the community members. We suggest that an algorithm that accounts for all phenomena at each scale may very well be overcomplicated and time-consuming with regard to the payoff structure for controlling flexible assets.

Local energy communities are complex systems bound to unforeseen changes [ ], from which coordination strategies should be able to adapt. A potential approach is then to start with simple strategies that get progressively more complex. In that sense, we highlight that external socio-economic mechanisms can substitute some of the complexity of coordination strategies, e.g., the problem of fairly sharing the value of local production or the issue of empowering community members. Additionally, we provide a classification of coordination strategies on the basis of who takes decisions and how they are communicated to flexible assets. From this analysis, we can filter out several coordination strategies, in particular, if we place ourselves in communities that have access to a trusted community manager.

At this level, we assume that community-wide coordination strategies are needed. However, we could imagine a community where each participant controls their individual assets independently. As such, to verify the use of a community-wide scheme, we look at the coalition value, i.e., the value of coordinating together as opposed to each member of the community independently controlling their assets. We show that the coalition value depends, among other things on the capacity and spread of flexible assets in the community. A community relying on the production of one member for a multitude of distributed flexible assets has a greater coalition value than a community where each member pairs distributed production with flexible assets. In other words, pairing production units and flexible assets can reduce the burden falling on community-wide coordination, thus opening the door to simplifying strategies.

The classification of coordination strategies provides a high-level view, however, certain issues arise when implementing a specific strategy. For that reason, and to provide actionable solutions for communities we implement two strategies, a predictive approach, and a reactive approach.

The reactive approach is in some ways the "least bad" option. It cannot achieve the minimum cost of the predictive approach under a perfect forecast, because it provides an optimal solution at and not over the horizon . However, it is not subject to making poor decisions from an erroneous forecast. In a simulation environment over a full year, the reactive approach leads to only a % cost increase in comparison to the minimum cost achieved from a perfect dispatch of storage assets.

. Potential impacts of the results

: https://www.centralesvillageoise s.fr/les-chiffres-cles last consulted in June .

: As discussed in [ ], the role of energy cooperative should be less to seek a capacity to accelerate the development of renewable energies, but rather to reason this development with social and environmental dimensions.

The predictive approach offers a simpler modeling approach for flexible assets that depend on future events, e.g., electric vehicles that need to be charged before a departure time. However, forecasting individual netload time series is challenging. Further, we show in chapter that efforts on forecasts' quality do not necessarily lead to more value for the community after solving the scheduling problem. Additionally, the scheduling problem makes it difficult to include stochastic aspects, as we must consider uncertainties at each time in horizon for each member in . To address the impact of forecasting errors, we propose a solution that consists of encouraging assets to charge and discharge when individual netloads have the most amplitude, i.e., when forecasting errors are the most forgiving due to power and energy constraints on batteries. Although this solution turns scheduling into a quadratic programming problem, it shows the potential to better match the outcome of the perfect schedule. We note that limits related to erroneous forecasts are common to most strategies, in particular, they apply to fully distributed strategies as well as market-based approaches. However, instead of being the purview of a central community manager, they are the responsibility of individual community members.

Finally, in the last chapter, we move away from financial aspects to look at carbon impacts, and from operating communities to sizing energy systems. Are more solar panels always better? From a simple back-ofthe-envelop calculation, yes, as solar panels virtually reimburse their carbon footprint after years in Germany or years in France. However, if we consider that only self-consumed power offsets solar panels' carbon footprint, the answer is less trivial. From our results, we draw some trends rather than absolute certitudes. For instance, in the French case further reducing emissions by gCO eq/kWh is challenging Fig. . . However, in Germany, communities can hope to realistically shed gCO -eq/kWh. Our results speak to the limits of relying on high self-sufficiency levels to reduce the carbon intensity per kilowatt-hour when at the end of the day, simply reducing the amount of kilowatt-hour consumed might be better.

. Potential impacts of the results

Local energy communities have often been disregarded as they offer fewer financial benefits and much more administrative work than feedin schemes. As of , there are only communities of collective self-consumption in France. In comparison, energy cooperatives have deployed solar power plants, i.e., cooperatively own power plants, where all the energy production is sold and the benefits are shared among members. The issue with energy cooperatives is that much of the focus can be on the financial arrangement, and producing greener electricity, without considering aspects related to consuming less energy. However, local energy communities might inverse this trend as electricity prices increase. In particular, the individual self-consumers in France could imagine selling their electricity surplus to their neighbors instead of relying on a subsidized energy supplier. This is potentially a strong selling point. As such, we might see more and more companies offering Conclusion to deploy local energy communities without losses of revenue for local producers.

Based on those premises, we see our work having an impact when creating local energy communities, and during their operation. In particular, we imagine that consulting firms could develop local energy communities as an iterative process incorporating our methods at different levels. We imagine three stages (i) local energy communities do not manage their flexible assets if any, (ii) flexible assets are managed at the individual level, (iii) flexible assets are managed with a community-wide coordination strategy. At the first stage, feedback on self-consumption and self-sufficiency metrics could be coupled with clustering representative weeks to provide an overview of typical self-consumption patterns in time. In the second stage, our method would enable a consulting firm to assess the impact of storage assets on self-sufficiency and financial gains for individual members. Additionally, at this stage, the coalition value stemming from a community-wide coordination scheme should be assessed to potentially transition toward the third development stage. Finally, if the acceptability and the economics of a community-wide coordination scheme are validated, a consulting firm could propose to implement (i) a predictive solution with an order book to adapt to different flexible assets with their own provider, or (ii) a reactive approach if flexible assets can be solicited frequently.

On the academic side, one of the desired outcomes of our work is to show that scientific contributions on local energy communities are not limited to adding onto existing coordination strategies, e.g., with sophisticated artificial intelligence. In fact, looking at the purpose of local energy communities open a different paradigm: questioning if coordination strategies can be reshaped in a "low-tech" perspective as an elementary brick of a sustainable, fair, and convivial society [ ].

We hope that chapter will nuance our technological approach focused on coordinating flexible assets, and reminds readers that achieving higher self-sufficiency is sometimes detrimental from a carbon's perspective, which is only one aspect of life cycle analysis. Community members consuming less energy is one of our initial motivations, as such, we hope that it remains the principal objective of local energy communities, rather than becoming technological displays.

. Perspectives

There are several directions in which the work carried out throughout this thesis can be extended. However, one of the most prominent aspects is to test our coordination strategies in real-world conditions. Although simulation environments enable the exploration of different scenarios, they represent best-case conditions where the impact of unexpected events is hard to quantify. One of the next development for this work is for LANCEY Energy Storage (funder of this study) to deploy the predictive coordination strategy to control battery assets in a local energy community. In particular, this deployment would provide data, on whether the complexity of flexible assets' models is sufficient to estimate . Perspectives the actual state of physical assets for a day, or whether the periodicity of dispatch must be increased.

Another perspective is to develop a mix of predictive and reactive strategies. We see that this approach could enable the best of both worlds. On one side, the predictive strategy provides a forecast of the netload, and models to include elements such as the departure of a vehicle. On the other side, the reactive strategy plays a verification step ensuring that no clear mistakes are made, for instance, storage systems charging outside the community on the upstream grid.

Finally, social aspects are key. As coordination strategies rely on the acceptability of flexible assets at first, to influence the comprehension of what it costs to produce energy. A perspective of our thesis is to develop a transdisciplinary approach with social science. In particular, to monitor at different stages of communities, the perception of energy by members, to anticipate the needs of the community, whether it is a different coordination strategy, flexible assets, or specific nudges to impact behavioral changes.

A

: https://github.com/cerlymarco/li near-tree

A Mixing predictive and reactive strategies

The scheduling mechanism provides a minutes schedule corresponding to the resolution at which communities have to match local production with local consumption. Those time intervals leave space to adjust flexible resources when a deviation from the forecasted netload is observed.

During the day, as we differ from the predicted netload, we can repeat the process of forecasting and solving the scheduling problem Eq. . in a model predictive control way. Nonetheless, we attempt to limit this computationally intensive process to a few instances per day, thus we propose an additional approach for swift adjustments. Our approach is based on pattern recognition. We propose to train a model to recognize the best course of action when a deviation from the predicted netload is observed. We note that we are not simply building a machine learning model on the error of the forecasting model, but rather on the impact of this error on the scheduling problem Eq. . . We search a function to go from a battery power setpoint based on a potentially inaccurate forecast, and a set of observations to * the setpoint for a perfect forecast. * = ( , ) + (A. )

Although, * the perfect control is unknown at due to forecast uncertainties, we can compute it a posteriori from historical data. We train a model to obtain a function ( , ) such that is minimized (Eq. A. ). To represent ( , ), we choose to implement a decision tree with linear regression at the leaves [ ] based on the linear-tree library . One of the reasons for choosing this model is the potentially piecewise linear nature of . For instance, we expect the perfect control to be proportional to the previous setpoint , and forecasting errors in situations where capacity constraints do not prevail. Further, as linear trees are analogous to piecewise linear functions, they have good interpretability.

In their inner working principle, linear trees are similar to the classical decision trees. Each split candidate consists of a feature and a threshold partitioning the data in a right and a left subset. For the linear tree, each split candidate leads to a linear regression on the left and right partition. The feature and threshold leading to the minimum weighted loss summed over the partitions is accepted if it is lower than the loss of the parent node. Where losses are calculated as the mean square error induced by linear regressions. Different features can be used to split the tree and form regression at the leaves. Intuitively, we can select state variables to split the tree (e.g., state of charge, community and individual netloads), and variables proportional to the output for the regression (e.g., planned dispatch , individual, and aggregated forecasting errors).

Illustrative example

This section is meant to illustrate the improvement that may come from this approach, but also the process of parameterizing linear trees. We illustrate the adjustment on the same data as chapter section . , similarly to previous examples. Each of the twenty households has a kWh battery and a kWp solar panel. We select five weeks from April to May, four weeks to train linear tree models, and one week to test models. Each linear tree represents a battery controller adjusting power set points based on the perturbations observed since the last optimal dispatch was run. An optimal dispatch is run twice every day, once to obtain upcoming battery schedules based on the GAM forecasts, e.g. denoted ( ), and once at the end of the day based on recorded data to obtain what should have been the perfect schedule without forecasting errors, e.g., denoted * ( ). Along with the planned schedule ( ) and the perfect schedule * ( ), a set of observations denoted ( ) is also recorded.

Those observations include the hour of the day, the state of charge of battery , the netload of member , the forecasting error on netload , the aggregated netload and the forecasting error for the entire community. Each of those observations can be used to train linear tree controllers, either as a splitting feature of the decision tree or as a regression feature of the linear regressions at the leaves. For this specific scenario, we choose to build a model with the following variables to split the decision tree:

The netload of member : whether member is producing or consuming electricity and at what rate. The idea is that if the netload is very positive or very negative, adjustments tend to also have more amplitude unless the forecasting error is small.

The aggregated netload of the community: whether the community is in deficit or excess of energy overall. This information provides a global view beyond a member's meter, so batteries charging on shared production can be understood by the model.

The forecasting error of netload : whether the forecasting error was small or large might influence the adjustment to discard the previous optimization set point ( ) and rather adjust based on the actual netload directly.

For the linear regression at the leaves of the decision tree, we select the following variables: the previous optimization set point ( ), the uncontrolled netload of member , and the uncontrolled aggregated netload of the community. In the end, the adjustment for battery comes down to the following equation:

ˆ ( ) = × ( ) + × unctrl ( ) + × unctrl ( ) + (A. )
Where ˆ ( ) is the newly adjusted power set point for battery , and , , , are the linear regression coefficients corresponding to the leaf of the decision tree. Each leaf represent a specific scenario delimited by splitting variables and corresponding thresholds as in traditional decision trees. Finally, as a last step the new set point is clipped using a battery model, e.g., power and energy constraints, in order to always provide feasible orders for the battery. This work on adjusting battery set points with linear tree models also opens the door for more questions: how are the parameters of linear tree models influenced by the spread of batteries in the community? Can linear A Mixing predictive and reactive strategies trees lead to stable heuristic rules replacing the need to run optimization models in the daily operation of local energy communities?

Figure . :

 . Figure . : Profile illustrating energy imported from the main grid, energy exported to the main grid, and local generation consumed by the community.

Figure . :

 . Figure . : Illustrative example of local energy communities in France: "collective self-consumption".

Figure . :

 . Figure . : Illustration of the structural diffrence between feed-in-tarif and individual self-consumption.

Figure . :

 . Figure . : Graphical explaination behind self-sufficiency and self-consumption metrics.

Figure . :

 . Figure . : Sample timeseries from the RE-FIT and PVGIS open datasets, household # with a kWp solar panel.

  Fig. . shows two ways to account for storage. Even though the resulting netload from Fig. . a or Fig. . b is the same, the resulting self-sufficiency will be higher for Fig. . b, as the proportion of local consumption to the total consumption is greater.

Figure . :

 . Figure . : Illustration of considering the storage power profile as a) a pure production (bottom left graph), or b) a production only when the storage is discharging and a consumption when the storage is charging (bottom right graph).

Fig

  Fig. . b.Thus charging is accounted as a consumption and discharging as a production. This vision leads to Eq. . where ¯ ( ) > 0 represents the storage profile when charging, and ( ) > 0 represents the storage profile when discharging.

Algorithm:

  An algorithm to maximize individual self-sufficiency Data: timeseries load( ) and prod( ) ∀ ∈ [1... ], Δ = 1/4 Data: battery model , , , ∈ ℝ + , = 0.95 Result: ( ) in the receptor convention, and ( ) = 1 while < do ( ) = prod( )load( ) //Apply battery constraints

  .

  Figure . : Sample timeseries from Quoilin open dataset [ ] and PVGIS solar production for Valence, France, households with each a kWp solar panel.

  On top of the theoretical lower and upper bounds drawn on the previous figure, Fig. . shows self-sufficiency curve with minutes intervals for different storage capacities

Figure . :

 . Figure . : Impact of solar panel capacity on the community self-sufficiency for different storage capacities per household. Python notebook available at https: //github.com/Jonathan56/supplement ary _ thesis/tree/master/2 _ chapter.

  Fig. . . To assess if our clustering methodology is also representative for large solar panel and battery capacities, we look at the quality of clusters Eq. . for an extended scope of Battery ∈ [0, 2, 4, 10, 30] kWh per household and PV ∈ [0, ..., 20] kWp per household for clusters with ∈ [2, ..., 52]. The resulting mean absolute percentage error MAPE for clusters starting with = 2 representative weeks to = 52 weeks are shown in Fig. . in . Can a few weeks represent a whole year

Figure . :

 . Figure . : Mean absolute percentage errors for a range of cluster sizes for two different scenarios. Python notebook available at https://github.com/Jonathan5 6/supplementary _ thesis/tree/maste r/2 _ chapter.

Figure . :

 . Figure . :Self-sufficiency curves for solar panel sizes from to kWp and batteries from to kWh. The dash lines represent results obtain with the full data set, whereas plain lines represent results obtain from the weeks selected by the clustering algorithm.

Figure . :

 . Figure . :Graphical determination of natural self-sufficiency at the intersection of self-sufficiency and self-consumption for the data of section . . Data and Python notebook available at https://github.c om/Jonathan56/supplementary _ thesi s/tree/master/2 _ chapter.

Figure . :

 . Figure . :Illustrative example of modifying the natural self-sufficiency of a load profile from % (in blue) to % (in red), and % (in green) (Data and Python notebook available at https://github.c om/Jonathan56/supplementary _ thesi s/tree/master/2 _ chapter).

Figure . :

 . Figure . :Impact on self-sufficiency of generated load profiles with different potentials to absorb local energy production measured in "natural self-sufficiency" from % to % (data and Python notebook available at https://github.com/J onathan56/supplementary _ thesis/tr ee/master/2 _ chapter).

Figure . :

 . Figure . : Illustration of the synergies between social, economic, and physical coordination. Author's own compilation.

Figure . :

 . Figure . : Illustration of the difference between physical flux and economic dispatch for the French collective self-consumption.

Algorithm:

  An algorithm to find the coalition value Data: load ( ) and prod ( ) ∀ ∈ [1... ], for each member Data: battery model , , , ∈ ℝ + , = 0.95 Result: the coalition value //Self-sufficiency when members are controlled individually for member ∈ do ( ), ( ) = apply Alg. for with load and prod self-sufficiency = =1 min =1 load ( ), =1 prod ( )-( ) =1 =1 load ( ) //Self-sufficiency when members are controlled together ( ), ( ) = apply Alg. with =1 load and =1 prod self-sufficiency = =1 min load ( ), prod ( )-( ) =1 load ( ) = self-sufficiencyself-sufficiency return Result We look at the value of coalition as a function of the controllable assets per household, i.e., the battery capacity in kWh per household, and two different spreads of flexible assets. To illustrate a coalition value, we select the same data set as in chapter section . also shown for a few days in May on Fig. . . The data represents a community of households in France with each a kWp solar panel. Fig. . illustrates three scenarios, the collaborative strategy, the individual strategy where everybody is equipped with a battery, and the individual strategy where only % of households are equipped with batteries twice as large. Lower and upper bounds are also added to Fig. . to provide a reference (dashed lines). Those bounds are calculated following the methodology discussed in section . . .

Figure . :

 . Figure . : Self-sufficiency of the community as a function of battery capacity in kWh per household for different strategies. Solar panel capacity is fixed at kWp per household.

Figure . :

 . Figure . : Classifying energy community management systems based on [ ].

Figure . :

 . Figure . : Droop controllers.

Figure . :

 . Figure . : Price reactive.

:Figure . :

 . Figure . : Top-down switching.

Figure . :

 . Figure . : Transactive control.

  Figure . : Central optimization.

Figure . :

 . Figure . : Distributed ledger & optimization.

  g., reinforcement learning, or traditional convex optimization methods [ , , ]. Model Predictive Controllers (MPC) represent an interesting solution where control actions are solved online, at each sampling instant, using a finite horizon open-loop optimal control problem with the current state of the plant as the initial state [ ]. MPC anticipate future conditions while adapting to the current state of the system. Some examples of local energy communities driven by a central MPC include [ ]. MPC have been used for robust control to deal with probabilistic load forecasts [ -], or deployed in as a bi-level implementation to handle longer and shorter time-scales [ ].

Figure . :

 . Figure . : Decision diagram to choose whether a blockchain technology is needed [ ].

Figure . :

 . Figure . : Conceptual representation of the dispatching algorithm.

Figure

  Figure . : Conceptual representation of the dispatching algorithm, Netload corresponds to (detailed in next section).

  Shapeable devices at a priceThe order book accepts bids at any time, however, assets are encouraged to send bids close to the start of a new prediction and control horizon. If not, the state of flexible assets is estimated from past schedules.

Figure . :

 . Figure . : Time to write and solve the optimization problem Eq. . with Pyomo and GLPK. Python notebook available at https://github.com/Jonathan56/supp lementary _ thesis/tree/master/4 _ cha pter.

Fig

  Fig..shows a sample of the resulting battery profile aggregated at the community level when the optimization formulation is adopted. As expected the battery reaches a full state of charge every day while only charging from the local solar panels. Although it does not show in the figure, power exchanges between community members are minimized to avoid distribution grid fees at . cente/kWh.

Figure . :

 . Figure . : Resulting battery profiles from the minimization of community costs during two days.

  cent€/kWh No st or ag e T h e o r e t ic a l li m it Ind ivid ual stra teg y O p ti m a l c o ll a b o ra ti o n

Figure . :

 . Figure . :Coalition value in terms of electricity cost for increasing network tariffs under an individual strategy and the optimal collaboration. This scenario involves households with each a kWp solar panel and a kWh battery. Python notebook available at https://github.com/J onathan56/supplementary _ thesis/tr ee/master/4 _ chapter.

Figure

  Figure . : Real-world netload profile associated with Global Horizontal Irradiance (GHI) data for a single household with solar panels.

Figure . :

 . Figure . : Uncertainty intervals associated with model for a netload forecast. The actual netload is the thiner blue curve.Python notebook available at https:// github.com/Jonathan56/supplementar y _ thesis/tree/master/4 _ chapter.

Figure . :

 . Figure . : Aggregated netload for the community of five households covering training and prediction windows.

  Fig. . shows the aggregated netload from the five households from the beginning of the training period to the end of the prediction window.

Figure

  Figure . : Actual and predicted netload for household # with model run every days.

Figure . :

 . Figure . : Goodness of fit as a function of forecast periodicity for five residential building netloads. Python notebook available at https://github.com/Jonathan5 6/supplementary _ thesis/tree/maste r/4 _ chapter.

  Algorithm : A dispatch algorithm mixing forecast and scheduling Data: past unctrl ( ) ∀ ∈ [ ... ], for each member Data: future weather ( ) ∀ ∈ [ ... ] Result: schedule ( ) ∀ ∈ [1... ] for all flexible assets //Train forecasting model for each member ∀ ∈ [ ...0[ for member ∈ do GAM = Fit Eq. . with unctrl ( ) and weather ( ) //Dispatch at a periodicity for an horizon = 0 while < do //Forecast netload for each member ∀ ∈ [ , + dispatch ℎ ] ∀ ∈ [nb , [ for member ∈ do unctrl ( ) = GAM unctrl ( ), weather ( ) //Retrieve all flexible bids orderbook = { , , , } ∀ ∈ //Find the optimal schedule schedule ( ) = solve Eq. . [unctrl ( ) ∀ ∈ ], orderbook = + periodicity return schedule ( )

Fig

  Fig. . shows the resulting battery power and energy profiles aggregated for the five households, as well as, actual and predicted netloads for two scenarios. When the dispatch is executed every two days or every minutes. This figure illustrates that with a minutes interval between dispatch (bottom figure) the netload forecast (in orange) is closer to the actual netload value (in blue) than when a days interval between dispatch (top figure) is used. In other words, as mentioned earlier the forecast quality is better with minutes interval between dispatch. With different netload forecasts, resulting battery schedules are different, however, in both cases the aggregated energy profile pass by a % state of charge.

Figure . :

 . Figure . : Three days sample for two scenarios of dispatch: (i) with a days periodicity (top), and (ii) with a minutes periodicity (bottom). For each scenario, uncontrolled netload profiles and battery time series are shown. Note that the sample starts before : am, as it is taken in the middle of the simulated week.

  Fig..shows the cumulative energy imports from the community resulting from dispatch in four different scenarios. On the one hand, two scenarios to mark limits, a perfect scenario where the schedule is based on a perfect knowledge of the netload, and a scenario without batteries that provides an upper limit on community imports. On the other hand, two scenarios represent different periodicity of dispatch, a long periodicity of days and a short periodicity of minutes. The result shows that both the two days and minutes periodicity achieve a similar value, respectively % and % of the value gap between the lower and upper limits on energy import from the community. This result is similar when considering energy costs at the end of the week which also includes the prices of exchanging power, then the two days dispatch

Figure . :

 . Figure . : Time series of actual and forecasted netload with the aggregated battery power profile from five households, and their aggregated SOC.

  Fig. . . In term of cost, for the week considered the MPC is able to recover % of value achieved with a perfect forecast (and . % of the energy import). The . A model predictive control results in the following subsection are obtained with this new objective function Eq. . .

Figure .

  Figure . :Cumulative community imports for the community of five households. Four scenario are illustrated, a periodicity of two days with penalties of = 0 and = 1e-, as well as, a scenario without batteries and a scenario based on a perfect forecast. Python notebook available at https://github.com/Jonathan5

  Fig. . suggests that the value gap from the perfect forecast is under % for a battery size of kWh per household.

Figure . :

 . Figure . :Cost in euros as a function of battery sizes for three scenarios using the MPC with a days periodicity and a penalty of = 1e-. "Gap" labels represent the size of the gap with the perfect dispatch in relation to the gap between the perfect dispatch and the solar only scenario. Python notebook available at https: //github.com/Jonathan56/supplement ary _ thesis/tree/master/4 _ chapter.

Figure . :

 . Figure . :Cost in euros per member as a function of community sizes for three scenarios using the MPC with a days periodicity and a penalty of = 1e-. Python notebook available at https: //github.com/Jonathan56/supplement ary _ thesis/tree/master/4 _ chapter.

Figure . :

 . Figure . : Concept of the reactive approach during self-consumption intervals.

Figure . :

 . Figure . : Illustrative example of the reactive dispatch.

Figure . :

 . Figure . : Energy imports for the reactive dispatch for one week. Costs in euros represent the cost of energy imports and grid fees at the end of the week for the community of five households.

Figure . :

 . Figure . :Energy import for the perfect and reactive dispatch for a full year. Costs include energy imports and grid fees at the end of the year when equally shared among the twenty members. Python notebook available at https://github.com/J onathan56/supplementary _ thesis/tr ee/master/4 _ chapter.

Figure . :

 . Figure . : Illustration of CO operational costs from various sources, note that exporting power is not -gCO /kWh as in the infinite grid assumption.

Figure . :

 . Figure . : Illustration of the expected results for carbon intensity of energy as a function of self-sufficiency.

Fig

  Fig. . and Fig. . illustrate that the optimization accounts for operational constraints. In themselves, those figures are not the final results that we are interested in, they are merely one week over five in the first year of a twenty years life cycle, however, they highlight some of the dynamics at play. In both scenarios the target self-sufficiency to reach is %, however, the German scenario requires more batteries as shown by the upper limit on the battery state of charge. This is mostly due to a lesser solar production overall in Berlin compared to Grenoble.

  Fig. . and Fig. . illustrate that the optimization accounts for operational constraints. In themselves, those figures are not the final results that we are interested in, they are merely one week over five in the first year of a twenty years life cycle, however, they highlight some of the dynamics at play. In both scenarios the target self-sufficiency to reach is %, however, the German scenario requires more batteries as shown by the upper limit on the battery state of charge. This is mostly due to a lesser solar production overall in Berlin compared to Grenoble.

Fig

  Fig. . and Fig. . represent a quantitative answer for Germany and France of the hypothesis posed in Fig. .. We check that when selfsufficiency is at %, all the energy consumption is imported from the main grid. Thus, the normalized carbon emissions are equal to the average French and German grid emissions (red dashed line).

Figure

  Figure . : GHG emissions results as a function of self-sufficiency for the German scenario. Python notebook available at ht

Fig

  Fig. . is an extended version of Fig. . and Fig. . which enables to envision the benefits of shifting consumption at time of solar production. The bold lines in Fig. . represents a load profile with a% NSS which corresponds to a common NSS for residential buildings. Since GHG emissions for electricity usage are much lower in France, shedding gCO -eq/kWh is challenging, i.e., it requires a starting NSS of around % with kWp solar panels per house. In Germany, where the grid emissions are much higher, we can hope to shed gCO -eq/kWh realistically, i.e., with a moderate NSS at %, . kWp of solar panels, and kWh of batteries per household. We note that since average grid emissions are used instead of dynamic emissions, arbitrage activities are not present, which results in slightly higher carbon emissions in the German case in comparison with Fig. . .

  Fig. . . In other words, any load profile with a given NSS should fall within the corresponding NSS curves from Fig. . . We select different load profiles from open-source data sets with respectively %, %, %, and % NSS.

Figure . :

 . Figure . :Verifying the hypothesis on NSS for the German case using different load profiles with various natural selfsufficiency (specified on each curve).

.

  Fig. A. illustrates the concept of linear tree for one battery.

Figure

  Figure A. : Illustrative example of a linear tree.

Fig

  Fig. A. illustrates the improvement achieved over the course of a week, improvements are measured as how much the new schedule ˆ ( ) is closer to the perfect schedule * ( ) than ( ) the original schedule, in percentage of the difference between * ( ) and ( ). On average the new schedule is . % closer to the perfect schedule. Although this additional control layer may increase errors in some scenarios, it is overall beneficial in most situations.

Figure A . :

 . Figure A. : Improvement achieved over the course of a week by linear tree models over the original scheduling with forecasting errors to achieved the optimal schedule calculated as posteriori.

  . Profile illustrating energy imported from the main grid, energy exported to the main grid, and local generation consumed by the community. . . . . . . . . Illustrative example of local energy communities in France: "collective selfconsumption". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Illustration of the structural diffrence between feed-in-tarif and individual self-consumption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Graphical explaination behind self-sufficiency and self-consumption metrics. . . Impact of metering self-sufficiency over minutes intervals versus minutes intervals on an illustrative scenario. . . . . . . . . . . . . . . . . . . . . . . . . . Sample timeseries from the REFIT and PVGIS open datasets, household # with a kWp solar panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Self-sufficiency metric taken for different time intervals from minutes to year, with increasing solar panel sizes on the x-axis. Python notebook available at

https://github.com/Jonathan56/supplementary _ thesis/tree/maste r/2 _ chapter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Introduction: local energy communities . Why work on local energy com- munities

	Almost any question you can ask can be answered. It's only the
	questions that you didn't know to ask that remain, dancing the can-can
	behind your back.
	-Mark Forsyth, The Unknown Unknown: Bookshops and the
	delight of not getting what you wanted
	In this first chapter, we introduce local energy communities from three
	angles: why do local energy communities motivate our work? What
	are local energy communities? And what research questions do we
	address?

? . . . . . . . . . . . . . . . . What are local energy communities? . . . . . . . . . . . . . . . . . . . . Research questions . . . . . . . Organisation . . . . . . . . . . . Contributions . . . . . . . . . . . Publications . . . . . . . . . .

Table . :

 . Dimensions and levels for evaluating community orientation of community renewable energy projects [ ]. Cells colored in light green mark the left most boundary for what we define as local energy communities.

	Levels
		Only non-local			Local individuals,
	Range of		Mix of all actor	Mix of all actor
		organisations,			organisations,	Only local
	actors		types, more non-	types, more local
		business and			government and	individuals
	involved		local than local	than non-local
		government			business
		Starts late, occurs		Occurs via various	Starts early and
	Level of		Occurs only at		Starts early but is
		rarely and via		means but only	occurs often,
	community		key times, using		sporadic, uses less
		very limited		during key times	using a broad
	engagement		limited methods		methods
		means		of project	range of methods
				Limit on
	Distribution		Actors' votes		Some actors get
		One actor has all		shareholding to	One vote per
	of voting		correlate to level		more, less or no
		votes		ensure no single	actor
	power		of shareholding		votes
				controlling interest
				Scaled to gain	Balanced between
				economic	achieving
		Scaled to			Scaled in relation
				efficiencies, with	economies of scale
	Scale of the	maximise	Scaled to local		to local energy
				some	and
	technology	economic	demand		demand and local
				consideration of	appropriateness
		efficiencies			agreement
				appropriateness	for local
				for local context	community
		Non-local
			Partly local	Local investors,	Partly to
	Distribution	investors, with			Community fund
			investors, partly	with local	community, partly
	of financial	surplus leaving			to be used for
			non-local	economic flow-on	as dividends to
	benefit	local and possibly			communal benefit
			investors	effects	local investors
		national

Table . :

 . Retail options for selling electricity

https://www.insunwetrust.sol ar/blog/le-solaire-et-vous/tarif -rachat-photovoltaique/.

Do we need storage to self- consume? . . . . . . . . . . . . . . . Can a few weeks represent a whole year? . . . . . . . . . . . . . . What is the impact of load profiles on self-sufficiency? . . . . . . . . . Partial conclusion . . . . . . .

	What does it mean to
	"self-consume"?
	. consumption? . . . . . . . . . . . How to measure self-. Overcome space, and all we have left is Here. Overcome time, and all we have left is Now. -Richard Bach, Jonathan Livingstone Seagull
		TATuP, Journal for Technology Assessment in
	Theory and Practice,	. DOI: https://doi.org/10.14512/tatup.3
	1.2.25.

Alvarez-Hérault Marie-Cécile, Gouin Victor, Chardin-Segui Trinidad, Malot Alain, Jonathan Coignard, Raison Bertrand, Coulet Jérôme. Planification des réseaux électriques de distribution. ISTE editions, Collection Énergie, ISBN , . Hodencq, Sacha, Jonathan Coignard, Nana Kofi Twum-Duah, and Lucas Hajiro Neves Mosquini Including Greenhouse Gas Emissions and Behavioural Responses for PV Self-Sufficient Optimal Design. COMPEL, The international journal for computation and mathematics in electrical and electronic engineering, . DOI: https://doi.org/10.1108/CO : First in with the law for energy transition and green growth, later consolidated in with a clearer framework [ ].

  La Horde du ContreventIn chapter , we discussed what it means to have a limited time window to consume local energy production. This chapter reviews strategy that communities can follow to overlap their consumption and production. Firstly, we look at the conditions that justify coordination mechanisms at the scale of a community and what is expected of such mechanisms.

. What do we mean by coordination? . . . . . . . . . . . . . . . . . . What do we expect from coordination strategies? . . . . . . . . . . What synergies between social, economic, and physical coordination? . . . . . . . . . . . . . . . . . . What is the value of coalition? . A review of coordination strategies . . . . . . . . . . . . . . . . . . . Partial conclusion . . . . . . . La folie n'est plus folle, dès qu'elle est collective.

-Alain Damasio, Then we propose a review of the literature on coordination strategies based on two different perspectives: centralized versus decentralized strategies and competitive versus cooperative strategies.

  Each of those categories are described below. Part II Methodology

	canceled out is precisely power exchanges within the community.
	Exchange =	max(0,	( ))
		Sum of ind. imports
	: http://www.pyomo.org/ last visited
	in June
	: https://www.gnu.org/software/g
	lpk/ last visited in June

  . . Model is the simplest, it has no regressors, and thus mostly relies on the Fourier series to accurately represent weekly and daily cycles, default parameters are kept from the Prophet Python package. This model is expected to provide a very smooth result. Model in addition to model , includes a regressor representing the GHI to better estimate the influence of sunny days on the uncontrolled netload. Note that the GHI data provided is historical, however, in an operational scenario, the GHI data would be a forecast itself, thus embedding errors. Model in addition to the previous model, also includes autoregressive variables to represent lagged observations, as such the forecasted netload at depends on previous time -1, -2, ..., -. We select nb = 4 lagged values to represent the past hour (4 × 15 minutes) and include the most representative lags from the partial auto-correlation function. As per models and , the default parameters from the Prophet Python package are kept.

					Actual netload
		4 5	Model 1 No weather & no autoregressors	Model 2 Weather & no autoregressors GOF = 30.6%	Model 3 Weather & autoregressors GOF = 33.7%
	Net load [kW]	1 2 3	GOF = 14.6%
		0
					Figure . : Resulting netload forecasts for
		-1			the three different models. The actual net-
					load is the thiner blue curve. Python note-
		00:00 Apr 26, 2022 06:00 12:00 18:00 00:00 Apr 27, 2022 06:00 12:00 18:00	book available at https://github.com/J onathan56/supplementary _ thesis/tr ee/master/4 _ chapter.

  Solar panels is more always better "all-in-one" approach with a linear programming problem that is fast to solve. Additionally, we reduce the number of simulation periods through a clustering of representative weeks following the methodology developed in section . .

	As such, we can account for long terms dynamics:
	battery aging,
	solar panel aging,
	multiple battery investment decisions, i.e., not only the first year
	but throughout the optimization at years , , and , we consider
	that batteries have a year lifetime,
	self-sufficiency goals over the course of the optimization horizon.
	literature offers different options to manage such a problem [ ].
	For instance, Monte Carlo simulations with different sizes of flexible
	assets randomly selected to participate in the minimization of operat-
	ing expenses [ ]. Bi-level optimization procedures formulated as a

leader-follower problem where the outer loop is a genetic algorithm to explore the space of possible sizes [ ]. "All-in-one" formulations where both operating and sizing variables are considered in a single linear or mixed integer linear optimization problem [ ]. We take the

  Sample result for the German scenario the first year, target self-sufficiency is %. Python notebook available at https: //github.com/Jonathan56/supplementary _ thesis/tree/master/6 _ chapter.

	2 /kWh] Battery SOC [kWh] & Grid emissions [gCO	Sep 10 0 100 200 300 400 500 2019 Battery SOC Sep 11 Grid emissions Sep 12 20% SOC 100% SOC	Sep 13 Grid exports [kW] Sep 14	Sep 15	Sep 16 Grid imports [kW] Sep 17
	Battery SOC Figure . : Aug 6 Aug 7 0 20 40 60 80 100 120 140 2019 100% SOC Aug 8 20% SOC Battery SOC [kWh] & Grid emissions [gCO Grid imports [kW] Aug 9	Aug 10 Grid emissions Aug 11 Grid exports [kW] Aug 12	Aug 13
	Figure . : Sample result for the French scenario the first year, target self-sufficiency is	%. Python notebook available at https:
	//github.com/Jonathan56/supplementary _ thesis/tree/master/6 _ chapter.

2 /kWh]

Nomenclature

The mathematical nomenclature is ordered by first occurence in a chapter.

Chapitre

Time horizon.

Set of community members.

Individual community members.

load( )

Time series of the local power demand for in kW.

prod( ) Time series of the local power production for in kW.

( )

Power profile of a storage system in the receptor convention in kW.

( )

Power profile of storage systems ( ) aggregated for member in kW. ( ) Defintion : Battery bid.

= {start , end , , , , , }

Stationary batteries can be controlled during the time window defined by start and end to withdraw power ( ( ) > 0) or inject power ( ( ) < 0). We assume charging and discharging efficiency ( , ), some power boundaries , a maximum state of charge , and a final state of charge defined by . sets the state of charge of the battery at the time of the bid, in a way, this information synchronizes the order book with actual batteries. The dispatch interval is represented by Δ (e.g., minutes in our case). ∀ = 1...

( . c)

Defintion : Shapeable at a price bid.

This category of shapeable load is equivalent to the previous description, except that a profile ( ) is provided with a cost to deviate from the expected profile. This cost is considered in the objective function

. . Scheduling

The scheduling mechanism minimizes the overall costs for the community. To do so, we minimize energy imports from outside of the community, and fees from using the public distribution grid. Interestingly, although this is a collaborative approach, this formulation leads to prioritizing members' resources for themselves as there is a non-zero cost of transacting energy.

To solve this scheduling problem, we opt for a fast and scalable linear programming approach, but other methods, in particular, genetic algorithms [ ], or dynamic programming could be relevant as well. The linear programming approach leads to Eq. . . Note that, the terms for battery aging and the cost of deviating from shapeable bids may be ignored if

. A model predictive control those bid types are not present in the order book.

Minimization

=1

× max(0, ( ))

Subject to: Eq. . , . , . , . , and :

Where ( ) is the netload of member composed of unctrl ( ) and power profiles from flexible assets. unctrl ( ) represents a forecast of the uncontrolled netload for member , i.e., the netload without the influence of flexible assets (described in the next section). The power imported by member is max(0, ( )), and the power imported by the whole community is max(0, ( )).

In the objective function, Eq. . , represents the price of buying energy from the main grid in e/kWh, ℎ represents the price of using the grid to exchange energy in e/kWh, represents the price for using batteries in e/kWh, and represent the cost of deviating from a shapeable bid with a pre-defined schedule in e/kW. All prices are not on the same scale, and specifically, the relation between prices follows Eq. . . The price of buying power outside of the community is more expensive than the fee for sharing it within the community, and sharing with the community is more expensive than charging your own battery.

We demonstrate that the energy exchanged within the community (priced ℎ in Eq. . ) is simply the difference between energy imports from the community as a whole and the sum of individual members' imports (Eq. . ). Intuitively, community imports are lower or equal to the sum of individual imports, as some members may export power which cancels out imports of other members. The portion of imports Part II Methodology large modifications of the MPC, the objective function Eq. . simply becomes . .

Minimization

=1

× max(0, ( ))

Subject to: Eq. . , . , . , . , and :

Where ( ) is directly a forecast of the community netload.

Removing the order book. Aside from forecasting individual netloads, the order book described in section . . also brings some limitations. In particular, issues related to decoupling predictive and control problems, accurately modeling of flexible assets, and frequently rescheduling flexible assets as described in the list above. Although the order book format is potentially critical in local communities with a diversity of flexible assets from different makers, it may also be cumbersome in communities with flexible assets coming from the same provider. In the latter scenario, the provider already has a direct access to communicate with flexible assets without needing the additional order book layer. Note that, in the hypothetical case of a real-world implementation with LANCEY Energy Storage on the "ABC" local energy community, we would remove the order book layer, as we are only expected to coordinate batteries from LANCEY.

Increasing complexity

Adding grid constraints. We did not consider grid constraints in the formulation of Eq. . , however, including grid constraints in scheduling flexible assets has the potential to avoid the need for grid upgrades [ ]. This is particularly interesting for local energy communities in charge of managing power lines in between community members, e.g., in Switzerland as discussed in section . . . However, when distribution system operators are in charge the situation is different. In France local energy communities would require additional information from meters outside of the community to model the distribution grid within a km radius. Note that in essence, maximizing self-sufficiency might already correspond to a scenario minimizing grid constraints. Nonetheless, grid constraints can be an explicit part of the MPC formulation using the branch flow equations which reflect a balanced single-phase radial network [ ].

Adding nudges. The present MPC formulation does not attempt to change the "uncontrollable" demand, however, we can imagine nudging community members to align their consumption profile with local production. The authors Thaler and Sunstein coined the term "nudge", referring to any aspect of the decision environment "that alters people's behaviour -( -1)

simulation steps. For the rest, the OPEX is given by the product of grid + in kWh and grid in kgCO -eq/kWh.

grid

Solar panels are subject to aging with PV ( ) which decreases power production each year. grid -( ) ≥ 0 ∀ ∈ is a variable representing "negative" imports which is necessary to maintain the energy balance. This variable is minimized as a result of minimizing grid + ( ). In addition, grid + ( ) is constrained to match a self-sufficiency target over the horizon of the optimisation.

On the storage side, ( ) is constrained to model battery charging and discharging.

Where and represent charging and discharging efficiency. We assume that the initial and final state of charge must be equal. Further, we make the assumption that batteries can fully be charged or discharged in two hours, thus we set power limits to half of the battery capacity. Battery ( ) is limited to % of the full battery capacity in order to ensure an -years lifetime with corresponds to daily cycles.

The next constraint prevents batteries from having CO arbitrage activities beyond the solar panel production at , e.g., charging when grid emissions are low and discharging when they are high.

Finally, the last constraint ensures that battery aging is applied every year through the battery state of health ( ), except years 0 = 0, 1 = 8, and 2 = 16 when the optimisation decides to invest in new battery Solar panels is more always better capacities.

. What is the right number of solar panels? . For this example, load profiles, irradiance profiles, and GHG emissions from the grid are assumed invariant over the course of years. Although the methodology enables to take different profiles each year, we did not want to assume any direction with regards to load profiles and grid emissions in this example, i.e., reduction or increase. For capital CO costs associated with solar panels and batteries, we consider an average carbon impact of kgCO -eq/kWp for solar panels [ ], and kgCO -eq/kWh for batteries [ ].

[ ] J. Roulot and R. Raineri, "The impacts of photovoltaic electricity self-consumption on value transfers between private and public stakeholders in France