Unveiling Key Factors Shaping Energy Storage Strategies for Sustainable Energy Communities

: This research delves into a case study of a photovoltaic (PV) energy community, leveraging empirical data to explore the integration of renewable energy sources and storage solutions. By evaluating energy generation and consumption patterns within real-world energy communities (a nominal generation capacity of 33 kWn) in Gipuzkoa, Spain, from May 2022 to May 2023, this study comprehensively examines operational dynamics and performance metrics. This study highlights the critical role of energy consumption patterns in facilitating the integration of renewable energy sources and underscores the importance of proactive strategies to manage demand fluctuations effectively. Against the backdrop of rising energy costs and environmental concerns, renewable energies and storage solutions emerge as compelling alternatives, offering financial feasibility and environmental benefits within energy communities. This study emphasizes the necessity of research and development efforts to develop efficient energy storage technologies and the importance of economic incentives and collaborative initiatives to drive investments in renewable energy infrastructure. The analyzed results provide valuable insights into operational dynamics and performance metrics, further advancing our understanding of their transformative potential in achieving a sustainable energy future. Specifically, our study suggests that storage capacity should ideally support an average annual capacity of 23%, with fluctuations observed where this capacity may double or reduce to a minimum in certain months. Given the current market conditions, our findings indicate the necessity of significant public subsidies, amounting to no less than 67%, to facilitate the installation of storage infrastructure, especially in cases where initial investments are not covered by the energy community.


Introduction
Energy communities are transformative models in the pursuit of a sustainable energy future.They empower citizens, consumers, and local entities to actively shape the production, consumption, and governance of energy resources.By decentralizing energy management and promoting renewable energy generation and efficiency, these communities foster a culture of sustainability and citizen engagement.
Moreover, energy communities play a pivotal role in advancing the European Union's (EU) energy and climate objectives.They directly contribute to targets such as increased renewable energy penetration, heightened energy efficiency, and mitigated carbon emissions.Energy communities play a pivotal role in the European Union (EU) as catalysts light on their emergence and dynamics.Lazdins et al. [19] delved into the political, economic, and social dimensions of photovoltaic ECs, while Berka et al. [20] identified approaches crucial for understanding the local impacts of community-owned renewable energy.Koirala et al. [21] explored energy trends shaping the development of integrated community energy systems.
Several studies have focused on governmental and policy aspects [22,23].Leonhardt et al. [24] analyzed emerging peer-to-peer markets and energy sharing concepts from consumer-centric perspectives.Gjorgievski et al. [25] dissected the technical design aspects of local energy systems, evaluating their economic, environmental, and social impacts.
In the European context, Hewitt et al. [26] mapped EC initiatives across several countries, while F.G. Reis et al. [27] analyzed business models of EC projects throughout Europe.Busch et al. [22] reviewed the EC literature through a policy lens, and Wuebben et al. [28] focused on citizen energy communities introduced by the IEMD.Esposito et al. [29] conducted a pioneering study focusing on the regulatory framework of member states and proposing a standardized procedure for the implementation of renewable energy communities (RECs).Their research fills a significant gap in the literature by outlining a comprehensive roadmap comprising four main phases: feasibility study, the aggregation of members, the operating phase, and technical/economic management.This structured approach accommodated various regulatory contexts and project aims, providing valuable guidance for the establishment and operation of RECs across Europe.Azarova et al. [30] investigated the social acceptance of renewable energy systems and found that solar farms and power-to-gas infrastructure increase the acceptance of local energy communities, addressing gaps in the existing literature by assessing comprehensive transformations and the impact of power-to-gas technology.
Meeting energy and climate targets is a collective endeavor undertaken by energy communities in alignment with EU directives and policies [31].By contributing to the reduction in greenhouse gas emissions, increasing the share of renewable energy in the energy mix, and promoting energy efficiency measures, energy communities play a crucial role in advancing the EU's energy and climate objectives.
Legislative frameworks within the EU, including the Renewable Energy Directive (RED II), Energy Efficiency Directive (EED), Energy Union Governance Regulation, and Internal Electricity Market Directive, provide support and incentives for the establishment and operation of energy communities [32].
As renewable energy penetration increases, the need for energy storage becomes paramount to address the intermittency and variability inherent in sources like solar and wind.Efficient storage systems enable the retention and utilization of surplus energy during periods of low generation, ensuring a stable energy supply.
This study is highly innovative, as there is no previous experience of collective selfconsumption in Spain with our own network conditions, let alone the collective storage of individuals' consumption.This research focuses on analyzing energy generation and consumption patterns within real energy communities, utilizing data from a 33 kWn-capacity community in Berrobi, Gipuzkoa, collected over a one-year period.

