Master-Substation Coordination Fault Detection Method and Medium Based on Signal-Processing Enhanced Transformer

The signal processing enhanced Transformer model addresses the limitations of traditional fault detection by enhancing feature extraction and pattern recognition in power systems, achieving improved accuracy and efficiency in detecting transient faults.

CN119885041BActive Publication Date: 2025-07-15HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510362025.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-07-15
Estimated Expiration
2045-03-26

AI Technical Summary

Technical Problem

When traditional fault detection methods deal with weak, nonlinear and non-stationary signals in power systems, it is difficult to achieve efficient and accurate feature extraction, resulting in poor performance in scenarios with high real-time requirements and cannot meet the needs of fast response.

Method used

The main-match collaborative fault detection method based on signal processing enhanced Transformer is adopted. By introducing a transient weak feature enhancement attention mechanism and a learning nonlinear waveform reconstruction mechanism, a fault feature encoding layer and a multi-layer perceptron fault detection layer are built, and the model is trained in combination with backpropagation and gradient descent methods to obtain optimal parameters, and fine capture and pattern recognition of fault signals are realized.

Benefits of technology

It significantly improves the processing capability of weak nonlinear non-stationary signals, realizes higher accuracy fault detection, and meets the actual needs of accuracy and rapidity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119885041B_ABST
    Figure CN119885041B_ABST
Patent Text Reader

Abstract

The present invention discloses a main and distribution collaborative fault detection method based on a signal processing enhanced Transformer, including: S1. Collecting main and distribution network fault voltage and current signals for preprocessing and constructing a training set FD; S2. Setting a fault feature encoding layer and a multi-layer perceptron fault detection layer for constructing a signal processing enhanced Transformer, and then training with the training set FD; S3. Inputting a fault data set as a test set sample and outputting a fault time prediction result based on the signal processing enhanced Transformer. The present invention is applicable to the high-precision detection of the occurrence time and duration of main and distribution network faults. It can not only capture the transient energy and time-frequency characteristics of fault signals more precisely, but also identify fault patterns more accurately in a dynamic environment. At the same time, it significantly improves the processing ability of weak non-linear and non-stationary signals, realizing higher-precision fault detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fault detection, and particularly relates to a main and distribution coordinated fault detection method and medium based on a signal processing enhanced Transformer. Background Art

[0002] In the power system, fault detection is a key link to ensure the stable operation of the power grid. Traditional fault detection methods mainly rely on the basic analysis of voltage and current signals, and these methods usually include simple threshold judgment, spectrum analysis, etc. With the complexity of the power system and the increase of nonlinear loads, the traditional methods are insufficient in the ability to capture weak, nonlinear and non-stationary signals. Therefore, how to effectively process and analyze these complex signals has become an important challenge to improve the accuracy of fault detection.

[0003] In practical applications, in order to improve the accuracy of fault detection, engineers often use methods based on machine learning or deep learning models to process the collected data. However, such methods often face problems such as complex data preprocessing and inaccurate feature extraction. Especially when facing transient fault signals, the traditional neural network structure is difficult to achieve efficient and accurate feature extraction, resulting in poor performance in scenarios with high real-time requirements and unable to meet the needs of rapid response.

[0004] Therefore, in the prior art, the Transformer architecture is also used for fault signal processing. Through the powerful parallel computing ability and self-attention mechanism of the Transformer, the processing ability of nonlinear and non-stationary signals can be improved to a certain extent, thereby improving the accuracy and efficiency of fault detection. However, this solution still has certain limitations in processing extremely weak signals, especially in terms of the comprehensiveness and accuracy of signal feature extraction, which cannot meet the basic requirements.

[0005] Therefore, this application specifically proposes a main and distribution coordinated fault detection method based on a signal processing enhanced Transformer to solve the above technical problems. Summary of the Invention

[0006] The main purpose of the present invention is to provide a main and distribution coordinated fault detection method based on a signal processing enhanced Transformer, which is applicable to the high-precision detection of the occurrence time and duration of main and distribution power grid faults. By introducing a specially designed signal processing enhancement mechanism, it can not only capture the transient energy and time-frequency characteristics of fault signals more precisely, but also identify fault patterns more accurately in a dynamic environment. At the same time, it significantly improves the processing ability of weak nonlinear and non-stationary signals, overcomes the limitations of traditional Transformers in processing such signals, and realizes higher-precision fault detection to solve the technical problems proposed in the background art.

[0007] The present invention adopts the following technical solutions to solve the above technical problems:

[0008] A main and distribution collaborative fault detection method based on a signal processing enhanced Transformer, comprising:

[0009] S1. Collect the main and distribution network fault voltage and current signals for preprocessing, and construct a training set FD;

[0010] S2. Set a fault feature encoding layer and a multi-layer perceptron fault detection layer to construct a signal processing enhanced Transformer, and then use the training set FD to train the signal processing enhanced Transformer to obtain the optimal model parameters;

[0011] Specifically:

[0012] Set a fault feature encoding layer, which includes a transient weak feature enhanced attention mechanism and a learnable non-linear waveform reconstruction mechanism, used to calculate and obtain the fault transient reconstruction features, and based on the fault features of the previous layer, iteratively calculate the fault features of all layers downward to construct a multi-layer perceptron fault detection layer to obtain the pre-detection results of the fault occurrence time and duration;

[0013] Combine the fault feature encoding layer and the multi-layer perceptron fault detection layer to form a signal processing enhanced Transformer, and then use the training set FD to train the signal processing enhanced Transformer by using the backpropagation and gradient descent methods to obtain the optimal model parameters;

[0014] S3. Input the fault data set as a test set sample, and output the fault time prediction result based on the signal processing enhanced Transformer.

[0015] Preferably, the specific operation process of the step S1 includes:

[0016] S11. Collect the fault voltage and current signal data under different main and distribution network topologies, and construct a main and distribution network fault detection set, denoted as , there exists , , represents the total number of faults;

[0017] Among them represents the th fault voltage and current signal data, and there is , , represents the th fault voltage and current at the th sampling moment of the signal data, denotes the total sampling time;

[0018] S12. Construct a set of tag information for the starting time and duration of the fault voltage and current in the main and distribution power grids, denoted as ;

[0019] where denotes the th fault tag value, and there are , used to indicate whether a fault occurs at the moment;

[0020] S13. Randomly shuffle the fault voltage and current data set with tags and use it as the training set FD.

[0021] Preferably, the operation process of the S2 step includes:

[0022] S21. Set a transient weak feature enhancement attention mechanism and a learnable non-linear waveform reconstruction mechanism to construct a fault feature encoding layer;

[0023] S22. The fault feature encoding layer calculates and obtains the fault features of the th layer based on the fault features of the th layer, and is used to iteratively calculate the fault features of all layers;

[0024] S23. Further construct a multi-layer perceptron fault detection layer based on the fault feature encoding layer to obtain a pre-detection result of the fault occurrence time and duration based on the fault features of all layers;

[0025] S24. Based on the training set FD, use the backpropagation and gradient descent method to train the signal processing enhanced Transformer. When the number of training rounds reaches the maximum number of training rounds or the loss function reaches the minimum, stop training to obtain a trained main and distribution power grid fault occurrence time and duration detection network.

[0026] Preferably, the transient weak feature enhancement attention mechanism in the S21 step is used to perform transient feature enhancement processing on the th layer of the th layer and the th fault feature to obtain the voltage and current transient features of the th fault in the th layer. The calculation expression formula for the transient feature enhancement processing is:

[0027]

[0028] ​

[0029]

[0030]

[0031]

[0032] in, For the Tier Fault feature extraction of transient energy in the coding layer Query Value The weight matrix of It is Tier Fault feature extraction of transient energy in the coding layer Query value; It is Tier Fault feature extraction of transient energy in the coding layer Truth weight matrix; It is Tier Fault feature extraction of transient energy in the coding layer truth value; is the right transfer matrix; is the left transfer matrix; It is Layer fault feature extraction encoding layer The instantaneous energy of the fault voltage and current data; is layer regularization; is the activation function; Indicates Layer fault feature extraction encoding layer The instantaneous feature weight of each fault; Represents element-wise multiplication.

[0033] Preferably, in the step S21, a nonlinear waveform reconstruction mechanism can be learned for the The layer is input to Tier Fault Characteristics Reconstruction is used to get the Tier Fault feature No. Phase characteristics of time-frequency domain , frequency domain modulation amplitude hidden features and fault reconstruction features, including the time-frequency domain phase features The calculation formula is:

[0034]

[0035]

[0036]

[0037] Among them, is the time-frequency window size of the segment in the th layer fault feature extraction and encoding layer; is the step size of the segment in the th layer fault feature extraction and encoding layer; is the time-frequency domain feature of the segment of the th fault feature in the th layer fault feature extraction and encoding layer; represents the modulus operation; is the time-frequency domain amplitude feature of the segment of the

[0038] Preferably, the calculation expression formula of the frequency domain modulation amplitude hidden feature is:

[0039]

[0040]

[0041] Among them, is the time-frequency domain amplitude modulation feature of the segment of the th fault feature in the th layer fault feature extraction and encoding layer; is the amplitude modulation weight matrix of the th layer fault feature extraction and encoding layer; is the amplitude modulation bias matrix of the th layer fault feature extraction and encoding layer;

[0042] Preferably, the calculation process of the fault reconstruction feature includes:

[0043] L1. Calculate the fault feature reconstruction segment of the th fault in the th layer fault feature extraction and encoding layer, and the calculation expression formula is:

[0044]

[0045]

[0046] Among them, represents the phase information of the th segment of the th fault feature in the fault feature extraction and encoding layer of the is the imaginary unit; is the inverse Fourier transform; is the reconstructed time-domain feature of the th fault feature in the fault feature extraction and encoding layer of the is the th segment of the reconstructed time-domain feature of the th fault feature in the fault feature extraction and encoding layer of the ;

[0047] L2. Based on the reconstructed segments of the fault features, calculate the th fault reconstruction feature at the th layer, and the calculation expression formula is:

[0048]

[0049]

[0050]

[0051]

[0052] Among them, is the reconstruction query value of the th fault feature in the fault feature extraction and encoding layer of the is the reconstruction query value of the fault feature extraction and encoding layer of the weight matrix; is the reconstruction key value of the th fault feature in the fault feature extraction and encoding layer of the is the reconstruction key value of the fault feature extraction and encoding layer of the weight matrix; is the reconstruction true value of the th fault feature in the fault feature extraction and encoding layer of the is the reconstruction of the fault feature extraction and encoding layer of the true value weight matrix; is the scaling factor.

[0053] Preferably, the specific calculation formula for the fault feature encoding layer to calculate and obtain the fault features in the S22 step is:

[0054]

[0055]

[0056] In the formula, is the th layer and the th fault transient reconstruction feature; consists of two fully connected layers and a ReLU activation function, is the th layer of the fault feature extraction and encoding layer and the th fault feature.

[0057] Preferably, the calculation formula for obtaining the pre-detection results of the fault occurrence time and duration in the S23 step is:

[0058]

[0059]

[0060] Among them, represents the calculation of the multi-layer perceptron gradient and backpropagation, represents the th fault and the fault occurrence probability at each sampling point; represents the th fault and the fault probability at the th sampling point, represents the pre-detection results of the fault occurrence time and duration.

[0061] On the other hand, the present invention also discloses a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the processor is caused to execute the steps of the above method.

[0062] On yet another aspect, the present invention also discloses a computer device including a memory and a processor, the memory storing a computer program, and when the computer program is executed by the processor, the processor is caused to execute the steps of the above method.

[0063] As can be seen from the above technical solutions, the present invention provides a main and distribution cooperative fault detection method based on a signal processing enhanced Transformer. Compared with the prior art, the present invention has the following advantages:

[0064] 1. Through the transient energy and time-frequency collaborative analysis of weak non-linear and non-stationary main and distribution network fault signals by the Transformer based on the signal processing enhanced mechanism, the present invention can dynamically capture the transient characteristics of fault signals in the time domain and frequency domain, so as to improve the accuracy of main and distribution network fault detection and meet the actual requirements of accuracy and rapidity.

[0065] 2. By introducing a specially designed signal processing enhancement mechanism, the present invention can not only capture the transient energy and time-frequency characteristics of fault signals more precisely, but also identify fault patterns more accurately in a dynamic environment, significantly improving the processing ability of weak non-linear and non-stationary signals, overcoming the limitations of traditional Transformers in processing such signals, and achieving higher-precision fault detection.

[0066] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Of course, any product implementing the present invention does not necessarily need to achieve all the above-mentioned advantages simultaneously. Description of the Drawings

[0067] The specification drawings forming a part of this application are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0068] Figure 1 is a schematic flow chart of the method of the present invention;

[0069] Figure 2 is a system block diagram of the transient weak feature enhanced attention mechanism of the present invention;

