Integrating Plus Energy Buildings and Districts with the EU Energy Community Framework: Regulatory Opportunities, Barriers and Technological Solutions

The aim of this paper is to assess opportunities the Clean Energy Package provides for Plus Energy Buildings (PEBs) and Plus Energy Districts (PEDs) regarding their economic optimization and market integration, possibly leading to new use cases and revenue streams. At the same time, insights into regulatory limitations at the national level in transposing the set of EU Clean Energy Package provisions are shown. The paper illustrates that the concepts of PEBs and PEDs are in principle compatible with the EU energy community concepts, as they relate to technical characteristics while energy communities provide a legal and regulatory framework for the organization and governance of a community, at the same time providing new regulatory space for specific activities and market integration. To realize new use cases, innovative ICT approaches are needed for a range of actors actively involved in creating and operating energy communities as presented in the paper. The paper discusses a range of different options to realize PEBs and PEDs as energy communities based on the H2020 EXCESS project. It concludes, however, that currently the transposition of the Clean Energy Package by the EU Member States is incomplete and limiting and as a consequence, in the short term, the full potential of PEBs and PEDs cannot be exploited.


Introduction
In 2019, the "Clean Energy for all Europeans" Package (in the following Clean Energy Package or CEP), a set of directives and regulations, was adopted, among others, to deliver on the EU's Paris Agreement commitment to reduce greenhouse gas (GHG) emissions by 40% compared to 1990 by 2030 [1]. In 2019, the EU 2030 GHG emissions target was raised to 55% as part of the EU Green Deal [2]. Given the ambitious EU climate targets for 2030 and the high relevance of the building sector for emission reductions, the concepts of Plus (or "positive") Energy Buildings and Districts (PEBs and PEDs) are gaining increasing attention. While the Nearly Zero Energy Buildings (NZEBs) concept is already part of EU legislation, there are at least indicative policy goals also for PEDs: The Strategic Energy Technology (SET) plan aims to implement about 100 PEDs in Europe by 2025 [3]. PED Buildings 2021, 11,468 2 of 16 concepts are not new, however, there were major regulatory constraints regarding the interaction between individual buildings and with the energy system and market. Thus, except for planning and optimization from the energy system perspective, PEDs could rather be seen as the sum of their individual buildings and onsite technologies than as a highly interacting and flexible system. In addition, suitable organizational models for actors related to PEDs are not sufficiently available yet.
This may change with the Clean Energy Package that includes energy communities as new regulatory and organizational formats for, among others, collective decentralized renewable energy generation and consumption. This new concept may well serve to frame the implementation of PEBs and PEDs and support them in fulfilling their function as an active element in the energy system. Besides the mere generation of surplus energy, this may include multiple roles for using technologies and addressing the broader integration in the energy system. Thereby, the possible functions of PEBs and PEDs for decarbonisation could be optimized by going beyond just maximizing onsite self-consumption and sharing excess energy.
The concept for energy communities is enshrined in the recast of the renewable energy directive (REDII; defining "Renewable Energy Communities") and the new electricity market directive (EMD; defining "Citizen Energy Communities"). Besides providing organizational frameworks and new legal opportunities regarding specific rights for energy communities to act in the energy market, the EMD also strengthens the market access of aggregators and the provision of flexibility in the energy system in general. The EU energy community frameworks specifically include provisions on the possibility to share energy within a community, including through the public grid. Thus, energy communities provide room for new activities of PEBs and PEDs as the internal exchange of energy is no longer limited to the building level but opened to other buildings, the district and the market. Thereby, new revenue streams and optimization options could improve the business case of PEBs and PEDs and may lead to a faster market roll-out. The link between PEBs and PEDs and the new regulatory opportunities of the Clean Energy Package has already been addressed to some extent in the recent literature (see Section 3), so far, however, no comprehensive assessment has been made. While the aims of the different directives of the Clean Energy Package may be synergetic with PEB and PED aims, further analysis is needed on concrete use cases, technology solutions and organizational formats.
The aim of this paper is therefore to systematically analyse possible new opportunities and limitations for PEBs and PEDs based on the EU framework for energy communities and related national transpositions. The paper is written in the context of the H2020 project EXCESS on Plus Energy Buildings but also takes into account insights from a range of other ongoing H2020 projects including projects on energy communities in which the authors of this paper are involved.

