Next Article in Journal
Some Applications of Analytic Functions Associated with q-Fractional Operator
Next Article in Special Issue
Optimal Integration of Battery Systems in Grid-Connected Networks for Reducing Energy Losses and CO2 Emissions
Previous Article in Journal
The Novel Analytical–Numerical Method for Multi-Dimensional Multi-Term Time-Fractional Equations with General Boundary Conditions
Previous Article in Special Issue
An improved Fractional MPPT Method by Using a Small Circle Approximation of the P–V Characteristic Curve
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Blockchain-Driven Real-Time Incentive Approach for Energy Management System

1
Department of Computer Science and Engineering, Institute of Technology, Nirma University, Ahmedabad 382481, Gujarat, India
2
Software Engineering Department, College of Computer and Information Sciences, King Saud University, Riyadh 12372, Saudi Arabia
3
Computer Science Department, Community College, King Saud University, Riyadh 11437, Saudi Arabia
4
Doctoral School, University Politehnica of Bucharest, Splaiul Independentei Street No. 313, 060042 Bucharest, Romania
5
National Research and Development Institute for Cryogenic and Isotopic Technologies—ICSI Rm. Vâlcea, Uzinei Street, No. 4, 240050 Râmnicu Vâlcea, Romania
6
Faculty of Civil Engineering, Technical University of Cluj-Napoca, Constantin Daicoviciu Street, No. 15, 400020 Cluj-Napoca, Romania
*
Authors to whom correspondence should be addressed.
Mathematics 2023, 11(4), 928; https://doi.org/10.3390/math11040928
Submission received: 16 January 2023 / Revised: 3 February 2023 / Accepted: 9 February 2023 / Published: 12 February 2023

Abstract

:
In the current era, the skyrocketing demand for energy necessitates a powerful mechanism to mitigate the supply–demand gap in intelligent energy infrastructure, i.e., the smart grid. To handle this issue, an intelligent and secure energy management system (EMS) could benefit end-consumers participating in the Demand–Response (DR) program. Therefore, in this paper, we proposed a real-time and secure incentive-based EMS for smart grid, i.e., RI-EMS approach using Reinforcement Learning (RL) and blockchain technology. In the RI-EMS approach, we proposed a novel reward mechanism for better convergence of the RL-based model using a Q-learning approach based on the greedy policy that guides the RL-agent for faster convergence. Then, the proposed RI-EMS approach designed a real-time incentive mechanism to minimize energy consumption in peak hours and reduce end-consumers’ energy bills to provide incentives to the end-consumers. Experimental results show that the proposed RI-EMS approach induces end-consumer participation and increases customer profitabilities compared to existing approaches considering the different performance evaluation metrics such as energy consumption for end-consumers, energy consumption reduction, and total cost comparison to end-consumers. Furthermore, blockchain-based results are simulated and analyzed with the help of deployed smart contracts in a Remix Integrated Development Environment (IDE) with the parameters such as transaction efficiency and data storage cost.

1. Introduction

The proliferation of energy demand necessitates the effective production and distribution of energy in modern grid infrastructure, i.e., a smart grid with an automated control facility for an energy management system (EMS). Energy management (EM) can be realized using three ways, i.e., energy efficiency, strategic load growth, and Demand–Response (DR). Strategic load and energy efficiency involve long-term planning problems and do not consider real-time planning, whereas DR is a mechanism that controls load in real time [1]. There are several ways to implement load control in real time, such as direct load control, time-based techniques, and many more. In direct load control, an electric utility company (EUC) can switch off/on the end-consumer electric appliances and provide incentives to the end-consumer as per the agreement. Furthermore, the total energy consumption associated with the end-consumer in the time-based techniques remains the same. Only the time to consume energy is changed considering the varying price signal forwarded by the EUC to the consumer. It also changes the shape of the energy load curve with the help of minimization of peak-to-average ratio (PAR) and reduces the energy bill of the end-consumer [2,3]. Moreover, DR can be characterized [4] into price-based DR and incentive-based DR, both of which have been comprehensively investigated in smart grid systems [5,6].
The usage of the DR mechanism can be defined with the time of use (TOU), critical peak pricing (CPP), and real-time pricing (RTP) mechanisms. As per the available literature survey, it is found that end-consumers are comfortable with the TOU mechanism, and system complexity is also less. Still, it suffers from a rebound peak problem, which is not the scenario in RTP. In recent decades, different DR strategies have been presented that aim to control residential houses or commercial buildings [7,8]. For example, Sun et al. [9] study the importance of heating, ventilation, and air conditioning, i.e., (HVAC) with distributions and physical parameters. Next, Zhang et al. [10] presented a service pricing-based load balancing approach for residential end-consumers. In [11], a secure and effective real-time scheduling mechanism is proposed for residential DR. Next, Ruzbahani et al. [12] presented an optimal incentive-based DR program for smart homes. Most studies focused on the deterministic rule, abstract model, or mathematical approach that suffers from various issues. For example, optimality cannot be obtained by the deterministic rules in the dynamic energy systems that can cause financial losses. It is heavily dependent on the operator’s skill and suffers from scalability issues (for example, game-theoretic or MILP optimization) due to the involvement of a high number of binary variables.
To tackle the aforementioned issues associated with optimality and scalability, one of the noteworthy solutions is Artificial Intelligence (AI), which has proved its effectiveness toward optimal decision making utilizing Deep Learning (DL) and Reinforcement Learning (RL). Several RL approaches, such as Q-learning, Deep Q-Network, etc., have been incorporated by researchers worldwide to mitigate the decision-making problems [13,14,15]. Then, Zheng et al. [16] focused on the behavioral coupling of end-consumers by incorporating an incentive-based integrated DR approach for multiple energy carriers. In [17], a priority double deep Q-learning approach is presented to improve residential EMS. Most of the existing techniques used in Q-learning are modeled as Markov Decision Processes (MDPs). Still, it has not been exploited fully with real-time incentives and the accessibility of data for all stakeholders such as smart grid, end-consumers, and EUC. Other challenges, such as confidentiality, security, and privacy, must also be considered for efficient and trustable EM. Therefore, blockchain technology is the only solution to handle all these challenges mentioned above.
Blockchain is a secure, immutable, distributed ledger technique (DLT) that contains a chain of data blocks to mitigate security and trust issues such as single-point-of-failure, anonymity, and data manipulation [18]. It has been adopted to monitor EMS securely in the smart grid environment efficiently. For example, the authors of [19] formulated a Stackelberg game approach for achieving optimal energy pricing for efficient energy trading. In [18], blockchain achievability is presented in a smart grid system. Next, Jindal et al. [1] projected a blockchain-based system, i.e., GUARDIAN, to ensure the security of DR. Later, researchers adopted the decentralized blockchain technology in EMS for residential research areas as well [20]. As a result, existing blockchain-based approaches have several limitations, such as data storage cost (relatively high), high energy consumption, low transaction efficiency, and the requirement of high bandwidth to access data in real time [21,22,23]. Table 1 shows the comparative analysis of energy management systems with the proposed approach, which highlights how the proposed approach surpasses the research gaps such as the reliability, data storage cost, and transaction efficiency of related research work with the help of blockchain and interplanetary file system (IPFS)-based framework. Motivated by the above-mentioned gap, this paper proposed the RI-EMS approach: a Real-time Incentive-based Energy Management System using RL (i.e., Q-learning) and blockchain. The proposed RI-EMS approach stores energy data transactions utilizing an off-chain data storage platform, i.e., IPFS, that improves the scalability, data storage cost, reliability, and throughput of the EM.

