Distributed power source collaborative frequency control method and device based on blockchain trusted encryption
By constructing a distributed power source collaborative frequency control method through a blockchain trusted encryption mechanism, the problem of rapid response and multi-node collaborative control of distributed power sources in the power grid is solved, achieving a balance between data security and system stability, and improving the safe and stable operation in large-scale distributed power source access scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NINGBO TRANSMISSION & DISTRIBUTION CONSTR
- Filing Date
- 2026-03-24
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies are insufficient to effectively address the needs of distributed power sources for rapid response and multi-node collaborative control in power grids. In particular, in large-scale access scenarios, single-point failures, frequency fluctuations, and insecure communication data are prone to occur, and there is a lack of complete protection for data security and system performance during the control process.
A blockchain-based trusted encryption mechanism is constructed. Through a distributed power source and load model, a blockchain communication layer, and a control decision layer, trusted interaction and collaborative control of distributed power sources are realized. Cryptographic signatures, consensus mechanisms, and smart contracts are used to ensure data authenticity and system stability. A communication latency tolerance mechanism and control law are designed to ensure real-time response.
It has achieved safe and stable operation of distributed power systems, ensured data immutability and traceability through blockchain technology, improved the real-time performance and anti-attack capabilities of the control system, and enhanced the execution efficiency and system transparency of collaborative control.
Smart Images

