- Decentralized, peer-to-peer energy trading is growing in popularity due to the development of distributed energy resource (DER) technologies.
- Achieving optimal energy expenditure within these systems is challenging.
- This paper proposes a blockchain-based energy platform to maximize the efficiency of distributed energy resources.
- The proposed energy platform consists of two parts: (1) a blockchain-based trading system and; (2) predictive analytics which inform the trading system using smart contracts and secure decentralized oracles like DECO.
- Using machine learning to predict energy consumption data, the paper simulates a system that predicts energy consumption a day ahead and schedules energy disbursement to meet grid demand.
Can a secure, decentralized energy trading system be designed using blockchain technology, smart contracts, and decentralized oracle networks to maximize efficiency and energy output with day-ahead energy scheduling?
Jamil, F., Iqbal, N., Ahmad, S., & Kim, D. (2021). Peer-to-Peer Energy Trading Mechanism Based on Blockchain and Machine Learning for Sustainable Electrical Power Supply in Smart Grid. IEEE Access, 9, 39193-39217.
- Renewable energy resources present opportunities for peer-to-peer (P2P) energy trading between homes and buildings.
- These are made possible by smart grid innovations such as distributed energy resource (DER) technologies.
- These technologies allow energy distribution to be decentralized by allowing energy transfer between energy users.
- They also change the dynamics of energy distribution through reconfiguring the roles of utility companies and energy consumers.
- Utility companies in this system do not distribute the energy from a centralized source, but rather serve as (1) providers of transmission line infrastructure that the energy is transmitted through and; (2) coordinators of automated energy distribution throughout the grid.
- Utility companies can thus be thought of as crowdsourcing platforms for energy distribution.
- A highly secure system utilizing blockchain technology, smart contracts, and secure oracles like Chainlink’s DECO are the kind of tools needed to manage the complex transactions required for such a system.
- The main challenges for such a system are scalability and security, both of which can be handled with hybrid smart contracts and decentralized oracles.
Table 1: Blockchain characteristics.
Permissioned Blockchain – a centrally controlled, privately managed blockchain. This contrasts with decentralized, permissionless blockchains such as Bitcoin and Ethereum. Table 1 above illustrates how Hyperledger Fabric, the blockchain the authors model their system on, differs from Bitcoin and Ethereum.
Practical Byzantine Fault Tolerance (PBFT) Consensus Mechanism – while the permissionless blockchains listed in Table 1 rely on Proof of Work (PoW) consensus mechanisms, the authors argue that some of their faults, which include high energy consumption and scalability issues, suggest that another approach is needed in this environment.
The authors recommend a Practical Byzantine Fault Tolerance (PBFT) consensus mechanism to improve scalability and minimize energy consumption. PBFT consensus tolerates byzantine faults, or component failure, in networks that are prone to attack and instability.
Smart Contracts – smart contracts are programs hosted on blockchains that trigger outcomes when certain conditions are met. A breakdown of smart contract examples, features, and use cases can be found on the Chanlink blog.
Prosumers – prosumers are providers and consumers of energy within decentralized energy systems. In the energy trading mechanism discussed in this paper, all energy consumers are prosumers.
The energy trading system proposed in this paper requires a number of components in order to effectively distribute energy:
- Blockchain network: allows for transaction and network management of the system. Modeled on Hyperledger Fabric, a permissioned blockchain.
- Smart contracts and oracles: allows for day-ahead scheduling and controllable loads of distributed energy resources (DERs) along with the flexibility to deal with local needs.
- Data analytics and machine learning prediction: data mining and machine learning prediction systems are needed to automate decision-making and predict long- and short-term energy needs.
Table 2: Comparison of proposed decentralized energy trading platforms.
There are several blockchain-based energy trading platforms that use permissioned and permissionless blockchains along with a variety of consensus mechanisms. These are summarized in Table 2 above.
Figure 1: Energy trading platform overview.
Figure 1 provides an overview of the role of the blockchain network in facilitating energy trading. Each node in the blockchain network is a prosumer who receives energy externally and exchanges energy with other individuals in the network via energy trading transactions (ETT in the diagram).
Figure 2: Blockchain-based energy trading platform workflow.
Figure 2 provides a more detailed breakdown of the role of the smart contracts and oracles in the energy trading systems. Oracles bring in off-chain, external energy data to smart contracts which are programmed to make predictions about energy consumption on a short- and long-term basis. These predictions are then used to schedule energy disbursement to meet current and next-day conditions.
Figure 2 also contains information about the role that machine learning plays in this scheme. Here we see that machine learning predictions, which use off-chain data provided by oracles, are fed into smart contracts that perform each of the essential functions mentioned above.
Figure 3: Energy trading transaction types.
There are two transaction types in this system: Type 1 and Type 2, both illustrated in Figure 3. Type 1 transactions are between the utility provider and households, and Type 2 are between households themselves. Both are facilitated by rewards given to the energy provider.
The authors are able to implement their system using Hyperledger Fabric and simulate the internal performance of their system by feeding hourly energy consumption data from Jeju, South Korea between 2002-2018 into a simulation of the framework discussed in the paper. Simulations using this data were conducted using a framework called Hyperledger Calliper.
Internal performance of the blockchain-based framework was measured by transaction rate and transaction latency to assess scalability as the number of transactions increased.
The authors used a number of machine learning algorithms to predict energy consumption. Some of these methods include:
- Long Short-Term Memory (LSTM) neural networks that are used mostly for predicting time series data.
- Bi-Directional LSTM (Author’s Proposed Model) is a variant of the LSTM model.
- Recurrent Neural Networks (RNN) that are also used for predicting sequential data.
- Random Forests which construct decision trees to make predictions.
- XGBoost which are a variant of random forests with optimization boosting.
Performance for these methods was measured as the MSE or mean squared prediction error between the actual and predicted energy consumption along with other variations of MSE such as mean absolute error (MAE), root mean square error (RMSE), and R2 which measures model fit.
Figure 4: Transaction Latency and Throughput Analysis. Send rate is in transactions per second (TPS). Latency is in milliseconds (ms). Throughput is in TPS.
Figure 5: Comparison of proposed Bidirectional LSTM approaches with traditional deep learning approach for energy consumption prediction.
Figure 6: Comparison of the proposed approach with other machine learning methods.
The authors conduct a massive undertaking in this paper. They create a framework for efficient peer-to-peer energy transactions in a decentralized blockchain-based system, design that system using a permissioned blockchain, and simulate how that system would operate using real, hourly energy consumption data from South Korea. They then go on to demonstrate that the system performs well under simulated conditions in terms of its ability to handle transactions and to predict needed energy consumption accurately.
For these reasons alone, the authors should be commended for the contributions they’ve made here toward the future of sustainable energy.
That being said, any energy distribution system must also be judged by how secure it is and the extent to which it reduces pollution. Both of these features seem to be assumed in this paper without any additional proof. An absolutely essential part of such a system would require incorporating decentralized identity systems like CanDID to handle users’ information and privacy-preserving, secure oracles like DECO to help ensure seamless data transfer.
Both of these features should be the focus of similar papers in the future.
The authors demonstrate that a blockchain-based peer-to-peer energy trading system is not only possible but also can be scalable and continuously make the accurate predictions needed to maintain such a system.
Thus, they provide a strong foundation for future research in this area and give entrepreneurs as well as city, state, and local governments developing these technologies greater confidence in their ability to successfully transition from the existing, centralized electricity distribution system to a decentralized distributed energy resource (DER).