Case Study
The study system under investigation pertains to the energy community known as the Berrobi Local Energy Community (LEC), comprising an integrated energy storage system linked with a photovoltaic (PV) installation operating within a collective self-consumption framework.
This PV system primarily serves domestic consumers, mainly from the municipality of Berrobi (Basque Country), each of whom has a share in the photovoltaic installation of 0.5 kWp, which is approximately equivalent to one photovoltaic module.The primary aim of the storage system is to optimize the mitigation of PV discharges, defined as the surplus energy generated but not consumed within the same hour of production, thereby enhancing the overall utilization of PV-generated energy.
Challenges related to managing storage systems in collective self-consumption settings include the spatial dispersion of generation and consumption points, a lack of real-time consumption measurements, and compliance with distribution regulations.To address these challenges, collaborative efforts between the LEC and Edinor have led to the development of a monitoring and management system tailored for energy communities, facilitating the effective operation of storage systems in conjunction with photovoltaic installations.Figure 1 shows a schematic diagram of this community management system.
Buildings 2024, 14, x FOR PEER REVIEW 4 of 19 energy generated but not consumed within the same hour of production, thereby enhancing the overall utilization of PV-generated energy.
Challenges related to managing storage systems in collective self-consumption settings include the spatial dispersion of generation and consumption points, a lack of realtime consumption measurements, and compliance with distribution regulations.To address these challenges, collaborative efforts between the LEC and Edinor have led to the development of a monitoring and management system tailored for energy communities, facilitating the effective operation of storage systems in conjunction with photovoltaic installations.Figure 1 shows a schematic diagram of this community management system.There will be an ad hoc control system for photovoltaic plants with batteries intended for collective self-consumption.(Figure 2).The Berrobi LEC facility currently employs a controller serving as a data logger for the real-time monitoring of the photovoltaic (PV) plant.This controller's firmware will There will be an ad hoc control system for photovoltaic plants with batteries intended for collective self-consumption (Figure 2).energy generated but not consumed within the same hour of production, thereby enhancing the overall utilization of PV-generated energy.
Challenges related to managing storage systems in collective self-consumption settings include the spatial dispersion of generation and consumption points, a lack of realtime consumption measurements, and compliance with distribution regulations.To address these challenges, collaborative efforts between the LEC and Edinor have led to the development of a monitoring and management system tailored for energy communities, facilitating the effective operation of storage systems in conjunction with photovoltaic installations.Figure 1 shows a schematic diagram of this community management system.There will be an ad hoc control system for photovoltaic plants with batteries intended for collective self-consumption.(Figure 2).The Berrobi LEC facility currently employs a controller serving as a data logger for the real-time monitoring of the photovoltaic (PV) plant.This controller's firmware will The Berrobi LEC facility currently employs a controller serving as a data logger for the real-time monitoring of the photovoltaic (PV) plant.This controller's firmware will undergo modification and updating to transition into an energy management system (EMS), aimed at orchestrating the operation of the PV plant in conjunction with battery storage units.The EMS will undergo calibration and adjustment through the following steps:

•
Power injection regulation: ensuring adherence to contracted power limits at the connection point by the PV plant, preventing surplus power injection into the grid.

•
Battery charging optimization: Strategically charging the battery during periods of high PV generation and low demand, with timing variations influenced by seasonal fluctuations.Data analytics derived from consumer patterns and statistical analyses inform this optimization process.

•
Demand-driven battery discharge: Discharging the battery during peak consumption periods when PV generation is insufficient, prioritizing gradual discharge to maximize energy utilization and avoid surplus production.Furthermore, discharge timing may align with peak energy cost periods to optimize both energy and economic efficiency.

•
Coordinated adjustment of the EMS and generation sharing coefficients: ensuring synchronization between the EMS control logic and the generation sharing coefficients governing the PV and battery systems.

