# Research on Multimicrogrid Transaction Model and Cross-Chain Transaction Mechanism Based on Blockchain

Authors: Wei Hu; Xue Xia; Yi Zhang
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

The traditional microgrid electricity transactions face a low security, poor economic benefits, and weak stability. To solve these problems, this paper proposes a multimicrogrid cross-chain transaction model based on quantum blockchain. Specifically, a bidding strategy was developed for the noncooperative dynamic game of aggregator-multimicrogrid alliance, aiming to balance and optimize the benefits of all parties and effectively enhance the consumption rate of electric energy. To improve the transaction efficiency between aggregators, a consensus mechanism was designed for multimicrogrid cross-chain communication, realizing consistent self-adaptation to cross-chain information. In addition, the quantum threshold signature technology was adopted to ensure the reliability of transaction data and create an unconditional secure communication environment. Case analysis shows that our model proposed in this paper not only ensures the security and stability of transactions but also enhances the economic benefits, providing theoretical support and decision support for the optimization of multimicronetwork cross-chain transaction model.


---

## Body

## 1. Introduction

The continuous development of energy information technology brings more and more challenges to data communication and isolated value island in multiple energy transaction market. The emerging technology of quantum blockchain injects new vitality to the multiple energy transaction market and significantly vitalizes the peer-to-peer cross-chain transactions between multiple microgrids [1]. Based on quantum blockchain, the multimicrogrid cross-chain transactions can overcome the problems of traditional electricity transactions within microgrids, such as poor stability, low efficiency, and incredible data. Therefore, it is of great significance to deeply integrate multimicrogrid cross-chain communication with quantum blockchain technology.So far, domestic and foreign scholars have coupled microgrid electricity transactions with key blockchain techniques from various aspects. Zhang et al. [2] designed an electricity transaction settlement model based on smart contract and verified the feasibility and effectiveness of the proposed model. Chang et al. [3] established a hybrid game model, which includes the Stackelberg game between grid sources and the cooperative game between wind power and thermal power and designed an income distribution method based on both economic and environmental factors. After analyzing the demand of each node in microgrids, Ma et al. [4] improved the ant colony algorithm to build a blockchain-based competitive game model for multiple grids. She et al. [5] presented a secure transaction model based on heterogenous energy blockchain, aiming to realize the complementation between multiple energies in the electricity transaction system. The above studies have applied blockchain technology in electricity transactions. However, the existing models fail to offer a secure and efficient method for multimicrogrid cross-chain transactions.For multimicrogrid joint operation, the cross-chain technology of quantum blockchain can break through the trust barriers of each microgrid and realize energy transactions between multiple systems without sacrificing privacy. Quantum communication is a new communication pattern that transmits information, using the superposition of states, quantum entanglement, and quantum teleportation [6]. Quantum blockchain is developing rapidly, and the relevant theories are increasingly perfect, providing reference and research direction for optimizing the electricity transactions of multimicrogrids.Considering the above factors, this paper proposes a multimicrogrid cross-chain transaction model based on quantum blockchain. Firstly, a bidding mechanism was developed for the noncooperative dynamic game between aggregators and microgrids + grid and between aggregators, and the optimal selling model was derived for the multimicrogrids to obtain the unique Nash equilibrium solution, thereby maximizing the consumption of distributed energy. After that, a consensus mechanism was designed for multimicrogrid cross-chain communication. The mechanism disperses the values across blockchain nodes in the private chain and effectively optimizes the efficiency of multimicrogrid cross-chain transactions. Finally, a quantum threshold signature scheme was formed under the quantum key distribution protocol. The scheme manages to regulate the transaction behaviors between multiple microgrids and improve the security of the transaction data.


## 2. Quantum Blockchain

Blockchain is a new application mode of computer technology, such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm [7]. Blockchain is different from general distributed storage. Each node in the blockchain stores a copy of the blockchain database [8]. Blockchain is formed by linking blocks with hash values. The defining features of blockchain are decentralization, openness, and tamper-proof information [9]. The blockchain system consists of multiple data blocks, each of which is generated chronologically after the previous block. Figure 1 shows the structure of the blockchain.Figure 1
Blockchain structure.Quantum computing uses the laws of quantum mechanics to process information and perform calculation. The basic principle of quantum mechanics is quantum superposition [10]. The superposition of states α|0+β|1 is the most general state of physical systems [11]. The coefficients α and β are complex numbers about the number of configurations. The configuration probabilities can be described as g0=α2 and g1=β2, with g0+g1=1. Similar to those in the classic blockchain, the nodes in the quantum blockchain network each stores a copy of the blockchain, aiming to increase effective blocks in a decentralized manner.


## 3. Cross-Chain Communication

### 3.1. Multimicrogrid Joint Operation Architecture

Microgrid is a small power distribution system composed of distributed power sources, storage devices, electrical loads, and monitoring and protection devices [12]. With the large-scale construction of microgrids, multiple adjacent microgrids in a certain area can form a multimicrogrid joint operation system through the connected transmission and distribution network.Figure2 presents two independent microgrids i and j. The transmission and distribution network in the area serves as the physical channel for electricity interaction. Each of the two microgrids has established a blockchain-based internal peer-to-peer electricity transaction network, i.e., blockchain x and blockchain y. When the electricity supply and demand are out of balance, each microgrid purchases electricity at a high price from or sells electricity at a low price to the external distribution network. But this strategy is not conducive to the economic operation of each microgrid, because energy may get lost during the long-distance transmission in the distribution network [13]. To solve the problem, this paper designs a dynamic adaptive cross-chain network, which enables each party in blockchains x and y to handle cross-system transactions independently. The dynamic adaptive network was established on quantum blockchain, such that the cross-chain transactions inherit the advantages of distributed data storage and mutual trust.Figure 2
Multimicrogrid joint operation architecture.


### 3.2. Multimicrogrid Cross-Chain Communication

In each blockchain network, a verification node subset (VNS) is chosen based on credibility and used to verify the effectiveness of cross-chain communication information, namely,Vx and Vy. By threshold signature, the VNS extends the internal consensus within each blockchain to interchain consensus. The nodes of VNS are independent of each other. The cross-chain consensus of multimicrogrid joint operation can be described by Vk∈Vx∪Vy. Figure 3 shows the cross-chain communication process of blockchains x and y.Figure 3
Cross-chain communication process.Blockchain nodexi of microgrid i first makes a request for cross-chain transaction. Then, blockchain node yj of microgrid j receives the request and signs the transaction agreement. This process can be divided into six phases:(1)
xi prepares a graphical identification certificate and a data transmission key xis and describes the cross-chain transaction demand mxi. The details and deadline of the electricity transaction are written in a smart contract ETxiresquest, which is deployed.(2)
Vx verifies the transaction demand by testing the consistency of cross-chain consensus. If the transaction demand is verified, the key will be updated, and a new smart contract will be constructed. Then, the cross-chain transaction will be sent to Vy. Otherwise, the transaction demand will be neglected.(3)
Vy verifies the transaction demand. If the transaction demand is verified, the key will be updated, and a new smart contract will be constructed. Then, the smart contract information will be broadcasted to all the nodes in blockchain y. Otherwise, the transaction demand will be neglected.(4)
Nodeyj in blockchain y concludes a transaction with xi according to the transaction demand. If formulas (1)–(3) hold, yj will update the key and write the blind response to mxi. Then, the corresponding transaction demand will be redeployed into yj. Otherwise, the transaction demand will be neglected.(1)tcurrent≤tcontractdeadline−Δt.(2)Requestmxi∈Vy.(3)Traceabilitymxi,Key,sig==1,wheretcurrent is the current date; tcontractdeadline is the deadline of the contract; Δt is the upper limit of the time for deploying or executing the smart contract; Traceabilitymxi,Key,sig is the proof of the traceability and credibility of the information sensor; Key and sig are the key and the corresponding digital signature from xi to yj.(5)
xi verifies the smart contract from yj. If the smart contract is verified, xi will write the hash function of the electricity transaction into the smart contract and extract the response mxi. During the execution of the smart contract, xi returns the key of the electricity transaction to yj. The other cross-chain transactions are executed in a similar manner.(6)
After executing the electricity transaction contract,xi and yj will separately broadcast the cross-chain certificate to the multimicrogrid system.


## 3.1. Multimicrogrid Joint Operation Architecture

Microgrid is a small power distribution system composed of distributed power sources, storage devices, electrical loads, and monitoring and protection devices [12]. With the large-scale construction of microgrids, multiple adjacent microgrids in a certain area can form a multimicrogrid joint operation system through the connected transmission and distribution network.Figure2 presents two independent microgrids i and j. The transmission and distribution network in the area serves as the physical channel for electricity interaction. Each of the two microgrids has established a blockchain-based internal peer-to-peer electricity transaction network, i.e., blockchain x and blockchain y. When the electricity supply and demand are out of balance, each microgrid purchases electricity at a high price from or sells electricity at a low price to the external distribution network. But this strategy is not conducive to the economic operation of each microgrid, because energy may get lost during the long-distance transmission in the distribution network [13]. To solve the problem, this paper designs a dynamic adaptive cross-chain network, which enables each party in blockchains x and y to handle cross-system transactions independently. The dynamic adaptive network was established on quantum blockchain, such that the cross-chain transactions inherit the advantages of distributed data storage and mutual trust.Figure 2
Multimicrogrid joint operation architecture.


## 3.2. Multimicrogrid Cross-Chain Communication

In each blockchain network, a verification node subset (VNS) is chosen based on credibility and used to verify the effectiveness of cross-chain communication information, namely,Vx and Vy. By threshold signature, the VNS extends the internal consensus within each blockchain to interchain consensus. The nodes of VNS are independent of each other. The cross-chain consensus of multimicrogrid joint operation can be described by Vk∈Vx∪Vy. Figure 3 shows the cross-chain communication process of blockchains x and y.Figure 3
Cross-chain communication process.Blockchain nodexi of microgrid i first makes a request for cross-chain transaction. Then, blockchain node yj of microgrid j receives the request and signs the transaction agreement. This process can be divided into six phases:(1)
xi prepares a graphical identification certificate and a data transmission key xis and describes the cross-chain transaction demand mxi. The details and deadline of the electricity transaction are written in a smart contract ETxiresquest, which is deployed.(2)
Vx verifies the transaction demand by testing the consistency of cross-chain consensus. If the transaction demand is verified, the key will be updated, and a new smart contract will be constructed. Then, the cross-chain transaction will be sent to Vy. Otherwise, the transaction demand will be neglected.(3)
Vy verifies the transaction demand. If the transaction demand is verified, the key will be updated, and a new smart contract will be constructed. Then, the smart contract information will be broadcasted to all the nodes in blockchain y. Otherwise, the transaction demand will be neglected.(4)
Nodeyj in blockchain y concludes a transaction with xi according to the transaction demand. If formulas (1)–(3) hold, yj will update the key and write the blind response to mxi. Then, the corresponding transaction demand will be redeployed into yj. Otherwise, the transaction demand will be neglected.(1)tcurrent≤tcontractdeadline−Δt.(2)Requestmxi∈Vy.(3)Traceabilitymxi,Key,sig==1,wheretcurrent is the current date; tcontractdeadline is the deadline of the contract; Δt is the upper limit of the time for deploying or executing the smart contract; Traceabilitymxi,Key,sig is the proof of the traceability and credibility of the information sensor; Key and sig are the key and the corresponding digital signature from xi to yj.(5)
xi verifies the smart contract from yj. If the smart contract is verified, xi will write the hash function of the electricity transaction into the smart contract and extract the response mxi. During the execution of the smart contract, xi returns the key of the electricity transaction to yj. The other cross-chain transactions are executed in a similar manner.(6)
After executing the electricity transaction contract,xi and yj will separately broadcast the cross-chain certificate to the multimicrogrid system.


## 4. Quantum Blockchain-Based Multimicrogrid Transaction Model

### 4.1. Electricity Transaction Model Based on Multiple Aggregators

As the initiator of multimicrogrid game, aggregators are critical liaisons in the energy transaction between microgrids and between microgrid and the big grid. To maximize its own utility, an aggregator sells or buys electricity at a reasonable price to or from the big grid or the multiple microgrids. With the highest selling price in the electricity market, the multiple microgrids expect the maximal bidding income [14]. During the dynamic transaction, the unique Nash equilibrium solution is needed to lower the electrical energy flow cost within the multiple microgrids [15]. Taking the multiple microgrids as an example, this paper constructs the optimal selling model for aggregators (Figure 4) by simplex method and dynamic game, with the goal of optimizing electricity consumption and balancing supply and sales:(4)EA=EM−A+EP−A−EA−M+EA−P,EM−A=δ∑i,j=1i≠jNPPGsell⋅PMi−p+PPGbuy⋅PMi−Mj,EP−A=δPsell∑i,j=1i≠jNQsell−PMi−Mj,EA−M=Psell∑i=1NPsell,EA−P=PPGsell∑i=1NPMi−p,where EM−A and EP−A are the income of aggregators by selling electricity to microgrids and the big grid, respectively; δ is the coefficient of the electricity service fee charged by aggregators; PPGsell and PPGbuy are the real-time purchase and selling prices of electricity of the big grid, respectively; PMi−p and PMi−Mj are the electricity volumes purchased by MGA−i from the big grid and MGA−j via aggregators, respectively; Psell is the selling price of microgrids; Qsell is the electricity volume sold by microgrids; EA−M and EA−P are the expenditures of aggregators purchasing electricity from microgrids and the big grid, respectively.Figure 4
Cross-chain transaction model of aggregators.


#### 4.1.1. Objective Function

(5)max,EA,max,Wt=∑s=1nbistqist,min,ρ.EA is the utility function of aggregators; Wt is the bidding income expected by the microgrids in the electricity market; qist is the bidding electricity volume of microgrid i for the quoted price bist; ρ is the clearing price at the equilibrium.


#### 4.1.2. Constraints

(6)s.t.Psell<PPGsell,0.85<σ<1.2,∑s=1nxist=1,1.05Citqitqit≤∑s=1nbistxist≤ρtk−1,ρ≤ρ∗,0≤qist≤qiM−EMt,∀s=1,2,…,n.①
Psell<Qsell: Psell is the electricity selling price of microgrids; PPGsell is the real-time electricity selling price of the big grid.②
0.85<σ<1.2: δ is the electricity service coefficient charged by aggregates.③
∑s=1nxist=1: xist is the proportion of qist in total bidding electricity volume.④
1.05Citqit/qit≤∑s=1nbistxist≤ρtk−1: qit is the electricity generated by microgrid i at time t; Citqit is the marginal electricity generation cost of qit; ρtk−1 is the clearing price of round k-1 at time t; bist is the quoted price.⑤
ρ≤ρ∗: ρ is the clearing price at equilibrium; ρ∗ is the optimal clearing price at the optimal Nash equilibrium.⑥
0≤qist≤qiM−EMt,∀s=1,2,…,n: qist is the bidding electricity volume of microgrid i at the quoted price bist; qiM−EMt is the total bidding electricity volume of microgrid i at time t.The game bidding model of the supply-side microgrids is a noncooperative game model. According to the bidding strategy development method, the upper and lower limits of the quoted price were determined by setting the marginal cost of the bidding electricity volume [16]. Once the quoted price interval n is determined, the bidding strategy belongs to a discrete limited pure strategy set and has a Nash equilibrium solution. In the electricity market, there are two discrete strategy sets of bidding, which, respectively, belong to microgrid i and microgrid j. The Nash equilibrium of the bidding game can be established as(7)WtSit−c,Sjt−c≥maxWtSit−c,Sjt−c,where subscript c is the bidding strategy Sit or the fulfilment of Nash equilibrium; Wt is the bidding income of the multiple microgrids in the electricity market. The improved iterative search was performed to obtain the Nash equilibrium solution to the above bidding game [17]. In each iteration, if the calculated clearing price is below the preset minimum, the clearing price will be corrected into the preset minimum; otherwise, the clearing price will be corrected into the preset maximum.LetSit,k,Sjt,k be the bidding strategy of the multiple microgrids. Then, the bidding strategy of the multiple microgrids is Sit,k+1,Sjt,k+1 in the k+1-th iteration, where(8)St,k+1=maxStWtSit,k+1,Sjt,k+1,Sit,k,Sjt,k.Formula (8) is the optimal bidding income of the multiple microgrids at the fixed bidding strategy St,k+1. The Nash equilibrium solution of the game, i.e., the optimal bidding strategy, can be obtained, after the iteration ends when the bidding strategy of all microgrids changes no more:(9)Sit,k,Sjt,k=Sit,k+1,Sjt,k+1.The game might not reach Nash equilibrium, when the maximum number of iterations is too small or the interval of the clearing price is unreasonable (the interval could be affected by weather or relevant policies). Therefore, the iteration should end, when Nash equilibrium is not fulfilled after the iteration reaches the preset maximum number. In this case, the current round of bidding for the electricity market fails. Figure5 shows the flow of the abovementioned bidding game model of the multiple microgrids.Figure 5
Flow of iterative solving process.


### 4.2. Quantum Threshold Signature

The cross-chain communication between multiple microgrids can disperse the value dynamically and adaptively across blockchain nodes [18]. For multimicrogrid cross-chain communication, the data transmission will become more secure and trustworthy if the distributed key management is realized by quantum threshold signature technology. The multiple microgrids will operate more efficiently, for the cross-chain communication is verified by a few privileged nodes.It is assumed that, in the quantum block chain, each pair of nodes are connected by a classic channel, and a private key sequence is established using the quantum key distribution (QKD) network. In other words, these nodes connected by the quantum channel form a QKD network. Quantum threshold signature is a scheme that couples distributed keys with multithreshold signature. This technology has been extensively applied to the smart contract of blockchains, owing to its low cost, high security, and data credibility. Assuming that the QKD network exists, this paper realizes the unconditionally secure communication based on quantum threshold signature.Definition 1.
Quantum threshold signature schemeQ is a tuple P,M,Σ,Sign,Ver.(1)
P=P0,P1,…,Pn is the set of communication participants, including the signer P0 and n potential receivers P1⟶Pn. It is assumed that some of the σ participants are honest, with σ>34.(2)
M=0,1lm is the set of messages with a length of lm.(3)
Σ=0,1n2lh is the set of signatures with a length of lm.(4)
SignM⟶Σ is a function that receives message m∈M and outputs signature σ∈Σ. Signing a message falls into a distribution phase and a signature phase.


#### 4.2.1. Distribution Phase

①
The sender randomly generates a stringr1,1,…,rn,n, each of which is of the length lh. The hash function determined by r1,1,…,rn,n is represented by f1,1,…,fn,n.②
The sender safety sendsri,1,…,ri,n to all receivers Pi.③
ReceiverPi will send ri,j to another receiver Pi′.


#### 4.2.2. Signature Phase

Messagem is given a signature Signm=f1,1m,…,fn,nm.ProofM×P×Σ⟶True,False is a function that receives message m, signature σ, and participant Pi and returns the Boolean value based on the validity of the signature. The verification is performed by Pi.After receiving a pair of signaturesm,σ, with σ being a signature of forms t1,1,…,tn,n, the receiver Pi will carry out the following test:(10)Tj,im=1,iftj,i=fj,im,0,otherwise.Ifm,σ,Pi is true, when Pi accepts the signature, more than 1/2+21−σ×n pass the test, with σ being the proportion of honest participants:(11)∑j=1nTj,im≥12+21−σ×n.Theorem 1.
The quantum threshold signature scheme meets the following security requirements.(1)
Unforgeability: The attacker cannot create a valid signature with a probabilitys higher than a negligible level.(2)
Transferability: If an honestPi accepts a signature, the other honest Pi will also accept the signature.(3)
Undeniability: The signer cannot reject the legal signature he/she created with a probability higher than a negligible level.In the blockchain smart contract, some nodes should be authorized to form aVk in cross-chain communication, which facilitates multimicrogrid joint operation. The full node server in the system is responsible for maintaining Vk and providing all valid operation information, until the protocol is reached. When the node of Vk reaches a consistent result, the new data block is generated. The number of nodes in Vk is selected according to the actual situation of the multimicrogrid system. Then, the public-private key pair KVPublic,KVprivate of Vk is generated by the quantum threshold signature scheme. The cross-chain consensus rules are as follows:(12)Vk=V1V2⋯Vk,VdVl=∅,1≤d,l≤k.(13)Vk=nknk≥0.(14)∑k=1mnk=nm≥1.(15)CKVpublicET,tk,nk=True,ifnk≥tk′≥tk,False,otherwise.(16)CKVprivateET,t1,n1;⋯;tm,nm;t,n=True,ifnd≥td′≥td,∑d=1mtd≥t,False,otherwise,where nk is all the nodes in Vk; formula (12) is the cooperation relationship between independent blockchains; formulas (13) and (14) describe the scale of cross-chain consensus nodes, with the former being the threshold for energy blockchain to verify cross-chain information and the latter being the condition for the verification; formulas (15) and (16) are the consensus threshold for the public-private key pair; tk is the minimum number of nk needed to pass a verification; tk′ is the actual number of nk needed to pass a verification. For the n nodes in Vk, at least t nodes should pass the verification.The proposed quantum threshold consensus mechanism for multiple microgrids can ensure the consistency of cross-chain information, without changing the structure of the current blockchain system in each system.


### 4.3. Flow of Cross-Chain Transaction

During the cross-chain transaction between multiple microgrids and aggregators, the big grid and microgrids perform real-name registration in the virtual power plant, aiming to ensure that the account information is true and effective. At this time, aggregates, as intermediaries that are critical to the big grid and microgrids, initiate the transaction game. In the virtual power plant, the multiple microgrids kick off the cross-chain communication based on blockchain, while ensuring the consistency of the transaction information and improving the transaction efficiency. In the private chain, aggregators AG1 and AG2 carry out a noncooperative dynamic game bidding across the chain with the big grid and the multiple microgrids. Taking the multiple microgrids for example, the simplex method is adopted to compute the utility of aggregators, as well as the bidding income and clearing price of themselves. Then, the optimal selling model is solved to maximize the utility and bidding income and to reach the unique Nash equilibrium solution. In this way, the utilities of different parties are balanced, the electricity consumption is optimized, and the economic benefits are increased (Figure6).Figure 6
Flow of cross-chain transaction between multiple microgrids and aggregators.On this basis, it is necessary to check if the bidding strategy of the k-th round is equal to that of thek+1-th round, i.e., if the Nash equilibrium is reached, aiming to ensure that the cross-chain transaction has a unique clearing price. If not, the transaction fails; if yes, quantum threshold signature is implemented in the multiple microgrids, and quantum keys are used to prevent the signature set and message set from being attacked or tampered with. Whether the multimicrogrid cross-chain transaction has reached a consensus is tested in the private chain. If yes, a transaction order is generated in the virtual power plant; otherwise, the cross-chain transaction fails. After the multiple microgrids, the big grid, and aggregators reach a consensus, all transaction data will be uploaded to the quantum blockchain and broadcasted across the private chain. Then, these participants will exchange energy as per the smart contract, putting an end to the cross-chain transaction.


## 4.1. Electricity Transaction Model Based on Multiple Aggregators

As the initiator of multimicrogrid game, aggregators are critical liaisons in the energy transaction between microgrids and between microgrid and the big grid. To maximize its own utility, an aggregator sells or buys electricity at a reasonable price to or from the big grid or the multiple microgrids. With the highest selling price in the electricity market, the multiple microgrids expect the maximal bidding income [14]. During the dynamic transaction, the unique Nash equilibrium solution is needed to lower the electrical energy flow cost within the multiple microgrids [15]. Taking the multiple microgrids as an example, this paper constructs the optimal selling model for aggregators (Figure 4) by simplex method and dynamic game, with the goal of optimizing electricity consumption and balancing supply and sales:(4)EA=EM−A+EP−A−EA−M+EA−P,EM−A=δ∑i,j=1i≠jNPPGsell⋅PMi−p+PPGbuy⋅PMi−Mj,EP−A=δPsell∑i,j=1i≠jNQsell−PMi−Mj,EA−M=Psell∑i=1NPsell,EA−P=PPGsell∑i=1NPMi−p,where EM−A and EP−A are the income of aggregators by selling electricity to microgrids and the big grid, respectively; δ is the coefficient of the electricity service fee charged by aggregators; PPGsell and PPGbuy are the real-time purchase and selling prices of electricity of the big grid, respectively; PMi−p and PMi−Mj are the electricity volumes purchased by MGA−i from the big grid and MGA−j via aggregators, respectively; Psell is the selling price of microgrids; Qsell is the electricity volume sold by microgrids; EA−M and EA−P are the expenditures of aggregators purchasing electricity from microgrids and the big grid, respectively.Figure 4
Cross-chain transaction model of aggregators.


### 4.1.1. Objective Function

(5)max,EA,max,Wt=∑s=1nbistqist,min,ρ.EA is the utility function of aggregators; Wt is the bidding income expected by the microgrids in the electricity market; qist is the bidding electricity volume of microgrid i for the quoted price bist; ρ is the clearing price at the equilibrium.


### 4.1.2. Constraints

(6)s.t.Psell<PPGsell,0.85<σ<1.2,∑s=1nxist=1,1.05Citqitqit≤∑s=1nbistxist≤ρtk−1,ρ≤ρ∗,0≤qist≤qiM−EMt,∀s=1,2,…,n.①
Psell<Qsell: Psell is the electricity selling price of microgrids; PPGsell is the real-time electricity selling price of the big grid.②
0.85<σ<1.2: δ is the electricity service coefficient charged by aggregates.③
∑s=1nxist=1: xist is the proportion of qist in total bidding electricity volume.④
1.05Citqit/qit≤∑s=1nbistxist≤ρtk−1: qit is the electricity generated by microgrid i at time t; Citqit is the marginal electricity generation cost of qit; ρtk−1 is the clearing price of round k-1 at time t; bist is the quoted price.⑤
ρ≤ρ∗: ρ is the clearing price at equilibrium; ρ∗ is the optimal clearing price at the optimal Nash equilibrium.⑥
0≤qist≤qiM−EMt,∀s=1,2,…,n: qist is the bidding electricity volume of microgrid i at the quoted price bist; qiM−EMt is the total bidding electricity volume of microgrid i at time t.The game bidding model of the supply-side microgrids is a noncooperative game model. According to the bidding strategy development method, the upper and lower limits of the quoted price were determined by setting the marginal cost of the bidding electricity volume [16]. Once the quoted price interval n is determined, the bidding strategy belongs to a discrete limited pure strategy set and has a Nash equilibrium solution. In the electricity market, there are two discrete strategy sets of bidding, which, respectively, belong to microgrid i and microgrid j. The Nash equilibrium of the bidding game can be established as(7)WtSit−c,Sjt−c≥maxWtSit−c,Sjt−c,where subscript c is the bidding strategy Sit or the fulfilment of Nash equilibrium; Wt is the bidding income of the multiple microgrids in the electricity market. The improved iterative search was performed to obtain the Nash equilibrium solution to the above bidding game [17]. In each iteration, if the calculated clearing price is below the preset minimum, the clearing price will be corrected into the preset minimum; otherwise, the clearing price will be corrected into the preset maximum.LetSit,k,Sjt,k be the bidding strategy of the multiple microgrids. Then, the bidding strategy of the multiple microgrids is Sit,k+1,Sjt,k+1 in the k+1-th iteration, where(8)St,k+1=maxStWtSit,k+1,Sjt,k+1,Sit,k,Sjt,k.Formula (8) is the optimal bidding income of the multiple microgrids at the fixed bidding strategy St,k+1. The Nash equilibrium solution of the game, i.e., the optimal bidding strategy, can be obtained, after the iteration ends when the bidding strategy of all microgrids changes no more:(9)Sit,k,Sjt,k=Sit,k+1,Sjt,k+1.The game might not reach Nash equilibrium, when the maximum number of iterations is too small or the interval of the clearing price is unreasonable (the interval could be affected by weather or relevant policies). Therefore, the iteration should end, when Nash equilibrium is not fulfilled after the iteration reaches the preset maximum number. In this case, the current round of bidding for the electricity market fails. Figure5 shows the flow of the abovementioned bidding game model of the multiple microgrids.Figure 5
Flow of iterative solving process.


## 4.1.1. Objective Function

(5)max,EA,max,Wt=∑s=1nbistqist,min,ρ.EA is the utility function of aggregators; Wt is the bidding income expected by the microgrids in the electricity market; qist is the bidding electricity volume of microgrid i for the quoted price bist; ρ is the clearing price at the equilibrium.


## 4.1.2. Constraints

(6)s.t.Psell<PPGsell,0.85<σ<1.2,∑s=1nxist=1,1.05Citqitqit≤∑s=1nbistxist≤ρtk−1,ρ≤ρ∗,0≤qist≤qiM−EMt,∀s=1,2,…,n.①
Psell<Qsell: Psell is the electricity selling price of microgrids; PPGsell is the real-time electricity selling price of the big grid.②
0.85<σ<1.2: δ is the electricity service coefficient charged by aggregates.③
∑s=1nxist=1: xist is the proportion of qist in total bidding electricity volume.④
1.05Citqit/qit≤∑s=1nbistxist≤ρtk−1: qit is the electricity generated by microgrid i at time t; Citqit is the marginal electricity generation cost of qit; ρtk−1 is the clearing price of round k-1 at time t; bist is the quoted price.⑤
ρ≤ρ∗: ρ is the clearing price at equilibrium; ρ∗ is the optimal clearing price at the optimal Nash equilibrium.⑥
0≤qist≤qiM−EMt,∀s=1,2,…,n: qist is the bidding electricity volume of microgrid i at the quoted price bist; qiM−EMt is the total bidding electricity volume of microgrid i at time t.The game bidding model of the supply-side microgrids is a noncooperative game model. According to the bidding strategy development method, the upper and lower limits of the quoted price were determined by setting the marginal cost of the bidding electricity volume [16]. Once the quoted price interval n is determined, the bidding strategy belongs to a discrete limited pure strategy set and has a Nash equilibrium solution. In the electricity market, there are two discrete strategy sets of bidding, which, respectively, belong to microgrid i and microgrid j. The Nash equilibrium of the bidding game can be established as(7)WtSit−c,Sjt−c≥maxWtSit−c,Sjt−c,where subscript c is the bidding strategy Sit or the fulfilment of Nash equilibrium; Wt is the bidding income of the multiple microgrids in the electricity market. The improved iterative search was performed to obtain the Nash equilibrium solution to the above bidding game [17]. In each iteration, if the calculated clearing price is below the preset minimum, the clearing price will be corrected into the preset minimum; otherwise, the clearing price will be corrected into the preset maximum.LetSit,k,Sjt,k be the bidding strategy of the multiple microgrids. Then, the bidding strategy of the multiple microgrids is Sit,k+1,Sjt,k+1 in the k+1-th iteration, where(8)St,k+1=maxStWtSit,k+1,Sjt,k+1,Sit,k,Sjt,k.Formula (8) is the optimal bidding income of the multiple microgrids at the fixed bidding strategy St,k+1. The Nash equilibrium solution of the game, i.e., the optimal bidding strategy, can be obtained, after the iteration ends when the bidding strategy of all microgrids changes no more:(9)Sit,k,Sjt,k=Sit,k+1,Sjt,k+1.The game might not reach Nash equilibrium, when the maximum number of iterations is too small or the interval of the clearing price is unreasonable (the interval could be affected by weather or relevant policies). Therefore, the iteration should end, when Nash equilibrium is not fulfilled after the iteration reaches the preset maximum number. In this case, the current round of bidding for the electricity market fails. Figure5 shows the flow of the abovementioned bidding game model of the multiple microgrids.Figure 5
Flow of iterative solving process.


## 4.2. Quantum Threshold Signature

The cross-chain communication between multiple microgrids can disperse the value dynamically and adaptively across blockchain nodes [18]. For multimicrogrid cross-chain communication, the data transmission will become more secure and trustworthy if the distributed key management is realized by quantum threshold signature technology. The multiple microgrids will operate more efficiently, for the cross-chain communication is verified by a few privileged nodes.It is assumed that, in the quantum block chain, each pair of nodes are connected by a classic channel, and a private key sequence is established using the quantum key distribution (QKD) network. In other words, these nodes connected by the quantum channel form a QKD network. Quantum threshold signature is a scheme that couples distributed keys with multithreshold signature. This technology has been extensively applied to the smart contract of blockchains, owing to its low cost, high security, and data credibility. Assuming that the QKD network exists, this paper realizes the unconditionally secure communication based on quantum threshold signature.Definition 1.
Quantum threshold signature schemeQ is a tuple P,M,Σ,Sign,Ver.(1)
P=P0,P1,…,Pn is the set of communication participants, including the signer P0 and n potential receivers P1⟶Pn. It is assumed that some of the σ participants are honest, with σ>34.(2)
M=0,1lm is the set of messages with a length of lm.(3)
Σ=0,1n2lh is the set of signatures with a length of lm.(4)
SignM⟶Σ is a function that receives message m∈M and outputs signature σ∈Σ. Signing a message falls into a distribution phase and a signature phase.


### 4.2.1. Distribution Phase

①
The sender randomly generates a stringr1,1,…,rn,n, each of which is of the length lh. The hash function determined by r1,1,…,rn,n is represented by f1,1,…,fn,n.②
The sender safety sendsri,1,…,ri,n to all receivers Pi.③
ReceiverPi will send ri,j to another receiver Pi′.


### 4.2.2. Signature Phase

Messagem is given a signature Signm=f1,1m,…,fn,nm.ProofM×P×Σ⟶True,False is a function that receives message m, signature σ, and participant Pi and returns the Boolean value based on the validity of the signature. The verification is performed by Pi.After receiving a pair of signaturesm,σ, with σ being a signature of forms t1,1,…,tn,n, the receiver Pi will carry out the following test:(10)Tj,im=1,iftj,i=fj,im,0,otherwise.Ifm,σ,Pi is true, when Pi accepts the signature, more than 1/2+21−σ×n pass the test, with σ being the proportion of honest participants:(11)∑j=1nTj,im≥12+21−σ×n.Theorem 1.
The quantum threshold signature scheme meets the following security requirements.(1)
Unforgeability: The attacker cannot create a valid signature with a probabilitys higher than a negligible level.(2)
Transferability: If an honestPi accepts a signature, the other honest Pi will also accept the signature.(3)
Undeniability: The signer cannot reject the legal signature he/she created with a probability higher than a negligible level.In the blockchain smart contract, some nodes should be authorized to form aVk in cross-chain communication, which facilitates multimicrogrid joint operation. The full node server in the system is responsible for maintaining Vk and providing all valid operation information, until the protocol is reached. When the node of Vk reaches a consistent result, the new data block is generated. The number of nodes in Vk is selected according to the actual situation of the multimicrogrid system. Then, the public-private key pair KVPublic,KVprivate of Vk is generated by the quantum threshold signature scheme. The cross-chain consensus rules are as follows:(12)Vk=V1V2⋯Vk,VdVl=∅,1≤d,l≤k.(13)Vk=nknk≥0.(14)∑k=1mnk=nm≥1.(15)CKVpublicET,tk,nk=True,ifnk≥tk′≥tk,False,otherwise.(16)CKVprivateET,t1,n1;⋯;tm,nm;t,n=True,ifnd≥td′≥td,∑d=1mtd≥t,False,otherwise,where nk is all the nodes in Vk; formula (12) is the cooperation relationship between independent blockchains; formulas (13) and (14) describe the scale of cross-chain consensus nodes, with the former being the threshold for energy blockchain to verify cross-chain information and the latter being the condition for the verification; formulas (15) and (16) are the consensus threshold for the public-private key pair; tk is the minimum number of nk needed to pass a verification; tk′ is the actual number of nk needed to pass a verification. For the n nodes in Vk, at least t nodes should pass the verification.The proposed quantum threshold consensus mechanism for multiple microgrids can ensure the consistency of cross-chain information, without changing the structure of the current blockchain system in each system.


## 4.2.1. Distribution Phase

①
The sender randomly generates a stringr1,1,…,rn,n, each of which is of the length lh. The hash function determined by r1,1,…,rn,n is represented by f1,1,…,fn,n.②
The sender safety sendsri,1,…,ri,n to all receivers Pi.③
ReceiverPi will send ri,j to another receiver Pi′.


## 4.2.2. Signature Phase

Messagem is given a signature Signm=f1,1m,…,fn,nm.ProofM×P×Σ⟶True,False is a function that receives message m, signature σ, and participant Pi and returns the Boolean value based on the validity of the signature. The verification is performed by Pi.After receiving a pair of signaturesm,σ, with σ being a signature of forms t1,1,…,tn,n, the receiver Pi will carry out the following test:(10)Tj,im=1,iftj,i=fj,im,0,otherwise.Ifm,σ,Pi is true, when Pi accepts the signature, more than 1/2+21−σ×n pass the test, with σ being the proportion of honest participants:(11)∑j=1nTj,im≥12+21−σ×n.Theorem 1.
The quantum threshold signature scheme meets the following security requirements.(1)
Unforgeability: The attacker cannot create a valid signature with a probabilitys higher than a negligible level.(2)
Transferability: If an honestPi accepts a signature, the other honest Pi will also accept the signature.(3)
Undeniability: The signer cannot reject the legal signature he/she created with a probability higher than a negligible level.In the blockchain smart contract, some nodes should be authorized to form aVk in cross-chain communication, which facilitates multimicrogrid joint operation. The full node server in the system is responsible for maintaining Vk and providing all valid operation information, until the protocol is reached. When the node of Vk reaches a consistent result, the new data block is generated. The number of nodes in Vk is selected according to the actual situation of the multimicrogrid system. Then, the public-private key pair KVPublic,KVprivate of Vk is generated by the quantum threshold signature scheme. The cross-chain consensus rules are as follows:(12)Vk=V1V2⋯Vk,VdVl=∅,1≤d,l≤k.(13)Vk=nknk≥0.(14)∑k=1mnk=nm≥1.(15)CKVpublicET,tk,nk=True,ifnk≥tk′≥tk,False,otherwise.(16)CKVprivateET,t1,n1;⋯;tm,nm;t,n=True,ifnd≥td′≥td,∑d=1mtd≥t,False,otherwise,where nk is all the nodes in Vk; formula (12) is the cooperation relationship between independent blockchains; formulas (13) and (14) describe the scale of cross-chain consensus nodes, with the former being the threshold for energy blockchain to verify cross-chain information and the latter being the condition for the verification; formulas (15) and (16) are the consensus threshold for the public-private key pair; tk is the minimum number of nk needed to pass a verification; tk′ is the actual number of nk needed to pass a verification. For the n nodes in Vk, at least t nodes should pass the verification.The proposed quantum threshold consensus mechanism for multiple microgrids can ensure the consistency of cross-chain information, without changing the structure of the current blockchain system in each system.


## 4.3. Flow of Cross-Chain Transaction

During the cross-chain transaction between multiple microgrids and aggregators, the big grid and microgrids perform real-name registration in the virtual power plant, aiming to ensure that the account information is true and effective. At this time, aggregates, as intermediaries that are critical to the big grid and microgrids, initiate the transaction game. In the virtual power plant, the multiple microgrids kick off the cross-chain communication based on blockchain, while ensuring the consistency of the transaction information and improving the transaction efficiency. In the private chain, aggregators AG1 and AG2 carry out a noncooperative dynamic game bidding across the chain with the big grid and the multiple microgrids. Taking the multiple microgrids for example, the simplex method is adopted to compute the utility of aggregators, as well as the bidding income and clearing price of themselves. Then, the optimal selling model is solved to maximize the utility and bidding income and to reach the unique Nash equilibrium solution. In this way, the utilities of different parties are balanced, the electricity consumption is optimized, and the economic benefits are increased (Figure6).Figure 6
Flow of cross-chain transaction between multiple microgrids and aggregators.On this basis, it is necessary to check if the bidding strategy of the k-th round is equal to that of thek+1-th round, i.e., if the Nash equilibrium is reached, aiming to ensure that the cross-chain transaction has a unique clearing price. If not, the transaction fails; if yes, quantum threshold signature is implemented in the multiple microgrids, and quantum keys are used to prevent the signature set and message set from being attacked or tampered with. Whether the multimicrogrid cross-chain transaction has reached a consensus is tested in the private chain. If yes, a transaction order is generated in the virtual power plant; otherwise, the cross-chain transaction fails. After the multiple microgrids, the big grid, and aggregators reach a consensus, all transaction data will be uploaded to the quantum blockchain and broadcasted across the private chain. Then, these participants will exchange energy as per the smart contract, putting an end to the cross-chain transaction.


## 5. Case Analysis

### 5.1. Analysis on the Optimal Selling Model

It is assumed that the virtual power plant has 4 microgrids. In each phase of bidding, the electricity volume was derived by fitting the unified clearing price in the previous round. The optimal bidding results were simulated for the multiple microgrids at 220 kW, 550 kW, and 1,000 kW. The parameter of the bidding strategy was set to 3; i.e., the multiple microgrids have three electricity prices: high, medium, and low. In addition, the authors setΔut=CiM−EMMC−t−CiAC−t, with CiM−EMMC−t being the marginal cost of the maximum power generation and CiAC−t being the mean cost of the maximum power generation.As shown in Table1, microgrid 1, with a high power generation cost, does not have an advantage in the bidding process. The winning bid was merely 12.3827 kW, with the electricity demand of 220 kW. The income falls, as the grid offers a low electricity price. But the bid-winning electricity amount and income increase obviously with the growing market demand. Therefore, power generation should be reduced when market demand is low.(1)
Microgrid 2 has a low power generation cost and outputs lots of power. Therefore, it always has an advantage in the market. The microgrid enjoys a high bid-winning electricity volume and a higher income than its competitors. The same occurred to microgrid 4.(2)
Limited by its output, microgrid 3 does not have an outstanding income. Despite having a low bid-winning electricity volume, the microgrid achieves a considerable income. Thus, power generation can be increased to boost the income.Table 1
Optimal bidding results.
Demand/kWOutput and incomeMicrogrid 1Microgrid 2Microgrid 3Microgrid 4220Output/kW12.3827211.913082.4917143.2126Income (¥/h)24.268038.258629.703134.9696550Output/kW120.0565214.753698.2639116.9259Income (¥/h)31.667950.982038.265445.64891000Output/kW130.0000258.0000114.0000148.0000Income (¥/h)43.957368.952550.999360.8332To verify the bidding strategy, three traditional quoted prices,n = 3 (high, medium, and low), were selected, with Δut=0.2CiM−EMMC−t, and microgrid 1 was taken as the object. Figure 7 presents the results of our bidding strategy (improved strategy) and traditional strategy under different demands.Figure 7
Income and bid-winning volume under different demands.As shown in Figure7, when the market demand was 220 kW, the bid-winning volume of our strategy was 12.3827 kW, while that of the traditional strategy was 0 kW. Under different demands, our strategy always surpassed the traditional one in income and bid-winning volume. Therefore, the noncooperative game bidding strategy adapts better to the electricity market. It can increase the bid-winning volume of multiple microgrids, while increasing their income.As shown in Figure8, through the 24 iterations, the oscillating unified clearing prices of improved and traditional strategies tended to be stable after the 15th and 21st iterations, respectively. Therefore, the improved clearing price model helps to improve the transaction efficiency. Being lower than the traditional clearing price, the improved clearing price benefits the consumption of electricity in the multiple microgrids. When the market demand was 220 kW, the competition between the microgrids intensified with the growing number of iterations, due to the relatively small electricity demand. To increase the bid-winning volume, the microgrids continued to suppress the offered prices. Hence, more bid-winning volume clustered to the low price interval, dragging down the unified clearing price. With the rise of market demand, the unified clearing price increased with the number of iterations. In other words, the microgrids gradually lifted the price to obtain more selling income. As a result, more bid-winning volume clustered to the high price interval.Figure 8
Improved and traditional clearing prices under different demands. (a) Optimization results of improved clearing price. (b) Optimization results of traditional clearing price.
(a)(b)In this case, the microgrid nodes have reached a consensus of noncooperative game, during the blockchain-based alliance between aggregators and multiple microgrids. Then, two microgrids were selected for simulation:MGA−i, which is operated by an energy conservation service provider, and MGA−j, a microgrid node. The former is a large solar and wind power generator mainly serving residents; the latter is a small solar power generator mainly serving businesses. Figure 9 predicts the load and day-ahead outputs of the two microgrids.Figure 9
Predicted load and day-ahead outputs of two microgrids. (a) Load and day-ahead output of MGA-i. (b) Load and day-ahead output of MGA-j.
(a)(b)


### 5.2. Effectiveness of Multimicrogrid Cross-Chain Consensus

Supposex and y are connected to different microgrids and wish to communicate across the chain. They know each other’s public information parameters parmA and parmB. Each parameter has its own private key. Based on the basic principle that quantum blockchain has function, x and y can obtain the following communication keys:(17)Keyx=HashKxprivate⋅parmy,Keyy=HashKyprivate⋅parmx.Due to the commutative property of multiplication, we havex = y. Therefore, the cross-chain consensus transaction of the multiple microgrids is effective.


### 5.3. Analysis on Quantum Threshold Signature Scheme

#### 5.3.1. Unforgeability

In an electricity transaction, an attacker Eve cannot eavesdrop the transaction ciphertext without the private keyKVprivate of lawful participants P=P0,P1,…,Pn. Since the QKD distributes KVprivate in a unified manner, it is impossible for Eve to steal the transaction information. Even if he/she tries to forge a quantum threshold signature |σ, Eve cannot pass the verification of quantum threshold signature:(18)σ=KVprivate∗M,Σ,Tj,im.The quantum channel between the sender and the receiver is constructed based on superposition of states. The message setM=0,1lm is transmitted securely and reliably in quantum state via the QKD. The receiver will notice the test Tj,im on honest nodes. Hence, the signature set and message set cannot be foraged or tampered with.


#### 5.3.2. Transferability

In electricity transactions, quantum threshold signature is transferable. The transferability optimizes the efficiency of energy transmission. As a result, this technology is widely applied in electronic trading systems. When participantPi confirms that a signature Σ=0,1n2lh and a message M=0,1lm are true, the node will be recognized as an honest node. This node will be uploaded to the quantum blockchain and broadcasted. It can be queried in the block forever. At this time, other legal participants will accept the signature and message of that participant, with the assistance of the trusted communication channel. Therefore, the quantum threshold signature technology is transferable.


#### 5.3.3. Undeniability

The quantum threshold signature|σ of P0 is broadcasted via the quantum channel, making it impossible to be denied by the participant. If the signer P0 denies his/her quantum threshold signature out of any reason, Pi can refuse by presenting the signature and serial number provided by the quantum channel.IfP0 denies KVprivate, Pi can verify if P0 is making a false claim by a random string r1,1,…,rn,n and Tj,im in formula (11). If P0 denies |M and |Σ, Pi can restore |M and |Σ with a probability of(19)Pcover=14n,where n is the length of message. The longer the length is, the closer the success rate of the denial by P0 is to zero. Therefore, the quantum threshold signature technology is undeniable.


## 5.1. Analysis on the Optimal Selling Model

It is assumed that the virtual power plant has 4 microgrids. In each phase of bidding, the electricity volume was derived by fitting the unified clearing price in the previous round. The optimal bidding results were simulated for the multiple microgrids at 220 kW, 550 kW, and 1,000 kW. The parameter of the bidding strategy was set to 3; i.e., the multiple microgrids have three electricity prices: high, medium, and low. In addition, the authors setΔut=CiM−EMMC−t−CiAC−t, with CiM−EMMC−t being the marginal cost of the maximum power generation and CiAC−t being the mean cost of the maximum power generation.As shown in Table1, microgrid 1, with a high power generation cost, does not have an advantage in the bidding process. The winning bid was merely 12.3827 kW, with the electricity demand of 220 kW. The income falls, as the grid offers a low electricity price. But the bid-winning electricity amount and income increase obviously with the growing market demand. Therefore, power generation should be reduced when market demand is low.(1)
Microgrid 2 has a low power generation cost and outputs lots of power. Therefore, it always has an advantage in the market. The microgrid enjoys a high bid-winning electricity volume and a higher income than its competitors. The same occurred to microgrid 4.(2)
Limited by its output, microgrid 3 does not have an outstanding income. Despite having a low bid-winning electricity volume, the microgrid achieves a considerable income. Thus, power generation can be increased to boost the income.Table 1
Optimal bidding results.
Demand/kWOutput and incomeMicrogrid 1Microgrid 2Microgrid 3Microgrid 4220Output/kW12.3827211.913082.4917143.2126Income (¥/h)24.268038.258629.703134.9696550Output/kW120.0565214.753698.2639116.9259Income (¥/h)31.667950.982038.265445.64891000Output/kW130.0000258.0000114.0000148.0000Income (¥/h)43.957368.952550.999360.8332To verify the bidding strategy, three traditional quoted prices,n = 3 (high, medium, and low), were selected, with Δut=0.2CiM−EMMC−t, and microgrid 1 was taken as the object. Figure 7 presents the results of our bidding strategy (improved strategy) and traditional strategy under different demands.Figure 7
Income and bid-winning volume under different demands.As shown in Figure7, when the market demand was 220 kW, the bid-winning volume of our strategy was 12.3827 kW, while that of the traditional strategy was 0 kW. Under different demands, our strategy always surpassed the traditional one in income and bid-winning volume. Therefore, the noncooperative game bidding strategy adapts better to the electricity market. It can increase the bid-winning volume of multiple microgrids, while increasing their income.As shown in Figure8, through the 24 iterations, the oscillating unified clearing prices of improved and traditional strategies tended to be stable after the 15th and 21st iterations, respectively. Therefore, the improved clearing price model helps to improve the transaction efficiency. Being lower than the traditional clearing price, the improved clearing price benefits the consumption of electricity in the multiple microgrids. When the market demand was 220 kW, the competition between the microgrids intensified with the growing number of iterations, due to the relatively small electricity demand. To increase the bid-winning volume, the microgrids continued to suppress the offered prices. Hence, more bid-winning volume clustered to the low price interval, dragging down the unified clearing price. With the rise of market demand, the unified clearing price increased with the number of iterations. In other words, the microgrids gradually lifted the price to obtain more selling income. As a result, more bid-winning volume clustered to the high price interval.Figure 8
Improved and traditional clearing prices under different demands. (a) Optimization results of improved clearing price. (b) Optimization results of traditional clearing price.
(a)(b)In this case, the microgrid nodes have reached a consensus of noncooperative game, during the blockchain-based alliance between aggregators and multiple microgrids. Then, two microgrids were selected for simulation:MGA−i, which is operated by an energy conservation service provider, and MGA−j, a microgrid node. The former is a large solar and wind power generator mainly serving residents; the latter is a small solar power generator mainly serving businesses. Figure 9 predicts the load and day-ahead outputs of the two microgrids.Figure 9
Predicted load and day-ahead outputs of two microgrids. (a) Load and day-ahead output of MGA-i. (b) Load and day-ahead output of MGA-j.
(a)(b)


## 5.2. Effectiveness of Multimicrogrid Cross-Chain Consensus

Supposex and y are connected to different microgrids and wish to communicate across the chain. They know each other’s public information parameters parmA and parmB. Each parameter has its own private key. Based on the basic principle that quantum blockchain has function, x and y can obtain the following communication keys:(17)Keyx=HashKxprivate⋅parmy,Keyy=HashKyprivate⋅parmx.Due to the commutative property of multiplication, we havex = y. Therefore, the cross-chain consensus transaction of the multiple microgrids is effective.


## 5.3. Analysis on Quantum Threshold Signature Scheme

### 5.3.1. Unforgeability

In an electricity transaction, an attacker Eve cannot eavesdrop the transaction ciphertext without the private keyKVprivate of lawful participants P=P0,P1,…,Pn. Since the QKD distributes KVprivate in a unified manner, it is impossible for Eve to steal the transaction information. Even if he/she tries to forge a quantum threshold signature |σ, Eve cannot pass the verification of quantum threshold signature:(18)σ=KVprivate∗M,Σ,Tj,im.The quantum channel between the sender and the receiver is constructed based on superposition of states. The message setM=0,1lm is transmitted securely and reliably in quantum state via the QKD. The receiver will notice the test Tj,im on honest nodes. Hence, the signature set and message set cannot be foraged or tampered with.


### 5.3.2. Transferability

In electricity transactions, quantum threshold signature is transferable. The transferability optimizes the efficiency of energy transmission. As a result, this technology is widely applied in electronic trading systems. When participantPi confirms that a signature Σ=0,1n2lh and a message M=0,1lm are true, the node will be recognized as an honest node. This node will be uploaded to the quantum blockchain and broadcasted. It can be queried in the block forever. At this time, other legal participants will accept the signature and message of that participant, with the assistance of the trusted communication channel. Therefore, the quantum threshold signature technology is transferable.


### 5.3.3. Undeniability

The quantum threshold signature|σ of P0 is broadcasted via the quantum channel, making it impossible to be denied by the participant. If the signer P0 denies his/her quantum threshold signature out of any reason, Pi can refuse by presenting the signature and serial number provided by the quantum channel.IfP0 denies KVprivate, Pi can verify if P0 is making a false claim by a random string r1,1,…,rn,n and Tj,im in formula (11). If P0 denies |M and |Σ, Pi can restore |M and |Σ with a probability of(19)Pcover=14n,where n is the length of message. The longer the length is, the closer the success rate of the denial by P0 is to zero. Therefore, the quantum threshold signature technology is undeniable.


## 5.3.1. Unforgeability

In an electricity transaction, an attacker Eve cannot eavesdrop the transaction ciphertext without the private keyKVprivate of lawful participants P=P0,P1,…,Pn. Since the QKD distributes KVprivate in a unified manner, it is impossible for Eve to steal the transaction information. Even if he/she tries to forge a quantum threshold signature |σ, Eve cannot pass the verification of quantum threshold signature:(18)σ=KVprivate∗M,Σ,Tj,im.The quantum channel between the sender and the receiver is constructed based on superposition of states. The message setM=0,1lm is transmitted securely and reliably in quantum state via the QKD. The receiver will notice the test Tj,im on honest nodes. Hence, the signature set and message set cannot be foraged or tampered with.


## 5.3.2. Transferability

In electricity transactions, quantum threshold signature is transferable. The transferability optimizes the efficiency of energy transmission. As a result, this technology is widely applied in electronic trading systems. When participantPi confirms that a signature Σ=0,1n2lh and a message M=0,1lm are true, the node will be recognized as an honest node. This node will be uploaded to the quantum blockchain and broadcasted. It can be queried in the block forever. At this time, other legal participants will accept the signature and message of that participant, with the assistance of the trusted communication channel. Therefore, the quantum threshold signature technology is transferable.


## 5.3.3. Undeniability

The quantum threshold signature|σ of P0 is broadcasted via the quantum channel, making it impossible to be denied by the participant. If the signer P0 denies his/her quantum threshold signature out of any reason, Pi can refuse by presenting the signature and serial number provided by the quantum channel.IfP0 denies KVprivate, Pi can verify if P0 is making a false claim by a random string r1,1,…,rn,n and Tj,im in formula (11). If P0 denies |M and |Σ, Pi can restore |M and |Σ with a probability of(19)Pcover=14n,where n is the length of message. The longer the length is, the closer the success rate of the denial by P0 is to zero. Therefore, the quantum threshold signature technology is undeniable.


## 6. Conclusions

This paper proposes a multimicrogrid cross-chain transaction model based on quantum blockchain, aiming to better solve the energy transaction between multiple microgrids, ensure safe and reliable cross-chain transactions, and increase the consumption rate of distributed energy. Starting from the architecture of quantum blockchain-based aggregator-multimicrogrid alliance, the authors constructed the optimal selling model of multiple microgrids, in the light of noncooperative dynamic game. The model enables the multiple microgrids to win sufficient electricity volume and set precise and efficient prices, guarantees the unique Nash equilibrium solution for the bidding strategies of aggregators, the big grid, and the microgrids, and greatly improves the economic benefits of private chains. In addition, the consensus mechanism of multimicrogrid cross-chain communication was taken as the embedding algorithm of smart contract, such that the value is dispersed across blockchain nodes, the information and attributes of transaction subjects are consistent among the multiple microgrids, and the multiple microgrids can operate efficiently and collaborate in cross-chain communication. Furthermore, quantum blockchain was deeply integrated with multimicrogrid cross-chain communication, barring attackers from knowing quantum keys. Therefore, the attackers cannot pass the verification on quantum threshold signature, not to mention accessing the ciphertext of the signature set and message set. In this way, the transaction data become much safer, creating a trustworthy environment for multimicrogrid cross-chain transactions. The experimental results show the following:(1)
The optimal bidding results can be achieved by the multiple microgrids through noncooperative dynamic game and simplex method. Our bidding strategy can boost the bid-winning volume of the multiple microgrids, while enhancing the income of aggregators and the multiple microgrids and adapting well to the market of multimicrogrid cross-chain transactions.(2)
By the basic principle of quantum blockchain hash function, the consensus mechanism of multimicrogrid communication was verified with the communication keys.(3)
Using quantum blockchain technology, the quantum threshold signature scheme was proved to be unforgeable, transferable, and undeniable.In the future, cross-chain trading of multimicronetworks can be further combined with China’s dual carbon policy to establish a fair and reasonable initial allocation mechanism of carbon emission rights, achieve efficient and stable operation of carbon emission rights allocation, and build a zero-carbon trading platform of “green mountains are gold mountains.”



---

*Source: 4535974-2022-04-11.xml*