Unification of Edge Energy Grids for Empowering Small Energy Producers

: The current energy landscape is largely comprised of big stakeholders, who are often the monopolistic drivers of their local market. This fact does not leave any room for smaller players to participate in this procedure by contributing their part in the energy pool. Moreover, the dynamic demand for power along with the current power production rate are not corelated, rendering the power distribution grid, a best effort network, prone to power failures, due to the inevitable irreg-ularities in demand. This paper introduces a novel concept that allows small energy producers, such as solar panel grids, to offer their production excess through an intelligent energy brokerage block-chain-based framework. The proposed framework ingests the vast amounts of bigdata stemming from the distributed smart energy grids smart metering and allows for automatic commercial transactions of power between the participants of a dedicated marketplace. Values dynamically fluctuate depending on the real-time offer and demand and the grid’s state. Thus, all partaking stakeholders are able to take the most out of their product by leveraging the intelligence provided by the energy marketplace, and contribute to the overall stabilization of the energy grid.


Introduction
The way we interact with our world around us in almost every aspect of our lives, from how we monitor our environment to how we power our homes and communities is revolutionized, through the collection of vast amounts of information, from a variety of heterogeneous Internet of Things (IoT) devices [1] and Energy net metering [2], which can help to evolve and transform the electric Grid optimization [3]. This information can have an immediate impact towards the improvement of our wellbeing, by providing unprecedented insights on the intelligent and proactive control [4] and monitoring of how power is delivered from a powerplant and used throughout our communities. In this respect, existing energy grids are tightly coupled with a vast network of smart devices and sensors, capable of generating enormous volumes of heterogenous data [5] (bigdata), daily. These data flows, which are difficult to manage and control, can be either dropped, or dismissed, or in some cases underutilized, thus minimizing their impact on benefiting energy grids' optimization. The processing of the collected data, due to its wide diversity, requires intelligent decision-support systems that must utilize current market trends, while also empowering energy distributors to optimize their grids. It is reported by the world economic forum that the deployment and installation of smart meters could generate between 30€ to 60€ [6] in annual savings per customer, raising this number to billions of Euros in total savings. Current power systems consist of several Gensets (Electricity generators) for cold spinning reserve (ancillary services) [7,8], which are activated trough industrial networks [8] (Scada, PLCs, etc), in case of unexpected events (i.e., power disturbances or total failures) in the distribution grid. These units, along with Power Factor Correctors are capable of correcting reactive power (Q) in addition to active power production, both for on-premises issues, and even more for Neighbor or Total Line issues. Currently these gensets are off-line during any disturbance of the grid, thus not contributing to the system's stability optimal performance. This modus operandi leaves a huge room for improvement, through which both the owner/consumers of the units as well as the whole nearby distribution network can benefit, resulting to the overall enhancement of the power network, and reaching the required power quality.
Currently, the peak-load demand distribution [9] is never a straight line. This fact, apart from the disastrous results it can bring within the distribution lines, can also significantly raise the running costs of electric grids, and also impose. Being aware of this uneven distribution can help identify "cheaper" time-periods [10] of electricity production lifecycle the current energy market is not exploiting. Furthermore, the energy market is primarily comprised of large Power providers, who are leaving no room for Small and Medium-sized Enterprises (SMEs) [11], who are usually based on renewable energy sources, to take part in the power-production market. These small players are mostly "forced" to sell their produced energy to the large power distributors; thus, are abolishing any leverage they could have to influence the energy market. An optimized distributed ledger powered energy market where energy producers and distributors can buy and sell energy automatically, according to a set of criteria, defined by the stakeholders and influenced by the demand, or unexpected events (i.e., power failures in large geographical areas, or big sports events that increase the demand), could mitigate this imbalance. Utilizing public blockchain networks optimized for smart contracts (e.g., Ethereum blockchain [12]), will empower small power suppliers (i.e., solar panels) to securely record the excess power output on the block chain and sell it to large power distributors, or allow themselves to become large power distributors, while at the same time increase their revenue by omitting intermediaries.
In addition, the revolutionization of the smart cities and smart communities, integral part of which are the smart power grids, stems from the immerging ICT era, empowered by the 5G and the distributed Edge Computing paradigms. These immersive technologies introduce the concept of network technology "recycling" and unification [13] for creating a common access playground that can provide a variety of services to the end-users/clients or edge Supervisors (Neighbor based). The advancements of 5G and Edge Computing provide a "fertile" environment for enabling intelligent decision-making, where and when they are needed the most, at the source where the data flows of heterogeneous source are generated. At the same time, the combination of Edge Computing with energy in Hybrid approaches can enable total management in numerous fields. In this paper we present a novel unification of the edge that can be used for the optimization and the empowerment of small energy producers and the utilization of the data stemming from all energy producers and energy sensors of the network.

System Description
The system is based on the well-known three-layered architectural [14][15][16] approach, able to work cooperatively in every part of the grid Network. Starting from the "extreme edge" layer we have the data and energy generating layer that consists of all near-theedge devices. These devices can be probes, sensors, smart meters, and monitoring devices that are creating an interconnected heterogeneous network of things, in a unified community. This enhancement is supported by an edge layer, which is able to interconnect communities in larger groups, creating clusters called "suburbs" that are able to monitor the power consumption of a specific area in real-time, and enable the smooth out-of-the-peak load-demand distribution by enabling, in an automated manner, the cold spinning reserve (ancillary services) by the use of industrial networks (Scada, PLCs, etc). Finally, an energy layer is introduced, which can unify and support "suburbs" to provide common energy resource-utilization and at the same time help in the necessary resource supplement management. The key idea is to partition the three-layer infrastructure, consisting of the extreme edge, the edge, and the energy layers into logical virtual networks whose membership can partially overlap with that of other Fog grids and to dynamically reshape this segmentation to ensure fine-grained management of the available resources.
To achieve the above, we are borrowing the successful model of Distributed networks in a hybrid form, where a peer can be "primus inter pares". In this context we enable two types of interconnected elements ( Figure 1). The first type work as regular objects, named Edge Nodes (EN) and the latter are Enablers Edge Nodes (EEN). The achieved unification creates a community playground, SMEs can provide their produced power and translate into a digital energy unit, though a novel element named EnergyStore, which takes under consideration the power consumption and the market requests in power in real-time. Though the proposed system we bypass the "obligation" of small energy producers [17] to sell their produced energy to the large power distributors; thus, they partake in the common energy market as equals, directly competing with large power producers. Secondly, we introduce the dynamic cold spinning reserve in the total "suburb" peak load equation, which can efficiently support power-offloading and improve the peak load graph. Finally, we present a distributer ledger powered energy market, where energy producers and distributors can buy and sell energy automatically, according to a set of criteria defined by the stakeholders and influenced by the current market demand, and unexpected events throughout the grid (i.e., power failures in large geographical areas, or big sports events that increase the demand). An EN can be any enddevice having at least some processing and communication capabilities that will allow us to deploy our solution on it and thus transform the device into a fully operational edge node. An EN interacts with its corresponding EEN, firstly to inform it about the device's available resources, and secondly to receive and carry out the assigned computational or/and networking tasks. . An EEN plays two roles within the proposed ecosystem, namely the role of the edge intra-supervisor and the role of the edge's envoy to the edge orchestrator. As an intrasupervisor, an EEN: a) Oversees the formation of the extreme edge network by performing operations such as the (de)registering of extreme nodes; b) queries the registered edge nodes about their state and their available resources; and c) creates a logical topology of the extreme and edge network along with a virtual pool of the ENs available resources. As an envoy, an EEN interacts with the edge orchestrator towards a) (de)registering an extreme edge network to the edge overlay; b) providing a "copy" of the EEN's virtual pool of resources and energy, therefore enabling edge orchestrator to have a clear image for the available energy resources across the whole ecosystem; and c) mediating between orchestrator and ENs for reserving resources, assigning energy tasks or even deploying cold-spinning elements. Following hybrid Peer to Peer (P2P) paradigm, an EEN is selected from the currently running ENs taking into account several attributes like energy production, energy consumption element, computation processing and power level/type, etc. Recognizing that the unrestrained membership of Edge nodes in the selection process could pose security threats, we are providing a Security as a Service (SaaS) tool that can provide the means for "screening" the candidates list based on the stakeholder's policies. The EEN is elected from the existing ENs; it manages ENs and it is the point of contact to the orchestrator.

Energy Store
Energy Store is itself a distributed system following the decentralization and digitalization trends [18]. This toolset will deal with energy monitoring of the edge deployment including sensors, actuators, devices, gateways, and the software deployed at the edge. Additionally, it will provide the needed services to provide updates triggered by the system administrator or by the users using the Service Store. The Store subsystem of the proposed platform allows for optional or third-party software installation to the edge system, in a plug-n-play manner.
The edge layer will facilitate the software components and PaaS capabilities that will allow third-party systems to safely integrate into the platform. The toolset provides a set of services that enable the energy monitoring of legacy subsystems as well as the integration of services that connect the legacy systems to the rest of the platform. This toolset will leverage existing services to facilitate the deployment of new services and updates.