Ambition and Methods
So far, assessments on the relationship between the Clean Energy Package and PEBs/PEDs were only partially made, not taking into account the full range of new regulatory options and not investigating the synergies of the new directives in the context of PEBs and PEDs. These previous assessments include Østergaard Jensen et al. who emphasize the important role of flexible buildings to provide local flexibilities to DSOs [4]. Shnapp et al. [5] relate the minimum energy requirements for districts and buildings as defined in the Energy Efficiency of Buildings Directive (EPBD) to the definition of Renewable Energy Communities. Karg [6] considers PEDs as one category of energy communities, while Tuerk [7] mentions PEDs as a potential nucleus for energy communities. Magrini et al. [8] linked PEDs to the prosumer concept of the Clean Energy Package stating that the theory of individual prosumers that cooperate for the energy needs of entire communities perfectly aligns with the concept of PEDs. Moreno et al. were more specific stating that spatial boundaries of PEDs could follow the ones that need to be defined for Renewable Energy Communities and Citizens Energy Communities [9]. The European Environmental Agency furthermore stresses the social innovation aspects of energy communities, emphasizing that communities are "a locus for innovation", providing great opportunities for learning and networks, and offering the possibility of achieving a whole-system change at local scales [10]. The JPI Urban Europe White Paper on a PED Reference Framework finally mentions the important role of the energy community concept for finding PED business models [11].
The key novelty of this paper is to systematically assess to what extent the new EU provisions on energy communities and their national transpositions could unlock the full potential of PEBs and PEDs. The research hypothesis of this paper is that these new regulatory frameworks have the potential to importantly support the implementation of PEDs and PEBs by • fostering their internal optimization as well as system and market integration, • unlocking new use cases, improving business cases, and, as a consequence • improving their function for decarbonisation of the energy system.
The paper addresses both, PEBs and PEDs as in the context of energy communities no clear boundary between the concepts can be drawn. While PEBs in the past focus rather on the single building, recent definitions (see Section 3.1) also emphasize the energy exchange with other buildings. Clusters of buildings may already shift the focus from a single building to a more district-oriented (PED) approach. In addition, a PED may be formed by a group of PEBs as well as other types of buildings such as NZEBs, leading to a synergy between the different concepts. The paper however addresses NZEBs less explicitly as they address the system benefits of surplus energy generation to a lower extent. However, NZEBs are the only concept being legally defined so far and can fulfil important functions in the context of district and community-oriented initiatives. Thus, all of these concepts are interrelated and may be importantly supported by the new opportunities within energy communities.
The work was carried out in several steps. The first step was based on literature review of the NZEB/PEB/PED concepts outlining new options a community-based approach provides compared to the current building-oriented NZEB and PEB approaches. In a second step, an assessment was made to what extent the Clean Energy Package provisions on energy communities and other related provisions can enable new use cases for the optimization of PEBs and PEDs, both community-internal but also as part of the broader energy system. In a third step, work carried out under the EXCESS project was presented: this includes ICT needs that were investigated based on a range of interviews, the EXCESS ICT approach enabling PEBs and PED to become energy communities as well as an analysis and comparison on how the EXCESS demos plan to become energy communities. The approaches and limitations observed were then put into a broader context including findings from related projects in order to draw robust policy conclusions.

From Nearly Zero Energy Buildings to Plus Energy Districts
Nearly Zero Energy Buildings (NZEBs), Plus Energy Buildings (PEBs) and Plus Energy Districts (PEDs) can very generally be distinguished in terms of (1) their energy performance/efficiency, (2) the degree to which their energy generation covers or overshoots their own demand and (3) the scale the concepts refer to (building or district). While the terms "plus energy buildings" or "plus energy districts" have not yet been defined in EU regulation, Nearly-Zero Energy Buildings have been defined in the Energy Performance of Buildings Directive (EPBD). Within the EPBD it is stated that "a nearly zero energy building means a building that has a very high energy performance" and that the remaining energy required "should be covered to a very significant extent by energy from renewable sources, including energy from renewable sources produced on-site or nearby". The directive further declares that starting 2019 all new buildings occupied and owned by public authorities are to be NZEBs. This requirement is expanded to all buildings by 2021. The exact definitions of NZEBs are, however, left to the Member States.  [8] for example mention that PEBs include a more complex structure of energy exchanges than NZEBs. Moreover, energy generation in PEBs and even more PEDs may not be based on a single building but rather on a system-based approach. Juusela et al. [12] emphasize the need for energy flexibility of a PEB but also the ability to integrate future technologies such as electric vehicles. Shnapp et al. [5] state that, from an energy perspective, moving beyond NZEBs to PEBs and PEDs provides opportunities to achieve better cost-effectiveness of energy efficiency and renewable energy systems. Hedman et al. [13] argue that in PEDs the renewable energy supply and demand can be unevenly distributed throughout the district, which allows a more strategical installation of renewable energy systems and energy storage. According to Hedman et al. the aim of a PED is not only to generate surplus energy, but rather to minimize the impact on the centralized grid by promoting higher self-consumption and selfsufficiency. The PED thereby should offer options to increase the onsite load matching by allowing the integration of long-and short-term storage and smart controls for improving energy flexibility [13]. Also the JPI Europe White Paper on a "PED Reference Framework" mentions the important role of PEDs as a provider of energy flexibility. Thereby, PEDs would actively contribute to the resilience and balancing of the regional energy system, to reach carbon neutrality with 100% renewable energy in the local consumption, as well as to achieve a surplus of renewable energy over the period of a year [10]. Carbon neutrality is generally gaining increased attention in PEB and PED definitions, current PED definitions often consider (embodied) greenhouse gas emissions or even require a net zero-emissions balance of the PED [3]. Table 1 shows a comparison of the three concepts based on the stated sources. The shift of discourse from buildings to districts has important implications also for the characteristics and requirements of buildings. The buildings' ability to interact with other buildings or the grid is of high relevance for district optimization. When placing a zero or plus-energy objective on a district, the diversity of the energy interplay of the buildings' different energy performances and production capabilities determines the opportunity to share the neighbourhood's energy needs, costs and resources (see [15]). Recent literature, therefore, links new and more systemic PED concepts with possible new roles and requirements for NZEBs and PEBs referring to a needed high efficiency and flexibility [14].

