Keywords

1 Introduction

To mitigate the climate change the continuing temperature rise needs to be limited according to the globally stipulated values in the 2016 Paris agreement [53]. Countermeasures as well as changes in humans behavior will be necessary to achieve a durable reduction of the greenhouse gas emissions, which are responsible for the continuing increase in temperature [39]. As the energy sector is one of its biggest sources [39], it is one of the major sectors addressed by proposed countermeasures. The European Union thus issued its ‘Clean Energy Package for All Europeans’ package in 2018/19 aiming [23]

  • to reduce the emissions of greenhouse gases by 40%,

  • to reach a share of 32% of renewable energy sources in the energy mix, and

  • to improve energy efficiency by 32.5%.

Additionally, the European Union plans to achieve climate neutrality, i.e., net-zero emissions, by 2050 [24] and some member states have even more ambitious goals, such as Austria which plans to achieve climate neutrality already by 2040 [26] as well as a renewable electricity share of 100% by 2030 [49].

Already since the last few decades, the energy market has been in a continuous move, including significant paradigm shifts such as from former monopolies to deregulated markets. New technologies, new local energy producers in the lower voltage grid layers (e.g., windmills, photovoltaic sites), and changed consumer behavior (e.g., electric vehicles, controllable devices) push the ongoing evolution to a more intelligent, decentralized power network (smart grid) [20]. Thus, changes in the energy sector are not limited to producers and energy transmission, but include local energy storage and consumption as well. Traditional final consumers, such as households, increasingly become ‘prosumers’ as a combination of producers and consumers (i.e., houses with photovoltaic units feeding-in their excess energy) [45].

Fig. 1.
figure 1

The transition towards energy communities [12].

Energy communities are a third step in an evolution shown in Fig. 1 that started with households optimizing their own energy consumption and continued by applying those procedures to apartment buildings next [31]. In particular, households are not necessarily required to possess and operate their own photovoltaic unit to join a community. In consequence, every individual shall be able to join and thus take over an active part in the energy transition [15]. Those communities generally aim to jointly produce, consume, store, and share energy to increase the self-consumption of locally generated energy, but they could also offer other energy-related services. As a further aspect, energy communities allocate the ongoing trend to favor regional products (e.g., in grocery stores), to the energy system [15].

Besides the legal framework, the implementation of energy communities will depend heavily on suitable information and communications technology (ICT) solutions. This article, extending the previous contribution of Cejka et al. [12], will thus provide an interdisciplinary view on legal, economic, and technical aspects on those energy communities. The remainder of this paper is structured as follows: We will first introduce the European Union Clean Energy Package in more detail, including an enumeration of the relevant new actors on all three layers (Sect. 2). The actors of the rightmost layer of Fig. 1, the energy communities, are the focus of this article; they are introduced and various aspects are discussed in Sect. 3. In Sect. 4, we describe an implementation of such a community by utilizing Blockchain technology and their implications, especially in energy efficiency and privacy issues. We will then show profitability aspects including simulations on cost savings for the community’s participants in Sect. 5. Section 6 concludes this article by providing a summary as well as an outlook to future work.

2 European Union’s Clean Energy Package

The Clean Energy Package, adopted by the European Parliament, partly in the end of 2018 and partly in Summer 2019, is the latest development in European Union’s energy law. Within its four directive and four regulation acts it includes additional and new measures on the various domains in the energy sector:

  • Energy Performance of Buildings Directive (EU) 2018/844,

  • Renewable Energy Directive (EU) 2018/2001 (RED),

  • Energy Efficiency Directive (EU) 2018/2002,

  • Governance of the Energy Union and Climate Action Regulation (EU) 2018/ 1999,

  • Electricity Regulation (EU) 2019/943,

  • Electricity Directive (EU) 2019/944 (ED),

  • Regulation on Risk-Preparedness in the Electricity Sector (EU) 2019/941,

  • Regulation on the European Union Agency for the Cooperation of Energy Regulators (EU) 2019/942.

The two bold-printed directives are of main interest of this article’s scope as they contain several new actors in the energy market. They can be distinguished into three groups based on their level of collaboration and their local area of operation (Fig. 1):

  • On layer 1 (Single houses):

    • Renewables self-consumer (included in the RED)

      ‘a final customer [...] who generates renewable electricity for its own consumption, and who may store or sell self-generated renewable electricity’

    • Active customer (included in the ED)

      ‘a final customer, or a group of jointly acting final customers, who consumes or stores electricity generated within its premises [...] or who sells self-generated electricity or participates in flexibility or energy efficiency schemes’

  • On layer 2 (Apartment buildings):

    • Jointly acting renewables self-consumers (included in the RED)

      ‘a group of jointly acting renewables self-consumers located in the same building or multi-apartment block’

    • Active customer (included in the ED)

      according to their definition above, ‘a group of jointly acting final customers’ is included

  • On layer 3 (Energy Communities):

    • Renewable Energy Community (included in the RED)

      see Sect. 3.1 for its definition

    • Citizen Energy Community (included in the ED)

      see Sect. 3.1 for its definition

Obviously, at each layer there exist definitions for two actors for comparable concepts in parallel. While their scopes are not completely identical (cf. Commonalities and Differences of energy communities in Sect. 3.1), this also stems from the different application areas of the two directives in question: the ED being the more general legal act in order to the completion of the internal market and mainly of regulatory nature, the RED to promote deployment and use of renewable energy sources for energy production including electricity and to foster their acceptance [43]. Furthermore, the ED aims to provide “level playing fields”, while the RED aims for an “equal footing with other market participants”. Therefore, the REC shall become a non-discriminating position among the other (larger) competing players on the energy market.

