A method for quickly locating a fault section of a power distribution line
Patent Information
- Application Number
- CN202611428306.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]有鉴于此,本发明提供一种配电线路故障区段快速定位的方法,能够解决现有技术中存在配电网大规模故障场景下实时行波信号特征提取与多区段故障状态协同推断计算复杂度过高、无法满足百毫秒级实时定位要求的技术问题
[0025]本发明通过时域稀疏采样与频域压缩感知将行波信号压缩为低维频域特征向量,利用多尺度金字塔哈希稀疏感知定位模型的局部敏感哈希编码与图结构稀疏注意力将支路相关性计算复杂度从二次方降至近线性,采用张量分解将状态转移张量分解为低秩核心张量与因子矩阵乘积以消除状态空间维度爆炸,再由深度条件随机场时空协同推断模型结合平均场近似与置信度传播完成结构化推断,最终通过动态稀疏调节函数依据运行负载自适应调节哈希桶数量与掩码阈值参数,解决了大规模配电网场景下行波特征提取与多区段故障状态推断计算复杂度过高的技术问题。数据压缩使单周期存储量降至原始量的5%以内,哈希稀疏注意力将遍历范围限定在物理相邻哈希桶内,张量分解将存储规模从太字节级压缩至可接受内存范围,平均场近似避免了联合分布的精确推断开销,各环节的复杂度协同收敛,使全流程推理延迟降至百毫秒阈值以下。综上所述,本发明解决了背景技术中提到的配电网大规模故障场景下实时行波信号特征提取与多区段故障状态协同推断计算复杂度过高、无法满足百毫秒级实时定位要求的技术问题。
Smart Images

Figure CN123009501A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power distribution line fault technology, and more specifically, relates to a method for rapid location of faulty sections in power distribution lines. Background Technology
[0002] Rapid fault location in distribution lines is a core function of distribution network automation. Traditional methods rely on time-frequency analysis of transient traveling wave signals and the fully connected attention mechanism of graph neural networks, which have been widely used in small and medium-sized distribution networks. However, when the distribution network scales up to thousands of branches, the computational complexity of the fully connected attention mechanism increases quadratically with the number of nodes, and the computational complexity of the traveling wave signal... The Hz-level sampling rate results in an extremely large amount of data per cycle, making feature extraction impossible within a few hundred milliseconds using traditional time-frequency transformation. Simultaneously, the state transition matrix in scenarios of continuous faults and cascading trips reaches millions of times its size, exceeding acceptable engineering limits in terms of storage and inference overhead. In existing technologies, due to the complexity of large-scale distribution network topologies, high traveling wave sampling rates, and the explosive expansion of the spatial dimensions of multi-segment fault states, the computational complexity of existing feature extraction and inference methods rapidly increases with network size, making it impossible to complete the entire computation process within the time window required for real-time positioning. In other words, existing technologies suffer from excessively high computational complexity in real-time traveling wave signal feature extraction and multi-segment fault state collaborative inference in large-scale distribution network fault scenarios, failing to meet the requirements for millisecond-level real-time positioning. Summary of the Invention
[0003] In view of this, the present invention provides a method for rapid location of fault sections in power distribution lines, which can solve the technical problems in the prior art where the computational complexity of real-time traveling wave signal feature extraction and multi-section fault state collaborative inference is too high and cannot meet the requirements of real-time location at the level of hundreds of milliseconds in large-scale fault scenarios in power distribution networks.
[0004] This invention is implemented as follows: This invention provides a method for rapid location of fault sections in power distribution lines, comprising the following steps:
[0005] The transient traveling wave signal is sparsely sampled in the time domain, key frequency components are retained, the original sampled data is compressed into a low-dimensional frequency domain feature vector, and then fed into a multi-scale pyramid hash sparse sensing localization model for feature extraction.
[0006] The adjacency matrix of the distribution network is sparsified, and the sparse attention weights of the graph structure are constructed only for the branch pairs corresponding to the non-zero elements. The local sensitive hash encoder of the multi-scale pyramid hash sparse perception localization model is used to generate hash codes to realize the branch correlation calculation with linear complexity.
[0007] Tensor decomposition and low-rank approximation techniques are used to process the fault state transition tensor, decomposing the high-order transition tensor into the product of several core tensors and factor matrices, thus eliminating the state space dimension explosion problem caused by continuous faults and cascading trips.
[0008] The sparse feature vector output by the multi-scale pyramid hash sparse perception and localization model is used as the input of the observation layer and fed into the deep conditional random field spatiotemporal collaborative inference model. The univariate potential function and the binary potential function are fused through the global energy function to perform structured inference of the fault state label of each section.
[0009] In the inference stage of the deep conditional random field spatiotemporal collaborative inference model, the mean field approximation and confidence propagation algorithm are used to iteratively pass messages on the factor graph to output the fault probability distribution of each segment, and the candidate set of fault segments is determined by combining the correlation weight of sparse attention branches.
[0010] The adjustment value is calculated based on the dynamic sparse adjustment function. The hash bucket number parameter and mask threshold parameter of the multi-scale pyramid hash sparse perception positioning model are adaptively adjusted according to the interval to which the adjustment value belongs, and the final fault segment positioning result is output.
[0011] Specifically, the time-domain sparse sampling involves sampling high-sampling-rate signals at non-uniform intervals in the time domain, retaining only dense sampling points near the moment of signal abrupt change, and using sparse sampling points during the stable phase; the key frequency component refers to the set of frequencies corresponding to the frequency components that, after the transient traveling wave signal undergoes a fast Fourier transform, are arranged in descending order of their energy values, and whose cumulative energy accounts for a percentage of the total energy that reaches an energy percentage threshold.
[0012] The multi-scale pyramid hash sparse perception localization model consists of five parts connected in series: a multi-scale pyramid feature extractor, a learnable binary mask layer, a locality-sensitive hash encoder, a sorting and reorganization attention filter layer, and a physically constrained hash bucket construction module. The multi-scale pyramid feature extractor performs a four-level wavelet decomposition on the input low-dimensional frequency domain feature vector, and the four-level feature maps are spliced along the channel dimension to form a multi-scale feature vector.
[0013] The learnable binary mask layer receives multi-scale feature vectors, and the mask generation sub-network outputs the Bernoulli distribution parameters corresponding to each feature channel. During forward inference, the channel mask with parameters greater than the mask parameter threshold is set to 1 and the rest are set to 0 according to the hard thresholding rule. Only the feature channels with the mask ratio threshold before the activation value are retained to participate in subsequent calculations. During backpropagation, a pass-through estimator is used to bypass the non-differentiable points of the thresholding operation.
[0014] The locality-sensitive hash encoder uses multiple sets of hyperplane random projections to generate a 1-bit hash code for each set of hyperplanes. Multiple sets are concatenated to form a hash code, dividing the feature space into multiple hash buckets. The hyperplane normal vectors are optimized through gradient descent to maximize the hash collision probability of samples of the same fault type. The multiple projection weight matrices of the locality-sensitive hash encoder are independently allocated memory blocks on their respective channels, and the memory block size of each weight matrix is proportional to the number of corresponding feature channels.
[0015] The physical constraint hash bucket construction module uses the geographical distance and electrical distance of the line as additional hash dimensions to ensure that physically adjacent branches are mapped to neighboring hash buckets with the same or Hamming distance less than the Hamming distance threshold. During attention calculation, similarity is calculated only for key vectors in the hash bucket where the query vector is located and in neighboring buckets with Hamming distance less than the Hamming distance threshold.
[0016] The sorting and reorganizing attention filter layer, after calculating the initial attention score, sorts the items in descending order of score and discards weakly relevant items with a discard ratio threshold, performing value vector weighted aggregation only on high-scoring items; the feature tensor transfer between model layers adopts a pipelined hierarchical memory allocation method. The intermediate activation tensor of the layer in the first... Release immediately after layer calculation is complete.
[0017] The tensor decomposition and low-rank approximation technique refers to approximating a high-order transition tensor as the product of several low-dimensional core tensors and factor matrices through Tucker decomposition or CP decomposition; the dimensions of the core tensors in each modal direction do not exceed the rank threshold, thereby compressing the storage required for the state transition matrix to an acceptable memory range.
[0018] The deep conditional random field spatiotemporal collaborative inference model adopts a three-level structure of observation layer, hidden layer, and annotation layer; the parameters of the binary potential function are analytically derived from the power flow equation and short-circuit calculation of the distribution network, and the physical laws are hard-coded into the model structure; the neuron connection weight matrix between each layer of the hidden layer is allocated in blocks according to the segment number, and the weight submatrix corresponding to each segment is independently stored in a contiguous memory block.
[0019] The mean field approximation approximates the joint posterior distribution of the multivariate variables as the product of the independent marginal distributions of each variable, and updates the marginal distribution of each variable sequentially through coordinate ascending iteration; the convergence condition is that the change in the fault probability of each segment in two adjacent iterations is less than the convergence accuracy threshold.
[0020] The dynamic sparse adjustment function defines the adjustment value. The average hash bucket activation rate of the current inference batch The average number of convergence steps in the current iteration round Number of fault candidate segments in the current batch The result is obtained by weighted summation of three parameters; when the adjustment value is not less than the upper segment threshold, the number of hash buckets is reduced and the mask threshold is increased; when the adjustment value is not less than the lower segment threshold and less than the upper segment threshold, the default inference configuration is maintained; when the adjustment value is less than the lower segment threshold, the number of hash buckets is increased and the mask threshold is decreased.
[0021] The steps for constructing the training dataset for the multi-scale pyramid hash sparse sensing localization model include: constructing simulation scenarios based on a power distribution network simulation platform, including single-phase grounding faults, two-phase short-circuit faults, three-phase short-circuit faults, and open-circuit faults; generating simulation waveform data of no less than the minimum sample size threshold group for each fault type at each fault location; labeling each sample with the fault section number as a supervision label; dividing the dataset according to the training, verification, and testing ratio; and applying amplitude perturbation and time delay offset data augmentation to the low-dimensional frequency domain feature vectors in the training set.
[0022] The training steps of the multi-scale pyramid hash sparse perception localization model include: using the cross-entropy loss function as the main loss and adding hash collision contrast loss to optimize the hyperplane normal vector, so as to minimize the Hamming distance of the hash codes of sample pairs of the same fault type and maximize the Hamming distance of sample pairs of different fault types; and using the Adam optimizer, with the number of rounds in which the localization accuracy of the validation set does not improve continuously as the early stopping condition.
[0023] In the aforementioned confidence propagation algorithm, on the factor graph, each variable node and factor node iteratively exchange messages according to fixed rules. The message content is the probabilistic belief about the state of neighboring nodes. The message update rule simultaneously integrates the univariate potential function value output by the hidden layer depth features and the binary potential function value derived from the power flow equation.
[0024] Among them, the energy percentage threshold ranges from 3% to 8%; the mask ratio threshold ranges from 20% to 40%, with a value of 30%; the Hamming distance threshold ranges from 2 to 4, with a value of 3%; the dropout ratio threshold ranges from 40% to 60%, with a value of 50%; the rank threshold ranges from 8 to 15, with a value of 10; and the convergence accuracy threshold ranges from... to The value is Lower segment threshold The value range is from 0.25 to 0.35, and the upper segment threshold is... The value ranges from 0.60 to 0.75.
[0025] This invention compresses traveling wave signals into low-dimensional frequency domain feature vectors through temporal sparse sampling and frequency domain compressed sensing. It utilizes local sensitive hashing encoding and graph-structured sparse attention in a multi-scale pyramid hash sparse sensing localization model to reduce the computational complexity of branch correlation calculations from quadratic to near-linear. Tensor decomposition is employed to decompose the state transition tensor into a product of a low-rank core tensor and a factor matrix to eliminate state space dimensionality explosion. A deep conditional random field spatiotemporal co-inference model, combined with mean-field approximation and confidence propagation, completes structured inference. Finally, a dynamic sparse adjustment function adaptively adjusts the number of hash buckets and mask threshold parameters based on the operating load, solving the technical problem of excessive computational complexity in traveling wave feature extraction and multi-segment fault state inference in large-scale distribution network scenarios. Data compression reduces single-cycle storage to less than 5% of the original amount; hash sparse attention limits the traversal range to physically adjacent hash buckets; tensor decomposition compresses the storage scale from terabytes to an acceptable memory range; mean-field approximation avoids the overhead of precise inference from joint distributions; and the complexity of each stage converges collaboratively, reducing the overall inference latency to below a hundred milliseconds. In summary, this invention solves the technical problem mentioned in the background art that the computational complexity of real-time traveling wave signal feature extraction and multi-segment fault state collaborative inference in large-scale fault scenarios of distribution networks is too high, and cannot meet the requirements of real-time positioning at the level of hundreds of milliseconds. Attached Figure Description
[0026] Figure 1 This is a flowchart of the method of the present invention.
[0027] Figure 2 This is a graph showing the distribution of correlation weights of sparse attention branches and the activation statistics of hash buckets in this embodiment.
[0028] Figure 3 This diagram illustrates the output of the fault probability distribution for each section and the process of selecting the candidate set. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below.
[0030] like Figure 1 The diagram shown is a flowchart of a method for rapid location of fault sections in power distribution lines provided by the present invention. This method includes the following steps:
[0031] S01. Perform time-domain sparse sampling on the transient traveling wave signal, retaining the top 5% of key frequency components by energy percentage, and converting the original signal into a single signal. The sampled data is compressed into a low-dimensional frequency domain feature vector and fed into a multi-scale pyramid hash sparse perception localization model for feature extraction.
[0032] S02. Sparsify the adjacency matrix of the distribution network, construct sparse attention weights for the branch pairs corresponding to non-zero elements, and generate 16-bit hash codes using the local sensitive hash encoder of the multi-scale pyramid hash sparse perception localization model to achieve branch correlation calculation with linear complexity.
[0033] S03. Tensor decomposition and low-rank approximation techniques are used to process the fault state transition tensor. The high-order transition tensor is decomposed into the product of several core tensors with a rank of 10 and factor matrices to eliminate the state space dimension explosion problem caused by continuous faults and cascading trips.
[0034] S04. The sparse feature vector output by the multi-scale pyramid hash sparse perception and localization model is used as the input of the observation layer and fed into the deep conditional random field spatiotemporal collaborative inference model. The unary potential function and the binary potential function are fused through the global energy function to perform structured inference of the fault status label of each section.
[0035] S05. In the inference stage of the deep conditional random field spatiotemporal collaborative inference model, the mean field approximation and confidence propagation algorithm are used to iteratively pass messages on the factor graph, output the fault probability distribution of each segment, and combine the correlation weight of sparse attention branch to determine the candidate set of fault segments.
[0036] S06. Calculate the adjustment value based on the dynamic sparse adjustment function, and adaptively adjust the hash bucket number parameter and mask threshold parameter of the multi-scale pyramid hash sparse perception positioning model according to the interval to which the adjustment value belongs, and output the final fault segment positioning result.
[0037] The key frequency components refer to the set of frequencies that, after the transient traveling wave signal undergoes a fast Fourier transform and is arranged in descending order of the energy values of each frequency component, have a cumulative energy that accounts for 5% of the total energy. The 5% threshold is obtained through statistical analysis of the spectral energy distribution of different types of power distribution line fault simulation experiments. It is suggested that the value range be 3% to 8%, and the specific value is determined by experimental data.
[0038] The time-domain sparse sampling refers to sampling high-sampling-rate signals at non-uniform intervals in the time domain, retaining only dense sampling points near the moment of signal change, and using sparse sampling points in the stable segment, thereby significantly compressing the amount of data without losing fault characteristics; the frequency-domain compressed sensing joint mechanism refers to restoring the complete spectrum of the data obtained by time-domain sparse sampling through compressed sensing reconstruction algorithm, and then extracting key frequency components. The combined use of the two mechanisms reduces the amount of data stored in a single cycle to less than 5% of the original amount, and the inference latency is reduced to below the threshold of hundreds of milliseconds.
[0039] The graph-structured sparse attention refers to the fact that in a graph neural network, attention weights are calculated only between node pairs or branch pairs corresponding to non-zero elements in the adjacency matrix of the graph, rather than calculating fully connected attention for all node pairs. The computational complexity of traditional fully connected attention is the square of the number of nodes, while graph-structured sparse attention reduces the computational complexity to a linear relationship with the number of non-zero elements in the adjacency matrix, thus adapting to distribution networks with thousands of branches.
[0040] The tensor decomposition and low-rank approximation technique refers to approximating a high-order tensor describing multidimensional state transition relationships as the product of several low-dimensional core tensors and factor matrices through methods such as Tucker decomposition or CP decomposition. The rank of 10 means that the dimensions of the core tensors obtained by decomposition do not exceed 10 in any modal direction, thereby compressing the terabyte-level storage required for the original million-by-million-scale state transition matrix to an acceptable memory range. The rank value of 10 is determined by experimental analysis of the singular value distribution of the state transition matrix under different fault scenarios, and a value range of 8 to 15 is recommended. The specific value is determined by an experiment that balances decomposition error and storage overhead.
[0041] The multi-scale pyramid hash sparse-aware localization model is based on deep learning and its specific structure consists of five interconnected parts: a multi-scale pyramid feature extractor, a learnable binary mask layer, a locality-sensitive hash encoder, a sorting and reorganization attention filter layer, and a physically constrained hash bucket construction module. The multi-scale pyramid feature extractor performs a four-level wavelet decomposition on the input low-dimensional frequency domain feature vector. The first level extracts... to High-frequency detail feature map of the frequency band, second-level extraction to Mid-to-high frequency fluctuation feature map of the frequency band, third-level extraction to Mid-to-low frequency trend feature map of the frequency band, fourth level extraction The low-frequency trend feature maps of the above frequency bands are concatenated along the channel dimension to form multi-scale feature vectors. A learnable binary mask layer receives these multi-scale feature vectors, and the mask generation sub-network outputs the Bernoulli distribution parameters corresponding to each feature channel. During forward inference, channels with parameters greater than 0.5 are masked to 1, and the rest to 0, according to a hard thresholding rule, retaining only the top 30% of activated feature channels for subsequent calculations. During backpropagation, a pass-through estimator bypasses the non-differentiable points of the thresholding operation. The 30% threshold is determined through joint experiments on model localization accuracy and inference latency under different sparsity rates in the training set, with a suggested range of 20%–40%, the specific value to be determined by experimental data. The Locality Sensitive Hash Encoder uses 16 sets of hyperplane random projections, generating a 1-bit hash code for each hyperplane. These 16 sets are concatenated to form a 16-bit hash code, dividing the feature space into 65536 hash buckets. The hyperplane normal vector is not fixed but optimized through gradient descent to maximize the hash collision probability of samples of the same fault type. The 16 projection weight matrices of the Locality Sensitive Hash Encoder independently allocate memory blocks on their respective channels. The memory block size of each weight matrix is proportional to the number of corresponding feature channels, thus achieving a refined proportional allocation of memory among the encoder's projection layers. The sorting and reorganizing attention filter layer, after calculating the initial attention score, sorts the items in descending order of score and discards the bottom 50% of weakly relevant items, performing value vector weighted aggregation only on high-scoring items. This 50% discard ratio is determined experimentally based on the fault location recall rate under different discard rates, with a suggested range of 40%–60%, the specific value to be determined experimentally. The physical constraint hash bucket construction module uses geographical and electrical distances as additional hash dimensions to ensure that physically adjacent branches are mapped to neighboring hash buckets with the same or a Hamming distance of less than 3. The Hamming distance threshold of 3 is determined through statistical experiments on the distribution of hash codes of adjacent branches, and a value range of 2–4 is recommended. During attention calculation, similarity is calculated only for key vectors within the hash bucket containing the query vector and its neighboring buckets with a Hamming distance of less than 3, avoiding global traversal. Feature tensor transfer between model layers uses a pipelined approach with layered memory allocation. The intermediate activation tensor of the layer in the first... The memory is released immediately after the layer calculation is completed, so that the peak memory usage between layers is controlled within twice the maximum activation amount of a single layer.
[0042] The steps for establishing the training dataset of the multi-scale pyramid hash sparse sensing localization model specifically include: constructing a simulation scenario based on a power distribution network simulation platform, including single-phase grounding faults, two-phase short-circuit faults, three-phase short-circuit faults, and open-circuit faults, covering fault locations from 10% to 90% of the total line length, with a step size of 5%, and generating no less than 200 sets of simulation waveform data for each fault type at each fault location; performing the same time-domain sparse sampling and frequency-domain compressed sensing processing as in step S01 on the simulation waveform data to generate low-dimensional frequency-domain feature vectors; labeling each sample with a fault segment number as a supervision label, and dividing the training set, validation set, and test set in an 8:1:1 ratio; applying amplitude perturbation and time delay offset data augmentation to the low-dimensional frequency-domain feature vectors in the training set, with an amplitude perturbation range of ±5% and a time delay offset range of 1 to 3 sampling points, the specific values being determined by experiments on the localization accuracy of the validation set.
[0043] The training steps of the multi-scale pyramid hash sparse perception localization model specifically include: using the cross-entropy loss function as the main loss and adding a hash collision contrast loss to optimize the hyperplane normal vector, minimizing the Hamming distance of hash codes for sample pairs of the same fault type and maximizing the Hamming distance of sample pairs of different fault types; employing the Adam optimizer with an initial learning rate set to... to The specific value is determined by the learning rate warm-up experiment; the number of training rounds is 100 to 200, and the early stopping condition is that the positioning accuracy of the validation set does not improve for 10 consecutive rounds; the batch size is set to 32 to 128, and the specific value is determined by the memory capacity; after each training round, inference is performed on the validation set, the positioning accuracy and inference latency are recorded, and the checkpoint with the highest positioning accuracy and the inference latency meeting the threshold requirement is selected as the final model.
[0044] The technical advantages of the multi-scale pyramid hash sparse sensing localization model are as follows: The multi-scale pyramid structure enables the model to simultaneously capture high-frequency abrupt changes and low-frequency steady-state trends in traveling wave signals, compensating for the shortcomings of single-scale feature extraction in fault type differentiation; The learnable binary mask mechanism adaptively filters redundant feature channels through end-to-end training, significantly reducing subsequent computational load while retaining key discrimination information; The locality-sensitive hash encoder maps similar fault feature vectors in Euclidean space to the same hash bucket, and attention calculation is performed only within the bucket, reducing the computational load from a quadratic relationship with the number of branches to a near-linear relationship; The physical constraint hash bucket construction embeds prior knowledge of the power grid topology into the feature space partitioning, ensuring that electrically adjacent branches remain close in the hash space, enhancing the model's adaptability to topology changes; The sorting and reorganizing attention filtering mechanism further eliminates weak phase key vectors, stabilizing the inference delay within the time range required for real-time localization.
[0045] The deep conditional random field spatiotemporal collaborative inference model is based on a combination of deep learning and graph models. Its specific structure is as follows: the model adopts a three-level structure of observation layer, hidden layer, and annotation layer. The observation layer receives the sparse feature vector output by the multi-scale pyramid hash sparse sensing and localization model as a multi-source sensor fusion representation. The hidden layer consists of multiple fully connected networks, mapping the input of the observation layer to high-order feature representations of each segment. The annotation layer outputs the fault state labels of each segment. The global energy function is defined as the sum of a univariate potential function and a binary potential function. The univariate potential function is calculated from the hidden layer features through a fully connected network, characterizing local evidence in a single segment; the binary potential function is defined on spatiotemporally adjacent segment pairs, and its parameters are analytically derived from the power flow equations and short-circuit calculations of the distribution network, hard-coding physical laws into the model structure rather than end-to-end learning, thus ensuring strict satisfaction of physical constraints. In the inference phase, the globally optimal annotation configuration is solved, using a confidence propagation algorithm for iterative message passing on the factor graph. The message update rule simultaneously integrates the deep features of the hidden layer and the analytically derived physical constraint parameters. To accelerate inference, a mean-field approximation is used to decompose the joint distribution into a product of independent marginal distributions. The marginal distributions of each segment are then iteratively optimized using coordinate ascent until convergence. The convergence condition is that the change in fault probability of each segment in two consecutive iterations is less than [a certain value]. The specific threshold was determined experimentally based on the inference time and positioning accuracy under different convergence accuracies. A suggested range is [insert range here]. to During the learning phase, the conditional log-likelihood is maximized, and the gradient is calculated using the backpropagation algorithm. The normalized partition function of the conditional random field is efficiently solved using the forward-backward algorithm. The neuron connection weight matrices between hidden layers are allocated in blocks according to segment numbers. The weight submatrix corresponding to each segment is stored independently in contiguous memory blocks. This concentrates the forward propagation calculation of neurons in the same segment within the same memory page, reducing cross-memory page access overhead and improving cache hit rate.
[0046] The technical advantages of the deep conditional random field spatiotemporal collaborative inference model are as follows: This model complements and integrates discriminative deep learning and generative graphical models. The deep neural network is responsible for extracting high-order nonlinear features from the original sensor data, while the conditional random field is responsible for modeling the global structured dependencies of multi-segment fault states. The binary potential function parameters are analytically derived from the power flow equations rather than being learned by data, enabling the model to maintain physical consistency even when training samples are insufficient. The joint inference mechanism of mean field approximation and confidence propagation achieves a balance between inference accuracy and inference efficiency. When sensor data is missing, the unary potential function of the missing segment degenerates into a uniform distribution, and the model completes inference by transmitting information from neighboring segments through the binary potential function, thus improving robustness to scenarios with missing data.
[0047] The specific principle of the dynamic sparse adjustment function is as follows: Define the adjustment value. The average hash bucket activation rate of the current inference batch The average number of convergence steps in the current iteration round Number of fault candidate segments in the current batch The weighted sum of the three terms is obtained, and the formula is: ;in , , The weighting coefficients were determined through grid search experiments on the joint target of localization accuracy and inference delay on the validation set. It is suggested that... The value ranges from 0.3 to 0.5. The value ranges from 0.2 to 0.4. The value ranges from 0.1 to 0.3, and the specific value is determined experimentally; when When the system load is high, the hash bucket count parameter is reduced from 65536 to 32768 and the mask threshold parameter is increased from 30% to 45% to reduce the number of activated feature channels and narrow the attention calculation range; when At that time, maintain the number of hash buckets at 65536 and the mask threshold at 30%, and maintain the default inference configuration; when When this indicates sufficient system resources, the number of hash buckets is increased to 131072 and the mask threshold is reduced to 20% to improve positioning accuracy; and As the segmentation threshold, by applying different... System experiments determined the relationship between model inference latency and positioning accuracy under certain conditions, and recommendations were made. The value ranges from 0.25 to 0.35. The value ranges from 0.60 to 0.75, and the specific value is determined by experimental data.
[0048] The confidence propagation algorithm refers to the iterative exchange of messages between variable nodes and factor nodes on the factor graph according to fixed rules. The message content is the probability belief of the state of neighboring nodes. After multiple rounds of iteration, the belief of each variable node converges to the marginal probability approximation value. In this method, the message update rule simultaneously integrates the univariate potential function value output by the hidden layer deep feature and the binary potential function value derived from the power flow equation, so that the physical constraints gradually spread to the entire network segment during the message transmission process.
[0049] The pass-through estimator refers to the approximation of the gradient of the hard thresholding operation with an identity function during backpropagation, that is, treating the gradient of the thresholding operation as 1, so that the gradient signal can penetrate the threshold layer and be transmitted to the mask generation sub-network, thereby achieving end-to-end training.
[0050] The locality-sensitive hash encoder refers to the use of locality-sensitive hashing technology to map high-dimensional feature vectors to low-dimensional hash codes through hyperplane random projection. This allows vectors that are close to each other in the original space to be mapped to the same hash code or a hash code with a small Hamming distance with a high probability, thereby approximately achieving nearest neighbor retrieval within the hash bucket without traversing all feature vectors.
[0051] The univariate potential function refers to the potential function in a conditional random field that depends only on the characteristics of a single variable node, reflecting the probability of a local fault state of the node without considering adjacency constraints; the binary potential function refers to the potential function that depends on the joint state of two adjacent variable nodes, characterizing the constraint relationship between fault states of adjacent sections. In this method, its parameters are directly assigned by the analytical results of the power flow equations and short-circuit calculations of the distribution network, rather than through gradient learning.
[0052] The mean-field approximation refers to approximating the joint posterior distribution of multiple variables as the product of the independent marginal distributions of each variable, and updating the marginal distribution of each variable sequentially through coordinate ascending iteration until the overall variational free energy converges; the coordinate ascending iteration refers to fixing the marginal distributions of other variables in each iteration, updating only the marginal distribution of the current variable in the direction that makes the variational free energy decrease, and iterating through all variables until convergence.
[0053] The hash collision contrast loss refers to the following: for sample pairs in the training batch, if the two samples belong to the same fault type, they are positive sample pairs; otherwise, they are negative sample pairs. The Hamming distance between the hash codes of positive sample pairs is calculated and minimized, and the Hamming distance between negative sample pairs is calculated and maximized. The two losses are weighted and summed to form the contrast loss, which guides the optimization of the hyperplane normal vector to the direction that makes similar faults cluster in the hash space and dissimilar faults separate.
[0054] The electrical distance refers to the impedance distance between two branches in the distribution network, which is calculated from the network impedance matrix and reflects the correlation between the two branches in terms of electrical characteristics. The geographical distance refers to the physical straight-line distance between the two branches in geographical space, which is calculated from the line coordinate information. Both are added as additional hash dimensions to the local sensitive hash encoder to maintain the proximity relationship between physically adjacent branches in the hash space and enhance topological constraints.
[0055] Optionally, this method can also be implemented by a computer to form a rapid fault location system for power distribution lines. The computer is equipped with a readable storage medium that stores program instructions. When the program instructions are run in the computer, they execute the aforementioned rapid fault location method for power distribution lines. The computer is communicatively connected to the transient traveling wave acquisition device, adjacency matrix extraction module, and multi-source sensors of the power distribution network. It receives the raw data output by the device and module, completes the entire calculation process of feature extraction, sparse attention calculation, state transition tensor decomposition, fault location inference, and dynamic adjustment, and outputs the final fault location result to the power distribution network dispatch terminal.
[0056] The specific implementation of step S01 is as follows: First, the raw data from the transient traveling wave acquisition device is processed... The Hz-level sampled signal undergoes time-domain sparse sampling, employing a non-uniform interval sampling strategy. A dense sampling window is set near the moment a sudden change in signal energy is detected, while a sparse sampling interval is set during stable signal periods, significantly reducing the amount of data per cycle. Subsequently, a compressed sensing reconstruction algorithm is applied to the sparsely sampled data to recover the complete spectrum. The components of the recovered spectrum are then sorted in descending order of energy value, and the frequency set corresponding to the cumulative energy reaching 5% of the total energy is selected as the key frequency components. This threshold is determined through statistical analysis of the spectral energy distribution in simulation experiments of different types of power distribution line faults, with a suggested range of 3% to 8%. The combination of these two mechanisms reduces the amount of data stored per cycle to less than 5% of the original amount. The resulting low-dimensional frequency domain feature vector is then fed into a multi-scale pyramid hash sparse sensing localization model.
[0057] The specific implementation of step S02 is as follows: Taking the distribution network adjacency matrix as input, the adjacency matrix is first sparsified, retaining only the branch pairs corresponding to non-zero elements and discarding zero-element node pairs in the fully connected structure that do not contribute to positioning. On this sparse structure, the local sensitive hash encoder in the multi-scale pyramid hash sparse-aware positioning model is invoked to perform 16 sets of hyperplane random projections on the feature vector corresponding to each branch. Each projection generates a 1-bit hash code, and the 16 sets are concatenated to form a 16-bit hash code, dividing the feature space into 65536 hash buckets. The physical constraint hash bucket construction module introduces the geographical distance and electrical distance of the lines into the hash dimension, ensuring that electrically adjacent branches are mapped to neighboring hash buckets with a Hamming distance of less than 3. Attention weights are calculated only within the same hash bucket and neighboring buckets with a Hamming distance of less than 3, reducing the computational complexity from the square of the number of nodes to a linear relationship with the number of non-zero elements in the adjacency matrix, meeting the real-time computational needs of distribution networks with thousands of branches.
[0058] The specific implementation of step S03 is as follows: For the high-order tensor describing the state transition relationships of multiple segments under continuous fault and cascading trip scenarios, Tucker decomposition or CP decomposition is used to approximately decompose it into the product of several low-rank core tensors and factor matrices. The core tensor has a dimension of no more than 10 in each modal direction. This rank value is determined through experimental analysis of the singular value distribution of the state transition matrix under different fault scenarios, with a suggested range of 8 to 15, ultimately determined by an experiment balancing decomposition error and storage overhead. After decomposition, the terabyte-level storage required for the original million-by-million-scale state transition matrix is compressed to an acceptable memory range, thereby eliminating the state space dimension explosion problem without losing key state transition information.
[0059] The specific implementation of step S04 is as follows: The sparse feature vector output in step S01 is used as the input to the observation layer of the deep conditional random field spatiotemporal collaborative inference model. The input to the observation layer is mapped to the high-order feature representation of each segment through a hidden layer composed of multiple fully connected networks. The weight matrices of each hidden layer are distributed in blocks according to the segment number, so that the forward propagation of neurons in the same segment is concentrated in the same memory page, improving the cache hit rate. The global energy function is defined as the sum of the univariate potential function and the binary potential function. The univariate potential function is calculated by the hidden layer features through a fully connected network, which describes the local evidence of a single segment; the parameters of the binary potential function are directly derived analytically from the power flow equations and short-circuit calculations of the distribution network, hard-coding physical constraints into the model structure instead of end-to-end gradient learning, ensuring physical consistency. The labeling layer performs structured inference on the fault state labels of each segment and outputs the globally optimal labeling configuration.
[0060] The specific implementation of step S05 is as follows: The inference phase employs a combination of mean-field approximation and confidence propagation algorithm. The mean-field approximation decomposes the joint posterior distribution of each segment into a product of independent marginal distributions. The marginal distribution of each segment is updated sequentially through coordinate ascending iterations. The convergence condition is that the change in fault probability of each segment in two adjacent iterations is less than [a certain value]. The recommended value range is: to The confidence propagation algorithm iteratively exchanges probability belief messages between variable nodes and factor nodes on the factor graph. The message update rule simultaneously integrates univariate potential function values and binary potential function values derived from the power flow equations, allowing physical constraints to gradually diffuse to all network segments during message propagation. The two inference mechanisms jointly output the fault probability distribution of each segment, and then, combined with the correlation weights of the sparse attention branches obtained in step S02, the probabilities are ranked to determine the candidate set of fault segments.
[0061] The specific implementation of step S06 is as follows: Define the adjustment value. ,in The average hash bucket activation rate of the current inference batch. This represents the average field convergence step count for the current iteration round. The number of fault candidate segments in the current batch, with a weighting coefficient. , , Through grid search experiments on the validation set, focusing on the joint targets of localization accuracy and inference latency, it was determined that the following recommendations are made. The value ranges from 0.3 to 0.5. The value ranges from 0.2 to 0.4. The value ranges from 0.1 to 0.3. When At that time, the hash bucket count parameter was reduced from 65536 to 32768, and the mask threshold parameter was increased from 30% to 45% to narrow the calculation range; when When, maintain the default configuration; when At that time, the hash bucket count parameter was increased to 131072, and the mask threshold parameter was reduced to 20% to improve positioning accuracy. The recommended value range is 0.25 to 0.35. The recommended value range is 0.60 to 0.75, which is determined by the inference delay and positioning accuracy system experiment. The final output of the fault section location result is sent to the distribution network dispatch terminal.
[0062] It should be noted that the key technologies of this invention include: First, a multi-scale pyramid hash sparse sensing and localization mechanism, which simultaneously extracts high-frequency abrupt change details and low-frequency steady-state trends of traveling wave signals through four-level wavelet decomposition, and then adaptively filters out redundant channels using learnable binary masks. Combined with locality-sensitive hashing, attention calculation is limited to physically adjacent hash buckets, reducing the computational complexity of branch correlation calculation from quadratic to near-linear, thus fundamentally solving the computational bottleneck of feature extraction in large-scale distribution networks. Second, a physical constraint-driven deep conditional random field inference mechanism, which directly hardcodes the analytical results of power flow equations and short-circuit calculations into binary potential function parameters, ensuring physical consistency without data-driven learning. Then, a balance between accuracy and efficiency is achieved through joint inference using mean field approximation and confidence propagation, enabling the structured inference of multi-segment fault states to be completed within time constraints. Third, a dynamic sparsity adjustment mechanism, which adjusts the number of hash buckets and mask thresholds in real time based on runtime load indicators, narrowing the computational range when system resources are scarce and expanding the computational range when resources are abundant, so that the overall inference latency remains stable below the threshold of hundreds of milliseconds under different operating conditions. The three key technologies work together to form a complete complexity control closed loop, which combines data compression, feature calculation, state inference and adaptive adjustment, and jointly solves the problem of excessive computational complexity in real-time fault location of large-scale distribution networks.
[0063] It should be noted that in the event of continuous faults or cascading trips in a distribution network, it is necessary to jointly infer the fault states of multiple sections. In this case, the tensor dimension describing the state transition relationships between sections grows exponentially with the number of faulted sections, and the state space easily expands to a scale that is unbearable for both memory and computation. The reason for this technical problem is that in scenarios of continuous faults and cascading trips, each section may be in one of several states, such as normal, single-phase grounding, two-phase short circuit, three-phase short circuit, or open circuit. As the number of sections increases, the number of state combinations expands exponentially with the number of sections, causing the state transition matrix to rapidly expand from hundreds of dimensions to millions by millions. Traditional accurate inference methods cannot fully store this matrix in memory, nor can they complete matrix operations within the time window required for real-time positioning. A common solution to this technical problem is to use state space pruning or Monte Carlo approximation to sample and reduce the state space. However, state-space pruning relies on prior rules, which are prone to failure under atypical conditions such as cascading trips, leading to the incorrect removal of actual fault paths. Furthermore, the sampling variance of Monte Carlo approximations is difficult to control effectively in high-dimensional state spaces, and the number of samples required to converge to an acceptable error range still far exceeds the time budget for real-time positioning. Neither method can achieve an engineering-acceptable balance between accuracy and efficiency. This invention effectively solves this technical problem by performing Tucker or CP decomposition on the fault state transition tensor, approximating the high-order transition tensor as a product of several low-dimensional core tensors with rank not exceeding 10 and factor matrices. This compresses the terabyte-level storage required for the original million-by-million matrix to an acceptable memory range while preserving the main structural information of the state transition relationships. During the inference phase, the mean-field approximation decomposes the joint posterior distribution of each segment into a product of independent marginal distributions. This transforms the joint inference, which originally required traversing the entire state space, into an iterative process of coordinate ascent of the marginal distributions of each segment. Each iteration only needs to update the marginal distribution of a single segment, and the computational cost is linearly related to the number of segments rather than exponentially. The confidence propagation algorithm further approximates global inference on the factor graph through local message passing, incorporating physical constraint parameters into the message update rules. This significantly reduces computational overhead while maintaining physical consistency in the inference results. The tensor decomposition, which reduces storage pressure, and the mean-field approximation, which reduces inference computation, work together to enable multi-segment fault state inference under continuous fault and cascading trip conditions to be completed within the time window required for real-time positioning.
[0064] Specifically, the principle of this invention is as follows: This invention can solve the above-mentioned technical problems by synergistically reducing computational complexity from four dimensions: data compression, feature calculation, state representation, and inference acceleration. First, the transient traveling wave signal is sampled at non-uniform intervals in the time domain, with dense sampling points retained only near the moment of signal change, and sparse sampling points used in the steady segment. After the complete spectrum is restored by the compressed sensing reconstruction algorithm, the key frequency components of the first 5% of energy are extracted, reducing the amount of data stored in a single cycle to less than 5% of the original amount, thus cutting off the burden of high sampling rate on subsequent calculations from the source. Secondly, the multi-scale pyramid hash sparse sensing localization model simultaneously captures the high-frequency abrupt changes and low-frequency steady-state trends of traveling wave signals through four-level wavelet decomposition. It can learn a binary mask layer to adaptively filter redundant feature channels. The locality-sensitive hash encoder maps high-dimensional feature vectors to 16-bit hash codes, dividing the feature space into 65,536 hash buckets. Attention calculation is performed only within the hash bucket containing the query vector and neighboring buckets with a Hamming distance less than a threshold, completely avoiding global traversal. The physical constraint hash bucket construction module uses line geographical distance and electrical distance as additional hash dimensions, ensuring that electrically adjacent branches remain close in the hash space, reducing the computational load from a quadratic relationship with the number of branches to a near-linear relationship. Thirdly, the fault state transition tensor is decomposed using Tucker or CP decomposition, approximating the high-order transition tensor as a product of several low-rank core tensors and factor matrices. The dimensionality of the core tensors in each modal direction does not exceed the rank threshold, thus compressing the terabyte-level storage required for a million-by-million-scale state transition matrix to an acceptable memory range, eliminating the state space dimensionality explosion problem caused by continuous faults and cascading trips. Finally, the deep conditional random field spatiotemporal collaborative inference model combines high-order features extracted by deep neural networks with binary potential function parameters derived analytically from the power flow equations. During the inference phase, the mean-field approximation decomposes the joint posterior distribution into a product of independent marginal distributions. The marginal distributions of each segment are iteratively updated through coordinate ascent until convergence. Simultaneously, a confidence propagation algorithm iteratively passes messages on the factor graph, balancing inference accuracy and efficiency. The dynamic sparse adjustment function calculates the adjustment value based on a weighted average of the hash bucket activation rate, the number of mean-field convergence steps, and the number of fault candidate segments in the current batch. It adaptively adjusts the hash bucket quantity and mask threshold parameters according to the interval to which the adjustment value belongs. The calculation range is narrowed when the system load is high and expanded when resources are abundant to improve positioning accuracy, ensuring that the entire inference latency remains stable within the time range required for real-time positioning. The complexity reduction of each of these stages works in concert to ensure that the location of fault segments in large-scale distribution networks is completed within a few hundred milliseconds.
[0065] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0066] The specific implementation of step S01 is as follows: The transient traveling wave signal is processed using... The original time-domain sequence is acquired using a high sampling rate. Dense sampling points are used near moments of signal abrupt change, while sparse sampling points are used in stable segments, achieving non-uniform sparse sampling in the time domain. A Fast Fourier Transform (FFT) is performed on the sparsely sampled signal to obtain its frequency domain representation. The frequency components are then sorted in descending order of energy value. The set of frequencies whose cumulative energy reaches 5% of the total energy is considered the critical frequency component set. Let the frequency component set be sorted in descending order of energy as follows: ,in The total number of frequency components. For the first The energy values of each component, and the selection criteria for the key frequency component are as follows:
[0067] ;
[0068] In the formula, The number of selected key frequency components is determined by taking the smallest positive integer that satisfies the above inequality. The frequency domain coefficients of each component are concatenated to form a low-dimensional frequency domain feature vector. The data is then fed into the subsequent model. The suggested value range for the 5% threshold is 3% to 8%, which is determined by statistical analysis of the spectral energy distribution of simulation experiments for different fault types.
[0069] The specific implementation method of step S02 is as follows: Let the number of branches in the distribution network be... The adjacency matrix is ,in Indicates a branch and branch road There is a connection between them. This indicates that no connection exists. (Only for...) Branch pairs corresponding to non-zero elements Constructing Graph-Structured Sparse Attention Weights Non-zero position and Consistent, the calculation formula is:
[0070] ;
[0071] In the formula, branch road The query vector, branch road The key vector, The dimension of the key vector. Let the set of branch pairs corresponding to the non-zero elements of the adjacency matrix be . To find the sum index, traverse all branches. Branches with interconnected relationships. This method reduces the computational complexity of attention from... Down to The value is linearly related to the number of non-zero elements. The locality-sensitive hash encoder utilizes 16 sets of random projections onto hyperplanes, with each set containing a hyperplane normal vector. ( ) Optimized by gradient descent, for the eigenvector Generate the first Bit hash code :
[0072] ;
[0073] In the formula, This is a signed function; it outputs a value when the input is a real number. or 16-bit hash code After splicing, the feature space is divided into One hash bucket. Hyperplane normal vector. The hash collision comparison loss is optimized to minimize the Hamming distance between sample pairs of the same fault type and maximize the Hamming distance between sample pairs of different fault types. Defined as:
[0074] ;
[0075] In the formula, , Samples , A 16-bit hash code vector, The Hamming distance between the two hash codes. A set of positive sample pairs of the same fault type. The set of negative sample pairs for different fault types. This is the balance coefficient between positive and negative sample pairs for loss, with an empirical value of 1.0.
[0076] The specific implementation of step S03 is as follows: Let the fault state transition tensor be... The Tucker decomposition is used to approximate it as the product of the core tensor and the factor matrix:
[0077] ;
[0078] In the formula, For the core tensor, the rank of each mode , ( ) is the first A factor matrix for each modality. For the first The original dimensions of each modality For the first The rank corresponding to each mode Indicates the tensor along the first The product of a mode and a matrix, Let be the order of the tensor. The decomposition and reconstruction error is defined as:
[0079] ;
[0080] In the formula, For the Frobenius norm of the tensor, This reflects the accuracy loss of the low-rank approximation. The suggested range for the rank values of each mode is 8 to 15, which should be determined experimentally based on the trade-off between decomposition error and storage overhead.
[0081] The specific implementation of step S04 is as follows: the sparse feature vector output by the multi-scale pyramid hash sparse sensing localization model is fed into the observation layer of the deep conditional random field spatiotemporal collaborative inference model. Assume the distribution network has... Section 1, Section 2 The fault status label for each section is: , This indicates that a fault has occurred in this section. This indicates normal operation. Assume all segment labels constitute a label sequence. Observational feature sequence ,in For hidden layer segments The output high-order feature vector, Let be the dimension of the hidden layer features. The model's global energy function is defined as:
[0082] ;
[0083] In the formula, The function is a univariate potential function that characterizes the probability of a local fault state in a single segment. It is obtained by calculating the hidden layer features through a fully connected network. It is a binary potential function that characterizes spatiotemporal adjacency pairs. The constraints between fault states are derived analytically from the power flow equations and short-circuit calculations of the distribution network, rather than through gradient learning. To be consistent with the section Spatiotemporal adjacency segment number It is a set of spatiotemporally adjacent segments.
[0084] The specific implementation of step S05 is as follows: In the inference stage, a mean-field approximation is used, and the joint posterior distribution is... It can be decomposed into the product of the independent marginal distributions of each segment, that is:
[0085] ;
[0086] In the formula, For joint posterior distribution The variational approximation, For section Approximate edge distribution of fault states. The edge distribution of each segment is updated sequentially through coordinate ascending iterations. The convergence condition is that the change in fault probability of each segment in two consecutive iterations is less than 1. The recommended value range is: to Simultaneously, a confidence propagation algorithm is used to iteratively pass messages on the factor graph, with factor nodes... To variable node The message being delivered Update as follows:
[0087] ;
[0088] In the formula, For factor nodes The corresponding potential function value, combining the univariate potential function and the bivariate potential function, For factor nodes A set of connected variable nodes. To find the sum index, traverse the nodes except for the node. External and factor nodes All connected variable nodes, For variable nodes To factor nodes The message being transmitted. The fault probability output for each section is as follows:
[0089] ;
[0090] In the formula, For variable nodes A set of connected factor nodes, combined with the relevance weights of sparse attention branches. Filter the candidate set segments and output the candidate set of fault segments.
[0091] The specific implementation of step S06 is as follows: Define the adjustment value of the dynamic sparse adjustment function. It is obtained by weighted summation of three terms, and the formula is:
[0092] ;
[0093] In the formula, The average hash bucket activation rate for the current inference batch, with a value range of [value missing]. , The mean field convergence step number for the current iteration is a positive integer. The number of fault candidate segments in the current batch is a positive integer. , , Here are the dimensionally normalized weighting coefficients, where The dimensionless quantity of is . The dimensions are , The dimensions are After three weighted factors This is a dimensionless adjustment value. The empirical value range is 0.3 to 0.5. The empirical value range is 0.2 to 0.4. The empirical value ranges from 0.1 to 0.3, with specific values determined through grid search experiments on the joint objective of positioning accuracy and inference latency on the validation set. When At that time, the hash bucket count parameter decreased from 65536 to 32768, and the mask threshold parameter increased from 30% to 45%; when At that time, the number of hash buckets is maintained at 65536 and the mask threshold is 30%; when At that time, the number of hash buckets was increased to 131072 and the mask threshold was reduced to 20% to improve positioning accuracy. The recommended value range is 0.25 to 0.35. The recommended value range is 0.60 to 0.75, depending on the specific requirements. The system experiment determined the inference delay and positioning accuracy of the model under the given conditions, and finally output the location result of the fault section.
[0094] To better understand and implement this invention, the following is a specific application scenario of this invention, Example 2:
[0095] This embodiment is based on a city power distribution network simulation test system. The system includes 128 branches and 64 nodes, with a total line length of approximately 320 km. The simulation platform uses programming to build a dynamic simulation model of the power distribution network, supporting four types of fault injection: single-phase grounding fault, two-phase short-circuit fault, three-phase short-circuit fault, and open-circuit fault. The transient traveling wave sampling rate is set to [value missing]. Hz, each node is equipped with a traveling wave sensor.
[0096] For step S01, taking a single-phase ground fault in branch 17 of the simulation system as an example, the fault is located approximately 35% of the distance from the beginning of the line, and the fault resistance is set to 20Ω. The original single-cycle sampling data points are 1,000,000. After time-domain sparse sampling, 4,800 sampling points are retained in the dense sampling window near the moment of signal change, and 45,200 sampling points are retained in the stable segment using sparse intervals, for a total of 50,000 points, compressing the data volume to 5% of the original amount. Subsequently, the compressed sensing reconstruction algorithm is applied to the sparse sampling data to recover the spectrum. The frequency components are arranged in descending order of energy value. When the cumulative energy ratio reaches 5%, 380 key frequency components are extracted to form a 380-dimensional low-dimensional frequency domain feature vector, which is then fed into the multi-scale pyramid hash sparse sensing localization model.
[0097] For step S02, the adjacency matrix of this simulation system is used as input. The adjacency matrix has a size of 64×64, 256 non-zero elements, and a sparsity rate of 6.25%. The local sensitive hash encoder of the multi-scale pyramid hash sparse-aware localization model performs 16 sets of hyperplane random projections on the 380-dimensional feature vector to generate 16-bit hash codes, dividing the feature space into 65536 hash buckets. The physical constraint hash bucket construction module constructs an additional hash dimension based on the geographical and electrical distances of each branch. It has been verified that the Hamming distance of the hash codes of adjacent branch pairs does not exceed 3, satisfying the physical adjacency constraint. Attention calculation is only performed in the hash bucket where the target branch is located and in neighboring buckets with a Hamming distance of less than 3. The number of branch pairs involved in the calculation is reduced from 4096 pairs in a fully connected system to an average of about 310 pairs, significantly reducing the computational complexity of branch correlation. Figure 2 The figure shown is a statistical graph of the correlation weight distribution of sparse attention branches and the activation status of hash buckets in this embodiment.
[0098] Regarding step S03, when testing a continuous fault scenario, this simulation system injects two consecutive faults, involving six fault segments, with five states per segment. The original state transition tensor has a dimension of [missing value]. That is, 15625 dimensions. Performing Tucker decomposition on this tensor, with the core tensor dimension set to 10 in each modal direction, results in a core tensor dimension of [dimensionality missing]. That is, 1,000,000, the total size of the factor matrix is 6×5×10, or 300 elements, which significantly reduces the storage required compared to the original complete state transition representation. The decomposition error (measured by the relative error of the Frobenius norm) is 0.0087, which meets the engineering accuracy requirements.
[0099] For steps S04 and S05, a 380-dimensional sparse feature vector is used as the input to the observation layer and fed into the deep conditional random field spatiotemporal collaborative inference model. The hidden layer uses a 4-layer fully connected network, with each layer containing 256 neurons. The weight matrix is stored in blocks according to 64 segment numbers. The binary potential function parameters are analytically derived from the power flow equations and short-circuit calculations of the distribution network. A 64×64 binary potential parameter matrix is constructed for the 128 branches of this simulation system. In the inference phase, a mean-field approximation is first performed. After 23 rounds of coordinate ascending iterations, convergence is achieved, and the change in fault probability in each segment is reduced to... The following; subsequently, the confidence propagation algorithm performs 8 rounds of message passing on the factor graph, and outputs the fault probability distribution of each segment after fusing the univariate potential function value and the binary potential parameter, such as Figure 3 The diagram shows the output of the fault probability distribution for each segment and the candidate set selection process. Combining the sparse attention branch correlation weights obtained in step S02, the fault probabilities are sorted to determine the candidate set of fault segments. The candidate set includes branch 17 and its adjacent branches 16 and 18, a total of 3 branches.
[0100] For step S06, calculate the adjustment value and average hash bucket activation rate for the current inference batch. The mean-field convergence steps are 0.41. The number of fault candidate segments is 23. The weight is 3, and the weight coefficients are determined by grid search. , , Adjustment value ,at this time The system determined that the current load was high and reduced the number of hash buckets from 65536 to 32768, while increasing the mask threshold from 30% to 45%, thus compressing the subsequent calculation range. With the adjusted inference configuration, the entire inference latency was 87ms, meeting the millisecond threshold requirement. The final location result pointed to branch number 17, which was completely consistent with the injected faulty section.
[0101] To further verify the compression effect of tensor decomposition on the state space in step S03, the storage requirements before and after tensor decomposition were statistically analyzed for different numbers of consecutive fault segments, as shown in Table 1:
[0102] Table 1. Comparison of Tensor Decomposition Storage under Different Numbers of Continuous Fault Sections
[0103]
[0104] As shown in Table 1, with the increase of the number of consecutive fault segments, the dimension of the original state transition tensor expands exponentially. However, the storage size of the factor matrix after Tucker decomposition only increases linearly with the number of segments. Although the core tensor increases with the number of modes, its dimension remains fixed at 10. The relative decomposition error increases slightly with the number of segments, reaching 0.0198 with 10 segments, which is still within the acceptable range for engineering applications. This verifies the effectiveness of tensor decomposition technology in suppressing the explosion of state space dimensions. From a physical perspective, the singular value distribution of high-order state transition tensors usually exhibits a rapid decay characteristic, meaning that most state transition relationships are concentrated in a few major modes. Therefore, the low-rank approximation can achieve significant storage compression with minimal information loss. This characteristic makes Tucker decomposition naturally applicable to continuous fault scenarios in distribution networks.
[0105] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for rapid location of fault sections in power distribution lines, characterized in that, Includes the following steps: The transient traveling wave signal is sparsely sampled in the time domain, key frequency components are retained, the original sampled data is compressed into a low-dimensional frequency domain feature vector, and then fed into a multi-scale pyramid hash sparse sensing localization model for feature extraction. The adjacency matrix of the distribution network is sparsified, and the sparse attention weights of the graph structure are constructed only for the branch pairs corresponding to the non-zero elements. The local sensitive hash encoder of the multi-scale pyramid hash sparse perception localization model is used to generate hash codes to realize the branch correlation calculation with linear complexity. Tensor decomposition and low-rank approximation techniques are used to process the fault state transition tensor, decomposing the high-order transition tensor into the product of several core tensors and factor matrices, thus eliminating the state space dimension explosion problem caused by continuous faults and cascading trips. The sparse feature vector output by the multi-scale pyramid hash sparse perception and localization model is used as the input of the observation layer and fed into the deep conditional random field spatiotemporal collaborative inference model. The univariate potential function and the binary potential function are fused through the global energy function to perform structured inference of the fault state label of each section. In the inference stage of the deep conditional random field spatiotemporal collaborative inference model, the mean field approximation and confidence propagation algorithm are used to iteratively pass messages on the factor graph to output the fault probability distribution of each segment, and the candidate set of fault segments is determined by combining the correlation weight of sparse attention branches. The adjustment value is calculated based on the dynamic sparse adjustment function. The hash bucket number parameter and mask threshold parameter of the multi-scale pyramid hash sparse perception positioning model are adaptively adjusted according to the interval to which the adjustment value belongs, and the final fault segment positioning result is output.
2. The method for rapid location of fault sections in power distribution lines according to claim 1, characterized in that, The aforementioned time-domain sparse sampling specifically involves sampling points from a high-sampling-rate signal at non-uniform intervals in the time domain, retaining only the dense sampling points near the moment of signal change, and using sparse sampling points in the steady segment. The key frequency components refer to the set of frequencies corresponding to the cumulative energy of a transient traveling wave signal when the energy of each frequency component is arranged in descending order after fast Fourier transform, and the proportion of energy to total energy reaches the energy proportion threshold.
3. The method for rapid location of fault sections in power distribution lines according to claim 2, characterized in that, The multi-scale pyramid hash sparse perception localization model consists of five parts connected in series: a multi-scale pyramid feature extractor, a learnable binary mask layer, a locality-sensitive hash encoder, a sorting and reorganizing attention filter layer, and a physically constrained hash bucket construction module. The multi-scale pyramid feature extractor performs a four-level wavelet decomposition on the input low-dimensional frequency domain feature vector, and the four-level feature maps are spliced along the channel dimension to form a multi-scale feature vector.
4. The method for rapid location of fault sections in power distribution lines according to claim 3, characterized in that, The learnable binary mask layer receives multi-scale feature vectors, and the mask generation sub-network outputs the Bernoulli distribution parameters corresponding to each feature channel. During forward inference, the channel mask with parameters greater than the mask parameter threshold is set to 1 and the rest are set to 0 according to the hard thresholding rule. Only the feature channels with the mask ratio threshold before the activation value are retained to participate in subsequent calculations. During backpropagation, a pass-through estimator is used to bypass the non-differentiable points of the thresholding operation.
5. The method for rapid location of fault sections in power distribution lines according to claim 4, characterized in that, The locality-sensitive hash encoder uses multiple sets of hyperplane random projections to generate a 1-bit hash code for each set of hyperplanes. Multiple sets are concatenated to form a hash code, dividing the feature space into multiple hash buckets. The hyperplane normal vectors are optimized through gradient descent to maximize the hash collision probability of samples of the same fault type. The multiple projection weight matrices of the locality-sensitive hash encoder are independently allocated memory blocks on their respective channels, and the memory block size of each weight matrix is proportional to the number of corresponding feature channels.
6. The method for rapid location of fault sections in power distribution lines according to claim 5, characterized in that, The physical constraint hash bucket construction module uses the geographical distance and electrical distance of the line as additional hash dimensions to ensure that physically adjacent branches are mapped to neighboring hash buckets with the same or Hamming distance less than the Hamming distance threshold; during attention calculation, similarity is calculated only for key vectors in the hash bucket where the query vector is located and in neighboring buckets with a Hamming distance less than the Hamming distance threshold.
7. The method for rapid location of fault sections in power distribution lines according to claim 6, characterized in that, The sorting and reorganizing attention filter layer, after calculating the initial attention score, sorts the items in descending order of score and discards weakly correlated items with a discard ratio threshold, performing value vector weighted aggregation only on high-scoring items; the feature tensor transfer between model layers adopts a pipelined hierarchical memory allocation method. The intermediate activation tensor of the layer in the first... Release immediately after layer calculation is complete.
8. The method for rapid location of fault sections in power distribution lines according to claim 7, characterized in that, The tensor decomposition and low-rank approximation technique refers to approximating a high-order transition tensor as the product of several low-dimensional core tensors and factor matrices through Tucker decomposition or CP decomposition; the dimensions of the core tensors in each modal direction do not exceed the rank threshold, thereby compressing the storage required for the state transition matrix to an acceptable memory range.
9. The method for rapid location of fault sections in power distribution lines according to claim 8, characterized in that, The deep conditional random field spatiotemporal collaborative inference model adopts a three-level structure of observation layer, hidden layer, and annotation layer; the parameters of the binary potential function are analytically derived from the power flow equation and short-circuit calculation of the distribution network, and the physical laws are hard-coded into the model structure; the neuron connection weight matrix between each layer of the hidden layer is allocated in blocks according to the segment number, and the weight submatrix corresponding to each segment is independently stored in a contiguous memory block.
10. The method for rapid location of fault sections in power distribution lines according to claim 9, characterized in that, The mean field approximation approximates the joint posterior distribution of the multivariate variables as the product of the independent marginal distributions of each variable, and updates the marginal distribution of each variable sequentially through coordinate ascending iteration; the convergence condition is that the change in the fault probability of each segment in two adjacent iterations is less than the convergence accuracy threshold.
