A power grid single fault positioning method and device, a terminal device and a storage medium
By constructing a graph neural network model and combining it with the topology information of the power grid for fault location, the problem of insufficient accuracy in locating single faults in the power grid in existing technologies has been solved, and higher fault location accuracy has been achieved.
Patent Information
- Application Number
- CN202411114327.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-08-14
AI Technical Summary
Existing artificial intelligence methods fail to fully consider the topological information between nodes and branches in the localization of single faults in power grids, resulting in low accuracy in fault location.
A graph neural network model is constructed. By obtaining the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix, and node adjacency matrix, and combining graph attention network and feature network layer, a single fault location model is generated, and fault location is performed considering the topological relationship.
It improves the accuracy of the output results of the single fault location model, enabling more accurate identification of faulty components in the power grid.
Smart Images

Figure CN118962337B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault location technology, and in particular to a method, apparatus, terminal equipment and storage medium for locating a single fault in a power grid. Background Technology
[0002] In power systems, single fault location refers to the method of accurately determining the location of a fault when a single component (e.g., a transmission line or a transformer) fails. This method is crucial for ensuring the reliability of the power grid and the rapid restoration of power supply. Existing methods for single fault location mainly include line longitudinal protection, transformer protection, telemetry signal analysis, fault waveform analysis, and artificial intelligence methods. The mainstream method currently is artificial intelligence, which learns from historical fault data and automatically extracts fault features to achieve rapid fault location. However, existing artificial intelligence methods do not consider the topological information between grid nodes and branches, resulting in lower accuracy in fault location analysis because they do not account for the connections between nodes and branches. Summary of the Invention
[0003] This invention provides a method, apparatus, terminal equipment, and storage medium for locating single faults in a power grid, which can fully consider the topological relationship between power grid nodes and branches, and improve the accuracy of the output results of the single fault location model.
[0004] An embodiment of the present invention provides a method for locating a single fault in a power grid, comprising:
[0005] Obtain the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix, and node adjacency matrix of the power grid to be tested; wherein, the power grid to be tested has only one fault;
[0006] The node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix, and node adjacency matrix of the power grid to be tested are input into a single fault location model so that the single fault location model outputs a faulty component of the power grid to be tested; wherein, the component includes nodes and branches.
[0007] Furthermore, the construction of the single fault location model includes:
[0008] Historical fault data of the power grid is acquired, and a training sample set is determined based on the historical fault data; wherein, the training sample set includes: node three-phase current matrix samples, node three-phase voltage matrix samples, branch power matrix samples, branch adjacency matrix samples, node adjacency matrix samples, and fault label matrix;
[0009] A graph neural network is constructed, and the graph neural network is trained with the training sample set. When the graph neural network reaches the preset convergence condition, a single fault location model is generated.
[0010] Furthermore, the single fault localization model includes: a first graph attention network layer, a second graph attention network layer, a first feature network layer, a second feature network layer, a third feature network layer, a fourth feature network layer, a first normalization layer, and a second normalization layer.
[0011] The process of inputting the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix, and node adjacency matrix of the power grid to be tested into a single fault location model includes:
[0012] The node three-phase current matrix is generated by concatenating the node three-phase current matrix and the node three-phase voltage matrix;
[0013] The node three-phase current-voltage matrix and node adjacency matrix are input into the first graph attention network layer so that the first graph attention network layer aggregates the adjacency node information to obtain the first aggregated output;
[0014] The branch power matrix and the branch adjacency matrix are input into the second graph attention network layer so that the second graph attention network layer aggregates the branch information and obtains the second aggregated output;
[0015] The first aggregated output and the second aggregated output are input to the first feature network layer, so that the first feature network layer extracts the first feature data and inputs the first feature data into the second feature network layer;
[0016] The second feature network layer optimizes the first feature data to generate the second feature data, and then inputs the second feature data into the third feature network layer through the first normalization layer;
[0017] The third feature network layer adjusts the second feature data to generate the third feature data, and inputs the third feature data into the fourth feature network layer through the second normalization layer, so that the fourth feature network layer combines the Softmax function to output a faulty component of the power grid to be detected.
[0018] The first feature data includes: three-phase current characteristics of the first node, three-phase voltage characteristics of the first node, topology characteristics of the first node, power characteristics of the first branch, and topology characteristics of the first branch; the second feature data includes: three-phase current characteristics of the second node, three-phase voltage characteristics of the second node, topology characteristics of the second node, power characteristics of the second branch, and topology characteristics of the second branch; the third feature data includes: three-phase current characteristics of the third node, three-phase voltage characteristics of the third node, topology characteristics of the third node, power characteristics of the third branch, and topology characteristics of the third branch.
[0019] Furthermore, the preset convergence condition includes: reaching a preset number of iterations or minimizing the loss function;
[0020] The loss function is specifically as follows:
[0021]
[0022] in, The loss function of the graph neural network is represented by y; N is the total number of nodes in the power grid to be detected; M is the total number of branches in the power grid to be detected; and y is the one-hot encoded vector of the fault label. Let be the probability distribution vector of the predicted fault labels for the graph neural network.
[0023] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments;
[0024] One embodiment of the present invention provides a single fault location device for a power grid, comprising: a data acquisition module and a fault location module;
[0025] The data acquisition module is used to acquire the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix and node adjacency matrix of the power grid to be detected.
[0026] The fault location module is used to input the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix and node adjacency matrix of the power grid to be tested into a single fault location model, so that the single fault location model outputs a faulty component of the power grid to be tested; wherein, the component includes nodes and branches.
[0027] Furthermore, the construction of the single fault location model includes:
[0028] Historical fault data of the power grid is acquired, and a training sample set is determined based on the historical fault data; wherein, the training sample set includes: node three-phase current matrix samples, node three-phase voltage matrix samples, branch power matrix samples, branch adjacency matrix samples, node adjacency matrix samples, and fault label matrix;
[0029] A graph neural network is constructed, and the graph neural network is trained with the training sample set. When the graph neural network reaches the preset convergence condition, a single fault location model is generated.
[0030] Furthermore, the single fault localization model includes: a first graph attention network layer, a second graph attention network layer, a first feature network layer, a second feature network layer, a third feature network layer, a fourth feature network layer, a first normalization layer, and a second normalization layer.
[0031] The process of inputting the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix, and node adjacency matrix of the power grid to be tested into a single fault location model includes:
[0032] The node three-phase current matrix is generated by concatenating the node three-phase current matrix and the node three-phase voltage matrix;
[0033] The node three-phase current-voltage matrix and node adjacency matrix are input into the first graph attention network layer so that the first graph attention network layer aggregates the adjacency node information to obtain the first aggregated output;
[0034] The branch power matrix and the branch adjacency matrix are input into the second graph attention network layer so that the second graph attention network layer aggregates the branch information and obtains the second aggregated output;
[0035] The first aggregated output and the second aggregated output are input to the first feature network layer, so that the first feature network layer extracts the first feature data and inputs the first feature data into the second feature network layer;
[0036] The second feature network layer optimizes the first feature data to generate the second feature data, and then inputs the second feature data into the third feature network layer through the first normalization layer;
[0037] The third feature network layer adjusts the second feature data to generate the third feature data, and inputs the third feature data into the fourth feature network layer through the second normalization layer, so that the fourth feature network layer combines the Softmax function to output a faulty component of the power grid to be detected.
[0038] The first feature data includes: three-phase current characteristics of the first node, three-phase voltage characteristics of the first node, topology characteristics of the first node, power characteristics of the first branch, and topology characteristics of the first branch; the second feature data includes: three-phase current characteristics of the second node, three-phase voltage characteristics of the second node, topology characteristics of the second node, power characteristics of the second branch, and topology characteristics of the second branch; the third feature data includes: three-phase current characteristics of the third node, three-phase voltage characteristics of the third node, topology characteristics of the third node, power characteristics of the third branch, and topology characteristics of the third branch.
[0039] Furthermore, the preset convergence condition includes: reaching a preset number of iterations or minimizing the loss function;
[0040] The loss function is specifically as follows:
[0041]
[0042] in, The loss function of the graph neural network is represented by y; N is the total number of nodes in the power grid to be detected; M is the total number of branches in the power grid to be detected; and y is the one-hot encoded vector of the fault label. Let be the probability distribution vector of the predicted fault labels for the graph neural network.
[0043] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a power grid single fault location method as described in the above-described embodiment of the invention.
[0044] Another embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to execute the single fault location method for power grid described in the above-described embodiment of the invention.
[0045] The following benefits can be obtained by implementing the present invention:
[0046] This invention provides a method, apparatus, terminal equipment, and storage medium for locating a single fault in a power grid. The method involves acquiring the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix, and node adjacency matrix of a power grid under test with only one fault. This acquired power grid data is then input into a single fault location model, which outputs the faulty node or branch in the power grid. When determining the fault in the power grid, the single fault location model considers the branch adjacency matrix and node adjacency matrix during fault location, determining the node and branch topology based on the adjacency matrix, thereby improving the accuracy of the single fault location model's output. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating a method for locating a single fault in a power grid, provided by an embodiment of the present invention.
[0048] Figure 2 This is a schematic diagram of a single fault location network structure provided in an embodiment of the present invention.
[0049] Figure 3 This is a schematic diagram of the structure of a single fault location device for a power grid provided in an embodiment of the present invention. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] like Figure 1 The image shows a method for locating a single fault in a power grid according to an embodiment of the present invention, comprising:
[0052] Step S1: Obtain the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix, and node adjacency matrix of the power grid to be tested; wherein, the power grid to be tested has only one fault;
[0053] Step S2: Input the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix and node adjacency matrix of the power grid to be tested into the single fault location model, so that the single fault location model outputs a faulty component of the power grid to be tested; wherein, the component includes nodes and branches.
[0054] For step S1, obtain the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix, and node adjacency matrix of the power grid to be tested. It should be noted that this invention mainly targets fault location in power grids where only one fault exists, i.e., a single node fault or a single branch fault. Preferably, before inputting the node three-phase current matrix and node three-phase voltage matrix into the single fault location model, they can be concatenated into a node three-phase current-voltage matrix. Specifically, the node three-phase current-voltage matrix F1 has dimensions (6,39) and is formed by concatenating the node three-phase current matrix I (I1,I2,I3) and the node three-phase voltage matrix U (U1,U2,U3). The branch power matrix F2 has dimensions (4,46) and is composed of the active power injection matrices Pline_f(1,46), Pline_t(1,46), and reactive power injection matrices Qline_f(1,46), Qline_t(1,46), where f represents forward and t represents reverse. The node adjacency matrix A1 has dimensions (39,39). Nodes i and j are adjacent if there is a branch between them. The corresponding element a in this matrix... ij =1, otherwise a ij =0. The branch adjacency matrix A2 has dimensions (46, 46). If branches h and k have a common node, they are adjacent. The corresponding element b in this matrix is... hk =1, otherwise b hk =0.
[0055] For step S2, the data obtained in step S1 is input into the single fault location model to determine the faulty node or branch in the power grid to be tested. Specifically, based on the node three-phase current-voltage matrix F1, the branch power matrix F2, the node adjacency matrix A1, and the branch adjacency matrix A2, the single fault location model obtains a fault location probability matrix D(1,85), which is formed by concatenating the node fault location probability matrix D1(1,39) and the branch fault location probability matrix D2(1,46). Each element of this matrix represents the probability of a fault occurring in the corresponding node / branch, and the sum of all element values is 1. The node / branch with the highest probability in the fault location probability matrix D is the component that the network determines has a fault.
[0056] By inputting the branch adjacency matrix and node adjacency matrix when detecting faulty components in the power grid under test using a single fault location model, the topological relationships between nodes and branches in the power grid under test can be combined, which can effectively learn the graph feature association relationships in complex power grid systems, thereby improving the accuracy of the output results of the single fault location model.
[0057] In a preferred embodiment, the construction of the single fault location model includes: acquiring historical fault data of the power grid, and determining a training sample set based on the historical fault data; wherein, the training sample set includes: node three-phase current matrix samples, node three-phase voltage matrix samples, branch power matrix samples, branch adjacency matrix samples, node adjacency matrix samples, and fault label matrix; constructing a graph neural network, training the graph neural network with the training sample set, and generating a single fault location model when the graph neural network reaches a preset convergence condition.
[0058] Specifically, historical fault data of the power grid is acquired, typically from the power grid under test. This historical fault data is preprocessed to obtain a training sample set containing node three-phase current matrix samples, node three-phase voltage matrix samples, branch power matrix samples, branch adjacency matrix samples, node adjacency matrix samples, and a fault label matrix. The node three-phase current matrix samples and node three-phase voltage matrix samples are concatenated to obtain the node three-phase current-voltage matrix samples. This results in a training sample set containing node three-phase current-voltage matrix samples, branch power matrix samples, branch adjacency matrix samples, node adjacency matrix samples, and a fault label matrix. A system is then constructed... Figure 2 The graph neural network shown is a GFL-Net (Graph-based Fault Location Net) network structure. This graph neural network is trained using the constructed training sample set until it reaches a preset convergence condition, at which point it generates a single fault location model.
[0059] In a preferred embodiment, the preset convergence condition includes: reaching a preset number of iterations or minimizing the loss function; the loss function is specifically:
[0060]
[0061] in, The loss function of the graph neural network is represented by y; N is the total number of nodes in the power grid to be detected; M is the total number of branches in the power grid to be detected; and y is the one-hot encoded vector of the fault label. Let be the probability distribution vector of the predicted fault labels for the graph neural network.
[0062] Specifically, the preset convergence conditions include reaching a preset number of iterations or minimizing the loss function. For the loss function, this invention uses the cross-entropy loss function for training. The cross-entropy loss function measures the difference between two probability distributions and can evaluate the degree of matching between the model's output distribution and the true label distribution. The specific loss function is shown above.
[0063] During graph neural network training, the learning rate is set and the training dataset is iterated multiple times (epochs). In each iteration, the network parameters are adjusted to minimize the loss function. The loss on the validation set reaches a preset threshold or no longer decreases significantly. After training is complete, the final output is a fault location probability matrix D indicating the existence of only a single fault. The fault node or fault branch is then determined based on the fault location probability matrix D.
[0064] In a preferred embodiment, the single fault location model includes: a first graph attention network layer, a second graph attention network layer, a first feature network layer, a second feature network layer, a third feature network layer, a fourth feature network layer, a first normalization layer, and a second normalization layer.
[0065] The process of inputting the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix, and node adjacency matrix of the power grid to be tested into a single fault location model includes:
[0066] The node three-phase current matrix is generated by concatenating the node three-phase current matrix and the node three-phase voltage matrix;
[0067] The node three-phase current-voltage matrix and node adjacency matrix are input into the first graph attention network layer so that the first graph attention network layer aggregates the adjacency node information to obtain the first aggregated output;
[0068] The branch power matrix and the branch adjacency matrix are input into the second graph attention network layer so that the second graph attention network layer aggregates the branch information and obtains the second aggregated output;
[0069] The first aggregated output and the second aggregated output are input to the first feature network layer, so that the first feature network layer extracts the first feature data and inputs the first feature data into the second feature network layer;
[0070] The second feature network layer optimizes the first feature data to generate the second feature data, and then inputs the second feature data into the third feature network layer through the first normalization layer;
[0071] The third feature network layer adjusts the second feature data to generate the third feature data, and inputs the third feature data into the fourth feature network layer through the second normalization layer, so that the fourth feature network layer combines the Softmax function to output a faulty component of the power grid to be detected.
[0072] The first feature data includes: three-phase current characteristics of the first node, three-phase voltage characteristics of the first node, topology characteristics of the first node, power characteristics of the first branch, and topology characteristics of the first branch; the second feature data includes: three-phase current characteristics of the second node, three-phase voltage characteristics of the second node, topology characteristics of the second node, power characteristics of the second branch, and topology characteristics of the second branch; the third feature data includes: three-phase current characteristics of the third node, three-phase voltage characteristics of the third node, topology characteristics of the third node, power characteristics of the third branch, and topology characteristics of the third branch.
[0073] Specifically, such as Figure 2 As shown, the single fault localization model includes a first graph attention network layer GAT_1, a second graph attention network layer GAT_2, a first feature network layer MLP (the MLP connected to the feature-direction MLP in the figure), a second feature network layer feature-direction MLP, a third feature network layer channel-direction MLP, a fourth feature network layer MLP (the MLP connected to LayerNorm3() in the figure), a first normalization layer LayerNorm1(), and a second normalization layer LayerNorm3().
[0074] Before inputting data into the single fault location model, the feature direction of the feature input matrix is first defined as 39 dimensions (or 46 dimensions), and the channel direction is defined as 6 dimensions (or 4 dimensions).
[0075] By concatenating the node three-phase current matrix and the node three-phase voltage matrix, we obtain the node three-phase current and voltage matrix F1 = {I1, I2, I3, V1, V2, V3}, F1 ∈ R. 6*N The node three-phase current-voltage matrix F1 and the node adjacency matrix A1∈{1,0} are used to define the three-phase current-voltage matrix F1 and the node adjacency matrix A1∈{1,0}. N*NThe input is fed into the first graph attention network layer GAT_1 to obtain the first aggregated output; the branch power matrix F2 = {Pline_f, Pline_t, Qline_f, Qline_t}, F2 ∈ R 4*N The adjacency matrix of branches A2∈{1,0} M*M Inputting the second graph attention network layer GAT_2 yields the second aggregated output. It's important to note that GAT_1 is a graph attention network whose function is to aggregate information from neighboring nodes by assigning different attention weights to each node, thereby obtaining the implicit representation of each node. Similarly, GAT_2's function is to aggregate information from neighboring branches by assigning different attention weights to each branch, thereby obtaining the implicit representation of each branch. The first and second aggregated outputs are input to the first feature network layer MLP, a fully connected neural network. Its function is to perform preliminary processing on the features of nodes and edges, extracting useful high-dimensional features. These extracted high-dimensional features (i.e., the aforementioned first feature data) are then input to the second feature network layer, feature-direction MLP, which further processes the high-dimensional features to obtain the second feature data. This second feature data is then passed through the first normalization layer (LayerNorm1()) and input to the third feature network layer, channel-direction MLP, which processes and adjusts the input feature vector to obtain the third feature data. This third feature data is then processed by the non-linear activation function ReLU(), regularization Dropout(0.2), and the second normalization layer (LayerNorm3()) before being input to the fourth feature network layer MLP. Finally, the softmax function is used to determine the fault location probability matrix D∈{0,1}. 1*(N+M) The fault location probability matrix D is derived from the node fault location probability matrix D1∈{0,1}. 1*N The probability matrix for branch fault location is D2∈{0,1} 1*M Composition. The node / branch corresponding to the element with the highest probability value in the fault location probability matrix D is identified as the component currently experiencing a fault.
[0076] pred = max(Di)
[0077] Where D i is the element value (probability value) in matrix D, and pred is the predicted faulty component.
[0078] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.
[0079] like Figure 3As shown, an embodiment of the present invention provides a single fault location device for a power grid, comprising: a data acquisition module and a fault location module;
[0080] The data acquisition module is used to acquire the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix and node adjacency matrix of the power grid to be detected.
[0081] The fault location module is used to input the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix and node adjacency matrix of the power grid to be tested into a single fault location model, so that the single fault location model outputs a faulty component of the power grid to be tested; wherein, the component includes nodes and branches.
[0082] In a preferred embodiment, the construction of the single fault location model includes:
[0083] Historical fault data of the power grid is acquired, and a training sample set is determined based on the historical fault data; wherein, the training sample set includes: node three-phase current matrix samples, node three-phase voltage matrix samples, branch power matrix samples, branch adjacency matrix samples, node adjacency matrix samples, and fault label matrix;
[0084] A graph neural network is constructed, and the graph neural network is trained with the training sample set. When the graph neural network reaches the preset convergence condition, a single fault location model is generated.
[0085] In a preferred embodiment, the single fault location model includes: a first graph attention network layer, a second graph attention network layer, a first feature network layer, a second feature network layer, a third feature network layer, a fourth feature network layer, a first normalization layer, and a second normalization layer.
[0086] The process of inputting the node three-phase current matrix, node three-phase voltage matrix, branch power matrix, branch adjacency matrix, and node adjacency matrix of the power grid to be tested into a single fault location model includes:
[0087] The node three-phase current matrix is generated by concatenating the node three-phase current matrix and the node three-phase voltage matrix;
[0088] The node three-phase current-voltage matrix and node adjacency matrix are input into the first graph attention network layer so that the first graph attention network layer aggregates the adjacency node information to obtain the first aggregated output;
[0089] The branch power matrix and the branch adjacency matrix are input into the second graph attention network layer so that the second graph attention network layer aggregates the branch information and obtains the second aggregated output;
[0090] The first aggregated output and the second aggregated output are input to the first feature network layer, so that the first feature network layer extracts the first feature data and inputs the first feature data into the second feature network layer;
[0091] The second feature network layer optimizes the first feature data to generate the second feature data, and then inputs the second feature data into the third feature network layer through the first normalization layer;
[0092] The third feature network layer adjusts the second feature data to generate the third feature data, and inputs the third feature data into the fourth feature network layer through the second normalization layer, so that the fourth feature network layer combines the Softmax function to output a faulty component of the power grid to be detected.
[0093] The first feature data includes: three-phase current characteristics of the first node, three-phase voltage characteristics of the first node, topology characteristics of the first node, power characteristics of the first branch, and topology characteristics of the first branch; the second feature data includes: three-phase current characteristics of the second node, three-phase voltage characteristics of the second node, topology characteristics of the second node, power characteristics of the second branch, and topology characteristics of the second branch; the third feature data includes: three-phase current characteristics of the third node, three-phase voltage characteristics of the third node, topology characteristics of the third node, power characteristics of the third branch, and topology characteristics of the third branch.
[0094] In a preferred embodiment, the preset convergence condition includes: reaching a preset number of iterations or minimizing the loss function;
[0095] The loss function is specifically as follows:
[0096]
[0097] in, The loss function of the graph neural network is represented by y; N is the total number of nodes in the power grid to be detected; M is the total number of branches in the power grid to be detected; and y is the one-hot encoded vector of the fault label. Let be the probability distribution vector of the predicted fault labels for the graph neural network.
[0098] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0099] Those skilled in the art will clearly understand that, for convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0100] Based on the above method embodiments, the present invention provides corresponding terminal device embodiments.
[0101] One embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a single fault location method for a power grid as described in any one of the present invention.
[0102] The terminal device can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The terminal device may include, but is not limited to, a processor and a memory.
[0103] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0104] The memory can be used to store the computer program. The processor implements various functions of the terminal device by running or executing the computer program stored in the memory and calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0105] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments.
[0106] One embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to execute a single fault location method for power grids as described in any one of the present invention.
[0107] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0108] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for single fault location in an electrical network, characterized in that, The method comprises: obtaining a node three-phase current matrix, a node three-phase voltage matrix, a branch power matrix, a branch adjacency matrix and a node adjacency matrix of a power grid to be detected; wherein the power grid to be detected has only one fault; inputting the node three-phase current matrix, the node three-phase voltage matrix, the branch power matrix, the branch adjacency matrix and the node adjacency matrix of the power grid to be detected into a single fault locating model, so that the single fault locating model outputs a fault component of the power grid to be detected; wherein the component includes a node and a branch; wherein the single fault locating model comprises: a first graph attention network layer, a second graph attention network layer, a first feature network layer, a second feature network layer, a third feature network layer, a fourth feature network layer, a first normalization layer and a second normalization layer; the inputting the node three-phase current matrix, the node three-phase voltage matrix, the branch power matrix, the branch adjacency matrix and the node adjacency matrix of the power grid to be detected into the single fault locating model comprises: splicing the node three-phase current matrix and the node three-phase voltage matrix to generate a node three-phase current voltage matrix; inputting the node three-phase current voltage matrix and the node adjacency matrix into the first graph attention network layer, so that the first graph attention network layer aggregates adjacency node information to obtain a first aggregation output; inputting the branch power matrix and the branch adjacency matrix into the second graph attention network layer, so that the second graph attention network layer aggregates branch information to obtain a second aggregation output; the first aggregation output and the second aggregation output are input into the first feature network layer, so that the first feature network layer extracts first feature data and inputs the first feature data into the second feature network layer; the second feature network layer optimizes the first feature data to generate second feature data, and inputs the second feature data into the third feature network layer through the first normalization layer; the third feature network layer adjusts the second feature data to generate third feature data, and inputs the third feature data into the fourth feature network layer through the second normalization layer, so that the fourth feature network layer outputs a fault component of the power grid to be detected in combination with a Softmax function; wherein the first feature data comprises: first node three-phase current features, first node three-phase voltage features, first node topology features, first branch power features and first branch topology features; the second feature data comprises: second node three-phase current features, second node three-phase voltage features, second node topology features, second branch power features and second branch topology features; and the third feature data comprises: third node three-phase current features, third node three-phase voltage features, third node topology features, third branch power features and third branch topology features.
2. A power grid single fault location method as claimed in claim 1, characterized in that, The construction of the single fault locating model comprises: obtaining historical fault data of a power grid, and determining a training sample set according to the historical fault data; wherein the training sample set comprises: a node three-phase current matrix sample, a node three-phase voltage matrix sample, a branch power matrix sample, a branch adjacency matrix sample, a node adjacency matrix sample and a fault label matrix; A graph neural network is constructed, and the graph neural network is trained by using the training sample set. When the graph neural network reaches a preset convergence condition, a single fault location model is generated.
3. A power grid single fault location method as claimed in claim 2, characterized in that, The preset convergence condition includes reaching a preset iteration number or a minimum loss function. The loss function is specifically: wherein, represents a loss function of the graph neural network; is the total number of nodes of the power grid to be detected; is the total number of branches of the power grid to be detected; is a one-hot encoding vector of the fault label; is a probability distribution vector of the predicted fault label of the graph neural network.
4. An electrical grid single fault location device characterized by, It includes: A data acquisition module and a fault location module; The data acquisition module is configured to acquire a node three-phase current matrix, a node three-phase voltage matrix, a branch power matrix, a branch adjacency matrix, and a node adjacency matrix of a power grid to be detected. The fault location module is configured to input the node three-phase current matrix, the node three-phase voltage matrix, the branch power matrix, the branch adjacency matrix, and the node adjacency matrix of the power grid to be detected into the single fault location model, so that the single fault location model outputs a fault component of the power grid to be detected; wherein the component includes a node and a branch. The single fault location model includes a first graph attention network layer, a second graph attention network layer, a first feature network layer, a second feature network layer, a third feature network layer, a fourth feature network layer, a first normalization layer, and a second normalization layer. The input of the node three-phase current matrix, the node three-phase voltage matrix, the branch power matrix, the branch adjacency matrix, and the node adjacency matrix of the power grid to be detected into the single fault location model includes: The node three-phase current matrix and the node three-phase voltage matrix are spliced to generate a node three-phase current voltage matrix; The node three-phase current voltage matrix and the node adjacency matrix are input into the first graph attention network layer, so that the first graph attention network layer aggregates adjacency node information to obtain a first aggregation output; The branch power matrix and the branch adjacency matrix are input into the second graph attention network layer, so that the second graph attention network layer aggregates branch information to obtain a second aggregation output; The first aggregation output and the second aggregation output are input into the first feature network layer, so that the first feature network layer extracts first feature data and inputs the first feature data into the second feature network layer; The second feature network layer optimizes the first feature data to generate second feature data, and inputs the second feature data into the third feature network layer through the first normalization layer; The third feature network layer adjusts the second feature data to generate third feature data, and inputs the third feature data into the fourth feature network layer through the second normalization layer, so that the fourth feature network layer outputs a fault component of the power grid to be detected in combination with a Softmax function; The first feature data includes a first node three-phase current feature, a first node three-phase voltage feature, a first node topology feature, a first branch power feature, and a first branch topology feature; the second feature data includes a second node three-phase current feature, a second node three-phase voltage feature, a second node topology feature, a second branch power feature, and a second branch topology feature; and the third feature data includes a third node three-phase current feature, a third node three-phase voltage feature, a third node topology feature, a third branch power feature, and a third branch topology feature.
5. A power grid single fault location apparatus as claimed in claim 4, characterized in that, The construction of the single fault location model includes: Obtaining historical fault data of a power grid, and determining a training sample set according to the historical fault data; wherein the training sample set comprises a node three-phase current matrix sample, a node three-phase voltage matrix sample, a branch power matrix sample, a branch adjacency matrix sample, a node adjacency matrix sample, and a fault label matrix; constructing a graph neural network, training the graph neural network using the training sample set, and generating a single fault location model when the graph neural network reaches a preset convergence condition.
6. A power grid single fault location apparatus as claimed in claim 5, characterized in that, The preset convergence condition comprises reaching a preset iteration number or a minimum loss function. The loss function is specifically: wherein, represents a loss function of the graph neural network; is the total number of nodes of the power grid to be detected; is the total number of branches of the power grid to be detected; is a one-hot encoding vector of the fault label; is a probability distribution vector of the predicted fault label of the graph neural network.
7. A terminal device, characterized by comprising: A processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the power grid single fault location method according to any one of claims 1 to 3.
8. A storage medium, characterized by The storage medium comprises a stored computer program, wherein the storage medium controls a device where the storage medium is located to execute the power grid single fault location method according to any one of claims 1 to 3 when the computer program runs.
Citation Information
Patent Citations
Grid fault detection method and device based on graph neural network
CN115733730A
Power distribution network fault positioning model construction method and device and fault positioning method
CN118294754A