Those parties shall be able to ‘generate, consume, store, and sell electricity without facing disproportionate burdens’ and ‘[c]itizens living in apartments [...] should be able to benefit [...] to the same extent as households in single family homes’. Thus, they improve the local acceptance of and the local investment in renewable energy, as well as allow a more comprehensive participation of citizens in the energy transition. The new actors are expected to be significant members in the future energy system [50]. It is mentionable, that the term ‘prosumer’ does not appear in the legal framework, though those are covered by the concept of ‘renewable self-consumers’ [21, 45].

3 Energy Communities

Among the proposed countermeasures in the Clean Energy Package are the two types of energy communities to merge the energy production as well as the consumption of individuals and enterprises. As they are the main field of this article, various aspects of them will be handled in detail in this section.

3.1 Legal Definitions

The legal definitions of the two types of energy communities can be summarized as [12]:

Renewable Energy Community (REC)

  • is a legal entity, autonomous, and based on open and voluntary participation,

  • shareholders or members are

    • natural persons, small or medium enterprises, or local authorities,

    • located in the proximity of renewable energy projects owned and developed by that legal entity,

  • its primary purpose is to provide environmental, economic or social community benefits rather than financial profits.

Citizen Energy Community (CEC)

  • is a legal entity, based on open and voluntary participation,

  • is open for participation of all entities,

  • is controlled by shareholders or members that are natural persons, small enterprises, or local authorities,

  • its primary purpose is to provide environmental, economic or social community benefits rather than financial profits,

  • it may engage in generation, including from renewable sources, distribution, supply, consumption, aggregation, energy storage, energy efficiency services or charging services for electric vehicles or provide other energy services.

Commonalities and Differences. Some of the commonalities and differences between the two types are already apparent in their definitions. Though in this publication we will not focus on them (cf. [13, 18]), only in summary there are main differences in their

  • membership structure:

    Participation is much more regulated in RECs as they are restricted in their types of member. In contrast, participants of CECs are just restricted in terms of the community’s effective controlFootnote 1.

  • application area:

    As the CEC is contained in the Electricity Directive it is restricted to electricity, while the REC is restricted to renewable energy in general (e.g., including heating and cooling).

  • geographical area:

    The REC contains a proximity aspect further restricting its possible membersFootnote 2, while the members of a CEC may be widely spread – optionally even over member states’ borders.

  • operational area:

    In contrast to RECs, the definition of the CEC explicitly contains an enumeration of services it can provide. RECs’ possible operations are more limited, namely to

    • produce, consume, store and sell renewable energy,

    • share produced renewable energy within the community, and

    • access energy markets in a nondiscriminatory manner.

In result, neither one of the community types is a strict subset of the other [12, 16]. Note that the term local energy community that was contained in the drafts was abandoned in favor of the term CEC and is no longer legally used. This decision makes sense as the CEC does not include any restriction in their geographical area. Generally, in subsequent sections we will mainly focus on RECs, while main aspects are expected to hold also in CECs.

3.2 Structure of a Community

Besides open legal questions for the national implementations, there are other issues concerning the structure and organization of a community (e.g., minimum or maximum size of a community, desired mix of producers and consumers, etc.) [12]. While the concrete structure of communities might be different according to their location in an urban or in a rural area, in general, the following participants (also in combination; cf. prosumers) are assumed to be present in every community (cf. Fig. 2):

  • producers (e.g., houses equipped with a photovoltaic unit or small power plants attached to or even owned by the energy community itself),

  • consumers (e.g., houses as well as e-car charging points), and

  • a (community-owned) battery storage.

Participants can thus be distinguished in community members or shareholders attached to the community and community-owned components, such as a central battery storage. The energy community could temporarily store produced energy that cannot be allocated to a consumer at this time in a battery storage; further excess energy could be sold to another purchaser outside of the community. In contrast, the energy demand of the consumer that cannot be met by the community will still be purchased from a traditional vendor.

Fig. 2.
figure 2

Energy community structure, including energy flow in dashed lines and cost flow in continuous lines [14].

In general, the term ‘community’ indicates at least two members; however, according to Lowitsch et al. [43], autonomy permits a share of a third at cap; hence requiring at least three members in an REC. For autonomy from other energy market players further members (e.g., distribution system operators) are precluded from CEC’s participation as well as from REC’s effective control, namely if they are mainly engaged in commercial activities in the energy sector. This shall restrain utilities or financial investors to setup RECs to benefit from the customer-friendly design of the framework [43].

3.3 National Adaptions

The directives of the Clean Energy Package, including the energy communities, need to be implemented into national law of the Unions member states until End 2020 (ED)/Mid of 2021 (RED); thus, there is a significant movement in this area at the moment. Several open questions for the national implementation have been identified in previous work (e.g., the definition of proximity regarding the RECs operational limits, the choice of a suitable organizational and legal form, or privacy aspects) [15]. Details on the Austrian national adaption can be found in [18, 27], summaries of implementations in other member states in [33].

3.4 Local Proximity

