Energy communities in the BeFlexible project
Article by José Villar, Luís Rodrigues, André García, Ricardo Bessa, Fábio Coelho, Rafael Costa e João Mello, from INESC TEC.
Energy Communities (ECs) are a key focus of the European Union’s new energy strategy, with Member States (MS) currently transposing EU directives into their national regulations and progressively adapting and improving them. The concepts of ECs and self-consumption were introduced through Directives 2018/2001 and 2019/943 on the internal EU electricity market, as well as Directive 2019/944, which establishes goals for energy use from renewable sources. Their main objective is to deliver environmental, economic, or social benefits to their members, shareholders, or the local areas where they operate, rather than prioritizing financial profit. Energy communities can implement collective self-consumption, a regulated activity that enables the use of self-generated energy by allocating the surplus energy produced by generating members to other community members who are consuming energy.
Renewable Energy Communities (RECs), limited to renewable energy generation and geographically constrained, can take various forms, such as condominiums sharing a common rooftop PV system, neighborhoods or villages with one or multiple PV installations on nearby lands, or diverse groups of local consumers, industries, and public or private service facilities. These communities can collectively own and share energy assets, distribute electricity surpluses to REC members in need, and implement energy-related projects and joint procurement for the common good.
Matching local renewable energy generation with consumption provides implicit balancing flexibility to the power system, as community members will be willing to adjust their energy usage to take full advantage of locally produced, cheaper green energy. This adaptation enhances the balance between consumption and generation at the local level, contributing to renewable energy integration.
Moreover, energy communities can act as natural aggregators of their members, with the potential of providing explicit flexibility to grid operators, thereby supporting grid operation and stability.
INESC TEC brings to the BeFlexible project its digital platform RECreation for the planning and operation of energy communities, originally described in [1], and schematically shown in Figure 1.

Figure 1 – RECreation digital platform for the planning and operation of energy communities
RECreation integrates the energy services and modules needed for the different running modes of a REC, including:
- Front end: with several REC configuration options and a dashboard to inform the REC manager and the REC members on the operation of the REC.
- Data base: with structural data regarding the REC structure definition, and economic and energy data such as the opportunity costs of the REC members, consumption and generation data, and settlement results.
- Transactions module: to compute the local energy transaction and prices according to the selected business model.
- Settlement module: computes the internal compensations derived from the local energy transactions, and the energy allocation performed by the DSO and the grid access tariffs charged to the EGAC (REC manager in the Portuguese terminology) for verification. From the settlement results, RECreation prepares a billing guide in Excell format with the information needed by an invoicing system to invoice the internal compensations among members for each settlement period (typically monthly).
- Energy management module: computes the setpoints of the flexible resources (pre-delivery optimization), and can also compute the optimal transactions according to predefined criteria (post-delivery optimization).
- Sizing module: for sizing new resources for the energy community.
Two main types of energy allocation modes are considered (see [2]). Pre-delivery allocation methods rely on allocation coefficients that are determined independently of the final metered energy. Examples include the fixed coefficients specified in the Portuguese regulation or those proportional to contracted power under the Spanish regulation. In contrast, post-delivery allocation coefficients are calculated based on the final metered energy after delivery. These coefficients can be, for instance, proportional to consumption or dynamic. Dynamic coefficients, calculated by the REC manager using metered energy data provided by the DSO, are then shared with the DSO to perform the energy allocation. This approach offers greater flexibility compared to pre-delivery methods.
Enhancing the RECreation digital platform
In the BeFlexible project, INESC TEC is enhancing the RECreation digital platform in several key areas to address emerging challenges and opportunities in energy management and flexibility provision.
The first enhancement involves the development of a comprehensive framework, and the implementation of the tools needed for the provision of explicit flexibility to third parties by the energy community, such as supplying flexibility to the local distribution system operator (DSO), as illustrated in Figure 2.
Under this framework, the REC manager functions as the aggregator of the community members’ resources, operating them in a centralized manner. The REC manager provides a baseline for flexibility verification, which reflects the REC’s optimal operation had no flexibility been requested. When the DSO specifies the hours and values of its flexibility needs, an iterative optimization procedure determines the optimal flexibility to be offered based on a set of expected flexibility prices. This process results in the creation of a flexibility curve to address flexibility prices uncertainty.
Once the local flexibility market is cleared, the selected flexibility is communicated for activation. The aggregator then determines the final setpoints for the flexibility assets to ensure the optimal delivery of the requested flexibility.
Following flexibility delivery, the local energy transactions, reflecting the energy shared among REC members while accounting for flexibility provision, must be calculated. This enables the determination of allocation coefficients sent to the DSO to allocate energy and inform energy suppliers of the final energy supplied, reduced by the energy self-consumed. For this, the RECreation settlement framework is being enhanced to compute the allocation coefficients and to account for, not only compensation from consuming to generating members, but also the additional revenues generated through flexibility services. Note that, as explained in [2], dynamic allocation coefficients, are essential to enable the provision of local flexibility from the REC. Dynamic allocation coefficients are already implemented in the Portuguese and French regulatory frameworks, among others, but not yet in the Spanish one.

