Skip to main content

Modelling renewable energy communities: assessing the impact of different configurations, technologies and types of participants



Energy communities (ECs) have emerged as a solution to support governments mitigating climate change and comply with decarbonization goals, while introducing end-users on the energy value chain. In this paradigm, citizens have an active role in reducing electricity demand from the utility grid, by generating, sharing and/or trading locally generated renewable energy, such as solar energy. However, the economic and environmental outputs of energy communities are dependent on a variety of factors, such as technology features (renewable energy generation, existence of flexible equipment and/or energy storage systems), types of participants (consumers and prosumers with different electricity intensity and load profiles), and electricity sharing/trading agreements. As such, assessing the impact these will have on delivering benefits to the energy community and its participants is of paramount importance.


This work models different energy communities’ design typologies in Lisbon, Portugal considering different types of consumers with heterogenous electricity demand profiles and willingness to participate, multiple technology deployment scenarios (solar systems installation, batteries, and electric vehicles), and electricity trading (collective self-consumption versus peer-to-peer trading).


Results demonstrate community electricity cost savings are up to 42%, with self-sufficiency rate up to 12.5%, which is considerably low due to the participation of high demanding sectors (such as industry or retail). At participants’ individual level, electricity costs savings can reach 48% and 53%, for residential consumers and prosumers, respectively, while for high-demanding participants are slightly lower: 43% for hotel, 44% for retail, 13% for industry and 5% for university. Individual self-sufficiency rates register highest results for the residential prosumers (35% for PV prosumers, 28% for PV + electric vehicles and 54% with PV + batteries) while for other participants results fall between 6% (retail) and 26% (industry).


We conclude that for ECs deployment, individual PV self-consumption assets are not sufficient, thus greater PV sizes and higher adoption rates should be considered, according to consumer and prosumers shares. The share/trade of PV surplus, paired with competitive aggregation tariffs results in positive economic and environmental outputs, for the majority of both consumers and prosumers.


More than 80% of the world’s energy is still produced via fossil fuels [1]. European cities are responsible for 80% of the overall EU energy consumption, while its buildings account for 40% of total energy use and 36% of Europe’s CO2 emissions [2]. Cities have an increasingly important role regarding energy consumption, as by 2050, it is expected that 66% of the world population will be living in urban areas [3]. Aiming to address the needed energy transition and comply with the Paris Climate Agreement, distributed renewable energy sources (DER) have been emerging in the last decades, representing already 36.6% of the renewable electricity installed capacity worldwide [4].

In this context, the Clean Energy Package for All Europeans [5], with the 2018/2001 RED II and 2019/944 ED directives, introduced the possibility of establishing Renewable Energy Communities (REC) and Citizen Energy Communities (CEC), respectively. While the first one focuses on renewable energy, the second refers only to electricity and has as primary goal to deliver environmental, economic or social benefits for its members. Independently of the differences on their legal form [6], Energy Communities (ECs) allow, in a broader sense, consumers, producers and prosumers (consumers that are simultaneously producers) to be aggregated in a common virtual electricity meter, in such way that the energy produced within the community can be distributed, shared or traded, between the participants. ECs might increase the public acceptance of renewable energy projects, while potentially providing advantages to citizens by improving energy efficiency and lowering electricity bills [7].

At the same time, the idea of local electricity markets (LEM) has also evolved together with energy communities, allowing for users’ aggregation, sharing and/or trading local energy generation and granting better retail tariffs [8]. In this context, peer-to-peer (P2P) electricity markets have emerged as one LEM architecture, consisting of a common platform, operating as a marketplace, where participants can perform direct energy transactions, without the requirement of an intermediary. It allows them to choose trading preferences, such as to whom they want to buy or sell energy, or at which price. As such, prosumers might generate higher profits when compared to solely injecting PV surplus in the grid, while consumers may purchase cleaner energy at possibly lower costs than they would from electricity utilities or retailers [9].

However, energy communities’ outputs depend on a variety of factors as their design and inherent motivations of participants, such as cleaner energy supply, regulatory incentives, energy autonomy, grid stability, or reducing electricity related costs [10]. Consequently, ECs’ individual and community economic and environmental gains might differ according to the LEM model implemented and to the type and number of participants, as well as the featured technologies (DER, flexibility, etc.). It is thus important to explore the design of energy communities, which pricing mechanisms or combinations of types of participants work best, to reveal the impact of energy communities on the needed decarbonization path.

Energy communities and peer-to-peer studies

Gui and MacGill analyse how clean ECs can, and will, operate in the future, by categorizing them in three typologies: Centralized, Distributed, and decentralized [10]. Taking a P2P EC as example, Sousa et al. categorized P2P market types in three: full P2P market, community-based market, and hybrid P2P market [11]. However, P2P electricity markets designs can also be categorized by the existence or not of an intermediary/aggregator. The aggregator gathers all the bids/offers from different peers and provide price signals to customers within the community. Yet, it should also allow customers to access more advantageous grid prices (as wholesale market prices or premium tariffs). This function is possible due to the aggregator’s scale and capacity to manage loads on the community, thus providing grid services, which can be competitive when compared to the tariffs offered by electricity retailers. The minimization of community and individual costs, as also the increase of community self-sufficiency and self-consumption rate, are used frequently as Key Performance Indicators (KPI) to assess the outputs of ECs.

Several research works have been done regarding the aggregation of consumers in energy markets. Zepter et al. proposed the integration of prosumers in wholesale electricity markets using two-stage stochastic linear programming, aggregating participants in local P2P markets [12]. Ottesen et al. implemented also a two-stage stochastic mixed-integer linear program (MILP) on an EC market where the aggregator purchases and sells electricity of prosumers considering flexible properties through short-term decision-support models [13]. Results showcase that system flexibility increases with an aggregator bidding in the day-ahead market. In the same line, Iria et al. proposed a smart bidding strategy considering an aggregator of small prosumers operating also in the day-ahead market [14], with two-stage stochastic model. They report achieving 24% net costs savings compared with centralized market supply.

The pricing mechanism is also a matter of concern in a P2P energy trading market, as it aims for most participants to economically benefit from joining such markets. Several studies assess which pricing schemes would benefit participants the most, not only at individual but also at community level. A strategy where trading participants are randomly matched, and where sellers establish a minimum selling price while buyers set a maximum buying price is implemented in [15]. Following the matching, the difference between the minimum and maximum prices is the profit of the energy transaction within the auction. A P2P energy trading algorithm that maximizes the prosumers’ profits through dynamic pricing model, based on the supply and demand ratio (SDR) of PV electricity traded among prosumers, was designed by [16]. Kang et al. use a P2P pricing mechanism based on SDR and the optimization of social welfare [17], using an iterative double auction mechanism, and come to the same conclusion that not all prosumers will obtain the same level of profits in a P2P energy trading scheme.

To assure social welfare within the community [18], proposed two distinct user-centric pricing schemes concerning P2P energy trading in a residential microgrid, using an auction algorithm. The pricing procedure needs to be aligned with different demands, namely: economic efficiency (when compared to the usual grid trading), truthfulness and fairness (the accuracy of market-clearing price is given every 30 min), as well as customer incentives (to encourage the participation of distinct customers). Results demonstrate that, with P2P energy trading, savings from 5 to 15% are attained, with larger profits being provided for households with larger PV capacities.

ECs outputs will also be different when in presence of different technology features to “play” in the LEM, such as DER, flexible equipment, or energy storage systems. Neves et al. explored the interaction of a heterogeneous sample of consumers and prosumers, with distinct DER and demand flexibility, in a P2P platform versus an aggregator [19], to assess which energy trading scheme suited best each participant. In their work, participants can trade between peers at an agreed cost, while all community participants are exposed to wholesale market prices through an aggregator. A MILP model was applied to minimize the annual electricity costs, demonstrating annual savings for the P2P scenario up to 29% and 10%, respectively, for consumers with and without flexibility, while prosumers can save up to 113% and 83%, respectively, with and without flexibility. Long et al. proposes a two-stage aggregated control P2P optimization, obtaining savings of 12% for individual consumer’s electricity bills when comparing to the centralized grid market scenario [20]. Further, it showcases increases of 10–30% and roughly 20% in overall community self-consumption and self-sufficiency, respectively. The work from [12] displayed results for three different LEM cases: one where only energy storage systems are used, with savings in electricity bills up to 20%; another one, considering P2P energy trading, results in savings up to 34%; and a scenario implementing both energy storage systems and P2P, where savings reach 59%. In [21], a MILP optimization problem was formulated for residential PV and battery systems in a P2P energy trading market, in order to calculate the participants’ economic benefits. Results vary according to the type of participant considered: consumers can lower their costs by 4–9%, prosumers with PV solar systems have savings between 7 and 16%, prosumers with batteries may obtain savings in the range of 3–9%, while prosumers with both PV systems and batteries have their costs reduced by 3–19%. On the other hand [15], reports self-consumption rates of 38% and 52% for an energy community, respectively, without and with energy storage.