Plus Energy Buildings and Districts in the Context of the EU Energy Community Framework
So far, there have been limited options to actively manage and optimize PEBs and PEDs. The Clean Energy Package includes two types of energy communities as defined in the recasts of the renewable energy directive and the recast of the electricity market directive (REDII and EMD). "Renewable Energy Communities" (RECs, defined in the REDII) and "Citizen Energy Communities" (CECs, defined in the recast EMD) allow citizens, public authorities and specific types of companies to collectively organize their participation in the energy system including energy generation, self-consumption, sharing, storage, and selling of energy. Both types of energy communities have to become a legal body, the legal forms allowed are defined by the Member States. Furthermore, the REDII defines "Renewables Self Consumers" providing a basis for individual and collective self-consumption (CSC) as an activity rather than an organizational format [16].
Renewable Energy Communities address all types of renewable energy and have a local character. They could provide a suitable framework for PEBs and PEDs by defining their geographic scope, the eligibility of members and their governance, as well as the general purpose of the community. Focusing on an increased share of renewable energy in the system or collectively self-consumed within the community, RECs are supposed to receive public support. Citizen Energy Communities on the other hand can operate over a larger area, limited only by national borders or even involving international cooperation. Being defined in the recast EMD, their scope includes electricity only. Besides the inclusion of activities comparable to RECs (generation, consumption, storage, sale), Citizen Energy Communities have an emphasis on non-discriminatory access to the electricity markets, either directly or through aggregation. CECs may also engage in distribution, aggregation, and energy-related services such as energy efficiency or charging services. CECs, being entitled to freely act on the market, are not eligible for public support specific to energy communities. Both, RECs and CECs may have natural persons, SMEs and local authorities as members or shareholders that may also exercise decision-making power ("effective control") but RECs exclude large-sized companies from effective control while CECs exclude large-and medium-sized companies [16]. In the context of PEBs and PEDs, SMEs could include housing associations or building managers that may take on new roles via operating energy communities.
Two major principles of both types of energy communities that open up new possibilities for PEBs/PEDs are the access of "non-professional" actors to the energy markets as well as the right to use the public grid for community-internal sharing. The latter increases the potential for interactions and optimizations between buildings. In addition, depending on the national frameworks, RECs and CECs may be entitled to operate electricity or heating grids, which may equally support the PED internal energy exchange. PEBs and PEDs conceptually have more similarities to RECs than to CECs given their local character and a restriction to renewables in all current PEB and PED definitions. In addition, for RECs, supportive frameworks are emerging in several EU Member States, including, e.g., reduced grid tariffs for internal electricity sharing, improving the business case [17]. CECs may, however, also be an interesting frame for PEDs. They are hardly restricted in their geographical expansion and could serve as an umbrella for several PEDs and other districts but also allow to include renewable energy generation units that are not in proximity to the district but still part of a PED. CECs would not only allow for a broader exchange of electricity, but for a joint integration in the electricity market, e.g. for the collective marketing of flexibilities or surplus electricity. To this end, a CEC could itself act as an aggregator which may facilitate meeting the minimum capacity requirements that exist on many flexibility markets. However, also, the more limited energy sharing concept of the Clean Energy Package, collective self-consumption, could help optimize the use of renewables at the building level, or at the level of clusters of buildings depending on the national legislation that defines the spatial scope for such activities. Collective self-consumption may be an alternative in case the organizational and legal requirements for an energy community may be seen as too challenging.
Other provisions of the Clean Energy Package relevant to energy communities include Art 32 of the EMD that aims to provide incentives for the use of flexibility in distribution networks. Specifically, the article requires Member States to establish frameworks and incentives for grid operators (DSOs) to procure flexibility services based on, e.g., distributed (renewable) generation, demand response or energy storage, including through aggregation. PEDs may as well provide such services and could thus benefit from the establishment of suitable national frameworks. Table 2 summarizes examples of important new regulatory features of the CEP of high relevance for PEBs and PEDs.

Key Features REDII EMD
Framework for citizen participation and governance X X Integration of "non-professional" actors in the energy markets X X Energy sharing via the public grid X X Ownership and operation of local grids (if Member States allow it) X X Provision by energy communities of a range of services to markets, such as for energy efficiency X Provision of local/small scale flexibilities to markets X There are several other directives or provisions in the Clean Energy Package that can be seen as enablers for PEBs/PED becoming energy communities. This includes Art 15 of the REDII requiring a minimum level of renewables in new and renovated buildings. The Energy Performance of Buildings Directive at the same time requires Member States to develop comprehensive long-term renovation strategies, including initiatives to "promote smart technologies and well-connected buildings and communities" [18]. As the optimisation potential of energy communities strongly depends on the ability of different building units to operate in a flexible way the EPBD's provisions to create smart readiness indicators (SRI) are highly relevant. The SRIs consider the flexibility of a building's overall electricity demand, including its ability to enable participation in active and passive as well as implicit and explicit demand response in relation to the situation of the public grid.

Implementing PEBs and PEDs as Energy Communities: Approaches of the EXCESS Project
This section first provides an overview of suitable technologies for PEBs and PEDs and then presents the EXCESS ICT framework including key innovations that are needed to realize energy communities. Furthermore, the section presents approaches of EXCESS demonstrations to become energy communities outlining technological innovations combined with ICT solutions applied as well as regulatory barriers the demos faced.

Technology Outlook for PEBs and PEDs in the Energy Community Context
While energy efficiency should be a key consideration to reach a positive energy balance, also renewable and supporting technologies in plus energy buildings and districts have a major role in increased self-consumption and flexibility provision. A higher share of renewable energy sources for heating, cooling and electricity, compared to current business-as-usual practices can be achieved by integration of renewable energy sources into buildings and their immediate surroundings, such as PV on facades and stand-alone RES production facilities [14]. An advantage of PEDs is the opportunity to install more centralized and locally shared technologies and infrastructure such as centralized storage systems, improving the business case. Unlocking flexibilities from individual, smallscale devices, at the same time, can be very complex due to social and technical barriers and therefore costly. The energy community concept can help to optimize the use of infrastructure via the exchange of energy and flexibilities, pooling flexibilities offers to markets and enabling multi-use cases of technologies.
There is a range of literature on suitable technologies and technology combinations for PEBs and PEDs [11,19,20]. PEBs/PEDs implemented as an energy community should align the technology choice with new use cases that are enabled by the CEP. In case PEBs/PEDs have a high focus on seasonal self-sufficiency, this could lead to issues for the existing energy market system and actors, such as in the case a high share of solar energy is fed into the grid in summer, while a large amount of energy is taken from the public grid in winter, thus using the grid as virtual storage. Seasonal storage solutions therefore may become valuable for a good interaction with the surrounding energy system [21]. In this context, geothermal energy is not only a renewable energy resource delivering heating and cooling anytime and anywhere but soil and bedrock offer a suitable solution for the integration of solar energy and residual heat in all the EU heating-dominated climates Buildings 2021, 11, 468 7 of 16 that need seasonal storage for solving the seasonal energy mismatch. Geothermal heat pumps connected to a deep borehole recharging the underground as tested in EXCESS have a high COP and could represent a viable solution for heating-dominated climates, such as the Nordic countries [22]. Solar energy is a viable solution towards Nearly Zero Energy Buildings even in locations with low solar irradiance [23]. However, in central and northern Europe, PEBs/PEDs may not reach enough onsite energy generation and storage to achieve a net-zero yearly balance (yearly onsite produced renewable energy equals building energy demand), if conventional solar technologies are used (either PV or solar thermal) [24]. Thus, while conventional solar technologies can be used for achieving plus energy buildings in continental and mediterranean climates, solar hybrid solutions, such as combined photovoltaic and solar-thermal panels (PVT), are the products best positioned to respond to oceanic and nordic climates as they maximize the energy use of the solarized surface.
Different technologies can be used as energy flexibility sources at the building and district level. Energy storages are the main conventional source of flexibility. Others are aggregated controllable Heating, Ventilation and Air Conditioning (HVAC) loads, realizing fast balancing or frequency response, or power-to-heat demand response solutions (such as heat pumps combined with storages, boreholes and/or water tanks and/or floor heating as thermal mass solutions) [19,22,25].
Assuming that a future official PED definition will include a net-zero emission balance, an allowable limit of GHG emissions per unit of generated/consumed thermal/electrical energy will also gain importance in technology choice. Pucker et al. [26], for example, showed that storage solutions to increase the self-sufficiency in decentralized renewable energy systems not always reduce GHG emissions due to embodied emissions, but also due to direct emissions caused by the energy needed to produce and operate the devices as well as the related losses. Thus, renewable energy sources and technology portfolios have to be selected based on a number of factors: local climate, market and regulatory conditions (e.g., on energy transactions), the ability for multi-use applications, the onsite building characteristics in order to match building load profiles and renewable energy sources and, finally, direct and indirect GHG emissions.

ICT Framework for Energy Communities based on PEBs/PEDs
The Clean Energy Package empowers a range of new actors in the energy sector but also provides opportunities for new roles of traditional actors. These include aggregators, who will get better market access, service providers, such as ESCOs or IT companies, building managers, municipalities that may build the grid infrastructure and, finally, building occupants. Some of them can take on several roles. All of them have information and data needs but also require new IT tools and approaches to enable the activities shown in Table 2. This section therefore first describes ICT needs of different actors, and then outlines the EXCESS ICT framework.
Within EXCESS, actor's ICT needs in the context of PEB use cases were assessed based on 43 interviews in the demo countries (among them building occupants, building managers and aggregators [27]).
Aggregators highlighted the need to be able to manage and optimize the assets in the PEB/PEDs and enable trading including to markets. In order to optimize services they could offer on markets, analysing occupants' flexibilities on a district/community level are highly relevant towards increasing monetary benefits for both sides through the provision of ancillary services to network operators [27].
Building/district managers have shown within the interviews a high interest in moving beyond their traditional activities enabling trading the building's non-self-consumed energy in local flexibility and energy markets towards monetary gains via cooperating with aggregators. Preconditions, however, are careful consideration of comfort standards and as stated by consumers, clear, transparent and consumer-protecting regulations that ensure customer rights as well as savings in the energy bills of residents [27].
Service providers may control the district network, manage sharing the buildings/districts energy and flexibility for optimizing the performance of the neighbourhood.
Building occupants showed interest to monitor their energy consumption and flexibility via mobile apps. This may stimulate prosumer engagement towards increasing self-consumption and energy performance of building blocks and districts [27].
In order to equip the above-mentioned actors with the needed tools and realize new use cases under energy communities, the ICT framework plays a crucial role. Key innovations of the EXCESS ICT framework are: • Advanced data analytics for actors controlling the system and providing services to markets; • Advanced software solutions for sharing within the community; • Different data visualization approaches either for aggregators and building managers or for occupants.
The EXCESS ICT framework, therefore, includes the Data Management Platform, the Data Analytics Framework, the Model Predictive Control component, a Data Visualizations Framework and blockchain infrastructure and applications.

EXCESS Data Management Platform
The EXCESS Data Management Platform is responsible for the collection and management of all types of data coming from various sensors, submeters and energy components of the distributed information systems in the EXCESS demo sites. It aims, among others, to enable interoperability and data protection, key issues in setting up energy communities [28]. The Data Management Platform consists of different components that perform the various necessary data management processes including ingestion, mapping, cleaning, anonymization and storage, so that the collected data can then be used for analytical purposes by the Data Analytics Framework, for control strategies optimization by the Model Predictive Control component and for the operations of the visualization and blockchain applications [29]. An EXCESS user management service facilitates the authentication and authorization of users in the EXCESS Data Management Platform. It performs the necessary authentication mechanisms for entering the platform, while setting the different types of users and user groups. It also defines the access rights control in the EXCESS Data Management Platform, specifying which datasets can be accessed by certain users or user roles and ensuring that no unauthorized data access is performed [27]. In the context of the Data Management Platform, the EXCESS Common Information Model is developed in order to semantically model all the necessary information regarding the development, installation, deployment and operation of the PED system. The EXCESS Common Information Model constitutes a common language for all the different datasets that will reside in the EXCESS Data Management Platform enhancing their alignment and interoperability.

EXCESS Data Analytics and Control Framework
The EXCESS Data Analytics Framework is responsible for the performance of analytical activities using the data residing in the EXCESS Data Management Platform providing important information to actors controlling the system and providing services to market such as aggregators. The framework exploits a series of mostly pre-trained algorithms in order to include meaningful analytical results that will be used by the Model Predictive Control component where the constraints and various variables are controlled to achieve the PEB and PED concepts, as well as the various visualization and blockchain applications.
A key innovation of EXCESS is the comfort profiling component of building occupants, which enables unlocking households' flexibilities [27]. The comfort preferences of the building occupants will be extracted based on the sensor measurements and other metrics of the buildings. Through the performance of profiling analytics, their comfort profiles will be derived subsequently. The combination of the comfort profiles with the energy and demand forecasts for the building provides context-aware flexibility profiles of the devices and loads in the building through the respective profiling mechanisms of the context-aware flexibility profiling and analytics component. These are the flexibilities of the devices and loads, such as a small change in the temperature set point of an HVAC system, which is created due to a dynamic adaptation of the energy demand according to a corresponding slight change within the comfort bounds preferences of building occupants without actually affecting their comfort. These context-aware flexibility profiles will also be utilized by a dynamic Virtual Power Plant (VPP) configuration component that will run multiple alternative scenarios in order to find the optimal flexibility-based surplus energy scheme that can be communicated to an aggregator for possible trading on the energy market.

EXCESS Data Visualizations Frameworks
Data visualization frameworks were developed for aggregators, building managers and for occupants aiming to change their behavior. Visualization applications provided to aggregators and building managers, use data coming either directly from the EXCESS Data Management Platform or from the analytical results of the EXCESS Data Analytics Framework. The flexibility analytics visualizations enable aggregators to view demand flexibility and energy generation forecasts from buildings through corresponding analysis of data, allowing them to understand which buildings can provide flexibilities and select the optimal VPP configuration for provision to the energy grid. In that way, the aggregators address the grid requirements set by DSOs through the constant monitoring of the performance of their established clusters/VPPs and identification of potential flexibility overrides that are tackled by the appropriate modification of VPP schemes. The energy consumptions visualizations give building managers the opportunity to monitor the energy profiles and patterns in the building through dashboards and enriched energy analytics. The visualizations are produced by data coming from sensors and submeters regarding the buildings' energy consumption and demand based on the building occupants' energy behaviors. In that way, the building managers will understand what energy behaviors and patterns can lead to the achievement of energy savings in the building. For occupants, a mobile app was developed that comprises energy performance indicators that stimulate ecological and economic energy consumption including production and consumption values, energy score, energy savings, and corresponding monetary values, where applicable.

EXCESS Blockchain Infrastructure and Applications
The emerging blockchain mechanisms have proven successful for the transparent, secure, reliable and timely management of energy flexibility transactions by adapting energy demand profiles of consumers of distributed energy resources to all the stakeholders involved in the flexibility markets [30]. The EXCESS blockchain infrastructure comprises the basis for the design and implementation of standardized energy exchange rules, mechanisms, agreements and demand response smart contracts towards enabling automated settlement and verification when underlying events occur. Two distinct applications are developed for operation in the EXCESS demo sites:

•
An application for facilitating the establishment of energy communities and benefitsharing among prosumers out of the deployment of energy optimization strategies (Austrian demo); • An application for the execution of explicit demand response programs through flexibility trading with energy market actors (Belgian demo).
The Objective Benefit Sharing Application (OBS) utilizes blockchain technology to enable automated governance of community installations and trading shares of assets and the resulting generation. As shareholders, producers can get involved in the decision-making process as well as in the definition of contract rules, and they can trade their shares. By using different indicators, shareholders can stimulate different energy optimization strategies of their choice is assisted by visualisation approaches of the energy app as described above. Energy optimization strategies are built upon thresholds and parameters governed within smart contracts. For every billing cycle, these thresholds and parameters are combined with metering data. Subsequently, rules defined by the shareholders are applied. This process enables automatic invoicing, incentivizing beneficial consumer behaviour, and dividend pay-out. The Explicit Demand Response Application enables flexibility sharing and pooling for the realization of demand response services resulting in maximization of benefits for prosumers through their participation in energy markets. Using the analyses and forecasts coming from the Data Analytics Framework as input, aggregators are able to publish their demand response offers (flexibility requests) and associated strategies to attract prosumers and engage them in demand response services through the signing of blockchain-powered smart contracts.

Approaches of EXCESS Demonstrations to Become Energy Communities
This section provides an overview of the EXCESS demos presenting approaches to implement use cases enabled by the Clean Energy Package with a focus on energy communities. The four EXCESS demos are in different climate zones, have different technological concepts and are also significantly different in their scope to establish energy communities as Table 3 shows. All demos aim at making use of the national energy community or self-consumption frameworks.

Austrian Demo
A former commercial zone is transformed into an area with mixed use including offices, recreation zones, and a student hostel. In total, the 19 buildings in the area are being refurbished towards passive house standards while increasing the share of locally produced renewable energy (solar energy, small hydropower). Through the integration of innovative elements for load shifting, storage, user integration, interaction with the local electricity grid as well as smart predictive control, maximum energy flexibility will be achieved and stress on the central grid will be reduced. Several energy efficiency measures will be integrated, including a multifunctional façade (electricity generation, heating and cooling) that can be mounted to the exterior of an existing building to improve its energy performance. Flexibility is also maximized through a cascadic heat pump system for heating, water heating and cooling. Depending on the load situation or the availability of renewable electricity generated onsite, a wide range of heat and cooling capacity can be retrieved flexibly and temporarily stored in connection with the heat-side flexibilization elements (activated building mass, decentralized buffer storage, screed mass of the underfloor heating). The three heat pumps are reversible and can therefore also be used for cooling buildings.
Within EXCESS, the focus is on a plus energy building, but a nationally-funded project extends the scope to an energy community. The blockchain-based "Objective Benefit Sharing" application (see Section 4) will be a key innovation to facilitate the creation of an energy community. The application allows constant monitoring and verification of energy savings at the prosumer and the community levels and facilitates the transparent distribution of benefits arising from energy optimization among prosumers based on energy measurements handled through blockchain. By automated voting, shareholders can specify their level of involvement in the decision-making process. The system, therefore, is not only an innovative way to share benefits but also allows for a virtual decisionmaking mechanism as an innovative way to operationalize governance structures in energy communities.

Finnish Demo
The EXCESS demo building at Kalasatama, Helsinki, consists of eight floors, located next to another similar demo that receives national research funding. The energy system in place for the Kalasatama PEB is a hybrid geothermal energy system. It combines semi-deep geothermal energy wells with coaxial collectors in~800 m deep boreholes, heat pumps, PV and PVT panels that will produce electricity and heat for the building. To increase temperature levels to a suitable level for space heating and domestic hot water, the hybrid energy system utilises heat from the PVT panels, ventilation, and ground source heat from heat pumps. The building structures, heating, ventilation and air conditioning have been designed as energy-efficient as possible. To optimise the overall energy system performance, an integrated smart control system enables demand response and bi-directional electricity trade. The energy community in Kalasatama will consist of two housing cooperatives representing the two neighbouring condominiums. The technical operation of the energy community will be made by a specialized service provider. The locally produced energy is used onsite as much as possible. The local PV production is primarily used for electric appliances inside the cooperatives (HVAC: fans, pumps, heat pumps, lighting, etc., electrical vehicle (EV) charging on-site). Excess electricity will be shared among the building residents. The buildings have flexibility options by intermittent use of heat pumps and storage capacities of geothermal wells and domestic hot water systems support. The integration into the electricity market, however, will be a long-term goal and needs an energy broker between the housing cooperatives and the electricity market. Finland has not yet presented a regulatory framework for local flexibility procurement. At the beginning of 2021, a new regulation on local energy communities came into force. It enables the self-consumption and sharing of locally produced electricity. It has already been criticized for its inflexibility regarding the sharing of electricity between the participants, as it entails pre-defined shares for the participants [31].

Belgian Demo
In the demo site in Hasselt, several PEBs are part of a larger residential area with 68 apartments intended for social housing. The demo site includes a central heating system to allow better integration of renewable sources than traditional individual heating systems. Geothermal heat pumps will provide heat for heating applications and domestic hot water production. Thermal energy is distributed to the different apartments by a small district heating network. A smart substation installed in each apartment extracts the necessary thermal energy from the heating grid. PVT panels and a small wind turbine on the roof of the demo building provide renewable electricity. The energy system is controlled, monitored and optimized by a central Building Energy Management System. A data-centric-model multi-agent system architecture has been developed that allows the optimal coordination and control of a dynamic cluster of buildings by implementing a "Flex Trading" concept that goes beyond the traditional demand response concept. Each of the buildings determines its available flexibility and communicates this information to a community-level platform. Thereby, a 'virtual' energy community will be created, where each member can generate flexibility through its boiler (power-to-heat, thermal storage). The central (virtually shared) generation is used for shared infrastructure, the remainder (excess energy) is optimally used by the community members. The system is managed by a centralized manager ('middleman'). The platform aggregates all this information and determines the optimal community-level consumption plan. This is then disaggregated to an optimal consumption plan per community member. Such a bottom-up aggregation of information provided by the buildings themselves addresses the consumption forecasting challenges associated with small clusters of buildings (e.g., limitation of statistical approaches) and buildings that actively control their consumption (e.g., acting on dynamic prices, performing PV self-consumption, etc.). At the community or district manager level, the bottom-up aggregated baseline and flexibility information is used to decide on a given collective objective (e.g., community-level self-consumption) and/or the aggregated flexibility can be offered to external stakeholders, e.g., for congestion management for the local DSO. By proper interactions with the local DSO, it can be assured that only local grid secure flexibility activations are offered to external stakeholders. While Belgium (both Flanders and Wallonia) has a basic regulatory framework for energy communities in place, regulatory details for active prosumers and energy communities are still unclear and there are insufficient incentives for flexibility control. Proper incentives for flexibility activations such as dynamic tariffs (implicit demand response) or a better regulatory framework for explicit demand response would strongly assist the creation of a business case.