Brokering Ability
In this section we introduce the brokerage module that lives inside the Energy Store that acquires all energy sources and brokers them focusing on achieving revenue for all energy producers. The ability to interconnect and unify the production of multiple energy producers provides multiple new revenue streams with the ability to create tailored products (e.g.," green contracts" from only "green" energy producers). The brokerage system performs various functionalities, namely discovery, integration, aggregation, customization, quality assurance and optimization.
Discovery deals with the identification and selection of existing energy services to allow the creation of user-tailored contracts. This functionality allows the Energy Store to list all energy offerings from different providers, where end-users can directly compare similar energy services, their ratings, and other relevant features.
Integration is related to the provision of energy-based environment in order to integrate separate energy systems. The integration aims at either facilitating power exchange between separate systems or realizing collaborative business processes within the existing energy systems.
Aggregation concerns the provision of energy services that comprise multiple thirdparty energy producers. An aggregated energy service may allow users to interact with the interfaces of the third-party services directly (for instance, through a smart-meter interface), or indirectly, through a common interface that encapsulates the individual services and possibly add common functionality such as cold-spinning reserve, coupling capacitors and capacitor dividers.
Customization enables the implementation of new functionalities to enrich the offered energy services, by means of extension rather than modification of that services' implementation e.g., include only "green" energy sources.
Quality assurance ensures that one or more energy services achieve specific quality expectations. This can be performed by service testing, policy enforcement, SLA monitoring, and possibly by self-management mechanisms triggered, to restore service quality.
Optimization enables the opportunistic improvement of the consumption or provisioning of an energy service with respect to various criteria, such as cost, functionality, or performance.
The overall architecture of the brokerage module is depicted in Figure 2. This module retrieves all the available and tradable energy units from the small energy grids.

 Smart Filtering Module
This module applies a smart filtering to the list of the available energy services, based on the users' preferences and the SLA parameters.

Trading Module
This module provides all the interaction between the service provider and the function providers. The Trading module is used for requesting a new trade/offer from the Energy Providers (EP).

 Energy Contract Advertise Module
This module is responsible for the advertisement/return of all tradable Energy Services to the EPs.

 Accepted Offers DLT
This module is responsible for updating the distributed Ledger for the accepted offers in order to be available for the accounting module for billing purposes and provide transparent transactions to all involved parties.
According to the proposed mechanism, the EP browse the offerings from the energy contracts' catalogue that match its requirements. If the requested function supports Brokering/Trading, the internal modules will try to fulfil the criteria set by the EP. Furthermore, the brokerage module initiates the appropriate bid/trading policies according to the EP's request in collaboration with the Energy Discovery module.
The high-level architecture of the brokerage module along with the interaction inside the Marketplace is described below and depicted above in the high-level architecture of the brokerage module along with the interaction inside the Marketplace.
1. The EP provides the Energy Contract request and the initial price to the brokerage module. 2. The brokerage module informs the Energy Producers (EPRs) regarding the request and the initial price. 3. EPR send their bids for the functions (Power produced Price, Infrastructure cost, Setup price and the SLA specification) 4. The brokerage module initiates an auction to maximize its revenue based on the produced power price, setup price, infrastructure cost and SLA specification. 5. The brokerage module informs the bidding results. 6. Depending on the type of auction, an iteration continues until a bidding winner is found. 7. The brokerage module announces the final results. 8. The winner acknowledges the results. 9. The brokerage module indicates the Energy Contract price, which is provided by the EPRs that won the bidding, to the EP. 10. The EP accepts the price. 11. The EP receives the energy contract. 12. Finally, all setup prices will be sent to the accounting module through the SLA management module.
According to the trading process (i.e., auction-based algorithm in XX), the Energy brokerage module determines the optimal allocation solution, considering the maximization of Energy Provider's income. Consequently, the brokerage module undertakes the trading procedure that collects bids from Energy Producers (EPRs), in order to lease the produced power to the energy customers, through the EP. The brokerage module computes the assigning solution through this mechanism together with price and SLA per service.

Infrastructure Cost of Brokering
Infrastructure costs are calculated with the use of the algorithm described below Algorithm 1. The overhead lines cost OL_cost, underground and subsea cables (US_Cost), onshore AC substation Cost (OAS_Cost) and the HVDC converter stations and Transformer's cost (HVDCCT_COST) are calculated based on the prices stemming from various Energy Infrastructure providers on the internet [18]. Furthermore, when the auctionbased algorithm is followed, the sellers (i.e., EPRs) that are denoted as S = {1, 2,…,s}, lease the Energy Services, denoted as V = {1,2,…,v}, to b = 1 buyers (EPs). The EP is able to buy/lease Energy Services, denoted as xv for a specific time period ti, by reporting a price P(b) = {xv, ti} (i.e., bid price of Energy Services considering specific requirements), while the EPRs lease Energy Services yv, providing a function cost fv, for a specific time ti and with a specific SLA Lv, by reporting a price P(S) = {fv, yv, ti, Lv} (i.e., asking price of Energy Services considering specific requirements). Finally, the pair (b,v) in the pseudo-code bellow represents possible combinations of solutions, regarding "v" Energy Service to EP. In case EP benefit must be maximized, an optimization problem is formulated as follows, based on linear programming, i.e., the following equation: Access service catalog store 3.
Estimate the initial price per Energy Services 4.
Create and advertise price-portfolio 5.
for all offers and bids do: 7.
Sort P(S) and P(b) in descending order based on price, function cost and SLA and create the auction-portfolio 8.
end for 9.
Calculate In this respect and to facilitate competition among Function Providers (EPRs) a novel brokerage platform is designed that will allow i) the customers to search for available offerings, ii) auctioning between the third-party function developers (EPRs) and the EP, in order to find the best price for the Energy Services that will be part of each Energy Contract.
Furthermore, while the provision of Energy Services encompasses several system functionalities, Energy Service trading can be regarded as one part of the process that deals with the economic aspects. The trading process determines all the issues related with Energy Services selling and buying (e.g., direct trading between service provider and function provider or via a brokerage module), while pricing is a major issue that determines the value (or worth) of the Energy Services to the service provider and the function provider.
Another issue is the competition/cooperation among function and service providers, as well as customers involved in Energy Services trading. Depending on the Energy Services trading model, the Energy Service access may require permission through the cooperation of service provider and function provider, through a payment process. To determine the optimal network function provision during the trading process, optimization and decision theory techniques can be used.

Brokering with an Energy Blockchain
The blockchain is a distributed ledger recording the events of all Power producers that generate data, processing and sharing. It is composed of a growing number of blocks. In our Broker, each block contains one or more events identified by event hash. An event hash is computed by hashing the event content, as the event fingerprint. A block also has a block header, which contains (shown in figure down): • Root of all the event hashes in the block. • Timestamp: The time of when the block is created. • Block hash: The hash code computed based on the hash of the last block, the root, and the timestamp.
The cascaded hash computing at the event level (event hash), the block level (root), and the chain level (block hash) ensures the content immutability of a blockchain. If someone wants to modify the block information, he/she has to modify the entire chain. Yet, any tampering with the content can be easily detected by re-generating the hash codes and comparing them with the original ones.
In our Brokerage model, the blockchain service manages the immutable information of energy data. Two types of events are recorded on a blockchain: Energy generation event and session creation event.
Energy Generation Event. An energy generation event is created when an energy record file or a cold spinning reserve is requested to be started. It contains overhead lines cost OL_cost, underground and subsea cables (US_Cost), onshore AC substation Cost (OAS_Cost) and the HVDC converter stations and Transformers cost (HVDCCT_COST), signature, event type, last chunk location in chain, etc.
Session Creation Event. A session creation event is created when a Energy consumer takes an action in the system. It contains the start time, end time, public key of the provider and the requester for identifying the session participants, as well as the signature.
The operation of the proposed engine will be based on pioneering mathematical models (e.g., game theory) for analyzing, compiling, combining, and correlating all related information and data from different levels patterns and contexts in a privacy-aware manner. These techniques will provide the basis required for supporting the processing and storage of Energy contracts gathered from various sources in a unified structure in order to discover the relationships between Energy producers and Energy consumers along with the timeline of the contract, including a map of affected power producers and a set of meaningful chain of contract.

Conclusions
This paper introduces a novel concept that allows small energy producers, such as solar panel grids, to offer their production excess through an intelligent energy brokerage blockchain-based framework. These units, along with Power Factor Correctors (ancillary services) are capable of correcting reactive power (Q) in addition to active power production, both for on-premises issues, and even more for Neighbor or Total Line issues. Currently these gensets are off-line during any disturbance of the grid, thus not contributing to the system's stability optimal performance. This modus operandi leaves a huge room for improvement, through which both the owner/consumers of the units as well as the whole nearby distribution network can benefit, resulting to the overall enhancement of the power network, and reaching the required power quality. Additionally, the utilization of the small energy producers in the optimization equation along with the ability to commonly contribute to the energy grid provides a new approach of operation. In this paper we describe a novel framework that ingests the vast amounts of bigdata stemming from the distributed smart energy grids though the net metering and allows for automatic commercial transactions of power between the participants of a dedicated marketplace. Values dynamically fluctuate depending on the real-time offer and demand and the grid's state. Thus, all partaking stakeholders are able to take the most out of their product, by leveraging the intelligence provided by the energy marketplace, and contribute to the overall stabilization of the energy grid.