Fair Energy Sharing in Local Communities: Dynamic Participation of Prosumers

A method optimizing dynamic participation of prosumers in local energy communities is proposed. First, an optimization model maximizing the social welfare is applied to a community including PV systems and battery storages. The PV generation is peer-to-peer traded within the community considering each prosumer’s individual willingness-to-pay for local PV generation. Dynamic participation is studied by adding a new prosumer and varying installed PV capacity and willingness-topay. The proposed method finds a new optimum of the extended community considering constraints limiting the deviation of each prosumer’s annual profits and GHG emissions after adding the new prosumer compared to the original community.

, it is necessary to reduce greenhouse gas emissions substantially (see [2]) by switching from a fossil-fuel based energy system to a renewable one. Electricity generation by photovoltaic (PV) systems plays a key role in this transition (see World Energy Outlook 2018 [3]). With an increasing number of on-site PV systems in particular, electricity generation is becoming more and more decentralized, where self-consumption of prosumers (consumer and producer of electricity at the same time) is an important factor of the PV systems' profitability. Load aggregation and sharing of PV generation between multiple prosumers can optimize the use of PV systems and increase self-consumption. Energy Communities (EC) are a great example for PV sharing going beyond the meter, in contrast to multi-apartment buildings (e.g. [4] and [5]) or microgrids, which are closed systems. ECs are attributed a great potential in the European Union's (EU) Clean Energy for all Europeans Package [6]. 1 By sharing PV generation in local communities, peer-topeer trading is emerging, see for example [9]. Integrating communities of small prosumers in the day-ahead and intraday market is studied in [10]. Incentives for prosumers to participate in energy communities or in peer-to-peer trading are found in [11], trading preferences and decision strategies in [12].
The present work puts strong emphasis on the role of different incentives for participation in energy communities. Therefore, an individual willingness-to-pay for the community's PV generation is introduced, which reflects to a certain degree the ecological (avoiding emissions) or economic (increasing profitability) preferences of prosumers.
The research question of this paper is to study changing EC compositions by phasing-in new prosumers. Energy communities are likely to include dynamic behavior of prosumers, which leads to the following main contributions of this paper: evaluated, which allows a better understanding of the long-term performance of ECs. • A new member is added to a small energy community and the characteristics of the new prosumer and their impact on the prosumers of the original EC are studied. • A method is proposed to find the optimal characteristics for a new member such that the new EC set-up satisfies all participants involved.

II. METHODOLOGY
The starting point is an arbitrary EC set-up with five members (consumers, prosumers with PV, prosumers with PV and battery storage), who are all connected to the public distribution grid. Participation in the EC is on a voluntary basis and in addition, each prosumer is characterized by an individual willingness-to-pay. A linear optimization model optimally allocates the PV generation within the community. The allocation mechanism is a peer-to-peer (PtP) trading concept considering the willingness-to-pay of each member of the EC. The set-up is then extended by adding a new prosumer, see Fig. 1. The impact of the new prosumer is evaluated varying two of the new prosumer's parameter, the willingness-to-pay and the PV system's installed capacity.

A. Optimization of the Energy Community
The linear optimization model FRESH:COM 2 is implemented in Matlab using Yalmip and Gurobi and is applied to different EC set-ups optimally allocating PV generation.

1) Social
Welfare and Willingness-to-Pay: The objective function of the optimization model is maximizing the social welfare SW of the EC. 3 The first part (I) of the welfare is represented by the community as a whole maximizing the community's self-consumption, hence minimizing the costs from buying outside of the community (from the retailer). Part II represents the peer-to-peer trading q share i,j,t within the community, i.e. optimally allocating PV generation between the members considering the willingness-to-pay wtp j,t of each prosumer: The willingness-to-pay of prosumer j is calculated by adding a premium, the product of an individual weighting factor w j (in EUR/tCO 2 ) and the time-variant marginal emissions e t of the wider electricity system (in kgCO 2 /MWh), on top of the retail electricity price p Gin : Note that the PV generation is shared within the community without preference for self-consumption. 4 2) Mathematical Formulation of the Optimization Model: According to the nomenclature at the beginning of this paper, the mathematical formulation of the linear optimization model can be summarized as follows. Equation (3), the objective function, maximizes the social welfare SW from (1). Load and PV generation constraints for each prosumer (the demand and PV production are considered inelastic in this work) are represented in (4) and (5), respectively, followed by constraints for the battery storages in (6)- (8). Non-negativity constraints of the decision variables are found in (9).
for all i, j ∈ I and t ∈ T . Network constraints are not considered in this approach.

B. Optimization of the New Prosumer
To study the effects of dynamic participation in energy communities, a new member is added to the original community set-up. Two parameters of the new prosumer are varied, the willingness-to-pay and the installed PV capacity. Finding the "optimal new prosumer", certain criteria are assumed for the community: • The objective is to find the optimum PV capacity and willingness-to-pay of the new prosumer by maximizing the social welfare of the extended community considering different values for the PV capacity and willingness-topay. • Given the new optimization results, the deviation of the annual profits and GHG emissions of each prosumer should not exceed certain limits compared to the optimization results of the original EC set-up: -The annual emissions of each prosumer i are calculated as: The emissions of each prosumer in the new set-up Emissions i,new should not exceed the old emissions by a certain percentage ε emissions : 5 (11) -The annual profits of each prosumer i are calculated by subtracting the expenses from the income: The new profits of each prosumer i should not decrease by more than ε prof it compared to the original profits P rofit i,old : 5 ε emissions , ε prof it ≥ 0 C. Implementation and Data 1) Prosumer Data: The proposed methodology is applied over a time period of a year to an arbitrary EC set-up situated in Vienna, Austria, consisting of five households, which is extended by one more prosumer, see Table II in the Appendix. The PV generation data is obtained from the open-source tool renewables.ninja ( [13], [14], [15]), with different size and orientation of the PV systems in Vienna. Two prosumers include battery storages 6 in their technology portfolio. The weighting factors w j for the willingness-to-pay vary between 0 and 100 EUR/tCO 2 . The households of the original setup are characterized by real-measured anonymized electricity demand data [16] varying from 3762 to 7700 kWh/year. The demand profile of the additional sixth prosumer is derived from so-called Synthetic Load Profiles 7 [17]. All time-variant input data is available on an hourly resolution.
2) Electricity Prices and Marginal Emissions: The retail electricity price p Gin is set to 0.20 EUR/kWh (Austrian average electricity price of 2019, see [18]). Subsidies or financial support for renewables (e.g. feed-in tariff) are not considered in this work, therefore the prosumers sell excess PV generation at the average Austrian-German spot market price of p Gout = 34.5 EUR/MWh, see [19]. The marginal emissions of the Austrian-German spot market for the calculation of the willingness-to-pay in (2) can be found in [20].

A. Peer-to-Peer Trading of the Original Community
To understand the impact of a new prosumer on the EC, we need to look at the behavior of the original community set-up with five prosumers first. By applying the optimization model introduced in Section II-A, the purchases from the retailer are minimized by sharing within the community. How the PV generation is distributed (peer-to-peer traded) within the community is determined by the willingness-to-pay of each prosumer (see Fig. 2). Prosumer 5 does not have a PV system of their own and cannot sell anything to the other members, but due to their high w 5 they are strong buyers. The peak in Fig. 2 is prosumer 2 (highest willingness-to-pay) buying from prosumer 4 (lowest willingness-to-pay).
The full picture including annual purchases from the grid and battery operation can be seen in Fig. 3, also showing the percentage prosumers cover their total demand with purchases from the community on the right axis.

B. Adding a new Prosumer
Next, a new prosumer is added to the original EC set-up of five prosumers. We vary the PV system capacity of the sixth prosumer between 0 and 10 kW in 2 kW steps and the willingness-to-pay among w 6 ∈ {0, 50, 100} EUR/tCO 2 to study the impact on the members of the original EC. First, the social welfares of the new scenarios are compared to the social 6 Charging and discharging efficiencies: η B = 0.9; maximum (dis)charging power: q Bmax i = 1 kW; minimum state of charge: SoC min i = 0 kWh. 7 Normalized load profile H0 for households  Electricity demand in kWh Self-consumption Battery discharging Buying from the community Buying from the grid PV consumption to demand ratio Fig. 3. Prosumer electricity demand is covered by PV self-consumption (yellow), battery operation (purple), PV generation from the community (green) and electricity from the grid (blue) -left axis; PV consumption to demand ratio -right axis welfare of the original EC, see Fig. 4. The highest increase can be seen for a PV capacity of 10 kW and a willingness-topay of 100 EUR/tCO 2 . The strongest decrease on the other hand, is on the opposite side of that spectrum. Next, the peer-to-peer trading of the prosumers is compared in Fig. 5 for two different scenarios: High willingnessto-pay, but no installed PV capacity of the new prosumer (left) and low willingness-to-pay and high installed capacity (right). Comparing Fig. 5 with the original EC in Fig. 2 Fig. 5. Peer-to-peer trading for two different scenarios: Prosumer 6 has a high willingness-to-pay (w 6 = 100 EUR/tCO 2 ) and no installed PV capacity (P V = 0 kW) -left; Prosumer 6 has a low willingness-to-pay (w 6 = 0 EUR/tCO 2 ) and high installed PV capacity (P V = 6 kW) -right amount of PV generation purchased/sold by the community members has changed, e.g. less purchases by the original EC members in Fig. 5 (left) and less sales for the original EC members in Fig. 5 (right). Consequently, the annual emissions and profits of the prosumers, see (10) and (12) respectively, might change unfavorable to some prosumers. The percentage increases/decreases in profits and emissions of each of the five original prosumers are plotted in Fig. 6 depending on the PV capacity added by the new prosumer. The percentage deviation of the profits in Fig. 6 (top) shows that some prosumers can boost their income, while others might "lose" with increasing PV penetration of the new prosumer. The emissions in Fig. 6 (bottom) increase when there is only a small or no PV capacity installed, else they naturally decrease.

C. Finding the New Prosumer's Optimum
With the insights gained from Fig. 6, different values of ε prof it and ε emissions to limit the deviation of P rofit i,new and Emissions i,new from P rofit i,old and Emissions i,old are investigated. The proposed values are: • Profits: ε prof it ∈ {0, . . . , 2}, with ε prof it = 0 as the most stringent constraint, not allowing any decrease in profits at all, and ε prof it = 2 allowing the profits to decrease by up to 200%.
• Emissions: ε emissions ∈ {0, . . . , 0.2}, with ε emissions = 0.2 allowing emissions increases up to 20%. The results from finding a maximum social welfare varying the constraints can be summarized as follows. A tight profit constraint leads to a low social welfare, see Fig. 7 and no installed PV capacities of the new prosumer, see Table I. When adding a tight emission constraint too, the problem becomes infeasible, not allowing any configuration of a potential new prosumer. Allowing for loose constraints and risking unfavor- able outcomes for a few prosumers helps increasing the joint optimum, the social welfare of the whole energy community. Note that it is assumed that prosumers with a high willingness-

IV. CONCLUSION
Dynamic phase-in and phase-out of prosumers, or prosumers changing their behavior (annual electricity demand or willingness-to-pay), is necessary to consider when analyzing the economics of energy communities (EC). Net present value analyses for PV systems and battery storages within energy communities should therefore not be static, because human behavior and economic circumstances are dynamic parameters. Changes on individual level (marital and employment status) or on community level (e.g. the neighborhood's demographics) are likely to happen over a time period of 10 to 15 years.
Due to the voluntary participation in energy communities, members have various incentives to join the community. These incentives are reflected in the willingness-to-pay and mainly concern the preference to avoid emissions from the grid or to increase the profitability of PV installations with the help of peer-to-peer trading.
In this work, a relatively small EC with five prosumers was analyzed, which means that changes in the composition of the community can have a strong impact. These changes could result in individual prosumers no longer benefiting from the EC as they originally did, e.g. due to lower annual revenues or not being able to meet a significant part of their electricity demand with local PV generation anymore. This could be prevented by introducing certain criteria for new prosumers, as proposed in this work.
The approach shown in this paper sets certain limits, such that a potential new prosumer is discarded as soon as the constraints are violated. These limits are the same for all prosumers, but could also be individual. Our approach is similar to a veto approach, where the criteria of each individual prosumer must be met. This can (especially for larger ECs) lead to difficulties in finding suitable new members. For larger communities, a majority vote would be appropriate whether a new prosumer may participate or not.
Future work in this field might include more parameters of a potential new prosumer in the optimization task, adding annual electricity demand and battery storage capacity to PV capacity and willingness-to-pay. This way, a criterion will be introduced, which tells an existing EC whether a new member is a suitable addition or not.