A method for locating a high-impedance ground fault of a smart distribution network with topology change adaptation, comprising the following steps:
- S1:
- measuring, by measurement apparatuses, a traveling wave to acquire a fault traveling wave sample within a specified time window after a fault occurs, and performing continuous wavelet transform on the fault traveling wave sample to obtain traveling wave full waveform feature information, wherein a plurality of nodes, corresponding to busbars or feeders, are switchably connected as a tree graph structure and each of said measurement apparatuses are disposed at a respective busbar or feeder denoted by a respective node of the plurality of nodes that is connected to or is switchably connected to at least three other busbars or feeders denoted by at least three other respective nodes of the plurality of nodes;
- S2:
- establishing a graph structure of a power distribution network with the busbars or feeders as the plurality of nodes and power distribution lines between the busbars or the feeders as edges based on a topology of the power distribution network, obtaining a corresponding adjacency matrix, and obtaining node position and structure information in the graph structure through graph random walk and graph Laplace transform;
- and concatenating the node position, the structure information and the traveling wave full waveform feature information to obtain a node feature, and inputting the node feature and an edge feature into the graph structure to establish a graph sample data set;
- wherein S2 comprises:
- obtaining an adjacency matrix A and a degree matrix D of a graph, and calculating a random walk matrix M:
- M
- =
- D
- -
- 1
-
- A
- (
- 2
- )
- wherein each element Mij of the random walk matrix M represents a probability of one step from a node i to a node j in a simple random walk;
- summing non-diagonal elements of an m-step random walk matrix to obtain wm:
- w
- m
- =
- ∑
- i
- (
- D
- -
- 1
-
- A
- )
- m
- -
- w
- =
- m
- (
- 3
- )
- wherein wm represents obtaining a diagonal of the m-step random walk matrix:
- w
- =
- m
- =
- diag
-
- (
- (
- D
- -
- 1
-
- A
- )
- m
- )
- (
- 4
- )
- wm and wm contain local position and structure information of the node i, and a value of m is selected based on a topology size of the graph;
- calculating a Laplace matrix Lsym of the graph based on the adjacency matrix A and the degree matrix D:
- L
- sym
- =
- I
- -
- D
- -
- 1
- 2
-
- AD
- -
- 1
- 2
- (
- 5
- )
- wherein I is an identity matrix;
- calculating an eigenvalue λk of Lsym and a corresponding eigenvector φk;
- obtaining non-zero eigenvalues and concatenating eigenvectors corresponding to the non-zero eigenvalues into a matrix H, wherein each row of the matrix H corresponds to a representation of a node in an eigenspace;
- and capturing global position information of the node;
- calculating a gradient ∇φk of the eigenvector φk as relative position information of the node;
- and using, as relative structure information, a Boolean value indicating whether two nodes belong to a same substructure, wherein a cosine similarity of traveling wave full waveform feature information of the two nodes is calculated to determine whether the two nodes belong to the same substructure, and when the cosine similarity is less than a preset threshold, the Boolean value is False, or when the cosine similarity is greater than the preset threshold, the Boolean value is True;
- performing batch normalization on wm, wm, φk, ∇φk, and λk, and concatenating the traveling wave full waveform feature information, wherein Z denotes the traveling wave full waveform feature information, wm, wm, φk, and λk to obtain a node feature x containing the node position, the structure information and the traveling wave full waveform feature information;
- concatenating ∇φk, the relative structure information, and edge feature information to obtain an edge feature e;
- and
- inputting the node feature and the edge feature into the graph to establish the graph sample data set;
- and setting a traveling wave full waveform feature of a corresponding busbar of the busbars or a corresponding feeder of the feeders without a measurement device to 0, and concatenating wm, wm, φk, and λk corresponding to a case of no measurement device to obtain a node feature of the feeder without the measurement device;
- S3:
- in an offline stage, constructing a Graph Transformer model, and training the Graph Transformer model by locating the high-impedance ground fault through a graph classification task, to obtain a trained Graph Transformer model;
- and
- S4:
- in an online stage, calling the trained Graph Transformer model to locate a fault in to-be-detected sample data.