1. Introduction
The centralized production of electric energy from fossil fuels is still a significant component of the global energy matrix [
1]. However, to decrease the reliance on these nonrenewable sources, there has been a growing trend towards renewable energy sources [
2]. Furthermore, the increasing economical accessibility of renewable energy production technologies, combined with recent government policies aimed at promoting renewable production, has encouraged more consumers to become prosumers. By assuming the role of both consumers and producers, they contribute to a decentralization of electrical energy production [
3,
4]. Although beneficial for the environment, the integration of distributed energy resources into the electrical grid poses new challenges due to the variability of endogenous resources and the changes to the paradigm for which distribution networks were designed (i.e., distributing energy from upstream to downstream) [
5]. Currently, one of the most popular solutions to this problem is Renewable Energy Communities (RECs) [
6]. RECs can be defined as groups of individuals and/or organizations that combine decentralized production resources, forming prosumer communities that share renewable energy production with one another [
7]. On one hand, these communities promote the decentralization of energy production, increase energy efficiency, enhance energy security, and ensure greater independence of participants from conventional energy sources. On the other hand, these communities face significant variability and unpredictability due to renewable energy production [
8]. Nonetheless, this variability and unpredictability can be mitigated by the complementarity of resources (such as wind and solar) to balance the variability in energy production, or by the introduction of energy storage systems [
9]. Energy storage systems can store surplus energy produced during times of high production and discharge it during times of low production, enabling RECs to become more self-sufficient and reducing their reliance on the electrical grid. Additionally, the introduction of energy storage systems in RECs also enables new energy-sharing concepts (such as storage sharing) that enable the sharing of the same energy storage system by different community participants [
10]. However, minimizing the reliance on the electrical grid and enabling this type of operation (energy and storage sharing) requires an energy management system (EMS) to optimize the energy flow and manage the different energy sources within the RECs [
11]. EMS strategies can be divided into three categories: (i) classical strategies, (ii) metaheuristic strategies, and (iii) intelligent strategies [
12].
Classical EMS strategies refer to straightforward mathematical programming and classical programming approaches, which can be further categorized into constrained and unconstrained strategies. Constrained strategies are used to optimize the power flow while adhering to specific constraints and include linear programming [
13], nonlinear programming [
14], mixed-integer nonlinear programming [
15] and mixed-integer linear programming [
16]. On the other hand, unconstrained strategies involve decision theory (rule-based and deterministic-based) that uses technical, economic, or environmental constraints to optimize, control, schedule, and manage the different energy sources (production and storage units) [
17,
18,
19]. Classical EMS strategies are a common method to obtain energy-efficient systems in a secure and reliable way. In [
20], a linear programming optimization model was employed to investigate the impact on distribution grids of the different energy community configurations, different operating strategies, and different battery placements. In [
21], an individual peer energy trading price model is proposed for the diversified community to allocate an individual peer trading price to each building group according to its intrinsic energy characteristic and grid import price. However, despite their capabilities and the availability of versatile classical EMS strategies, they present some disadvantages, especially in large-scale systems (with high number of decision variables). To overcome this limitation, some authors choose to divide the optimization problem into subproblems (decentralization). In [
22], a decentralized demand response in energy communities is proposed, incorporating flexible loads and energy storage systems. A multi-block alternating direction method of multipliers (ADMM) approach is used to decompose the large scheduling problem into a set of home optimization subproblems.
Metaheuristic strategies rely on optimization algorithms to achieve efficient power flow optimization while ensuring compliance with specific REC constraints. These algorithms can explore the search space using multiple variables and constraints, thus achieving high-quality solutions. Some of the most popular metaheuristic algorithms are Particle Swarm Optimization (PSO) [
23], Genetic Algorithms [
24], Cuckoo Search Algorithm [
25], Whale Optimization Algorithm (WOA) [
26], Tabu Search Algorithm [
27], Grey Wolf Optimizer [
28], Black Widow Optimization (BWO) [
29], Self-Adaptive Elephant Herd Optimization (SA-EHO) [
30], Mixed Integer Distributed Ant Colony Optimization (MIDACO) [
31] and Grasshopper Optimization Algorithm (GHA) [
32]. Intelligent EMS strategies are nonlinear computational algorithms generally based on Artificial Neural Networks (ANNs) and Fuzzy Logic (FL) [
12,
33,
34].
Artificial Neural Networks (ANNs) are a type of machine learning algorithm inspired by the structure and function of the human brain. They were developed in the 1940s and have since become an important tool for solving complex problems even when working with incomplete data. Recent advancements have led to an increased adoption of ANNs in EMS for forecasting and control applications. ANNs provide an effective means for analyzing complex and nonlinear relationships within RECs because of their ability to recognize patterns in data and make accurate predictions for future load demand and renewable energy production.
Game theory is a type of strategy that studies how individuals and entities make strategic decisions in interactive situations, examining the choices and behaviors that arise from these interactions. In this context, innovative approaches like the Vickrey–Clark–Groves (VCG) and optimization techniques are used to create decentralized, peer-to-peer (P2P) energy trading solutions within microgrids. These methods help optimize prices and trade quantities between energy producers and consumers. In [
35], the Vickrey–Clarke–Groves (VCG) mechanism and the particle swarm optimization (PSO) are applied to optimize P2P energy trading in a microgrid. The objective of the optimization problem is to identify the ideal prices and the amounts of energy traded between producers and consumers in a decentralized way.
One of the fundamental aspects that contribute to the efficient operation of an REC is the optimal sizing of each participant’s production and storage units. This is especially important to complement the variability of natural resources used for energy production; ensure system reliability; manage the initial investment effectively; and account for the diverse profiles of each participant, whether residential or industrial. Thus, the optimal sizing of energy communities has been the subject of great interest by the scientific community due to the growing maturity of renewable technologies (mainly with the reduction of their cost) and the increase and enormous volatility in electricity prices [
36,
37,
38,
39].
To increase efficiency and spread the adoption of RECs, this article determines the optimal sizing of all renewable energy production and storage units within an REC, regardless of the number of participants. Through the optimal sizing of the various energy production and storage units, participants can produce, consume, share, store, and sell the energy produced by RECs, actively contributing to decarbonization and energy transition.
Another distinguishing aspect of this study lies in the dimensioning methodology, which is based on the Multi-Objective Particle Swarm Optimization (MOPSO) algorithm with multiple swarms. This approach aims to enhance solution diversity and ensure a wide range of nondominant solutions, creating a Pareto frontier. Furthermore, to ensure greater independence in the exploration of the multidimensional search space and mitigate the problem of premature convergence, the implemented optimization technique decomposes the multidimensional search space into smaller subspaces [
40,
41]. Thus, the various swarms act in their corresponding multidimensional subspace, allowing a cooperative and collaborative way of sizing the various energy production and storage units inherent to each REC participant. The sizing of the various units was carried out considering economic and technical criteria, namely the levelized cost of energy (LCOE), the self-consumption ratio (SCR), and the self-sufficiency ratio (SSR).
Furthermore, to assess the performance and sustainability of various energy management strategies within the REC, four distinct approaches were implemented. These strategies encompass different levels of cooperation, participation, and collaboration among the various production and storage units of electric energy. By employing these management strategies, the study aims to comprehensively analyze and compare their effectiveness in the REC operations.
The structure of this paper is as follows:
Section 2 offers an overview of the system modeling;
Section 3 presents the energy management strategies, problem formulation, and the optimization approach;
Section 4 discusses the results; and finally,
Section 5 presents the study’s conclusion.
3. Problem Formulation and Energy Management Strategies
In this section, we present the employed energy management strategies, the optimization strategy, and the problem formulation for determining the optimal sizes of the system components within the REC. The management strategies were designed with a focus on real-world operations, aiming to replicate the practical challenges encountered in actual RECs, thus enhancing the approach’s realism and applicability. The problem formulation defines the objective function and constraints that describe the purpose/goals of the optimization problem.
3.1. Energy Management Strategies
To test the performance of the REC in different operating conditions, four energy management scenarios proposed in [
54] were implemented. A summarized description of these scenarios can be found in
Table 1.
In Scenario 1 (S1), an individualist position is assumed by all the community participants, mimicking a conventional microgrid with no energy transactions between them. In Scenario 2 (S2), the surplus energy from distributed renewable systems is shared within the community after fully charging the individual batteries. In this scenario, the community participants prioritize charging or discharging their own batteries when they have an energy surplus or shortage. If the battery reaches the upper limit of its state of charge (SOCmax), any remaining excess energy is shared within the community before being exported to the electrical grid. Inversely, if the battery reaches its lower limit (SOCmin), any remaining required energy is supplied by available energy from other prosumers before importing from the grid. In contrast, in Scenario 3 (S3), the surplus renewable energy is shared directly to cover other community participants’ load demand before being dispatched to the individual batteries. This scenario considers the efficiency losses associated with battery operations and ensures that the excess renewable energy is efficiently utilized to meet the REC’s energy needs. In Scenario 4 (S4), all the batteries and renewable energy sources are shared to enhance renewable penetration and minimize grid dependence. The operation in this scenario follows a specific rule: when one participant has surplus power, it can be utilized to meet the load demand of other peers. The participants first charge their own batteries to SOCmax and then proceed to charge other peers’ batteries sequentially. Conversely, when a participant faces an energy deficiency, they can purchase redundant generation from other peers, then discharge their own battery to SOCmin, and finally discharge other peers’ batteries if needed. This collaborative approach allows for improved renewable integration and effective utilization of distributed energy resources within the community.
3.2. Problem Formulation
The optimal sizing of the studied REC is evaluated based on two different system evaluation criteria: economic and flexibility criteria. The economic criteria involve analyzing cost-related factors, while flexibility criteria assess the system’s ability to adapt to varying demand and supply conditions, ensuring an efficient and reliable energy management.
3.2.1. Economic Criteria
The Levelized Cost of Energy (LCOE) is widely recognized as a crucial economic factor in the optimal planning and design of Hybrid Energy Systems (HES) [
55]. Its prominence attracts investors, policymakers, and consumers, making it a pivotal consideration in the design of the REC [
56].
LCOE can be defined as the effective cost of energy generated by the REC, in
$/kWh [
57]. It is calculated by the ratio of the sum of the total annualized cost (
) and the annual electrical energy served by the system (
), as expressed in Equation (8).
where
is the product of the net present cost (NPC) and the capital recovery factor (CRF), as expressed by Equation (9):
The Net Present Cost (NPC) of a system, representing its life-cycle cost, is determined by Equation (10) [
51], where
i denotes the nominal interest rate and
N represents the project’s lifetime:
In Equation (11),
is the initial capital cost, where
is the maintenance and operation cost;
is the sum of the participants’ battery-rated capacities;
and
are the sum of the PV modules and wind turbines of the participants, respectively; and
,
and
define the cost per
of the batteries, the cost of each PV module, and the cost of each wind turbine, respectively. The capital recovery factor (CRF) is calculated with Equation (12).
The economic parameters are shown in
Table 2.
3.2.2. Flexibility Criteria
The flexibility criteria are crucial parameters for optimizing both energy consumption and production [
58]. The Self-Consumption Ratio (SCR) and Self-Sufficiency Ratio (SSR) are two well-known parameters that enhance the flexibility of energy systems. These criteria play a significant role in achieving an efficient and resilient renewable energy community.
SCR can be defined as the quantity of energy produced internally by the system’s renewable energy sources, which is also used internally for consumption [
58]. This includes both the energy directly used by the load, as well as the batteries’ charging energy (acting like an additional load) [
59].
Figure 2 shows a typical power profile of an REC with this type of renewable energy production system. In this Figure, Area B represents the surplus energy produced during that day, Area C represents the renewable energy directly consumed or stored by the REC, while Area A shows the energy deficit that must be imported to satisfy the load demand.
Using the nomenclature in
Figure 2, SCR can be defined by Equation (13):
Although SCR is a valuable and viable parameter for designing an REC, if the optimization problem were solely formulated to maximize SCR, the resulting configuration would always be the smallest possible in terms of produced energy. This limitation underscores the need to use SCR in combination with other criteria when formulating an REC optimization problem. By incorporating multiple criteria, the solution can achieve a more comprehensive and balanced configuration that optimizes both energy production and consumption, ensuring the REC’s effectiveness and practicality [
58]. SSR is also considered to minimize energy community transactions with the electrical grid. SSR represents the proportion of energy consumption supplied by internally produced energy. Using the nomenclature depicted in
Figure 2, SSR can be defined by the following equation:
3.2.3. Variables and Constraints
For each participant
, the design variables considered for the optimal sizing and design of the REC are the battery-rated capacity (
) [kWh]; the number of PV modules (
); and the number of wind turbines (
), each subject to upper and lower bounds, as enumerated in Equation (15). These bounds were designed based on a typical renewable energy installation in residential areas.
The primary goal of any REC is to minimize its exchanges with the electrical grid by enabling the exchange of surplus energy consumed or produced among participants. To achieve this objective in the simulated REC discussed in this article, two additional design restrictions were implemented in the simulation parameters to further optimize the results. To significantly increase independence from the grid, the energy interactions with the electrical grid were limited to 25% of the total energy transacted in the REC, as specified by Equation (16). This limitation was implemented to foster a greater reliance on intra-community energy exchanges and storage, leading to reduced reliance on the grid and enhancing the overall self-sufficiency of the renewable energy community.
where
and
are the imported and exported energy exchanged by the REC with the electrical grid by each participant
p, respectively, in each hour
t. Furthermore,
is the total energy transacted by the participant
p, as given by Equation (17):
where
and
are the PV and wind energy produced by each participant
p, respectively;
and
are the charging and discharging energy used to charge and discharge the batteries, respectively; and
and
represent the intra-community transactions of each participant:
defines the intra-community energy importations, while
defines the intra-community energy exportation by each participant
p.
The other optimizing restriction promotes intra-community energy interactions, encouraging participants to exchange surplus or required energy among themselves, as shown in Equation (18). This equation sets a lower limit for the intra-community energy value traded between participants, ensuring that it remains above 30% of the total energy imported by the REC. By encouraging such interactions, the renewable energy community fosters a collaborative approach, optimizing energy utilization and minimizing dependency on external sources.
where
and
defines the sum of all the REC participant’s intra-community energy importations and exportations, respectively.
3.3. Optimization Strategy
The optimization technique implemented in this paper combines the specificities of the Multi-Objective Particle Swarm Optimization (MOPSO) algorithm with the use of multiple swarms that cooperate and share information and lived experiences (history) to achieve a set of high-quality solutions. The use of multiple swarms constructs a greater diversity of new solutions and explores the multidimensional search space with greater independence and efficiency. Moreover, the optimization technique used divides the multidimensional search space into smaller subspaces, providing greater independence in the construction of new solutions (exploration of the search space) and minimizing the problem of premature convergence. The number of subspaces and the number of swarms depend on the number of participants in the REC. Each swarm acts in its corresponding subspace, optimizing the sizing of the various energy production and energy storage units inherent to each participant of the REC () cooperatively and collaboratively. The multiple swarms use the broadcast strategy to share information and lived experiences (history) with each other, i.e., the social component of each swarm (gbest) is transmitted and shared with all the other swarms.
3.3.1. Multi-Objective Particle Swarm Optimization (MOPSO)
Multi-Objective Particle Swarm Optimization (MOPSO) is a population-based, stochastic metaheuristic algorithm that is very effective in solving multi-objective optimization problems, i.e., optimization problems involving two or more objective, typically antagonistic, functions [
60]. It is a metaheuristic algorithm inspired by the foraging behavior of certain animal species involving a population of particles that represent possible solutions. The particles can communicate and cooperate with each other to determine a set of promising solutions, i.e., a set of solutions with a good trade-off between the different objective functions (nondominated solutions). The particles are randomly positioned within the multidimensional search space (
d) and evaluated using the objective functions inherent to the optimization problem (with or without constraints). Particles move based on their current velocities and positions, the individual experience of each particle (cognitive factor), and the collective experience of the population’s particles (social factor). Thus, during the optimization process, the velocity and position vector are updated according to Equations (19) and (20), respectively:
where
represents the velocity of each particle
i in iteration
k;
is the position of particle
i in iteration
k;
is the inertia factor;
e
are the acceleration coefficients used to adjust the cognitive and social contributions when updating the velocities, respectively; and
e
define the stochastic characteristic given by two random numbers evenly distributed in the interval [0, 1].
For single-objective optimization problems, gbest and pbest represent the global and personal best positions, respectively. However, for multi-objective optimization problems, there is more than one global optimal solution, requiring the determination of a set of nondominated solutions (nondominated front, Pareto optimal front, or simply Pareto front). The concept of dominance is a relationship between two possible solutions within the multidimensional search space. A nondominated solution is one that is better than other solutions in at least one objective function, yet not the worst solution in any of the remaining functions. In each iteration, this set of nondominated solutions is determined, registered in a given hypercube, and stored in a repository with limited capacity.
For the collective experiment (gbest), in the MOPSO algorithm, each particle selects a solution from the repository associated with a given hypercube through the roulette wheel selection method that selects a nondominated solution from the repository based on a probability. This probability is calculated using the ratio between the individual fitness of the solutions (objective function value) and the quality of the solutions that compose the repository, i.e., the sum of all the individual fitness of the solutions. Furthermore, for its individual experience (pbest), each particle considers the current/recent nondominated solution produced by the particle itself in the iterative process. These selection procedures of gbest and pbest promote a good diversification in the construction of new solutions (population) and, simultaneously, maximize convergence to the real Pareto optimal front, ensuring a good diversity in the solutions that constitute it.
As aforementioned, the movement of each particle belonging to the population, i.e., its new velocity and position, is calculated through Equations (19) and (20), respectively. However, it is essential to prevent particles from “traveling” outside the multidimensional search space during the iterative process. This constraint is expressed mathematically by Equation (21):
Through this procedure, if any of the lower (lb) or upper (ub) limits are exceeded, the movement of the particle is modified to ensure that the new position is within the search space.
The iterative process ends when the stopping criterion is reached. The stopping criterion may reflect several aspects inherent to the optimization problem: simulation time; maximum number of iterations; the maximum number of objective function evaluations; and population stagnation, i.e., if there is no significant improvement of the solutions during a certain number of iterations; among others.
3.3.2. Proposed Optimization Procedure
Figure 3 presents the flowchart of the implemented optimization procedure in this article for an REC with
n participants. Initially, all the variables relative to the optimization problem and all the required variables for the correct use of the MOPSO optimization algorithm are initialized, such as the number of participants in the REC (
n); the meteorological variables (temperature, irradiance, wind speed); the load profiles of each participant of the REC; the dimension of the optimization problem (
d), the lower (
lb) and upper (
ub) bounds; the number of particles in the population (
np); the maximum capacity of the repository of nondominant solutions; and the number of maximum iterations allowed (
tmax), among others. After these initializations, the initial positioning of the particles is determined with the following structure:
A random initial position is determined within the multidimensional search space (defined in Equation (15)), considering a population of 15 individuals per dimension and a maximum number of allowed interactions (100 iterations per dimension). The population of particles is divided into several swarms with a star topology, i.e., in each swarm, all particles communicate with each other. The various swarms evolve and move independently, while maintaining their own repository of nondominated solutions.
In each iteration, the performance of each particle regarding each swarm was determined using the economic and technical criteria detailed in
Section 4.1 (Equations (8)–(18)). However, to evaluate the performance of each particle, a string code scheme was constructed by broadcasting the social component of each swarm (
gbest1,2,3,…,n), where
n is the number of participants in the REC, as described in Equation (23):
Subsequently, a repository control mechanism evaluated the individual and collective performance of each particle and, consequently, determined the nondominant solutions inherent to each swarm. As aforementioned, the movement of each particle was determined by Equations (19) and (20). However, to prevent a new position of the particles outside the multidimensional search space, during the successive iterations, the confinement strategy described by Equation (21) was implemented. In this strategy, if any of the limits (lower or upper limit) were exceeded, the particle movement was modified ensuring that the new position was within the search space.
The execution of the various swarms, i.e., the various MOPSO optimization algorithms, ended when the established stopping criterion was reached. The established stopping criterion was within the maximum number of allowed interactions (100 iterations per dimension). Once the optimization process was completed, i.e., when the stopping criterion was reached, an external repository was created with all the nondominated solutions determined by the various swarms. Through this external repository, a nondominated solution (Final Trade-Off Solution) was selected based on the fuzzy set membership function [
61,
62].
4. Results Discussion and Analysis
In this section, an evaluation and performance analysis is conducted based on the results obtained from the implemented multi-objective optimization algorithm for each scenario. Firstly, the characteristics of the simulated renewable energy community and the corresponding data profiles will be presented and analyzed. Lastly, all the optimized scenarios obtained from the application of the implemented multi-objective optimization algorithm will be evaluated and discussed.
4.1. Renewable Energy Community
The community under study represents a microcosm of sustainable energy production and consumption, comprising three participants, denoted as (a), (b), and (c) in
Figure 4. This configuration enables a comprehensive analysis of the interactions and dynamics among participants utilizing different energy sources. Each of the three participants in the community can produce, consume, and potentially store renewable energy under the four energy management scenarios described in
Section 3.1.
Additionally, when the community’s load demand exceeded the local renewable energy production capacity, participants could import additional energy from the electrical grid. This interaction with the grid provides several advantages for the renewable energy community. First, it ensures a reliable power supply, particularly during periods of low renewable energy production or high load demand. Second, it allows for the integration of intermittent renewable energy sources with the grid’s baseload power, ensuring a continuous and stable energy supply. Third, the grid connection enables the community to participate in feed-in tariff programs, incentivizing the production and export of excess renewable energy.
4.1.1. Mathematical Models Parameters
This subsection presents a comprehensive overview of the key mathematical model’s parameters used in the simulations. These parameters encompass the characteristics of the batteries, PV, and wind turbine models.
Batteries Model Parameters
To accurately replicate the dynamic behavior of a battery within an energy community, it is necessary to adjust certain model parameters values. These parameters enable the model to mimic nuances and interactions that batteries exhibit when integrated into the energy systems of real-world communities, allowing for a more precise representation of their performance [
45,
57].
Table 3 presents the battery model parameters values used in the simulation.
Photovoltaic Model Parameters
The photovoltaic module selected for simulation purposes was the Sharp ND-R250A5, characterized by 60 polycrystalline silicon cells (with 156.5 mm × 156.5 mm) connected in series, divided into three strings, with each string protected by a bypass diode, i.e., a bypass diode for every 20 cells in the PV module [
63]. The specifications of the selected PV module are displayed in
Table 4.
Wind Turbine Generator
The selected wind turbine generator was the Bergey BWC XL-1, a 1 kW three-bladed wind turbine, with horizontal axis and a 2.5 m rotor diameter. It shows remarkable low-wind-speed performances, with intended applications for charging batteries and supply electrical loads in remote power systems or rural electrification programs. The corresponding power curve is displayed in
Figure 5, and the corresponding parameters provided by the manufacturer are displayed in
Table 5.
To complete the wind component modeling, the power law exponent (
) must be addressed for the simulation site characteristics. The power law exponent or friction coefficient value depends on numerous factors like terrain roughness, altitude, exposed site level, temperature, and season of site [
64].
The value normally used for this parameter in open land areas is 0.142 [
65]. However, this value does not take into consideration various terrain roughness characteristics and atmospheric stability classes, leading to large discrepancies in wind speed value prediction and huge errors in energy estimation [
66]. Given this fact, the value chosen for this parameter was 0.4, a fair value considering a location with high surface roughness, with a high stability atmosphere [
66,
67,
68].
4.2. Data Profiles
The data profiles used in this article were obtained from the U.S. Department of Energy’s (DOE) Open Energy Data Initiative (OEDI) [
69], a large and centralized repository of datasets containing weather data of all the Typical Meteorological Year version 3 (TMY3) locations, as well as dataset simulations of the residential and commercial prototype model load profiles for these locations. TMY3 is the most recent version of the TMY, a group of selected weather data measured in more than a thousand different locations across the US for at least 15 years [
70], fused and shortened into a single year, representing hypothetically typical weather data in each different location, with one year of values with one-hour resolution (8760 h time series data) based on real-life values.
Load data: Three different location datasets were selected from the TMY3 residential load datasets with different time-series statistical values and shape profiles.
Weather data: The weather data profiles were made by scaling the TMY3 weather data of one of the locations (base location), proportionally to the other two locations, including a ±20% deviation to induce additional variability [
71]. These weather datasets contain multiple parameters, three of which are required to simulate the energy community using the mathematical models described in
Section 2: air temperature, solar irradiance, and wind speed.
Box and whisker diagrams were used to visualize and understand in greater detail the dataset profiles used to simulate the REC. The dataset profiles for each REC participant are presented with two different resolutions: hourly and monthly. Thus, one can visualize the behavior and evolution of each dataset profile during the 24 h of the day, but also visualize throughout the 12 months of the year.
Figure 6 shows the hourly resolution box and whisker diagrams of the three load data profiles: Load 1 in diagram (a), Load 2 in diagram (b), and Load 3 in diagram (c); and the three weather data variables of the base location (simulation location of load 2): air temperature in diagram (d), irradiance in diagram (e), and wind speed in diagram (f).
Figure 7 shows the same datasets but in a monthly resolution box and whisker diagrams, with the same disposition and identification.
Table 6 presents the time-series statistical analysis for each dataset profile, including the mean, median, standard deviation, and statistics related to the shape of the dataset profiles, such as skewness and kurtosis. As can be seen, load profiles 1 and 2 exhibited very similar mean values. However, they differed significantly in terms of their standard deviation: Load Profile 1 had a high standard deviation of 66%, while Load Profile 2 had a standard deviation of only 42%. Moreover, these two load profiles displayed distinct skewness values: Load Profile 1 had a positively skewed distribution, while Load Profile 2 showed an approximately symmetric distribution. On the other hand, Load Profile 3 featured a lower mean and median values, with a lower standard deviation compared to the other two loads, as intended. However, its shape metrics were similar to Load Profile 1. The air temperature revealed a very symmetric shape distribution, also demonstrated by the proximity between the mean and median values, despite a high standard deviation value. Inevitably, the irradiance showed very dispersed values, demonstrated by the high value of standard deviation in contrast with the null median value.
Table 7 provides detailed information on the maximum and minimum values of each dataset profile, including the corresponding month, day, and hour when these values occurred. As expected, the maximum energy demand of the load profiles occurred during the evening, and the minimum energy demand of the load profiles happened during the night. Similarly, the air temperature showed expected results, registering the highest temperature during the afternoon of summer times, in harmony with the irradiance, and reaching the minimum air temperature value in the winter.
Finally,
Table 8 details the highest and lowest mean dataset values of each profile, with the respective hour and month they occurred. In the hour resolution diagrams, all load profiles show a similar shape with a slight peak during early morning hours and reaching daily peaks during the end of the evening/beginning of the night. Monthly, all the load profiles have completely different behaviors: Load Profile 1 had a substantial increase in values during the summer months, while Load Profile 3 displayed the opposite scenario, and Load Profile 2 had no significant changes during the months of the year. Relative to the air temperature data profile, as expected, the temperature rose with sun exposure, but with very little variation, increasing hourly after sunrise and dropping during the evening, and throughout the night. Monthly, the temperature increased gradually until the summer months and decreased substantially during the autumn and winter months. The hour of the day with the highest mean air temperature was the 15th hour (18.1138 °C), while the hour with the lowest mean air temperature (11.787 °C) was the 7th hour. The month of July had the highest mean air temperature (27.3003 °C), while January had the lowest mean air temperature (1.3899 °C).
Regarding solar irradiance, the location was not very privileged, reaching the monthly highest mean value (273.5148 Wm−2) in the month of June and the lowest monthly mean irradiance (87.5972 Wm−2) in December. The hour with the highest mean irradiance (570.8571 Wm−2) was the 13th hour of the day.
The wind speed at the location was relatively slow and revealed consistent wind speeds throughout the day and the year, with the highest monthly mean value (3.2932 ms−1) in February, approximately the same as the highest hourly mean value, while the lowest monthly mean value (2.1831 ms−1) was in August.
4.3. Performance Evaluation and Results Discussion
This section presents and analyzes the results obtained with the implemented multi-objective optimization algorithm discussed in the previous sections. To ensure the reliability of the results, the implemented optimization algorithm underwent 15 simulations.
Figure 8 provides a representation of the statistical distribution and variability of the objective functions’ fitness values.
As can be seen, Scenario 1 presents a low standard deviation for LCOE, indicating relatively consistent operational costs. The mean LCOE value is 0.0609, while the median LCOE is slightly lower at 0.0604. The SSR and SCR present relatively high mean values, with 0.8154 and 0.6676 respectively. In Scenario 2, the LCOE exhibits a higher mean value of 0.0435 and a slightly higher median value of 0.0429. The SSR and SCR values are also valuable, with SSR at 0.6805 and SCR at 0.6451. This suggests that, despite higher operational costs, the community maintains a high degree of self-sufficiency and self-consumption. Scenario 3 presents the highest LCOE among the scenarios, with a mean value of 0.0523 and a median of 0.0468. The SSR and SCR values are lower in this scenario, indicating a focus on community independence over cost-efficiency. Lastly, Scenario 4 demonstrates a lower mean LCOE of 0.0371 and a median of 0.0468, making it the most cost-effective scenario. The SSR and SCR values are also advantageous, with SSR at 0.5082 and SCR at 0.5524, suggesting a balanced approach between cost efficiency and community independence.
Table 9 displays the sizing ratio for each participant’s optimal battery capacity and the optimal installed renewable capacity in each scenario. This ratio is calculated by dividing the installed capacity of the storage systems or the renewable energy sources for each participant by their load’s maximum value. This ratio ensures a more reliable assessment of each element’s optimal sizing within the renewable energy community.
In the following subsections, we discuss a performance analysis of each scenario, considering the optimal sizing of each element within the renewable energy community. This analysis provides a comprehensive understanding of the strengths and weaknesses of each scenario, aiding in the selection of the most suitable approach for a sustainable and efficient renewable energy community.
4.3.1. Scenario 1
This scenario provides a baseline comparison for the other scenarios where each participant adopts an individualist position within the community. Scenario 1 resembles a conventional microgrid where there are no energy transactions between the participants. Participants rely on their own individual renewable production and batteries to meet their load demand, exchanging required or surplus energy only with the electrical grid.
Figure 9 shows the hourly average values of PV production, battery discharge and charge, imported and exported energy from/to the grid, and the average load of each participant. These diagrams offer a concise visual representation of the energy dynamics and transactions of the community, allowing for a comprehensive understanding of the participants’ renewable production, battery usage, grid interaction, and overall energy flow throughout the course of a typical day.
In this scenario, the energy storage systems are exclusively used for individual energy storage, with no coordination or collaboration among community participants to maximize the community’s energy independence. As indicated in
Table 9, all participants exhibit a similar renewable production ratio of approximately two. However, they present considerable differences in their Storage Systems Ratio.
As
Figure 9 illustrates, this lack of energy-sharing mechanisms within the community result in surplus energy being exported to the electrical grid without benefiting other REC members. Consequently, most of the available renewable energy in the RECs is exported to the main grid.
Importantly, all participants rely solely on solar energy production systems, with each participant achieving their maximum PV production at 12:00 PM: Participant (a) achieved a maximum PV production of 5.82 kWh, Participant (b) reached 8.34 kWh, and Participant (c) achieved 10.26 kWh. Therefore, during periods of low solar irradiation, the community becomes dependent on the electrical grid to supply its load demand. Similarly, when renewable energy production is insufficient to satisfy the participant’s load demand and the energy storage systems present a reduced SOC, the community relies exclusively on the electrical grid for energy supply. On average, each participant imports 0.19 kWh of energy from the electrical grid per hour to satisfy their demand. This reliance is evident in the increased energy importation from the grid throughout the night hours. As a result, the use of the energy storage systems during these hours decreases in correlation with the respective SOC levels.
To perform a broader analysis of the community operation in Scenario 1,
Figure 10 depicts a diagram that illustrates the monthly cumulative energy values of PV production, energy storage systems, imported and exported energy from/to the grid, and the load for all the community’s participants. This diagram provides a comprehensive overview of the community’s energy dynamics over the course of a year. By showcasing the cumulative values, this analysis allows a macro-level understanding of the participants’ renewable energy production, storage, grid interaction, and overall energy consumption patterns over the year.
As seen in
Figure 10, the community’s overall PV production varies in solar energy production throughout the year, reaching maximum production in May and a mean monthly production of 4677.43 kWh.
During the summer months, there is a significant rise in load demand, which decreases during the spring and autumn months. However, there is a slight increase in load demand during the peak winter months (November, December, and January). Notably, during these months, the total renewable production cannot satisfy the REC’s total load demand. As a result, there is a substantial increase in energy importation from the electrical grid, surpassing the amount of exported energy. Conversely, in other months, particularly during the spring and summer, renewable production greatly exceeds the load demand. This creates an evident disparity in energy flow, with higher energy exportation to the grid.
The energy storage systems usage remains relatively consistent throughout the year, which indicates a consistent reliance on the energy storage systems to meet the community’s load demand regardless of seasonal variations in load demand and renewable production.
4.3.2. Scenario 2
In contrast to the individualist position in Scenario 1, where participants rely solely on their renewable production and batteries, Scenario 2 promotes a collaborative approach. In this scenario, participants prioritize meeting their load demand, and any surplus or deficit power is exchanged among other participants within the community. This enables efficient utilization of available energy resources within the community and reduces reliance on the electrical grid. As
Table 9 suggests, in this scenario, participant (a) has a storage system ratio much higher than the other participants but, however, presents a lower renewable production ratio. As for participants (b) and (c), they present very similar ratios in terms of production and storage.
Figure 11 presents the hourly average values for each participant in Scenario 2.
As depicted in
Figure 11, Participant (a) exhibits a notable load demand during the day. To meet this demand, Participant (a) relies on the electrical grid, individual energy storage systems, or intra-community energy transactions with other participants, especially during the afternoon. These transactions become necessary during hours of low wind energy production, when the capacity of the individual storage systems is insufficient to meet the load demand and other participants have surplus energy due to high PV production. Although only two participants had solar production systems, this type of production significantly contributed to the community’s renewable energy supply, producing, on average, approximately 1.03 kWh of electricity per hour. Conversely, Participant (a) benefits from significant surplus energy during the night due to the wind energy production systems. This surplus energy facilitates the charging of Participant (a)’s energy storage systems, thereby reducing the reliance on other transactions. In contrast, Participant (b) experiences significant energy surpluses during hours of high solar irradiation, due to the PV production systems. This surplus energy is mainly used to charge the energy storage systems and fulfill the load demand of other participants. Additionally, Participant (b) typically experiences an energy production surplus throughout the entire day, benefiting from the advantageous complementarity between PV and wind production. Consequently, Participant (b) became the community’s top exporter, with an hourly average intra-community transaction of 0.081 kWh and an average energy sale to the electrical grid of 0.96 kWh per hour.
Figure 12 depicts the monthly cumulative energy contributions that resume the RES operation in Scenario 2.
As shown in
Figure 12, grid interactions exhibit a significant pattern throughout the year. Initially, during the early months, grid interactions are primarily characterized by energy exportation to the electrical grid, indicating a surplus of energy within the community. However, as we transition into the summer months, the balance shifts and grid interactions predominantly involve energy importations. This shift can be attributed to the reduced production of wind power during this period, resulting in a deficit of renewable production to meet the total load demand.
4.3.3. Scenario 3
In Scenario 3, community participants share their surplus renewable energy directly to fulfill the load demand of other participants before relying on their batteries for charging. This collaborative approach ensures an efficient utilization of excess renewable energy to effectively supply the energy needs of the community, reducing the utilization of the individual storage systems and, therefore, improving their lifespan. As can be seen in
Table 9, both participants have similar installed capacity ratio, but, on the other hand, participant (a) present a distinct renewable production ratio when compared to the other participants.
Figure 13 illustrates the hourly average energy for each participant in Scenario 3.
As can be observed in
Figure 13, Participant (a) exhibits a distinct load demand pattern, particularly during daylight hours, when there is a decrease in energy consumption. To supply its energy needs during daylight hours, Participant (a) mostly relies on intra-community energy exchanges and grid importation. On average, Participant (a) imports 0.255 kWh of electricity per hour from the community and 0.253 kWh from the grid, reflecting its low renewable energy production during daylight hours. In contrast, Participants (b) and (c) demonstrate significant surplus renewable generation, primarily due to their PV generation systems. During the night hours, both Participant (a) and Participant (b) experience a substantial surplus in wind energy production.
Figure 14 illustrates a monthly cumulative energy diagram for Scenario 3.
Figure 14 exhibits a similar behavior to Scenario 2 but with a notable increase in inner-community transactions. During the early months, the renewable energy production matrix is largely dominated by wind energy and, as the peak summer months approach, gradually decreases and is partially replaced by PV production. However, during these peak months, renewable energy production becomes insufficient to meet the high load demand, mainly due to the decrease in wind energy production. As a result, the grid interactions, which were predominantly energy exportation, shift towards energy importation to satisfy the load demand. Moreover, community transactions account for a significant portion of the energy flow, reaching an average of 191 kWh per month.
4.3.4. Scenario 4
In Scenario 4, all renewable energy sources and storage systems are shared among the participants. When one participant has surplus energy, it can be used to meet the load demand of others. Firstly, they charge their own batteries to
SOCmax and then proceed to charge other peers’ batteries sequentially. Conversely, if a participant faces an energy deficit, they can use the energy surplus from others, discharge their battery to the lower limit of
SOCmin, and even discharge other peers’ batteries if necessary. As can be seen in
Table 9, both participants present similar renewable production ratio, but with a diversified production mix. Specifically, participant (a) presents a production mix consisting only of wind production, participant (b) a mix of photovoltaic and wind production and, on the other hand, participant (c) only has photovoltaic production.
Figure 15 presents the hourly average energy for each participant in Scenario 4. As shown, Participant (a) experiences frequent energy deficits during the day, relying on intra-community energy exchanges, occasional grid transactions, and even energy exchanges with other participants to fulfill its energy needs. These deficits are primarily due to the limited wind energy production, while the other participants have significant surplus energy, especially during peak PV production in the afternoon. However, during the night, Participant (a) benefits from excessive energy production, enabling the charge of their individual batteries. In contrast, Participant (b) has substantial surplus energy during the day, due to their PV production, complemented by considerable wind energy production during the night. On the other hand, Participant (c) consistently faces energy deficits during the first and last hours of the day, as no renewable energy production is available in that period. Nevertheless, Participant (c) has substantial surplus energy from PV sources during daylight hours. Like Participant (b), Participant (c) also capitalizes on the high PV production during energy deficit hours to charge its storage systems.
Figure 16 presents a monthly cumulative energy diagram that summarizes the RES operation in Scenario 4.
Unlike the previous scenarios, in Scenario 4, the total renewable energy production consistently exceeds the total load demand every month of the year, even during peak summer months when wind production is negligible. This indicates a more efficient and optimized energy system. In the winter and autumn period, grid transactions are primarily energy exportations, and the community heavily relies on inner-community exchanges and battery exchanges. However, individual battery reserves are not frequently needed. On the other hand, in the spring and summer periods, grid transactions gradually shift towards grid importation. Moreover, energy storage system reserves increase in this period, while community and battery exchanges have a relatively lower impact on the overall community operation.
4.4. Overall Results and Analysis of Renewable Energy Scenarios
The following section presents and discusses the overall results of each scenario, including an analysis of the energy dynamics, performance metrics, and the impact of collaborative approaches on renewable energy integration. Examining the outcomes of each scenario one can evaluate the effectiveness of different energy management strategies and their implications for achieving greater energy independence, optimizing renewable resource utilization, and minimizing reliance on the electrical grid within the renewable energy community.
As seen in
Figure 17, Scenario 1 exhibits a high percentage of grid exchanges (33%), which can be attributed to the individualist approach adopted by the community participants. With no energy transactions among participants, the participants’ surplus energy is exported to the grid, resulting in a higher percentage of exportations (22.4%) compared to importations (10.4%). In this scenario, all the renewable energy generation (67%) comes exclusively from PV production, with no wind power production.
In Scenario 2, grid transactions constitute 31.2% of the total energy usage, where 24.0% are grid exportations and 7.2% are grid importations. Community transactions accounted for 3% of the energy usage, while renewable energy sources (RES) contributed 65.8% of the energy supply. Within the renewable energy generation category, PV generation accounts for 40.3%, and wind power generation contributes 25.5%.
In Scenario 3, grid transactions represent 27.6% of the total energy in the renewable energy community (where grid importations represent 9% and exportations 18.6%). By prioritizing the use of excess energy to meet the load demand of other participants before charging their individual batteries, the need for grid interactions is reduced. This balanced distribution between exports and imports from the grid reflects a more efficient use of renewable energy resources, which reached a percentage of 64.7%, of which 41.6% resulted from solar origin and the remaining 23.1% from wind production.
In Scenario 4, the decrease in overall grid interactions (24.8%, where 20.6% were grid exportations and 4.2% were importations) can be attributed to the collaborative approach adopted by the community participants. By sharing batteries and renewable energy sources, surplus energy can be used to meet the load demand of other community participants, resulting in a higher percentage of community transactions (12.3%). Notably, most of the battery transactions were selling transactions (70%), indicating the community’s proactive use of surplus energy to reduce dependence on external sources.
Overall, the variations in the percentage of grid transactions and community transactions in each scenario reflect the different energy management strategies employed. The collaboration and sharing of resources within the community leads to a more efficient utilization of renewable energy and a reduction in dependence on the electrical grid.
Table 10 presents several performance metrics that summarize the renewable energy community’s operations in each scenario. The Initial Investment column represents the amount of money required to initially implement each scenario. This parameter is calculated based on the initial investment required to build each CER, assuming costs of 170 Euros per solar panel, 3500 Euros per wind turbine, and 800 Euros per kW of battery. The Annual Cost of Energy indicates the annual energy cost associated with the community’s operation under each scenario. This parameter is calculated based on the total energy imported and exported by the CER during the simulated year, assuming a cost of 0.22 Euros per kWh for importing and 0.06 Euros per kWh for exporting to the grid.
The Annual Exported Energy and Annual Imported Energy columns show the amount of energy exported to and imported from the electrical grid, respectively. The Annual Intra-Community Transactions and Annual Community Battery Transactions columns represent the amount of energy exchanged within the community and through battery transactions, respectively. Lastly, Annual Greenhouse Gas Emissions quantifies the amount of greenhouse gases emitted during the year under each scenario. The reference values used for the calculations was 0.373 kg CO
2 per kWh, which corresponds to the United States electrical grid average Greenhouse Gas Emissions in 2021. Additionally, the specific values for greenhouse gas emissions factors were as follows: 0.028 kg CO
2 per kWh for the energy storage system, 0.225 kg CO
2 per kWh for the PV modules and 0.008 kg CO
2 per kWh for the Wind Turbine [
72].
As shown in
Table 10, Scenario 4 emerges as the most favorable option in terms of economic factors, with a relatively lower Initial Investment compared to other scenarios, indicating a more cost-effective implementation. Additionally, this scenario demonstrates a significantly lower Annual Energy Cost, highlighting its efficiency and cost-effectiveness in long-term operations. Scenarios 2 and 3 show a balanced Initial Investment Cost with a relatively low Annual Energy Cost. In contrast, Scenario 1 exhibits a higher Initial Investment Cost and Annual Energy Costs.
In terms of energy independence and grid interaction, Scenarios 2 and 4 exhibit the highest Annual Exported Energy, suggesting a higher surplus of energy. Additionally, Scenario 4 has a relatively lower Annual Imported Energy, indicating reduced reliance on the electrical grid. This scenario also shows the highest Annual Community Transactions and Annual Community Battery Transactions, highlighting active collaboration and battery energy sharing among community participants. In terms of environmental impact, Scenario 2 has the lowest Annual Greenhouse Gas Emissions, indicating a more sustainable energy operation.
Based on these performance metrics, Scenario 4 stands out as the most favorable option, offering a lower Initial Investment, which contributes to cost savings in the implementation phase. Additionally, it demonstrates reduced energy costs, ensuring long-term affordability and sustainability. Scenario 4 also presents higher energy independence, with a significant amount of exported energy and a lower reliance on imports from the grid. Moreover, this scenario exhibits a reasonably low rate of greenhouse gas emissions, reflecting its environmentally friendly approach. Nonetheless, Scenarios 2 and 3 also display promising characteristics, demonstrating active community engagement and a well-balanced energy operation. While they do not outperform Scenario 4 in all aspects, they present valuable alternatives that foster collaboration and contribute to the community’s energy sustainability.
4.5. Future Works
The research presented in this study provides valuable insights into the optimization of renewable energy communities. However, several avenues for future research and exploration can further enhance our understanding and practical implementation of collaborative energy sharing and optimization strategies:
Scalability Assessment: Exploring the scalability of the proposed optimization approach is crucial. Investigating its applicability to larger and more complex renewable energy community settings can help determine its robustness and efficiency in a broader range of scenarios [
73].
Geographical Variability: Examining how different geographical locations and climates impact the effectiveness of energy management strategies is important. Understanding how environmental factors influence energy sharing and distribution can lead to region-specific optimization models [
74].
Regulatory and Policy Implications: Research into potential regulatory and policy implications for the successful implementation of collaborative renewable energy sharing in communities. This includes exploring legal frameworks and policy changes necessary to support and incentivize energy sharing initiatives at various levels [
9].
Practical Case Studies: Implement pilot RES or collaborate with real-world stakeholders and implement the proposed optimization strategies in pilot projects to validate theoretical models and provide practical insights [
75].
Integration of Emerging Technologies: Evaluate the integration of emerging renewable energy technologies, including blockchain, into the optimization framework. Assess the efficiency gains, economic benefits, and potential for enhancing trust and transparency in energy sharing and management [
76,
77].
5. Conclusions
In conclusion, this article presented a comprehensive analysis of a renewable energy community, examining four different scenarios with varying degrees of collaboration and energy management strategies. The sizing of the various energy production and storage units inherent to each participant was carried out using a multi-swarm MOPSO considering economical and technical criteria, namely the levelized cost of energy (LCOE), self-consumption ratio (SCR) and self-sufficiency ratio (SSR).
The results revealed valuable insights into the performance and effectiveness of each scenario. Scenario 4 emerged as the most beneficial option, showing a lower initial investment, reduced energy costs, higher energy independence, and a reasonable greenhouse gas emission. This collaborative approach, where surplus power is shared among participants and individual storage systems are utilized as a last resort, demonstrated improved renewable energy integration and a decreased reliance on the electrical grid. Additionally, Scenarios 2 and 3 also displayed promising characteristics, emphasizing active community engagement and balanced energy operations.
The study further demonstrated the effectiveness of using a multi-swarm and multi-objective optimization approach to find the optimal solutions that balance various aspects of community energy dynamics. Overall, the findings from this research contribute to advancing our understanding of renewable energy integration in community settings and offer valuable guidance for enhancing the resilience and sustainability of future energy systems. As renewable energy adoption continues to grow, collaborative approaches like those explored in these scenarios will play a vital role in building more sustainable and self-reliant communities.