Figure 2 – Framework for the provision of explicit flexibility from energy communities
The second enhancement of RECreation, originally designed as a standalone platform, is its integration with the Grid Data and Business Network (GDBN) as an aggregator, by sending the baseline to the GDBN, receiving the flexibility needs, sending the flexibility bids, and activating the flexibility finally selected by the DSO, as shown in Figure 3.

Figure 3 – RECreation integrated as aggregator with the GDBN
Indeed, as described in [3] and in [4], the GDBN is a digital platform designed to support the key stages of the flexibility value chain, streamlining processes and contractual agreements necessary for flexibility provision. Acting as an engagement driver, the GDBN helps unlock flexibility potential by integrating third-party services and digital platforms, including existing commercial local flexibility market (LFM) platforms. Furthermore, the GDBN offers additional services, such as flexibility activation, which are often not included in standard LFM platforms. By serving as an interoperable proxy among aggregators, LFM and DSOs, the GDBN facilitates participation in flexibility markets and ensures the seamless activation of flexibility services as requested by the DSO.
Finally, it is expected to integrate RECreation with SAP invoice management system, a definite standard for many businesses and firms. The integration of the RECreation platform with SAP’s billing system comes as one of the steps of the integration within SAPs ecosystem, which will later unlock the deployment environment to make the software available as a product in SAP’s Store. This is supported by a deployment of the RECreation platform in SAP’s operational ecosystem, designed as BTP (Business Technology Platform) which makes several services that cater for infrastructure and cloud services. Specifically, the platform will be deployed considering SAP’s Kyma Environment, a branded Kubernetes clustering option that supports a virtual and containerized deployment option, offering scalability and elasticity options that may cater for scaling the service needs if needed during service production. The approach will make each module/component of the RECreation platform an individual container. The integration with external services provided by SAP, namely the invoicing system is performed by adopting the internal invoicing service API with RECreation’s settlement mechanism, which provides information on the final balances of consumers. This information is then taken by the invoicing service that forwards the balances due by each customer through its own dissemination channels.
The Kyma environment as tool to support elasticity and modular components offers thus the scaling according to demand, together with fault-tolerance mechanisms to the GDBN and RECreation platform, ensuring industry standards compliance, up-time and configurable quality-of-service.
Conclusive remarks
This article explores how the BeFlexible project leverages the potential of energy communities for flexibility provision by integrating RECreation, INESC TEC’s platform for managing energy communities, into the value chain activities supported by the GDBN digital platform. This integration involves developing advanced procedures within RECreation’s energy management system to build flexibility bids and seamlessly transmit them to flexibility markets via the GDBN, which acts as an interoperable gateway. Additionally, it includes adapting RECreation’s database and workflows to handle flexibility-related data and optimizing the operation of energy communities by calculating the final setpoints of flexible assets to deliver the committed flexibility upon activation requests from the GDBN. Finally, integrating RECreation into robust ecosystems like SAP enhances scalability, operational efficiency, and alignment with industry standards, ensuring the platform’s readiness for broader deployment and long-term sustainability.
This article summarizes key takeaways from Deliverable 1.2, titled “Framework for a flexibility-centric energy and cross-sector value chain, business use cases and KPI definition” developed within the framework of the BeFlexible project. To access the complete document, please click here.
Stay tuned with BeFlexible by following us on LinkedIn and X!