[0070] Figure 3 is a system block diagram of the learnable non-linear waveform reconstruction mechanism of the present invention;

[0071] Figure 4 is a system schematic diagram of the fault feature extraction and encoding layer of the present invention;

[0072] Figure 5 is a system schematic diagram of the multi-layer perceptron fault detection layer of the present invention;

[0073] Figure 6 is a system schematic diagram of the signal processing enhanced Transformer model structure of the present invention. Detailed Embodiments

[0074] Next, in combination with the accompanying drawings in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.

[0075] In the embodiment, please refer in detail to Figures 1 to 6 .

[0076] The main and distribution collaborative fault detection method based on the signal processing enhanced Transformer proposed in the embodiment of the present invention can dynamically capture the transient characteristics of the fault signal in the time domain and frequency domain through the transient energy and time-frequency collaborative analysis of the weak non-linear and non-stationary main and distribution network fault signals by the Transformer based on the signal processing enhanced mechanism, so as to improve the main and distribution network fault detection accuracy and meet the actual requirements of accuracy and rapidity. As Figure 1 shown, the specific steps are as follows:

[0077] S1. Collect the main and distribution network fault voltage and current signals for preprocessing, and construct the training set FD;

[0078] S2. Design a signal processing enhanced neural network mechanism, set the fault feature encoding layer and the multi-layer perceptron fault detection layer, used to construct the signal processing enhanced Transformer, and then use the training set FD to train the signal processing enhanced Transformer to obtain the optimal model parameters;

[0079] S3. Input the fault data set as the test set sample, and output the fault time prediction result based on the signal processing enhanced Transformer.

[0080] In the actual use process, it is carried out in the following steps in sequence:

[0081] Step 1. Construct the training set FD of the network;

[0082] Step 1.1. Collect the fault voltage and current signal data under different main and distribution network topologies, and construct the main and distribution network fault detection set, denoted as , and , represents the th fault voltage and current, and , represents the th fault voltage and current at the th sampling moment; , represents the total number of faults; , represents the total sampling time;

[0083] Step 1.2: Construct a label information set for the starting time and duration of the fault voltage and current in the main distribution network, denoted as , where represents the th fault label value, , where indicates whether a fault occurs at the th moment;

[0084] Step 1.3: Randomly shuffle the fault voltage and current data set with labels and use it as the training set FD;

[0085] Step 2: Construct a signal processing enhanced Transformer, including: a fault feature encoding layer; a multi-layer perceptron fault detection layer;

[0086] Step 2.1: The fault feature encoding layer includes a transient weak feature enhanced attention mechanism and a learnable non-linear waveform reconstruction mechanism;

[0087] Step 2.1.1: The transient weak feature enhanced attention mechanism of the th layer fault feature extraction and encoding layer uses the following formula to perform transient feature enhancement processing on the input th layer th fault feature to obtain the voltage and current transient features of the th fault at the th layer , and the calculation expression formula for transient feature enhancement processing is:

[0088]

[0089]

[0090]

[0091]

[0092]

[0093] where is the transient energy of the th layer query value of the weight matrix of the is the layer, the transient energy of the fault feature extraction coding layer, query value; is the layer, the transient energy of the fault feature extraction coding layer, true value weight matrix; is the layer, the transient energy of the fault feature extraction coding layer, true value; is the right transition matrix; is the left transition matrix; is the layer, the fault feature extraction coding layer, the instantaneous energy of the fault voltage and current data; is the layer regularization; is the activation function; represents the element-wise multiplication; when is ;

[0094] Step 2.1.2, the learnable non-linear waveform reconstruction mechanism of the layer fault feature extraction coding layer uses the following formula to reconstruct the input layer fault feature to obtain the layer fault feature extraction coding layer, the th segment time-frequency domain phase feature of the th

[0095] fault feature;

[0096]

[0097]

[0098] where is the layer fault feature extraction coding layer, the segment time-frequency window size, is the layer fault feature extraction coding layer, the segment step size; is the short-time Fourier transform; is the The th fault feature's th time-frequency domain feature; Denotes the modulus operation; Denotes the phase angle calculation; Is the th layer of the fault feature extraction and encoding layer's th fault feature's th time-frequency domain amplitude feature;

[0099] The th layer of the fault feature extraction and encoding layer's learnable non-linear waveform reconstruction mechanism, and the th layer of the fault feature extraction and encoding layer's th fault feature's th frequency domain modulation amplitude hidden feature :