•
Periodic adjustment of the EMS and distribution coefficients: iterative adjustment of EMS parameters and distribution coefficients to accommodate variations in consumer demographics and consumption profiles, surplus management optimization, and changes in the electricity market and system dynamics.• These adjustments are essential for maintaining operational efficiency, optimizing energy utilization, and aligning the facility's performance with evolving market and consumer demands.
Table 1 shows key data pertaining to both the PV installation and the associated storage system deployed within the operational framework of this project.This photovoltaic installation mainly serves domestic consumers in the municipality of Berrobi, each of whom has a share in the photovoltaic installation of 0.5 kWp, i.e., approximately the equivalent of one photovoltaic module.
Contemporary advancements in engineering have facilitated the highly accurate prediction of photovoltaic (PV) power generation.A plethora of models and software tools are available for generating projected power generation curves.These predictive curves are contingent upon various factors, including the geographical positioning of solar modules, the spatial configuration of the modules (e.g., tilt angle and azimuth), the technical specifications of the modules, the quantity of modules deployed, and the efficiency of the inverters utilized.By leveraging this multidimensional dataset, sophisticated software platforms such as PVGIS can conduct statistical simulations, yielding precise predictions of energy production curves.In the context of our study, emphasis is placed on acquiring these energy production curves through empirical data obtained from the energy community, as provided by EDINOR.
For this purpose, the following notation will be used to identify the generation data of our database, explaining the mathematical operations performed in this study: c m,d G h , where "G" is the electrical energy generated in Wh; "c" is the customer identifier (with values between 1 and 17); "m" is the month of the study (with values from 1 (May 2022) to 12 (May 2023)); "d" is the day of the month (with values from 1 to 31); and "h" is the hour interval of generation (with values from 1 (12 a.m. to 1 a.m.) to 24 (11 p.m. to 12 a.m.).
To reflect the energy produced by customer 2 on the 8th month of the study and on the 5th day of that month in the hourly interval from 11:01 to 12:00, we would use the following notation: 2  8,5 G 12 .And this value corresponds to the specific data of 228 Wh of power generated between 11:01 and 12:00.
To obtain the total energy produced by that customer during that day, all the energy produced during the day is added: If it is required to obtain everything produced by customer 2 in month 8: It is important to consider that this study requires comparing energy generation and consumption in each hourly interval due to the fact that energy storage depends on the excess energy generation in each interval.
Figure 3 shows the energy generation pattern per hour of the photovoltaic system, highlighting a noteworthy peak in energy production exceeding 250 Wh, recorded at precisely 1:00 p.m.This observation underscores the system's robust capacity to generate substantial energy output during peak hours.
For this purpose, the following notation will be used to identify the generation data of our database, explaining the mathematical operations performed in this study:  , , where "G" is the electrical energy generated in Wh; "c" is the customer identifier (with values between 1 and 17); "m" is the month of the study (with values from 1 (May 2022) to 12 (May 2023)); "d" is the day of the month (with values from 1 to 31); and "h" is the hour interval of generation (with values from 1 (12 a.m. to 1 a.m.) to 24 (11 p.m. to 12 a.m.).
To reflect the energy produced by customer 2 on the 8th month of the study and on the 5th day of that month in the hourly interval from 11:01 to 12:00, we would use the following notation:  , .And this value corresponds to the specific data of 228 Wh of power generated between 11:01 and 12:00.
To obtain the total energy produced by that customer during that day, all the energy produced during the day is added: If it is required to obtain everything produced by customer 2 in month 8: It is important to consider that this study requires comparing energy generation and consumption in each hourly interval due to the fact that energy storage depends on the excess energy generation in each interval.
Figure 3 shows the energy generation pattern per hour of the photovoltaic system, highlighting a noteworthy peak in energy production exceeding 250 Wh, recorded at precisely 1:00 p.m.This observation underscores the system's robust capacity to generate substantial energy output during peak hours.
During the period from 15 to 17 h, a notable decrease in power generation was observed.This decline is attributed to various external factors, such as changes in weather conditions and the presence of cloud cover.These environmental variables can significantly impact the efficiency of solar panels, leading to fluctuations in power output during this period.During the period from 15 to 17 h, a notable decrease in power generation was observed.This decline is attributed to various external factors, such as changes in weather conditions and the presence of cloud cover.These environmental variables can significantly impact the efficiency of solar panels, leading to fluctuations in power output during this period.
By employing this notation and methodology, it becomes feasible to discern both the individual consumption patterns of each consumer and the aggregate behavior at the macroscopic level of the LEC.The average energy generation profile of each consumer within the LEC across discrete time intervals can be derived using the following mathematical expression: Figure 4 shows G med at each time interval (one day), thus showing the average generation per customer of the LEC performance.
Buildings 2024, 14, x FOR PEER REVIEW 7 of 19 By employing this notation and methodology, it becomes feasible to discern both the individual consumption patterns of each consumer and the aggregate behavior at the macroscopic level of the LEC.The average energy generation profile of each consumer within the LEC across discrete time intervals can be derived using the following mathematical expression: Figure 4 shows G_med at each time interval (one day), thus showing the average generation per customer of the LEC performance.Figure 4 shows data regarding the temporal distribution of solar photovoltaic (PV) power generation throughout the day, highlighting peak generation periods.The analysis reveals a significant peak surpassing 6 kWh, observed between 12 pm and 3 pm.This detailed insight into peak generation times is invaluable for optimizing consumption scheduling, thereby maximizing system efficiency while minimizing storage requirements.
The designed storage system for this PV installation comprises a suite of high-voltage lithium-ion batteries, an inverter facilitating battery charging and discharging, and a control system.Specifically, Pylontech batteries are proposed for implementation.Table 2 details the primary specifications of the energy storage system integrated with the PV setup, while Table 3 outlines key performance indicators anticipated from its operation in conjunction with the photovoltaic array.Figure 4 shows data regarding the temporal distribution of solar photovoltaic (PV) power generation throughout the day, highlighting peak generation periods.The analysis reveals a significant peak surpassing 6 kWh, observed between 12 pm and 3 pm.This detailed insight into peak generation times is invaluable for optimizing consumption scheduling, thereby maximizing system efficiency while minimizing storage requirements.
The designed storage system for this PV installation comprises a suite of high-voltage lithium-ion batteries, an inverter facilitating battery charging and discharging, and a control system.Specifically, Pylontech batteries are proposed for implementation.Table 2 details the primary specifications of the energy storage system integrated with the PV setup, while Table 3 outlines key performance indicators anticipated from its operation in conjunction with the photovoltaic array.The assessment of energy efficiency is paramount in evaluating the performance of energy storage systems, particularly batteries.Efficiency, or cycle efficiency, is defined as the ratio between the energy discharged and the energy charged by the battery, expressed as a percentage.This calculation considers both the inherent cycle efficiency of batteries, estimated at 96%, and the cycle efficiency of the inverter, rated at 97% for both charging and discharging operations.Product warranties typically specify the end-of-life capacity as the guaranteed capacity.However, the remaining capacity at end-of-life is contingent upon variables such as usage patterns, environmental conditions, and time elapsed.Therefore, this computation relies on the estimated battery usage and technical specifications provided by the manufacturer.These considerations are essential for comprehensively understanding and accurately assessing the performance and lifespan of batteries in energy storage applications.
Cycles equivalent to 100% capacity represent the total number of complete charge and discharge cycles a battery can endure while retaining its maximum rated capacity.This metric plays a pivotal role in evaluating the longevity and resilience of a battery, offering valuable insights into its capability to maintain peak performance throughout its operational lifespan The potential for surplus reduction may escalate in the future, potentially reaching 100% reduction through the synergistic integration of the mentioned storage and control systems.Additionally, this outcome could be further facilitated by the inherent energy management capabilities afforded to individual consumers, empowering them to make informed decisions and thereby augment their direct self-consumption of generated energy.Moreover, the implementation of dynamic coefficients, contingent upon regulatory provisions, stands to enhance operational agility and efficiency within the system.
In contrast to a storage research study linked to an individual self-consumption installation, the present endeavor poses unique challenges as it pertains to a collective self-consumption model, benefiting all members of the LEC.Consequently, the sizing of the storage system and the operational metrics delineated in the preceding tables were meticulously computed to accommodate collective consumption patterns rather than those of a solitary self-consumer.To achieve this, diverse consumer profiles were systematically examined and analyzed, informing the sizing and metric calculations based on the aggregated or average data representative of the collective cohort.

Energy Consumption of the Energy Community
The Berrobi LEC consortium has been delineated into three distinct energy consumer profiles, characterized by annual consumptions of 1500, 2000, and 2500 kWh, respectively.These profiles exhibit consumption distributions of 15%, 35%, and 50%, respectively.Through rigorous analysis, battery sizing and surplus mitigation effects were individually scrutinized for each profile.Subsequently, weighted average indicators were computed, taking into consideration the proportional representation of each consumer type within the consortium.The resultant findings are summarized in Table 4.
Figures 5 and 6 show the power curves delineating a typical day in May and the annual discharge trajectory for a specific consumer archetype within the Berrobi collective self-consumption framework.It warrants mention that, as a general trend, each consumer contributes to the collective self-consumption initiative with generation capacities equivalent to 0.5 kWp. Figure 6 provides an illustrative portrayal of energy consumption patterns for a designated consumer category in Berrobi, specifically focusing on a typical day in May.
Figures 5 and 6 show the power curves delineating a typical day in May and the annual discharge trajectory for a specific consumer archetype within the Berrobi collective self-consumption framework.It warrants mention that, as a general trend, each consumer contributes to the collective self-consumption initiative with generation capacities equivalent to 0.5 kWp. Figure 6 provides an illustrative portrayal of energy consumption patterns for a designated consumer category in Berrobi, specifically focusing on a typical day in May.Notably, Figure 5 shows the pronounced surplus reduction in energy discharged to the grid facilitated by the batteries, concurrently optimizing the utilization of photovoltaic energy and showing the percentage of its State Of Charge (SOC).
As observed, surplus generation is recorded between 10 and 13 h, which is not fed back into the grid but rather stored.From 13 h onward, although generation continues, the battery has already reached its maximum capacity, and the surplus is redirected to the grid.This pattern persists until approximately 15 h.Subsequently, between 15 and 17 h, generation exceeds consumption, and the battery supplies the required energy.By 18 h, production begins to decline, and the battery is fully discharged, as reflected in the state of charge (SOC) drop.
Figure 6 shows a histogram delineating the frequency distribution of surplus energy production throughout the year.The graph elucidates the number of hours annually where surplus energy is discharged to the grid because of battery utilization.It is discernible that the implementation of battery systems can diminish the count of hours per annum characterized by surplus energy exportation.It is shown that the integration of batteries enables a more precise sizing between the production and demand of various network users, achieving an optimal balance between individual production and consumption.The magnitude of energy consumption within the LEC is contingent upon the customer type or category.Employing a methodology akin to that utilized for energy generation analysis, energy consumption data will be scrutinized.From the observed data, the 18 customers can be categorized into three distinct groups: household, industrial, and commercial customers.Notably, Figure 5 shows the pronounced surplus reduction in energy discharged to the grid facilitated by the batteries, concurrently optimizing the utilization of photovoltaic energy and showing the percentage of its State Of Charge (SOC).
As observed, surplus generation is recorded between 10 and 13 h, which is not fed back into the grid but rather stored.From 13 h onward, although generation continues, the battery has already reached its maximum capacity, and the surplus is redirected to the grid.This pattern persists until approximately 15 h.Subsequently, between 15 and 17 h, generation exceeds consumption, and the battery supplies the required energy.By 18 h, production begins to decline, and the battery is fully discharged, as reflected in the state of charge (SOC) drop.
Figure 6 shows a histogram delineating the frequency distribution of surplus energy production throughout the year.The graph elucidates the number of hours annually where surplus energy is discharged to the grid because of battery utilization.It is discernible that the implementation of battery systems can diminish the count of hours per annum characterized by surplus energy exportation.It is shown that the integration of batteries enables a more precise sizing between the production and demand of various network users, achieving an optimal balance between individual production and consumption.
The magnitude of energy consumption within the LEC is contingent upon the customer type or category.Employing a methodology akin to that utilized for energy generation analysis, energy consumption data will be scrutinized.From the observed data, the 18 customers can be categorized into three distinct groups: household, industrial, and commercial customers.
Considering the dynamic nature of participant interactions within an LEC, a comparative study of behavioral patterns among the various members comprising an LEC was conducted.This research enabled the identification and analysis of the complex interrelationships that emerge, particularly through the lens of the feed-in tariff system and energy storage strategies.Such an analysis is crucial for optimizing the management and operational efficiency of LECs, as well as for promoting a more sustainable and participatory energy model.
The primary objective of the storage system will be to maximize the reduction in photovoltaic spillages (energy produced but not consumed in the same hour it is generated), thus ensuring better utilization of the generated photovoltaic energy.
The household segment represents the primary consumer base within the energy community.This group typically exhibits moderate energy consumption levels, devoid of consistent base loads or exceedingly high peak demands.Notably, energy consumption peaks are observed during early morning hours, commencing between 7 a.m. and 8 a.m., and in the evening, spanning from 8 p.m. to 10 p.m., as shown in Figure 7.An inherent attribute of household consumers is the inherent unpredictability of their monthly energy consumption patterns, which engenders sporadic energy storage requirements.
The residential user base within the local energy community (LEC) is characterized by a lack of significant base loads or excessively high demand peaks.Noticeable increases in consumption are typically recorded during morning hours, between 7:00 and 8:00, and in the evenings, between 20:00 and 22:00.These users are highly likely to represent the predominant segment not only in the current case study but also across the broader spectrum of LECs in the process of formation.Upon closer analysis, these consumers can be perceived as unpredictable, particularly due to the monthly variability in their consumption patterns, which may fluctuate significantly due to external factors unrelated to the LEC dynamics, such as family vacations.Such variations induce random requirements in energy storage, posing challenges for the efficient management of resources within the LEC.
community.This group typically exhibits moderate energy consumption levels, devoid of consistent base loads or exceedingly high peak demands.Notably, energy consumption peaks are observed during early morning hours, commencing between 7 a.m. and 8 a.m., and in the evening, spanning from 8 p.m. to 10 p.m., as shown in Figure 7.An inherent attribute of household consumers is the inherent unpredictability of their monthly energy consumption patterns, which engenders sporadic energy storage requirements.The residential user base within the local energy community (LEC) is characterized by a lack of significant base loads or excessively high demand peaks.Noticeable increases in consumption are typically recorded during morning hours, between 7:00 and 8:00, and in the evenings, between 20:00 and 22:00.These users are highly likely to represent the predominant segment not only in the current case study but also across the broader spectrum of LECs in the process of formation.Upon closer analysis, these consumers can be perceived as unpredictable, particularly due to the monthly variability in their consumption patterns, which may fluctuate significantly due to external factors unrelated to the LEC dynamics, such as family vacations.Such variations induce random requirements in energy storage, posing challenges for the efficient management of resources within the LEC.
Industrial customers are distinguished by their elevated base energy consumption levels and notable peak demands, typically coinciding with operational hours.Moreover, their energy consumption patterns tend to exhibit a high degree of regularity, as they are dictated by established production processes.Consequently, these consumption curves typically demonstrate consistency across different periods throughout the year, as shown in Figure 8. Industrial customers are distinguished by their elevated base energy consumption levels and notable peak demands, typically coinciding with operational hours.Moreover, their energy consumption patterns tend to exhibit a high degree of regularity, as they are dictated by established production processes.Consequently, these consumption curves typically demonstrate consistency across different periods throughout the year, as shown in Figure 8.The commercial customer within the energy community is delineated by energy consumption patterns primarily associated with commercial activities such as air conditioning, lighting, and refrigeration.This consumption is typified by a schedule that aligns closely with operational hours, typically spanning from 8 a.m. to 11 p.m.
The industrial entities under study are characterized by significant levels of baseline energy consumption and the presence of pronounced demand peaks.These partners contribute to stabilizing consumption curves, thereby facilitating the prediction and assurance of consumption patterns required for the effective evaluation of energy storage strategies.Moreover, it is imperative that such partners maintain a commitment to reliability in service provision and the comprehensive operation of the LEC, thus ensuring system continuity and efficacy.
A significant advantage of industrial partners within LECs lies in the consistency of their consumption patterns once historical behavior has been established.These patterns tend to remain stable over time, except in circumstances where operational issues arise or The commercial customer within the energy community is delineated by energy consumption patterns primarily associated with commercial activities such as air conditioning, lighting, and refrigeration.This consumption is typified by a schedule that aligns closely with operational hours, typically spanning from 8 a.m. to 11 p.m.
The industrial entities under study are characterized by significant levels of baseline energy consumption and the presence of pronounced demand peaks.These partners contribute to stabilizing consumption curves, thereby facilitating the prediction and assurance of consumption patterns required for the effective evaluation of energy storage strategies.Moreover, it is imperative that such partners maintain a commitment to reliability in service provision and the comprehensive operation of the LEC, thus ensuring system continuity and efficacy.
A significant advantage of industrial partners within LECs lies in the consistency of their consumption patterns once historical behavior has been established.These patterns tend to remain stable over time, except in circumstances where operational issues arise or changes are implemented in internal industry processes.On the other hand, disadvantages associated with industrial clients initially manifest in the difficulty of predicting energy consumption in the absence of specific empirical data or references from analogous industries.Additionally, due to the high consumption levels characteristic of these clients, any anomaly or modification in their internal procedures can lead to significant imbalances in the energy dynamics of the LEC.This phenomenon underscores the importance of the detailed monitoring and management of industrial consumption to maintain overall community stability.The consumption profile of commercial entities exhibits a relatively uniform and predictable nature, as shown in Figure 9.The typology of commercial consumers has been identified as particularly conducive to integration with residential users, owing to the complementarity observed in their respective energy consumption curves.Specifically, the strategic use of energy storage by commercial consumers, predominantly during peak periods, signifies a high degree of self-sufficiency.This characteristic is clearly manifested when contrasting their production and consumption curves, indicative of the efficient and autonomous management of their energy resources.

Analysis of Energy Consumption and Generation in the Energy Community
Upon analysis of the performance metrics derived from the generation and energy consumption data of the energy community over its inaugural year of operation, the following annual average daily performance metrics were obtained, as shown in Figure 10.The typology of commercial consumers has been identified as particularly conducive to integration with residential users, owing to the complementarity observed in their respective energy consumption curves.Specifically, the strategic use of energy storage by commercial consumers, predominantly during peak periods, signifies a high degree of self-sufficiency.This characteristic is clearly manifested when contrasting their production and consumption curves, indicative of the efficient and autonomous management of their energy resources.

Analysis of Energy Consumption and Generation in the Energy Community
Upon analysis of the performance metrics derived from the generation and energy consumption data of the energy community over its inaugural year of operation, the following annual average daily performance metrics were obtained, as shown in Figure 10.
As shown in Figure 10, the energy consumption pattern of the household customers within the LEC exhibits significant peaks during the hours of 7 a.m. to 9 p.m. and 7 p.m. to 10 p.m. Notably, the LEC's overall energy consumption surpasses its generation capacity, yet surplus generation persists.This surplus arises due to the subdivision of the LEC into participation rights, wherein each customer possesses a proportionate share of the generated energy.Any excess energy not consumed by individual customers is subsequently routed to the grid for individual sale.their energy resources.

Analysis of Energy Consumption and Generation in the Energy Community
Upon analysis of the performance metrics derived from the generation and energy consumption data of the energy community over its inaugural year of operation, the following annual average daily performance metrics were obtained, as shown in Figure 10.As previously indicated, the LEC comprises a significant proportion of residential customers, whose consumption patterns are characterized by morning peaks between 7:00 and 8:00 a.m. and evening peaks between 7:00 p.m. and 10:00 p.m.Despite the aggregate consumption of the community exceeding the total generation, production surpluses are observed.This phenomenon is attributed to the structure of the LEC, where participation rights are fragmented, granting each customer a percentage of the total energy generated.In cases where a customer fails to consume their allocated share, the surplus is individually marketed on the grid.Consequently, while the LEC exhibits a negative balance between generation and consumption, there are individual customers who do not deplete their generated portion, underscoring the complexity of managing energy distribution in such communities.
Predicting individual and collective energy consumption within an LEC presents inherent complexity, especially in the absence of detailed historical data.The diversity of customer profiles contributes to this complexity, making the estimation of the community's overall consumption a challenging task.Therefore, it is essential for LEC administrators and entities interested in conducting feasibility studies for storage to have comprehensive historical records of energy consumption.These records should not only reflect past consumption but also the demographic and commercial composition of the community, allowing for a more accurate inference of future energy behavior.In this context, customer databases emerge as a critical resource, providing the necessary infrastructure for an indepth analysis and projection of energy surpluses, which are decisive elements in the planning and management of future energy flows.
Figure 11 shows the monthly proportion of generated energy within the LEC that remains unutilized by customers.It is discernible that, on average annually, approximately 23%-or nearly a quarter-of the energy generated within the LEC is left unused.
Upon verifying the surplus energy generation capacity, the data analysis suggests that the optimal investment, once seasonal variability is considered, involves sizing a battery storage system to optimize the use of the generated energy during both summer and winter periods.It is inferred that if the storage system were sized to accommodate the maximum volume of surpluses, its utilization rate would inherently be below unity, as full system utilization at 100% would only be achieved during days of peak surplus production.Therefore, a sizing approach is proposed that balances storage capacity with the frequency of surplus generation, ensuring more efficient and sustainable utilization of the system throughout the year.
nity, allowing for a more accurate inference of future energy behavior.In this context, customer databases emerge as a critical resource, providing the necessary infrastructure for an in-depth analysis and projection of energy surpluses, which are decisive elements in the planning and management of future energy flows.
Figure 11 shows the monthly proportion of generated energy within the LEC that remains unutilized by customers.It is discernible that, on average annually, approximately 23%-or nearly a quarter-of the energy generated within the LEC is left unused.Concerning the aggregate energy surpluses across each month within the LEC, as shown in Figure 12, a distinct seasonal pattern in surplus generation is evident.Months characterized by heightened solar exposure exhibit surpluses exceeding two-fold in comparison to months marked by lower solar energy generation.Upon verifying the surplus energy generation capacity, the data analysis suggests that the optimal investment, once seasonal variability is considered, involves sizing a battery storage system to optimize the use of the generated energy during both summer and winter periods.It is inferred that if the storage system were sized to accommodate the maximum volume of surpluses, its utilization rate would inherently be below unity, as full system utilization at 100% would only be achieved during days of peak surplus production.Therefore, a sizing approach is proposed that balances storage capacity with the frequency of surplus generation, ensuring more efficient and sustainable utilization of the system throughout the year.
Concerning the aggregate energy surpluses across each month within the LEC, as shown in Figure 12, a distinct seasonal pattern in surplus generation is evident.Months characterized by heightened solar exposure exhibit surpluses exceeding two-fold in comparison to months marked by lower solar energy generation.

Financial Evaluation of the Facility
The photovoltaic system installed in the Berrobi LEC operates within a collective selfconsumption framework characterized by surplus energy generation and simplified compensation mechanisms.The economic benefit derived from surplus avoidance is determined by the disparity between the cost per kW of energy consumption and the compensation received for surplus energy fed back into the grid.
The cost per kWh consumed is calculated as the product of the sum of energy costs, tariffs, charges, and electric tax multiplied by the value-added tax (VAT).The price per kWh of surplus energy is determined by multiplying the surplus price by the electric tax and the VAT.Conversely, the cost associated with each kWh managed by the battery throughout its operational lifespan is computed utilizing the levelized cost of storage (LCOS) methodology.0.00 100,000.00200,000.00300,000.00400,000.00500,000.00600,000.00700,000.00800,000.00900,000.00

Financial Evaluation of the Facility
The photovoltaic system installed in the Berrobi LEC operates within a collective self-consumption framework characterized by surplus energy generation and simplified compensation mechanisms.The economic benefit derived from surplus avoidance is determined by the disparity between the cost per kW of energy consumption and the compensation received for surplus energy fed back into the grid.
The cost per kWh consumed is calculated as the product of the sum of energy costs, tariffs, charges, and electric tax multiplied by the value-added tax (VAT).The price per kWh of surplus energy is determined by multiplying the surplus price by the electric tax and the VAT.Conversely, the cost associated with each kWh managed by the battery throughout its operational lifespan is computed utilizing the levelized cost of storage (LCOS) methodology.

LCOS
where • n: number of years of useful life; • OPEX: operating expenditures, comprising maintenance costs and losses attributable to battery cycle efficiency.
Consequently, for batteries to yield profitability, it is imperative that the following relationship be satisfied: Utilizing the economic model and the subsequent dataset provided below, the economic viability of the project was assessed based on the initial data, as depicted in Table 5.The average tolls and charges incurred during battery discharge hours are determined by calculating the mean value of these charges.For this computation, reference values from 2021 were employed, as governmental interventions in 2022 and 2023 saw reductions in charges as part of mitigation efforts to alleviate the repercussions of the conflict in Ukraine.
As depicted in the table, an average energy price of EUR 70 per megawatt-hour (MWh) was utilized for the study period, which stands below the prevailing energy cost.For surplus cost estimation, a rate equivalent to 70% of the energy cost was considered, amounting to EUR 49 per MWh.Leveraging these parameters alongside battery specifications and the utilization ratio (177 cycles per annum), economic analyses were conducted, yielding the ensuing outcomes detailed in Table 6.As evidenced, with a subsidy amounting to 75% of the investment, exclusive of financial costs, the energy storage system demonstrates economic feasibility.Notably, the disparity between the energy cost and surplus compensation price stands at 0.12 EUR/kWh, whereas the LCOS amounts to 0.097 EUR/kWh.Consequently, the minimum subsidy intensity required for the project's viability (excluding financial costs) would be 67%.
The economic viability of the project can be ensured through the establishment of a financially solvent model facilitated by collaboration with a financial institution, in this instance, the aforementioned financial entity.Under this arrangement, the LEC would secure 10-year financing under preferential terms covering 100% of the project cost.Importantly, it is the LEC that solicits the financing, not individual partners, thereby enabling compliance with the stipulated requirement for free exit.

Conclusions
Renewable energies offer a promising solution to our energy needs, boasting clean and abundant resources with numerous environmental, economic, and societal benefits.However, their integration into traditional energy grids faces challenges due to their intermittent nature.To overcome this hurdle, a deep understanding of energy consumption patterns within local energy communities (LECs) is essential.
By analyzing consumer behavior within LECs and forecasting peak demands, it becomes possible to effectively manage energy consumption during periods of low renewable output.This proactive approach, as outlined in previous sections, not only ensures financial stability but also maximizes environmental benefits.
Amidst rising energy costs and the urgent need to reduce greenhouse gas emissions, renewable energy and storage solutions present compelling alternatives.Through meticulous data analysis, economic evaluations, and cost assessments, this case study demonstrates the feasibility of utilizing renewable energy within LECs.
Encouraging research and development in energy storage technologies is crucial, requiring both economic incentives and collaborative efforts between the public and private sectors.Improving our understanding of energy consumption patterns is paramount, enabling us to select sustainable technologies and drive progress in environmental and economic sustainability.
The evolution of collective self-consumption presents numerous challenges but also opportunities.By harnessing individual surpluses and analyzing consumption curves within LECs, we can identify the necessary storage capacity to accommodate fluctuating demand.Considering the financial implications, public subsidies may be necessary to facilitate storage deployment in collective self-consumption scenarios.
Through the practical example of LECs, this research highlights the importance of consumer engagement in renewable energy production and consumption.Despite initial investment costs, the findings emphasize the financial viability of storage implementation within LECs when appropriately scaled.
This study revealed that storage capacity should support an average annual capacity of 23%, with fluctuations observed where this capacity may double or reduce to a minimum in certain months.
By considering current prices and costs, it was determined that under the premise of our case, which does not include an initial investment by the CEL, a significant public subsidy should be considered for installation, amounting to no less than 67%.The findings of this study highlight the pivotal role of energy communities in advancing the adoption of renewable energy and storage technologies.By empowering consumers to actively participate in energy production and consumption, energy communities foster a culture of sustainability, self-sufficiency, and cost reduction.While the initial investment in storage infrastructure may be substantial, the long-term financial viability and environmental benefits underscore its importance in achieving a cleaner, more sustainable energy future.

Figure 2 .
Figure 2. Control system of the photovoltaic plant with batteries for collective self-consumption.Berroni's LEC photovoltaic system.

Figure 2 .
Figure 2. Control system of the photovoltaic plant with batteries for collective self-consumption.Berroni's LEC photovoltaic system.

Figure 2 .
Figure 2. Control system of the photovoltaic plant with batteries for collective self-consumption.Berroni's LEC photovoltaic system.

Figure 3 .Figure 3 .
Figure 3. Energy generation by the photovoltaic system per hour.

Figure 4 .
Figure 4. Energy generation of the average LEC customer in a one-day interval.

Figure 5 .Figure 5 .
Figure 5. Power curve depicting the diurnal energy generation profile during a day in May for a consumer within the Berrobi energy community.

Figure 6 .
Figure 6.Annual grid discharges incurred by an individual consumer.

Figure 6 .
Figure 6.Annual grid discharges incurred by an individual consumer.

Figure 7 .
Figure 7. Mean monthly energy consumption for residential customers.

Figure 7 .
Figure 7. Mean monthly energy consumption for residential customers.

Figure 8 .
Figure 8. Energy consumption patterns of industrial customers.

Figure 8 .
Figure 8. Energy consumption patterns of industrial customers.

Figure 9 .
Figure 9. Mean monthly energy consumption for commercial customers.

Figure 10 .
Figure 10.Energy consumption and annual average daily generation within the LEC.

Figure 10 .
Figure 10.Energy consumption and annual average daily generation within the LEC.

Figure 12 .
Figure 12.Monthly surplus energy generation within the LEC.

Figure 12 .
Figure 12.Monthly surplus energy generation within the LEC.

Table 2 .
Energy storage system of the photovoltaic system.
kWh h Figure 4. Energy generation of the average LEC customer in a one-day interval.

Table 2 .
Energy storage system of the photovoltaic system.

Table 3 .
Photovoltaic and storage operating indicators.

Table 6 .
Economic costs of the LEC per kWh.