Contribution to the literature

Most studies focus on the comparison between LEM and the centralized grid scheme, with residential consumers and prosumers being the most analysed case studies. Results differ according to the local markets’ setups, with factors such as pricing mechanisms, DER implementation, existence of flexibility, consumer and prosumer electricity demand profiles, and energy trading shares, making it difficult to extrapolate clear dependencies on types of participants, and technology availability influence. To this purpose, in this work an EC model is designed taking into account distinct electricity load profiles, considering not only prosumers but also residential consumers and other high-demanding consumers, such as industries, universities or large retail units, each combined with different technology features, such as solar PV panels, electric vehicles (EVs) or battery energy storage systems (BESS) in different shares. Different local energy market setups are also tested, such as collective self-consumption with aggregation or P2P.

The EC model was implemented in Areeiro parish, in Lisbon, Portugal, using publicly available data and considering the existent infrastructure in that geographical area, i.e. the buildings’ geometry and rooftop characteristics, parking spots, etc. As such, the modelling framework can be applied to other parishes or similar geographical units, allowing for a systematized assessment framework of ECs’ economic and environmental gains. The innovative contribution of this work is to simultaneously quantify ECs’ energy, environmental and economic gains associated with different sets of ECs’ configurations, as a way to better understand its influencing parameters for the success of ECs and inform policymaking on the path for decarbonization.

The work is organized as follows: section Methods presents the EC modelling methodology, the case study, and the different studied scenarios, while section Results showcases the results. In section Discussion the results’ discussion is made, and finally in section Conclusions the conclusions and limitations of the work are drawn.


In this work an energy community model is designed to test different types of energy markets (such as P2P or CSC aggregation), considering participants from distinct economic sectors (both prosumers and consumers from residential, industrial, retail, accommodation, educational, and the electric mobility sectors), with different demand patterns and technological characteristics. The EC results are assessed by energy and economic Key Performance Indicators (KPI), having chosen the Areeiro parish, in Lisbon, Portugal, as case study.

Figure 1 presents the methodology flowchart of the EC modelling.

Fig. 1
figure 1

Methodology flowchart

To model the EC, we first start by detailing the modelling components, according to the existent technology features: solar PV generation (section Solar photovoltaic systems), electricity demand—that includes battery energy storage system (BESS) (section Battery energy storage systems modelling) and the electric vehicle (EV) (section Electric vehicles charging), and finally the EC energy trading model (section Local energy market model). For the modelling, we define the EC boundaries, and characterize and collect data for the case study area (section Case study characterization). According to collected data, we define types of EC participants and define different scenarios (section Scenario’s definition) to assess the impact of these multiple influencing features on the EC outputs.

The EC model was developed and implemented in MatLab [22], and the outputs assessed in economic and environmental terms, using the following KPIs:

  • Economic: net present value (NPV) and internal rate of return (IRR). Annual individual and community electricity costs/savings were also assessed; and,

  • Environmental: self-sufficiency rate (SSR) and surplus rate (SR), calculated according to [23]. Equivalent CO2 emissions savings were also computed, as well as the investment per ton of CO2 eq saved.

Technology features

The technology features refer to the technologies with which participants are available to participate in the community energy trading. Thus, in this study, we have chosen to implement solar PV systems, battery energy storage systems (BESS), and electric vehicles (EVs), whose functioning algorithms are detailed next.

Solar photovoltaic systems

Prosumers with PV panels can cover part of their electricity demand using privately generated renewable energy, as seen in Eq. (1):