RECs will be restricted to a local proximity, to be defined on national level by using either geographical (e.g., maximum distances), administrative (e.g., borders of municipalities or districts) or technical boundaries [14]. For example, in Austria there are seven grid levels (GL) defined; RECs are only allowed to span across these grid levels in a limited way:

  1. 1.

    ultra-high voltage (380 kV and 220 kV),

  2. 2.

    transformation from ultra-high to high voltage,

  3. 3.

    high voltage (110 kV),

  4. 4.

    transformation from high to medium voltage,

  5. 5.

    medium voltage (from more than 1 kV up to and including 36 kV),

  6. 6.

    transformation from medium to low voltage,

  7. 7.

    low voltage (1 kV and below).

While the discussed plans on allowing RECs’ operations on the grid levels 6 and 7 seem to be properly suited for rural areas (those would cover small towns and even whole valleys), the example of Fig. 3 shows that this would improperly restrict their operations in urban areas (apartment buildings with several stairwells might not be located in the same low voltage grid and may only be connected over grid level 5). If a photovoltaic unit would be installed on the house’s rooftop, only a part of the households could profit by chance depending on which transformer the PV would be connected to.

Fig. 3.
figure 3

Example of an apartment building consisting of several stairwells that could not build an energy community in case of a restriction to GL 6 and 7.

The final decision in Austria was to enable two types of RECs: the local REC to span over grid levels 6 and 7; and the regional REC which additionally includes grid level 5 and parts of grid level 4 [14, 18, 27]. Although relaxed, it is still not guaranteed that direct neighbors may always be able to build up an REC together.

4 Blockchain Technology for Energy Communities

While concrete transpositions of the directives into the member states are still pending, several research projects are already dealing with possible implementations by utilizing Blockchain technology [12, 37, 41]. This technology is currently not only discussed in the energy system [1,2,3, 10], but also introduced in a variety of different domains [11]. Although new use cases such as energy communities could be an indicator to use emerging technologies, the Blockchain is just one possibility for the technical implementation of energy communities [16]. Nevertheless, the Clean Energy Package contains a definition on ‘peer-to-peer trading of renewable energy’ as the ‘sale of renewable energy between market participants by means of a contract with pre-determined conditions’. It further includes an ‘automated execution and settlement of the transaction’ in its definition, which indicates to legally consider smart contracts in an environment utilizing Blockchain technology [12, 15, 43].

As many authors previously engaged with introducing Blockchain technology (e.g., [29, 40]), this article will focus only on a few selected aspects of special interest within the use case, especially on questions on Blockchain’s energy efficiency and technology-immanent privacy issues. In a nutshell, Blockchain transactions are processed ‘peer-to-peer’ without requiring intermediaries. Data – in this use case mainly on energy generation and consumption as well as on settlement of the energy exchange – are processed and validated by the attached machines, also known as nodes, and not in a traditional manner by a central server. Several transactions are assembled in a block until its maximum size is reached; in this case a new block is initiated and linked to the previous block using hash functions. These links eventually result in the eponymous chain of blocks; it renders later manipulations of its integrated data difficult, especially if contained in a very antecedent block. In result, a Blockchain approach provides a high level of automation, security, and transparency for the participants [37].

4.1 Energy Efficiency

Among the goals of the Clean Energy Package is an improvement of energy efficiency, though quite on the contrary, Blockchain technology is in fact not known for an energy efficient operation [55, 56]. According to estimations, only the (probably best-known) Bitcoin Blockchain reaches an annual electricity consumption of 50–80 TWh, comparable to countries such as Switzerland, Austria, Belgium, Czechia or Finland [54]. An energy-efficient implementation thus needs a special emphasis on this issue, in particular, by avoiding to use the ‘proof-of-work’ consensus protocol [41, 52].

4.2 Privacy Issues

Irrespective of using Blockchain technology, the protection of personal data must be constantly taken into consideration during an implementation. A major advantage of Blockchain technology from a technical point of view is its technology-immanent immutability the persisted data; however, this is the main point of conflict concerning data protection rights [25, 28, 37]. Thus, in particular when using Blockchain technology for the implementation of energy communities, the focus must not only be laid on the technical feasibility but also on the protection of the processed data. Besides other types of classifications, Blockchains can be divided into two groups based on control and accessibility [35] shown in Table 1 which also influences data protection aspects [37].

Table 1. Public and private blockchains and their implications regarding privacy.

Scope and Applicability of the GDPR. Since 2018, the data protection regime within the European Union is generally harmonized by the General Data Protection Regulation (GDPR), aiming to ensure a high level of protection for personal data. Precisely, the GDPR is applicable only on ‘personal data’ of ‘natural persons’; thus excluding any data of enterprises, that might also be members of the energy community. The ‘processing of personal data’, which is the central connecting factor in terms of the GDPR, is defined very wideFootnote 3 and since Blockchain technology is designed to distribute its data copies to various servers, it is difficult to identify a locality where data processing takes place. Obviously, Blockchain is a data processing technology that may process a large number of data records, possibly including records of personal data.

The GDPR defines ‘personal data’ as any information relating to an identified or identifiable natural person (‘data subject’). The question of identification needs to consider all means likely to be used to identify a natural person, taking – for example – costs of identification and the time required as well as the state of the technology into account [37]. While pseudonymized data is also counted as identifiable data, the GDPR does not apply to anonymous information, i.e., information that does not relate to an identifiable natural person, or the data subject can no longer be identified. Thus, for GDPR’s applicability it is essential whether or not natural persons are identifiable by the processed data. In that context it needs to be mentioned that there are different opinions on whether hashes or encrypted personal data fall under the GDPR as pseudonymized data [5, 29]. Obviously, re-identification of pseudonymized users is the easier the fewer users are involved in a system, especially in private Blockchains where by design all users must be known and identifiable for the Blockchain operator. Therefore, it is necessary to classify the involved kind of data that is processed within an energy community to answer the question if personal data is involved.

Energy Data as Personal Data. Within an energy community, data is collected on the energy produced, consumed and stored; as a result, Blockchain will process the electricity consumption and generation data of each member. Generally a high-frequent readout of households’ energy consumption data using Smart Meters will be required for a reasonable operation. While it initially appears that those data will be purely of technical nature, the collected data indeed could reveal detailed information of the consumer’s behavior and its private life; hence they are considered as personal data [17, 34, 44, 51]. In case of a prosumer, measurement data on the electricity fed into the grid provide information about the available resources of this member. Since personal data is processed, the technical execution of the Blockchain must be adapted to comply with the GDPR.

Data Subject Rights. According to the GDPR, the data subject has several rightsFootnote 4 in the controller’s responsibility. Since the Blockchain is designed such that its persisted data cannot be modified, it needs to be shown how this technology can be reconciled with data protection.

The Controller. The primary role of the controller is its responsibility for compliance with the GDPR [4]. However, in Blockchain applications it is not a priori clear, to whom this role is assigned. Various actors who could qualify, e.g., in a public and permissionless Blockchain, among others, the software developer, miners, or even every participating node [22, 25]. Evidently, the assessment of the controller depends on the respective constellation and the concrete design of the Blockchain application [30]. Thus, no generally valid statement can be made and the question therefore needs to be examined on a case-by-case basis. However, with a private Blockchain, it is usually easier to determine a controller due to its structure with a legal entity as operator who is responsible to determine the means of personal data processing and the purposes. For energy communities with a usually delimited group of participants the use of a private Blockchain is feasible, thus the identification of the data controller is rather unproblematic, while in the public Blockchain compliance with data protection obligations is not easily possible.

Right to Erasure. The most problematic rights when using Blockchain technology are the right to rectification and the right to erasure. Later modifications of persisted data on the Blockchain would require all subsequent data blocks to be rewritten, hence this is (depending on the amount of data) infeasible. It is even more difficult with a public Blockchain, since all actors involved would have to make the correction and deletion; coordination would be very complicated because data to be corrected could be distributed over thousands of nodes. Generally, it should be avoided to persist data of identifiable natural persons as plain text on the Blockchain. However, for cases where this is impossible, e.g., for the settlement and the traceability of energy transfers in the community, other solutions need to be found. Anyways, the general principles of data protection law, such as the principles of storage limitationFootnote 5 and data minimizationFootnote 6 need to be followed at all time.

The deletion of data is not only contrary to the Blockchain design, but also among the most essential advantages that result in the high confidence in this technology due to its immutability and transparency. Proposals in the literature for introducing mutability into the Blockchain (e.g., [8, 47]) are thus disapproved by us due to the immutability as one of the main principles of the Blockchain. Potential feasible solutions in related work are, for example, ‘zero-knowledge-proofs’ [36] or to use a combined system of a Blockchain and a traditional distributed database [22, 57]. In this case only references to mutable records in the database are persisted on the immutable Blockchain accompanied with hashes of the records to proof that no later modifications have been carried out.

There is a distinction between the literal senses of erasureFootnote 7 and destructionFootnote 8, both mentioned as possible processing operations in the GDPR. Even though the GDPR does not contain definitions of the involved terms, it can be argued merely on the basis of the wording that the requirements on an erasure are lower, i.e., it might not necessarily require a final destruction [37]. It is argued to be sufficient, if the data is no longer usable or accessible for the controller. A practical goal-oriented solution would thus be to correct the data with a supplementary statement [30]. Data removals would be possible likewise by stating information to be no longer usable in such a statement.

Data Protection Impact Assessment. Generally, when processing personal data, the controller must continuously assess the risks posed by the processing operations [6]. Furthermore, the GDPR contains the ‘Data Protection Impact Assessment’ (DPIA) as an evaluation and decision-making tool to reduce risks of personal injuries resulting from the misuse of personal information as well as for developing more efficient and effective procedures for processing personal data [38]. As the GDPR contains sensitive fines, compliance with obligations of the GDPR including a (correct) implementation of the DPIA is important. Its implementation is mandatory, if a processing operation is ‘likely to result in a high risk to the rights and freedoms of natural persons’. The guidelines of the Article 29 Data Protection Working Party [6] can be used to define DPIA, as there is no direct definition in the GDPR. Accordingly, a DPIA ‘is a process designed to describe the processing, assess its necessity and proportionality and help manage the risks [...] resulting from the processing of personal data by assessing them and determining the measures to address them’. This process is the key to accountability as it allows the controller to adopt appropriate strategies when developing data processing, but furthermore it is helpful in complying with the GDPR’s requirements since the DPIA provides evidence that appropriate measures have been taken to protect personal data. According to the guidelines, a DPIA is particularly necessary if new technological solutions are used, if data processing is carried out on a large scale or if automated processing leads to decisions that have legal effect for natural persons [6]. Especially those listed criteria are of high relevance for Blockchain applications and in result, a DPIA is recommended to be done [12].