1.1. Research Contributions

The following are the research contributions of this paper.
  • This paper proposes an RI-EMS approach for DR based on Q-learning to prioritize the experience of an agent and for faster convergence of DR using an epsilon greedy policy.
  • A novel real-time incentive mechanism is proposed using a smart contract for the end-consumer to motivate them to participate in DR due to the appropriate and optimal incentives obtained for each participant in the EM.
  • The proposed RI-EMS approach is evaluated compared to the conventional approaches in terms of consumer participation, energy consumption reduction, transaction efficiency, and data storage cost.

1.2. Organization of the Paper

The rest of the paper is organized as follows. First, Section 2 highlights the system model and problem formulation of the proposed RI-EMS approach, and Section 3 discusses the proposed RI-EMS approach in detail. Next, Section 4 presents the performance evaluation of the RI-EMS approach. Finally, the paper is concluded with future work in Section 5.

2. System Model and Problem Formulation

This section presents the system model and problem formulation of the proposed RI-EMS approach.

2.1. System Model

The proposed RI-EMS approach (as shown in Figure 1) involves the utilization of a smart grid platform to optimize and preserve energy consumption for consumers with the incorporated blockchain network. Now, energy consumption associated with the consumers σ i participating in the energy management scheme can be defined based on the different types of energy load ( E l ) in the particular locality, i.e., residential or commercial. For that, initially, energy consumption data are considered to optimize the incentive for consumers as residential σ r or commercial σ c . Based on the residential or commercial consumers, we can contemplate the energy consumption to optimize it further using the smart grid.
Therefore, if we consider the case of residential consumers, then energy consumption is affected by various energy loads, i.e., thermal ( θ σ r ), time-shiftable ( τ σ r ), power-shiftable ( μ σ r ), and other non-controllable ( N σ r c ) energy loads. Meanwhile, we assume the energy consumption associated with the commercial consumers to be affected by the controllable ( β σ c ) and non-controllable ( δ σ c ) energy loads. Next, we need to reduce the evaluated energy consumption of residential and commercial consumers with the help of a smart grid. Thus, consumers with higher energy consumption can be given an incentive, which will also encourage them to save more energy in real time [18]. It seems difficult for consumers to save energy due to the involvement of high energy consumption. To achieve the optimum energy consumption, we have formulated an incentive mechanism for the residential and commercial consumers by applying a Q-learning approach in which ϵ greedy policy is applied to attain reduced energy consumption and convergence for a better response from consumers. TOU-based EMS is introduced in a smart grid to incentivize consumers based on their energy usage. Furthermore, to ensure the fair incentive mechanism in the scheme, we have employed a blockchain network enabled with IPFS to store the data in a distributed and immutable manner to add data transactions in the blockchain network further (with the help of a smart contract) [26]. However, before storing the energy consumption data in IPFS, data should be legitimate and authenticated by the introduced validation authority (VA). Once data are authorized by VA, they can be made available for storage in IPFS based on smart contract execution. So, real-time data accessibility and storage can be performed over a blockchain network in a real-time incentive-based energy management scheme using the smart grid.

2.2. Problem Formulation