Spanish Demo
The Spanish demo case is located in the metropolitan area of Granada. The planned four-story apartment complex consists of 30 dwellings with the ground floor to be used for commercial activities. The complex was originally planned to meet NZEB standards, but will be upgraded to become a PEB as part of the EXCESS project. For this purpose, the apartment complex will be equipped with a number of technical and architectural design features to minimize the energy demand while maximizing the self-consumption of onsite generated renewable energy, making it one of the very first plus energy buildings in Spain. The demo case building is part of the larger urban development project NIVALIS, Spain's first planned zero energy district.
The energy concept of the building prioritizes direct self-consumption of renewable energy generated by PV panels. Additional key features of the PEB include a geothermal system that has been designed for optimal seasonal performance as well as an integrated state-of-the-art control system at different levels (apartment, building and renewable technologies) to reduce the energy consumption to the minimum, while maintaining indoor comfort conditions. Surplus electricity is stored in a battery and can also be fed into the grid in case it is not consumed on the demo site. Electric vehicle charging stations for cars of residents are another feature to encourage low-carbon living and high selfconsumption. The building manager will be responsible for the control system operation and the supervision of the proper renewables integration.
While Spain has no regulatory framework for energy communities, the Spanish government, in 2019, approved the Royal Decree 244/2019 that regulates the administrative, technical and economic conditions of self-consumption. The maximum distance between the production and consumption meters is 500 m and should be connected on the low voltage grid (LV) level, limiting the spatial scope of the PED. Excess electricity fed into the public grid from production facilities not exceeding 100 kW can benefit from the compensation of costs on a monthly basis. These facilities (below 100 kW with cost compensation) will be exempt from the obligation to register as an electricity supplier and will be subject only to technical regulations [16]. In the case of the EXCESS demo, the PV power installed will be 150 kW. A split of the installation into two with a peak power below 100 kW could be defined, in case certain technical preconditions are fulfilled. Next to technical issues, first experiences made in the EXCESS demo showed that novel self-consumption facilities require a high effort also related to non-technical issues, such as designing the contract agreement between the building owners regarding sharing of energy.