4.3 Smart Contracts

Smart Contracts are the automated processing of functions based on pre-determined procedures; their connection to the Blockchain is among Blockchain technology’s other major advantages. In general, they contain a source code defining the rules (i.e., mainly if-then-else constructs) under which a contract is concluded. In energy communities they could especially be utilized for allocating energy to the participants [46]. For example, various scenarios depicted in the contract, such as the billing of electricity consumption data and electricity generation data between the participants, could be carried out fully automatically without any influence of third parties [32].

There are several legal issues with smart contracts, e.g., in the area of a possible reverse transaction, but also in terms of privacy as Smart Contracts fall under ‘automated-decision making with legal or similar effects’ according to the GDPR [7, 30]. In summary, legal issues with Smart Contracts are further located in a variety of other legal areas, e.g., civil law, consumer protection law, tax law, e-commerce law, that cannot be dealt with in detail within the scope of this article. For example, as computers are not recognized as a legal entity under current law, the question arises to whom a declaration of intent in a system where a contract is executed only between two machines and the human being is pushed far into the background can be attributed to. In future, the creation of an ‘electronic person’ may be a possible solution to those legal problems; currently only the human that is eventually behind the autonomous system, such as a user or the programmer, are possible choices.

4.4 Implementation of an Energy Community

A renewable energy community with residential and industrial customers as well as a battery storage system supporting self-consumption optimization and peer-to-peer energy sharing using Blockchain was implemented and validated in a small municipality in Styria, Austria [12]. In regard to the discussed aspects of the previous subsections, the implementation focuses on being privacy-friendly and the use of the energy-efficient and suitable proof-of-authority consensus protocol [9]. Different roles and stakeholders are defined to concretize the structure of energy communities as introduced in Subsect. 3.2:

  • Community Representative: The energy community as legal entity is represented by the community representative. This can be a person or a board representing the interests of the community members.

  • Platform Operator: In this concept, the energy community assigns a service provider to take care of the technical and IT system needed for the community operation. The role is optional; for example, in case the energy community provides this services on its own, this role coincides with the community representative.

  • Pro-/Consumer: This role represents and subsumes a variety of different members of the energy community in Fig. 2, e.g., a household (natural person), a charging station (automation system) or a community storage system.

  • Energy Supplier: As described before, (traditional) energy suppliers are also needed for the community operation, e.g., for selling excess generated energy or for purchasing remaining demanded energy (cf. Fig. 2). Depending on the use case at hand, those external market participants may also need a certain yet restricted access to the community’s ICT system.

  • External Stakeholders: Other external stakeholders could be obliged by law (e.g., an observing regulation authority for consumer protection, ministries for tax-related issues etc.), by wish of the energy community or as required by a use caseFootnote 9 to have some access to the community’s ICT system.

Fig. 4.
figure 4

The architecture used in the Blockchain Grid project.

Figure 4 shows the implemented architecture of the Blockchain Grid project. Core element of this concept is a permissioned private Blockchain, based on Parity Ethereum, smart contracts running on this Blockchain system and an infrastructure server to configure and operate the system. Access privileges to the Blockchain and roles within the Blockchain system are managed and assigned over the infrastructure server. To ensures that nobody, except authorized participants, can read the data in the system, all data written to the Blockchain (transactions) is stored in encrypted form. The consensus algorithm for new blocks is the proof-of-authority procedure, in which a limited number of authorized participants (validators or sealers) generate blocks in which all transactions of a given time frame are stored into the Blockchain. In the proof-of-authority process the sealers generate blocks in a defined sequence in which the data of the participants is stored. Network members put their trust into the authorized sealer nodes and a block is accepted if the majority of sealers signs the block [3]. There are three different types of nodes in this concept (cf. Fig. 4):

  • Sealer: These nodes have a complete local image of the Blockchain (Node DB) and are responsible to create its blocks. The sealer nodes execute computationally intensive operations like block generation and evaluation of smart contracts and are therefore visualized as machines in data center environments.

  • Nodes (or “full” nodes): These nodes also hold a full local copy of the Blockchain (Node DB), but take no part in the generation of blocks. They can therefore validate all transactions and smart contracts within the Blockchain independently from the sealer nodes, but their operations are not as complex as the sealer nodes’. Therefore, these nodes are visualized as smaller computer systems, e.g., located in an office environment.

  • Clients (or “light” nodes): These nodes only have a lightweight access to the Blockchain, such that they can send transactions (write data into the Blockchain) or receive transactions (get data for this node out of the Blockchain). For these operations only limited computational efforts and data storage is required; therefore, the client can be executed on an embedded device with very limited capabilities like a smart meter or a measurement system. Furthermore, those nodes do not save a local copy of the whole Blockchain, but only those parts that are currently needed and into which the client is involved.

Sealer nodes in this system are operated by trusted parties, e.g., the platform operator, the community representative or the use-case associated energy supplier. The remaining nodes are operated by other trusted stakeholders like the regulator or other authorities. As all of these nodes have a full local copy of the Blockchain (Node DB) they can access all stored data. Over a gateway functionality, provided by sealer and full nodes, stakeholders can access data depending on their roles explained in more detail later in this section. Measuring devices (as shown on the bottom of Fig. 4) and other sensors or actuators like a community storage system are connected as clients. Required control information (e.g., for changing the maximum power of a charging station for electric vehicles) can be retrieved by the clients via protected connections (protected control). Within the Blockchain Grid project additional measurement and controller hardware was installed at the participants sites. In future, those measurements could be done by a smart meter in addition to its normal metering tasks. The idea is that the connection to the Blockchain could be easily activated over the infrastructure server without the need for any hardware handling at the customer site. Likewise, heat pumps or charging stations that have already implemented the Blockchain client software within their control systems can be added to the Blockchain system by the infrastructure server.

