Main distribution network detection and classification method of dual-channel time-frequency fusion driving Mama

Through the dual-channel time-frequency fusion drive Mamba model, the problems of insufficient fusion of multi-scale features, high noise sensitivity and poor dynamic topological adaptability in the fault detection of main distribution network are solved, and high-precision identification and classification of fault signals are achieved.

CN120561741AActive Publication Date: 2025-08-29HEFEI UNIV OF TECH

Patent Information

Application Number
CN202511039350.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-08-29
Estimated Expiration
2045-07-28

AI Technical Summary

Technical Problem

The prior art is difficult to accurately capture the start time, duration and propagation path of the main distribution network fault in complex noise environments, and the detection accuracy and robustness are insufficient under dynamic topology.

Method used

The Mamba model is driven by a dual-channel time-frequency fusion, combining wavelet transformation, cross-modal attention enhancement mechanism and Mamba state space model, and high-precision identification and classification of fault signals are achieved through multi-scale feature reconstruction and cross-modal fusion.

Benefits of technology

It significantly improves the accuracy of fault detection in complex noise and dynamic topological environments, improves the capture accuracy of fault initiation time, duration and propagation path, and enhances the noise resistance and detection classification accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120561741A_ABST
    Figure CN120561741A_ABST
Patent Text Reader

Abstract

The invention discloses a dual-channel time-frequency fusion driving Mama main power distribution network detection and classification method, which comprises the following steps: S1, collecting fault voltage and current signal data under different main power distribution network topologies, and constructing a training set; s2, constructing a model based on dual-channel time-frequency fusion driving Mama, wherein the model is used for calculating and obtaining the fault probability and the fault category label of the kth fault; s3, the training set trains the model by using a back propagation and gradient descent method to obtain a trained main and distribution network fault detection network which is used for inputting a fault data set and then mapping a corresponding fault classification label; and S4, inputting fault voltage and current signal data of the main power distribution network by using the trained model, and executing detection classification operation. According to the method, through multi-scale feature reconstruction and cross-modal fusion, the detection robustness in a complex noise environment is remarkably improved, and the fault starting moment, the duration time and the propagation path are accurately captured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of distribution network fault detection technology, and specifically to a main distribution network detection and classification method, device, and storage medium based on dual-channel time-frequency fusion-driven Mamba, which is suitable for high-precision detection and classification of power grid faults in complex noise environments. Background Art

[0002] Fault detection and classification in main distribution networks are critical for the safe operation of power systems. Traditional methods rely primarily on time-frequency analysis and model-driven techniques based on state estimation to identify faults by analyzing the time or frequency domain characteristics of voltage and current signals. However, with the expansion of power grids and the integration of distributed energy resources, the topology of main distribution networks is becoming increasingly complex. Fault signals exhibit multi-scale and non-stationary characteristics and are susceptible to noise interference. Existing technologies are also unable to capture the onset, duration, and propagation path of faults in complex scenarios, resulting in limited detection accuracy and robustness.

[0003] Conventional fault detection methods currently use a single time-frequency analysis technique to extract local features, or rely on machine learning models for classification. However, these methods have obvious drawbacks: (1) Insufficient multi-scale feature fusion: Traditional methods have difficulty in capturing both the high-frequency mutation and low-frequency steady-state features of the signal, resulting in the loss of key information; (2) High noise sensitivity: In a strong interference environment, signal characteristics are easily submerged, resulting in misjudgment or missed judgment; (3) Poor adaptability to dynamic topology: The time-varying nature of fault propagation paths under complex topologies is difficult to model, and traditional models are unable to accurately locate fault locations and path evolution; In addition, even though existing optimization methods use improved wavelet basis selection or combine multi-scale transformation or introduce deep learning models to solve the above problems, they still fail to effectively solve the problem of full cross-modal fusion of multi-scale time-frequency features in actual use. The model's generalization ability in complex noise scenarios and the model's dynamic topology modeling ability are still insufficient, and the efficiency of noise suppression and feature reconstruction is low.

[0004] In addition, for the specific scenario of main distribution network fault detection, the existing technology also discloses a similar model architecture such as Pan-Mamba and Fusion-Mamba, among which: for example, the Pan-Mamba model, whose core goal is pan-sharpening of the image, focuses on improving the spatial resolution and spectral consistency of the image, and processes static or slowly changing image spatial-spectral features. Its actual use in the field of main distribution network fault detection does not involve time-frequency signal analysis or dynamic fault detection; or, for example, Fusion-Mamba, which mainly focuses on feature splicing or simple weighted fusion of general multimodal data (such as vision-text, infrared-visible light, etc.). Its actual use in the field of main distribution network fault detection does not design a dedicated mechanism for the time-frequency coupling characteristics unique to the power system (such as the coexistence of high-frequency mutations and low-frequency steady-state characteristics of fault signals). To this end, this application specifically proposes a dual-channel time-frequency fusion driven Mamba main distribution network detection and classification method to solve the above technical problems. Summary of the Invention

[0005] The main purpose of the present invention is to provide a main distribution network detection and classification method driven by Mamba with dual-channel time-frequency fusion, propose a dual-channel time-frequency fusion architecture, combine wavelet transform, cross-modal attention enhancement mechanism and Mamba state space model, and significantly improve the detection robustness in complex noise environments through multi-scale feature reconstruction and cross-modal fusion. It achieves accurate capture of the fault start time, duration and propagation path, and provides an efficient and reliable solution for main distribution network fault diagnosis in high-dynamic and strong interference scenarios to solve the technical problems raised in the background technology. The Mamba model architecture design constructed in this application is significantly different from existing technologies such as Pan-Mamba and Fusion-Mamba in terms of architectural goals, feature processing mechanisms and application adaptability, and can specifically solve the unique technical problems in the field of main distribution network fault detection.

[0006] The present invention adopts the following technical solutions to solve the above technical problems: A dual-channel time-frequency fusion driven Mamba main distribution network detection and classification method includes the following steps: S1. Collect fault voltage and current signal data under different main distribution network topologies and construct a training set FD; S2. Build a dual-channel time-frequency fusion-driven Mamba model. This model uses a time-domain feature processing channel and a frequency-domain feature processing channel to achieve dynamic coordination of time-frequency features through a cross-modal attention enhancement mechanism. The model includes a fault feature reconstruction layer, a fault feature fusion layer, and a Mamba network layer, which is used to calculate the fault probability and fault category label of the k-th fault. The fault feature reconstruction layer includes an attention weight allocation mechanism, high- and low-frequency fusion, and inverse transformation mechanisms. The fault feature fusion layer includes a multi-scale time-frequency graph convolution feature extraction mechanism and a cross-modal attention enhancement mechanism. S3. The training set FD is trained using back propagation and gradient descent to obtain a trained main distribution network fault detection network for inputting a fault data set and mapping the corresponding fault classification label; S4. Use the trained model to input the fault voltage and current signal data of the main distribution network and perform detection and classification operations.

[0007] Preferably, the construction process of the training set FD in step S1 includes: S11. Collect fault voltage and current signal data under different main distribution network topologies, the fault voltage and current signal data includes the sampling values ​​of the three-phase voltage and three-phase current independent signals at each sampling time, and the fault voltage and current are the three-phase voltage and three-phase current independent signals, and construct a fault detection set , Indicates the Fault voltage and current, and , Indicates the Fault voltage and current Sampling time, where , Indicates the total number of failures; , Indicates the total sampling time; S12. Construct a label information set of the fault voltage and current starting time and duration , Indicates the Fault label value, and ,in Used to indicate the Whether a fault occurs at any time; S13. The fault voltage and current dataset with labels The order is randomly disrupted and used as the training set FD. Preferably, the attention weight allocation mechanism included in the fault feature reconstruction layer in step S2 is used to Input fault three-phase voltage and current signals , obtain the enhanced low-frequency feature matrix of the kth fault at the tth time step , the calculation formula is:

[0008]

[0009] in, , Indicates the number of layers, Indicates the total number of layers, The kth fault Tier The low-frequency component of the time step, It is The cross-scale projection weights of the low-frequency components of the layer, Indicates the Fault voltage and current, It is Layer scale.

[0010] Preferably, the fault feature reconstruction layer in step S2 includes a high- and low-frequency fusion and inverse transformation mechanism for , calculate and obtain the The characteristic vector of the fault , the calculation formula is:

[0011]

[0012]

[0013]

[0014]

[0015]

[0016] in, is a vector concatenation operation, , represents the total sampling time, It is Fault No. The reconstructed time domain signal value at the time step, It is the enhanced Fault No. The matrix of high-frequency components of the time step, It is Layer wavelet basis function, It is Fault No. Normalized attention weights of the high-frequency components of the layer, It is Fault No. Tier The high-frequency components of the time step, It is Hadamard. It is Layers can learn adaptive weight matrices, is the learnable temperature coefficient, It is Tier The total energy of the high-frequency components of the fault, is the square of the two-norm.

[0017] Preferably, the multi-scale time-frequency graph convolution feature extraction mechanism included in the fault feature fusion layer in step S2 is used to extract the fault feature through the first Fault voltage and current , calculate and obtain the Fault No. Layer wavelet coefficients Hedi Fault No. Layer component amplitude , the calculation formula is:

[0018]

[0019]

[0020] in, , represents the total sampling time, , is the frequency, Indicates the highest frequency in the fault signal, is discrete wavelet transform, It is Layer wavelet basis function, For Daubechies wavelet, is the symmetric Dobesi wavelet, It is Fault voltage and current The signal-to-noise ratio, is the continuous wavelet transform, is the scale parameter range.

[0021] Preferably, the multi-scale time-frequency graph convolution feature extraction mechanism included in the fault feature fusion layer in step S2 is also used to extract the fault feature through the first Fault No. Layer wavelet coefficients , calculate and obtain the Time domain directional sensitivity characteristics of faults , the calculation formula is:

[0022]

[0023]

[0024] in, , Indicates the number of layers, Indicates the total number of layers, is the Gaussian error linear unit activation function, is the convolution feature vector of the k-th fault, It is the topology mask dynamic filtering, is a two-dimensional weight matrix, is a two-dimensional convolution, is the left propagation feature convolution kernel, is the right propagation feature convolution kernel, is the bus transient oscillation feature convolution kernel.

[0025] Preferably, the cross-modal attention enhancement mechanism included in the fault feature fusion layer in step S2 is used to Time domain directional sensitivity characteristics of faults , calculate and obtain the Residual gated output of the fault , the calculation formula is:

[0026]

[0027]

[0028]

[0029]

[0030]

[0031] in, is the layer regularization, It is Fault fusion output, is the regularization to prevent overfitting, is the Sigmoid function, is a learnable gating weight matrix, It is Hadamard. For the Input fault three-phase voltage and current signals , is the normalized exponential activation function, It is Fault time domain query vector, For the The frequency domain key vector of the fault, For the The transposed vector of the fault frequency domain key vector, is the scaling factor, It is The fault query projection matrix, For the The fault key projection matrix, For the The frequency domain directional sensitive characteristics of the fault, It is Fault No. Layer energy weight vector, is the Toeplitz matrix, , is the L1 norm.

[0032] Preferably, in step S2, the mamba network layer calculates the fault classification label data based on the output result of the fault feature reconstruction layer and the output result of the fault feature fusion layer, specifically including: L1. Build the Mamba model and calculate the output features of the k-th fault; L2. Calculate the unnormalized classification score of the k-th fault belonging to the i-th category at the MLP layer of the Mamba model, and use the score result as input to the softmax layer of the Mamba model to obtain the probability that the k-th fault belongs to the i-th category and the fault category label.

[0033] Preferably, the calculation formula for the output feature of the kth fault in the L1 step is:

[0034]

[0035]

[0036]

[0037]

[0038]

[0039]

[0040]

[0041]

[0042]

[0043] in, Indicates the Fault No. Output features at time t, represents the matrix concatenation operation, , represents the total sampling time, is the state of the kth fault at time t, is the skip connection weight matrix, It is The characteristic vector of the fault Hedi Residual gated output of the fault The fusion matrix, and is the state evolution matrix of the dynamic adjustment of the k-th fault, The kth fault The hidden state matrix at time t, is the time resolution of the kth fault control state update, is a predefined diagonal matrix, e represents an exponential function with a natural constant as the base, is the state transfer matrix after the kth fault is discretized, is the state control matrix of the kth fault, is the output space projection matrix of the dynamic input mapping of the k-th fault, is the learnable weight matrix, is the bias term, is the hidden layer activation function.

[0044] Preferably, the specific operation process of the L2 step includes: Calculate the unnormalized classification score of the k-th fault and the i-th fault at the MLP layer , the calculation formula is:

[0045] in, It is the first layer of MLP The weight matrix of the class fault, It is the second layer of MLP Class fault weight matrix, is the bias matrix of the first layer of MLP, is the MLP second layer weight bias matrix, is the Gaussian error linear unit activation function; will score Input to the softmax layer to calculate the probability that the k-th fault belongs to the i-th type of fault and fault category labels , the calculation formula is:

[0046]

[0047] in, , is the total number of fault categories, represents the natural exponential function.

[0048] In another aspect, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.

[0049] On the other hand, the present invention further discloses a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0050] As can be seen from the above technical solution, the present invention provides a main distribution network detection and classification method driven by Mamba using dual-channel time-frequency fusion. Compared with the existing technology, the present invention has the following advantages: 1. By setting up an attention weight allocation mechanism in the fault feature reconstruction layer, the present invention can highlight the importance of key features in the fault signal by dynamically allocating weights at different time steps, thereby effectively suppressing noise interference, improving the accuracy of fault feature extraction, and achieving accurate recognition of fault signals in complex noise environments.

[0051] 2. By setting up a high- and low-frequency fusion and inverse transformation mechanism in the fault feature reconstruction layer, the present invention can fuse low-frequency features with high-frequency details at multiple scales, and reconstruct the original signal features through inverse transformation, thereby fully mining the time-frequency complementary information of the fault signal, enhancing the feature expression capability, and ultimately improving the model's accuracy in capturing the fault start time and duration.

[0052] 3. The present invention sets a multi-scale time-frequency graph convolution feature extraction mechanism in the fault feature fusion layer, decomposes the multi-layer time-frequency coefficients of the signal through wavelet transform, and combines it with direction-sensitive feature extraction to achieve joint modeling of the multi-scale spatiotemporal features of the fault signal, thereby further enhancing the richness of feature expression and improving the model's ability to distinguish fault types under complex topologies.

[0053] 4. By setting up a cross-modal attention enhancement mechanism in the fault feature fusion layer, the present invention can enhance the synergy between time-frequency domain features and optimize the feature transfer path through residual gated output, thereby effectively alleviating the information loss problem in multimodal feature fusion, improving feature fusion efficiency, and enhancing the noise robustness of the model in strong interference scenarios.

[0054] 5. By combining state-space modeling and classification output in the Mamba network layer, the present invention can capture the temporal evolution of fault signals in the dynamic feature modeling process of the model, and through the joint optimization of the MLP and Softmax layers, it can achieve accurate prediction of the fault category probability, thereby improving the detection and classification accuracy of highly dynamic main distribution networks.

[0055] 6. This invention can deeply couple the Mamba state-space model with the time-frequency characteristics of power signals, design a dedicated dual-channel time-frequency fusion architecture, and achieve accurate fault detection under complex noise and dynamic topology.

[0056] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become easy to understand through the following description. Of course, it is not necessary to achieve all of the above-mentioned advantages simultaneously in order to implement any product of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are intended to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings: Figure 1 It is a schematic diagram of the overall process of the present invention; Figure 2 Schematic diagram of the model framework structure of the present invention; Figure 3 Schematic diagram of the model system of the present invention based on dual-channel time-frequency fusion driving Mamba network; Figure 4 This is a schematic diagram of the data processing flow of the fault feature reconstruction layer of the present invention; Figure 5 This is a schematic diagram of the fault feature fusion layer data processing flow of the present invention; Figure 6 This is a performance comparison chart of the present invention and other fault detection algorithms in the prior art. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. In the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0059] In the embodiment, see Figures 1 to 6 .

[0060] like Figure 1 and Figure 2 As shown, a main distribution network detection and classification method driven by Mamba using dual-channel time-frequency fusion is proposed in an embodiment of the present invention, comprising the following steps: Step 1: Data Preparation The fault voltage and current signal data under different main distribution network topologies are collected and a training set FD is constructed.

[0061] Here, the fault voltage and current signal data includes the sampling values ​​of the three-phase voltage and three-phase current independent signals at each sampling moment. The fault voltage and current are independent signals of the three-phase voltage and three-phase current. The data set involved in the present invention strictly retains its independence when processing the three-phase voltage and three-phase current, that is, the three-phase voltage (phase A, phase B, phase C) and the three-phase current (phase A, phase B, phase C) are six independent signal sequences, rather than pre-fused data. Specifically, in the data collection and construction stage, each fault data in the fault detection set X is Contains the sampling values ​​of the above six independent signals at each sampling moment, namely middle, It actually corresponds to the sampling value combination of six independent signals at the tth moment (the t-time values ​​of the three-phase voltage and the t-time values ​​of the three-phase current respectively).

[0062] Specifically, the construction process of the training set FD includes: S11. Data collection: Collect fault voltage / current signal (three-phase signal) data under different main distribution network topologies and build a fault detection set , Indicates the Fault voltage and current, , represents the total number of failures, and , Indicates the Fault voltage and current Sampling time; , Represents the total sampling time, that is, each signal contains T sampling points; It is important to note that the signal must include typical fault types and different noise levels (SNR ≥ 40dB and SNR < 40dB). S12. Labeling: Label each signal with the fault start time and duration, and construct a time series label information set of the fault voltage and current start time and duration. , Indicates the Fault label value, and ,in Used to indicate the Whether a fault occurs at any time; S13. Data cleaning and preprocessing: remove outliers, standardize the signal to [-1, 1], and divide the training set and validation set proportionally to obtain a labeled fault voltage and current dataset. After that, the order is randomly disrupted and used as the training set FD.

[0063] Step 2: Model Building A model based on dual-channel time-frequency fusion driving Mamba is constructed. The model specifically includes a dual-channel time-frequency fusion architecture and a Mamba network layer, which is used to calculate the fault probability and fault category label of the k-th fault. Specifically: (1) Reference Figure 3 The model system of this application adopts the time domain feature processing channel and the frequency domain feature processing channel to realize the dynamic coordination of time and frequency features through the cross-modal attention enhancement mechanism to build a dual-channel time-frequency fusion architecture.

[0064] It should be noted that the dual-channel architecture of this application specifically refers to parallel "time-domain and frequency-domain" processing channels. The first channel, the time-domain feature processing channel, uses the attention weight allocation mechanism of the fault feature reconstruction layer to enhance low-frequency steady-state features (such as voltage and current trends in the fault background). It then combines high- and low-frequency fusion and inverse transformation mechanisms to reconstruct the time-domain signal, preserving the temporal details of the fault onset. The second channel, the frequency-domain feature processing channel, leverages the multi-scale time-frequency graph convolution feature extraction mechanism of the fault feature fusion layer to capture high-frequency mutation features (such as harmonic components at the moment of the fault) through discrete wavelet transforms (DWT) and continuous wavelet transforms (CWT). Dynamic coordination of time-frequency features is achieved through a cross-modal attention enhancement mechanism. The features of both channels are ultimately fed into the Mamba network layer, where a dynamic state evolution matrix is ​​used to adapt to the temporal evolution of the fault signal. This complete time-frequency feature processing chain of "separate extraction-targeted enhancement-deep fusion" is formed, specifically addressing the effective utilization of features in power grid fault signals under time-frequency coupling and strong noise interference.

[0065] The specific architecture content includes: A. Reference Figure 4 ,The fault feature reconstruction layer includes attention weight allocation mechanism, high and low frequency fusion and inverse transformation mechanism: (1) Perform multi-scale wavelet decomposition on the input signal (number of layers S, 3-5 layers are recommended) to separate the high-frequency components and low-frequency components At the same time, the attention mechanism is used to calculate the energy weight of the high-frequency components of each layer, dynamically integrate high- and low-frequency features, and the feature vector of the fault , where the calculation steps are as follows: Use the attention weight distribution mechanism to Input fault three-phase voltage and current signals , obtain the enhanced low-frequency feature matrix of the kth fault at the tth time step , the calculation formula is:

[0066]

[0067] in, , Indicates the number of layers, Indicates the total number of layers, The kth fault Tier The low-frequency component of the time step, It is The cross-scale projection weights of the low-frequency components of the layer, Indicates the Fault voltage and current, It is layer scale; At this time, by dynamically allocating weights for different time steps, the importance of key features in the fault signal can be highlighted, thereby effectively suppressing noise interference, improving the accuracy of fault feature extraction, and achieving accurate identification of fault signals in complex noise environments; Then use the high and low frequency fusion and inverse transformation mechanism, based on the low frequency feature matrix , calculate and obtain the The characteristic vector of the fault , the calculation formula is:

[0068]

[0069]

[0070]

[0071]

[0072]

[0073] in, is a vector concatenation operation, , represents the total sampling time, It is Fault No. The reconstructed time domain signal value at the time step, It is the enhanced Fault No. The matrix of high-frequency components of the time step, It is Layer wavelet basis function, It is Fault No. Normalized attention weights of the high-frequency components of the layer, It is Fault No. Tier The high-frequency components of the time step, It is Hadamard. It is Layers can learn adaptive weight matrices, is the learnable temperature coefficient, It is Tier The total energy of the high-frequency components of the fault, is the square of the two-norm; At this time, low-frequency features and high-frequency details can be fused at multiple scales, and the original signal features can be reconstructed through inverse transformation, so as to fully explore the time-frequency complementary information of the fault signal, enhance the feature expression ability, and ultimately improve the model's capture accuracy of the fault start time and duration.

[0074] B. Reference Figure 5 , the fault feature fusion layer includes a multi-scale time-frequency graph convolution feature extraction mechanism and a cross-modal attention enhancement mechanism: Perform discrete / continuous wavelet transform (DWT / CWT) on the reconstructed signal to extract time-domain direction-sensitive features (left / right propagation, bus oscillation) and frequency-domain energy distribution, and fuse the time-frequency features through a cross-modal attention mechanism to generate a residual gated output. , where the calculation steps are as follows: Using the multi-scale time-frequency graph convolution feature extraction mechanism, Fault voltage and current , calculate and obtain the Fault No. Layer wavelet coefficients Hedi Fault No. Layer component amplitude , the calculation formula is:

[0075]

[0076]

[0077] in, , represents the total sampling time, , is the frequency, Indicates the highest frequency in the fault signal, is discrete wavelet transform, It is Layer wavelet basis function, For Daubechies wavelet, is the symmetric Dobesi wavelet, It is Fault voltage and current The signal-to-noise ratio, is the continuous wavelet transform, is the scale parameter range; Afterwards, through Fault No. Layer wavelet coefficients , calculate and obtain the Time domain directional sensitivity characteristics of faults , the calculation formula is:

[0078]

[0079]

[0080] in, , Indicates the number of layers, Indicates the total number of layers, is the Gaussian error linear unit activation function, It is The convolution feature vector of the fault, It is the topology mask dynamic filtering, is a two-dimensional weight matrix, is a two-dimensional convolution, is the left propagation feature convolution kernel, is the right propagation feature convolution kernel, is the busbar transient oscillation characteristic convolution kernel; At this time, by decomposing the multi-layer time-frequency coefficients of the signal through wavelet transform and combining it with direction-sensitive feature extraction, it is possible to achieve joint modeling of the multi-scale temporal and spatial characteristics of the fault signal, thereby further enhancing the richness of feature expression and improving the model's ability to distinguish fault types under complex topologies. Finally, we use the cross-modal attention enhancement mechanism to Time domain directional sensitivity characteristics of faults , calculate and obtain the Residual gated output of the fault , the calculation formula is:

[0081]

[0082]

[0083]

[0084]

[0085]

[0086] in, is the layer regularization, It is Fault fusion output, is the regularization to prevent overfitting, is the Sigmoid function, is a learnable gating weight matrix, It is Hadamard. For the Input fault three-phase voltage and current signals , is the normalized exponential activation function, It is Fault time domain query vector, For the The frequency domain key vector of the fault, For the The transposed vector of the fault frequency domain key vector, is the scaling factor, It is The fault query projection matrix, For the The fault key projection matrix, For the The frequency domain directional sensitive characteristics of the fault, It is Fault No. Layer energy weight vector, is the Toeplitz matrix, , is the L1 norm; At this time, the synergy between time-frequency domain features can be enhanced, and the feature transfer path can be optimized through residual gated output, thereby effectively alleviating the information loss problem in multimodal feature fusion, improving feature fusion efficiency, and enhancing the model's anti-noise robustness in strong interference scenarios.

[0087] C. Construct a Mamba state space model in the Mamba network layer to input fusion features , dynamic modeling is performed through the state transition matrix A, control matrix B, and output matrix C to capture the fault propagation path and time step. At this time, the Mamba network layer calculates the fault classification label data based on the output results of the fault feature reconstruction layer and the fault feature fusion layer. Specifically, it includes: L1. Build the Mamba model and calculate the output features of the k-th fault. The calculation formula for the output features of the k-th fault is:

[0088]

[0089]

[0090]

[0091]

[0092]

[0093]

[0094]

[0095]

[0096]

[0097] in, Indicates the Fault No. Output features at time t, represents the matrix concatenation operation, , represents the total sampling time, is the state of the kth fault at time t, is the skip connection weight matrix, It is The characteristic vector of the fault Hedi Residual gated output of the fault The fusion matrix, and is the state evolution matrix of the dynamic adjustment of the k-th fault, The kth fault The hidden state matrix at time t, is the time resolution of the kth fault control state update, is a predefined diagonal matrix, e represents an exponential function with a natural constant as the base, is the state transfer matrix after the kth fault is discretized, is the state control matrix of the kth fault, is the output space projection matrix of the dynamic input mapping of the k-th fault, is the learnable weight matrix, is the bias term, is the hidden layer activation function; L2. The MLP layer of the Mamba model calculates the unnormalized classification score for the k-th fault, which is the i-th type of fault. The score is then input into the softmax layer of the Mamba model to obtain the probability that the k-th fault belongs to the i-th type of fault and the fault category label. The specific operation process at this point includes: Calculate the unnormalized classification score of the k-th fault and the i-th fault at the MLP layer , the calculation formula is:

[0098] in, It is the first layer of MLP The weight matrix of the class fault, It is the second layer of MLP Class fault weight matrix, is the bias matrix of the first layer of MLP, is the MLP second layer weight bias matrix, is the Gaussian error linear unit activation function; will score Input to the softmax layer to calculate the probability that the k-th fault belongs to the i-th type of fault and fault category labels ; At this time, the temporal evolution law of the fault signal can be captured in the process of dynamic feature modeling of the model, and through the joint optimization of the MLP and Softmax layers, the accurate prediction of the fault category probability can be achieved to improve the detection and classification accuracy of the highly dynamic main distribution network.

[0099] Step 3: Model training The training set FD is used to train the model using back propagation and gradient descent. When the training rounds reach the maximum number of training rounds or the loss function reaches the minimum, the training is stopped to obtain a trained main distribution network fault detection network, which is used to input the fault data set and then map the corresponding fault classification label, where: (1) Parameter configuration Learning rate: (Adam optimizer).

[0100] Temperature coefficient : 0.1-0.5 (controls the concentration of attention weight).

[0101] Loss function: cross entropy loss (multi-classification scenario).

[0102] (2) Training process The training set is fed into the model in batches and the loss between the predicted values ​​and the labels is calculated.

[0103] Optimize model parameters (weight matrix W, bias term b, etc.) through backpropagation.

[0104] After each round of training, the performance of the model is verified on the validation set, and training is stopped when the loss converges or the maximum number of rounds is reached.

[0105] Step 4: Fault Detection and Classification Use the trained model and input the fault voltage and current signal data of the main distribution network to perform detection and classification operations, where: (1) Real-time signal input includes: standardizing and wavelet decomposing the voltage / current signals collected in real time to generate input features in the same format as the training data.

[0106] (2) The reasoning process includes: outputting the probability distribution of fault categories through the trained model , and then take the category with the highest probability as the final result , the calculation formula is:

[0107]

[0108] in, , is the total number of fault categories, represents the natural exponential function.

[0109] (3) Result analysis: The output includes the fault type (such as phase A grounding, phase-to-phase B-C short circuit), start time and duration. At this time, combined with the grid topology information, the fault propagation path (such as bus number and line direction) can be located.

[0110] Furthermore, it should be noted that the application scenarios of this method are applicable to: (a) Real-time monitoring: highly dynamic and highly interfering main distribution network environment.

[0111] (b) Fault warning: transient fault analysis of renewable energy access to the grid.

[0112] (c) Accident backtracking: Verify model accuracy through historical data and optimize power grid protection strategies.

[0113] In addition, it should be noted that during the use of this method, it is also necessary to ensure that the training data covers multi-noise scenarios and complex power grid structures to avoid model overfitting, so as to ensure the quality of the data obtained after the calculation of this method.

[0114] In actual use, this method uses GPU accelerated reasoning (such as NVIDIA A100) to ensure real-time performance, and at the same time regularly fine-tunes the model with new data (such as every quarter) to perform model updates to adapt to changes in the power grid operating environment. At this time, the fault detection of this application is compared with the existing technology. Figure 6 As shown in the figure. Across various fault types, including software faults, sensor faults, circuit faults, and mechanical faults, the Mamba algorithm, powered by dual-channel time-frequency fusion, achieved an outstanding accuracy of 96.8%, surpassing the 95.6% of traditional SVMs and the 95.4% of traditional transformers. This demonstrates that the patented algorithm, through multi-scale feature reconstruction and cross-modal fusion, can more accurately identify various fault types, achieving greater detection robustness in complex noisy environments. This effectively improves the accuracy of capturing fault onset, duration, and propagation path, enabling more efficient and reliable main distribution network fault diagnosis, demonstrating significant performance advantages in the field of fault detection.

[0115] In summary, through the above steps, this application can significantly improve the detection robustness in complex noise environments through multi-scale feature reconstruction and cross-modal fusion, and accurately capture the fault onset time, duration and propagation path, making it convenient for users to quickly realize the main distribution network fault detection and classification based on dual-channel time-frequency fusion driving Mamba.

[0116] In addition, in further embodiments, the present application has further differences in actual application compared to similar model architectures in the prior art: This application constructs a three-level architecture of "fault feature reconstruction layer + fault feature fusion layer + Mamba network layer". Compared with existing Mamba variants, there are special optimizations for power system characteristics: this application is designed specifically for main distribution network fault detection, and the processing objects are non-stationary, strong noise voltage and current time-frequency signals. The core goal is to accurately capture the fault start time, duration and propagation path. It is necessary to solve the problems of cross-scale fusion of time-frequency features, noise suppression and dynamic topology adaptability. The application scenarios and goals of the above technologies are completely different.

[0117] This application architecture deeply integrates the physical characteristics of the main distribution network fault signal: (a) Time-frequency coupling: The discrete wavelet transform (DWT) and the continuous wavelet transform (CWT) are combined to extract the time domain coefficients and frequency domain amplitudes, solving the problem that a single transform cannot take into account both sudden change and steady-state characteristics. (b) Noise robustness: Feature distortion under strong noise (SNR < 40 dB) is suppressed through high-frequency component energy weighting and residual gating (Dropout + Sigmoid); (c) Topological dynamics: A topological mask is introduced to filter out redundant features under different power grid topologies, solving the problem that traditional models have poor adaptability to complex topologies.

[0118] However, conventional similar model architectures in the existing technology are not designed for the above-mentioned characteristics of power signals and cannot be directly applied to power grid fault detection scenarios.

[0119] In addition, this application addresses the core technical issues in the field of main distribution network fault detection (insufficient multi-scale feature fusion, high noise sensitivity, and poor dynamic topology adaptability) through the above-mentioned architectural innovations: (1) Solve the problem of "insufficient fusion of multi-scale features" Existing technologies (such as single time-frequency analysis and simple machine learning models) struggle to simultaneously capture both high-frequency mutations (fault onset) and low-frequency steady-state (fault persistence) features. This application utilizes a high- and low-frequency fusion mechanism in the fault feature reconstruction layer and multi-scale convolution in the fault feature fusion layer to achieve cross-scale complementarity of time-frequency features, significantly improving the completeness of feature representation.

[0120] (2) Solving the problem of “high noise sensitivity” In high-noise environments (e.g., SNR < 40dB), traditional methods are susceptible to interference and can lead to misjudgments. This application achieves this by: a. Attention weight allocation to enhance the weight of key features; b. Normalizing high-frequency component energy to suppress noise components; and c. Cross-modal attention to enhance time-frequency feature consistency. This allows the model to maintain high detection accuracy in low SNR scenarios (a 3%-5% improvement over existing technologies).

[0121] (3) Solve the problem of “poor adaptability of dynamic topology” Fault propagation paths in complex power grid topologies vary over time, making them difficult to model with traditional models. This application achieves precise tracking of fault paths in complex topologies by: a. using a direction-sensitive convolution kernel to capture the direction of fault propagation; b. using a topology mask to dynamically filter topology-independent features; and c. using dynamic state updates in the Mamba layer to adapt to path evolution.

[0122] In summary, this application can deeply couple the Mamba state space model with the time-frequency characteristics of power signals, design a dedicated dual-channel time-frequency fusion architecture, and achieve accurate fault detection under complex noise and dynamic topology. Specifically, it is reflected in: (1) The first fault feature reconstruction layer solves the problem of time-frequency feature loss through high-low frequency separation, attention enhancement, and inverse transformation reconstruction; (2) Innovative multi-scale time-frequency graph convolution and cross-modal attention fusion mechanism to adapt to the spatiotemporal evolution characteristics of power grid faults; (3) Construct a dynamic adaptive Mamba network layer, dynamically adjust the model state based on the power grid topology, and improve adaptability to complex scenarios.

[0123] In another aspect, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.

[0124] On the other hand, the present invention further discloses a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0125] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the dual-channel time-frequency fusion driven Mamba main distribution network detection and classification methods in the above embodiments.

[0126] It is understandable that the system provided by the embodiment of the present invention corresponds to the method provided by the embodiment of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts of the above method.

[0127] The embodiment of the present application further provides an electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus. Memory for storing computer programs; The processor is configured to implement the above-mentioned dual-channel time-frequency fusion driven Mamba main distribution network detection and classification method when executing the program stored in the memory.

[0128] The communication bus mentioned in the above electronic device can be a peripheral component interconnect standard bus or an extended industry standard architecture bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc.

[0129] The communication interface is used for communication between the above electronic device and other devices.

[0130] The memory may include a random access memory, or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0131] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor, etc.; it can also be a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.

[0132] It should also be noted that electronic devices also include terminal devices, which can also be called terminals, user equipment, mobile stations, mobile terminals, etc. Terminal devices can be mobile phones, smart TVs, wearable devices, tablet computers, computers with wireless transceiver functions, virtual reality terminal devices, augmented reality terminal devices, wireless terminals in industrial control, wireless terminals in unmanned driving, wireless terminals in remote surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, etc. The embodiments of this application do not limit the specific technology and specific device form used by the terminal devices.

[0133] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, tape), optical media, or semiconductor media (e.g., solid-state drive).

[0134] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

[0135] In addition, it should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components in a certain specific posture. If the specific posture changes, the directional indications will also change accordingly.

[0136] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the meaning of "and / or" appearing throughout the text includes three parallel schemes. Taking "A and / or B" as an example, it includes scheme A, or scheme B, or schemes in which A and B are satisfied at the same time. In addition, in the embodiments of the present invention, "multiple" refers to more than two. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

Claims

1. A dual-channel time-frequency fusion driven Mamba main distribution network detection and classification method, characterized by: The following steps are involved: S1. Collect fault voltage and current signal data under different main distribution network topologies and construct a training set FD; S2. Build a dual-channel time-frequency fusion-driven Mamba model. This model uses a time-domain feature processing channel and a frequency-domain feature processing channel to achieve dynamic coordination of time-frequency features through a cross-modal attention enhancement mechanism. The model includes a fault feature reconstruction layer, a fault feature fusion layer, and a Mamba network layer, which is used to calculate the fault probability and fault category label of the k-th fault. The fault feature reconstruction layer includes an attention weight allocation mechanism, high- and low-frequency fusion, and inverse transformation mechanisms. The fault feature fusion layer includes a multi-scale time-frequency graph convolution feature extraction mechanism and a cross-modal attention enhancement mechanism. S3. The training set FD is trained using back propagation and gradient descent to obtain a trained main distribution network fault detection network for inputting a fault data set and mapping the corresponding fault classification label; S4. Use the trained model to input the fault voltage and current signal data of the main distribution network and perform detection and classification operations.

2. The main distribution network detection and classification method driven by Mamba with dual-channel time-frequency fusion as claimed in claim 1 is characterized in that: The construction process of the training set FD in step S1 includes: S11. Collect fault voltage and current signal data under different main distribution network topologies, the fault voltage and current signal data includes the sampling values ​​of the three-phase voltage and three-phase current independent signals at each sampling time, and the fault voltage and current are the three-phase voltage and three-phase current independent signals, and construct a fault detection set , Indicates the Fault voltage and current, and , Indicates the Fault voltage and current Sampling time, where , Indicates the total number of failures; , Indicates the total sampling time; S12. Construct a label information set of the fault voltage and current starting time and duration , Indicates the Fault label value, and ,in Used to indicate the Whether a fault occurs at any time; S13. The fault voltage and current dataset with labels The order is randomly disrupted and used as the training set FD.

3. The main distribution network detection and classification method driven by Mamba with dual-channel time-frequency fusion as claimed in claim 1 is characterized in that: The attention weight allocation mechanism of the fault feature reconstruction layer in step S2 is used to Input fault three-phase voltage and current signals , obtain the enhanced low-frequency feature matrix of the kth fault at the tth time step , the calculation formula is: in, , Indicates the number of layers, Indicates the total number of layers, The kth fault Tier The low-frequency component of the time step, It is The cross-scale projection weights of the low-frequency components of the layer, Indicates the Fault voltage and current, It is Layer scale.

4. The main distribution network detection and classification method driven by Mamba with dual-channel time-frequency fusion as claimed in claim 3 is characterized in that: The high- and low-frequency fusion and inverse transformation mechanism of the fault feature reconstruction layer in step S2 is used to , calculate and obtain the The characteristic vector of the fault , the calculation formula is: in, is a vector concatenation operation, , represents the total sampling time, It is Fault No. The reconstructed time domain signal value at the time step, It is the enhanced Fault No. The matrix of high-frequency components of the time step, It is Layer wavelet basis function, It is Fault No. Normalized attention weights of the high-frequency components of the layer, It is Fault No. Tier The high-frequency components of the time step, It is Hadamard. It is Layers can learn adaptive weight matrices, is the learnable temperature coefficient, It is Tier The total energy of the high-frequency components of the fault, is the square of the two-norm.

5. The main distribution network detection and classification method driven by Mamba with dual-channel time-frequency fusion as claimed in claim 1 is characterized in that: The multi-scale time-frequency graph convolution feature extraction mechanism of the fault feature fusion layer in step S2 is used to extract the fault feature through the Fault voltage and current , calculate and obtain the Fault No. Layer wavelet coefficients Hedi Fault No. Layer component amplitude , the calculation formula is: in, , represents the total sampling time, , is the frequency, Indicates the highest frequency in the fault signal, is discrete wavelet transform, It is Layer wavelet basis function, For Daubechies wavelet, is the symmetric Dobesi wavelet, It is Fault voltage and current The signal-to-noise ratio, is the continuous wavelet transform, is the scale parameter range.

6. The main distribution network detection and classification method driven by Mamba with dual-channel time-frequency fusion as claimed in claim 5 is characterized in that: The multi-scale time-frequency graph convolution feature extraction mechanism of the fault feature fusion layer in step S2 is also used to extract the fault feature through the Fault No. Layer wavelet coefficients , calculate and obtain the Time domain directional sensitivity characteristics of faults , the calculation formula is: in, , Indicates the number of layers, Indicates the total number of layers, is the Gaussian error linear unit activation function, It is The convolution feature vector of the fault, It is a topological mask SsS code dynamic filtering, is a two-dimensional weight matrix, is a two-dimensional convolution, is the left propagation feature convolution kernel, is the right propagation feature convolution kernel, is the bus transient oscillation feature convolution kernel.

7. The main distribution network detection and classification method driven by dual-channel time-frequency fusion Mamba as claimed in claim 6 is characterized in that: The cross-modal attention enhancement mechanism of the fault feature fusion layer in step S2 is used to Time domain directional sensitivity characteristics of faults , calculate and obtain the Residual gated output of the fault , the calculation formula is: in, is the layer regularization, It is Fault fusion output, is the regularization to prevent overfitting, is the Sigmoid function, is a learnable gating weight matrix, It is Hadamard. For the Input fault three-phase voltage and current signals , is the normalized exponential activation function, It is Fault time domain query vector, For the The frequency domain key vector of the fault, For the The transposed vector of the fault frequency domain key vector, is the scaling factor, It is The fault query projection matrix, For the The fault key projection matrix, For the The frequency domain directional sensitive characteristics of the fault, It is Fault No. Layer energy weight vector, is the Toeplitz matrix, is the L1 norm.

8. The main distribution network detection and classification method driven by Mamba with dual-channel time-frequency fusion as claimed in claim 1 is characterized in that: In step S2, the Mamba network layer calculates the fault classification label data based on the output results of the fault feature reconstruction layer and the output results of the fault feature fusion layer, specifically including: L1. Build the Mamba model and calculate the output features of the k-th fault; L2. Calculate the unnormalized classification score of the k-th fault belonging to the i-th category at the MLP layer of the Mamba model, and use the score result as input to the softmax layer of the Mamba model to obtain the probability that the k-th fault belongs to the i-th category and the fault category label.

9. The main distribution network detection and classification method driven by Mamba with dual-channel time-frequency fusion as claimed in claim 8 is characterized in that: The calculation formula for the output feature of the kth fault in the L1 step is: in, Indicates the Fault No. Output features at time t, represents the matrix concatenation operation, , represents the total sampling time, is the state of the kth fault at time t, is the skip connection weight matrix, It is The characteristic vector of the fault Hedi Residual gated output of the fault The fusion matrix, and is the state evolution matrix of the dynamic adjustment of the k-th fault, The kth fault The hidden state matrix at time t, is the time resolution of the kth fault control state update, is a predefined diagonal matrix, e represents an exponential function with a natural constant as the base, is the state transfer matrix after the kth fault is discretized, is the state control matrix of the kth fault, is the output space projection matrix of the dynamic input mapping of the k-th fault, is the learnable weight matrix, is the bias term, is the hidden layer activation function.

10. The main distribution network detection and classification method driven by Mamba with dual-channel time-frequency fusion as claimed in claim 9 is characterized in that: The specific operation process of the L2 step includes: Calculate the unnormalized classification score of the k-th fault and the i-th fault at the MLP layer , the calculation formula is: in, It is the first layer of MLP The weight matrix of the class fault, It is the second layer of MLP Class fault weight matrix, is the bias matrix of the first layer of MLP, is the MLP second layer weight bias matrix, is the Gaussian error linear unit activation function; will score Input to the softmax layer to calculate the probability that the k-th fault belongs to the i-th type of fault and fault category labels , the calculation formula is: in, , is the total number of fault categories, represents the natural exponential function.

Citation Information

Patent Citations

  • Method, system and apparatus for fault detection

    CN109923423A

  • ADN early fault detection method based on high-frequency TFM network and application

    CN115963351A

  • Power battery fault detection method based on bidirectional Mama architecture

    CN119471389A

  • Underwater image enhancement method based on frequency domain analysis and visual Mama

    CN119784598A

  • Multi-domain unmanned aerial vehicle infrared image super-resolution dividing and conquering method based on Mama

    CN120374383A

Cited By

  • Device predictive maintenance method based on deep learning

    CN120805074A

  • Double-flow fault diagnosis method based on state space modeling and dynamic edge context awareness

    CN121147134A

  • Dual-stream fault diagnosis method based on state space modeling and dynamic edge context awareness

    CN121147134B

  • Industrial control anomaly detection method and system based on high and low frequency feature similarity

    CN121544634A

  • Amusement park safety monitoring and positioning early warning method

    CN121678158A