Next Article in Journal
Effective Digital Predistortion (DPD) on a Broadband Millimeter-Wave GaN Power Amplifier Using LTE 64-QAM Waveforms
Previous Article in Journal
Research on a Novel High-Torque-Density Axial–Radial-Flux Permanent-Magnet Motor with Annular Winding for an Elevator-Traction Machine
Previous Article in Special Issue
A Novel Multi-Attack IDS Framework for Intelligent Connected Terminals Based on Over-the-Air Signature Updates
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Blockchain-Enabled Intelligent Dispatching and Credit-Based Bidding for Microgrids

1
School of Cyber Engineering, Xidian University, Xi’an 710071, China
2
School of Cybersecurity, Northwestern Polytechnical University, Xi’an 710072, China
*
Author to whom correspondence should be addressed.
Electronics 2023, 12(13), 2868; https://doi.org/10.3390/electronics12132868
Submission received: 31 May 2023 / Revised: 26 June 2023 / Accepted: 27 June 2023 / Published: 28 June 2023

Abstract

:
As a new direction of smart grids, the smart microgrid is a self-sufficient energy system that can generate and distribute energy in limited areas. However, existing work faces issues such as data privacy security, single-power supply mode, and unreasonable scheduling, which bring challenges to the application of smart microgrids. In light of this, we formalize a blockchain-based smart microgrid system, preserving the tracking capability of the system and ensuring the privacy of user data. In addition, we propose an intelligent dispatching scheme, in which meteorological factors are considered in power prediction and a prediction results-based intelligent allocation algorithm is designed. Furthermore, we introduce a credit bidding mechanism, which can make companies participate in the dispatching more fairly and proportionately. Numerical results show that our proposed scheme performs well in terms of prediction results and the cost of intelligent dispatching.

1. Introduction

The smart grid can be regarded as a digital two-way power flow electric system, which can create an automated and distributed energy transmission network [1,2,3]. As a new direction of the smart grid, the scale and management style of the microgrid differ from those of the traditional smart grid. The microgrid is a self-sufficient energy system composed of load, centralized control equipment, energy storage equipment, and a variety of distributed power sources (such as photovoltaic, wind power, etc.), which can generate and distribute energy in limited areas and provide highly intelligent services for users [4]. The microgrid can be connected to the public grid to operate in grid-connected mode or be disconnected from the public grid to operate in an island model, which boasts the features of flexibility, reliability, and efficiency [5]. evision. References 5 and 15 are indeed duplicated. Thank you for your revision. However, the diversity and complexity of the energy structure in the microgrid system bring great challenges to the efficient operation of the grid [6]. It is crucial to explore how to properly schedule each component (photovoltaic generator, wind turbine, energy storage equipment, etc.), because this can support achieving the goal of economic or environmental optimization and provide higher-quality services for users.
The microgrid can respond to the demands of numerous users by regulating the load, distributed power sources, energy storage equipment, etc. [7]. The microgrid combines distributed energy and energy storage equipment to make up for the shortcomings of the unstable distribution of energy generation and improve the economic efficiency of new energy resources [8]. Through peak clipping, valley filling, load shifting, strategic load growth, etc., the microgrid can use the prediction results of energy to implement reasonable control strategies and build economic microgrid architectures [9,10]. For example, Munkhammar et al. [11] used the Markov-chain mixture distribution model to predict the very short-term load prediction of residential electricity consumption and forecast one step ahead of half-hour resolution residential electricity consumption data. Aiswariya et al. [12] designed an optimization scheme of battery dispatching using a simulated annealing algorithm, which can reduce the energy consumption of the main grid and users’ energy costs. However, these efforts ignore the security in terms of data collection and the processing process.
The distributed characteristic of a blockchain transforms the smart microgrid from the centralized storage management to distributed multipoint management, which can realize the effective dispatching of power storage and minimize energy loss [13,14,15]. The characteristics of blockchain such as immutability and decentralization effectively ensure the reliability and security of energy trading and data exchange. The microgrid system based on blockchain technology can guarantee the traceability of scheduling information and ensure the privacy of users’ data. Researchers from academia study and attempt to integrate blockchain into a smart microgrid. Zhao et al. [16] proposed a dual-layer microgrid energy architecture based on blockchain, which can provide decentralized and information-transparent systems for trading nodes. Tsao et al. [17] proposed a decentralized microgrid model based on the blockchain and used game theory to analyze the decisions of two players, seeking to maximize their profits. Esmat et al. [18] developed a decentralized peer-to-peer energy trading platform, consisting of a market layer and a blockchain layer.
Although existing efforts consider multiple blockchain-based peer-to-peer energy trading systems, some important problems still have not been solved. For example, in these current solutions, blockchain is only used to implement peer-to-peer transactions and play the role of a distributed data platform. In addition, the energy storage equipment and renewable energy sources (RES) are rarely considered at the same time, which may affect the optimization of the regional power resources and economic benefits. In this paper, we proposed a blockchain-based microgrid model architecture, integrating blockchain with the microgrid to provide secure data collection. Then, we propose an intelligent dispatching scheme to achieve better economic and environmental benefits. We coordinate and schedule the main power grid, renewable energy sources, and energy storage devices. During each round of the power supply, the users are powered by the intelligent dispatching of power energy from renewable energy sources, power storage equipment, and the main grid. When power energy is insufficient, it can be replenished by purchasing from the main power grid or discharging from the power storage equipment. When energy is surplus, it can be sold to the main grid or charged to the energy storage equipment. We further introduce the principle based on credit exchange, motivating the distributed energy resources to fairly participate in voltage regulation. The main contributions of this paper are summarized as follows. We further introduce the principle based on credit exchange, motivating the distributed energy resources to fairly participate in voltage regulation. The main contributions of this paper are summarized as follows.
  • We propose a blockchain-based microgrid architecture using the group signature algorithm as the data signature mechanism. The architecture combines the blockchain with the microgrid to ensure the privacy of user data and preserve the tracking capability of the system.
  • We propose an intelligent dispatching scheme and consider the meteorological factors in power prediction to reduce the prediction error. In addition, we design an intelligent allocation algorithm based on the prediction results to minimize users’ cost while ensuring maximum resource utilization.
  • In order to enable power companies to fairly and reasonably participate in intelligent dispatching, we introduce a credit-based bidding mechanism. When a company is selected for dispatching, the credit value of its bid will be deducted, otherwise the bid will be returned to the unselected company. Hence, the unselected company has high credit, making it more possible to fairly participate in the next round of bidding.
The rest of this paper is organized as follows. We present the system model of the blockchain-enabled smart microgrid framework in Section 2. We formulate an intelligent dispatching problem and a credit bidding problem in Section 3. In Section 4, we evaluate the performance of the proposed. Finally, we conclude this paper in Section 5.

2. System Model

This paper proposes a blockchain-enabled intelligent dispatching scheme for microgrids, including a blockchain-enabled smart microgrid framework, an intelligent dispatching model, and a group signature algorithm.

2.1. Blockchain-Enabled Smart Microgrid Framework

The proposed framework, as shown in Figure 1, is composed of a group of microgrid equipment, a blockchain network, and a management hub. Particularly, the management hub interconnects the microgrid equipment and the blockchain network.

2.1.1. Microgrid

The microgrid is composed of a group of wireless sensor networks (WSNs) formed by a large number of sensor nodes. Specifically, these sensor nodes are randomly deployed near the terminals of wind turbines, PV panel components, energy storage equipment, main grid, and power users. The deployment of sensor nodes is to sense and inspect the status of microgrid terminals, smart meters, and meteorological conditions, including wind speed, and temperature. Then, the monitored data are acquired and transmitted to the management hub using the communication protocol CoAP [19]. The management hubs are responsible for uploading the data to blockchain nodes. Users can obtain power resources from renewable energy, energy storage equipment, and the main grid. Moreover, users can also store these resources in the main grid and energy storage equipment with a surplus.

2.1.2. Management Hub

The management hubs are deemed critical roles connecting WSNs and blockchains. Firstly, management hubs are served as the link between the microgrid and the blockchain. The primary responsibility of management hubs is to convert terminal data in the microgrid from the constrained application protocol (CoAP) coding to the JavaScript Object Notation-Remote Procedure Call (JSON-RPC) messages, ensuring that the terminal data can be identified by nodes in the blockchain. Moreover, management hubs can protect the privacy of microgrid users as well as power companies and detect anomaly detection for microgrids. Thus, the data can be accurately, continuously, and transmitted to blockchain nodes in a timely manner. Finally, management hubs can provide additional verification for the commitments made by microgrid terminals, including data uploading and querying.

2.1.3. Blockchain Network

Blockchain is a decentralized ledger system used to record all transactions of microgrids. In our solution, the blockchain network mainly includes the manager node, agent, and traditional blockchain nodes such as the nodes of the miner and simplified payment verification (SPV).
Manager: The managers set access control permissions and manage the registration and access control of microgrid terminals. In addition, managers can interact with smart contracts to achieve information transmission. When a new Internet of Things (IoT) terminal joins the network, the manager notifies the license and identity of the new terminal to the management hubs. At the same time, the location of the management hub can also be notified to IoT terminals.
Agent: All agents in the blockchain maintain the same database copy. Each block contains a series of smart contract updates, including the node’s power generation status, credit values, history records, and prediction of future power demand. Moreover, to mitigate the potential proliferation of divergent contract states, the blockchain performs an update validation in parallel with block generation to ensure that only the validated updates will be included. The detailed process is as follows:
  • When the smart contract is updated, each agent transmits the data copy and the buffer named “mempool” to the neighbors. Meanwhile, the agent obtains proof of work (POW) and generates new blocks by solving the computational non-deterministic polynomial (NP) challenge. Then, the agent fills its memory pool with existing smart contract updates, and transfers the newly generated blocks to other agents;
  • Upon receiving a block, the agent proceeds to verify the presence of a valid proof-of-work (PoW). If the verification is successful, the agent adds the block to its blockchain and disseminates it to neighboring nodes. In the case of a failed verification, the erroneous validation results are also propagated within the blockchain network;
  • When all agents have completed validation, they save the identical blockchain updates. The agent deletes smart contract updates contained in blocks that were received and validated from its member pool.
Miners and SPV nodes: The miners are responsible for packaging relevant data into a block over some time, including the recorded credit scores, historical records, and electricity data. The SPV node provides agents with queries for the relevant data maintained in the blockchain. For instance, SPV nodes have the ability to check the charging and discharging records of the energy storage equipment.

2.2. Intelligent Dispatching Model

During each round of power supply, users are powered by the intelligent dispatching of power from RES, power storage equipment, and the main grid. When power is insufficient, it can be replenished by purchasing from the main power grid or discharging from power storage equipment. When energy is surplus, it can be sold to the main grid or charged to the energy storage equipment.
The power resources of renewable energy, power storage equipment, and the main power grid should be dispatched reasonably to realize the rational utilization of power resources, meeting the electricity demand of users. Furthermore, the ultimate goal of intelligent dispatching is to maximize the savings in power resources and power costs. Therefore, we consider a fair smart contract-based credit bidding strategy to ensure that each power company (PC) has an equal opportunity to participate in the dispatching. In the meantime, the power generation capacity of each PC is considered to meet the power demands of users.

2.2.1. Smart Contract-Based Credit Bidding

Smart contract is a collection of codes and data residing at a specific address on the Ethereum blockchain. They can define rules, such as regular contracts, and automatically execute rules through code. They are not controlled by users, but they are instead deployed to the network and run as programmed, which can guarantee the fair operation of the contract. Based upon this, we introduced a credit bidding mechanism based on the smart contract, to improve the fairness of companies participating in system dispatching. The specific contract description is as follows:
  • Step 1: Each PC is assigned the same credit score R i ( 0 ) ;
  • Step 2: Each PC determines the bidding price Ψ i ( t ) based on the prediction and allocation scheme of their local operations with the goal of revenue;
  • Step 3: The bidding price is then encrypted and transmitted to other companies. After receiving the decrypted information, the encryption key will be sent to companies, ensuring that all companies have the identical bidding table;
  • Step 4: The PC with the highest bid can be selected based on the bidding results. Meanwhile, the credit value that matches the bid of the selected ones can be deducted. The changes in credit value of the selected ones are recorded in the blockchain. Then, the blockchain nodes sequentially update the status, verify the new block, and accept the new block, so that all nodes ultimately obtain the same updated credit table;
  • Step 5: The companies participate in intelligent dispatching according to bidding results.
Since smart contracts are frequently attacked by using smart contract vulnerabilities, formal verification methods based on mathematical technology are widely used to ensure the correctness of smart contract functions and the security of the running time. The formal verification of smart contracts can minimize the risk of failure and error, thereby avoiding possible costs [14], such as formal verification methods based on formal modeling, theorem proving, and model detection, etc. The formal verification of this paper can refer to the methods in references [15].

2.2.2. Power Generation Capacity

The powerful energy of the smart microgrid mainly comes from RES, power storage equipment, and the main grid. When there is excess energy, it will be sold to the main grid or charge energy storage equipment.
Power generation model of renewable energy: Renewable energy mainly includes PV and wind turbines. The power generation model is shown in Equation (1):
ρ v ( t ) = ϵ v ( t ) · P v ( t ) ρ w ( t ) = ϵ w ( t ) · P w ( t ) ϵ w ( t ) , ϵ v ( t ) { 0 , 1 } ,
where P v ( t ) and P w ( t ) represent the power of wind energy and PV, respectively. ϵ v ( t ) and ϵ w ( t ) are the start–stop factors of PV and wind, in which the number 0 means off and 1 means on.
Power generation model of energy storage equipment: In general, the charging power and discharging power of the energy storage equipment is constant, which is denoted as P b . The state of charge (SOC) is determined by Equation (2) during the period t , which calculates the SOC as the ratio of the residual power to the capacity of the energy storage equipment.
S ( t + 1 ) = S ( t ) + P b ( t ) · t / E b ,
where S ( t ) denotes the SOC value at time t, and E b is the energy storage equipment capacity.
Equations (3)–(5) are constraints of (2). Due to the correlation between the lifecycle of the energy storage equipment and the charging or discharging power of the SOC, the power capacity of the energy storage device cannot exceed the maximum and minimum SOC values to extend the service life of energy storage equipment. In addition, the power resources stored in the energy storage equipment at the beginning of the schedule should be equal to the end of the schedule.
S m i n S ( t ) S m a x
0 | P b ( t ) | 0.2 E b
S ( 0 ) = S ( N ) ,
where S m i n and S m a x are the minimum and maximum values of SOC, respectively. Equation (4) indicates that the maximum charging or discharging power is limited to 20% of its rated capacity at each time interval.
Power exchange model with main grid: Equation (6) expresses the power conservation constraint during the operation of the microgrid system, and Equation (8) describes the power constraint of the interaction with the main grid.
P l ( t ) + P b ( t ) = P w ( t ) + P v ( t ) + P c ( t ) ,
P c , m i n P c ( t ) P c , m a x ,
where P l ( t ) means the load power of users at time t and P w ( t ) denotes the power of the wind turbines, P v ( t ) is the PV power. P b ( t ) represents the charge or discharge power of the energy storage equipment, in which the positive value indicates the energy storage equipment is charging and negative value is discharging. P c , m a x and P c , m i n denote the upper limit and the lower limit of the switching power, respectively. P c ( t ) is the exchange power between the microgrid and the main grid, while the positive value represents that the microgrid is purchasing the power from the main grid and the negative value represents that the power is sold.
Then, the power generation capacity of company i is expressed as:
H i ( t ) = w R E S P R E S ( t ) + w b P b ( t ) + w c P c ( t ) ,
where the range of w R E S , w b , and w c are { 0 , 1 } . Here, P R E S ( t ) = P w ( t ) + P v ( t ) .

2.3. Group Signature-Based Data Security Model

Existing sensor nodes are easily manipulated. It is easy for attackers to obtain the collected privacy data information and falsify the information, which poses a serious security threat to the WSN. To improve the security of private data transmitted from WSN to blockchain, a group signature algorithm based on the ELGamal public key encryption was employed to avoid malicious behavior from malicious attackers.
A group signature scheme generally consists of system establishment, group member joining, signature, verification, and opening. In this article, the group manager is served by the management hub node. The group members refer to terminal devices. The message m to be signed is the private data generated by the terminal device. According to the ELGamal digital signature algorithm, the group manager constructs a group for each region of the microgrid. As shown in Figure 1, each WSN group forms a group. The specific process is as follows.
  • Step 1 (System establishment): System initialization and key generation are carried out during the system establishment stage. The group manager creates groups for each region of the microgrid, while generating the group private keys for group members and group public keys. Specifically, the group manager randomly selects two large prime numbers p , q such that p = 2 q + 1 . g , g 1 , g 2 G F ( p ) are q order generators in the field G F . Randomly select x Z q and calculate y = g x mod p . H : ( 0 , 1 ) l Z P * is a hash function. Then, public parameters are P P = ( g , g 1 , g 2 , p , q , H ) . The group public key is y and the group private key is x.
  • Step 2 (Group member joining): Group member i first randomly selects individual private key x i [ 1 , q 1 ] , and calculates y i = g x i mod p . Then, group members and group managers interact according to the following protocol to obtain their own signature keys.
    -
    Group member i randomly selects l, and calculates h = H ( y i , g l mod p ) , u = l h x i , then securely sends ( y i , h , u ) to the group manager.
    -
    The group manager verifies whether h = H ( y i , g u y i h ) is true, and exits if it is not established. If it is true, the group manager uses the ELGamal signature scheme to sign the message y i . The group manager selects a random number k, calculate X = y i g k mod p and Y = x X + k , then the signature of message y i is ( X , Y ) .
    -
    The group manager sends ( X , Y ) to group member i, calculates Z i = X y X mod p , and saves ( y i , Z i , Y ) in the list of members.
    -
    The group members verify whether the equation y i = X y X g Y mod p holds. If the verification is successful, group member i accepts ( X , Y ) and generates its own signature key ( x i , X , Y ) together with its own private key. Otherwise, repeat the above process or exit the protocol.
  • Step 3 (Signature): Group member i randomly selects the parameters u 1 , u 2 , u 3 , α , β and calculates
    U 1 = X y α y β mod p , U 2 = g β mod p U 3 = g Y g 2 β mod p , d 1 = g 1 u 1 ( g 2 y ) 2 u mod p , d 2 = g u 2 mod p , d 3 = g u 3 ( g 2 ) 2 u mod p , z = H ( U 1 , U 2 , U 3 , d 1 , d 2 , d 3 , m ) , e = α + X , s 1 = u 1 x 1 z , s 2 = u 2 β z , s 3 = u 3 Y z
    Then, the group signature is ( z , e , U 1 , U 2 , U 3 , s 1 , s 2 , s 3 ) .
  • Step 4 (Verification):
    d 1 = g 1 s 1 ( g 2 y ) 2 s ( U 1 y e U 3 ) z mod p , d 2 = g s 2 U 2 z mod p , d 3 = g s 3 ( g 2 ) 2 s U 2 z mod p , z = H ( U 1 , U 2 , U 3 , d 1 , d 2 , d 3 , m ) ,
    The verifier verifies whether the equation z = z is valid. If the verification passes, the signature is accepted; otherwise, the signature is invalid.
  • Step 5 (Open): The group manager calculates the equation Z i = U 1 y e U 2 x , and compares it in its saved list of members to find the same triplet ( y i , Z i , Y ) . Then, the group manager further verifies with the equation y i = Z i g Y . If the verification is successful, the identity of the member is y i . Otherwise, repeat the process until the verification is passed.

3. Problem Formulation and Implementation

In this section, we introduce blockchain-based power prediction, the selection of power companies involved in intelligent dispatching, and the intelligent dispatching of power sources. Power prediction is the premise of intelligent dispatching and participant selection. Power prediction is used to predict future electricity demand, serving for intelligent dispatching and participant selection. The purpose of participant selection is to achieve the fair participation of power companies while meeting the power demand of users. Intelligent dispatching is used to minimize user costs while ensuring maximum resource utilization, which is shown in Figure 2.

3.1. Blockchain-Assisted Power Prediction

The power prediction mainly relies on the data collected from WSN, which serves for intelligent dispatching. According to the predicted results, the power resources can be intelligent deployed to prevent power resources being wasted.

3.1.1. Data Collection

Sensors deployed in the detection area of microgrid equipment are responsible for data collection, and then transmit the collected data to the management hub. The management hub formats the data into blockchain-identifiable data via a specific processing method. The miners on the blockchain store data on the blockchain in the form of blocks by mining it. To ensure the security of data transmission, the encryption algorithm based on the public key and group signature algorithm is used.
Assuming that the collected power data in time t for terminal i is denoted as m i , to ensure the security of data m i , it will first be signed to obtain the signature using the group signature algorithm introduced in Section 2.3. Then, the signature information will be sent to management hub nodes for verification. If the verification is successful, it indicates that the data are secure and trustworthy. Then, the data will be stored on the blockchain for future power prediction.

3.1.2. Power Prediction

Based on the collected power data, a prediction model for predicting the future power demands is constructed, which is expressed as
Φ ^ ( t ) = F θ ( Φ ( t 1 ) , Φ ( t 2 ) , , Φ ( t N ) ,
where Φ ( t i ) is the actual data at time t i captured by WSN. Φ ^ ( t ) expresses the forecast data at time t. F θ means the prediction function parameterized by θ , assessed by the historical data, wind power, and PV, which is obtained from the blockchain.
Due to the unavoidable meteorological factors, such as temperature, wind intensity, and light intensity, we formalize the prediction model as
Φ ^ ( t ) = F θ ( Φ ( t 1 ) , , Φ ( t N ) , Θ ( t 1 ) , , Θ ( t L ) ) ,
where Θ ( t L ) is the genuine meteorological condition.
To accurately predict short-term power, we adopt an improved radial basis function neural network model with error feedback scheme mentioned in [20].

3.2. Participant Selection Based on Credit Bidding

In order to make each power company participate in power regulation fairly and ensure the normal operation of power supply, we put forward a participant selection algorithm based on reputation bidding. According to the bidding results, the highest bidder will be selected as the participant in the power regulation. In order to make other unselected power companies have a chance to participate fairly in the future power regulation, we deduct the selected one’s credibility value of the bid to reduce its chance of being selected later, so as to achieve the purpose of fair bidding.
We consider bidding during the T period and assume that there are M power companies participating in the bidding process. Before bidding, each power company receives an initial credit score. The ith company’s initial credit at time 0 is R i ( 0 ) . Based on the prediction results Φ ^ ( t ) , each power company calculates the proportion of the profits available during the t + 1 period to the total profits, that is also the credit values must be paid in the bidding at time t. The credit values Ψ i ( t ) of the i-th power company can be expressed as:
Ψ i ( t ) = R i ( t ) · r ( t + 1 ) · P ˜ ( t + 1 ) j = t + 1 T r ( j ) · P ˜ ( j ) ,
where r ( t + 1 ) is the unit-price, and P ˜ is the prediction result of power at time t + 1 .
Then, random bidding is conducted based on the credit score of each company. The probability Ω i ( t ) of the power company being selected is proportional to the credit score of the company bid, expressed as
Ω i ( t ) = Ψ i ( t ) i = 1 M Ψ i ( t ) ,
where Ω i ( t ) is the probability of the company i being selected at time t. The company with the highest probability Ω i ( t ) will be selected as the power supplier for this round. The credit values paid by the company will be deducted, and the credit of companies that failed the bidding will be returned. Assume that the i-th company wins this round of bidding, the credit value R i ( t + 1 ) of company i in t + 1 is formulated as:
R i ( t + 1 ) = R i ( t ) Ψ i ( t )
The bidding of the selected node will be deducted from the credit value, and the change in node credit will be recorded in the blockchain. The credit value of the unselected node will remain unchanged.
Compared to the method of randomly selecting a power company from M companies with equal probability, our method deducts the credit score of successful bidding power companies, which can prevent companies obtaining high profits through frequent bidding in high-profit situations, and increase the probability of each company being selected, thereby improving fairness. In addition, the proposed scheme can improve efficiency, save users’ costs, and promote the use of renewable energy.

3.3. SA-AFSA-Based Intelligent Dispatching

According to the power prediction and credit bidding results, power companies with high bids and abundant power can be eligible to participate in intelligent dispatching. The selected power company intelligently allocates power equipment to generate a set of decision sequences o ( t ) to minimize future power costs for users. The power cost mainly includes the RES cost, energy storage equipment cost, energy exchange cost, while the RES cost is given by
C R E S = t = 1 N [ r w · P w ( t ) + r v · P v ( t ) ] · Δ t ,
where r w denotes the unit prices of wind energy generation. r v is the unit price of PV. The cost of energy storage is as follows
C s t o r = r b t = 1 N | P b ( t ) | · Δ t ,
where r b represents the energy storage cost’s unit price.
C e c = t = 1 N C e c ( t ) ,
where C e c ( t ) denotes the cost of power exchange that satisfies the following conditions:
C e c ( t ) = t = 1 N r p , e c ( t ) · | P c ( t ) | · Δ t , P c ( t ) 0 t = 1 N r s , e c ( t ) · | P c ( t ) | · Δ t , P c ( t ) < 0 ,
where r p , e c ( t ) and r s , e c ( t ) are the prices purchased and sold from the main grid, respectively. Then, the total cost can be calculated by the following equation
C = ω 1 C R E S + ω 2 C s t o r + ω 3 C e c ,
where the ω i { 0 , 1 } , i { 1 , 2 , 3 } . ω i = 1 means that the power supply resource is used in intelligent dispatching, and ω i = 0 indicates that the power supply resource is not used.
To meet the power demands of users, the supply of power should be greater than or equal to the predicted power, which can be formalized as:
ζ = H i ( t ) · Δ t Φ ^ ( t ) 0
Moreover, in order to ensure the rational use of power and achieve the target of energy conservation, we also need to minimize ζ . Thus, the microgrid intelligent dispatching problem in this article is formalized as a decision optimization problem with multiple stages, as can be seen in Equation (22)
P 1 : a r g m i n o ( t ) Γ = C + ζ + γ · | S ( N ) S ( 0 ) | ,
0 < γ < 1 , ζ 0 , S ( N ) , S ( 0 ) 0 ,
which aims to minimize the cost Γ of power for users while improving the utilization of power resources. Here, γ · | S ( N ) S ( 0 ) | represents the penalty factor, and | S ( N ) S ( 0 ) | is the difference between the initial state and the final state of the SOC. The conditions (23) are the basic constraints on the objective function (22) to ensure the normal operation of the microgrid system.
Note that the problem P 1 is an NP-hard problem that is difficult to directly solve in a polynomial time. We adopt an improved artificial fish swarm algorithm based on simulated annealing. The artificial fish swarm algorithm sets the position of the fish swarm near the extreme point, which can prevent the algorithm from falling into the local optimal solution and can be applied in the energy optimization of the microgrid. Nevertheless, due to the slow convergence rate and large solution errors of this algorithm, the utility of the algorithm in practical applications is reduced. To this end, we introduce the metropolis discriminant criterion of simulated annealing into foraging behavior to improve the solution accuracy and convergence speed.
According to the objective function of intelligent dispatching optimization, the parameters to be optimized are the power contribution of each distributed power source including the RES, power storage equipment, and the main grid. The optimization variable is the spatial position of the fish swarm. The value of the objective function corresponding to the spatial position directly reflects the quality of the position. Fish can constantly update their position through foraging, clustering, rear-end pursuit, and random behavior until they find the best position, which is the optimal solution of the objective function. The detailed algorithm description is shown in Figure 3.
  • Step 1 We first initialize the field of view and step size, the degree of crowding, and the maximum number of iterations I m a x . The size of the artificial fish school is set to n. We select the initial position of each artificial fish (AF), which represents the initial value of the objective function Γ . We then calculate the food concentrations at the initial locations in each group and recorded the highest food concentration and the corresponding AF position on the bulletin board. The value of the objective function is inversely proportional to the food concentration. Hence, minimizing the objective function enables finding the place where the food concentration is the highest.
  • Step 2 In the current iteration round i, each AF performs swarming, following, preying, and random behaviors. In particular, we introduce the metropolis criterion of the simulated annealing algorithm to perform preying behaviors, so that the AF accepts the state and updates the position with a probability of μ = e τ , where τ = i / I m a x .
  • Step 3 We calculate the food concentration of each AF at its current location and compared it with the bulletin board. If the food concentration is higher than the bulletin board, update the bulletin board.
  • Step 4 We repeat steps 2 and 3 until the algorithm reaches its maximum number of iterations. At this time, the value on the billboard is the optimal solution, that is, the minimum value of the objective function.

4. Experimental Results

This section evaluates the performance of the proposed. We obtained the hourly power load configuration dataset for different service types of the National Grid of the United Kingdom from the website https://www.nationalgridus.com/Upstate-NY-Business/Supply-Costs/Load-Profiles (accessed on 1 January 2022) as our source of demand load data. We seclet “SC-2 Demand” under the “Service Classification for 2022” directory as the experimental data. This dataset provides 24-h load data. All experiments were performed in a Python3.7 environment running on a PC with dual 2.90-GHz CPUs, 8.00 GB RAM, and Windows 10 OS. The distributed power parameters, energy storage equipment-related information, and the main grid times of use and electricity prices in the microgrid are shown in Table 1 and Table 2. Specifically, Table 1 shows the specific division of the peak to valley periods of the main grid and the price elasticity matrix of demand during different time periods. We gave the distributed energy parameters in the microgrid, including the upper and lower limits of each energy output and the unit price. The detailed parameters are shown in Table 2.

4.1. Performance Evaluation of Power Prediction

We adopt the prediction method proposed in reference [20], and consider the meteorological conditions, such as temperature, wind intensity, and light intensity to predict the future power demands. According to the historical data over the past 30 days (96 sampling points per day), we give the prediction results, which are shown Figure 4, Figure 5 and Figure 6.
Figure 4, Figure 5 and Figure 6 compare the prediction results of the load power, wind power generation, and photovoltaic power generation obtained by prediction algorithms before and after considering meteorological factors. In the three figures, the red curve represents the actual power load, and the green and the blue curve correspond to the predicted load. The blue curve specifically represents the predicted load after considering meteorological factors. The absolute difference between the predicted value and the actual value is adopted as a measure of prediction error. From the comparison of prediction errors in Figure 4, it can be observed that, between 0:00 and 2:30, there is minimal difference in the prediction curve before and after considering meteorological factors. However, between 2:30 and 24:00, the inclusion of meteorological factors significantly reduces the prediction error. Similarly, the wind power prediction results shown in Figure 5 also highlight the clear advantage of the proposed prediction scheme, as it effectively reduces the difference between the predicted power and the actual power throughout the day. In Figure 6, the prediction error of PV power significantly decreases from 9:00 to 13:00. This reduction in prediction error leads to the improved power generation efficiency and cost savings.

4.2. Performance Evaluation of Intelligent Dispatching

Figure 7 shows the convergence of the proposed SA-AFSA algorithm. The initial AF number is set to 20. We randomly selected three AFs and displayed their dynamic iteration results. Due to the differences in the initial position and updating behavior of each AF, the convergence rate is different. However, all AFs in the proposed algorithm will eventually converge to the optimal position. As shown in Figure 7, the three AFs already reached their optimal state at approximately 55, 150, and 20 iterations, respectively. After 160 iterations, the optimal value on the bulletin board is no longer updated, indicating that the algorithm has converged. This implies that the power of each distributed energy obtained at this point can minimize the objective function.
Figure 8 indicates the dispatching results for the wind and photovoltaic power generation. From Figure 8, we can see that the dispatching time of a wind turbine is higher than that of a photovoltaic cell.This is because the intelligent dispatching system preferentially selects the wind turbine with a lower power generation unit cost. According to the time-of-use electricity price in Table 1, during peak periods, the purchase price from the main grid is USD 0.0463, which is considerably lower than the cost of generating renewable energy. To reduce the electricity cost for users, the system automatically suspends the dispatching of wind turbines and photovoltaic generation. However, during plateau and peak periods, the cost of wind turbine power generation is USD 0.079, which is lower than the purchase price from the main grid, resulting in the activation of the dispatching switch. Especially at 12:00 to 17:00 during the peak period, the dispatching system turns on the wind power generation and photovoltaic power generation at the same time. The RES energy is more frequently dispatched to relieve the power transmission load of the main grid, which not only satisfies the power demand of users but also minimizes the cost. The photovoltaic is temporarily paused from 15:00 to 16:00. This is because the energy storage equipment with the lowest power generation cost participates in intelligent dispatching and provides a large amount of power.
Figure 9 shows the dispatching of the energy storage equipment in the microgrid. The initial SOC value is set to 0.4. It can be seen that, when the purchase price of the main power grid is low, the energy storage equipment is charged. When the electricity price is high and SOC is within the limit, the energy storage equipment discharges, reducing the users’ cost. The energy storage equipment releases a small amount of power from 20:00 to 21:00. The reason is that the energy storage equipment is charged for a short time after the peak schedule ends and prefers to participate in power generation due to its lowest cost. Within a dispatching cycle, the initial state of the energy storage equipment is almost the same as the final state (i.e., SOC value), ensuring that the life of the energy storage equipment does not decrease rapidly due to the dispatching.
Figure 10 compares the generation costs of renewable energy, the main grid, and storage equipment over different periods. It can be seen that, when the power demand is in the valley period, the system preferentially selects the main grid with a low purchase price and cost for power supply. In addition, the system has a large increase in the dispatching of RES from 8:00, especially between 9:00 and 17:00, as well as a large number of energy storage equipment with sufficient power generation, resulting in more obvious storage costs. This is because this strategy can address the significant increase in the cost of electricity for consumers. As can be seen, the system chooses to sell part of the power to the main grid from 12:00 to 15:00. Because the price of the main grid is high at this time. The choice of the system can effectively relieve the cost pressure of the power supply.

5. Conclusions

In this paper, we propose a blockchain-based microgrid architecture, using the group signature algorithm as the data signature mechanism. The architecture combines the blockchain with the microgrid to ensure the privacy of user data and preserve the tracking capability of the system. In addition, we propose an intelligent dispatching scheme in which meteorological factors are considered in power prediction, then an intelligent allocation algorithm is designed based on the prediction results. Compared with traditional power systems, our proposed scheme reduces the cost of the system. In order to enable power companies to participate in intelligent dispatching fairly and reasonably, we introduce a credit-based bidding mechanism. When a company is selected for dispatching, the credit value of its bid will be deducted, otherwise, the bid will be returned to the unselected company. Hence, the unselected company has high credit, making it more possible to fairly participate in the next round of bidding. The numerical results show that our proposed scheme performs well in terms of prediction results and the cost of intelligent dispatching. In the future, we plan to delve deeper into the integration of blockchain with the smart microgrid. Additionally, we will consider the collaboration among multiple microgrids to perform energy scheduling more efficiently and provide users with high-quality services.

Author Contributions

Conceptualization, Y.Z. and H.Z.; methodology, Y.Z. and H.Z.; software, Y.Z. and B.W.; validation, W.S.; formal analysis, Y.Z. and Y.C.; investigation, Y.Z. and L.W.; data curation, Y.Z. and B.W.; writing—original draft preparation, Y.Z.; writing—review and editing, L.W., Y.C. and W.S.; supervision, W.S.; project administration, H.Z.; funding acquisition, H.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Defense Industrial Technology Development Program under Grant JCKY2021110B143, Grant JCKY2020204B027, and Grant JCKY2021608B001.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Fang, X.; Misra, S.; Xue, G.; Yang, D. Smart Grid—The New and Improved Power Grid: A Survey. IEEE Commun. Surv. Tutor. 2012, 14, 944–980. [Google Scholar] [CrossRef]
  2. Dileep, G. A survey on smart grid technologies and applications. Renew. Energy 2020, 146, 2589–2625. [Google Scholar] [CrossRef]
  3. Baidya, S.; Potdar, V.; Ray, R.R.; Nandi, C. Reviewing the opportunities, challenges, and future directions for the digitalization of energy. Energy Res. Soc. Sci. 2021, 81, 102243. [Google Scholar] [CrossRef]
  4. Hartono, B.S.; Budiyanto, Y.; Setiabudy, R. Review of microgrid technology. In Proceedings of the 2013 International Conference on QiR, Yogyakarta, Indonesia, 25 June 2013. [Google Scholar]
  5. Topa Gavilema, Á.O.; Álvarez, J.D.; Torres Moreno, J.L.; García, M.P. Towards Optimal Management in Microgrids: An Overview. Energies 2021, 14, 5202. [Google Scholar] [CrossRef]
  6. Yoldas, Y.; Onen, A.; Moreno, S.M.; Vasilakos, A.V.; Alan, I. Enhancing smart grid with microgrids: Challenges and opportunities. Renew. Sustain. Energy Rev. 2017, 72, 205–214. [Google Scholar] [CrossRef]
  7. Zhou, X.; Guo, T.; Ma, Y. An overview on microgrid technology. In Proceedings of the 2015 IEEE International Conference on Mechatronics and Automation (ICMA), Beijing, China, 2–5 August 2015; pp. 76–81. [Google Scholar]
  8. Park, H.; Guo, T.; Jeong, J.; Jung, D.; Kwak, C. GRU-based Power Consumption Prediction for Energy Management in Smart Building. In Proceedings of the 2022 International Conference on Electrical, Computer, Communications and Mechatronics Engineering (ICECCME), Malé, Maldives, 16 November 2022. [Google Scholar]
  9. Khan, A.R.; Mahmood, A.; Safdar, A.; Khan, Z.A.; Khan, N.A. Load forecasting, dynamic pricing and DSM in smart grid: A review. Renew. Sustain. Energy Rev. 2016, 54, 1311–1322. [Google Scholar] [CrossRef]
  10. Abdi, H. A Brief Review of Microgrid Surveys, by Focusing on Energy Management System. Sustainability 2022, 15, 284. [Google Scholar] [CrossRef]
  11. Munkhammar, J.; Meer, D.; Widén, J. Very short term load forecasting of residential electricity consumption using the Markov-chain mixture distribution (MCM) model. Appl. Energy 2021, 282, 116180. [Google Scholar] [CrossRef]
  12. Aiswariya, L.; Imthias Ahamed, T.P.; Mohammed, S.S. Optimal Microgrid Battery Scheduling Using Simulated Annealing. In Proceedings of the 2020 International Conference on Power Electronics and Renewable Energy Applications (PEREA), Kannur, India, 27 November 2020. [Google Scholar]
  13. Guo, Y.; Wan, Z.; Cheng, X. When Blockchain Meets Smart Grids: A Comprehensive Survey. High-Confid. Comput. 2022, 2, 100059. [Google Scholar] [CrossRef]
  14. Krichen, M.; Lahami, M.; Al-Haija, Q.A. Formal Methods for the Verification of Smart Contracts: A Review. In Proceedings of the 2022 15th International Conference on Security of Information and Networks (SIN), Sousse, Tunisia, 11–13 November 2022; pp. 1–8. [Google Scholar] [CrossRef]
  15. Abdellatif, T.; Brousmiche, K. Formal Verification of Smart Contracts Based on Users and Blockchain Behaviors Models. In Proceedings of the 2018 9th IFIP International Conference on New Technologies, Mobility and Security (NTMS), Paris, France, 26–28 February 2018; pp. 1–5. [Google Scholar] [CrossRef] [Green Version]
  16. Zhao, Z.; Guo, J.; Luo, X.; Xue, J.; Lai, C.S.; Xu, Z.; Lai, L.L. Energy Transaction for Multi-Microgrids and Internal Microgrid Based on Blockchain. IEEE Access 2020, 8, 144362–144372. [Google Scholar] [CrossRef]
  17. Tsao, Y.; Vu, T. A decentralized microgrid considering blockchain adoption and credit risk. J. Oper. Res. Soc. 2021, 73, 2116–2128. [Google Scholar] [CrossRef]
  18. Esmat, A.; de Vos, M.; Ghiassi-Farrokhfal, Y.; Palensky, P.; Epema, D. A novel decentralized platform for peer-to-peer energy trading market with blockchain technology. Appl. Energy 2021, 282, 116123. [Google Scholar] [CrossRef]
  19. Shelby, Z.; Hartke, K.; Bormann, C. The Constrained Application Protocol (CoAP); RFC795; Internet Engineering Task Force (IETF): Fremont, CA, USA, 2014. [Google Scholar]
  20. Chang, G.W.; Lu, H.J.; Chang, Y.R.; Lee, Y.D. An improved neural network-based approach for short-term wind speed and power forecast. Renew. Energy 2017, 105, 301–311. [Google Scholar] [CrossRef]
Figure 1. The framework of blockchain-enabled smart microgrid.
Figure 1. The framework of blockchain-enabled smart microgrid.
Electronics 12 02868 g001
Figure 2. The process of credit-Based Bidding.
Figure 2. The process of credit-Based Bidding.
Electronics 12 02868 g002
Figure 3. The intelligent dispatching of the microgrid.
Figure 3. The intelligent dispatching of the microgrid.
Electronics 12 02868 g003
Figure 4. Load power prediction results.
Figure 4. Load power prediction results.
Electronics 12 02868 g004
Figure 5. Wind power prediction results.
Figure 5. Wind power prediction results.
Electronics 12 02868 g005
Figure 6. PV power prediction results.
Figure 6. PV power prediction results.
Electronics 12 02868 g006
Figure 7. The convergence speed of the proposed SA-AFSA.
Figure 7. The convergence speed of the proposed SA-AFSA.
Electronics 12 02868 g007
Figure 8. RES intelligent dispatching strategy.
Figure 8. RES intelligent dispatching strategy.
Electronics 12 02868 g008
Figure 9. Energy storage equipment intelligent dispatching strategy.
Figure 9. Energy storage equipment intelligent dispatching strategy.
Electronics 12 02868 g009
Figure 10. The generation cost of intelligent dispatching.
Figure 10. The generation cost of intelligent dispatching.
Electronics 12 02868 g010
Table 1. Period of Load Cycle.
Table 1. Period of Load Cycle.
Time TypesTime IntervalPurchase Price ( USD / kWh ) Sell Price ( USD / kWh )
Valley0:00−8:000.04630.0368
Flat8:00−12:00, 18:00−24:000.08010.0657
Peak12:00−18:000.11540.0968
Table 2. Distributed Energy Parameters.
Table 2. Distributed Energy Parameters.
-Wind EnergyPV EnergyEnergy Storage EquipmentMain Grid
Power Restrictions[0, 80] kW[0, 60] kW[−100, 100] kW[−120, 120] kW
Unit PriceUSD 0.079USD 0.106USD 0.018See Table 1
Remarks--Initial value of SOC is 0.4. Range of SOC [0.2, 0.95].-
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

Zeng, Y.; Wei, L.; Cheng, Y.; Zhang, H.; Sun, W.; Wang, B. Blockchain-Enabled Intelligent Dispatching and Credit-Based Bidding for Microgrids. Electronics 2023, 12, 2868. https://doi.org/10.3390/electronics12132868

AMA Style

Zeng Y, Wei L, Cheng Y, Zhang H, Sun W, Wang B. Blockchain-Enabled Intelligent Dispatching and Credit-Based Bidding for Microgrids. Electronics. 2023; 12(13):2868. https://doi.org/10.3390/electronics12132868

Chicago/Turabian Style

Zeng, Yingming, Lan Wei, Yage Cheng, Haibin Zhang, Wen Sun, and Bing Wang. 2023. "Blockchain-Enabled Intelligent Dispatching and Credit-Based Bidding for Microgrids" Electronics 12, no. 13: 2868. https://doi.org/10.3390/electronics12132868

APA Style

Zeng, Y., Wei, L., Cheng, Y., Zhang, H., Sun, W., & Wang, B. (2023). Blockchain-Enabled Intelligent Dispatching and Credit-Based Bidding for Microgrids. Electronics, 12(13), 2868. https://doi.org/10.3390/electronics12132868

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