[0100]

[0101]

[0102] Where, Is the th layer of the fault feature extraction and encoding layer's th fault feature's th time-frequency domain amplitude modulation feature; Is the amplitude modulation weight matrix of the th layer of the fault feature extraction and encoding layer; Is the activation function;

[0103] The th layer of the fault feature extraction and encoding layer's learnable non-linear waveform reconstruction mechanism, and the th fault's th layer of the fault feature extraction and encoding layer's th fault feature reconstruction segment :

[0104]

[0105]

[0106] Where, Denotes the th layer of the fault feature extraction and encoding layer's th fault feature's th phase information, is the imaginary unit; is the inverse Fourier transform; is the reconstructed time-domain feature of the th fault feature in the fault feature extraction and encoding layer of the

[0107] The learnable non-linear waveform reconstruction mechanism of the fault feature extraction and encoding layer of the th fault in the layer to obtain the fault reconstruction feature :

[0108]

[0109]

[0110]

[0111]

[0112] where is the reconstruction query value of the th fault feature in the fault feature extraction and encoding layer of the is the reconstruction query value weight matrix of the fault feature extraction and encoding layer of the is the reconstruction key value of the th fault feature in the fault feature extraction and encoding layer of the is the reconstruction key value weight matrix of the fault feature extraction and encoding layer of the is the reconstruction true value of the th fault feature in the fault feature extraction and encoding layer of the is the reconstruction true value weight matrix of the fault feature extraction and encoding layer of the is the scaling factor;

[0113] Step 2.2, the fault feature extraction and encoding layer uses the following formula to obtain the th fault feature in the fault feature extraction and encoding layer of the layer :

[0114]

[0115]

[0116] Among them, is the th fault transient reconstruction feature of the

[0117] Step 2.3: The multi-layer perceptron fault detection layer uses the following formula to obtain the pre-detection results of the fault occurrence time and duration :

[0118]

[0119]

[0120] Among them, represents the fault occurrence probability of each sampling point of the th fault; represents the fault probability of the th fault at the

[0121] Step 2.4: Based on the training set FD, use backpropagation and gradient descent method to train the signal processing enhanced Transformer. When the number of training rounds reaches the maximum number of training rounds, or the loss function reaches the minimum, stop training, so as to obtain a trained main distribution network fault occurrence time and duration detection network for mapping the corresponding fault time prediction results of the input fault data set.

[0122] In a specific embodiment, a data set SGAH is set, 1200 fault data with a duration of 100 ms and a sampling rate of 5000 Hz are selected, and there are 4 types of fault types. For the comparative experiment with other models, there are:

[0123]

[0124] The best results in the above table are marked in bold, and the second-best results are marked with an underline;

[0125] Among them, Ours is the proposed signal processing enhanced Transformer; Accuracy, Precision, Recall, score, max (ms), avg (ms), max (ms), avg (ms) are evaluation metrics

[0126] The experimental results show that the proposed network model outperforms the existing detection methods on real - world datasets, demonstrating optimal detection performance.

[0127] Therefore, this application can not only capture the transient energy and time - frequency characteristics of fault signals more precisely, but also identify fault patterns more accurately in a dynamic environment. At the same time, it significantly improves the processing ability for weak non - linear and non - stationary signals, overcomes the limitations of traditional Transformers in processing such signals, and achieves higher - precision fault detection.

[0128] On the other hand, the present invention also discloses a computer - readable storage medium storing a computer program, which, when executed by a processor, causes the processor to execute the steps of the above - mentioned method.

[0129] On yet another aspect, the present invention also discloses a computer device, including a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, it causes the processor to execute the steps of the above - mentioned method.

[0130] In another embodiment provided by this application, there is also provided a computer program product containing instructions, which, when running on a computer, causes the computer to execute any one of the main - distribution collaborative fault - detection methods based on the signal - processing enhanced Transformer in the above - mentioned embodiments.

[0131] It can be understood that the system provided by the embodiments of the present invention corresponds to the method provided by the embodiments of the present invention. For the explanations, examples, and beneficial effects of related content, reference can be made to the corresponding parts in the above - mentioned method.

[0132] The embodiments of this application also provide an electronic device, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus.

[0133] The memory is used to store a computer program.