Comparison of the Different Approaches and Discussion
This section compares and discusses the planned use cases, sharing approaches, organizational set-ups and the possible roles of actors in the four EXCESS demos considering also findings from related research and demonstration projects. Figure 1 displays the current and additionally planned use cases of the demos (time horizon 3-5 years), most of them improved or enabled by the Clean Energy Package. The first category includes maximizing self-consumption and self-sufficiency, which will be improved by a minimum required share of renewables in buildings or energy efficiency requirements. Also, the access to exchange energy and flexibility on markets will be improved by the Clean Energy Package. Sharing and trading of energy using the grid as well as provision of local services to the DSO would not be possible without the Clean Energy Package.
This section compares and discusses the planned use cases, sharing approaches, organizational set-ups and the possible roles of actors in the four EXCESS demos considering also findings from related research and demonstration projects. Figure 1 displays the current and additionally planned use cases of the demos (time horizon 3-5 years), most of them improved or enabled by the Clean Energy Package. The first category includes maximizing self-consumption and self-sufficiency, which will be improved by a minimum required share of renewables in buildings or energy efficiency requirements. Also, the access to exchange energy and flexibility on markets will be improved by the Clean Energy Package. Sharing and trading of energy using the grid as well as provision of local services to the DSO would not be possible without the Clean Energy Package. The figure above shows that there is a high focus on self-consumption/self-sufficiency in the short term, which is a key element of current PEB and PED definitions. The provision of services to market actors is currently not the main aim in most of the demos, except for the Belgian demo. Market integration, however, is a longer-term goal of all the EXCESS demos but is currently hardly possible due to a lack of supporting national regulations and incentives. This was also observed in the +CityxChange project that concludes that due to the absence of incentives even cheap flexibilities of PEDs may be left idle [32]. The strong focus on self-consumption in the context of energy communities was also reflected in recent interviews with European regulators that fear a high amount of fluctuating renewable energy being injected into the grid, while there was a lack of understanding of the need for local flexibility procurement at the level of energy regulators and DSOs [33]. Collective self-consumption is promoted by policymakers in some Member States implementing reduced grid tariffs for locally shared electricity in RECs (Austria, Portugal) or operational support for collectively self-consumed electricity (Italy) [34].
Sharing and internal energy trading is a key element in all EXCESS demos already in the short term. While in the Spanish and Finnish demo electricity is planned to be traded among buildings, in the Belgian and Austrian demos, a virtual energy community will be created. While in the Belgian demo flexibilities are shared, the Austrian demo plans to share benefits arising from energy optimization among prosumers, awarding top- The figure above shows that there is a high focus on self-consumption/self-sufficiency in the short term, which is a key element of current PEB and PED definitions. The provision of services to market actors is currently not the main aim in most of the demos, except for the Belgian demo. Market integration, however, is a longer-term goal of all the EXCESS demos but is currently hardly possible due to a lack of supporting national regulations and incentives. This was also observed in the +CityxChange project that concludes that due to the absence of incentives even cheap flexibilities of PEDs may be left idle [32]. The strong focus on self-consumption in the context of energy communities was also reflected in recent interviews with European regulators that fear a high amount of fluctuating renewable energy being injected into the grid, while there was a lack of understanding of the need for local flexibility procurement at the level of energy regulators and DSOs [33]. Collective self-consumption is promoted by policymakers in some Member States implementing reduced grid tariffs for locally shared electricity in RECs (Austria, Portugal) or operational support for collectively self-consumed electricity (Italy) [34].
Sharing and internal energy trading is a key element in all EXCESS demos already in the short term. While in the Spanish and Finnish demo electricity is planned to be traded among buildings, in the Belgian and Austrian demos, a virtual energy community will be created. While in the Belgian demo flexibilities are shared, the Austrian demo plans to share benefits arising from energy optimization among prosumers, awarding top-performing prosumers. While electricity sharing and trading is a key concept of the Clean Energy package it still faces significant barriers in many EU Member States that have energy community frameworks in place. These include a lack of access of energy communities to real-time data of smart meters or, as mentioned in the Finnish EXCESS demo and by the H2020 project syn.ikia for Spain, yearly fixed distributions rules preventing flexible energy sharing [18].
Regarding the organizational set-up in the Spanish and Finnish demos, a cooperative structure will provide a suitable governance model. Actually, cooperatives are quite a common model for many emerging energy communities and the EU framework for energy communities is partly based on cooperative principles [17]. In Belgium, a housing complex is seen as a suitable framework for an energy community having existing organizational structures in place that can be used. Housing associations are in general seen as an important enabler for energy communities, assisting the implementation of shared infrastructure [17]. Several ongoing PED projects such as Positive4North mention as barri-ers that multiple and diverse stakeholders are in the districts [35], the energy community framework thus could provide a basic organizational and governance structure for PEDs, assigning clear roles to different actors.
The EXCESS demos and other related projects, such as syn.ikia, illustrate the strong limitations for PEBs and PEDs in some member states that have already a REC framework in place such as a maximum generation power (200 kW in Italy for RECs or 150 kW in Spain in case of collective self-consumption). Other countries with REC frameworks in place are imposing system-related limitations to the low voltage (LV) level such as in Slovenia or Croatia that may limit the scope of activities and the participation of districts in energy communities [16]. In such national frameworks, energy communities would rather consist of a few buildings than larger districts. In most EU Member States, however, the geographical scope for RECs is broader, often being based on the medium voltage (MV) level or municipal boundaries [17]. Regulatory frameworks for CECs hardly exist in Member States [17]. Collective self-consumption is limited in most member states to the multi-apartment level limiting the use of this concept for PEBs and PEDs [17]. There is a range of other barriers mainly at the national level that will limit the deployment of energy communities in the short term, such as complexities in setting up the legal structure or designing sharing agreements [17], as EXCESS and related projects illustrate.

Conclusions
This article outlined opportunities the Clean Energy Package and, in particular, energy communities provide for PEBs and PEDs regarding their economic optimization and market integration, possibly leading to new use cases and revenue streams. At the same time, insights into regulatory limitations at national level in transposing the set of Clean Energy Package provisions are presented. The paper showed that the concepts of PEBs and PEDs are in principle synergetic with the energy community concepts as PEBs/PEDs relate to technical characteristics and optimizations while energy communities provide a legal and regulatory framework for the organization and governance of a community, at the same time providing new regulatory space for specific activities and market integration. While the hypotheses of the paper assumed that the Clean Energy Package provisions could improve PEBs and PEDs in their function for the decarbonisation of the energy system, including both, a high renewable self-sufficiency rate as well as flexibility provisions to the grid, it was observed that there is a strong policy aim to use energy communities to increase self-sufficiency, as also illustrated in the case of the EXCESS demos. Collective self-consumption within Renewable Energy Communities often receives financial benefits from Member States, while providing services to balancing markets by pooling small-scale flexibilities via aggregators or providing local flexibilities to DSOs is hardly yet possible in most EU countries. As a consequence, in the short term, some of the proposed new use cases will not be available and the full potential of PEBs and PED for decarbonisation cannot be fully exploited. The focus on self-consumption may result in an overinvestment in local infrastructure and may counterbalance least-cost decarbonisation for the society.
As this paper illustrated, there is a range of additional barriers mostly at the national level that will hamper the roll-out of energy communities in general and PEBs and PEDs as energy communities in particular, such as a lack of access to real-time data or generation capacity and spatial limitations. Overall, the heterogeneity with which Member States are implementing the EU energy community (and self-consumption) provisions may prevent a clear blueprint for an organizational and business model for PEBs and PEDs across the EU. Even though Member States are likely to adjust their national regulatory frameworks after having gained first experiences, new revenue streams for PEBs and PEDs will not fully be available in the next years, and PEBs and PEDs may strongly remain to rely on public support. Importantly, EU Member States need to get a better picture of the future role of energy communities in general and PEBs/PEDs in particular for decarbonizing the energy system. The corresponding design of both, appropriate market rules and support schemes will be of high importance.

Informed Consent Statement:
The study quotes interviews made under the EXCESS project. Following the GDPR, the answers to the questionnaires/interviews were anonymous (no personal data were obtained).