All necessary information for the system’s operation, such as the smart contracts, configurations and roles of the participants as well as the access rights to data are stored on the infrastructure server. Customer data (name, address, customer number) are assigned to an ID within the Blockchain. This assignment is managed and can be used depending on the use case, e.g., by the Distribution System Operator (DSO) or an energy supplier to transmit billing-relevant information. In this way, the platform operator represents the person responsible in terms of data protection law, which is the only one who can access the server. All data exchange between the infrastructure server and the participants is made via an encrypted connection (TLS).

Blockchain Grid Gateway. To access the data in the Blockchain, each participant receives an access identifier (username and password) which is linked to the customer data by the infrastructure server. Each sealer node and full node provides a way to login with the customer access ID to obtain data according to the respective access rights (gateway in Fig. 4). In order to strengthen the relationship of trust between the participants and the nodes, the participant can determine which nodes he wants to connect to. As the full nodes validate all transactions and smart contracts within the Blockchain independently the participant could check, if desired, whether every node shows the same data. The credentials are validated via the infrastructure server, which notifies the respective node of the Blockchain ID, the role and access rights of the participant asking for data access. For example, a pro-/consumer has only access to his own data (like sold energy, measured load data, ...) whereas the community representative can access aggregated data of the overall community operation (e.g., sold energy of the community, share of individual participants) to ensure optimal conditions for the community. Furthermore, the gateway provides functionalities to adopt, design and deploy smart contracts to the Blockchain system using the contract design function in the gateway.

Fig. 5.
figure 5

First implementation of the gateway-GUI, view of the community representative.

Figure 5 shows the implementation of the gateway dashboard to plot data stored in the Blockchain. In this version of the gateway are different power flows displayed, like current power consumption or production (“power”) what amount of power was transferred to a family community as a subset of the communityFootnote 10 (“toLFC”) and how much power was transferred to the remainder (“toCEC”). The “settings” area allows to set user preferences concerning, e.g., the preferred trading algorithm of the smart contract. In this example, the user could either prefer to maximize self consumption first and transfer only the excess generated power to the community or vice versa to primarily meet the needs of the community.

Privacy-Related Implementation Aspects. A special feature in this system is the start of a new Blockchain after each accounting period. This aspect complies with the principles of data minimization and storage limitation, since data is stored on the Blockchain for one accounting period only. This also facilitates the enforcement of the rights of rectification and erasure. In case of a participant’s revocation of its membership to the community, a supplementary statement is added to the Blockchain, while no data of this participant will be available on the next chain. Nevertheless, Blockchains of expired accounting periods need to be archived in a separate database at the sealer nodes and the full nodes (Archive DB in Fig. 4) as it may be legally required to keep the archives for some years according to civil and tax law regulations. The first transaction in the new Blockchain stores necessary linking information of the old Blockchain, such as the hash value of its last block to prevent later manipulations of the previous Blockchain. Access to those old Blockchains is even more restricted to achieve a feasible tradeoff between the obligation to archive and the data subjects rights of the GDPR.

Implemented Smart Contracts. Within the Blockchain system of the Blockchain Grid project, two smart contracts have been implemented:

The first smart contract is responsible for calculating energy flows within the community as well as the charging/discharging power of the community battery, based on surplus and demand information as well as the state-of-charge of the battery. Therefore, customer information about surplus or demand is provided to the smart contract in a one-minute-resolution over the measurement devices and their Blockchain clients. Based on calculation specifications, energy flows between different customers, between customers and the battery as well as between customers and energy suppliers are calculated, which are then used to calculate the corresponding monetary transactions for all participants. For this smart contract, which simulative results are presented in the Subsect. 5.2 and Subsect. 5.3, special energy prices within the community and reduced grid fees and loss fees are used.

The second smart contract is one special use case of the Blockchain Grid project in which the local DSO is one of the community’s stakeholders. The smart contract is responsible to ensure a grid capacity management to avoid an overloading of grid resources like cables or transformers due to community operations. It takes the demand of the community customers including devices such as public charging stations into account and checks the compliance with the grid limits (power and voltage) provided by the DSO as model data. If grid elements are in danger of overloading, e.g., due to a charging station planning to load with its rated power, the smart contract detects the violation and resolves this situation, e.g., by reducing the loading power of the charging station. A detailed description of the model and the implementation is provided by Rao et al. [48].

5 Profitability of Energy Communities

While the legal definition of both types of energy communities claim the main purpose to ‘provide environmental, economic or social community benefits rather than financial profits’, the latter ones cannot be neglected for the applicability and acceptance of those concepts [15]. Thus, participation in a community needs to be profitable for all of its members, i.e., for producers and consumers.

5.1 Energy Costs

The main focus will be laid on the consumer side, whose costs can be divided into three components, that are in Austria currently responsible for about one third of the final costs each:

  1. 1.

    Energy costs

  2. 2.

    Grid costs (System charges), they are further divided into the

    • the system utilization charge,

    • the charge for system losses,

    • the system admission charge,

    • the system provision charge,

    • the system services charge,

    • the metering charge, and

    • the charge for supplementary services.

  3. 3.

    Taxes and fees, which consist of

    • the electricity tax,

    • several surcharges, for example, for the promotion of renewable electricity, and

    • the value-added-tax (VAT).

Energy costs are defined by each vendor itself in a deregulated market, while grid costs (as the grid itself continues to be a natural monopoly), taxes and fees are defined by law or by an authority such as the energy regulator authority. While a certain amount of the energy will be taken from the energy community, each consumer will still require an energy vendor for those energy amount that cannot be satisfied by the community. For instance, there are still questions on the cost-effectiveness of energy storage systems [19] as well as whether they can meet the whole demand, e.g., in the evenings, when the attached photovoltaic units no longer produce energy.

Fig. 6.
figure 6

Possibilities for producers to sell their energy and for consumers to purchase energy [15]. The energy flow is shown in a dashed line, the cash flow using a continuous line.

For a high acceptance of the community concepts, financial profits for producers and for consumers are necessary. According to Fig. 6 it is required, that

  • a producer receives more money for selling energy to the community than to another producer, i.e., \(y>x\),

  • a consumer pays less money for purchasing energy from the community than from another vendor, i.e., \(b<a\),

  • the energy community is not required to make a profit; however, at least cost break-even is expected, i.e., \(y<b\).

Various models to determine the costs (by) have been enumerated by Long et al. [42]. However, it is in fact unlikely that the energy purchased from the community can continuously be offered at a significant lower price than by an energy vendor [15]. Therefore, it is necessary to establish financial promotions on grid costs, taxes and fees by reducing those legally defined costs for the amount of energy consumed from the community. In fact, it is also thinkable that while energy costs decrease for energy community members, and especially for prosumers, they might eventually increase for traditional consumers [45].

In Austria, grid costs are reduced for RECs’ members by utilizing the proximity aspects [14, 18]. Those grid costs traditionally include the costs of higher voltage grid levels that could be eliminated due to the restriction to operate only over certain low voltage grid levels (cf. Sect. 3.4). Naturally, cost savings will thus be higher for communities that span only over grid levels 6 and 7 rather than including higher voltage grid levels. Furthermore, taxes and fees are reduced by waiving the energy tax and parts of the surcharges; all of those only for the amount of energy that was indeed consumed from the community [18].

First simulations on cost savings investigating several operational scenarios have been done in previous work [50]. Intermediate results showed possible savings for consumers of about 10%. However, it was concluded that the outcome very much depends on the community setup and further simulations with larger communities and different types of customers are necessary, which will be carried out in the next section.

5.2 Simulative Study

The simulation includes 125 customers (residential, industrial, agricultural) based on real customer data; 20 of them are equipped with a photovoltaic unit, 105 do not have any generation device (see Table 2). In total, the overall community energy consumption was 1 072 749 kWh, the production was 236 373 kWh, resulting in 836 376 kWh final demand to be provided by the superior grid. Two different community battery models were used within the study:

  1. i)

    a small community battery with a total capacity of 100 kWh, and

  2. ii)

    a larger community battery with a capacity of 1000 kWh.

In both cases, the battery capacity per customer was not limited but the stored energy is reserved for the customer for a maximum of 36 h (battery release time).

Table 2. Overview of community customers and their annual energy balance (total, minimum, maximum and average values).
Fig. 7.
figure 7

Overview of different simulation scenarios.

Simulation Scenarios. To evaluate the most promising concept in terms of energy and cost savings from a customer perspective, six different scenarios were investigated – they are described in detail in the following and illustrated in Fig. 7.

Scenario I – Baseline Scenario (Grid). This scenario represents the current situation for grid customers which buy energy from their contracted retailer. Their surplus (after serving their own consumption) is sold to the contracted retailer. No additional storage or other devices and systems (e.g., Energy Management System) are available.

Scenario II – Peer-to-Peer Trading (P2P). This scenario extends the baseline scenario by energy trading capabilities between customers. Within the community, all surplus is distributed to the customers with demand (based on the demand/surplus share of each customer). For the peer-to-peer trading one energy price is used for all customers within the community.

Scenario III – Battery Usage (Bat2P_V1). The third scenario extends the baseline scenario by a community battery. Community members can store their surplus energy for later use and finally, for increasing their self-consumption.

Scenario IV – Battery with Release Time (Bat2P_V2). This scenario is based on the previous one. Additionally, a battery release time is included: The Blockchain technology allows to flag each kWh which is transferred and thus, also each kWh which is stored into the battery. This flag contains the origin as well as the transaction time and its price. After a configured time (e.g., 36 h in the simulation scenarios), the energy must be released from the battery. Before the release time expires, the owner of the energy needs to use it for serving its own consumption. Additional energy will be sold to other community customers and to the retailer if there are not enough recipients within the community. This strategy allows a fair usage of the battery and avoids situations in which customers only store their surplus energy without obtaining it, resulting in a fully charged battery without any possible interaction with the other community members in the worst case.

Scenario V – Battery with Release Time and Peer-to-Peer Trading (Full_Bat2P). The fifth scenario extends the previous one by adding the peer-to-peer trading as a last step. Surplus which cannot be stored in the battery is sold to community customers with demand.