$$\Delta {E}_{N}\left(t\right)={E}_{d{emand}_{N}}\left(t\right)- {E}_{{produced}_{N}}\left(t\right); \left\{\begin{array}{c}\Delta {E}_{N}\left(t\right)>0\to {E}_{demandN}^{PV}\left(t\right)\\ \Delta {E}_{N}\left(t\right)<0\to \left|{E}_{{surplus}_{N}}^{PV}\left(t\right)\right|\end{array}\right.,$$

where \({E}_{d{emand}_{N}}\left(t\right)\) is the initially demanded electricity by participant N at hour t, and \({E}_{{produced}_{N}}\left(t\right)\) is the hourly generated energy by PV solar panels. If \(\Delta {E}_{N}\left(t\right)\) is positive, it represents the imports from the grid, the EC or from a battery, and if negative, its absolute value represents the PV surplus injected either into the main grid, the EC or used to charge a battery.

Battery energy storage systems modelling

Battery energy storage systems (BESS) are assumed to be coupled with PV systems, being a private investment of each prosumer. As such, to avoid wearing by multiple charging/discharging from the community, we consider the prosumers would only charge BESS using their PV surplus, doing first an energy balance at prosumer level, and only after, providing their PV surplus to the community (or demanding energy from the community). This assumption took in account that the BESS sizing is made considering only the prosumer needs, thus its capacity to serve the community will be limited.

The modelling of the battery was divided into two stages: battery discharging—when the prosumer is demanding electricity and there is enough energy in the battery to allow a discharge; and battery charging—when the PV panels are producing more energy than the user requires, and the battery is not at maximum capacity. The battery state of charge (SOC) at hour t, \({Bat}_{N}\left(t\right)\), always obeys to Eq. (2):

$${Bat}_{N,min}\le {Bat}_{N}\left(t\right)\le {Bat}_{N,max} ; \left\{\begin{array}{c}{Bat}_{N,min}={Bat}_{N,nom}\times 0.2\\ {Bat}_{N,max}={Bat}_{N,nom}\times 0.9\end{array},\right.$$

where \({Bat}_{N,min}\) is the minimum SOC, \({Bat}_{N,nom}\) is the BESS nominal capacity of prosumer N, and \({Bat}_{N,max}\) the maximum SOC.

BESS discharging will occur when Eq. (1) is positive, and if SOC > \({Bat}_{N,min}\). Thus, for prosumer N, the discharge (\({Discharge}_{N}(t)\)) will be given by Eq. (3), by the minimum energy between the total electricity available in the battery (\({E}_{bat,N}(t)\)) and the electricity demanded at time t, after PV self-consumption (\({E}_{dem{and}_{N}}^{PV}\left(t\right)\)), accounting with the efficiency of discharge (\({\eta }_{discharge})\). The electricity supplied by the grid after the battery’s discharge for self-consumption (\({E}_{dema{nd}_{N}}^{PV+BESS}\left(t\right)\)), is given by Eq. (4):

$$\left\{\begin{array}{l}{Discharge}_{N}(t)=min\left({E}_{bat,N}\left(t\right),\frac{{E}_{dem{and}_{N}}^{PV}\left(t\right)}{{\eta }_{discharge}}\right)\\ {E}_{bat,N}\left(t\right)=min\left(\left({Bat}_{N}(t-1)-{Bat}_{N,min}\right)\times {\eta }_{discharge},{E}_{bat.N.MAX}\right)\end{array},\right.$$
$${E}_{dema{nd}_{N}}^{PV+BESS}\left(t\right)=max\left({E}_{d{emand}_{N}}^{PV}\left(t\right)- {Discharge}_{N}\left(t\right),0\right).$$

On the other hand, BESS charging will be observed when Eq. (1) is negative, meaning charging occurs when there is PV surplus, and SOC < \({Bat}_{N,max}\). If the available storage capacity in the battery is larger than the surplus (Eq. (5)), then all the PV surplus will be charged (Eq. (6)). The eventual surplus energy that BESS cannot store will be injected into the grid (Eq. (7)):

$${E}_{bat,N}\left(t\right)=min\left(\left(\frac{{Bat}_{N,max}-{Bat}_{N}(t-1)}{{\eta }_{charge}}\right),{E}_{bat.N.MAX}\right),$$
$${Charge}_{N}\left(t\right)=min\left({E}_{surplus,N}^{PV}\left(t\right)\times {\eta }_{charge},{E}_{bat,N}\left(t\right)\right),$$
$${E}_{surplus,N}^{PV+BESS}\left(t\right)=max\left({E}_{surplus,N}^{PV}\left(t\right)- {Charge}_{N}\left(t\right),0\right).$$

Electric vehicles charging

In the proposed methodology, the work from [24] was used to characterize the EV charging profiles, depending on the owner’s capacity to charge these vehicles. However, it was assumed only prosumers would possess EV charging capabilities since these would be among the early adopters for electric mobility.

Given that EV charging profiles differ according to weekdays and weekend days (Fig. 9 in the Appendix), the hourly electricity demand profile of an EV (\({E}_{EV})\) was calculated according to Eq. (8):

$${E}_{EV}\left(t\right)=RE\left(t\right)\times Av distance\times Ed,$$

where \(RE(t)\) is the hourly percentage of recharged energy, \(Av\, distance\) is the average distance travelled (48 km during weekdays, and 56 km during weekend days), \(Ed\) is the energy consumption per distance travelled, equalling to 0.151 kWh/km [24]. The charging profiles will differ depending on the participants’ characteristics, such as time of use, occupancy rate and the dimension of the parking lot. Hence, for the cases where EVs are considered, the participants’ electricity load profile with EV, \({E}_{d{emand}_{N}}^{EV}(t)\), will be given by Eq. (9):

$${E}_{d{emand}_{N}}^{EV}(t)={E}_{EV}(t)\times {(V}_{Vehicles,N}\times {OR}_{N}\times {EV}_{rate})+{E}_{{demand}_{N}}(t),$$

where \({V}_{Vehicles,N}\) is the number of vehicles that the participant’s N parking lot can fit, \({OR}_{N}\) is the member’s average yearly occupancy rate, \({EV}_{rate}\) is the rate of EV per total number of vehicles in Portugal.

Apart from EV owners, we also consider the public EV charging stations (existent in the streets) as an EC participant. Their electricity load is given by [25] and the load profile portrayed in Fig. 8.

Local energy market model

The possibility of energy sharing and trading is previewed in the RED II and ED EU directives that allow some degree of freedom of its transposition by each country. Although, at the implementation level, energy sharing and/or trading is still on demonstration phase, in this work we want to focus on testing the impact of implementing different trending local energy market models for ECs. As such, we modelled two types of LEMs: a collective self-consumption with aggregation and a P2P energy trading market. As a basis for comparison, we used the current centralized grid supply market paradigm, where consumers have their demand totally supplied by the main grid, paying a specific retail tariff \({\pi }_{N}(t)\) dependent on voltage level and hourly cycles (Eq. (10)), while prosumers may inject their surplus energy and get paid a certain revenue (\({R}_{N}(t)\)), calculated according to the Portuguese self-consumption regulation (Eq. (11)) [26]:

$${C}_{N}\left(t\right)={E}_{{demand}_{N}}\left(t\right)\times {\pi }_{N}\left(t\right),$$
$${R}_{N}\left(t\right)={E}_{{surplus}_{N}}^{PV}\left(t\right)\times \left(0.9\times {OMIE}_{m}^{avg}\right).$$

On the collective self-consumption with aggregation, the community collectively invests on local energy production systems. The electricity demand is firstly supplied by local energy generation, and when PV surplus sharing is not enough, electricity is provided by the main grid at a tariff arranged with the community’s aggregator (Eq. (13)). Electricity from the grid is paid at the aggregator’s grid access tariff (\({\pi }_{agg}^{access}(t)\)) plus the hourly wholesale market prices, while PV surplus is managed by the community manager and shared hourly within the community for free, proportionally to each participant’s hourly demand (Eq. (12)). This approach is in line with the primary purpose of citizen energy communities’ definition of the EU electricity directive 2019/944 [27] and the fixed sharing coefficients previewed by the Portuguese legislation [26], as further described in section Portuguese context. Accordingly, the electricity demand costs for the energy community’s participants are given by Eq. (14). Further, we assumed that the largest consumer on the EC acts also as aggregator, applying its grid access tariffs to the whole community when trading with the main grid:

$${E}_{d{emand}_{N}}^{agg}\left(t\right)={E}_{{demand}_{N}}\left(t\right)-{E}_{{surplus}_{T}}\left(t\right)\times {X}_{d{emand}_{N}}\left(t\right),$$
$${C}_{N}^{agg}\left(t\right)={E}_{d{emand}_{N}}^{agg}\left(t\right)\times \left({\pi }_{access}^{agg}\left(t\right)+{OMIE}_{h}\left(t\right)\right).$$

The P2P energy trading market considers the same aggregation factor, paying the electricity grid imports at the minimum grid access tariff between the two peers plus wholesale market hourly prices. However, as investments are now made privately by prosumers, the PV surplus generated by prosumers is sold between peers, at an agreed tariff (\({\pi }^{P2P}\left(t\right)\)) that will most likely benefit both parties (Eq. (15)). If, at some point, the tariff is not advantageous neither for consumer nor prosumer, it is assumed that consumers have their electricity supplied by the grid, while prosumers may inject the excess energy in the grid:

$${\pi }^{P2P}\left(t\right)=\frac{\left(\mathrm{min}\left({\pi }_{access}^{agg}\right)+{OMIE}_{h}\left(t\right)\right)+\left(0.9\times {OMIE}_{m}^{avg}\right)}{2}.$$

In the P2P energy market, the costs of P2P trades are given by Eq. (16), while the revenues obtained by prosumers in the P2P market are calculated via Eq. (17):

$${C}_{N}^{P2P}\left(t\right)=\left({E}_{{surplus}_{T}}\left(t\right)\times {X}_{d{emand}_{N}}^{F}\left(t\right)\right)\times {\pi }^{P2P}\left(t\right),$$
$${R}_{N}^{P2P}\left(t\right)={E}_{{surplus}_{N}}^{P2P}\left(t\right)\times {\pi }^{P2P}\left(t\right).$$

Thus, the yearly costs for consumer N in the P2P scenario are given by Eq. (18), while for prosumer N are given by Eq. (19):

$${C}_{consumer N}^{P2P scenario}(\mathrm{t})=\sum_{t=1}^{8760}{C}_{N}(t)+ \sum_{t=1}^{8760}{C}_{N}^{P2P}\left(t\right),$$
$${C}_{prosumer N}^{P2P scenario}(\mathrm{t})=\sum_{t=1}^{8760}{C}_{N}(t)+\sum_{t=1}^{8760}{C}_{N}^{P2P}(t)-\sum_{t=1}^{8760}{R}_{N}^{P2P}\left(t\right)-\sum_{t=1}^{8760}{R}_{N}\left(t\right),$$

where \({R}_{N}(t)\) is the revenue from the PV surplus injected in the grid if, even after the P2P trade, the prosumer still has PV surplus.

Case study characterization

The subject chosen in this case study to assess the feasibility of the energy community design was the parish of Areeiro, in Lisbon, Portugal, given the variety of types of participants and available data for the area.

Portuguese context

In Portugal the RED II and ED directives [5] were transposed by Decree Law 162/2019 [26] where the two REC and CEC concepts are merged in a broad energy community approach. Although EC roll out is just in its first steps, Decree Law 15/2022 [28] introduced more detail on EC regulation, by defining, for instance, for ECs up to 1 MW:

  • distance limits between participants to be aggregated on EC: 2 km for low-voltage participants, 4 km to medium voltage, and up to 10 or 20 km for high or very-high voltage participants);

  • PV surplus injected on the main grid: is paid at the monthly average of daily wholesale prices of the Iberian Market;

  • Tariff structure: when consuming from the grid, original retail tariffs can be kept, or EC participants can be aggregated in a large “virtual consumer” to benefit from a best retail tariff offer while aggregated;

  • Energy sharing coefficients: can be fixed, proportional to the demand of each participant; or dynamic, based on hierarchical criteria or real-time demand monitoring. No extra charges are applied on energy sharing;

  • Energy trading between peers: it is still not regulated, yet the regulation is open to pilot and demonstration projects to test innovative solutions on this field.

For the first cases of energy communities in Portugal, collection self-consumption is the sharing model that is being implemented. However, given the open door left for testing innovative solutions, and considering the potential that aggregation can bring in providing grid services and that P2P energy trading is a trending possibility for decentralizing local electricity markets, in this work these two typologies of energy communities are chosen to be explored and tested.

Data collection

Data collection was performed from public sources specifically for the parish of Areeiro, based on real-life existent buildings and demography, namely: rooftop available areas for PV deployment, solar availability, buildings and families’ characterization (for EC participants profiles purposes), and EV charging spots.

Types of participants and load profiles

Table 1 resumes the different types of buildings encountered on the case study area, which are the potential EC participants, as well the load profiles and retail tariffs used and corresponding sources. When defining EC scenarios in section Scenario’s definition, different rates of adoption per each type of participant will be considered.

Table 1 Types of participants and data sources

The considered daily average electricity demand profiles can be found in Figure 7, as well the retail tariffs in Table 8, both in the Appendix. The residential profile R1, being an average load, is a clean and smooth normalized profile which is the type of standardized data frequently used in modelling. However, to introduce more variability, real profiles of three different family types were introduced (R2 to R4). These were matched according to family types present on the case study area and, together with the number of households per building, were distributed accordingly to their shares, composing different overall building profiles.

PV panels and rooftop availability for its deployment

To characterize the rooftop availability to install PV solar systems, the rooftop available area, azimuth, and tilt of each building were calculated, using satellite images, via Google Earth [31] and the SOLIS platform [32]. For the residential and hotels’ buildings, typified rooftop areas were calculated using the average rooftop area on a certain delimited random sample (residential buildings) or the totality of considered buildings (hotels), while for the Industry, LRU and University the specific rooftop area of the buildings was used.

The PV systems were assumed to be 250 Wp polycrystalline panels, with fixed tilt and azimuth. The total possible number of PV panels to install on the buildings’ rooftops was calculated using the available rooftop area, the roof’s tilt (assumed 33°, corresponding to the optimum south panel facing tilt in Lisbon), and azimuth. On flat roofs, the same panels, tilt and azimuth were considered. PV production profiles were computed using the Renewables Ninja [33].

PV investment costs and discount rates were retrieved from previous solar PV projects researched in Portugal, considering an economy of scale (where high PV power panel installations have a lower relative cost), and adapted from [23, 34], as displayed in Table 9, in the Appendix.

CO2 emissions were assumed null when the consumed energy is supplied by PV panels, and of 349.8 g CO2eq/kWh when provided by the main grid, corresponding to the Portuguese average electricity generation emission factor for 2019 [35].

BESS characteristics

BESS characteristics such as charge and discharge efficiency, SOC, maximum electricity output, and expected lifetime were retrieved from the literature and are described in Table 11 in the Appendix. Investment costs were derived by a market analysis between BESS suppliers, retail cost and other online platforms where the systems’ costs were displayed, including the nominal capacity of each researched model, resulting in the values presented in Table 12 in the Appendix.

Given that currently there are no BESS deployed in the case study location, we had to perform the sizing according to each residential prosumer characteristics. Thus, for R1 profile, a criterion of 50% yearly average state of charge (ASOC) was implemented, as this profile exhibited significant PV surplus energy when compared to other prosumers, providing a stable utilization of the battery, both in terms of charges and discharge. However, for R2, R3 and R4 profiles, a minimization of annual costs optimization criterion was used. Table 2 displays the derived battery sizing for the four residential electricity prosumers, as well as the ASOC.

Table 2 BESS sizing for the residential sector
EV characteristics and charging availability

The assumed EV was the 5-door hatchback Nissan Leaf, as it is one of the best-selling electric vehicles in Portugal, over the last few years, with a Li-ion battery with a nominal capacity of 40 kWh [36]. The share of EV in the fleet was based on the rates of EV sold per total number of sold vehicles [37], currently at a value of 3%, assumed as an optimistic EV adoption.

The capacity of every consumer to charge an EV was also characterized through inquiries performed to the largest consumers (hotels, universities, industry, and retailers), detailing the availability of parking spots in each building [38].

Scenario’s definition

As shown in Fig. 1, the definition of scenarios is made based on four different aspects: willingness to participate, prosumers’ technology features, PV systems sizing and LEM models.

Regarding the Citizens’ willingness to participate in an energy community, given the works of [39,40,41], two scenarios were considered: Current, with an average willingness to participate of 77%, and High, with a 100% share of participation, which corresponds to an estimation for the 2030 horizon.

Regarding participants, prosumer shares, prosumers’ technology features:

  • Types of participants: derived from the literature review, two community designs were tested. One with participants only from the residential sector (more common), and one with participants from different economic sectors, existent on the case study area.

  • Prosumers’ rate and technology features: two scenarios of prosumers’ rate were considered: Current, with 10% rate of prosumers (adapted from [42, 43]), and High, with 46% of prosumers, which corresponds to a 2030 prosumers’ expected rate. Among the prosumers, further technology coupling is modelled:

    • Prosumers with PV and EV are assumed to account for 3% of all prosumers [37], while for the high scenario it accounts for 36% [42];

    • Prosumers with PV and BESS are assumed to correspond to 50% of the prosumers without an EV [44].

On solar PV sizing scenarios, analogously to [19], two PV sizing methods were derived, to establish lower and upper limits for PV panels deployment:

  • Techno-economic (TE), meant to mimic current regulation. The techno-economic was designed to minimize prosumers’ imports from grid and PV investments, focusing on individual self-consumption, and was modelled using two assessment variables: discounted payback time (DPBT) and self-consumption rate (SCR) (see Table 10 in the Appendix for detail in the techno-economic scenario); and,

  • High-solar fraction (HSF), to foster energy communities and local sharing/trading. The high-solar fraction PV sizing uses the buildings’ rooftop available areas to the fullest, with prosumers promoting the generation of surplus energy, enabling potential energy trades between peers.

Lastly, two local energy market model scenarios were designed and compared with centralized grid supply case (which represents the current scenario):

  • the collective self-consumption (CSC) with aggregation: which shares the PV surplus within the community without extra costs, while the imports from grid supply are made at an aggregation price more advantageous than standard end-user retail tariffs (as described in section Local energy market model). This assumption was made since energy communities, if aggregated as an isolated microgrid, can be considered as a unique larger consumer, which can access better electricity supply prices than if considered individually each of its EC participants; and,

  • the P2P energy trading market: where all the individual PV surplus is traded within the community at an average agreed price, being the grid imports still supplied at an aggregation price, as described in section Local energy market model.

As such, five final energy community typologies scenarios were designed from a combination of the previous aspects. Table 3 summarizes the number and types of participants (consumers and prosumers) for the five EC-derived scenarios.

Table 3 Number and type of participants in the designed scenarios

S0 (not pictured in Table 3) presents the centralized grid supply (current—no EC) scenario to which every EC scenario is compared in terms of market model. As such, the number of buildings and types of participants are the same of the scenario it is being compared (S1, S2, S3 or S4).

S1 represents a scenario with only residential consumers and prosumers, as it is the most prominent sector in the case study area, with an assumed willingness to participate of 77%. In this scenario, we test the impact of having different types of residential community profiles: R1, a normalized electricity profile commonly available on public databases; and R2 to R4, which are monitored profiles from specific families, to assess the impact of having smoothed/averaged versus real profiles, in this kind of community balance analysis. Thus, they are represented as S1–R1 community and S1–R2 to R4 community.

S2 is a scenario where the remaining types of non-residential consumers are introduced, being prosumers solely present in the residential sector.

S3 scenario allows all types of participants to operate also as prosumers, maintaining the same willingness to participate (77%), prosumer adoption rate (10%), and EV penetration (3%).

S4.1 scenario is a case where the willingness to participate is 100%, while the prosumer adoption rate and EV penetration are the same as S3.

Lastly, S4.2 scenario is a representation of S4.1, where both the prosumer and EV adoption rates are high (projected to 2030), and investment costs of both PV solar systems and BESS are expected to decrease.

For each scenario, both PV sizing (techno-economic and high-solar fraction) cases and energy market models (collective self-consumption and P2P) were implemented.


Community results

Community results are useful to assess the overall benefits of EC deployment. In terms of the total community costs, the differences between the CSC with aggregation and P2P market models are not significant, since the revenues of the trading are kept within the community members. Thus, in this section only the CSC with aggregation will be analysed.

Figure 2 displays the net annual community savings for the different EC typology scenarios in a CSC with aggregation, compared to the centralized grid supply scheme.

Fig. 2
figure 2

Community annual electricity costs savings in CSC with aggregation

Results demonstrate that annual electricity cost savings range from 15 to 20% in S1, and from 35 to 45% for S2, S3, and S4. This difference can be explained by the grid access tariff used in S1 (which is a low-voltage tariff), while for S2 to S4, the aggregator grid access tariff is assumed to be the same as the largest consumer (University), which presents lower grid tariffs (since it is connected at medium voltage). Further, the increase in locally produced RE in S4.2, reduces the total community electricity costs, as seen in the difference between S4.1 and S4.2 with the high-solar fraction PV sizing. Differences within S1 residential community profiles are not significant.

Regarding community economic KPIs, the results computed in Fig. 3, for CSC with aggregation, can be misleading, presenting optimistic IRR, especially for the techno-economic sizing (i.e. reaching 212% in S2, for example). This can be attributed to two factors: low initial investment on PV systems when compared to the high-solar fraction scenario (see Table 10 in the Appendix) and substantial savings derived from the advantageous aggregator tariff. However, with a techno-economic PV sizing, there is almost no PV surplus available for community trades, which devalues the EC concept. These results show that the aggregation tariff should be prudently designed according to the real grid services and managing advantages that the aggregator might bring to grid resilience.

Fig. 3
figure 3

NPV and IRR in a CSC with aggregation: TE—techno-economic; HSF—high-solar fraction

Concerning the energy KPIs, Fig. 4 presents the SSR and SR for the different EC typologies, independently of the energy market model considered, since none of parameters depend on energy trading/sharing prices.

Fig. 4
figure 4

Community self-sufficiency (SSR) and surplus rates (SR)

Analysing Fig. 4, S4 (the more optimistic scenario) shows that, when a high-solar fraction PV sizing is considered, the increase of residential prosumers (and consequently reduction on the number of consumers) results in a SR increase of 9.6% in S4.1 to 17.4% in S4.2, while the SSR increases from 5.3% in S4.1 to 12.5% in S4.2. On the other hand, for the techno-economic PV sizing, SR reduces from S4.1 to S4.2, which is explained by the growing number of prosumers with EVs, which boosts the overall community electricity demand without an equivalent PV surplus increase. The self-sufficiency rate for all techno-economic PV sizing scenarios is very low, being the highest in S4.2 reaching nearly 4%, demonstrating that TE PV sizing is not adequate for EC creation.

Figure 5 showcases how locally generated RE influences an average day of the community load profile, for the CSC with aggregation case. The area between the grey and the yellow or the light blue curves, represents the RE consumed locally within the community for, respectively, the TE and the HSF PV sizing scenarios.

Fig. 5
figure 5

Average load diagrams prior and following the energy community for scenarios: a S1–R1 community, b S1–R2 to R4 community, c S2, d S3, e S4.1, f S4.2

From Fig. 5, we can portray that:

  • S1 considering R1 profiles showcases a substantial reduction of the afternoon peak for the HSF, decreasing from a total community electricity demand of roughly 1400 kWh to 1089 kWh. The TE PV sizing shows also a small demand decrease, although purely from self-consumed solar energy, with no trading happening due to the lack of PV surplus;

  • S1 with the R2 to R4 community profiles displays fewer visible differences concerning electricity grid demand after EC energy sharing, as all profiles showcase higher electricity demand when compared to R1 (both implementing the same number of PV panels). This fact shows that modelling with standardized profiles may greatly increase the gap between EC model and real implementation;

  • In S2, with the introduction of high-demanding consumers but with prosumers only from the residential sector, the demand curves draw closer since total traded RE is little when compared to community total load;

  • In S3 and S4, as the hotels, LRU, industry, and university become prosumers, deploying PV panels on their respective buildings' roofs, the total grid demand curve changes drastically: while on TE PV sizing the load curve loses its “morning peak” (S3, S4.1), in S4.2 the electricity demand from 6 AM to 7 PM becomes an “off-peak period”, with lower daily electricity demand;

  • After sunset, the demand curves of the energy community (yellow and light blue curves) tend to converge into the total demand curve (grey). However, the HSF PV sizing curve never actually coincides with the total demand curve, which is explained by the presence of BESS owners, who can take advantage of stored solar energy. This phenomenon is seen in all scenarios, as they all consider PV panels plus BESS prosumers.

CO2 eq emissions savings for the CSC with aggregation are observed in Fig. 6.

Fig. 6
figure 6

Community annual CO2 eq emissions savings for the CSC with aggregation scenario

The TE PV sizing demonstrates that, in S1 and S2, emissions barely decrease when compared to their S0 equivalent scenarios, as almost no energy sharing/trading is performed among peers. On the other hand, the HSF scenario showcases higher percentage reductions in CO2 eq emissions, registering for the S1 R1 Community savings around 4%, similarly to scenarios S3 and S4.1, and more than 10% for S4.2. Due to the high penetration of EVs in S4.2, if a TE PV sizing is implemented, GHG emissions increase when compared to the S0 equivalent scenario (S0.3), as with little electricity generated and traded inside the community, the demand on the electric grid becomes even higher.

The investment per saved ton of CO2 eq for each scenario in the self-consumption with aggregation case is presented in Table 4.

Table 4 Investment per saved ton of CO2 eq for the self-consumption with aggregation case

The values obtained for the TE scenario are considerably high, which is justified by PV surplus from prosumers being nearly zero, and little energy shared among the community participants. In scenario S1, the majority of the participants are consumers (only 10% prosumers), meaning that consumers still import almost all demand from the grid resulting in extremely low CO2 eq savings for this scenario, when taking into account the overall EC investments. Instead, all HSF scenario report considerably lower investment costs per ton of saved CO2 eq given extra PV surplus from which all members of community (consumers and prosumers) benefit. Looking at scenario S4.2, which intends to project a high RE, EV and BESS technology adoption rate in the 2030 future, it presents the best ratio between investment and CO2 eq saved.

Participants’ individual results

As previously seen, in community terms, there is no advantage of considering the techno-economic PV sizing scenario. Therefore, in this section we will only analyse the high-solar fraction PV sizing scenario in order to derive more interesting results. Table 5 presents the individual economic outputs, disaggregated per type of participant.

Table 5 Annual electricity cost savings for HSF PV sizing, comparing the LEM scenarios (CSC versus P2P)

In Table 5, we see that EV charging station displays negative results independently of the scenario. This happens because the electric mobility charging access grid tariffs are currently lower than the aggregator’s grid access tariff plus OMIE hourly prices considered in the scenarios. As a result, since the mobility access tariffs are so competitive, the trading within the EC will not benefit this participant.

For residential prosumers who have PV surplus, the differences between energy market models (CSC vs P2P) are massive, such that R1 is better off not participating in the CSC EC. On the other hand, for consumers that take advantage of consuming locally produced RE at no charge, the annual electricity costs will be lower in a CSC with aggregation than if integrating a P2P energy trading community. Conversely, the P2P model shows better results for prosumers with zero PV surplus rates (as the case of LRU, Industry, University), since they can take advantage of consuming locally shared RE. Thus, consumers achieve higher annual electricity savings in CSC with aggregation, while prosumers benefit more by integrating a P2P energy trading community. The differences however are much higher for prosumers than for consumers: while for consumers differ at maximum 1.3% between energy market models, for residential prosumers the mean annual electricity costs savings is 9.3%.

Table 6 presents the individual IRR, which is only shown for P2P trading EC, since the investments are relative to the RE systems owners. The NPV results, which are presented in Table 14 in the Appendix, present a similar behaviour to IRR.

Table 6 IRR in a HSF PV sizing for the P2P LEM scenario

Results show that, for residential prosumers, participating in P2P EC allows higher IRRs than they would obtain in a centralized grid supply scenario. Alternatively, BESS owners showcase viable results (IRR > 2.5% which is the discount rate) for S1 (R4 profile), for S2, S3, and S4.1 (for profiles R2 and R4), and for all considered profiles in S4.2. On the other hand, the hotel and LRU’s IRR for all scenarios are extremely optimistic, which might be due to the relatively low PV investment costs regarding their overall electricity costs. The industry participant seems to benefit from the community as its IRR increases up to 12 percentual points with the participation on a P2P EC.

As for the indicators related to the energy and environmental performances, Table 7 reports the peer sufficiency rate for every type of participant regarding the different EC typologies, while the investment cost per CO2 eq emission saved for each participant is presented in Table 15 of the Appendix.

Table 7 Individual peer sufficiency rate for EC typologies in a HSF PV sizing

The peer sufficiency rate reports the EC participants electricity demand that is supplied by locally produced RE. The major changes in the sufficiency rate occur at the consumer level since the prosumers SSR does not change. In S1, for the R1 consumer, a peer sufficiency rate of 4.13% is seen. However, the introduction of prosumers allows the sufficiency rate to increase, which is visible across the scenarios, with S4.2 producing, comparatively, the best outputs, with sufficiency rates between 3% (R3) and 4.6% (Hotel). For HSF PV sizing, differences between the CSC with aggregation and P2P LEM models are quite small with differences of, at best, 0.13%, with CSC reporting the better results. This can be explained by the fact that most surplus energy on the P2P energy trading communities is kept inside the community.


Having examined the total community results, from both an economic and environmental perspective, energy communities will have a significant deployment impact. Consumers and prosumers are able to decrease their annual electricity costs, along with viable solar PV projects: they consume, share and export cleaner and local renewable energy and, consequently, lower their correspondent CO2 eq emissions. However, for achieving better EC results, prosumers should implement larger PV systems (high-solar fraction PV sizing scenario) to allow for energy sharing/trade between peers.

Impact of number and types of participants

Analysing ECs consisting of only residential buildings, as S1 (similar to what most studies do), opposed to ECs containing other types of participants (S2 to S4), allows for a broader understanding of EC dynamics. In the proposed EC typologies, it is visible that some participants display economical losses when inserted in the community (the EV charging stations being clear examples), while most benefit, and some benefit tremendously (case of the hotel and the LRU), leading to great discrepancies in gains according to types of consumers. It is also interesting to observe that, an increase of number of participants (whether from the residential sector or any other) does not necessarily correlate with better EC results, but rather the load curve and power demand of the participants.

Impact of technology features

One of the main factors that result in positive outputs is PV system sizes deployed by prosumers. Two distinct PV sizing scenarios were assessed: the techno-economic, focused on the individual prosumer self-consumption, and the high-solar fraction, which considered the buildings’ total rooftop available area to install PV systems. While the former, results in lower investment costs, and in some cases very optimistic economic outputs (namely the IRR), the overall results indicate that high-solar fraction PV sizing is the most feasible for the creation of energy communities.

Further, the impact of technology features such as EV and BESS on the EC results are also affected by which PV sizing is chosen: the deployment of PV panels will help decrease the higher electricity costs of EV owners, in particular with the HSF PV sizing. Similarly, BESS also benefit of HSF PV sizing, since the inexistence of PV surplus on the TE make them useless, with the current charging/discharging criteria implemented. In terms of investment per ton of CO2 eq saved, S4.2 is still the more advantageous though it requires a considerable number and variety of technology features.

Impact of prosumer adoption rate

Looking at the different scenarios, the economic results tend to improve when increasing the prosumer adoption rate. Scenario S4.2, when compared to scenario S4.1 (which has the same number of participants but more consumers), presents community and individual better outputs. It reveals that there is still potential for more prosumers to take part in the community, as almost no excess energy exists, and when it does, it is due to the P2P tariff not being advantageous for any trading peer. However, at some point, it is expected that this positive tendency on results will reach a stagnation when the PV surplus generated by prosumers will no longer have local EC demand to satisfy during sunlight hours. One potential answer to this problem are community batteries where PV surplus may be stored (instead of exported to the grid) and sold to demanding EC peers during peak times, at more competitive prices than the ones given by electricity retailers.

Nevertheless, given current configuration and assumptions, individual results point that consumers achieve higher annual savings in CSC with aggregation, while prosumers benefit more by integrating a P2P EC.

Impact of LEM configuration

Considering overall economic gains with HSF PV sizing, results demonstrate that both consumers and prosumers, as well as the overall community, are in general benefitted when engaging in energy communities, either in a P2P or CSC with aggregation models. However, when comparing HSF against TE results, although HSF computes overall better outputs, the difference is not significant enough (0.1 to 3% difference between PV sizing scenarios). Most of the electricity costs savings showcased for prosumers, consumers and the community are due to the aggregation factor (where a common, more advantageous, retail tariff is applied). From the grid point of view, the advantage of an aggregator is that it mimics a larger consumer with greater volume of trades, being able to also provide grid services, such as grid flexibility. Thus, we can conclude that the P2P trading price at which EC participants are trading PV surplus with their peers does not differ much from the aggregation tariff offered when consuming electricity from the main grid, given that results showcased for both CSC and P2P scenarios are similar. As such, the soon expected LEMs regulation and its electricity trading models design will dictate the future success of P2P LEMs, or if, instead, they might suffer a drawback when compared to other investments (i.e. flexible technologies) that can also provide potential economic savings.

Besides, the small economic differences for the TE scenario between the two LEM configurations, raises the question on whether the existent individual self-consumption infrastructure is sufficient to make an EC viable or should ECs be created from scratch with a common investment on larger PV systems, sized already for the EC composition.

Impact on community and individual results

In individual terms, results seem to show that with increasing PV installations and prosumer adoption rates (S4.2 scenario), the IRR also increases, proving that more available energy for P2P trading allows PV systems owners to attain better economic results in their solar projects, independently of their electricity demand magnitude.

Generally, and considering every analysed indicator, the best-case scenario, both individually and cumulatively, is S4.2, as it represents an EC typology where the prosumer adoption rate increases.

In terms of the PV sizing scenarios, the HSF produces results closer to the literature findings. In terms of overall community results, for both the P2P and CSC with aggregation LEMs, the work here proposed presents electricity cost savings between 17 and 43% (dependent on the considered scenario) in line with the literature 12–31% [20]. Concerning individual savings, since most of the literature is focused on residential energy consumption, the residential savings are the only comparable parameter. In this work, residential prosumers in P2P can obtain savings between 15 and 49%, which are within the literature range 3–83% [12, 19, 21], while residential consumers can save from 18% up to 47%, whereas in the literature between 4 and 29% [19, 21], which is slightly below the values obtained.

Concerning the overall community sufficiency rate, the model computes values between 3 and 15%, closely aligned with the findings from [20] of 20% but far from the 75% found in [45]. As previously referred, improvements in self-sufficiency can be obtained by making a shared use of energy storage systems.


This research work focuses on modelling the impact of different energy communities’ design options on the overall economic and environmental performance of ECs. Different EC design typologies (multiple types of participants and willingness to participate), types of prosumers (with multiple technology features such as solar PV systems, EVs or BESS), PV sizing scenarios (techno-economic and high-solar fraction), and types of LEM models (CSC with aggregation and P2P) were tested using as case study Areeiro parish, in Lisbon, Portugal.

Results reveal that EC outputs will greatly depend on the types of participants, PV sizes deployed, LEM model implemented and consumers versus prosumers share.

Regarding the PV sizing, the individual techno-economic PV sizing, is not ideal for EC deployment, as almost no PV surplus energy is available to be shared or traded within the EC. However, the economic results show that most participants are able to reduce their electricity costs due to a lower aggregation tariff. As such, the high-solar fraction PV sizing seems much more suitable for EC deployment. The share/trade of PV surplus, paired with competitive aggregation tariffs results in positive economic and environmental outputs, for the majority of both consumers and prosumers. Prosumers with BESS become profitable, while participants with EVs take economic advantage of locally produced energy. This reveals that, to become profitable, ECs should be deployed adding larger PV systems to existing individual self-consumption PV assets, in proportion to the share and types of consumers and prosumers.

Regarding the analysed energy community typologies, S4.2 is the best-case scenario, both at individual and community level, as it represents a configuration where the prosumer adoption rate is the highest. Community electricity cost savings are up to 42%, while the SSR is up to 12.5%, which is low comparatively with literature, due to the participation of high demanding sectors (such as industry or LRU). At participants individual level, costs savings can reach, in the residential sector, 48% for consumers and 53% for prosumers, while for high-demanding participants stay slightly below: 43% for hotel, 44% for LRU, 13% for industry and 5% for university. Looking at peers’ sufficiency rates, the highest results are again for the residential prosumers (35% for PV prosumers, 28% with PV + EV and 54% with PV + BESS) while for other participants results fall between 6% (LRU) and 26% (industry).

Regarding LEM scenarios, highest individual savings are directly related to higher self-sufficiency rates and advantageous aggregation grid tariffs (and not so much to P2P trading prices), revealing that EC regulation will play an important role in determining to what extend ECs will effectively contribute to the energy transition and decarbonization.

The limitations of this work are the BESS usage algorithm, that only considers individual BESS for increasing the PV self-consumption of its owner, not sharing BESS energy among community participants; and the discount rate used for PV investments, that, in light of recent European energy crisis and consequent rise in inflation, is considerably low, resulting in more optimistic results. Future work should try to improve the BESS charging/discharging algorithm to allow for more communal use and higher self-sufficiency and playing with demand flexibility. On the other hand, it should also incorporate a dynamic pricing LEM optimization for a more flexible P2P market approach.

Availability of data and materials

As mentioned before, all data were collected from publicly available data (except for the parking spots availability). The data collected are described in Fig. 1 and further detailed in the case study Sect. 2.3, where references are provided for the respective data. Further, additional data are shown in the Appendix section. Yet, if any problem is found retrieving the data, the corresponding author can provide it on reasonable request.



Average State of Charge


Battery Energy Storage System


Collective self-consumption


Distributed Energy Resources


Discounted Payback Time


Energy communities


Electric vehicles


Greenhouse gas


High Solar Fraction


Key Performance Indicators


Local electricity markets


Large Retail Unit


Mixed-integer linear program


Net Present Value


Iberian electricity wholesale market


Solar photovoltaics




Renewable Energy Sources


State of Charge


Surplus Rate


Self-Sufficiency Rate



\(Av distance\) :

EV average distance travelled [km]

\({Bat}_{N}(t)\) :

BESS state of charge of prosumer N at hour t [kWh]

\({Bat}_{N,nom}\) :

BESS nominal capacity of prosumer N [kW]

\({Bat}_{N,min}\) :

BESS minimum state of charge of prosumer N [kW]

\({Bat}_{N,max}\) :

BESS maximum state of charge of prosumer N [kW]

\({C}_{N}(t)\) :

Electricity costs from grid purchases, of consumer N at hour t [€]

\({C}_{N}^{agg}(t)\) :

Electricity costs in CSC aggregation scenario, of consumer N at hour t [€]

\({C}_{N}^{P2P}(t)\) :

Electricity costs from trading with peers in P2P scenario, of consumer N at hour t [€]

\({C}_{consumer N}^{P2P scenario}(\mathrm{t})\) :

Electricity costs in P2P scenario, of consumer N at hour t [€]

\({C}_{prosumer N}^{P2P scenario}(\mathrm{t})\) :

Electricity costs in P2P scenario, of prosumer N at hour t [€]

\({E}_{d{emand}_{N}}(t)\) :

Electricity demanded by prosumer N at hour t [kWh]

\({E}_{d{emand}_{T}}(t)\) :

Total EC electricity demand at hour t [kWh]

\({E}_{demand,N}^{PV}(t)\) :

Electricity demand after PV self-consumption, either from the grid or BESS, of prosumer N at hour t [kWh]


Electricity imported from the grid, after PV self-consumption and BESS discharge, by prosumer N at hour t [kWh]

\({E}_{d{emand}_{N}}^{EV}(t)\) :

Electricity demand of prosumer N with capacity to charge an EV, at hour t [kWh]

\({E}_{d{emand}_{N}}^{agg}(t)\) :

Electricity imported from grid, after EC sharing on CSC aggregation scenario, by consumer N at hour t [kWh]

\({E}_{{produced}_{N}}(t)\) :

Electricity generated by PV solar panels by prosumer N at hour t [kWh]

\({E}_{surplus, N}^{PV}(t)\) :

PV surplus, after PV self-consumption, to be shared, charge a battery or exported to the grid, of prosumer N at hour t [kWh]

\({E}_{surplus,N}^{PV+BESS}(t)\) :

PV surplus exported to the grid, after PV self-consumption and BESS charge, by prosumer N at hour t [kWh]

\({E}_{{surplus}_{T}}(t)\) :

Total PV surplus to be shared/traded on the EC, at hour t [kWh]

\({E}_{{surplus}_{N}}^{P2P}(t)\) :

Electricity traded between peers on the P2P scenario, by consumer N at hour t [kWh]

\({E}_{bat,N}(t)\) :

Energy available in the BESS of prosumer N at hour t [kWh]

\({E}_{bat.N.MAX}\) :

Maximum charge/discharge rate of prosumer N [kW]

\(Ed\) :

Energy consumption per distance travelled by an EV [kWh/km]

\({E}_{EV}(t)\) :

EV electricity demand at hour t [kWh]

\({EV}_{rate}\) :

EV rate of per total number of vehicles in Portugal [%]

\(RE(t)\) :

EV hourly percentage of recharged energy [%]

\({\eta }_{discharge}\) :

BESS discharge efficiency [%]

\({\eta }_{charge}\) :

BESS charge efficiency [%]

\({OR}_{N}\) :

Average yearly occupancy rate of parking spots of prosumer N [%]

\({OMIE}_{m}^{avg}\) :

OMIE wholesale market’s monthly average of daily prices [€/kWh]

\({OMIE}_{h}(t)\) :

OMIE wholesale market’s hourly prices [€/kWh]

\({\pi }_{N}(t)\) :

Retail tariff of consumer N at hour t [€/kWh]

\({\pi }_{access}^{agg}(t)\) :

Grid access tariff for the energy community [€/kWh]

\({\pi }^{P2P}(t)\) :

P2P tariff between EC participants, at hour t [€/kWh]

\({R}_{N}(t)\) :

Revenue from PV surplus selling to the grid, by prosumer N at hour t [€]

\({R}_{N}^{agg}(t)\) :

Revenue from PV surplus selling, on CSC aggregation scenario, by prosumer N at hour t [€]

\({R}_{N}^{P2P}(t)\) :

Revenue from PV surplus selling between peers, on P2P scenario, by prosumer N at hour t [€]

\({V}_{Vehicles,N}\) :

Number of EVs the prosumer N can charge/fit on the parking lot [nr.]

\({X}_{d{emand}_{N}}(t)\) :

Electricity demand share of consumer N, in relation to the EC at hour t [%]


  1. Ritchie H (2019) Energy mix - Our World in Data. Accessed 16 Jun 2021

  2. Covenant of Mayors (2014) Reducing Energy Dependence in European Cities. 1–17

  3. (2014) World Urbanization Prospects. Accessed 16 Jun 2021

  4. International Renewable Energy Agency (IRENA) (2021) Renewable capacity statistics 2021

  5. European Commission Clean energy for all Europeans package. In: 2019. Accessed 20 Oct 2022

  6. Spasova D, Braungardt S (2022) The EU policy framework for energy communities. Energy communities: customer-centered, market-driven, welfare-enhancing? 25–42.

  7. (2020) Energy communities. Accessed 16 Jun 2021

  8. Dudjak V, Neves D, Alskaif T et al (2021) Impact of local energy markets integration in power systems layer: a comprehensive review. Appl Energy 301:117434.

    Article  Google Scholar 

  9. Konstantin P, Konstantin M (2018) Electricity Trading. The power supply industry 221–238.

  10. Gui EM, MacGill I (2018) Typology of future clean energy communities: an exploratory structure, opportunities, and challenges. Energy Res Soc Sci 35:94–107.

    Article  Google Scholar 

  11. Sousa T, Soares T, Pinson P et al (2019) Peer-to-peer and community-based markets: a comprehensive review. Renew Sustain Energy Rev 104:367–378.

    Article  Google Scholar 

  12. Zepter JM, Lüth A, Crespo del Granado P, Egging R (2019) Prosumer integration in wholesale electricity markets: synergies of peer-to-peer trade and residential storage. Energy Build 184:163–176.

    Article  Google Scholar 

  13. Ottesen SØ, Tomasgard A, Fleten SE (2016) Prosumer bidding and scheduling in electricity markets. Energy 94:828–843.

    Article  Google Scholar 

  14. Iria JP, Soares FJ, Matos MA (2018) Trading small prosumers flexibility in the day-ahead energy market. IEEE Power and Energy Society General Meeting 2018-Janua:1–5.

  15. Mengelkamp E, Garttner J, Weinhardt C (2017) The role of energy storage in local energy markets. Int Confer Eur Energy Market, EEM.

    Article  Google Scholar 

  16. Liu N, Yu X, Wang C et al (2017) Energy-sharing model with price-based demand response for microgrids of peer-to-peer prosumers. IEEE Trans Power Syst 32:3569–3583.

    Article  Google Scholar 

  17. Kang J, Yu R, Huang X et al (2017) Enabling localized peer-to-peer electricity trading among plug-in hybrid electric vehicles using consortium blockchains. IEEE Trans Industr Inform 13:3154–3164.

    Article  Google Scholar 

  18. Wu S, Zhang F, Li D (2018) User-centric peer-to-peer energy trading mechanisms for residential microgrids. 2nd IEEE Conference on Energy Internet and Energy System Integration, EI2 2018 - Proceedings 1–6.

  19. Neves D, Scott I, Silva CA (2020) Peer-to-peer energy trading potential: an assessment for the residential sector under different technology and tariff availabilities. Energy 205:118023.

    Article  Google Scholar 

  20. Long C, Wu J, Zhou Y, Jenkins N (2018) Peer-to-peer energy sharing through a two-stage aggregated battery control in a community microgrid. Appl Energy 226:261–276.

    Article  Google Scholar 

  21. Nguyen S, Peng W, Sokolowski P et al (2018) Optimizing rooftop photovoltaic distributed generation with battery storage for peer-to-peer energy trading. Appl Energy 228:2567–2580.

    Article  Google Scholar 

  22. The Math Works Inc (2020) MATLAB. Version 2020a

  23. Villar CH, Neves D, Silva CA (2017) Solar PV self-consumption: an analysis of influencing indicators in the Portuguese context. Energy Strategy Rev.

    Article  Google Scholar 

  24. Faria M, Duarte G, Baptista P (2019) Assessing electric mobility feasibility based on naturalistic driving data. J Clean Prod 206:646–660.

    Article  Google Scholar 

  25. Santarromana R, Mendonça J, Dias AM (2020) The effectiveness of decarbonizing the passenger transport sector through monetary incentives

  26. PRESIDÊNCIA DO CONSELHO DE MINISTROS DL 162/2019. Accessed 24 Oct 2022

  27. Directive (EU) 2019/944 (2019) of the European Parliament and of the Council of 5 June 2019 on common rules for the internal market for electricity and amending

  28. Diário da República 1.a série PRESIDÊNCIA DO CONSELHO DE MINISTROS DL 15/2022

  29. ERSE (2021) Estrutura tarifária do Sector Eléctrico

  30. IST (2018) Projeto Campus Sustentável | CAMPUS SUSTENTÁVEL •. Accessed 7 Apr 2021

  31. Google Earth. Accessed 19 Feb 2023

  32. Lisboa e-Nova, Watt-IS, Municipia, Instituto Superior Técnico (2018) Projecto Solis - Avaliação do potencial solar da cidade de Lisboa. Lisboa

  33. Accessed 19 Feb 2023

  34. PVPS Task I IEA PVPS report - Trends in Photovoltaic Applications 2020

  35. (2017) CO2 Intensity of Electricity Generation — European Environment Agency. Accessed 20 Jun 2021

  36. Nissan (2020) L E A F

  37. Autoinforma | Estatisticas. Accessed 19 Feb 2023

  38. Belmar da Costa F (2021) Design and modelling of renewable energy communities as a tool for low-carbon energy systems. Instituto Superior Técnico

  39. Reuter E, Loock M (2017) Empowering local electricity markets : a survey study from Switzerland, Norway, Spain and Germany

  40. Hackbarth A, Löbbe S (2020) Attitudes, preferences, and intentions of German households concerning participation in peer-to-peer electricity trading. Energy Policy.

    Article  Google Scholar 

  41. Hahnel UJJ, Herberz M, Pena-Bello A et al (2020) Becoming prosumer: Revealing trading preferences and decision-making strategies in peer-to-peer energy communities. Energy Policy 137:111098.

    Article  Google Scholar 

  42. RNC2050 - Roteiro para a Neutralidade Carbónica. Accessed 21 Oct 2022

  43. Kalkbrenner BJ, Roosen J (2016) Citizens’ willingness to participate in local renewable energy projects: the role of community and trust in Germany. Energy Res Soc Sci 13:60–70.

    Article  Google Scholar 

  44. Figgener J, Stenzel P, Kairies KP et al (2020) The development of stationary battery storage systems in Germany—a market review. J Energy Storage 29:101153.

    Article  Google Scholar 

  45. Syed MM, Hansen P, Morrison GM (2020) Performance of a shared solar and battery storage system in an Australian apartment building. Energy Build 225:110321.

    Article  Google Scholar 

  46. Naumann M, Karl RC, Truong CN et al (2015) Lithium-ion battery cost analysis in PV-household application. Energy Procedia 73:37–47.

    Article  Google Scholar 

  47. Mulleriyawage UGK, Shen WX (2020) Optimally sizing of battery energy storage capacity by operational optimization of residential PV-Battery systems: an Australian household case study. Renew Energy 160:852–864.

    Article  Google Scholar 

  48. Weniger J, Tjaden T, Quaschning V (2014) Sizing of residential PV battery systems. Energy Procedia 46:78–87.

    Article  Google Scholar 

  49. Hesse HC, Martins R, Musilek P et al (2017) Economic optimization of component sizing for residential battery storage systems. Energies.

    Article  Google Scholar 

  50. Zhang C, Wei YL, Cao PF, Lin MC (2018) Energy storage system: current studies on batteries and power condition system. Renew Sustain Energy Rev 82:3091–3106.

    Article  Google Scholar 

  51. Lüth A, Zepter JM, Crespo del Granado P, Egging R (2018) Local electricity market designs for peer-to-peer trading: the role of battery flexibility. Appl Energy 229:1233–1243.

    Article  Google Scholar 

Download references


This work was supported by Fundação para a Ciência e Tecnologia through IN+ research centre funding UIDP/EEA/50009/2020—IST-ID, and for Diana Neves contract CEECIND/03044/2021.


This work was not funded by any specific project. However, it was indirectly funded by Fundação para a Ciência e Tecnologia (Portuguese National Science & Technology Foundation) regarding the contract of the corresponding author (Diana Neves) and the research institution the authors represent.

Author information

Authors and Affiliations



FB: conceptualization, investigation, visualization, writing—original draft, writing—review and editing. PB: conceptualization, methodology, writing—review and editing. DN: conceptualization, methodology, writing—original draft, writing—review and editing, project administration. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Diana Neves.

Ethics declarations

Ethics approval and consent to participate

In this study there were no ethical issues involved, since all data, except for the parking spots availability, were collected from publicly available sources. The parking spots availability data were collected through a survey done by the authors, as mentioned in Sect. Data collection “The capacity of every consumer to charge an EV was also characterized through inquiries performed to the largest consumers (hotels, universities, industry, and retailers), detailing the availability of parking spots in each building”, which implies the respondents’ agreement to participate.

Consent for publication

All authors agree and approve the final form of this manuscript, giving their consent for publication.

Competing interests

There are no competing interests related to the development of this work.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.



Electricity demand modelling

See Fig. 7; Table 8.

Fig. 7
figure 7

Daily average profiles of the types of participants considered in the energy community

Table 8 Participants' retail tariffs [29]

PV modelling

See Tables 9, 10.

Table 9 Investment costs of PV solar panels depending on range of installed capacity (source: adapted from [23, 34])
Table 10 Techno-economic PV system sizing

BESS modelling

See Tables 11, 12.

Table 11 Parameters used to model BESS
Table 12 BESS' investment costs

EV modelling

See Figs. 8, 9; Table 13.

Fig. 8
figure 8

Electricity demand profile for the EV charging station [25]

Fig. 9
figure 9

EV hourly recharged energy for the best-case scenarios. Adapted from [24]

Table 13 EV implementation for the different types of participants


See Table 14.

Table 14 NPV in a high-solar fraction P2P energy trading layout

CO2 emissions savings

See Table 15.

Table 15 Investment per saved ton of CO2 eq for a HSF PV sizing for P2P LEM scenario

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit The Creative Commons Public Domain Dedication waiver ( applies to the data made available in this article, unless otherwise stated in a credit line to the data.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Belmar, F., Baptista, P. & Neves, D. Modelling renewable energy communities: assessing the impact of different configurations, technologies and types of participants. Energ Sustain Soc 13, 18 (2023).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: