Abstract
The state parameters of electrical equipment and power system control parameters are the key data to realize the precise control and cooperative autonomy of a cyber physical power system. The trustworthiness of the data is the primary condition to guarantee the electric power system’s safe and reliable operation. In the traditional centralized data acquisition and management architecture, the security and trustworthiness completely depend on the central main server. A small mistake in the main server will result in data loss, which is irreversible and fatal. Blockchain technique combines the dispersed data with mutual backup and retrieval mechanism, which guarantees that the data cannot be tampered with and forged privately. Based on the blockchain technology, this article proposes a novel data trustworthy acquisition model with high credibility, applied to a self-organized cyber physical power system. In order to overcome the long time-consuming process of building traditional blockchains, a new on-demand data transmission routing algorithm with M/M/1/k queuing model is proposed in this article. Different scales of IEEE standard bus systems are employed as experimental examples to evaluate the algorithm’s performance. The results show that the proposed algorithm can effectively shorten the time consumption of blockchain construction and realize the data trustworthiness of cyber physical power system.
Keywords
Introduction
The deep integration of power systems and information systems evolves into the cyber physical power system (CPPS), which realizes the full perception and precise control of smart grid. 1 Therefore, the trustworthy management of data becomes one of the primary conditions to guarantee the safe and reliable operation of the system.
Existing data acquisition and management methods in electric power system usually adopt a centralized architecture. The electrical data are measured by smart meters and transmitted to the main station for the purpose of centralized management. In this architecture, data credibility completely depends on the central main server. Any small mistake in the main server will result in data loss, which may be irreversible and fatal. Therefore, to keep high reliability, huge operation and maintenance costs would need to be paid annually.
Different from the centralized architecture, the blockchain technology is a novel distributed data management architecture with high credibility, which is extremely suitable to be used in CPPS, a distributed information system.
Blockchain technique combines the dispersed data with a special chain mode. By mutual backup and retrieval mechanism, it ensures that the data cannot be tampered with and forged privately. 2 In current and earlier research, blockchain technique was usually applied in the financial field to implement decentralized transaction records. With the development of the technique, the characteristic of high credibility has been widely recognized, and some research has been presented to use blockchain technique in fields other than that of finance.
Zhang et al. 3 and Yang et al. 4 discussed the feasibility of applying blockchain in the energy field and presented some potential realizable scenarios. Zeng et al. 5 studied the compatibility of blockchain and energy Internet system and proposed a framework to realize distributed decision and cooperative autonomous operation. The electricity transactions and direct power purchase model for large power end-user based on the blockchain were researched in literature.6–8 Li et al. 9 and Yang et al. 10 studied the demand response of energy storage units in regional power grid based on blockchain technology and established a smart contract mechanism between power supply and marketing sides to balance the profit distribution. In other fields, blockchain technology had been applied to data acquisition and processing. In Yuan and Wang, 11 the first scenario of blockchain application is data storage. Blockchain technique was also employed to ensure the authenticity of perceptual data and eliminate the influence of human intervention. 12
In the traditional blockchain technique, a new transaction data block needs 10 min to be added to the blockchain, 11 which is acceptable in financial transactions. However, in CPPS, 10 min time consumption cannot be tolerated for real-time response requirements. 13 Therefore, a new mechanism to achieve the real-time and trustworthiness requirements in CPPS should be studied. This article proposes a novel private data block acquisition method. The M/M/1/k queuing model and on-demand data transmission routing algorithm are presented to realize the quick construction of blockchain to achieve the real-time and trustworthiness requirements of CPPS.
The remainder of this article is organized as follows: section “Blockchain Technology and Data Trustworthy Mechanism” briefly introduces blockchain technique. In section “Data blockchain in CPPS,” the private data block trustworthy acquisition method in CPPS is established, and the M/M/1/k mixed queuing model and on-demand data-driven routing algorithm are also proposed and discussed. Section “Experiments and performance evaluation” presents the experimental results of our algorithm under different IEEE bus system scenarios, and the efficiency and extendibility of the algorithm are also evaluated, compared with two benchmark algorithms. We conclude this article in section “Conclusion.”
Blockchain technology and data trustworthy mechanism
The framework of blockchain
Blockchain is a new decentralized infrastructure and data distributed computing and management model. It had been successfully used to transact and record digital currencies such as Bitcoin and DASH. 14 Its characteristics of decentralization, transparency, non-tamperability, and traceability had been proven. The architecture of blockchain, as shown in Figure 1, consists of the data layer, network layer, consensus layer, excitation layer, intelligent contract layer, and application layer. 11 From the bottom to top, the data layer generates data block, operates encryption method, and adds timestamp to data block. The network layer manages the block exchange network as a typical P2P network, in which there is no centralized node to dominate the network, and each node is equal and interconnected with a flat model. Every node can generate new data block, verify, and exchange them in the network. The middle three layers, the consensus layer, excitation layer, and smart contract layer, define the operation protocols to realize data block packaging and transmitting. The application layer defines various typical application scenarios and instances.

The framework of blockchain.
In the blockchain, a node obtains the rights to establish new blocks by executing the proof of work (POW), the proof of stake (POS), or the delegate proof of stake (DPOS). During the block generation process, the transaction data are stored in the block and broadcast to the whole network. When all network nodes have verified the data, the block is connected to the main chain, and the blockchain grows.
Data trustworthy mechanism in blockchain
The technologies to achieve data credibility, data encryption, digital signature, timestamping, and node verification are combined and used in blockchain. And the binary Merkle tree technique is adopted to guarantee the integrity of the transaction record.
The structure of binary Merkle tree is shown in Figure 2. Tri represents a transaction record. With multi-layer hashing, the Merkel root hash value U1234 can be counted and recorded in the block header. Because hash operation has the features of unidirectional calculation process and resultant randomness, the original data cannot be derived from the hash value in a finite period. An example is presented in Table 1. Even though there is only one bit difference between the two original electricity measuring data, after hash calculating, the results are totally different.

Hash calculation in Merkle tree.
Original data and hash value.
During the operation of data block transmission and authentication, the asymmetric encryption mechanism is used to guarantee the security and credibility, as shown in Figure 3.

Asymmetric cryptography of the blockchain.
Data blockchain in CPPS
As mentioned above, the centralized data acquisition architecture is too reliant on the central main server to ensure data reliability and credibility. In this article, based on the private blockchain technology, we propose a novel private data trustworthy acquisition method applied to CPPS. In the model, the queuing theory and on-demand driven routing algorithm are proposed to speed up the blockchain generation process and satisfy the CPPS observe and control demands.
Private data acquisition blockchain
In CPPS, each terminal has measuring and bidirectional communication functions, which can be defined as the data block generating node. The sensing units on CPPS terminal measure electrical parameters, such as feeder terminal unit (FTU)-captured interphase failure data and transformer terminal unit (TTU)-recorded device status. With encryption and packaging, these data are transmitted through P2P network for the purpose of mutual backup and certification. Figure 4 presented the detail of CPPS private blockchain architecture.

CPPS private blockchain architecture.
Data block structure
A data block consists of a block header and a block body, as a three-element combination

CPPS data block body.
Smart contract
Smart contract is the core component of blockchain v2.0. It is a time-driven or event-driven computer program, which implements various complex behaviors in the blockchain system to ensure each unit’s creditability.
In CPPS private blockchain architecture, the smart contract includes the registration contract and the data acquisition contract. The registration contract is based on an event-driven mechanism, and it will be triggered when a new sensor or CPPS terminal accesses the system. The key information such as CPPS terminal’s ID and access location is mapped to the unique identification in the blockchain system. This type of mapping will guarantee that the source of data acquisition is trustworthy.
Data acquisition contract is based on time-driven or event-driven mechanisms. In the time-driven mechanism, the period to generate new data blocks is set according to the CPPS data measuring cycle, such as power metering from each smart meters and switch and electrical device status reporting. The event-driven mechanism is triggered by system requirements, such as the commands for switching operations and interlock protection and transformers’ tap ratios adjusting information. Each smart contract contains the tolerance time Δt, the sensor number n, the data type TY, and the time scale δ. After the data packaging, the CPPS terminal uses its own private key to implement digital signatures and guarantee the integrity and credibility of the data during transmission. The processing from data measuring to the final connection to the blockchain is shown in Figure 6.

The process of the data blockchain generation.
In a complete blockchain generation process, broadcast is performed twice to the full network, shown as the red lines in Figure 6. With the network scale and structure becoming more and more complex, the time consumption of data block verification operation becomes longer. How to reduce the time consumption and satisfy the CPPS real-time control requirements is a hard problem to solve.
In this article, we used the mixed queuing theory and first-come, first-served (FCFS) mechanism to reduce the time consumption of data block generation in the CPPS terminal and proposed a new on-demand driven routing algorithm to reduce the delay during data block broadcast or point-to-point transmission.
Data block processing model in CPPS terminal based on the mixed queuing theory
Generally, data measuring and transmitting to one CPPS terminal is a random event. We present a queuing model and a lost packets retransmission mechanism to implement this process.
The arrival rate of data blocks can be expressed as a Poisson distribution, where the average rate is λ. The forwarding mode is according to the first-in, first-out (FIFO) process, where the transmission rate is μ according to the Exponential distribution. The cache capacity in each CPPS terminal is set to m. Then, a M/M/1/k mixed queuing model can be established to express the data processing in CPPS terminal. Packet loss rate Ploss and delay time Tdelay can be calculated as follows 15
where ρ is the traffic intensity.
The point-to-point delay includes the queue handling, transmission latency, and retransmission time. If a data block is sent from source s to the destination d during k hops relay, the transmission delay Ts-d can be counted as
where Tnode represents the node latency and Tbase represents the latency in transmitting link, Li represents the length of the ith link on the transmission path, v represents the transmission speed, and
According to the blockchain generation rule, a terminal with Min{Max(Ts1−i, Ts2−i, …, Tsn−i)} is selected as the one to generate data blocks and broadcast them to the whole network. It can effectively reduce the time consumption during data block validation operation.
Data block on-demand driven routing algorithm
In the traditional model, a new transaction data block spends 10 min to connect to the blockchain, which is acceptable in the transaction account application. However, in CPPS, 10 min time consumption cannot be tolerated by real-time response requirements, such as faults alarm and removal. While shortening the time consumption of consensus mechanism, a low latency routing algorithm is necessary to satisfy the CPPS real-time demands. Moreover, data loss or retransmission problem caused by the transmission overload should also be considered. This article proposes an on-demand routing algorithm to solve these problems in CPPS private blockchain. On the premise of meeting the delay requirements of data transmission, a mathematical model of on-demand-driven routing is established, in which the load balancing is set as the objective function.
The formula for calculating load balance in a P2P network is as follows
where RBi is the remaining bandwidth of transmission path, i ∈ 1, n, and
Therefore, the on-demand driven routing model is as follows
The first constraint conditions (Ts_d ≤ Delaybr) means that the transmission delay is less than the CPPS delay requirements. RBi > 0 means there are enough residual bandwidth to transmit traffic; Hops_d ≤ Hopbr means the hops of routing path have an upper bound; the last constraint condition represents data flow conservation.
This article uses the greedy algorithm to select the optimal transmission path with on-demand driven routing. The algorithm flow is as follows:
Data validation based on data feature values
Since electrical data have periodicity, seasonality, and self-similar properties, this article proposes a new data verification method based on the data feature values. The method only contrasts the key feature values, instead of bit-by-bit contrasting data itself. As a result, the time consumption of the data block validation operation can be further reduced. The data verification method is as follows:
Step 1. Based on the blockchain historical datasets, build the CPPS dataset {L} and the dataset {V1, V2, …, Vm} with m potential correlation factor. These potential correlation factors reflect the periodicity, seasonality and self-similar properties.
Step 2. Calculate the correlation coefficient h with equation (5) to obtain the correlation between the potential correlation factors and CPPS datasets
Step 3. Solve the support vector machine model by the historical training sample data {(xi, yi), i = 1, 2, …, xi ∈ Rn, yi ∈ R)}
where
where K(xi, x) is the kernel function.
Step 4. Calculate the predicted value Vforecast based on predictive model f (x) and use equation (8) to verify the similarity between forecasted value and real-time value to determine the reliability of the data
Experiments and performance evaluation
In the experiments, the demand strategy of the CPPS includes non-real-time data of electricity transactions and the real-time data measurement from the wide area measurement system (WAMS). The electricity transaction data include user power consumption data from smart meter and electricity price transaction data. The transaction data are normally 15 min in one time frame and there are 96 points in 1 day. 6 However, as the WAMS measurement data are used in steady-state analysis, power flow calculation, state estimation, and real-time system stable control, different types of data have different timeliness requirements. For example, power grid operation protection and stable control require the transmission latency to be less than 50 ms. 17 In the experiment, different scales of electric power systems are employed to evaluate the algorithm’s extendibility, which includes IEEE 14, 30, 39, 57, and 118 bus systems. The QoS-R and RA-DBMM algorithm presented in Wang et al. 18 and Wang et al. 19 are used as benchmark.
Simulation of IEEE 39 standard bus system
In the first experiment, IEEE 39 bus system is used to verify the feasibility and validity of the proposed CPPS private data block acquisition method, as shown in Figure 7.

IEEE 39 bus system.
The CPPS terminals and P2P network is set following the rules: (1) the autonomous CPPS terminals are laid out according to the power physical system architecture; only one terminal is set in the same geographical position. (2) According to the electrical connection of power physical system structure, the CPPS terminals interconnect to form a P2P network. Figure 8 presents the established CPPS information system of IEEE 39 Bus.

P2P network topology structure matching IEEE 39 bus system.
The state of generators, transformers, and the line power flows is necessary for system stable control operation. In Figure 8, the CPPS terminals 1, 13, and 17 are set to measure the state of generators and transformers, and the data quantity is 4, 9, and 6 MB in one sampling period, respectively. Terminals 5, 8, and 15 measure the data of line power flows, and data quantity is 8, 14, and 12 MB in one sampling period, respectively. Following the data trustworthy acquisition mechanism and block on-demand driven routing (QT-DR) algorithm, the data blockchain generation time consumption and P2P network links’ utilization are calculated in Figures 9 and 10 and compared with two benchmark algorithms.

Data block generation time consumption.

Link utilization with different algorithms.
In Figure 9, the experimental results showed that the blockchain generation time consumption based on queuing theory and on-demand routing algorithm is shorter than that of QoS-R and RA-DBMM algorithms. That is because the queuing strategy saves the time during the data processing in the CPPS terminal, and QT-DR selects optimal transmission paths to reduce the latency during data blocks transmission in the P2P network. The network load balancing also avoids the congestion and packet loss retransmission. The experimental results in Figure 10 also demonstrate that the network links utilization configured by QT-DR is more balanced, which is beneficial for effectively avoiding network congestion and packet loss.
Algorithm’s extendibility evaluation
We use the different scales IEEE standard examples, IEEE 14/30/39/57/118, to evaluate the proposed algorithm’s extendibility. The CPPS terminals’ setting position and the quantity of data block 20 are listed in Table 2.
CPPS terminals setting and quantity of data block.
CPPS: cyber physical power system.
Figure 11 and Table 3 present the blockchain generation time consumption and network load balancing in five different scales of IEEE bus systems. The experimental results show that no matter whether in small-scale IEEE 14-bus system or large-scale IEEE 118-bus system, QT-DR achieved a low time consumption and good network load balance performance, compared with two benchmark algorithms. Here, we focused on the analysis of large complex grid scenario, and each link’s utilization in the IEEE 118 bus system scenario is presented in Figure 12. Configured by the proposed QT-DR, the load balance ratio of P2P network in CPPS is reduced 39.43% compared to that of QoS-R and 29.73% compared to that of RA-DBMM. It is clear that the proposed algorithm in this article can achieve better CPPS blockchain exchange performance.

Data block generation time consumption with different IEEE bus systems.
Load balance analysis with different scales power systems.

CPPS transmission link utilization based on IEEE 118 bus system.
Conclusion
In this article, a method of data trustworthy acquisition based on blockchain technology for CPPS is proposed. The decentralized private data acquisition blockchain can realize data trustworthiness and regional autonomy. Based on M/M/1/k mixed queuing model and on-demand data transmission routing algorithm, the disadvantage of long time consumption in traditional blockchain is effectively avoided. Using different scales of IEEE standard examples, the proposed algorithms have short blockchain construction time and achieve better CPPS data block exchange performance.
In the future, we will further study the security check method of the CPPS privatized data block and the shared data mining technology based on the private blockchain.
Footnotes
Handling Editor: Ali Ehsan
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This paper was supported by the National Key Research and Development Program of China (2018YFB0905000); National Natural Science Foundation of China (61571324); Natural Science Foundation of Tianjin (16JCZDJC30900); and National Program of International S&T Cooperation (2013DFA11040).