[0134] The processor is used to implement the above - mentioned main - distribution collaborative fault - detection method based on the signal - processing enhanced Transformer when executing the program stored in the memory.

[0135] The communication bus mentioned in the above - mentioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc.

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

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

[0138] The aforementioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0139] It should also be noted that the electronic device further includes a terminal device, which may also be referred to as a terminal, a user equipment, a mobile station, a mobile terminal, etc. The terminal device may be a mobile phone, a smart TV, a wearable device, a tablet computer, a computer with wireless transceiver function, a virtual reality terminal device, an augmented reality terminal device, a wireless terminal in industrial control, a wireless terminal in unmanned driving, a wireless terminal in remote surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, and so on. The embodiments of the present application do not limit the specific technologies and specific device forms adopted by the terminal device.

[0140] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part 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 the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server, a data center, etc. that includes one or more integrated available media. The available media may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state drive SSD), etc.

[0141] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

[0142] 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...), the directional indications are only used to explain the relative positional relationship and movement conditions between components in a specific posture. If the specific posture changes, the directional indications will also change accordingly.

[0143] In addition, if the descriptions such as "first" and "second" are involved 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 implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In addition, the meaning of "and / or" appearing throughout the text includes three parallel scenarios. Taking "A and / or B" as an example, it includes Scenario A, or Scenario B, or the scenario where both A and B are satisfied simultaneously. In addition, in the embodiments of the present invention, "a plurality" means two or more. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present invention.

Claims

1. A main and distribution collaborative fault detection method based on a signal processing enhanced Transformer, characterized in that, Including: S1. Collect the fault voltage and current signals of the main and distribution networks for preprocessing, and construct a training set FD; S2. Set up a fault feature coding layer, which includes a transient weak feature enhanced attention mechanism and a learnable non-linear waveform reconstruction mechanism, for calculating and obtaining fault transient reconstruction features, and iteratively calculating fault features of all layers downward based on the fault features of the previous layer to construct a multi-layer perceptron fault detection layer, and obtaining pre-detection results of the fault occurrence time and duration. The transient weak feature enhanced attention mechanism is used to perform transient feature enhancement processing on the th layer for the th layer, the th fault feature to obtain the voltage and current transient features of the th fault at the th layer ; Combine the fault feature encoding layer and the multi-layer perceptron fault detection layer to form a signal processing enhanced Transformer. Then, use the training set FD to train the signal processing enhanced Transformer by backpropagation and gradient descent method to obtain the optimal parameters of the model; S3. Input the fault data set as a test set sample, and based on the signal processing enhanced Transformer, output the fault time prediction result; The calculation expression formula for the transient feature enhancement processing is: Among them, is the layer, the th transient energy of the fault feature extraction coding layer query value weight matrix; is the layer, the th transient energy of the fault feature extraction coding layer query value; is the layer, the th transient energy of the fault feature extraction coding layer true value weight matrix; is the layer, the th transient energy of the fault feature extraction coding layer true value; is the right transition matrix; is the left transition matrix; is the layer of the fault feature extraction coding layer, the th instantaneous energy of the fault voltage and current data; is the layer regularization; is the activation function; represents the layer of the fault feature extraction coding layer, the th fault instantaneous feature weight; represents element-wise multiplication.

2. The main and distribution collaborative fault detection method based on a signal processing enhanced Transformer according to claim 1, wherein The specific operation process of the S1 step includes: S11. Collect fault voltage and current signal data under different main and distribution network topologies, and construct a main and distribution network fault detection set, denoted as , there exists , , indicating the total number of faults; wherein represents the signal data of the fault voltage and current of the th fault, represents the signal data of the fault voltage and current at the th sampling moment, represents the total sampling time; S12. Construct a set of label information on the starting time and duration of the fault voltage and current in the main distribution network, denoted as ; Among them indicates the th fault label value, and there are , , which is used to indicate whether a fault occurs at the th moment; S13. Take the faulty voltage and current data set with labels After randomly shuffling the order, use it as the training set FD.

3. The main and distribution collaborative fault detection method based on a signal processing enhanced Transformer according to claim 1, wherein, The operation process of the S2 step includes: S21. Set the transient weak feature enhancement attention mechanism and the learnable non-linear waveform reconstruction mechanism for constructing the fault feature encoding layer; S22. The fault feature coding layer calculates and obtains the fault features of the -th layer according to the fault features of the -th layer for iterative calculation of the fault features of all layers; S23. Further construct a multi-layer perceptron fault detection layer based on the fault feature encoding layer for obtaining the pre-detection results of the fault occurrence time and duration based on the fault features of all layers; S24. Based on the training set FD, use the backpropagation and gradient descent method to train the signal processing enhanced Transformer. When the training round reaches the maximum training round or the loss function reaches the minimum, stop training to obtain the trained main and distribution network fault occurrence time and duration detection network.

4. The method for primary and secondary collaborative fault detection based on a signal processing enhanced Transformer according to claim 3, wherein, In the step S21, the learnable non-linear waveform reconstruction mechanism is used to reconstruct the -layer input of the -layer th fault feature in sequence to obtain the -layer th fault feature's th time-frequency domain phase feature , frequency domain modulation amplitude hidden feature and fault reconstruction feature. The calculation expression formula of the time-frequency domain phase feature is as follows: in, It is Layer fault feature extraction encoding layer The time-frequency window size, It is Layer fault feature extraction encoding layer Segment step size; is the short-time Fourier transform; It is Layer fault feature extraction encoding layer Fault feature No. Segment time-frequency domain features; Indicates the modulo operation; It is Layer fault feature extraction encoding layer Fault feature No. The amplitude characteristics of the segment in the time-frequency domain; Indicates the phase angle.

5. The main and distribution cooperative fault detection method based on a signal processing enhanced Transformer according to claim 4, wherein The frequency-domain modulation amplitude hiding feature The calculation expression formula is as follows: Among them, is the th segment time-frequency domain amplitude modulation feature of the th fault feature in the fault feature extraction and encoding layer; Segment time-frequency domain amplitude modulation feature; is the amplitude modulation weight matrix of the th layer fault feature extraction and encoding layer; is the amplitude modulation bias matrix of the th layer fault feature extraction and encoding layer; is the activation function.

6. The main and distribution collaborative fault detection method based on a signal processing enhanced Transformer according to claim 5, wherein, The calculation process of the fault reconstruction feature includes: L1. Calculate the fault in the fault feature reconstruction segment of the fault feature extraction and encoding layer at the layer, and the calculation expression is: Among them, represents the phase information of the n-th fault feature of the m-th segment in the fault feature extraction and encoding layer of the k-th layer, where is the imaginary unit; is the inverse Fourier transform; is the reconstructed time-domain feature of the n-th fault feature of the fault feature extraction and encoding layer of the k-th layer, and is the m-th segment of the reconstructed time-domain feature. L2. Reconstruct the fragment based on the fault characteristics, and calculate the fault reconstruction characteristics of the th fault at the th layer. The calculation expression formula is: ​ in, It is Layer fault feature extraction encoding layer Reconstruction of fault characteristics Query value; It is Layer fault feature extraction and encoding layer reconstruction Query Value Weight matrix; It is Layer fault feature extraction encoding layer Reconstruction of fault characteristics Key value; It is Layer fault feature extraction and encoding layer reconstruction Key-value Weight matrix; It is Layer fault feature extraction encoding layer Reconstruction of fault characteristics truth value; It is Layer fault feature extraction and encoding layer reconstruction True Value Weight matrix; is the scaling factor.

7. The main and distribution collaborative fault detection method based on a signal processing enhanced Transformer according to claim 6, wherein, The specific calculation formula for the fault feature encoding layer to calculate and obtain the fault features in the S22 step is: In the formula, is the th fault transient reconstruction feature of the consisting of two fully connected layers and a ReLU activation function, is the th fault feature of the fault feature extraction and encoding layer of the 8. The main and distribution collaborative fault detection method based on a signal processing enhanced Transformer according to claim 7, wherein, The calculation formula for obtaining the pre-detection results of the fault occurrence time and duration in the S23 step is: Among them, represents the calculation of the gradient and backpropagation of the multi-layer perceptron, represents the probability of failure occurrence at each sampling point of the represents the probability of the th fault at the th sampling point, and represents the pre-detection results of the fault occurrence time and duration.

9. A computer-readable storage medium, characterized in that, There is a computer program stored, and when the computer program is executed by a processor, the processor executes the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Power grid equipment fault prediction method and system based on evolutionary structure representation learning

    CN119004045A

  • Early-stage fault diagnosis method, system and equipment for boat hanging frame and medium

    CN119202792A