Power grid sensor fault recovery method
By collaborating with graph neural networks and dual deep Q-networks, the system automatically learns changes in the power grid environment, solving the problem of low fault recovery efficiency for large-scale, high-dimensional power grid sensors. This enables rapid and accurate fault recovery, improving the reliability and stability of the power grid.
Patent Information
- Application Number
- CN202411038021.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-15
AI Technical Summary
Existing technologies struggle to quickly and accurately handle large-scale, high-dimensional power grid sensor faults, resulting in low fault recovery efficiency, slow response speed, and the need for extensive manual intervention.
By employing a collaborative approach of graph neural networks and dual deep Q-networks, and through graph data representation and reinforcement learning models, we can automatically learn changes in the power grid environment, extract complex features and relationships, and optimize fault recovery strategies.
It improves the accuracy and efficiency of fault recovery, reduces human intervention, shortens fault recovery time, and enhances the reliability and stability of the power grid.
Smart Images

Figure CN118964687A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart grids, and in particular to a method for recovering from a fault of a grid sensor. Background Art
[0002] In the field of smart grid control technology, accurate, rapid and effective grid sensor fault recovery methods are crucial. Among them, the control of smart grid is based on the real-time status of the grid load and other conditions, and sensors are an indispensable part of smart grid control; with the increase in the scale and complexity of the grid, the number and types of sensors will also increase accordingly. When a sensor fails, it will undoubtedly cause difficulties in the management of the grid and pose a greater safety hazard. Therefore, how to quickly and accurately recover from sensor failures is particularly important.
[0003] Traditional grid sensor fault recovery methods can be roughly divided into two categories:
[0004] First, manual adjustment based on rules. This method refers to formulating a series of rules, specifications or manuals for grid sensor fault handling based on the experience and relevant expertise of engineers and operators. For example, when a sensor fails, the system may perform specific adjustment operations according to pre-defined rules, such as switching to a backup sensor or adjusting the sampling frequency of the sensor. This method also includes judging whether the sensor has failed based on a specific threshold and manually switching the sensor according to a preset alternative solution. However, this method requires engineers to continuously update and maintain it in actual application, and cannot cope with the dynamic changes of the increasingly large and complex power grid.
[0005] Second, automated methods based on traditional machine learning algorithms involve using supervised learning or unsupervised learning techniques to identify and handle grid sensor failures through trained models. For example, algorithms such as decision trees and support vector machines can be used to build models to learn sensor failure patterns from historical data and predict possible future failures; then, fault recovery operations such as repairing sensors or adjusting monitoring strategies are automatically performed based on the model's prediction results. However, traditional machine learning methods usually require a large amount of labeled data for training and have difficulty processing large-scale, high-dimensional grid data, resulting in poor model performance or failure to meet real-time requirements.
[0006] The above two methods are usually limited by static rules or pre-defined features, and are difficult to cope with the dynamic changes in the power grid environment and scale and its inherent complexity; in addition, most of the above two methods still require a lot of manual intervention or cannot cope with large-scale data, which will directly lead to inefficient fault handling and slow response speed of power grid sensors. Summary of the invention
[0007] 1. Technical Problems Solved
[0008] In view of the shortcomings of the prior art, the present invention proposes a power grid sensor fault recovery method, which can extract complex features and relationships from large-scale and high-dimensional power grid data through the collaboration of graph neural network (GNN) and double deep Q-network (DDQN), realize experience-based fault recovery strategy learning and optimization, and then automatically learn and adapt to changes in the power grid environment without manually defining rules or features, thereby improving the accuracy and efficiency of fault recovery.
[0009] 2. Specific technical solutions
[0010] A method for recovering from a power grid sensor fault comprises the following steps:
[0011] S1. Collect and organize sensor network data, wherein the sensor network data includes the working status, connection relationship, fault indication signal and recovery decision of each sensor in the power grid; obtain the network topology data of the power grid, wherein the network topology data of the power grid includes nodes and their connection relationship; S2. Use graph data to characterize sensor network data, network topology data of the power grid and recovery decision data of sensor faults; S3. Introduce a front graph neural network for graph data processing, wherein the graph neural network includes two layers of embedded graph convolutional neural networks, wherein the front graph convolutional neural network is used to receive, extract, aggregate and transform grid information and feature information in graph data; S4. Establish a graph reinforcement learning model, wherein the reinforcement learning model includes an evaluation network and a target network, wherein the evaluation network and the target network are based on a dual deep Q network learning framework; S5. Based on the current power grid state and sensor data, the graph reinforcement model with an embedded graph neural network and a dual deep Q network outputs a recovery strategy.
[0012] Implementation principle and working principle:
[0013] The working status, connection relationship and fault indication signal of each sensor in the power grid, as well as the network topology data collected in step S1, provide basic analysis data for subsequent model establishment and power grid operation status; in step S2, the sensor network data, the network topology data of the power grid and the recovery decision data of the sensor fault are represented by graph data, so that the correlation between each node in the power grid network is stronger, and the query is more convenient and faster. At the same time, when the power grid needs to be updated and improved, it only needs to be expanded in the graph features, which is more flexible; in step S3, two layers of post-GCN are embedded in the evaluation network and the target network of the dual Q learning framework, which can effectively handle the dynamic changes of the distribution network topology and provide accurate input for subsequent model decisions; then the grid information and feature information are further extracted through the graph reinforcement model in step S4 for training, and finally the current power grid status and sensor data are analyzed in step S5, and the recovery strategy is output if the analysis shows that there is a fault.
[0014] As a preferred embodiment, step S4 also includes updating the graph reinforcement learning model. When the graph reinforcement learning model is updated, its embedded dual deep Q network and the graph convolutional neural network therein are synchronously updated. The beneficial effect of this preferred embodiment is that the dual deep Q network and the graph convolutional neural network therein are synchronously updated, which can ensure that the data processing efficiency is higher and the flow is smoother during data processing, which helps to maintain superior model performance.
[0015] As a preferred embodiment, the collecting and collating of sensor network data in step S1 includes the following process:
[0016] Assume that the power grid includes N sensors, each sensor has M features, and S ij represents the jth feature of the ith sensor, where i = 1, 2..., N, j = 1, 2..., M; suppose there are K nodes in the power grid, G represents the network topology of the power grid, and the adjacency matrix A represents the connection relationship between the nodes, where A kl =1 indicates that there is a connection between node k and node , A kl =0 means that there is no connection between them. In this preferred embodiment, the expression is used to characterize the network topology of the power grid, which is more convenient for model learning.
[0017] As a preferred embodiment, the step S2 of using graph data to represent the decision information in fault recovery includes: representing the sensor data as a sensor feature matrix X, where X∈∈ N×M , N represents the number of sensors, M represents the number of features of each sensor; the network topology of the power grid is represented by the adjacency matrix A, where A∈0,1 K×K, K represents the number of nodes; based on these data, a graph G = (V, E) is constructed, where V is the node set corresponding to the sensor, and E is the edge set corresponding to the connection relationship between sensors; each node v i ∈V corresponds to a sensor, and each edge (v i , v j )∈E represents sensor v i and v j There is a connection between them; at the same time, the sensor feature matrix X is used as the feature of the node, and the graph G represents the attributes of each node.
[0018] As a preferred embodiment, the front graph neural network in step S3 includes two graph convolution layers, which are GCN1 and GCN2 respectively; wherein the input feature of the graph convolution layer is defined as H (0) , where H (0) The sensor feature matrix X is N×M, and the input feature is H (0) represents the initial feature representation of each node, N is the number of nodes, M is the feature dimension of each node, and the output feature H is obtained by processing the input feature through GCN1 and GCN2 (1) and H (2) , its specific expression is, H (1) =GCN1(A,H (0) ), H (2) =GCN2(A,H (1) ).
[0019] As a preferred embodiment, the evaluation network in step S4 is GCN eval1 and GCN eval2 , the target network is GCN target1 and GCN target2 ; The expression for evaluating the network to extract the network topology and sensor features is, The expression of the target network to extract the network topology and sensor features is:
[0020] As a preferred embodiment, in step S4, it also includes using a fully connected layer to process the obtained network topology structure and sensor features extracted from the evaluation network and the target network;
[0021] The processing expression of the data obtained by the fully connected layer processing evaluation network is:
[0022] Where a is the sensor recovery action, Q′(s, a) is the value of action a;
[0023] The processing expression of the data obtained by the fully connected layer processing the target network is: Where Q′(s′, a) is the target value during reinforcement learning model training.
[0024] As a preferred embodiment, the recovery strategy output in step S5 includes selecting the best action in the current state according to the output Q(s, a) of the evaluation network. The expression of the best action is: The best action is
[0025] The beneficial effects of the present invention are:
[0026] In this scheme, sensor network data, namely sensor network topology, sensor fault characteristics and sensor recovery data, are collected, and the sensor network data is represented by graph data, so that the sensor network data have a strong correlation and are easy to query and call; and a dual deep Q learning network and a graph neural network are used to build a model, and the model is trained based on the sensor network data, and then the actual power grid sensor data is collected for analysis and comparison. If there is a fault, the corresponding sensor recovery strategy is output. The use of a dual deep Q learning network can ensure the stability of the strategy and avoid system shock. Two layers of graph convolutional neural networks are embedded in the evaluation network and the target network, which can better extract the grid information and feature information in the sensor network data, making the learning model at the training site more powerful, and thus making the output sensor repair strategy more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a structural schematic diagram of the present invention. DETAILED DESCRIPTION
[0028] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more explicit definition of the protection scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] like Figure 1 As shown:
[0030] A power grid sensor fault recovery method of this solution specifically includes the following steps:
[0031] Step S1, first, collect and organize sensor network data, wherein the sensor network data includes the working status, connection relationship, fault indication signal and sensor fault recovery decision of each sensor in the power grid; obtain the network topology data of the power grid, wherein the network topology data of the power grid includes nodes and their connection relationship; the purpose of collecting sensor network data is to clearly understand through the sensor network data when a sensor of a certain node fails, the dynamic changes of adjacent or other sensors, and what kind of fault indication signal will be generated, so as to facilitate the subsequent learning model training;
[0032] During implementation, in this step, it is assumed that the power grid includes N sensors, each sensor has M features, and S ij represents the,th feature of the ith sensor, where i = 1, 2..., N, j = 1, 2..., M; suppose there are K nodes in the power grid, G represents the network topology of the power grid, and the adjacency matrix A represents the connection relationship between the nodes, where A kl =1 means there is a connection between node K and node L, A kl =0 means there is no connection between them;
[0033] In order to better illustrate the present embodiment, let N=26, M=4, and let the i-th sensor S i The temperature is T i , voltage is U i , the current is I i , the fault indication signal is F i (If the sensor S i If a fault occurs, F i =1; otherwise, F i =0). Use S ij Denote the jth feature of the ith sensor, where i = 1, 2, ..., 26, j = 1, 2, 3, 4. Denote the network topology of the power grid with G. Denote the connection relationship between nodes with the adjacency matrix A, where A kl =1 indicates that there is a connection between node k and node , A kl =0 means there is no connection between them.
[0034] Step S2: Use graph data to represent sensor network data, network topology data of the power grid, and recovery decision data of sensor failures. In this step, graph data is used to better display the correlation and queryability between sensor network data, and when the power grid is updated, data expansion is more convenient and faster;
[0035] Specifically, using graph data to represent decision information in fault recovery includes representing sensor data as a sensor feature matrix X, where X∈R N×M, N represents the number of sensors, M represents the number of features of each sensor; the network topology of the power grid is represented by the adjacency matrix A, where A∈0,1 K×K , K represents the number of nodes; based on these data, a graph G = (V, E) is constructed, where V is the node set corresponding to the sensor, and E is the edge set corresponding to the connection relationship between sensors; each node v i ∈V corresponds to a sensor, and each edge (v i , v j )∈E represents sensor v i and v j There is a connection between them; at the same time, the sensor feature matrix X is used as the feature of the node, and the graph G represents the attributes of each node; the feature matrix is specifically X∈∈ 26×4 , adjacency matrix A, where A∈0,1 26×26 ,In this way, the nodes and edges in the graph G contain the working status and connection relationship information of the sensors in the power grid, providing accurate input for the subsequent graph neural network model.
[0036] Step S3, introducing a front graph neural network to process graph data, wherein the graph neural network includes two layers of embedded graph convolutional neural networks, wherein the front graph convolutional neural network is used to receive, extract, aggregate and transform grid information and feature information in the graph data; wherein the front graph convolutional neural network can effectively process the dynamic changes of the distribution network topology by receiving, extracting, aggregating and transforming the grid information and feature information in the graph data, and provide accurate input for subsequent decision-making;
[0037] Specifically, the front graph neural network includes two graph convolution layers, namely GCN1 and GCN2, which are used to process graph data. The processing process includes defining the input feature of the graph convolution layer as H (0) , where H (0) The sensor feature matrix X is 26×4, and the input feature is H (0) represents the initial feature representation of each node, N is the number of nodes, M is the feature dimension of each node, and the output feature H is obtained by processing the input feature through GCN1 and GCN2 (1) and H (2) , its specific expression is, H (1) =GCN1(A,H (0) ), H (2) =GCN2(A,H (1) );
[0038] When implemented, the specific formula of the graph convolution layer is as follows:
[0039]
[0040] In the formula, H(l) is the node feature matrix of the lth layer, with dimension N×M, where N is the number of nodes (26) and M is the number of features (4). is the graph adjacency matrix A and the identity matrix I N The sum of is used to add self-loops to consider the node’s own characteristics. yes The degree matrix W (l) It is the weight parameter matrix of the lth layer, and its dimension is also N×M, where N is the number of nodes, which is 26, and M is the number of features, which is 4. is a nonlinear activation function
[0041] Step S4, establishing a graph reinforcement learning model, wherein the reinforcement learning model includes an evaluation network and a target network, wherein the evaluation network and the target network are based on a dual-depth Q network learning framework, wherein two layers of post-GCN are embedded in the evaluation network and the target network, and the two layers of GCN are used to further extract grid information and feature information, and when the graph reinforcement learning model is updated, its embedded dual-depth Q network and the graph convolutional neural network therein are synchronously updated to ensure the stability and superiority of the system;
[0042] Specifically, the post-GCNs in the evaluation network in step S4 are GCN eval1 and GCN eval2 , the target network is GCN target1 and GCN target2 ,The expression for evaluating the network to extract the network topology and sensor features is , The expression of the target network to extract the network topology and sensor features is:
[0043] In step S4, it also includes using a fully connected layer to process the network topology and sensor features extracted from the evaluation network and the target network. In the evaluation network, the fully connected layer is used for processing It can well estimate the value Q(s, a) of each action a, where action a is the sensor recovery action, and the processing expression of the data obtained by the fully connected layer processing evaluation network is: The processing expression of the data obtained by the fully connected layer processing the target network is: Among them, Q′(s′, a) is the target value during reinforcement learning model training, which can effectively reduce the deviation and variance in the model learning process.
[0044] Step S5: Based on the current grid status and sensor data, the graph reinforcement model with embedded graph neural network and dual deep Q network outputs a recovery strategy, wherein after the graph reinforcement learning model is trained, when new data is received, the evaluation network will output Q(s, a);
[0045] According to the Q(s, a) output by the evaluation network, the best action based on the current data is obtained, where the best action expression for the current action is The best action is
[0046] The beneficial effects of the present invention are as follows: (1) GCN can effectively process graph structure data and identify the correlation between sensors, which helps to detect sensor faults more accurately. The dual Q learning model can select the best action according to the environmental state, thereby achieving fast and intelligent fault recovery; (2) The combination of GCN and the dual Q learning model can enable the system to make fault diagnosis and recovery decisions more quickly, thereby shortening the fault recovery time and improving the reliability of the power grid; (3) Through automated fault detection and recovery solutions, the need for manual intervention is reduced, and maintenance costs and human resource investment are reduced; (4) Timely handling of sensor faults can prevent the spread of faults and partial failure of the power grid, which helps to improve the overall operating efficiency and stability of the power grid.
[0047] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims.
Claims
1. A method for recovering a power grid sensor fault. It is characterized in that include: S1. Collect and organize sensor network data, where the sensor network data includes the working status, connection relationship, fault indication signal and sensor fault recovery decision of each sensor in the power grid; obtain the network topology data of the power grid, where the network topology data of the power grid includes nodes and their connection relationship; S2, using graph data to characterize sensor network data, network topology data of the power grid, and recovery decision data of sensor failures; S3. Introducing a front-end graph neural network to process graph data, wherein the graph neural network includes two layers of embedded graph convolutional neural networks, wherein the front-end graph convolutional neural network is used to receive, extract, aggregate and transform grid information and feature information in the graph data; S4. Establishing a graph reinforcement learning model, wherein the reinforcement learning model includes an evaluation network and a target network, wherein the evaluation network and the target network are based on a dual deep Q network learning framework; S5. Based on the current grid status and sensor data, the graph reinforcement model with embedded graph neural network and dual deep Q network performs analysis and outputs the recovery strategy.
2. The power grid sensor fault recovery method according to claim 1, Features: Step S4 also includes updating the graph reinforcement learning model. When the graph reinforcement learning model is updated, its embedded dual deep Q network and its embedded graph convolutional neural network are synchronously updated.
3. The power grid sensor recovery method according to claim 1, It is characterized in that The collection and organization of sensor network data in step S1 includes the following processes: Assume that the power grid includes N sensors, each sensor has M features, and S ij represents the jth feature of the ith sensor, where i = 1, 2..., N, j = 1, 2..., M; suppose there are K nodes in the power grid, G represents the network topology of the power grid, and the adjacency matrix A represents the connection relationship between the nodes, where A kl =1 indicates that there is a connection between node k and node l, A kl =0 means there is no connection between them.
4. The power grid sensor recovery method according to claim 3, It is characterized in that In step S2, the decision information in fault recovery represented by graph data includes: The sensor data is represented as a sensor feature matrix X, where X∈R N×M , N represents the number of sensors, M represents the number of features of each sensor; the network topology of the power grid is represented by the adjacency matrix A, where A∈0,1 K×K , K represents the number of nodes; based on these data, a graph G = (V, E) is constructed, where V is the node set corresponding to the sensor, and E is the edge set corresponding to the connection relationship between sensors; each node v i ∈V corresponds to a sensor, and each edge (v i , v j )∈E represents sensor v i and v j There is a connection between them; at the same time, the sensor feature matrix X is used as the feature of the node, and the graph G represents the attributes of each node.
5. The power grid sensor recovery method according to claim 4, Features: The front graph neural network in step S3 includes two graph convolution layers, which are GCN 1 and GCN 2 ; The input feature of the graph convolution layer is defined as H (0) , where G (0) The sensor feature matrix X is N×M, and the input feature is H (0) Represents the initial feature representation of each node, N is the number of nodes, M is the feature dimension of each node, through GCN 1 and GCN 2 Process the input features to obtain the output features H (1) and H (2) , its specific expression is, H (1) =GCN 1 (A,H (0) ),H (2) =GCN 2 (A,H (1) ).
6. The power grid sensor recovery method according to claim 5, It is characterized in that The evaluation network in step S4 is GCN eval1 and GCN eval2 , the target network is GCN target1 and GCN target2 ; The expression for evaluating the network to extract the network topology and sensor features is: The expression of the target network to extract the network topology and sensor features is:
7. The power grid sensor recovery method according to claim 6, It is characterized in that In step S4, it also includes processing the network topology and sensor features extracted from the evaluation network and the target network using a fully connected layer; The processing expression of the data obtained by the fully connected layer processing evaluation network is: Where a is the sensor recovery action, Q'(s, a) is the value of action a; The processing expression of the data obtained by the fully connected layer processing the target network is: Where Q'(s', a) is the target value during reinforcement learning model training.
8. The power grid sensor fault recovery method according to claim 7, Features: The recovery strategy output in step S5 includes selecting the best action in the current state according to the output Q(s, a) of the evaluation network. The expression of the best action is: The best action is