Scenario VI – Peer-to-Peer Trading and Battery with Release-Time (Full_P2P). The last scenario is similar to the previous one but the order of the battery usage and the peer-to-peer trading is inverted. Surplus is first sold to other community customers (if there is any demand), additional surplus is stored into the battery. Both, scenario V and VI perform a battery release as a first step.

Prices and Tariffs. Beside the principle of locality (energy is consumed within the region of generation), a financial incentive is an important aspect to foster the acceptance and adoption of energy communities [15]. Within the simulations, the following energy costs (to and from retailer as well as within the community), grid costs (reduced tariffs for energy transfer within the community including storage utilization), tax and other fees are used. The total costs and revenues (from the customer perspective) for each transaction are illustrated in Fig. 8.

  • Selling energy to community customers: 6.08 €ct/kWh

  • Selling energy to the retailer: 5.02 €ct/kWh, 2.78 €ct/kWh, 2.75 €ct/kWh (staggered)

  • Buying energy from community customers: 13.01 €ct/kWh

  • Buying energy from the retailer: 17.40 €ct/kWh

  • Battery charging: 0.385 €ct/kWh

  • Battery discharging: 2.654 €ct/kWh

Fig. 8.
figure 8

Energy price (including tax and grid tariffs) for trading within the community, using the battery, and selling to or buying from the retailer.

5.3 Results

The simulation was performed for a time period of one year with 15 min time intervals resulting in 35040 time steps. The total costs aggregated for all community members (including energy costs, grid fees, loss fees, taxes) and all scenarios are shown in Fig. 9 (left), both for using a 100 kWh battery storage and 1000 kWh battery storage. Additionally, the average costs for the community customers are shown in the right part of the figure. Obviously, the baseline scenario (grid) has the highest total costs. Depending on the scenario, the total and average costs can be reduced up to 6%. These savings are based on reduced fees and taxes for intra-community energy flows and community energy costs which are beneficial for customers with surplus as well as for customers with demand (compared to transactions with the retailer).

Fig. 9.
figure 9

Community results.

Figure 10 illustrates the average costs per customer, based on the customer type (residential customers, industrial customers, mixed customers, agricultural customers). This figure illustrates a high deviation between potential savings for customer types, based on the used storage system – residential customers benefit more than industrial and agricultural customers in the last two scenarios when using the smaller storage system; industrial and agricultural customers can save more in these two scenarios when using the larger storage system.

Fig. 10.
figure 10

Community results.

Additionally, the battery capacity as well as the release time (36 h in the simulation) have a high impact on the community results. The higher the battery capacity, the higher the release time could be set aiming to have a high battery utilization without blocking customers surplus feed-in due to a high state-of-charge.

To sum up, it was shown that energy sharing within an energy community as well as utilizing a community storage can have positive impacts on the total costs for each customer. The amount depends on the energy flows, the used battery storage system (with or without battery release) and especially on the composition/structure of the customer and generation types inside the community (cf. [50]). For example, if the amount of consumption and generation among community members has similar values for similar times, it is obvious that most energy can be utilized locally. Results shown here are based on a community with a dominance in consumption compared to generation. Furthermore, only PV generation was investigated, which has a rather clear and predictable power output over time. Further studies and investigations with more varying scenarios to retrieve important indicators for the constellations and behavior of energy communities via sensitivity analysis and stochastic simulation approaches have to be done in the future.

6 Conclusion and Outlook

This article explains the concept of energy communities in Europe, the legal framework and the definition of Renewable Energy Communities (RECs) and Citizen Energy Communities (CECs) as well as their participants structure. Within the European Union’s Clean Energy Package, RECs and CECs are defined and the legal background is provided, whereas the Renewable Energy Directive (EU) 2018/2001 (RED) and the Electricity Directive (EU) 2019/944 (ED) are of main interest.

The Blockchain with a high level of automation, transparency, and data immutability is one possible option for implementing technical solutions for energy communities to provide mechanisms for energy trading and accounting. Several legal aspects such as privacy and data protection aspects have to be considered in the solutions as personal data are processed – in this case consumption or generation data with the opportunity to infer to (community) customers. Smart Contracts contain source code and pre-defined rules for their automated execution and contract conclusion – for example, between community participants when exchanging energy. As many legal definitions can be used only on human beings, several open questions still have to be clarified for fully-automated Smart Contract-based solutions for energy communities.

Within the Austrian research project Blockchain Grid, Blockchain-based solutions for energy-trading and self-consumption optimization for a REC in Styria, Austria have been developed, deployed, and validated within a several months field trial phase. The trading algorithms as well as the utilization of a available community battery storage system are implemented by using Smart Contracts. Special energy price, reduced grid fees and loss fees as well as reduced taxes are used for energy trading within the community or when using the community battery for increasing the self-consumption of the customers. In parallel, simulation models have been used for assessment of the economical potential for community customers. A digital representation of the Styrian community was simulated and a total cost reduction of up to 6% (on average per customer) could be achieved with the implemented solution.

For successful implementation of energy communities all over Europe, several social, legal and regulatory aspects have to be clarified in order to enable the already partly available technical solutions – either on Blockchain technology or based on classical I(o)T-systems. Multi-country research projects – such as the European project CLUE – could help to work on transnational solutions and recommendations for legal, regulatory and technical frameworks enabling the implementation of economic communities.