Figure CN122437263A_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of power technology, and in particular to a distributed power source collaborative frequency control method based on blockchain trusted encryption. Background Technology
[0002] With the rapid integration of distributed energy sources such as photovoltaics, wind power, and energy storage, the proportion of distributed power sources in the power grid continues to increase, posing significant challenges to the grid's active power dispatch and frequency control. Distributed power sources are characterized by numerous nodes, decentralized control, and incomplete controllability, making it difficult for traditional centralized dispatching methods to meet their needs for rapid response and multi-node coordination. Especially in large-scale integration scenarios, single-point failures, frequency fluctuations, and insecure communication data are prone to occur, seriously affecting the safe and stable operation of the power grid.
[0003] Existing research largely focuses on optimizing energy dispatch and ensuring reliable data storage, such as blockchain-based energy trading and data management. While these approaches address some data security and transaction reliability issues, they fall short in guaranteeing the real-time performance and system stability of distributed power source active power collaborative control, and lack a comprehensive solution for simultaneously ensuring data security and system performance during the control process. Furthermore, the security and latency issues of communication networks significantly impact the effectiveness of collaborative control and system security; malicious attacks and data tampering can lead to control decision failures or even power grid accidents.
[0004] Blockchain technology, with its decentralized, immutable, and traceable characteristics, offers a new approach to the collaborative control of distributed power sources. Utilizing blockchain's encryption mechanisms and smart contracts, trusted communication of distributed control data and automatic execution of control strategies can be achieved. However, existing solutions mostly remain at the theoretical stage or in small-scale simulations, lacking a comprehensive control framework suitable for large-scale distributed power systems.
[0005] Therefore, a better solution is urgently needed. Summary of the Invention
[0006] In view of this, embodiments of this specification provide a distributed power supply cooperative frequency control method based on blockchain trusted encryption. One or more embodiments of this specification also relate to a distributed power supply cooperative frequency control device based on blockchain trusted encryption, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.
[0007] According to a first aspect of the embodiments of this specification, a distributed power supply cooperative frequency control method based on blockchain trusted encryption is provided, comprising: Construct a distributed power source and load model, and establish a local primary control system based on droop control and a secondary collaborative control system based on blockchain communication; A trusted interaction mechanism for blockchain is established, in which control commands and status information of distributed power sources are encrypted, signed, and stored on the blockchain. The immutability and consensus mechanism of blockchain ensure the authenticity, integrity, and traceability of communication data. A distributed control law integrating blockchain verification is determined, on-chain data verification is used to ensure the credibility of neighbor node information, and a communication latency tolerance mechanism is designed to ensure the real-time response and stable convergence of the control system. Automatic verification and execution of control commands: The system integrates smart contracts to achieve automatic verification and execution of control commands, and uses sentinel nodes to monitor the system status and trigger off-chain automatic task responses to anomalies.
[0008] In one possible implementation, the trusted interaction mechanism of the blockchain includes: each distributed power node cryptographically signs the data before sending control information, and the cryptographic signature is based on the elliptic curve digital signature algorithm and the SHA-256 hash lightweight trusted encryption mechanism; the chain hash structure ensures that the data is immutable, the node reads and verifies the state variables of the neighboring nodes from the blockchain, and participates in the control calculation only after verifying the legality of the signature and the validity of the timestamp.
[0009] In one possible implementation, in a distributed control law that integrates blockchain verification, neighbor data undergoes trusted verification before entering the control loop to prevent false data from interfering with system consensus. The fault tolerance and latency strategies adopted include: the blockchain verification and write latency is less than the maximum acceptable communication latency of the control system, and the system convergence satisfies the consistency step size constraint.
[0010] In one possible implementation, the automatic verification and execution of control instructions includes: a smart contract deployed on the blockchain is responsible for verifying the legality of signatures, permissions, and parameters; sentinel nodes monitor the system's operating status in real time and detect abnormal events, triggering off-chain automatic task programs; the off-chain automatic task constructs a transaction request based on the monitoring information and sends the transaction to the blockchain through a relay; the energy contract receives and verifies the transaction and then automatically executes the control logic.
[0011] In one possible implementation, constructing a distributed power source and load model includes: establishing the system's energy balance constraints and frequency dynamic balance relationship; using droop control to implement primary control, automatically adjusting power output according to frequency deviation; introducing a frequency recovery term and a power correction amount based on neighbor consistency term at the secondary control level, and merging primary and secondary control to obtain the final control command for each distributed power source.
[0012] In one possible implementation, the system consists of three layers: an energy physical layer, which includes distributed power sources and loads, as well as local primary control of each power source; a blockchain communication layer, which enables information exchange through a peer-to-peer network and is responsible for reliable data recording; and a control decision layer, which performs active power scheduling and optimization decisions based on data on the blockchain.
[0013] In one possible implementation, the convergence and stability of the system are measured by: using a consistent step size to satisfy the constraint of the maximum eigenvalue of the network's Laplace matrix; and using power variance to represent the dispersion of the output power of each distributed source to measure the consistency of the system output.
[0014] According to a second aspect of the embodiments of this specification, a distributed power supply cooperative frequency control device based on blockchain trusted encryption is provided, comprising: The model building module is configured to build a distributed power source and load model, and establish a local primary control system based on droop control and a secondary collaborative control system based on blockchain communication. The encrypted storage module is configured to establish a trusted blockchain interaction mechanism, encrypt and sign the control commands and status information of the distributed power source and store them on the blockchain, and ensure the authenticity, integrity and traceability of the communication data through the immutability and consensus mechanism of the blockchain. The data verification module is configured to determine the distributed control law that integrates blockchain verification, use on-chain data verification to ensure the credibility of neighbor node information, and design a communication latency tolerance mechanism to ensure the real-time response and stable convergence of the control system. The instruction execution module is configured to automatically verify and execute control instructions. It integrates smart contracts to realize the automatic verification and execution of control instructions, and monitors the system status through sentinel nodes and triggers off-chain automatic task responses to anomalies.
[0015] According to a third aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the above-described distributed power supply cooperative frequency control method based on blockchain trusted encryption.
[0016] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-described distributed power supply cooperative frequency control method based on blockchain trusted encryption.
[0017] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described distributed power supply cooperative frequency control method based on blockchain trusted encryption.
[0018] This specification provides a distributed power source collaborative frequency control method and apparatus based on blockchain-based trusted encryption, comprising: First, constructing a distribution network topology model of distributed power sources and loads, establishing a primary frequency regulation mechanism based on droop control and a distributed secondary collaborative control framework based on blockchain communication, to achieve coordinated regulation of active power of multi-node distributed power sources. Second, designing a blockchain trusted interaction mechanism, achieving immutability and traceability of control data through encrypted signatures, consensus verification, and on-chain storage, ensuring the authenticity and security of information interaction between nodes. Further, proposing a distributed collaborative control law integrating blockchain verification, realizing the trusted acquisition of neighbor node states, effectively suppressing the impact of false data and communication attacks on system stability, and ensuring real-time requirements through a latency tolerance mechanism. Finally, introducing smart contracts to realize automatic verification and execution of control commands, improving the autonomy and reliability of the control process. Attached Figure Description
[0019] Figure 1 This is a flowchart of a distributed power supply cooperative frequency control method based on blockchain trusted encryption, provided in one embodiment of this specification; Figure 2 This is a schematic diagram of a distribution network topology for a distributed power source cooperative frequency control method based on blockchain trusted encryption, provided in one embodiment of this specification. Figure 3 This is an integrated schematic diagram of a smart contract for a distributed power supply collaborative frequency control method based on blockchain trusted encryption, provided in one embodiment of this specification. Figure 4 This is a schematic diagram illustrating the application of a distributed power source collaborative frequency control method based on blockchain trusted encryption in distribution network dispatching, as provided in one embodiment of this specification. Figure 5 This is a schematic diagram of a distribution network control structure for a distributed power source collaborative frequency control method based on blockchain trusted encryption, provided in one embodiment of this specification. Figure 6 This is a schematic diagram of the structure of a distributed power supply cooperative frequency control device based on blockchain trusted encryption, provided in one embodiment of this specification; Figure 7 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0020] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0021] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0022] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0023] This specification provides a distributed power supply cooperative frequency control method based on blockchain trusted encryption. This specification also relates to a distributed power supply cooperative frequency control device based on blockchain trusted encryption, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.
[0024] See Figure 1 , Figure 1 A flowchart is shown of a distributed power supply cooperative frequency control method based on blockchain trusted encryption according to an embodiment of this specification, which specifically includes the following steps.
[0025] Step 101: Construct a distributed power source and load model, and establish a local primary control system based on droop control and a secondary collaborative control system based on blockchain communication; Step 102: Determine the blockchain trusted interaction mechanism, encrypt and sign the control commands and status information of the distributed power source and store them on the blockchain, and ensure the authenticity, integrity and traceability of the communication data through the immutability and consensus mechanism of the blockchain; Step 103: Determine the distributed control law that integrates blockchain verification, use on-chain data verification to ensure the credibility of neighbor node information, and design a communication latency tolerance mechanism to ensure the real-time response and stable convergence of the control system; Step 104: Automatic verification and execution of control commands. Integrate smart contracts to realize the automatic verification and execution of control commands. Monitor the system status through sentinel nodes and trigger off-chain automatic task responses to anomalies.
[0026] Among them, the distributed generation and load model refers to a mathematical model used to describe the power balance relationship between multiple distributed generation sources and loads in a distribution network, as well as the dynamic changes in system frequency. For example, by constructing parameters such as the equivalent inertia constant, damping coefficient, and primary frequency regulation coefficient of each distributed generation source, the active power-frequency response characteristics of the system under different operating conditions can be simulated. Local primary control based on droop control refers to a fast response mechanism in which each distributed generation source automatically adjusts its active power output according to a preset droop characteristic curve based on the frequency deviation of its own node, used to suppress initial frequency fluctuations within milliseconds. The secondary collaborative control system based on blockchain communication refers to a slow adjustment framework that uses a blockchain network to realize the exchange of state information and the generation of collaborative control commands among distributed generation source nodes, used to eliminate steady-state frequency deviations caused by primary control and achieve reasonable power allocation.
[0027] A blockchain trusted interaction mechanism refers to a method that leverages the decentralized, encrypted, and consensus characteristics of blockchain to provide a trusted channel for the transmission of control commands and status information between distributed power nodes. This includes operations such as data encryption signing, on-chain storage, and consensus verification to ensure the security of the communication process and the immutability of the data. Control commands and status information can refer to key data used for coordinated control, such as the active power setpoint, real-time frequency, and output power of each distributed power node. For example, this could be the active power command output by a single control cycle and the node's real-time frequency measurement. Encryption signing refers to the process of digitally signing data using an asymmetric encryption algorithm to verify the data's origin and integrity. For example, a node signs a message packet using its private key, and other nodes verify it using their corresponding public key. On-chain storage refers to recording encrypted and signed data into the blockchain's distributed ledger, using a chained hash structure to ensure that the data cannot be tampered with once written. A consensus mechanism refers to an algorithm in the blockchain network where all nodes reach a consensus on the validity of the data, ensuring the consistency and authenticity of the data across the entire network.
[0028] Distributed control laws integrating blockchain verification can refer to a novel type of control law that embeds a blockchain data verification step into a distributed consensus algorithm. This ensures the authenticity and trustworthiness of neighboring data before control computation begins, preventing false or tampered data from contaminating the control process. On-chain data verification refers to the process by which a control node, after reading data from neighboring nodes on the blockchain, verifies the data's legitimacy by checking metadata such as digital signatures and timestamps. Communication latency tolerance mechanisms can refer to control strategies designed to address the additional latency introduced by blockchain verification and writing processes. For example, setting an acceptable maximum communication latency threshold allows the system to function normally when the actual latency is less than this threshold, ensuring the real-time responsiveness of the control system.
[0029] Automatic verification and execution of control commands refers to the process of automatically verifying the legality of control commands, confirming permissions, and issuing execution without human intervention, using smart contract programs deployed on the blockchain. Smart contracts can be automatically executed program logic running on the blockchain, used to automatically complete transactions or control interactions based on preset conditions and rules. Sentinel nodes can be monitoring programs running independently outside the blockchain network, used to monitor the system's operational status in real time and detect abnormal events. Off-chain automated tasks can be background service programs running independently of the blockchain main chain, used to respond to abnormal events triggered by sentinel nodes and construct corresponding control transactions to send to the blockchain.
[0030] The present application will be further described below through a detailed embodiment: One embodiment of the distributed power source collaborative frequency control method based on blockchain trusted encryption in this application is applied to a distribution network of an industrial park containing multiple photovoltaic power plants, wind farms, and energy storage systems. This distribution network is connected to the main power grid through a point of common coupling, and there are six distributed power source nodes within the park, which communicate with each other via a point-to-point network.
[0031] First, a distributed power source and load model is constructed. Based on the physical parameters and load distribution of each distributed power source within the park, system engineers establish equivalent models for each node in the control system. These models include the equivalent inertia constant and damping coefficient of each photovoltaic inverter, the droop control coefficient of the energy storage system, and the power demand model of the load nodes. Simultaneously, droop control parameters are configured in the local controller of each distributed power source to achieve primary frequency regulation. Building upon this, a secondary collaborative control system based on blockchain communication is established. Each distributed power source node is registered on the blockchain network to obtain a unique digital identity and key pair, and the initial parameters of the collaborative control algorithm are configured.
[0032] Secondly, a trusted interaction mechanism for the blockchain is designed. Within each control cycle, each distributed power node collects locally gathered status information and control commands, including the current moment's control output active power command, the node's real-time frequency, and active power measurements, and performs elliptic curve digital signatures using its private key. The signed message packet is packaged into a transaction and broadcast to the blockchain network. Consensus nodes in the blockchain network verify the transaction, including signature validity checks and timestamp validity checks. Once verified, the transaction is packaged into a new block and stored on the blockchain. Before performing collaborative control calculations, other nodes read data published by neighboring nodes from the blockchain and verify the data's authenticity and integrity through a verification function. For example, when node two reads data from node one, it first calls the verification function to check the validity of node one's digital signature; only after confirming its validity does it use the data for subsequent calculations.
[0033] Furthermore, a distributed control law integrating blockchain verification is proposed. Taking node three as an example, its collaborative control law implementation process is as follows: This node obtains verified trusted state data from neighboring nodes (node two and node four) on the blockchain, including the frequency deviation and output power of the neighboring nodes. Node three compares its own state variables with these trusted neighbor state variables, and calculates its own secondary power adjustment amount according to the preset consensus algorithm step size and power adjustment coefficient. This adjustment amount is used to correct the setpoint of the local primary control and is issued as the final control command. If, during the data reading process, it is found that the data verification of a neighboring node fails, such as an invalid signature or an expired timestamp, node three will automatically block the neighbor's data and use only other trusted neighbor data for calculation, or temporarily keep its own control amount unchanged until the neighboring node republishes valid data. At the same time, the system monitors the latency generated by the blockchain verification and writing process in real time and compares it with the preset maximum allowable communication latency to ensure that the response speed of the control system is within an acceptable range.
[0034] Finally, automatic verification and execution of control commands are performed. The system deploys an energy smart contract on the blockchain, which defines the format specifications of control commands, the list of node permissions, and execution conditions. When a distributed power node needs to issue a control command, it constructs a transaction to invoke the smart contract. Upon receiving the transaction, the smart contract first verifies whether the sender's identity is on the authorized node list, and then checks whether the command parameters are within a reasonable range. After successful verification, the smart contract automatically executes the preset control logic, such as updating the global power allocation target or triggering a coordinated adjustment process. Simultaneously, sentinel nodes continuously monitor the operating status and communication status of each distributed power source. When a sentinel node detects that a node's data is abnormal for an extended period due to communication interruption or malicious attack, it immediately triggers an off-chain automatic task program. This automatic task program constructs an emergency control transaction based on a preset fault handling strategy and sends it to the blockchain via a repeater, invoking the smart contract to perform emergency operations such as isolating the faulty node or switching the control mode, ensuring the safe and stable operation of the entire system.
[0035] The beneficial effects of one of the embodiments in this specification include at least the following: by integrating the cryptographic signature, chained storage, and consensus verification mechanisms of blockchain, a trusted system for the entire process from data collection and transmission to use is constructed, solving the problems of data being easily forged and node identity being difficult to verify in traditional distributed control; by designing a distributed control law with embedded blockchain verification, convergence performance and dynamic characteristics equivalent to traditional secondary control are maintained while ensuring data security, achieving a balance between security and performance; by introducing a smart contract and sentinel node linkage mechanism, automated verification and execution of control commands and rapid handling of abnormal situations are achieved, significantly improving the execution efficiency and system transparency of collaborative control, and providing a highly reliable solution for the safe and stable operation of large-scale distributed power access scenarios.
[0036] In the aforementioned distributed power supply cooperative frequency control method based on blockchain trusted encryption, the design of the blockchain trusted interaction mechanism includes: Each distributed power node encrypts and signs the data before sending control information. The encryption signature is based on the elliptic curve digital signature algorithm and the SHA-256 hash lightweight and trusted encryption mechanism. The chain hash structure ensures that the data is immutable. The node reads and verifies the state variables of its neighbors from the blockchain and only participates in the control calculation after verifying the legality of the signature and the validity of the timestamp.
[0037] Cryptographic signature refers to the process by which a node uses its private key to digitally sign control information, ensuring the authenticity of the data source and the integrity of its content. For example, a node performs a hash operation on a message packet containing power instructions and frequency data, and then uses its private key to encrypt the hash value to generate a signature. Elliptic curve digital signature algorithms are digital signature algorithms based on elliptic curve cryptography, characterized by short keys and high computational efficiency, suitable for lightweight security encryption needs of resource-constrained devices such as distributed power nodes. SHA-256 hashing is a secure hash algorithm used to map input data of arbitrary length to a fixed-length hash value. As input to a digital signature, it ensures that even small changes to the data will result in a significant change in the hash value.
[0038] A chained hash structure refers to a data organization method in a blockchain where blocks are linked by hash values. Each block contains the hash value of the previous block, and modification of any block will cause changes in the hash values of all subsequent blocks, thus ensuring the immutability of historical data. State variables refer to key parameters describing the operating state of a distributed power source, such as the real-time frequency of a node, active power output, and a single control command. Verifying signature validity and timestamp validity involves a node decrypting and comparing the digital signature using the neighbor's public key after reading data from the blockchain, while simultaneously checking whether the timestamp attached to the data is within an acceptable window period to confirm the authenticity of the data source and the timeliness of the data.
[0039] The present application will be further described below through a detailed embodiment: Based on the aforementioned construction of a distributed power source and load model and the establishment of a secondary collaborative control system, this embodiment further details the implementation process of the blockchain trusted interaction mechanism.
[0040] During the system initialization phase, when each distributed power node registers in the blockchain network, the Certificate Authority generates a pair of elliptic curve keys for it, including a private key for signing and a public key for verification. Simultaneously, a unique digital identity is assigned to each node, which is bound to the public key and recorded in the blockchain's genesis block.
[0041] At the start of each control cycle, taking Node 5 as an example, its local controller collects the current frequency measurement and a control active power output command. Node 5 constructs a message packet containing a node identifier, timestamp, active power command, real-time frequency value, and a sequence number for replay protection. Node 5 uses its private key to sign the SHA-256 hash value of the message packet using the elliptic curve digital signature algorithm, generating a digital signature containing components r and s. Subsequently, Node 5 packages the original message packet, digital signature, and its public key certificate into a transaction and broadcasts it to the blockchain network via a peer-to-peer network.
[0042] Upon receiving the transaction, the consensus node in the blockchain network first verifies the correctness of the transaction format. Then, the consensus node decrypts the digital signature using node five's public key, obtaining the original hash value, and compares it with the SHA-256 hash value calculated from the message packet itself. If they match, it proves that the message was indeed signed by node five's private key and its content has not been tampered with. The consensus node also checks whether the timestamp in the message packet is within a preset time window, such as five minutes before or after the current time, to prevent replay attacks. After successful verification, the transaction is packaged into a new block and synchronized to all nodes in the network through the consensus mechanism. The header of this block contains the hash value of the previous block, forming a chain structure.
[0043] When Node 2 needs to read Node 5's state information for collaborative control calculations, Node 2 first retrieves the latest transaction record published by Node 5 from its locally stored blockchain ledger. Node 2 calls the verification function to extract Node 5's message packet and digital signature from the transaction, and verifies the signature using Node 5's public key. Simultaneously, Node 2 checks the integrity of the hash chain of the transaction in the block to ensure the data has not been tampered with. Only when the signature verification passes and the timestamp is valid will Node 2 mark Node 5's state variables as "trusted" and extract the active power command and frequency value for subsequent distributed control law calculations. If verification fails, Node 2 discards the data, records the verification failure event in the log, and continues to wait for Node 5's next valid data cycle.
[0044] The beneficial effects of one of the embodiments in this specification include at least the following: by employing a lightweight encryption mechanism combining elliptic curve digital signature algorithm and SHA-256 hash, the authenticity of the data source and the integrity of the content are guaranteed, while effectively reducing the consumption of distributed power node computing resources by encryption calculation, making it suitable for resource-constrained field equipment; the chain hash structure ensures the immutability and traceability of historical control data, providing a reliable basis for post-event auditing and fault analysis; by forcing the signature and timestamp verification of neighbor node data before control calculation, the traditional "assuming neighbor is trustworthy" mode is transformed into a "verifying neighbor is trustworthy" mode, fundamentally eliminating the impact of malicious node forgery of data and replay attacks on the collaborative control process.
[0045] In the aforementioned distributed power supply collaborative frequency control method based on blockchain trusted encryption, in the distributed control law that integrates blockchain verification, neighbor data undergoes trusted verification before entering the control loop to prevent false data from interfering with system consensus; the fault tolerance and latency strategies adopted include: the blockchain verification and writing latency is less than the maximum acceptable communication latency of the control system, and the system convergence satisfies the consistency step size constraint condition.
[0046] Neighbor data refers to the state information published by neighboring nodes that have communication connections and cooperative control relationships with the current distributed power node, such as the frequency deviation and output power values of neighboring nodes. System consensus refers to the process by which all nodes in the distributed power network reach a consistent state in output power and frequency recovery through a cooperative control algorithm. Fault tolerance and latency strategies refer to control strategies designed to cope with the additional latency and possible node data anomalies introduced by the blockchain communication process, used to ensure the stability and real-time performance of the control system under non-ideal communication conditions. Blockchain verification and write latency refers to the total time from when a node initiates a data upload request to when the data is confirmed by the blockchain network and made available for other nodes to read, including the time spent on signing, broadcasting, consensus confirmation, and writing to the ledger. The maximum acceptable communication latency of the control system refers to a time threshold set according to the system's dynamic response requirements. When the actual communication latency is less than this threshold, the real-time requirements of the control system are considered to be met. Consistency step size constraint refers to the mathematical constraint imposed on the relationship between the iteration step size and network topology parameters in the algorithm to ensure the stable convergence of the distributed consensus algorithm. For example, the step size must be less than the reciprocal of the largest eigenvalue of the network's Laplace matrix.
[0047] The present application will be further described below through a detailed embodiment: Building upon the aforementioned trusted interaction mechanism, this embodiment further details the specific implementation of the distributed control law integrating blockchain verification, as well as the configuration methods for fault tolerance and latency strategies.
[0048] In this embodiment, distributed power nodes one through six form a ring communication topology. Before performing cooperative control law calculations, each node reads the trusted state data of its neighboring nodes from the blockchain. Taking node four as an example, its control law calculation process is as follows: Node four first obtains verified trusted data from its neighbors, nodes three and five, from the blockchain ledger, including the nodes' frequency deviation and output power values. Node four compares its current frequency deviation value with the frequency deviation values of its neighbors, calculates the sum of the differences, multiplies it by a preset consensus algorithm step size, and obtains the correction amount for the frequency recovery term. Simultaneously, node four compares its own output power with the output power of its neighbors, calculates the sum of the differences, multiplies it by the power consistency control gain, and obtains the correction amount for the power coordination term. Node four adds these two correction amounts to obtain the active power adjustment amount at the secondary control level, and then generates the final control command. Throughout the calculation process, the neighbor data used by node four all come from "trusted" data verified by the blockchain. Any unverified or failed-verification data will not enter the control law calculation stage, thereby preventing false data from interfering with node four's control decisions.
[0049] In this embodiment, the system engineer configured fault tolerance and latency strategies based on the dynamic response requirements of the park's power distribution network. First, the average verification and write latency of the blockchain network under normal operating conditions was obtained through actual testing. For example, tests showed that the average time from the issuance of a data upload request to the readability of the data was 200 milliseconds. Considering the real-time requirements of the system's frequency control, the maximum acceptable communication latency for the control system was set to 500 milliseconds. When the blockchain network is operating normally and the actual latency is less than 500 milliseconds, the system uses a standard distributed control law that integrates blockchain verification for collaborative control. If network congestion or node failure causes the latency to exceed 500 milliseconds, the sentinel node will trigger an alarm, and the system will automatically switch to a degraded operating mode, such as temporarily relaxing verification requirements or extending the control cycle, to ensure the continuous operation of the system's basic functions.
[0050] Meanwhile, to ensure the stable convergence of the collaborative control system, the system engineers configured the step size of the consensus algorithm. Based on the ring network topology consisting of six distributed power nodes, the Laplace matrix of the network and its largest eigenvalue were calculated. Based on this largest eigenvalue, a step size value satisfying the constraints was selected according to the consensus convergence condition. For example, after determining the upper limit of the step size through theoretical calculations, a safe value smaller than this upper limit was selected as the algorithm step size and configured into the control law parameters of each node, ensuring that, under reliable communication link conditions, the output power of each node can converge to a consistent distribution state.
[0051] The beneficial effects of one of the embodiments in this specification include at least the following: by forcing neighbor data to be verified by blockchain in the control law, the influence of malicious nodes and false data on the collaborative control process is effectively isolated, and the anti-attack capability of the control system is improved; by designing fault-tolerant and delay strategies, the delay of the blockchain communication link is matched with the real-time requirements of the control system, ensuring the availability of the system under non-ideal communication conditions; by configuring algorithm parameters according to the consistency step size constraint, the theoretical convergence and dynamic stability of the collaborative control system are guaranteed, and the organic unity of secure communication and stable control is achieved.
[0052] In the aforementioned distributed power supply cooperative frequency control method based on blockchain trusted encryption, the automatic verification and execution of control commands include: Smart contracts are deployed on the blockchain and are responsible for verifying the legality of signatures, permissions, and parameters. Sentinel nodes monitor the system's operating status in real time and detect abnormal events, triggering off-chain automatic task programs. Off-chain automatic tasks construct transaction requests based on monitoring information and send the transactions to the blockchain through relays. Energy contracts receive and verify the transactions and then automatically execute control logic.
[0053] Smart contracts can refer to pre-deployed automated protocols defined in code on the blockchain, which can automatically execute corresponding operations when preset conditions are met, such as verifying the identity of the transaction sender, checking the value range of instruction parameters, and updating global state variables. Verifying signature, authorization, and parameter legality refers to a series of checks performed by the smart contract on the transaction that triggered the contract before execution, including confirming whether the identity corresponding to the transaction signature has the calling authority and whether the control instruction parameters carried by the transaction are within the preset security range. Sentinel nodes can refer to one or more monitoring programs running independently outside the blockchain network, used to monitor the operating status of the distributed power system in real time, such as the frequency, power, and communication status of each node, and to detect abnormal events. Off-chain automated task programs can refer to background services running independently of the blockchain main chain, capable of constructing corresponding control transactions according to preset logic based on the abnormal information reported by the sentinel nodes. Repeaters can refer to intermediate components connecting off-chain automated task programs and the blockchain network, responsible for submitting the constructed transactions to the blockchain network in a standard format. Energy contracts can refer to a specific type of smart contract specifically designed to handle business logic related to the coordinated control of distributed power sources, such as power allocation, mode switching, and fault isolation.
[0054] The present application will be further described below through a detailed embodiment: Based on the aforementioned establishment of a trusted interaction mechanism and distributed control law, this embodiment further details the implementation method of automatic verification and execution of control commands.
[0055] During the system initialization phase, the developers deployed an energy smart contract on the blockchain. This contract contains information such as a list of node identity permissions, the rated power parameters of each distributed power source, and the allowable frequency deviation range. It also defines several functions that can be called externally, such as functions for updating power commands and functions for switching control modes.
[0056] When distributed power node 2 needs to perform a new power adjustment, its local controller generates a control command containing the target power value and adjustment rate. Node 2 constructs a transaction invoking the energy contract, which carries Node 2's digital signature and the control command parameters. After the transaction is broadcast to the blockchain network, the energy contract is automatically triggered for execution. The contract first calls the signature verification function to confirm that the identity of the transaction sender matches Node 2's registered identity. Then, the contract checks whether Node 2 has the authority to issue power commands, for example, by querying the permission list to confirm whether Node 2 is authorized in the current mode. Finally, the contract checks the control command parameters, such as whether the target power value exceeds Node 2's rated capacity and whether the adjustment rate is within a safe range. After all verifications are successful, the contract updates the system's global state recorded on the blockchain and marks the control command as effective.
[0057] Meanwhile, sentinel nodes continuously sample the operational data of each distributed power node at high frequency. Running on a dedicated server, the sentinel nodes perform dual monitoring of the system status by reading data from the blockchain ledger and directly collecting real-time information from field devices. When a sentinel node detects a sudden interruption in the communication connection of node three, and this interruption continues for an extended period exceeding the set timeout threshold, it is classified as a communication anomaly. The sentinel node immediately sends this anomaly event, along with the time of occurrence, node identifier, and anomaly type, to an off-chain automated task program via a secure interface.
[0058] Upon receiving an anomaly message, the off-chain automated task program automatically constructs an emergency control transaction based on a pre-defined fault handling strategy, such as "initiating the automatic isolation process for any node when communication is interrupted for more than 5 seconds." This transaction includes a request to invoke the "isolate node" function in the energy contract, as well as the identifier of the node to be isolated. The automated task program then submits the constructed transaction to the blockchain network via a relay.
[0059] The repeater, acting as a gateway service, is responsible for formatting transactions and injecting them into the blockchain network's transaction pool. Upon receiving this emergency control transaction, the energy contract performs signature verification and permission checks again to confirm that the transaction was issued by an authorized off-chain automated task program. After successful verification, the contract automatically executes the logic for "isolieving node three," such as removing node three from the collaborative control queue, notifying other nodes to adjust the power allocation scheme, and logging the isolation operation. The entire process from anomaly detection to isolation execution is completed automatically within seconds, requiring no manual intervention.
[0060] The beneficial effects of one of the embodiments in this specification include at least the following: by deploying the verification logic of control commands in smart contracts, the verification process is automated, transparent, and tamper-proof, eliminating errors and delays that may be caused by manual intervention; through the linkage mechanism between sentinel nodes and off-chain automatic tasks, real-time perception and rapid response to abnormal system states are achieved, effectively compensating for the limitations of the blockchain main chain in processing speed; and by seamlessly connecting off-chain tasks with on-chain contracts through repeaters, a highly efficient and collaborative closed-loop control system is constructed, significantly improving the automation level and fault handling efficiency of distributed power supply collaborative control.
[0061] In the aforementioned distributed power source coordinated frequency control method based on blockchain trusted encryption, the construction of the distributed power source and load model includes: Establish the system's energy balance constraints and frequency dynamic balance relationship; adopt droop control to achieve primary control, and automatically adjust the power output according to the frequency deviation; introduce a frequency recovery term and a power correction amount based on the neighbor consistency term at the secondary control level, and obtain the final control command for each distributed power source after merging the primary control and secondary control.
[0062] Among them, energy balance constraint refers to the physical constraint that at any given moment, the sum of the active power output by all distributed power sources in the distribution network is equal to the sum of the active power consumed by all loads, and is used to describe the instantaneous power balance state of the system. Frequency dynamic balance relationship refers to the differential equation describing the relationship between the system frequency change and the active power imbalance, such as the product of the equivalent inertia constant and the rate of frequency change equaling the active power imbalance, and is used to characterize the inertial response characteristics of the system.
[0063] Droop control can refer to a control method that simulates the power-frequency-static characteristics of a synchronous generator. By setting a linear droop characteristic curve between active power and frequency, distributed power sources can automatically adjust their output when the system frequency changes, achieving automatic power sharing. Frequency deviation refers to the difference between the actual frequency of a node and its rated frequency, serving as the input signal for droop control. Primary control refers to the control level with the fastest response time, typically completed within a millisecond timescale, used to suppress initial frequency fluctuations, but it suffers from steady-state errors.
[0064] The frequency recovery term refers to the correction component in secondary control used to eliminate the residual steady-state frequency deviation after primary control, typically calculated based on the deviation between the global frequency reference value and the node frequency. The power correction based on the neighbor consistency term refers to the correction component in secondary control used to coordinate the power distribution among distributed power sources, comparing the output power differences between the node and its neighbors to bring the power output of each node closer to uniformity. Combining primary and secondary control refers to adding the fast response output of primary control to the slow correction output of secondary control to form the final active power command issued to the inverter.
[0065] The present application will be further described below through a detailed embodiment: Based on the aforementioned technical solutions, this embodiment further details the specific construction process of the distributed power source and load model.
[0066] The systems engineer first modeled a distribution network area comprising four photovoltaic power generation units, one energy storage system, and one wind farm. Based on the nameplate parameters and measured data of each device within the area, the equivalent inertia constant and damping coefficient of each distributed power source were determined. The system's energy balance constraint equations were established to describe the balance between the sum of the output power of each distributed power source and the total load power of the area at any given time. Simultaneously, the system's frequency dynamic balance equations were established, linking the frequency change rate of each node to the power imbalance.
[0067] At the primary control level, a droop controller is configured for each distributed power source. Taking a photovoltaic inverter as an example, its droop control coefficient is set, and a droop characteristic curve is defined between active power output and frequency deviation. When the system frequency drops, the droop controller detects the frequency deviation, automatically calculates the power increment, and increases the inverter's active power output to support the system frequency. Conversely, when the frequency rises, the output is decreased. This process is completed within milliseconds for rapid response to load disturbances, but after primary control is completed, the system frequency usually stabilizes at a new steady-state point deviating from the rated value.
[0068] At the secondary control level, system engineers designed a cooperative control algorithm. For each distributed power node, two correction terms are introduced. The first is a frequency recovery term, which multiplies the deviation of the node's frequency from the rated frequency by a frequency recovery gain coefficient to gradually eliminate the residual steady-state frequency deviation after the first control step. The second is a power consistency correction term, where the node obtains the verified output power values of its neighbors from the blockchain, calculates the weighted difference between its own power and its neighbors' power, and then multiplies it by the power consistency control gain to coordinate the power allocation among nodes, making the output power ratio of all distributed power sources tend to be consistent.
[0069] Ultimately, the control command for each distributed power node is composed of three parts: the base power output calculated by primary control based on the frequency deviation, the frequency recovery correction generated by secondary control, and the power consistency correction generated by secondary control. The combined final active power command is then sent to the inverter for execution. Through this hierarchical control structure, the system maintains the fast response capability of primary control, eliminates steady-state frequency deviation through secondary control, and simultaneously achieves coordinated power distribution among the distributed power sources.
[0070] The beneficial effects of one of the embodiments in this specification include at least the following: by establishing an energy balance and frequency dynamic model, an accurate mathematical description and theoretical basis for coordinated control are provided; by designing primary and secondary control in a hierarchical manner, the dual requirements of fast response and steady-state accuracy are taken into account, with primary control used to suppress instantaneous frequency fluctuations and secondary control used to eliminate steady-state errors and achieve power coordination; by merging the output of primary control with the frequency recovery term and power consistency correction term of secondary control to generate the final instruction, the unified optimization of system dynamic performance and steady-state performance is achieved, laying the model foundation for the subsequent introduction of blockchain trust mechanisms.
[0071] In the aforementioned distributed power supply cooperative frequency control method based on blockchain trusted encryption, the system consists of three levels: The energy physical layer includes distributed power sources and loads, as well as the local primary control of each power source; The blockchain communication layer enables information exchange through a peer-to-peer network and is responsible for the reliable recording of data. The control decision-making layer executes active power scheduling and optimization decisions based on data on the blockchain.
[0072] The three layers refer to the logical division of the entire distributed power supply collaborative control system into a physical device layer, a communication network layer, and a control application layer, used to decouple and specialize different functional modules. The energy physical layer can refer to the physical entity layer consisting of actual power generation equipment, energy storage equipment, power consumption equipment, and local controllers installed on the equipment, such as photovoltaic arrays, wind turbines, battery banks, loads, and their associated inverters and local control units. Local primary control can refer to the control links directly connected to the power electronic converter within the energy physical layer, such as droop controllers, used to respond quickly to frequency changes.
[0073] The blockchain communication layer can refer to a distributed data exchange and storage layer built on top of a physical communication network, using blockchain technology as its core. It enables the trusted transmission of control information and state data between nodes. A peer-to-peer network refers to a decentralized network communication architecture where each node has equal status and can communicate directly with other nodes without going through a central server, improving the system's fault tolerance and scalability. The core function of the blockchain communication layer is to ensure that all written data is authentic, reliable, immutable, and traceable, utilizing the blockchain's encryption, consensus, and chained storage mechanisms.
[0074] The control decision layer can refer to the application layer that executes advanced control algorithms based on data provided by the blockchain communication layer, such as running distributed collaborative control algorithms, optimization scheduling algorithms, and fault diagnosis algorithms. Active power scheduling and optimization decision-making can refer to the main functions of the control decision layer, including calculating the optimal output setpoint for each distributed power source based on system frequency deviation and power information of each node, and formulating power allocation strategies.
[0075] The present application will be further described below through a detailed embodiment: Based on the aforementioned model building and design interaction mechanism, this embodiment further introduces the division of the three levels and their collaborative working methods from the perspective of system architecture.
[0076] The system in this embodiment is clearly divided into an energy physical layer, a blockchain communication layer, and a control decision layer.
[0077] The energy physical layer, located at the bottom of the system, consists of all the physical equipment installed within the industrial park, including five photovoltaic power generation units, two energy storage units, and the loads of each factory building. Each distributed power source is equipped with a local controller that runs a droop control algorithm, enabling it to collect local frequency and power data in real time and quickly adjust the inverter's active power output based on frequency deviations. The local controller is also responsible for communicating with the upper layer, sending the collected data upwards and receiving control commands from the upper layer. This layer constitutes the physical foundation and execution terminal of the entire control system.
[0078] The blockchain communication layer, located in the middle layer, consists of blockchain node software deployed at various distributed power node locations and a peer-to-peer communication network. Each distributed power node (e.g., photovoltaic unit one) has its local controller connected to its corresponding blockchain node. These blockchain nodes are interconnected via a peer-to-peer network protocol, forming a distributed blockchain network. When data from the energy physical layer needs to be shared, the nodes encrypt and sign the data, package it into a transaction, and broadcast it through this peer-to-peer network. All nodes in the network participate in the transaction verification and consensus process, ensuring that only authentic and valid data is recorded in the blockchain ledger. This layer acts as a data trust "pipeline," providing a clean and reliable data source for upper-layer control decisions.
[0079] The control decision layer is located at the top layer of the system, running on servers in the scheduling center or edge computing nodes. This layer does not interact directly with physical devices, but instead reads verified and trusted distributed power status data from the blockchain communication layer, including the real-time frequency, active power output, and primary control commands of each node. The control decision layer runs a collaborative frequency control algorithm and an optimized scheduling model. Based on the globally trusted data it reads, this layer calculates the optimal active power command for each distributed power source or determines whether the system is currently in an abnormal state. The calculated control commands are then signed and uploaded to the blockchain through the blockchain communication layer, and finally sent to the local controller in the energy physical layer for execution. The three layers have clearly defined roles: the energy physical layer is responsible for rapid response and command execution; the blockchain communication layer is responsible for secure and trusted data transmission; and the control decision layer is responsible for advanced algorithms and optimization decisions, together forming a complete, secure, and efficient collaborative frequency control system.
[0080] The beneficial effects of one of the embodiments in this specification include at least the following: by dividing the system into a three-layer architecture of energy physical layer, blockchain communication layer and control decision layer, the decoupling of physical devices, communication security and advanced control functions is achieved, improving the modularity and maintainability of the system; the blockchain communication layer, as an independent trusted data exchange layer, provides a clean data environment for upper-layer control decision-making, while isolating the differences of lower-layer physical devices; the control decision layer focuses on algorithm optimization and scheduling decisions, and can more effectively utilize trusted data to improve control accuracy and efficiency. The three layers work together to provide a clear and scalable system framework for the access and coordinated control of large-scale distributed power sources.
[0081] In the aforementioned distributed power supply cooperative frequency control method based on blockchain trusted encryption, the system's convergence and stability are measured in the following ways: A consistent step size is used to satisfy the constraint condition of the maximum eigenvalue of the network's Laplace matrix; the power variance is used to represent the dispersion of the output power of each distributed power source, in order to measure the consistency of the system output.
[0082] Convergence refers to the characteristic that, after a finite number of iterations, the state variables (such as frequency deviation and output power) of all nodes in a distributed cooperative control algorithm tend to a consistent value. Stability refers to the ability of a control system to recover to an equilibrium state after being disturbed. The consensus step size refers to the parameter used in a distributed consensus algorithm to control the correction magnitude in each iteration; its value directly affects the convergence speed and stability of the algorithm. The maximum eigenvalue of the network Laplace matrix refers to the maximum value among the eigenvalues of the Laplace matrix determined by the topology of the distributed power supply communication network. This value reflects the connectivity and topological characteristics of the network and is a key parameter for determining the stable convergence step size range of the consensus algorithm. Constraints refer to the mathematical inequalities applied to the step size to ensure stable convergence of the algorithm; typically, the step size is required to be less than the reciprocal of the maximum eigenvalue of the network Laplace matrix.
[0083] Power variance can be a quantifiable indicator of the statistical dispersion of the output power of each distributed power source node. For example, it can be calculated as the average of the sum of squared deviations of the output power of all nodes from the average power. A smaller power variance indicates that the output power of each node is more consistent, suggesting better collaborative control. System output consistency can refer to the state where, under collaborative control, the output power of each distributed power source is distributed according to a predetermined ratio, or the frequency deviation of all nodes approaches zero.
[0084] The present application will be further described below through a detailed embodiment: Building upon the aforementioned model establishment, interaction mechanism design, and control law, this embodiment further details how to measure the convergence and stability of the system.
[0085] During the system debugging and parameter configuration phase, system engineers first analyzed the communication network topology consisting of six distributed power nodes, calculated the adjacency matrix and degree matrix of the network, and then obtained the Laplace matrix. Then, through numerical calculation or theoretical derivation, the largest eigenvalue of this Laplace matrix was obtained. To ensure the stable convergence of the distributed cooperative control algorithm, engineers selected a consistency step size based on the consistency convergence condition. For example, after calculating the largest eigenvalue to a specific value, a step size was set to be less than the reciprocal of the largest eigenvalue, and this step size parameter was configured into the control law of each node. During system operation, this step size parameter remained unchanged to ensure that the theoretical convergence of the algorithm was satisfied.
[0086] During system operation, the control decision layer continuously calculates the power variance as a real-time indicator to measure the effectiveness of coordinated control. Specifically, at the end of each control cycle, the system reads the actual output power values of six distributed power nodes from the blockchain. It calculates the arithmetic mean of these six power values, then calculates the squared deviation of each node's power from the average value. The sum of all squared deviations is then divided by the number of nodes to obtain the power variance for the current cycle. This power variance value is displayed in real-time on the monitoring interface of the dispatch center and serves as the basis for determining whether the system has reached a stable and consistent state.
[0087] For example, when a system experiences a load disturbance, the initial output power of each node varies significantly, resulting in a high power variance. Under the collaborative control law that integrates blockchain verification, each node gradually converges its output power towards a proportion of its rated capacity through trusted data exchange and consistency iteration. System monitoring personnel can observe the power variance gradually decreasing over time until it approaches a very small value, indicating that the power output of each node has become highly consistent. If the power variance remains high for an extended period after the disturbance, or exhibits a divergent trend, it indicates that the collaborative control may have failed or that there is an anomaly in the communication network. In this case, the system will trigger an alarm, prompting maintenance personnel to intervene and investigate.
[0088] Meanwhile, the system's frequency stability is also measured in a similar manner. The control decision layer calculates the sum or root mean square value of the absolute values of the deviations of each node's frequency from the rated frequency, as an evaluation index of the frequency recovery effect. When this index is consistently less than a preset threshold, it indicates that the system frequency has stabilized and the coordinated control has achieved the expected goal.
[0089] The beneficial effects of one of the embodiments in this specification include at least the following: by adopting a method that satisfies the constraint condition of the maximum eigenvalue of the network Laplace matrix with a consistent step size, a theoretical basis is provided for the parameter configuration of the cooperative control algorithm, ensuring the stable convergence of the system after large disturbances and avoiding the risk of oscillation or divergence caused by improper parameter settings; by introducing power variance as a quantitative indicator to measure the consistency of system output, an intuitive and quantifiable basis is provided for the evaluation of control effect, making it easier for system operators to monitor the cooperative control status in real time, detect anomalies in a timely manner and intervene, thereby improving the observability and operational reliability of the system.
[0090] The following is a general embodiment, in conjunction with the appendix. Figures 2 to 5 The technical solution of this application will be described in detail below.
[0091] First, the first specific implementation method of this application is introduced: A distributed power supply cooperative frequency control strategy based on blockchain trusted encryption, characterized by the following steps: Step 1: Construct a distributed power source and load model, as follows: The distributed generation (DG) cooperative control strategy operates on a system topology such as... Figure 2 As shown, it mainly consists of three levels, such as Figure 2 As shown.
[0092] The first layer is the energy physical layer, consisting of distributed generation (DG) units such as wind power, photovoltaics, and energy storage units, as well as loads and the local primary control of each DG or load. The second layer is the energy blockchain communication layer, which achieves information exchange through a peer-to-peer (P2P) network and uses blockchain for reliable data recording. The third layer is the control decision layer, which executes active power dispatch and optimization decisions based on data on the blockchain. In the energy physical layer, primary control acts as a local controller, operating on each DG, and can use droop control, virtual synchronous generator control, etc., for rapid dynamic response and real-time frequency stability. Secondary control aims to restore the system's frequency rating. This application adopts a blockchain-based communication approach, utilizing a distributed collaborative control algorithm to achieve active power coordination control of distributed DGs. The blockchain communication layer provides trusted communication, authentication, and anti-tampering mechanisms for distributed control data, ensuring the security and traceability of collaborative dispatch. Blockchain serves as an information encryption mechanism supporting the secure transmission and execution of collaborative signals in the power grid's secondary control layer.
[0093] In traditional secondary control, control commands and status variables, such as frequency deviation and active power of each distributed generation (DG), are shared through a centralized controller or point-to-point communication. With the introduction of blockchain, control data from all distributed nodes is encrypted and stored on the blockchain, and the consensus mechanism ensures the consistency of scheduling commands and the immutability of the data.
[0094] Construct a distribution network topology consisting of distributed power sources and loads, and its energy balance and frequency dynamic model. Establish a local primary control system based on droop control and a secondary collaborative control system based on blockchain communication to achieve power coordinated scheduling of multi-node DGs.
[0095] based on Figure 2 A control model for the distribution network topology is established. It is assumed that the distribution network area under study has a total of [number missing]. N The first is the energy balance constraint of the system, as shown in equation (1).
[0096] (1) In the formula: P DGi For the first in the distribution network i The active power output of each DG P load It refers to the load power in the distribution network.
[0097] Furthermore, P DGi There exists a dynamic balance relationship between the system frequency deviation and the system frequency deviation, as shown in equation (2).
[0098] (2) In the formula: M i It is the equivalent inertia constant. D i The damping coefficient is... w i For node frequency, w 0 represents the rated frequency. Pset DGi Set the power value for one frequency control operation.
[0099] In a multi-DG system, droop control ensures that the nodes naturally distribute the load according to their power-frequency characteristics, as shown in equation (3). A decrease in frequency will cause an increase in output power, thus achieving automatic power sharing.
[0100] (3) In the formula: k pi This is the primary frequency modulation coefficient.
[0101] The output power of each node in one control is P i pri The secondary correction amount, combining the frequency recovery term and the neighbor consistency term, is D. P i sec Its expression is as follows: (4) In the formula: D P i sec For the first i The active power adjustment of each DG at the secondary control level aims to restore system frequency and coordinate power distribution. k i To restore gain through secondary control frequency, and k pi The difference lies in the coefficients used for global frequency correction on a slower time scale. Typically... k i < k pi This is because secondary control has a slower response speed but higher precision. c i It is the power consistency control gain, used to adjust power coordination between nodes. and a ijIt is a trusted communication set and adjacency relationship based on blockchain verification.
[0102] Therefore, the DG final control command combines primary and secondary control. P i cmd The actual active power instructions issued and executed are as follows: (5) To achieve secure and coordinated scheduling among DGs, an active power coordination allocation model as shown in equations (6)-(7) was constructed: (6) (7) In equation (6), the first term reflects the penalty for each DG's active power output deviating from the reference value, and the second term is a consistency adjustment term based on neighbor relationships; To balance the weights, R ij For connection weights.
[0103] Therefore, the optimized result is... P Gi The optimal output command of each DG can be used as a power reference signal for the control layer. P i cmd The goal is then achieved by gradually approximating the target through primary and secondary control loops.
[0104] Step 2, design a trusted blockchain interaction mechanism, as follows: In traditional distributed control, each node i They all exchange power with neighboring nodes through the communication network. P DGi ,frequency w i However, such communication carries two risks: 1) data forgery or tampering caused by malicious nodes or network attacks; 2) transmission delays and data asynchrony.
[0105] Therefore, the introduction of blockchain provides a decentralized, immutable, and trusted communication layer. Before sending control information, each node encrypts and signs the data and records it in a block. Other nodes must verify the data on the chain before using it. In this way, distributed control changes from "assuming the neighbor is trustworthy" to "verifying the neighbor's trustworthiness."
[0106] A DG node message and signature mechanism is established, as shown in Equation (8). This equation describes the process by which a node generates and signs messages in control communication. The signature ensures that each control signal can be traced back to a legitimate node, preventing forgery or tampering.
[0107] (8) In the formula, t At the current sampling time, For DG i The primary control output active power command w i For nodes i The real-time frequency or angular velocity, m i ( t ) is a node i exist t Control message packets generated at all times, sk i For nodes i The private key used for signing. Sig i The node signature result is used for identity authentication. ski ( . ) is the private key signing function, ( r i , s i The signature consists of two components. Sig i A lightweight and trusted encryption mechanism based on the Elliptic Curve Digital Signature (ECDSA) algorithm and SHA-256 hash.
[0108] The chained hash structure ensures that the data is immutable; any modification to the information of any node will cause the entire hash chain to break, thereby ensuring the integrity and traceability of the communication data, as shown in equation (9).
[0109] (9) node i Neighbor nodes obtained after reading and verification from the blockchain j Trustworthy state variables As shown in equation (10). This equation indicates that the control node will only participate in the control calculation after verifying the validity of the neighbor data, to prevent malicious nodes or forged data from affecting the stability of the system. (10) In the formula, VerifyAndRead( ) is a blockchain verification and reading function used to verify the legality of the signature and the validity of the timestamp.
[0110] Step 3: Propose a distributed control law that integrates blockchain verification. Specifically: Furthermore, a blockchain-embedded distributed collaborative control law is proposed, as shown in Equation (11). Unlike traditional consensus algorithms, neighbor data undergoes trusted verification before entering the control phase, preventing false data from interfering with system consensus.
[0111] (11) In the formula, x i ( k ) is a node i State variables such as frequency or output. From the neighbor j The trusted state after blockchain verification. a This is the step size for the consensus algorithm. b It is the adjustment coefficient for correcting active power and frequency deviation.
[0112] The fault tolerance and latency strategies adopted are as follows: (12) In the formula, T chain To reduce blockchain verification and write latency, T allow This represents the maximum acceptable communication delay for the control system.
[0113] The step size used for system convergence and stability should satisfy the following consistency constraints: (13) In the formula, is the largest eigenvalue of the network's Laplacian matrix.
[0114] Power variance To indicate time t The variance is measured by the dispersion of the output power of each DG to measure the consistency of the system output. The smaller the variance, the more consistent the output of each power supply is, as shown in Equation (14).
[0115] (14) The system's final convergence is equivalent to that of traditional distributed quadratic control algorithms. This control model can maintain the convergence performance and dynamic characteristics of traditional quadratic control while ensuring secure communication.
[0116] Step 4: Automatic verification and execution of control commands. Details are as follows: Smart contracts are automatically executable and verifiable program logic deployed on a blockchain, used to automatically complete transactions, control, or information exchanges based on preset conditions without human intervention. Essentially, it is an "automated control protocol running on the blockchain." The integration of blockchain and smart contracts is as follows... Figure 3As shown, the contract is responsible for verifying the legality of signatures, permissions, and parameters. Sentinel nodes are responsible for real-time monitoring of the system's operational status and detecting abnormal events. Once preset conditions are triggered, the sentinel node will notify the off-chain automated task program. The automated task, as an off-chain service, constructs a corresponding transaction request based on the received monitoring information and sends the transaction to the blockchain via a relay. The energy contract in the blockchain receives and verifies the transaction, automatically executing the corresponding control logic to achieve secure and reliable collaborative scheduling of the DG. This process ensures efficient linkage between system monitoring, control command generation, and execution, as well as the immutability of data.
[0117] The steps involved in applying blockchain in power distribution network dispatching, such as... Figure 4 As shown in the diagram. Addressing the traditional dispatching framework of distribution network dispatch control centers, the decentralized architecture of blockchain can achieve equitable ledger recording, preventing data loss across the distribution network area; it uses hash cryptography for encrypted storage to ensure data security; furthermore, a consensus mechanism is used to maintain all information across the network; and finally, smart contracts automatically complete responses, achieving collaborative control of distributed generation (DG). Further, a schematic diagram of the distribution network control structure under energy blockchain is shown below. Figure 5 As shown, the energy blockchain sits between the distributed generation (DG) and the dispatch control center in the distribution network regulation. From top to bottom, it is responsible for issuing dispatch control commands to ensure that each DG safely and efficiently executes power regulation according to the optimization results. From bottom to top, the energy blockchain aggregates and processes the regulation calculation results and status information from each DG, participating in regulation calculations.
[0118] Through this two-way interaction mechanism, the energy blockchain not only ensures the transparent and reliable transmission of dispatch instructions, but also promotes secure data sharing and collaborative decision-making between the DG (Data Center) and the dispatch center.
[0119] This application proposes a distributed power source collaborative frequency control strategy based on blockchain-based trusted encryption, which enables safe, stable, and efficient active power coordination and regulation in a multi-node distributed power source grid-connected environment. By introducing the immutability, traceability, and decentralization characteristics of blockchain, this application effectively solves the problems of easily forged control data, difficulty in verifying node identities, and control failure due to single-point failures under traditional communication architectures. The constructed blockchain trusted interaction mechanism ensures the secure transmission of active power control information between nodes, providing a verifiable and reliable data foundation for distributed collaborative control. Combined with the ability of smart contracts to automatically execute control commands, this application significantly improves the execution efficiency of secondary collaborative control and the transparency of system operation. This collaborative control system is suitable for large-scale distributed power source access scenarios and can meet the active power regulation requirements of high real-time performance and high communication security, providing a highly reliable and robust technical solution for distributed collaborative control of new power systems.
[0120] Corresponding to the above method embodiments, this specification also provides an embodiment of a distributed power supply cooperative frequency control device based on blockchain trusted encryption. Figure 6 This specification illustrates a schematic diagram of a distributed power supply cooperative frequency control device based on blockchain trusted encryption, according to one embodiment of this specification. Figure 6 As shown, the device includes: The model building module 601 is configured to build a distributed power source and load model, and establish a local primary control system based on droop control and a secondary collaborative control system based on blockchain communication. The encrypted storage module 602 is configured to determine the trusted interaction mechanism of the blockchain, encrypt and sign the control commands and status information of the distributed power source and store them on the blockchain, and ensure the authenticity, integrity and traceability of the communication data through the immutability and consensus mechanism of the blockchain. The data verification module 603 is configured to determine the distributed control law that integrates blockchain verification, use on-chain data verification to ensure the credibility of neighbor node information, and design a communication latency tolerance mechanism to ensure the real-time response and stable convergence of the control system. The instruction execution module 604 is configured to automatically verify and execute control instructions. It integrates smart contracts to realize the automatic verification and execution of control instructions, monitors the system status through sentinel nodes, and triggers off-chain automatic task responses to anomalies.
[0121] In one possible implementation, the trusted interaction mechanism of the blockchain includes: each distributed power node cryptographically signs the data before sending control information, and the cryptographic signature is based on the elliptic curve digital signature algorithm and the SHA-256 hash lightweight trusted encryption mechanism; the chain hash structure ensures that the data is immutable, the node reads and verifies the state variables of the neighboring nodes from the blockchain, and participates in the control calculation only after verifying the legality of the signature and the validity of the timestamp.
[0122] In one possible implementation, in a distributed control law that integrates blockchain verification, neighbor data undergoes trusted verification before entering the control loop to prevent false data from interfering with system consensus. The fault tolerance and latency strategies adopted include: the blockchain verification and write latency is less than the maximum acceptable communication latency of the control system, and the system convergence satisfies the consistency step size constraint.
[0123] In one possible implementation, the automatic verification and execution of control instructions includes: a smart contract deployed on the blockchain is responsible for verifying the legality of signatures, permissions, and parameters; sentinel nodes monitor the system's operating status in real time and detect abnormal events, triggering off-chain automatic task programs; the off-chain automatic task constructs a transaction request based on the monitoring information and sends the transaction to the blockchain through a relay; the energy contract receives and verifies the transaction and then automatically executes the control logic.
[0124] In one possible implementation, constructing a distributed power source and load model includes: establishing the system's energy balance constraints and frequency dynamic balance relationship; using droop control to implement primary control, automatically adjusting power output according to frequency deviation; introducing a frequency recovery term and a power correction amount based on neighbor consistency term at the secondary control level, and merging primary and secondary control to obtain the final control command for each distributed power source.
[0125] In one possible implementation, the system consists of three layers: an energy physical layer, which includes distributed power sources and loads, as well as local primary control of each power source; a blockchain communication layer, which enables information exchange through a peer-to-peer network and is responsible for reliable data recording; and a control decision layer, which performs active power scheduling and optimization decisions based on data on the blockchain.
[0126] In one possible implementation, the convergence and stability of the system are measured by: using a consistent step size to satisfy the constraint of the maximum eigenvalue of the network's Laplace matrix; and using power variance to represent the dispersion of the output power of each distributed source to measure the consistency of the system output.
[0127] The above is an illustrative scheme of a distributed power supply cooperative frequency control device based on blockchain trusted encryption according to this embodiment. It should be noted that the technical solution of this distributed power supply cooperative frequency control device based on blockchain trusted encryption belongs to the same concept as the technical solution of the distributed power supply cooperative frequency control method based on blockchain trusted encryption described above. Details not described in detail in the technical solution of the distributed power supply cooperative frequency control device based on blockchain trusted encryption can be found in the description of the technical solution of the distributed power supply cooperative frequency control method based on blockchain trusted encryption described above.
[0128] Figure 7 A structural block diagram of a computing device 700 according to one embodiment of this specification is shown. The components of the computing device 700 include, but are not limited to, a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and a database 750 is used to store data.
[0129] The computing device 700 also includes an access device 740, which enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 740 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.
[0130] In one embodiment of this specification, the above-described components of the computing device 700 and Figure 7 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 7 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0131] The computing device 700 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 700 can also be a mobile or stationary server.
[0132] The processor 720 executes the following computer-executable instructions, which, when executed by the processor, implement the steps of the aforementioned distributed power supply cooperative frequency control method based on blockchain trusted encryption. The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the aforementioned distributed power supply cooperative frequency control method based on blockchain trusted encryption belong to the same concept. Details not described in detail in the technical solution of the computing device can be found in the description of the technical solution of the aforementioned distributed power supply cooperative frequency control method based on blockchain trusted encryption.
[0133] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described distributed power supply cooperative frequency control method based on blockchain trusted encryption.
[0134] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the above-described distributed power supply cooperative frequency control method based on blockchain trusted encryption. Details not described in detail in the technical solution of the storage medium can be found in the description of the technical solution of the above-described distributed power supply cooperative frequency control method based on blockchain trusted encryption.
[0135] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described distributed power supply cooperative frequency control method based on blockchain trusted encryption.
[0136] The above is an illustrative scheme of a computer program according to this embodiment. It should be noted that the technical solution of this computer program belongs to the same concept as the technical solution of the above-described distributed power supply cooperative frequency control method based on blockchain trusted encryption. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solution of the above-described distributed power supply cooperative frequency control method based on blockchain trusted encryption.
[0137] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0138] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0139] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0140] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0141] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A distributed power supply cooperative frequency control method based on blockchain trusted encryption, characterized in that, include: Construct a distributed power source and load model, and establish a local primary control system based on droop control and a secondary collaborative control system based on blockchain communication; A trusted interaction mechanism for blockchain is established, in which control commands and status information of distributed power sources are encrypted, signed, and stored on the blockchain. The immutability and consensus mechanism of blockchain ensure the authenticity, integrity, and traceability of communication data. A distributed control law integrating blockchain verification is determined, on-chain data verification is used to ensure the credibility of neighbor node information, and a communication latency tolerance mechanism is designed to ensure the real-time response and stable convergence of the control system. Automatic verification and execution of control commands: The system integrates smart contracts to achieve automatic verification and execution of control commands, and monitors the system status through sentinel nodes and triggers off-chain automatic task responses to anomalies.
2. The distributed power supply cooperative frequency control method based on blockchain trusted encryption according to claim 1, characterized in that, The established blockchain trusted interaction mechanism includes: each distributed power node encrypts and signs the data before sending control information, the encrypted signature being a lightweight trusted encryption mechanism based on elliptic curve digital signature algorithm and SHA-256 hash; a chain hash structure ensures that the data is immutable, nodes read and verify the state variables of neighboring nodes from the blockchain, and participate in control calculations only after verifying the legality of the signature and the validity of the timestamp.
3. The distributed power supply cooperative frequency control method based on blockchain trusted encryption according to claim 1, characterized in that, In the distributed control law that integrates blockchain verification, neighbor data undergoes trusted verification before entering the control loop to prevent false data from interfering with system consensus. The fault tolerance and latency strategies adopted include: the blockchain verification and write latency is less than the maximum acceptable communication latency of the control system, and the system convergence satisfies the consistency step size constraint condition.
4. The distributed power supply cooperative frequency control method based on blockchain trusted encryption according to claim 1, characterized in that, The automatic verification and execution of the control commands include: a smart contract deployed on the blockchain is responsible for verifying the legality of signatures, permissions, and parameters; sentinel nodes monitor the system's operating status in real time and detect abnormal events, triggering off-chain automatic task programs; the off-chain automatic task constructs a transaction request based on the monitoring information and sends the transaction to the blockchain through a relay; the energy contract receives and verifies the transaction and then automatically executes the control logic.
5. The distributed power supply cooperative frequency control method based on blockchain trusted encryption according to claim 1, characterized in that, The construction of the distributed power source and load model includes: establishing the system's energy balance constraints and frequency dynamic balance relationship; using droop control to achieve primary control, automatically adjusting power output according to frequency deviation; introducing a frequency recovery term and a power correction amount based on neighbor consistency term at the secondary control level, and merging the primary control and secondary control to obtain the final control command for each distributed power source.
6. The distributed power supply cooperative frequency control method based on blockchain trusted encryption according to claim 1, characterized in that, The system consists of three layers: the energy physical layer, which includes distributed power sources and loads, as well as the local primary control of each power source; the blockchain communication layer, which realizes information exchange through a peer-to-peer network and is responsible for reliable data recording; and the control decision layer, which performs active power scheduling and optimization decisions based on the data on the blockchain.
7. The distributed power supply cooperative frequency control method based on blockchain trusted encryption according to claim 1, characterized in that, The convergence and stability of the system are measured in the following ways: a consistent step size is used to satisfy the constraint condition of the maximum eigenvalue of the network's Laplace matrix; the power variance is used to represent the dispersion of the output power of each distributed power source, in order to measure the consistency of the system output.
8. A distributed power supply cooperative frequency control device based on blockchain trusted encryption, characterized in that, include: The model building module is configured to build a distributed power source and load model, and establish a local primary control system based on droop control and a secondary collaborative control system based on blockchain communication. The encrypted storage module is configured to establish a trusted blockchain interaction mechanism, encrypt and sign the control commands and status information of the distributed power source and store them on the blockchain, and ensure the authenticity, integrity and traceability of the communication data through the immutability and consensus mechanism of the blockchain. The data verification module is configured to determine the distributed control law that integrates blockchain verification, use on-chain data verification to ensure the credibility of neighbor node information, and design a communication latency tolerance mechanism to ensure the real-time response and stable convergence of the control system. The instruction execution module is configured to automatically verify and execute control instructions. It integrates smart contracts to realize the automatic verification and execution of control instructions, and monitors the system status through sentinel nodes and triggers off-chain automatic task responses to anomalies.
9. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the distributed power supply cooperative frequency control method based on blockchain trusted encryption as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the distributed power supply cooperative frequency control method based on blockchain trusted encryption as described in any one of claims 1 to 7.