Allocation of locally generated electricity in renewable energy communities
Miguel Manuel de Villena, Sébastien Mathieu, Eric Vermeulen, Damien Ernst
AAUTHOR PREPRINT (SUBMITTED TO IEEE TRANSACTIONS ON POWER SYSTEMS) 1
Allocation of locally generated electricity inrenewable energy communities
Miguel Manuel de Villena, S´ebastien Mathieu, Eric Vermeulen, Damien Ernst
Abstract —This paper introduces a methodology to performan ex-post allocation of locally generated electricity among themembers of a renewable energy community. Such an ex-post allocation takes place in a settlement phase where the financialexchanges of the community are based on the production andconsumption profiles of each member. The proposed methodologyconsists of an optimisation framework which (i) minimises thesum of individual electricity costs of the community members,and (ii) can enforce minimum self-sufficiency rates –proportionof electricity consumption covered by local production– on eachmember, enhancing the economic gains of some of them. Thelatter capability aims to ensure that members receive enoughincentives to participate in the renewable energy community. Thisframework is designed so as to provide a practical approach thatis ready to use by community managers, which is compliant withcurrent legislation on renewable energy communities. It computesa set of optimal repartition keys, which represent the percentageof total local production given to each member – one key permetering period per member. These keys are computed basedon an initial set of keys provided in the simulation, which aretypically contractual i.e., agreed upon between the member andthe manager the renewable energy community. This methodologyis tested in a broad range of scenarios, illustrating its ability tooptimise the operational costs of a renewable energy community.
Index Terms —Renewable energy communities, local electricityproduction, repartition keys, distributed generation. N OTATION
Sets T Set of market periods { , . . . , T } I Set of REC members { , . . . , I } Parameters A t,i Initial allocation of production C t,i Consumption C nt,i Netted consumption K t,i Initial repartition keys P t,i Production P nt,i Netted production
SSR mini
Minimum self-sufficiency rate X t,i Maximum allowed key deviation ξ bi Purchasing price imports ξ si Selling price exports ξ l − i Local price imports ξ l + i Local price exports ξ di Price of deviations from A t,i Decision variables a t,i Optimised allocated production a + t Positive deviation from A t,i M. Manuel de Villena, S. Mathieu and D. Ernst are with the Departmentof Electrical Engineering and Computer Science, University of Li`ege, Li`ege,Belgium. e-mail: { mvillena, smathieu, dernst } @uliege.beE. Vermeulen is with haulogy, Braine-le-Comte, Belgium. e-mail:[email protected] a − t Negative deviation from A t,i k t,i Optimised repartition keys ssr i Coverage rate v t,i Verified allocated production y t,i Locally sold production
I. I
NTRODUCTION O NE of the most widely accepted trends in the pathtoward the de-carbonisation of the electricity sector isthe decentralisation of electricity generation assets. This trendchallenges common practices in power system operations,where consumer-centric electricity markets now play a keyrole [1]. Among these new potential markets is the energycommunity, naturally stemming from the empowerment offinal consumers which, according to [2], have made commu-nity energy an effective and cost-efficient way to meet theenergy needs of citizens. An energy community is a consumer-centric electricity market where several community membersmay exchange, among themselves, electricity produced fromtheir own generation assets. According to some authors, themain barrier to developing these communities is the lack ofsufficient legislation ensuring their viability [3], [4]. Aware ofthis issue, regional, national, and supra-national authorities arecreating new legislations and frameworks that enable the emer-gence of these energy communities. The European Parliament,in the 2018/2001 directive [5], introduced a series of legalnotions such as the renewables self-consumer (or prosumer),and the renewable energy community (REC). According tothis directive, all customers are eligible to participate in anREC while maintaining their previous status as final customersin a liberalised market, meaning that they are free to choosetheir retailer. Since any customer is, according to this directive,entitled to become prosumer, RECs may be composed ofconsumers, prosumers, or generation assets owned by theREC. In this context, RECs are managed by a central entity:the energy community manager (ECM).Following the latest regulation developments on RECs, themain role of ECMs is to compute the allocation of locallygenerated production among the REC members, and to com-municate it to the distribution system operator (DSO) ex-post ,i.e., after physical delivery of electricity. This allocation oflocal generation is computed by the ECM by means of what isknown as repartition keys. These keys represent the proportionof available local electricity production –after-the-meter– thatis allocated to each of the REC members. After computingthese keys, the ECM communicates them to the DSO, whichmodifies the meter readings of the REC members accordingly.The electricity flows of each member are thus divided into two. a r X i v : . [ ee ss . S Y ] S e p UTHOR PREPRINT (SUBMITTED TO IEEE TRANSACTIONS ON POWER SYSTEMS) 2
The first one corresponds to the local production associated toeach member, which is used by the ECM to produce the localelectricity bill. The second one corresponds to the demandthat is not covered by local production, which is sent to themembers’ retailers to process the rest of the billing. Such aconcept is used by the French [6] and Walloon (region ofBelgium) regulation [7]. Moreover, other European countriesare adopting similar legislative decisions [8].Using repartition keys to modify the meter readings of RECmembers affects their self-sufficiency rates (SSRs). In thiscontext, SSR represents the proportion of total consumptioncovered by local production, for each member. The fractionof the total consumption not covered by local productionmust be supplied by retailer contracts. The proportions ofconsumption supplied locally (SSR) and by the retailer (100%- SSR) have different prices associated. Both retailer and localREC price comprise commodity, distribution, transmissionand taxes, however, as per current European regulations, theDSO may offer a discount on the distribution component ofthe local REC price. This is why maximising the use oflocal production, that is, the SSR of the REC members, iseconomically beneficial for them. Hence, computing the SSRsof the members is crucial since it directly relates to theireconomic gains for participating in an REC.According to regulation, a contract between the ECM andeach REC member must be set, depending on which, therepartition keys are computed. This computation is a two-step process. First, an initial set of repartition keys are agreedupon between both parties, by signing a contract. Theseinitial keys may be proportional to the investments of themembers on generation assets. Second, the actual repartitionkeys are computed with some general objective, for instancethe minimisation of the electricity bills of REC members. Thedeviations of the actual keys from the initial ones can belimited by contract i.e., the actual keys might be forced to bearound the initial ones with a tolerance, for example, of 10%.If no initial keys are set by the contract, or if the maximumtolerance is 100%, the set of actual keys behave as though noinitial keys were set, simply optimising the general objective.The main contribution of this paper is to provide a method-ology to compute actual repartition keys based on a setof initial ones, allocating the local electricity generation ofan REC among its members, accordingly. This methodologyrelies on an optimisation framework targeting a cost minimi-sation which is ready to use by ECMs, offering the necessaryflexibility to be compliant with current regulations. In the restof the paper the actual keys are referred to as optimised keys.After this introduction, Section II reviews the relevant liter-ature on this topic. The repartition keys assignment problemis stated in Section III. This problem is cast as a linearoptimisation program in Section IV. Section V demonstratesand discusses the capabilities of this optimisation on differentuse cases. Finally, Section VI concludes.II. L
ITERATURE REVIEW
The current literature dealing with decentralised, consumer-centric electricity trading can be broadly divided into two groups: trading in a peer-to-peer (P2P) fashion and tradingthrough a central entity. A substantial amount of work has beenpublished on the former. Two literature reviews, [9] and [10],present an overview of P2P markets. The first one explainschallenges and provides recommendations for these markets,whereas the second one focuses on energy management usinggame theory. A more recent work, [11], presents an assessmentof the behaviours of prosumers under a P2P paradigm. Thisabundant literature, however, cannot be easily applied becauseof the direction taken by current regulations, which define acentral planning entity, the ECM.With regards to trading through a central planner, the liter-ature is significantly less abundant and detailed, in particularwhen it comes to describing consumer-centric markets suchas RECs. In [12], the authors present a community-basedapproach to future electricity markets. An REC is presentedwhere the ECM acts as the interface between communitymembers and the market. In this community, members donot interact with their retailers but rather with the ECM,who has the ability to compute and offer electricity pricesto them. Another work, [13], introduces a benevolent plannerthat maximises the welfare of the community, redistributingrevenues and costs among the REC members so that noneof them are penalised as a result of being in a community.This problem is cast as a bi-level optimisation where thelower level solves the clearing problem of the communityand the upper level shares the profits among the entities. In[14], flexibility bids from flexible consumers in an REC areoffered to the ECM, who then selects and activates them toincrease the welfare of the community. An approach basedon game theory is presented in [1], where the authors presentan analysis on the viability of RECs. This paper stresses theimportance of correctly allocating the costs and benefits amongthe participants, proposing a sharing rule of the gains basedon both local production and consumption, as opposed to onlyproduction as it is usually done. The authors in [4] claim thatbenefits for RECs stem from reductions on the network costas well as reductions on retailer costs, highlighting that properprice schemes may lead to substantial savings.Whilst these papers offer different approaches to managingan REC, they all address the problem of scheduling theelectricity exchanges within the REC, and between the RECand the grid, disregarding the settlement phase occurring afterphysical delivery due, for instance, to forecast errors. Thispaper aims to fill this gap, completing existing methods. Notethat the settlement proposed in this paper considers that thecustomers maintain their contracts with their retailers, whereasin the existing literature the ECM often provides all marketinteractions, therefore acting as a retailer. Current regulation,nonetheless, dictates for the ECM to be a mere facilitator ofthe internal exchanges of an REC, without being a retailer [5].III. P
ROBLEM STATEMENT
To allocate the available local production injected into thegrid among the REC members, the presented methodologymust compute one repartition key per member and meteringperiod. The metering period is defined as the meter’s reso-lution, e.g., 15 minutes. Repartition keys are computed with
UTHOR PREPRINT (SUBMITTED TO IEEE TRANSACTIONS ON POWER SYSTEMS) 3 this resolution. These keys represent the proportion of localproduction injected into the grid from which each member canbenefit, directly impacting on their SSRs. In addition to themetering period, a reporting period can be defined, comprisingseveral metering periods. The presented methodology thereforecomputes repartition keys for all metering periods in onereporting period. Let T = { , . . . , T } denote the set of allmetering periods in a reporting period where T is the reportingperiod duration. Accordingly, the metering period is definedby the intervals ( t, t + 1] contained in the reporting period T .In addition, a set of I REC members is defined as I = { , . . . , I } . These members are characterised by their totalproduction (if any) and consumption profiles, given as time-series with a resolution equal to the metering period, andspanning the reporting period. Since REC members may beprosumers, that is, they may consume or produce electricityalong the reporting period, their consumption per meteringperiod must be netted. This is done to subtract the behind-the-meter production of these members. The consumption andnet consumption are denoted by C t,i and C nt,i , respectively.Similarly, the production must be netted to account for anybehind-the-meter consumption. The production and net pro-duction are denoted by P t,i and P nt,i , respectively. C nt,i = max { , C t,i − P t,i } ∀ ( t, i ) ∈ T × I , (1) P nt,i = max { , P t,i − C t,i } ∀ ( t, i ) ∈ T × I . (2)Commonly, producers sell part of their netted production tothe community, which may not be able to consume it all. Thelocal production sold by REC member i at metering period ( t, t + 1] is denoted as y t,i and bounded by P nt,i : y t,i ≤ P nt,i .As stated in the introduction, the challenge of computingrepartition keys involves using a set of initial keys agreedupon between the REC members and the ECM. These initialkeys are given by K t,i , and represent the initial allocation ofthe available local production (whatever it is). They are setdepending on the REC and the different agreements betweenECM and REC members. For instance, in the case of an RECwhere the generation units are deployed thanks to an initialinvestment of all REC members, the initial keys could be setas the share of each member of the total investment of theREC. If, on the other hand, there is no initial investment, theinitial keys may indicate the initial quantity of local productionpromised by the ECM to the REC members.In this context, this paper introduces a methodology tocompute an optimal set of repartition keys, represented by k t,i , which are based on the initial ones. This computation ofoptimal keys aims at minimising the sum of individual billingelectricity costs of the REC members, which are determinedby their electricity bill, expressed as: B t,i = ξ bi · (cid:0) C nt,i − v t,i (cid:1) + ξ l − i · v t,i − ξ l + i · y t,i − ξ si · (cid:0) P nt,i − y t,i (cid:1) ∀ ( t, i ) ∈ T × I , (3)where ξ bi is the overall price for electricity including distri-bution, transmission, energy price, and taxes for member i ;and ξ si is the price at which member i sells any electricitysurplus to the retailer. Similarly, ξ l − i is the electricity priceinside the REC, including taxes, local distribution (which may also include a fee for the transmission system operator), andenergy price; and ξ l + i is the selling price of electricity whenit is sold within the REC. Finally, v t,i represents the verifiedallocated production, which is discussed later in this section.To compute the optimal set of keys that leads to theminimisation of Equation (3), the methodology takes intoaccount three sets of constraints. The first set relates to themaximum allowed deviation of k t,i with respect to K t,i .Indeed, a tolerance around the initial set of contractual keys K t,i may be enforced, beyond which the optimal set of keys k t,i cannot deviate. Such a tolerance is given by X t,i : X t,i = | k t,i − K t,i | ∀ ( t, i ) ∈ T × I . (4)The second set of constraints defines the meter readings as-sociated to the optimal keys. First, with the initial keys and theoptimal ones, an initial allocation of available production andan optimal allocation of available production are computed,represented by A t,i and a t,i , respectively: A t,i = K t,i · (cid:88) i ∈ I P nt,i ∀ t ∈ T , (5) a t,i = k t,i · (cid:88) i ∈ I P nt,i ∀ t ∈ T . (6)The allocated production, however, is not necessarily the oneaccepted by the DSO to correct the meter readings. Forinstance, if the total net production ( P nt,i ) is greater thanthe total net consumption ( C nt,i ), Equation (6) may lead toallocations ( a t,i ) that are, in fact, larger than the total netconsumption. To avoid such situations, a final check computesthe verified allocated production v t,i , which takes the valueof the optimal allocated production or the net consumptiondepending on which one is smaller. In addition, the sum ofverified allocated production must be equal to the sum of localproduction sold over the set I , for each metering period: v t,i = min (cid:8) a t,i , C nt,i (cid:9) ∀ ( t, i ) ∈ T × I , (7) (cid:88) i ∈ I v t,i = (cid:88) i ∈ I y t,i ∀ t ∈ T . (8)The final set of constraints is related to the SSRs of the RECmembers, i.e. the fraction of the member’s net consumptionthat is covered by local production. That is, covered consump-tion divided by total consumption. The covered consumptionof member i is equal to the local production allocated to thismember, which is calculated as P t,i − y t,i + v t,i . However,since the allocated production may be greater than the totalconsumption C t,i , the covered consumption must be expressedas min { P t,i − y t,i + v t,i , C t,i } . In this last expression, if y t,i is positive, then P t,i − y t,i + v t,i is greater or equalthan C t,i , and therefore the expression can be simplified as min { P t,i + v t,i , C t,i } . Consequently, the SSR of member i isgiven by: ssr i = (cid:80) t ∈ T min { P t,i + v t,i , C t,i } (cid:80) t ∈ T C t,i ∀ i ∈ I . (9)Furthermore, a minimum SSR may be enforced so that the ssr i is increased for some REC members, enhancing theireconomic gains. This constraint, nonetheless, can potentially UTHOR PREPRINT (SUBMITTED TO IEEE TRANSACTIONS ON POWER SYSTEMS) 4 increase the sum of the electricity bills of the members. An
SSR mini is thereby defined so that:
SSR mini ≤ ssr i ∀ i ∈ I . (10)IV. P ROBLEM FORMULATION
The problem of allocating locally generated production bymeans of repartition keys can be expressed as a linear program. min V ∈ V (cid:88) i ∈ I (cid:88) t ∈ T ( B t,i + ξ di · (cid:0) a + t + a − t (cid:1) ) (11)subject to a t,i = k t,i · (cid:88) i ∈ I P nt,i ∀ ( t, i ) ∈ T × I (12) (cid:88) i ∈ I v t,i = (cid:88) i ∈ I y t,i ∀ t ∈ T (13) y t,i ≤ P nt,i ∀ ( t, i ) ∈ T × I (14) a t,i − A t,i ≤ a + t ∀ ( t, i ) ∈ T × I (15) A t,i − a t,i ≤ a − t ∀ ( t, i ) ∈ T × I (16) v t,i ≤ a t,i ∀ ( t, i ) ∈ T × I (17) v t,i ≤ C nt,i ∀ ( t, i ) ∈ T × I (18) (cid:88) i ∈ I k t,i ≤ ∀ t ∈ T (19) k t,i − K t,i ≤ X t,i ∀ ( t, i ) ∈ T × I (20) K t,i − k t,i ≤ X t,i ∀ ( t, i ) ∈ T × I (21) SSR mini ≤ (cid:80) t ∈ T min { P t,i , C t,i } + v t,i (cid:80) t ∈ T C t,i ∀ i ∈ I (22)where the decision space of variables is V = (cid:0) k t,i , x + t,i , x − t,i , y t,i , a t,i , v t,i , a + t , a − t , ssr i (cid:1) , with k t,i ∈ [0 , and y t,i , a t,i , v t,i , a + t , a − t , ssr i ∈ R + .The objective function (11) aims at minimising the sumof electricity bills of the REC members (see Equation (3) inSection III) as well as an additional term, which is introducedto deal with cases with multiple solutions to the optimisationproblem. This may, for example, occur when the sum of thenet consumption of the members of the REC is greater than thesum of the net production, and all members buy and sell energyat the same price to both retailers and REC. In such a context,this extra term favours a solution that distributes the localproduction equally among the REC members, something webelieve is desirable. Without this term, the allocation in thesecases would be uneven, favouring some users depending on theoptimisation solver numerical preferences. The fictive costs ξ di associated to this term must be low, e.g. less than 0.1 e /MWh,so that they will not lead to a solution that corresponds torepartition keys associated with larger billing costs.Equation (12) computes the optimised allocated production.Equation (13) sets the total allocated production equal to thetotal production sold by the REC members. Equation (14)limits the production sold to the total available production.Equations (15) and (16) compute the positive and negativedeviations of allocated production, respectively. Equations (17)and (18) limit the verified allocated production to the smallervalue between allocated production and demand. Equation (19) limits the sum of the repartition keys of the REC membersto 100%. Equations (20) and (21) compute the repartitionkey deviations. Finally, Equation (22) computes the self-sufficiency rate of every member and enforces a minimumself-sufficiency rate. This last equation may lead to infeasiblesolutions (by enforcing an unattainable SSR mini ), in whichcase new
SSR mini need to be defined by the ECM.Note that the numerator of Equation (22) is a linear form ofthe numerator of Equation (9). The two versions can be shownto be equivalent. Focusing on the numerator in Equations (9)and (22): If P t,i > C t,i , the net consumption C nt,i is null, andthereby v t,i = 0 as per Equation (18). In this case, the twonumerators become equal to min { P t,i , C t,i } . If P t,i ≤ C t,i ,the net consumption C nt,i is not null, more precisely C nt,i ≥ ,and thereby v t,i ≥ . Then, by definition of v t,i : v t,i ≤ C nt,i = C t,i − P t,i (23) P t,i + v t,i ≤ P t,i + C nt,i = C t,i . (24)As P t,i + v t,i ≤ C t,i , the numerator in Equation (9) becomes: min { P t,i + v t,i , C t,i } = P t,i + v t,i . (25)which is equal to min { P t,i , C t,i } + v t,i since P t,i ≤ C t,i .V. R ESULTS
This section introduces four different test cases as wellas a complexity analysis. The first and second test casesillustrate the functioning of the methodology for differenttime horizons and number of REC members. The third oneelaborates on the possibility to enforce a minimum SSR forthe REC members. The proposed methodology requires aninitial set of repartition keys from which an initial allocationof production is determined. How to compute these initialkeys is the subject of debate, therefore, the last test case (iv)analyses the impact of using different initial repartition keys.Furthermore, it also tests the constraint enforcing maximumrepartition key deviations ( X t,i ). In all test cases except forthe last one, the initial keys consist of a pro rata attributionaccording to each member’s average consumption, as shownin [1], [15]. The price signals are taken as ξ bi = 220 , ξ si = 60 , ξ l − i = 100 , ξ l + i = 98 and ξ di = 0 . e /MWh. A. Test case 1: performance on a simplified example
The first test case provides a simplified example to acquaintthe reader with the most important features of the tool. Thisexample features an REC with two pure consumers (User1and User2, in red), one pure producer (User3, in green) andone prosumer (User4, in orange). The optimisation horizonis two metering periods, the first one with more productionthan consumption, and the second with more consumption thanproduction. Table I presents the inputs used for this simulationincluding: (i) consumption which is positive for consumptionand negative for production; (ii) initial keys; and (iii) initialallocated production. Note that the units in this example arekWh. All these parameters are computed as a pre-process ofthe optimisation problem. By comparing the consumption andinitial allocated production in Table I, it can be seen that the
UTHOR PREPRINT (SUBMITTED TO IEEE TRANSACTIONS ON POWER SYSTEMS) 5 initial allocation of production is suboptimal. For meteringperiod one, albeit there is more total production than totalconsumption not all the REC members see their electricitydemand met, whereas for metering period two, the distributionof the local production leads to spillage in User4 and to under-supply in User1 and User2.TABLE I: Test case 1 – inputs.
Metering period User1 User2 User3 User4
Consumption2017-03-01 00:00 0.17 0.21 -0.50 0.082017-03-01 00:15 0.21 0.23 -0.30 -0.02Initial repartition keys2017-03-01 00:00 0.42 0.49 0.00 0.0892017-03-01 00:15 0.42 0.49 0.00 0.089Initial allocated production2017-03-01 00:00 0.21 0.24 0.00 0.042017-03-01 00:15 0.13 0.16 0.00 0.03This initial situation is then used by the optimisation prob-lem to recompute the keys. The results of this optimisation arepresented in Table II. In this table, an overall re-arrangementof the keys with respect to the initial ones can be observed.At metering period one, the keys for User1 and User2 aredecreased, whereas the key of User4 is increased. Conversely,at metering period two, the inverse flow occurs. The new setof keys leads to an optimal allocation of the production amongthe REC members by which any deficit of local production issupplied by the retailers, whereas any excess is sold to them.TABLE II: Test case1 – outputs.
Metering period User1 User2 User3 User4
Optimised repartition keys2017-03-01 00:00 0.39 0.45 0.00 0.162017-03-01 00:15 0.47 0.53 0.00 0.00Optimised verified allocated production2017-03-01 00:00 0.17 0.21 0.00 0.082017-03-01 00:15 0.15 0.17 0.00 0.00Production sold locally to the REC2017-03-01 00:00 0.00 0.00 0.46 0.002017-03-01 00:15 0.00 0.00 0.30 0.02Production sold to the main network2017-03-01 00:00 0.00 0.00 0.04 0.002017-03-01 00:15 0.00 0.00 0.00 0.00Additionally, Table II shows the distribution of local produc-tion: local sales (energy delivered to REC members) and globalsales (energy sold to the retailer). In the first metering period,local sales amount to 0.46, which is the total demand of the system. The production surplus (0.04), is sold to the retailer asglobal sales. In the second metering period, local sales are 0.30+ 0.02, which corresponds to the total available production.Since, at this metering period, there is greater demand thansupply, there are no global sales. The maximisation of globalsales observed in these results depends on the price signalsimposed in the simulation. In this case, since the sellingprice is the same for all producers, the optimisation cannotdiscriminate between them when allocating local and globalsales, and provides one of the possible solutions. However,this parameter can be adjusted in the optimisation (i.e. oneprice signal per producer), leading to a ranking of producers.
B. Test case 2: performance on a realistic example
This second analysis introduces a more realistic set-upwhere an REC with 23 net consumers and 1 net produceris simulated over one year of operation. Input consumptiondata corresponds to real measurements of small- and medium-volume electricity consumers in Belgium. The initial reparti-tion keys fed to the optimisation are based on a proportionalityprinciple of the annual consumption of the members withrespect to the total accumulated consumption of the REC. Themaximum key deviation X t,i allowed is not bounded.Figure 1 shows the electricity costs of all members withand without participation in an REC after the optimisation ofthe keys. In this figure, positive values imply a cost, whilstnegative values imply a revenue for the REC members. Forthis set of prices, deploying an REC reduces the electricitycosts of the members by around (some REC membersreach more than ).Fig. 1: Costs of the REC members. C. Test case 3: minimum SSR
The second test case showcases how the constraint imposinga minimum SSR works. This analysis makes use of the sameREC and price signals as in the previous test case.Figure 2 shows the SSR of the members of the REC,after running the optimisation with
SSR mini = 0% and
UTHOR PREPRINT (SUBMITTED TO IEEE TRANSACTIONS ON POWER SYSTEMS) 6 (a) Without minimum SSR bound. (b) With an enforced minimum SSR of
Fig. 2: SSR of the consumers after the repartition keys optimisation.
SSR mini = 42% . In this figure when no bound on the
SSR mini is imposed, the SSR of the members ssr i is freelyselected to minimise the global costs of the REC. The valuesof ssr i span from . for User20 to . for User21(see Figure 2a). As the problem is progressively tightened byenforcing more restrictive values of SSR mini for all the RECmembers, a transfer from the members with highest levels of ssr i to those with lower levels takes place. Upon reaching themaximum feasible value of SSR mini = 42% , a more uniform ssr i for all REC members can be seen (see Subfigure 2b).Note that for this example, enforcing an SSR mini greater than leads to an infeasible problem where the system doesnot generate sufficient local electricity to keep increasing it.Tightening the optimisation problem may decrease the averageSSR of all members, since some members are forced to giveup part of their ssr i to increase other members’ SSRs. In thisparticular example, the consequence is that the average SSR ofthe all REC members is eroded, decreasing from to .However, the same does not apply to the SSR of the REC, asthis SSR only depends on the total local production, and thisdoes not change by enforcing tighter values of SSR mini .Enforcing a minimum SSR has an impact on the electricitycosts of the REC members. Figure 3 illustrates the differencein costs caused by the enforcement of
SSR mini = 42% compared to the case where it is left free ( . ). This figureshows that members who are forced to give up their ssr i when enforcing an SSR mini , incur higher costs than beforeenforcing any
SSR mini and conversely for the others. Inparticular, the gains of REC members range from . forUser16 to . for User23, whereas the losses range from − . for User2 to − . for User20. D. Test case 4: impact of initial repartition keys
The last test case presented in this paper illustrates the im-pact of employing different initial repartition keys. Moreover, Fig. 3: Difference in the REC members costs, with and withoutenforcing any minimum SSR of .it also showcases the functioning of the constraint imposinga maximum key deviation. In this context, key deviations arerepresented by the difference between optimised and initialrepartition keys of each REC member ( k t,i − K t,i ). To performthis analysis, a smaller REC is selected, composed of sixmembers: five net consumers (User1 – User5) and one netproducer (User6). The simulation horizon is reduced to onemonth (April) because of the high number of runs required toperform the following analyses.This example tests different types of initial repartition keys: • Uniform: evenly distributed among the REC members –all members with positive net demand receive the samepercentage of the local production.
UTHOR PREPRINT (SUBMITTED TO IEEE TRANSACTIONS ON POWER SYSTEMS) 7 • Proportional static: Each member obtains a percentageof the local production which is proportional to theiraverage demand over the simulated period – each memberreceives a different initial key, constant over time. • Proportional dynamic: Each member obtains a percentageof the available local production which is proportionalto their instantaneous demand – each member receives adifferent initial key per metering period of the simulation.Table III lists the total consumption and production of thesystem and total allocated production achieved with the threetypes of initial keys. With the proportional dynamic keys, thelocal production is used up to more than with uniformkeys, and more than with proportional static keys.TABLE III: Allocated production for the different initial keys.
Total demand 37.50 MWhTotal local production 11.35 MWhAllocated production with uniform keys 5.02 MWhAllocated production with proportional static keys 6.85 MWhAllocated production with proportional dynamic keys 8.87 MWh
In the following, the evolution of several parameters overa range of maximum allowed key deviations X t,i given asparameters, is shown. The allowed deviations span from ,meaning that the optimised keys cannot deviate from the initialkeys, to , meaning that the optimised keys may deviate asmuch as needed, taking any value in [0 , . Since dynamic keyslead to the most optimal distribution between local and globalsales as long as the price ξ bi is the same for all members (i.e.,same retailer contract), the sales do not change for differentvalues of X t,i when these keys are implemented. For thisreason, the different parameter evolutions shown in the rest ofthis section do not contain the impact of using dynamic keys.This also indicates that dynamic keys are a suitable solutionwhen no other constraint is required, and purchasing prices ξ bi are similar across REC members.The individual costs of the REC members, for a rangeof X t,i from to , are shown in Figure 4. All netconsumers (User1 – User5) see their costs reduced as themaximum key deviation allowed becomes less restrictive. Thenet producer (User6) electricity revenue increases as the costsof the consumers decrease. In this case, positive values indicatenegative costs (or revenue), which increase by the givenpercentage. The variation in member’s costs in response toa relaxation of the maximum key deviation allowed results insimilar trends when using either uniform or proportional staticinitial keys. The extent of these variations is different though,being one order of magnitude larger for uniform keys. Thesavings of User1 – User5 for uniform keys span from to , whereas for proportional static they span from . to . The increase in gains of User6 is with uniform keysand with static keys. These differences prove that uniforminitial keys lead to a highly suboptimal solution compared toproportional static ones. This remark highlights the idea thatcreating keys that are proportional to the demand of the RECmembers seems to be a good practice, which concurs withcurrent practices [15]. C o s t e v o l u t i o n [ % ] Uniform initial keys
User1User2User3User4User5User6 C o s t e v o l u t i o n [ % ] Proportional static initial keys
User1User2User3User4User5User6
Fig. 4: Costs of the members for a range of maximum keydeviations ( X t,i ) relative to the costs when X t,i = 0 .A final analysis is presented in Figure 5, showing thedifference in allocated local production for different initialkeys and for a range of maximum allowed key deviations,relative to the initial situation when no deviation is allowed. Inthis last figure, the effect of relaxing the maximum allowed keydeviation is not shown for proportional dynamic keys since, asin Figure 4, the changes are negligible. The trends followed bythe members’ allocated production is similar for uniform andstatic keys. In both cases this trend is upward when relaxingthe value of maximum allowed key deviation. However, theextent is different, and the members involved too: while in theuniform keys case the allocated production increases for User1and User4 to in excess of , for static keys it only reaches for User3. The difference in these results stems from thedifferent demand profiles of the REC members. For User3,the average electricity demand is, on average, lower than forthe rest. Thus, when applying uniform keys, the allocatedproduction is sufficient to cover the demand of this member,since the percentage of allocation is the same for all of them.However, when applying proportional static keys, the initialallocated production given to User3 is low – it depends onaverage demand (which indeed is relatively low), but it has tocover instantaneous demand (which might be high). For thisreason, the initial solution does not provide enough supply toUser3 with static keys, and therefore the methodology mustincrease the optimised keys for this particular REC member. E. Complexity analysis
In the final section of the results, we present an analysis ofthe complexity of the methodology proposed. The number ofconstraints of the optimisation is N cons = 9 | T || U | + | T | + | U | and the number of variables N var = 17 | T || U | +2 | T | + | U | . Ta-ble IV introduces the running times for different complexities,ranging from 15 days with 10 REC members to one monthwith 100 members. The optimisation problem is implementedwith Pyomo in Python 3.8 and solved with the open sourcesolver CBC. Simulations are performed on a GNU/Linuxmachine with an Intel Core i7-8665U and 16 Gb of RAM. UTHOR PREPRINT (SUBMITTED TO IEEE TRANSACTIONS ON POWER SYSTEMS) 8 A ll o c . p r o d . [ % ] Uniform initial keys
User1User2User3User4User5User6 A ll o c . p r o d . [ % ] Proportional static initial keys
User1User2User3User4User5User6
Fig. 5: Allocated production of the REC members for a rangeof maximum key deviations ( X t,i ) relative to the allocatedproduction when X t,i = 0 .TABLE IV: Running times of the proposed algorithm. | T | | U | N cons N var Build time [s] Solve time [s]1,440 10 131,050 247,690 5.01 5.962,880 10 262,090 495,370 9.71 12.231,440 50 649,490 1,226,930 20.36 27.722,880 50 1,298,930 2,453,810 43.55 56.551,440 100 1,297,540 2,450,980 39.67 58.932,880 100 2,594,980 4,901,860 85.92 133.93
VI. C
ONCLUSION
This paper proposes a methodology to deal with the settle-ment phase of an REC to optimise the sum of electricity billsand to enforce minimum SSRs in some of the REC members– a methodology that is compliant with current regulationsand ready to use by an ECM. After physical delivery ofelectricity, the DSO permits modifying the meter readings.This implies that the financial flows of the REC members canbe determined in a settlement phase that changes the meterreadings, and that splits these flows into two: one directedto the ECM corresponding to electricity consumption withinthe REC; and another sent to the retailers corresponding tothe electricity consumption covered by a traditional retailingprocess. To modify the meter readings, this paper makes useof repartition keys , which represent the percentage of totallocal production provided to each member. The methodologypresented in this paper computes an ex-post allocation of localproduction in an REC by using these keys. The repartition keysare optimally computed by a linear program that minimisesthe sum of individual electricity costs of the REC members,and that may use an initial set of keys as starting point.This methodology enables, by adding the right constraints,the control of some parameters such as the self-sufficiencyrate of the REC members, or the deviations between optimisedrepartition keys and initial ones.Various test cases illustrate this methodology, testing thefunctioning of the optimisation framework as well as itsparameters. Such tests show that this methodology results inan allocation of local production that leads to lower opera-tional costs than when no REC is established. Moreover, thisapproach can be used to enforce minimum self-sufficiency rates on the REC members, enhancing the economic gains ofsome of them that might, otherwise, be left without sufficientallocated production by a traditional global welfare optimi-sation. Finally, simulation results indicate that using initialkeys consisting of a pro rata attribution of each REC memberinstantaneous consumption is a good practice when the retailelectricity price of all of them is similar. The methodologypresented in this paper has been tested and is currently beingimplemented by haulogy in different REC managed by them.After discussing the settlement phase, a more comprehen-sive standpoint where the control of the REC is also accountedfor is a potential way to expand our work. In addition, chargesbased on peak power consumption that better reflect the costsof withdrawing electricity from the distribution network mightbe implemented in this framework.A
CKNOWLEDGEMENT
This research is supported by haulogy and the PublicService of Wallonia in the framework of the haulogy 2021R&D program launched by haulogy who publishes softwarefor energy communities.R
EFERENCES[1] I. Abada, A. Ehrenmann, and X. Lambin, “On the viability of energycommunities,”
The Energy Journal , vol. 41, no. 1, pp. 113–150, 2020.[2] M. M. Sokołowski, “European law on the energy communities: A longway to a direct legal framework,”
European Energy and EnvironmentalLaw Review , vol. 27, no. 2, pp. 60–70, 2018.[3] E. Heaslip, G. J. Costello, and J. Lohan, “Assessing good-practiceframeworks for the development of sustainable energy communities inEurope: Lessons from Denmark and Ireland,”
Journal of SustainableDevelopment of Energy, Water and Environment Systems , vol. 4, no. 3,pp. 307–319, 2016.[4] V. M. Reijnders, M. D. van der Laan, and R. Dijkstra, “Energycommunities: a Dutch case study,” in
Behind and Beyond the Meter .Elsevier, 2020, ch. 6, pp. 137–155.[5] European Union, “Directive 2018/2001 of the European Parliament andof the Council of 11 december 2018 on the promotion of the use ofenergy from renewable sources,”
Official Journal of the European Union ,vol. 328, pp. 82–209, 2018.[6] Code de l’´energie Franc¸ais, “Article D315-6, cr´e´e par D´ecret 2017-676du 28 avril 2017 - art. 2,” 2017.[7] Service public de Wallonie, “Mai 2019 – D´ecret modifiant les d´ecrets des12 avril 2001 relatif l’organisation du march´e r´egional de l’´electricit´e,du 19 dcembre 2002.” May 2019.[8] S. Torabi Moghadam, M. V. Di Nicoli, S. Manzo, and P. Lombardi,“Mainstreaming energy communities in the transition to a low-carbonfuture: A methodological approach,”
Energies , vol. 13, no. 7, p. 1597,2020.[9] T. Sousa, T. Soares, P. Pinson, F. Moret, T. Baroche, and E. Sorin,“Peer-to-peer and community-based markets: A comprehensive review,”
Renewable and Sustainable Energy Reviews , vol. 104, pp. 367–378,2019.[10] W. Tushar, C. Yuen, H. Mohsenian-Rad, T. Saha, H. V. Poor, and K. L.Wood, “Transforming energy networks via peer-to-peer energy trading:The potential of game-theoretic approaches,”
IEEE Signal ProcessingMagazine , vol. 35, no. 4, pp. 90–111, 2018.[11] U. J. Hahnel, M. Herberz, A. Pena-Bello, D. Parra, and T. Brosch, “Be-coming prosumer: Revealing trading preferences and decision-makingstrategies in peer-to-peer energy communities,”
Energy Policy , vol. 137,p. 111098, 2020.[12] F. Moret and P. Pinson, “Energy collectives: a community and fairnessbased approach to future electricity markets,”
IEEE Transactions onPower Systems , vol. 34, no. 5, pp. 3994–4004, 2018.[13] B. Corn´elusse, I. Savelli, S. Paoletti, A. Giannitrapani, and A. Vicino,“A community microgrid architecture with an internal local market,”
Applied Energy , vol. 242, pp. 547–560, 2019.
UTHOR PREPRINT (SUBMITTED TO IEEE TRANSACTIONS ON POWER SYSTEMS) 9 [14] M. Manuel de Villena, I. Boukas, S. Mathieu, E. Vermeulen, andD. Ernst, “A framework to integrate flexibility bids into energy com-munities to improve self-consumption,”
Proceedings IEEE GeneralMeeting , 2020.[15] D. Frieden, J. Roberts, and A. F. Gubina, “Overview of emerging regula-tory frameworks on collective self-consumption and energy communitiesin Europe,” in2019 16th International Conference on the EuropeanEnergy Market (EEM)