The proposed RI-EMS approach is a real-time incentive-based energy management system in which s number of consumers { σ 1 , σ 2 , σ s , , σ s } are categorized into residential σ r and commercial consumers ( σ c ) based on their energy consumption. However, to enable the classification of consumers, energy consumption data can be defined based on the consumers, i.e., residential or commercial. Next, energy consumption associated with the residential consumer is determined by considering the energy loads, i.e., { θ σ r , τ σ r , μ σ r , N σ r c } of various appliances. Similarly, the energy consumption corresponding to the commercial consumers also depends on the types of energy loads of appliances, which is assumed to be controllable γ σ c and non-controllable N σ r c . Therefore, we can mention the various energy loads ( E l σ r , E l σ c ) which affect the energy consumption of the residential and commercial consumer. The aforementioned association is represented as follows:
E l σ r = θ , if   thermal   load τ , if   time - shiftable   load μ , if   power - shiftable   load N c , if   non - controllable   load
E l σ c = β , if   controllable   load δ , if   non - controllable   load
Thus, we have discussed the variables affecting the energy loads of residential and commercial consumers. Then, based on the several energy loads, we can focus on the energy consumption corresponding to the residential and commercial consumers. Firstly, we have to evaluate the energy consumption associated with the consumers ϵ σ r , ϵ σ c based on the classification, i.e., residential and commercial. Therefore, the energy consumption of residential and commercial consumers can be calculated considering the energy demand ε of various energy loads at a time interval ξ , which can be mentioned as follows:
ε σ r ξ = ε θ σ r ξ + ε τ σ r ξ + ε μ σ r ξ + ε N σ r c ξ
ε σ c ξ = ε β σ c ξ + ε δ σ c ξ
Next, we have to determine the reduction in energy consumption of residential and commercial consumers to achieve the maximum incentive for optimal energy management using the smart grid. However, the incentive obtained by the residential and commercial consumers depends on the reduction in energy consumption. Thus, the reduction in energy consumption of residential consumers can be calculated as follows:
ε σ r M i n ξ = ε σ r a ξ ε σ r o ξ 2
where ε a ξ and ε o ξ denote the actual and objective energy consumption at a time interval ξ . Furthermore, objective energy consumption is decided based on previous energy usage in energy management. The actual energy consumption of residential consumers can be evaluated based on the types of energy loads along with their energy usage, which is mentioned as follows:
ε σ r a ξ = N τ ξ ε k + N μ ξ ε l + N N c ξ ε m N s ξ ε n
Similarly, the reduction in energy consumption of commercial consumers can be determined as follows:
ε σ c M i n ξ = ε σ c a ξ ε σ c o ξ 2
Here, the actual energy consumption of commercial consumers can be calculated based on the types of energy load, i.e., controllable and non-controllable. As we have not considered the shiftable types of energy load for commercial consumers (not included in the scope of this research work), the calculation of actual energy consumption of commercial consumers with the number of controllable and non-controllable energy loads can be represented as follows:
ε σ c a ξ = N β ξ ε k + N δ ξ
Thus, we have considered the N and P number of energy loads for residential and commercial consumers to reduce energy consumption, which further leads to efficient and optimal energy management using a smart grid. In the proposed system, the main criteria of the smart grid are to provide an incentive to the consumers based on the reduction in energy consumption σ r M i n and σ c M i n . Therefore, we have deduced the objective function C O , C O to optimize the real-time incentive for consumers σ r , c with the help of a smart grid at a time interval (in hours) ξ { 1 , 2 , , 24 } , which can be mentioned as follows:
O p t i m i z e ( C O , C O ) = ξ = 1 24 ( N , P ) = 1 4 , 2 ε σ r , c M i n , ( N , P ) ξ ρ s
where N and P number of energy loads affecting the energy consumption of residential and commercial consumers are considered for optimizing the incentive price based on the obtained reduced energy consumption σ r , c M i n with the help of smart grid ρ s . Moreover, the energy consumption data of residential and commercial consumers are stored in IPFS immutable data storage after being made legitimate by VA. After being authenticated by VA, a smart contract runs to check the energy data’s validity that must be stored in the IPFS. As a distributed and secure ledger, the blockchain network stores data transactions with improved cost-efficiency with the help of integrated IPFS protocol. Furthermore, the proposed incentive mechanism ensures the optimal energy management of the consumers with the help of a smart grid. The real-time incentive mechanism works on the principle of an optimal Q-value and action-value function determined to achieve the reward for consumers at a particular state in a dynamic environment. Furthermore, the employed 5G network helps to provide the incentive to consumers with high efficiency, availability, and reliability in the blockchain-based energy management system. A 5G wireless network, along with its low latency, high availability, and high data rate (DR) features, is being considered in the blockchain and IPFS-based energy management scheme.

3. The Proposed Approach

Figure 2 shows the proposed RI-EMS approach, i.e., a blockchain-based real-time incentive energy management scheme, which is divided into a 3-layered architecture consisting of an energy layer, incentive layer, and blockchain layer. These layers are explained in detail to provide an overview of the proposed approach, which is represented as follows:

3.1. Energy Layer

The proposed scheme initiates with the energy layer, which involves collecting energy consumption data of residential and commercial consumers to deduce the maximum incentive for using various energy loads. The RI-EMS utilizes the Q-learning-based RL approach to attain the real-time incentive by extracting the Q-value with the help of the Q-table. Consumers’ energy consumption is affected by the usage of various appliances associated with the energy loads, i.e., thermal, time-shiftable, power-shiftable, and other non-controllable loads for residential consumers and controllable and non-controllable energy loads for commercial consumers. The proposed scheme mainly focuses on optimizing the energy consumption associated with residential and commercial consumers using the smart grid. The energy consumption of consumers, along with their corresponding energy loads, can be represented as follows:
ϵ σ r { θ σ r , τ σ r , μ σ r , N σ r c }
σ c = { β σ c , δ σ c }
Moreover, the energy consumption of residential and commercial consumers fluctuates based on the usage of appliances of various energy loads. Therefore, we have formulated the incentive mechanism for consumers based on the reduction in energy consumption explained in the incentive layer. Figure 3a shows the flowchart for the energy layer that mainly indicates the energy consumption associated with several energy loads, which the RL agent handles.

3.2. Incentive Layer—Reinforcement Learning Approach

The incentive layer serves as a middle layer between the energy and blockchain layer to provide real-time incentives to the residential and commercial consumers based on the optimized dynamic energy consumption ε σ r M i n ξ and ε σ c M i n ξ calculated using actual and objective energy consumption. We have applied the RL approach to obtain the minimized cost for residential and commercial consumers based on dynamic energy consumption. Furthermore, Figure 3b depicts that the RL method comprises multiple agents, i.e., residential and commercial consumers, whose main aim is to choose an action that yields the minimized cost in a dynamic environment. To implement the RL method, we need to consider three elements, i.e., state, action, and cost.
Assume S denotes the state set which represents the state of the RL agent, i.e., residential and commercial consumers ( s σ r , ξ , s σ c , ξ ) at a time interval ξ . Action is defined by A, which signifies the action of consumers ( a σ r , ξ , a σ c , ξ )∈( ε σ r M i n ξ , ε σ c M i n ξ ) to the dynamic environment to obtain the maximized cost. For example, how residential and commercial consumers act in a dynamic environment based on the dynamic energy consumption can decide their optimized cost C ξ O and C ξ O . After obtaining the optimized cost, the dynamic environment can be forwarded to the next state ( s σ r , ξ + 1 , s σ c , ξ + 1 ). However, we have already discussed the associated energy loads of residential and commercial consumers and how they influence energy consumption. We have evaluated the reduced energy consumption of the consumers with the help of actual and objective energy consumption. Based on the calculated reduced energy consumption, we have deduced an objective function specifying the cost for residential and commercial consumers varying with the reduced energy consumption, and the smart grid ensures the low pricing for consumers.
Therefore, firstly, we can define the optimal policy Δ for agents, i.e., residential and commercial consumers, to optimize the objective cost evaluated using reduced energy consumption. Thus, the action-value function Q Δ σ r for residential consumers considering the state, action, and policy can be represented as follows:
Q Δ ( s σ r , ξ , a σ r , ξ ) = j = ξ + 1 T ω j ξ 1 C j 1 O | s σ r , ξ , a σ r , ξ
s σ r , ξ S , a σ r , ξ A
where ω denotes the discount factor associated with the residential consumers. Similarly, we can calculate the action-value function Q Δ σ c for commercial consumers with the help of objective cost C O . Moreover, the optimality of the action value for residential and commercial consumers is represented by Q Δ ( s σ r , ξ , a σ r , ξ ) and Q Δ ( s σ c , ξ , a σ c , ξ ) .
Furthermore, agents, i.e., ( s σ r , ξ , s σ c , ξ ) should take action ( a σ r , ξ , a σ c , ξ ) to maximize the reward or incentive η ( s σ r , ξ , a σ r , ξ ) using the Q-learning approach based on the policy at a particular state ( s σ r , ξ , s σ c , ξ ). The Q-learning approach works on the principle of Q-value Ω ( s σ r , ξ , a σ r , ξ ) by preparing the Q-table containing the action ( a σ r , ξ , a σ c , ξ ) and state ( s σ r , ξ , s σ c , ξ ). As a result, the flow of the incentive layer with Q-value is considered an important aspect to obtain the optimal price, which is further forwarded to the consumers based on the reduced energy consumption calculated using actual and objective energy consumption. Therefore, the calculation of the Q-value for residential consumers is represented as follows:
Ω ( s σ r , ξ , a σ r , ξ ) Ω ( s σ r , ξ , a σ r , ξ ) + β ( η ξ + 1 ( s σ r , ξ , a σ r , ξ ) + ω m a x Ω ( s σ r , ξ + 1 , a σ r , ξ ) Ω ( s σ r , ξ , a σ r , ξ ) )
where β represents the learning rate which lies in the range of [0, 1] and ω is considered as the discount factor associated with the action–value pair calculated to maximize the cost objective function of residential consumers. Similarly, we can calculate the optimization of incentive or reward η ( s σ c , ξ , a σ c , ξ ) for commercial consumers based on the Q-value, which is expressed as follows:
Ω ( s σ c , ξ , a σ c , ξ ) Ω ( s σ c , ξ , a σ c , ξ ) + β ( η ξ + 1 ( s σ c , ξ , a σ c , ξ ) + κ m a x Ω ( s σ c , ξ + 1 , a σ c , ξ ) Ω ( s σ c , ξ , a σ c , ξ ) )
Furthermore, Algorithm 1 shows how the Q-learning approach can be used to determine the optimization of the Q-value for residential and commercial consumers with the help of optimal policy in terms of time complexity of O(e) (which represents the number of episodes to compute the optimization of Q-value), which is expressed as follows:
Therefore, we have applied the Q-learning approach to maximize the incentive η ( s σ r , ξ , a σ r , ξ ) and η ( s σ c , ξ , a σ c , ξ ) for residential and commercial consumers based on the dynamic energy consumption that is considered as the action ( ε σ r M i n ξ , ε σ c M i n ξ ) taken by the consumers for each state of s σ r , ξ , s σ c , ξ at a time interval ξ . After obtaining the incentive mechanism for consumers using the Q-learning approach, the secure storage of reduced energy consumption has been explained in the blockchain layer, which focuses on real-time incentive energy storage with the help of the introduced IPFS.
{ δ , δ } = a r g m a x ( Ω ( s σ r ) , Ω ( s σ c ) , ξ )
Algorithm 1 Incentive for Consumers using Q-learning
Input: s σ r , ξ , s σ c , ξ , a σ r , ξ , a σ r , ξ , Q Δ , Q Δ , ξ
Output: Optimized incentive
1:
procedureIncentive_Consumer( s σ r , ξ , s σ c , ξ , ξ )
2:
    if  σ σ r  then
3:
        for  ξ time interval < 0  do
4:
            A s s i g n Q v a l u e 0
5:
           for E dopisode e
6:
               Calculate action value for residential consumer
7:
               Assign State s σ r , ξ
8:
                Q Δ = j = ξ + 1 T ω j ξ 1 C j 1 O | s σ r , ξ , a σ r , ξ
9:
               Compute incentive η ( s σ r , ξ , a σ r , ξ )
10:
               Transit to new state s σ r , ξ + 1
11:
               Compute optimization of Q-value
12:
                δ = a r g m a x ( Ω ( s σ r , ξ , a σ r , ξ ) )
13:
           end for
14:
        end for
15:
    else
16:
        for  ξ time interval < 0  do
17:
            A s s i g n Q v a l u e 0
18:
           for Episode e do
19:
               Calculate action value for commercial consumer
20:
               Assign State s σ c , ξ
21:
                Q Δ = j = ξ + 1 T ω j ξ 1 C j 1 O | s σ c , ξ , a σ c , ξ
22:
               Compute incentive κ ( s σ c , ξ , a σ c , ξ )
23:
               Transit to new state s σ c , ξ + 1
24:
               Compute optimization of Q-value
25:
                δ = a r g m a x ( Ω ( s σ c , ξ , a σ c , ξ ) )
26:
           end for
27:
        end for
28:
    end if
29:
end procedure

3.3. Blockchain Layer

Ethereum blockchain, as a secure and decentralized platform, is introduced to ensure secure and real-time incentive energy management for consumers implemented with a value-based Q-learning algorithm. To accomplish real-time data accessibility and energy consumption data stored securely in the blockchain, IPFS as an immutable peer-to-peer protocol is employed in the system to improve the scalability and reliability of the communication between multiple agents in the dynamic environment [29]. Initially, VA as an authorizing entity is considered to confirm the identity of consumers participating in energy management. To legitimize the authorization of data storage in IPFS, an intelligent contract run as a self-executable code to check the authenticity of energy consumption data. If it becomes authenticated for data storage, then IPFS as a cost-efficient protocol allocates hash keys ϕ σ r and ψ σ c to residential and commercial consumers. Next, the consumers containing the hash keys ϕ σ r and ψ σ c provided by the IPFS can use them as data access and storage keys to perform the transactions of real-time energy management in the blockchain network.
Algorithm 2 depicts how energy data can be stored securely with the help of a blockchain network considering the time complexity, i.e., O(s), and O( s ) associated with the number of residential and commercial consumers request for data storage. Furthermore, the security of energy management transactions of the consumers needs to be ensured in the blockchain network. For that, we have utilized the pair of keys, i.e., public key and private key of consumers P c k σ r , P e k σ r and P c k σ c , P e k σ c using asymmetric public key cryptography to preserve the energy management of consumers in the dynamic environment, which is denoted by D E :
Algorithm 2 Blockchain-based algorithm for secure energy data storage
Input: σ r , σ c , I P F S h k , V A
Output: Add energy data transactions to the blockchain
1:
procedureEnergy_data( ϕ σ r , ϕ σ c , σ r , σ c )
2:
    if  σ σ r  then
3:
        for  x = 1 , 2 , , s  do
4:
            I P F S h k d a t a _ r e q u e s t s ( σ r )
5:
            σ r a u t h o r i z e V A
6:
           Execute smart contract
7:
           if  σ r ∈ authorized then
8:
                σ r ϕ σ r I P F S h k
9:
                b l o c k c h a i n A d d _ d a t a ( σ r )
10:
               Secure data storage in the blockchain
11:
           else
12:
               Invalid consumer
13:
           end if
14:
        end for
15:
    else if  σ σ c  then
16:
        for  y = 1 , 2 , , s  do
17:
            I P F S h k d a t a _ r e q u e s t s ( σ c )
18:
            σ c a u t h o r i z e V A
19:
           Execute smart contract
20:
           if  σ c ∈ authorized then
21:
                σ r ψ σ c I P F S h k
22:
                b l o c k c h a i n A d d _ d a t a ( σ r )
23:
               Secure data storage in the blockchain
24:
           else
25:
               Invalid consumer
26:
           end if
27:
        end for
28:
    end if
29:
end procedure
D h ( ( σ r , σ c ) , D E ) = ( ( ϕ σ r , ψ σ c ) , D E )
φ P c k ( σ r , σ c ) ( D s d P e k α r ) ( D h ( ( σ r , σ c ) , D E ) ) = D h ( ( σ r , σ c ) , D E )
where D h signifies the hash digest of the energy transactions of consumers σ r and σ c in the dynamic environment D E . D s d represents the digital signature of consumers associated with their private key { P e k σ r , P e k σ c }. Furthermore, Figure 4 shows the basic working of the blockchain layer in which energy data optimized from the incentive layer are stored securely in the blockchain network through the IPFS intermediary protocol. Then, the smart grid operator manages the energy data that can be forwarded to consumers based on their reduced energy consumption.

4. Performance Evaluation

This section gives an overview of the performance evaluation of the proposed RI-EMS approach. The proposed RI-EMS approach is implemented with python high-level programming language on the Windows operating system with the configuration of Intel(R) Core(TM) CPU of 2.60 GHz and 8 GB RAM to maximize the incentive for consumers based on the Q-learning approach considering the performance metrics such as energy consumption for end-consumer, energy consumption reduction, and total cost comparison. Furthermore, blockchain-based results are evaluated and analyzed by deploying the smart contracts in Remix IDE with the help of parameters such as transaction efficiency and data storage cost.

4.1. Dataset Description

The performance evaluation of the proposed RI-EMS approach is conducted using the standard dataset, i.e., Open Energy Information (openEI) [30]. It contains energy consumption data for residential houses and commercial buildings as well. Then, the pre-processing of the energy data is performed with a sci-kit-learn library to tackle noise, Not-a-Number (NaN), missing values, duplicate values, etc. Next, the critical load data (such as AC and other appliances) is obtained from Pecanstreet [31]. Then, hourly energy prices are considered from PJM Data Miner as 2nd August 2022 [32]. Finally, Table 2 shows the several simulation parameters considered for implementing and predicting the results for the proposed RI-EMS approach.

4.2. Energy Consumption Reduction and Comparative Analysis

Figure 5a highlights the energy consumption of the end-consumers by considering the distinguished non-controllable and controllable energy loads. In the proposed approach, the energy consumption of commercial consumers has been calculated with the help of controllable and non-controllable energy demand. Furthermore, the reduction in energy consumption is determined using the respective consumer’s actual and objective energy consumption. The graph depicts the acquired energy consumption of the proposed approach in a time interval (hours) of [0, 25]. It can be observed from the graph that a controllable energy load yields higher energy consumption than non-controllable energy consumption, which leads to the increased incentive of consumers in the case of a non-controllable energy load.
Figure 5b presents the energy consumption reduction due to the incentive mechanism used in the proposed approach. Here, energy demand is marked in orange color, and consumption of energy by the consumer is marked in green. The dotted line represents the hourly energy prices. This graph depicts the consumption reduction in peak hours and the increase in consumption in non-peak hours; for example, in the morning (1 AM to 8 AM), consumption is high, and during peak hours, consumption is reduced to receive more incentives from the consumer. Furthermore, the proposed RI-EMS approach is compared with the baseline approach such as Gurobi optimizer [33] by having the same simulation parameters setting. Figure 6 depicts the costs comparison, which comprises total energy consumption reduction and discomfort costs to the end-consumer. It is evident from the graph that the proposed RI-EMS approach learns through a trial and error mechanism and performs well with the increasing number of episodes compared to the baseline model.

4.3. Transaction Efficiency

Figure 7a shows the transaction efficiency comparison considering two scenarios in which one scenario is to perform data transactions in the proposed RI-EMS approach with IPFS. Another scenario focuses on performing the data transactions in the proposed approach with blockchain. It can be perceived from the scenarios that transaction efficiency seems to lie at the same level when fewer data transactions are performed between multiple agents. However, with the exponential increase in the number of data transactions, the proposed RI-EMS approach with IPFS exhibits quite improved transactions efficiency compared with the proposed scheme with blockchain. This is because IPFS works on generating a hash, which must be assigned to the consumers for secure and cost-efficient data storage.

4.4. Data Storage Cost

In this subsection, we have focused on the data storage cost of the RI-EMS approach to ensure cost-efficient energy management for consumers. Therefore, we have focused on the data storage cost of the Ethereum blockchain network, which is a decentralized and secure platform. Initially, we highlight an important metric, i.e., gas price for a single word, which is denoted by G p w . Furthermore, the gas price G p K for 1 KB of energy consumption data correlates with G p w in which G p K can be calculated as 20 10 3 G a s and G p w can be written in the form of expression ( 2 10 / 256 ) ( 20 10 3 ) G a s . Furthermore, data storage cost C W associated with W number of words in a blockchain can be computed with the parameters gas price and Ethereum price ( g s b c , E T b c ). Therefore, considering ether value (Ev) as 10 9 , data storage cost can be expressed in the form ( w G ) / E v to calculate the cost in USD as ( g s b c C W ) E T b c [34].

Storage Cost Analysis

The aforementioned computation for data storage cost proves that using blockchain as a data storage platform incurs huge costs, which can demotivate consumers from utilizing the energy of appliances associated with various energy loads. As a result, Figure 7b shows the data storage cost analysis of the proposed RI-EMS approach considering the data storage as blockchain and IPFS. Finally, the graph exhibits relatively low storage cost when using IPFS as data storage with the proposed RI-EMS approach. Moreover, when fewer consumers are involved in the energy data transactions, then the data storage cost for both platforms lies at the exact alignment. Still, with the exponential surge in the number of energy data transactions, the requirement of data storage cost for the proposed RI-EMS approach with IPFS is relatively lower than the blockchain data storage. The main reason for the cost-efficient behavior of IPFS is that it stores consumers’ energy data by generating a hash, which requires a lower cost than the blockchain (stores a whole block of data).

5. Conclusions

The growth of smart homes has increased the research on EMS across the globe. So, in this paper, we presented an incentive-based EMS for smart grid, RI-EMS integrated with blockchain technology in real time. We have adopted the DR-based Q-learning approach to optimize the incentive for residential and commercial consumers based on the calculated reduction in energy consumption. We have categorized consumers based on the several energy loads to obtain insights into energy consumption. Moreover, we have formulated a real-time incentive mechanism based on the action-value function and Q-value applied using the Q-learning approach implemented in the python programming language to obtain the reward or incentive for consumers. The consumer incentive mechanism has been optimized based on the ϵ greedy policy to guide multiple agents for better convergence. Finally, the performance of the proposed RI-EMS approach is simulated against important metrics, i.e., consumer participation, energy consumption reduction, and total cost comparison to end-consumers. Next, blockchain-based results are implemented by deploying the smart contracts in Remix IDE in terms of transaction efficiency and data storage cost.
In the future, we will implement a DL model with the Q-learning approach to obtain the optimum energy consumption for consumers managed by the multiple agents. DL and Q-learning approaches can improve the incentive for consumers monitored by multiple agents. Furthermore, we can consider a real-time and dynamic scenario to implement the blockchain-based technology for efficient and optimal EM in smart homes.

Author Contributions

Conceptualization: S.T., S.A., M.S.R., F.A. and R.G.; writing—original draft preparation: R.K., A.K., R.G. and S.A.; methodology: S.T., M.S.R., F.A., A.T. and A.K.; writing—review and editing: R.K., R.G., S.T., S.A., D.L.M. and A.T.; Investigation: R.K., F.A., A.K., D.L.M. and S.T.; Visualization: S.T., M.S.R., S.A., A.K., A.T. and R.G. All authors have read and agreed to the published version of the manuscript.

Funding

This work was funded by the Researchers Supporting Project number (RSP2023R509) King Saud University, Riyadh, Saudi Arabia and was partially supported by UEFISCDI Romania and MCI through BEIA projects AutoDecS, SOLID-B5G, AISTOR, Hydro3D, EREMI, FinSESCo, CREATE and by European Union’s Horizon Europe research and innovation program under grant agreement No. 101081061 (PLENTY-LIFE). This work is supported by Ministry of Research, Innovation, Digitization from Romania by the National Plan of R & D, Project PN 19 11, Subprogram 1.1. Institutional performance-Projects to finance excellence in RDI, Contract No. 19PFE/30.12.2021 and a grant of the National Center for Hydrogen and Fuel Cells (CNHPC)—Installations and Special Objectives of National Interest (IOSIN).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

No data is associated with this research work.

Acknowledgments

This work was funded by the Researchers Supporting Project number (RSP2023R509) King Saud University, Riyadh, Saudi Arabia and was partially supported by UEFISCDI Romania and MCI through BEIA projects AutoDecS, SOLID-B5G, AISTOR, Hydro3D, EREMI, FinSESCo, CREATE and by European Union’s Horizon Europe research and innovation program under grant agreement No. 101081061 (PLENTY-LIFE). This work is supported by Ministry of Research, Innovation, Digitization from Romania by the National Plan of R & D, Project PN 19 11, Subprogram 1.1. Institutional performance-Projects to finance excellence in RDI, Contract No. 19PFE/30.12.2021 and a grant of the National Center for Hydrogen and Fuel Cells (CNHPC)-Installations and Special Objectives of National Interest (IOSIN).

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

AcronymDefinition
AIArtificial intelligence
CPPCritical peak pricing
DLTDistributed ledger technique
DRData rate
DLDeep learning
DRDemand response
EMSEnergy management system
EUCElectric utility company
EMEnergy management
IPFSInteplanetary file system
IDEIntegrated development environment
MDPMarkov decision process
NaNNot-a-number
PARPeak-to-average ratio
RTPReal-time pricing
RLReinforcement learning
TOUTime of use
VAValidation authority

References

  1. Jindal, A.; Aujla, G.S.S.; Kumar, N.; Villari, M. GUARDIAN: Blockchain-based Secure Demand Response Management in Smart Grid System. IEEE Trans. Serv. Comput. 2019, 13, 613–624. [Google Scholar] [CrossRef]
  2. Jindal, A.; Singh, M.; Kumar, N. Consumption-Aware Data Analytical Demand Response Scheme for Peak Load Reduction in Smart Grid. IEEE Trans. Ind. Electron. 2018, 65, 8993–9004. [Google Scholar] [CrossRef]
  3. Asef, P.; Taheri, R.; Shojafar, M.; Mporas, I.; Tafazolli, R. SIEMS: A Secure Intelligent Energy Management System for Industrial IoT Applications. IEEE Trans. Ind. Inform. 2023, 19, 1039–1050. [Google Scholar] [CrossRef]
  4. Paterakis, N.G.; Erdinç, O.; Catalao, J.P. An overview of Demand Response: Key-elements and international experience. Renew. Sustain. Energy Rev. 2017, 69, 871–891. [Google Scholar] [CrossRef]
  5. Kumari, A.; Vekaria, D.; Gupta, R.; Tanwar, S. Redills: Deep Learning-Based Secure Data Analytic Framework for Smart Grid Systems. In Proceedings of the 2020 IEEE International Conference on Communications Workshops (ICC Workshops), Dublin, Ireland, 7–11 June 2020; pp. 1–6. [Google Scholar] [CrossRef]
  6. Miao, H.; Chen, G.; Zhao, Z.; Zhang, F. Evolutionary Aggregation Approach for Multihop Energy Metering in Smart Grid for Residential Energy Management. IEEE Trans. Ind. Inform. 2021, 17, 1058–1068. [Google Scholar] [CrossRef]
  7. Basnet, S.M.; Aburub, H.; Jewell, W. Residential demand response program: Predictive analytics, virtual storage model and its optimization. J. Energy Storage 2019, 23, 183–194. [Google Scholar] [CrossRef]
  8. Chen, T.; Bu, S.; Liu, X.; Kang, J.; Yu, F.R.; Han, Z. Peer-to-Peer Energy Trading and Energy Conversion in Interconnected Multi-Energy Microgrids Using Multi-Agent Deep Reinforcement Learning. IEEE Trans. Smart Grid 2022, 13, 715–727. [Google Scholar] [CrossRef]
  9. Sun, Y.; Elizondo, M.; Lu, S.; Fuller, J.C. The impact of uncertain physical parameters on HVAC demand response. IEEE Trans. Smart Grid 2014, 5, 916–923. [Google Scholar] [CrossRef]
  10. Zhang, W.; Wei, W.; Chen, L.; Zheng, B.; Mei, S. Service pricing and load dispatch of residential shared energy storage unit. Energy 2020, 202, 117543. [Google Scholar] [CrossRef]
  11. Kumari, A.; Tanwar, S. A Reinforcement Learning-based Secure Demand Response Scheme for Smart Grid System. IEEE Internet Things J. 2021, 9, 2180–2191. [Google Scholar] [CrossRef]
  12. Ruzbahani, H.M.; Karimipour, H. Optimal incentive-based demand response management of smart households. In Proceedings of the 2018 IEEE/IAS 54th Industrial and Commercial Power Systems Technical Conference (I & CPS), Niagara Falls, ON, Canada, 7–10 May 2018; pp. 1–7. [Google Scholar] [CrossRef]
  13. Lu, R.; Hong, S.H. Incentive-based demand response for smart grid with reinforcement learning and deep neural network. Appl. Energy 2019, 236, 937–949. [Google Scholar] [CrossRef]
  14. Ma, R.; Yi, Z.; Xiang, Y.; Shi, D.; Xu, C.; Wu, H. A Blockchain-Enabled Demand Management and Control Framework Driven by Deep Reinforcement Learning. IEEE Trans. Ind. Electron. 2023, 70, 430–440. [Google Scholar] [CrossRef]
  15. Lu, R.; Jiang, Z.; Wu, H.; Ding, Y.; Wang, D.; Zhang, H.T. Reward Shaping-Based Actor-Critic Deep Reinforcement Learning for Residential Energy Management. IEEE Trans. Ind. Inform. 2022, 1–12. [Google Scholar] [CrossRef]
  16. Zheng, S.; Sun, Y.; Li, B.; Qi, B.; Shi, K.; Li, Y.; Tu, X. Incentive-Based Integrated Demand Response for Multiple Energy Carriers Considering Behavioral Coupling Effect of Consumers. IEEE Trans. Smart Grid 2020, 11, 3231–3245. [Google Scholar] [CrossRef]
  17. Mathew, A.; Jolly, M.J.; Mathew, J. Improved residential energy management system using priority double deep Q-learning. Sustain. Cities Soc. 2021, 69, 102812. [Google Scholar] [CrossRef]
  18. Kumari, A.; Gupta, R.; Tanwar, S.; Tyagi, S.; Kumar, N. When blockchain meets smart grid: Secure energy trading in demand response management. IEEE Netw. 2020, 34, 299–305. [Google Scholar] [CrossRef]
  19. Li, Z.; Kang, J.; Yu, R.; Ye, D.; Deng, Q.; Zhang, Y. Consortium Blockchain for Secure Energy Trading in Industrial Internet of Things. IEEE Trans. Ind. Inform. 2018, 14, 3690–3700. [Google Scholar] [CrossRef]
  20. Kumari, A.; Shukla, A.; Gupta, R.; Tanwar, S.; Tyagi, S.; Kumar, N. ET-DeaL: A P2P Smart Contract-based Secure Energy Trading Scheme for Smart Grid Systems. In Proceedings of the IEEE INFOCOM 2020-IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS), Toronto, ON, Canada, 6–9 July 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 1051–1056. [Google Scholar]
  21. Zhang, L.; Cheng, L.; Alsokhiry, F.; Mohamed, M.A. A Novel Stochastic Blockchain-Based Energy Management in Smart Cities Using V2S and V2G. IEEE Trans. Intell. Transp. Syst. 2022, 20, 915–922. [Google Scholar] [CrossRef]
  22. AlSkaif, T.; Crespo-Vazquez, J.L.; Sekuloski, M.; van Leeuwen, G.; Catalão, J.P.S. Blockchain-Based Fully Peer-to-Peer Energy Trading Strategies for Residential Energy Systems. IEEE Trans. Ind. Inform. 2022, 18, 231–241. [Google Scholar] [CrossRef]
  23. Singh, R.; Tanwar, S.; Sharma, T.P. Utilization of blockchain for mitigating the distributed denial of service attacks. Secur. Priv. 2020, 3, e96. [Google Scholar] [CrossRef]
  24. Hupez, M.; Toubeau, J.F.; Atzeni, I.; Grève, Z.D.; Vallée, F. Pricing Electricity in Residential Communities Using Game-Theoretical Billings. IEEE Trans. Smart Grid, 2022; early access. [Google Scholar] [CrossRef]
  25. Mota, B.; Faria, P.; Vale, Z. Residential load shifting in demand response events for bill reduction using a genetic algorithm. Energy 2022, 260, 124978. [Google Scholar] [CrossRef]
  26. Kumari, A.; Tanwar, S. A secure data analytics scheme for multimedia communication in a decentralized smart grid. Multimed. Tools Appl. 2022, 81, 34797–34822. [Google Scholar] [CrossRef]
  27. Wen, L.; Zhou, K.; Li, J.; Wang, S. Modified deep learning and reinforcement learning for an incentive-based demand response model. Energy 2020, 205, 118019. [Google Scholar] [CrossRef]
  28. Salazar, E.J.; Jurado, M.; Samper, M.E. Reinforcement Learning-Based Pricing and Incentive Strategy for Demand Response in Smart Grids. Energies 2023, 16, 1466. [Google Scholar] [CrossRef]
  29. Gupta, R.; Reebadiya, D.; Tanwar, S.; Kumar, N.; Guizani, M. When Blockchain Meets Edge Intelligence: Trusted and Security Solutions for Consumers. IEEE Netw. 2021, 35, 272–278. [Google Scholar] [CrossRef]
  30. OpenEI. Open Energy Information: Smart Meters Data from Houses. Available online: https://openei.org/datasets/files/961/pub (accessed on 29 July 2022).
  31. Pecan Street Dataport. Available online: https://www.pecanstreet.org/dataport/ (accessed on 18 July 2021).
  32. pjm Data Miner. Available online: https://www.pjm.com/markets-and-operati\ons/etools/data-miner-2.aspx (accessed on 18 January 2021).
  33. Gurobi Optimization. Available online: http://www.gurobi.com (accessed on 29 July 2022).
  34. REMIX: The Native IDE for Web3 Development. Available online: https://remix.ethereum.org/ (accessed on 28 December 2022).
Figure 1. System model.
Figure 1. System model.
Mathematics 11 00928 g001
Figure 2. RI-EMS: The proposed approach [27,28].
Figure 2. RI-EMS: The proposed approach [27,28].
Mathematics 11 00928 g002
Figure 3. Flowchart for the proposed RI-EMS approach.
Figure 3. Flowchart for the proposed RI-EMS approach.
Mathematics 11 00928 g003
Figure 4. Blockchain layer.
Figure 4. Blockchain layer.
Mathematics 11 00928 g004
Figure 5. Comparative analysis: (a) Energy consumption by a particular end-consumer, (b) Energy consumption reduction with the proposed RI-EMS approach.
Figure 5. Comparative analysis: (a) Energy consumption by a particular end-consumer, (b) Energy consumption reduction with the proposed RI-EMS approach.
Mathematics 11 00928 g005
Figure 6. Comparison of RI-EMS with existing approach.
Figure 6. Comparison of RI-EMS with existing approach.
Mathematics 11 00928 g006
Figure 7. Comparative analysis: (a) Transaction efficiency comparison for the proposed RI-EMS approach, (b) Storage cost analysis for proposed RI-EMS approach.
Figure 7. Comparative analysis: (a) Transaction efficiency comparison for the proposed RI-EMS approach, (b) Storage cost analysis for proposed RI-EMS approach.
Mathematics 11 00928 g007
Table 1. Comparative analysis of various state-of-the-art EMSs with the proposed.
Table 1. Comparative analysis of various state-of-the-art EMSs with the proposed.
AuthorYearObjectivePricing MechanismProsCons
Zhang et al. [10]2020Presented a load dispatch energy storage method for residential areaIteration algorithmReduced operation cost, convergentNeed to consider energy trading for dynamic energy loads, privacy issues
Kumari et al. [11]2020Implemented the smart contract to ensure secure energy trading for smart gridNo mechanismHigh scalability, reduced storage cost, and low latencyShould focus on optimal pricing, efficiency, and energy consumption
Zheng et al. [16]2020Presented a DR model to obtain the incentives for multiple energy carriersIncentive-based approachImproved accuracy, reduced dissatisfaction costReduced energy consumption and transaction efficiency is not focused
Mathew et al. [17]2021Proposed a DR learning model for an efficient residential EMDR-based greedy policyOptimized peak cost and peak loadNeed to implement with larger state space for optimal incentive
Li et al. [19]2018Discussed a secure energy-trading system for the Industrial Internet of Things using consortium blockchainStackelberg gameOptimized price, secure against double-spending and adversary attacksNo discussion on energy consumption reduction and cost
Hupez et al. [24]2022Formulated a game-theoretical approach for efficient energy scheduling in residential communitiesNon-cooperative game theoryOptimized incentive and fairNo discussion on energy consumption, data storage cost, and transaction efficiency
Bruno et al. [25]2022Presented a residential demand response management for optimal load schedulingGenetic algorithmReduced energy cost and electricity billReliability, data storage cost, and energy consumption need to be considered
The proposed approach2022Proposed a real-time incentive approach for EMS using blockchainQ-learningOptimal price, incentive, high efficiency, and reliability-
Table 2. Simulation settings.
Table 2. Simulation settings.
ParticularValues
ξ 1 h
Peak hour5 PM to 12 PM
Mid-peak8 AM to 5 PM
Off-peak12 AM to 8 AM
δ C 0.01
ϕ 0.001
β {0,1}
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Kumari, A.; Kakkar, R.; Gupta, R.; Agrawal, S.; Tanwar, S.; Alqahtani, F.; Tolba, A.; Raboaca, M.S.; Manea, D.L. Blockchain-Driven Real-Time Incentive Approach for Energy Management System. Mathematics 2023, 11, 928. https://doi.org/10.3390/math11040928

AMA Style

Kumari A, Kakkar R, Gupta R, Agrawal S, Tanwar S, Alqahtani F, Tolba A, Raboaca MS, Manea DL. Blockchain-Driven Real-Time Incentive Approach for Energy Management System. Mathematics. 2023; 11(4):928. https://doi.org/10.3390/math11040928

Chicago/Turabian Style

Kumari, Aparna, Riya Kakkar, Rajesh Gupta, Smita Agrawal, Sudeep Tanwar, Fayez Alqahtani, Amr Tolba, Maria Simona Raboaca, and Daniela Lucia Manea. 2023. "Blockchain-Driven Real-Time Incentive Approach for Energy Management System" Mathematics 11, no. 4: 928. https://doi.org/10.3390/math11040928

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop