Main-distribution cooperative fault detection method based on signal processing enhanced Transformer and medium

By introducing a signal processing enhancement mechanism into Transformer, a signal processing enhanced Transformer is built, which solves the problem that traditional fault detection methods are difficult to deal with weak, nonlinear and non-stationary fault signals, and achieves higher accuracy and faster fault detection effects.

CN119885041AActive Publication Date: 2025-04-25HEFEI UNIV OF TECH
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional fault detection methods are difficult to effectively deal with weak, nonlinear and non-stationary fault signals in power systems, especially when changing transiently, resulting in insufficient detection accuracy and real-time performance.

Method used

The main-coupled collaborative fault detection method based on signal processing enhanced Transformer is adopted. By introducing a transient weak feature enhanced attention mechanism and a learning nonlinear waveform reconstruction mechanism, a signal processing enhanced Transformer is built, and training is carried out to obtain the optimal parameters of the model, thereby achieving high-precision detection of the fault signal.

Benefits of technology

It significantly improves the processing capability of weak nonlinear non-stationary signals, can capture the transient energy and time-frequency characteristics of the fault signal more accurately, dynamically identify the fault mode, realize higher-precision fault detection, and meet the needs of fast response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119885041A_ABST
    Figure CN119885041A_ABST
Patent Text Reader

Abstract

The invention discloses a signal processing enhanced Transformer-based main and distribution cooperative fault detection method, which comprises the following steps of: S1, acquiring main and distribution network fault voltage and current signals for preprocessing, and constructing a training set FD; s2, setting a fault feature coding layer and a multi-layer perceptron fault detection layer for constructing a signal processing enhanced Transform, and then adopting a training set FD for training; and S3, inputting the fault data set as a test set sample, and outputting a fault moment prediction result based on the signal processing enhanced Transformer. The method is suitable for high-precision detection of the fault occurrence time and duration of the main power distribution network, transient energy and time-frequency characteristics of fault signals can be carefully captured, fault modes can be accurately recognized in a dynamic environment, the processing capacity of weak nonlinear and non-stationary signals is remarkably improved, and the method is suitable for large-scale popularization and application. And higher-precision fault detection is realized.
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 in particular to a main-distribution collaborative 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 basic analysis of voltage and current signals, which usually include simple threshold judgment, spectrum analysis, etc. With the complexity of power systems and the increase of nonlinear loads, traditional methods are insufficient 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 the problems of complex data preprocessing and inaccurate feature extraction. In particular, when faced with transient fault signals, traditional neural network structures are 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, the existing technology also uses the Transformer architecture to process fault signals. Through the powerful parallel computing capability and self-attention mechanism of Transformer, the processing capability 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 when processing extremely weak signals, especially in terms of the comprehensiveness and accuracy of signal feature extraction, which fails to meet the basic requirements.

[0005] To this end, this application specifically proposes a main-distribution collaborative 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-distribution coordinated fault detection method based on a signal processing enhanced Transformer, which is suitable for high-precision detection of the time and duration of main distribution network faults. By introducing a specially designed signal processing enhancement mechanism, it can not only capture the transient energy and time-frequency characteristics of the fault signal more finely, but also more accurately identify the fault mode in a dynamic environment. At the same time, it also significantly improves the processing capability of weak nonlinear and non-stationary signals, overcomes the limitations of traditional Transformers in processing such signals, and achieves higher-precision fault detection to solve the technical problems raised in the background technology.

[0007] The present invention adopts the following technical solutions to solve the above technical problems: A main and distribution coordinated fault detection method based on signal processing enhanced Transformer, comprising: S1. Collect the fault voltage and current signals of the main distribution network for preprocessing and construct the training set FD; S2. Set the fault feature encoding layer and the 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; Specific: A fault feature encoding layer is set up. The fault feature encoding layer includes a transient weak feature enhancement attention mechanism and a learnable nonlinear waveform reconstruction mechanism, which are used to calculate and obtain the transient reconstruction features of the fault. According to the fault features of the previous layer, the fault features of all layers are iteratively calculated downward to construct a multi-layer perceptron fault detection layer to obtain the pre-detection results of the fault occurrence time and duration. The fault feature encoding layer and the multi-layer perceptron fault detection layer are combined to form a signal processing enhanced Transformer, which is then trained using the training set FD using back propagation and gradient descent to obtain the optimal model parameters; S3. Input the fault dataset as the test set sample and output the fault time prediction result based on the signal processing enhanced Transformer.

[0008] Preferably, the specific operation process of step S1 includes: S11. Collect fault voltage and current signal data under different main distribution network topologies and construct a main distribution network fault detection set, denoted as ,exist , , Indicates the total number of failures; in Indicates The signal data of fault voltage and current are , , Indicates Fault voltage and current Signal data at the sampling time, Indicates the total sampling time; S12. Construct a label information set of the starting time and duration of the fault voltage and current of the main distribution network, recorded as ; in Indicates Fault tag value, , Used to indicate the Whether a failure occurs at any time; S13. The fault voltage and current dataset with labels The order is randomly shuffled and used as the training set FD. Preferably, the operation process of step S2 includes: S21. Set up a transient weak feature enhancement attention mechanism and a learnable nonlinear waveform reconstruction mechanism to construct a fault feature encoding layer; S22. The fault feature coding layer is based on Layer fault characteristics are calculated to obtain the first The fault characteristics of the layer are used to iteratively calculate the fault characteristics of all layers; S23. Further construct a multi-layer perceptron fault detection layer based on the fault feature encoding layer, which is used to obtain 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, the signal processing enhanced Transformer is trained using back propagation and gradient descent methods. When the number of training rounds reaches 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 occurrence time and duration detection network.

[0009] Preferably, in step S21, the transient weak feature enhancement attention mechanism is used in the first Layer to layer Tier Fault Characteristics Transient feature enhancement is performed to obtain the The fault is in Voltage and current transient characteristics of the layer , the calculation formula for transient feature enhancement processing is:

[0010]

[0011]

[0012]

[0013]

[0014] 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.

[0015] 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:

[0016]

[0017]

[0018] 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.

[0019] Preferably, the frequency domain modulation amplitude hides the feature The calculation formula is:

[0020]

[0021] in, It is Layer fault feature extraction encoding layer Fault feature No. Amplitude modulation characteristics of the segment in the time-frequency domain; It is Layer fault feature extraction coding layer amplitude modulation weight matrix; It is Layer fault feature extraction coded layer amplitude modulation bias matrix; is the activation function.

[0022] Preferably, the calculation process of the fault reconstruction feature includes: L1. Calculate the The fault is in Layer fault feature extraction Encoding layer fault feature reconstruction fragment , the calculation formula is:

[0023]

[0024] in, Indicates Layer fault feature extraction encoding layer Fault feature No. Segment phase information, is an imaginary unit; is the inverse Fourier transform; It is Layer fault feature extraction encoding layer The reconstructed time domain features of the fault features, It is Layer fault feature extraction encoding layer Fault feature No. Segment reconstruction time domain features; L2. Reconstruct the fragment based on the fault characteristics and calculate the The fault is in Fault reconstruction characteristics of the layer , the calculation formula is:

[0025]

[0026]

[0027]

[0028] 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.

[0029] Preferably, the specific calculation formula for calculating the fault feature by the fault feature coding layer in step S22 is:

[0030]

[0031] In the formula, It is Tier Fault transient reconstruction characteristics; It consists of two fully connected layers and a ReLU activation function. For the Layer fault feature extraction encoding layer Fault characteristics.

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

[0033]

[0034] in, Represents the multi-layer perceptron gradient and back propagation calculation, Indicates The probability of failure at each sampling point of the fault line; Indicates The fault is in The failure probability of each sampling point is Indicates the prediction result of fault occurrence time and duration.

[0035] On the other hand, 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.

[0036] On the other hand, the present invention further discloses a computer device, including 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.

[0037] It can be seen from the above technical solution that the present invention provides a main-distribution coordinated fault detection method based on signal processing enhanced Transformer. Compared with the prior art, the present invention has the following advantages: 1. The present invention uses a Transformer based on a signal processing enhanced mechanism to perform transient energy and time-frequency coordinated analysis on weak nonlinear and non-stationary main and distribution network fault signals, and can dynamically capture the transient characteristics of fault signals in the time domain and frequency domain, thereby improving the accuracy of main and distribution network fault detection and meeting the actual needs of accuracy and speed.

[0038] 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 the fault signal more accurately, but also identify the fault mode more accurately in a dynamic environment, significantly improving the processing capability of weak nonlinear and non-stationary signals, overcoming the limitations of traditional Transformer in processing such signals, and achieving higher-precision fault detection.

[0039] 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 advantages described above simultaneously for any product implementing the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings constituting a part of the present application are used to provide a further understanding of the present invention. The exemplary 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: Figure 1 It is a schematic diagram of the method flow of the present invention; Figure 2 This is a system block diagram of the transient weak feature enhancement attention mechanism of the present invention; Figure 3 It is a system block diagram of the learnable nonlinear waveform reconstruction mechanism of the present invention; Figure 4 A schematic diagram of a fault feature extraction coding layer system of the present invention; Figure 5 A schematic diagram of a multi-layer perceptron fault detection layer system of the present invention; Figure 6 It is a schematic diagram of the structure system of the signal processing enhanced Transformer model of the present invention. DETAILED DESCRIPTION

[0041] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than 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 in 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.

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

[0043] The main distribution network coordinated fault detection method based on 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 coordinated analysis of the weak nonlinear non-stationary main distribution network fault signal based on the signal processing enhanced mechanism Transformer, so as to improve the main distribution network fault detection accuracy and meet the actual needs of accuracy and speed, such as Figure 1 As shown, the specific steps include: S1. Collect the fault voltage and current signals of the main distribution network for preprocessing and construct the training set FD; S2. Design a signal processing enhanced neural network mechanism, set up 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; S3. Input the fault dataset as the test set sample and output the fault time prediction result based on the signal processing enhanced Transformer.

[0044] In actual use, follow the steps below: Step 1: Construct the training set FD of the network; Step 1.1: Collect fault voltage and current signal data under different main distribution network topologies and construct a main distribution network fault detection set, denoted as ,and , Indicates The fault voltage and current are , Indicates Fault voltage and current Sampling time; , Indicates the total number of failures; , Indicates the total sampling time; Step 1.2: Construct a label information set of the starting time and duration of the fault voltage and current of the main distribution network, recorded as ,in, Indicates Fault tag value, ,in Instructions in Whether a failure occurs at any time; Step 1.3: The fault voltage and current dataset with labels After randomly shuffling the order, they are used as the training set FD; Step 2: Construct a signal processing enhanced Transformer, including: fault feature encoding layer; multi-layer perceptron fault detection layer; Step 2.1, the fault feature encoding layer includes a transient weak feature enhancement attention mechanism and a learnable nonlinear waveform reconstruction mechanism; Step 2.1.1, the The transient weak features of the encoding layer are extracted using the following formula to enhance the attention mechanism. Tier Fault Characteristics Transient feature enhancement is performed to obtain the The fault is in Voltage and current transient characteristics of the layer , the calculation formula for transient feature enhancement processing is:

[0045]

[0046]

[0047]

[0048]

[0049] 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; when hour, ; Step 2.1.2, the The learnable nonlinear waveform reconstruction mechanism of the encoding layer is used to extract the fault features of the first layer. Layer Fault Characteristics Reconstruction, get Layer fault feature extraction encoding layer Fault feature No. Phase characteristics of time-frequency domain ;

[0050]

[0051]

[0052] 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 means to find the phase angle; It is Layer fault feature extraction encoding layer Fault feature No. The amplitude characteristics of the segment in the time-frequency domain; The said The learnable nonlinear waveform reconstruction mechanism of the coding layer is used to extract the fault features of the first layer. The following formula is used to obtain the Layer fault feature extraction encoding layer Fault feature No. Hidden features of modulation amplitude in frequency domain :

[0053]

[0054] in, It is Layer fault feature extraction encoding layer Fault feature No. Amplitude modulation characteristics of the segment in the time-frequency domain; It is Layer fault feature extraction coding layer amplitude modulation weight matrix; It is Layer fault feature extraction coded layer amplitude modulation bias matrix; is the activation function; The said The learnable nonlinear waveform reconstruction mechanism of the coding layer is used to extract the fault features of the first layer. The following formula is used to obtain the The fault is in Layer fault feature extraction encoding layer Fault feature reconstruction fragment :

[0055]

[0056] in, Indicates Layer fault feature extraction encoding layer Fault feature No. Segment phase information, is an imaginary unit; is the inverse Fourier transform; It is Layer fault feature extraction encoding layer Reconstructed time domain features of fault features; No. The learnable nonlinear waveform reconstruction mechanism of the coding layer is used to extract the fault features of the first layer. The following formula is used to obtain the The fault is in Fault reconstruction characteristics of layers :

[0057]

[0058]

[0059]

[0060] 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; Step 2.2: The fault feature extraction coding layer is obtained by using the following formula: Layer fault feature extraction encoding layer Fault Characteristics :

[0061]

[0062] in, It is Tier The transient reconstruction features of the fault; FeedForward consists of two fully connected layers and ReLU activation function; Step 2.3: The multi-layer perceptron fault detection layer obtains the fault occurrence time and duration pre-detection results using the following formula: :

[0063]

[0064] in, Indicates The probability of failure at each sampling point of the fault line; Indicates The fault is in Failure probability of each sampling point; Step 2.4: Based on the training set FD, the signal processing enhanced Transformer is trained using back propagation and gradient descent methods. When the training rounds reach the maximum training rounds or the loss function reaches the minimum, the training is stopped to obtain a trained main distribution network fault occurrence time and duration detection network, which is used to map the input fault data set to the corresponding fault time prediction result.

[0065] In a specific embodiment, an existing data set SGAH is set, 1200 fault data of 100ms, sampling rate of 5000Hz, 4 fault types are selected, and the comparative experiments with other models are as follows:

[0066] In the table above, the best results are marked in bold, and the second best results are underlined; Among them, Ours is the proposed signal processing enhanced Transformer; Accuracy, Precision, Recall, score、max (ms), avg (ms), max (ms), avg (ms) is the evaluation index Experimental results show that the proposed network model outperforms existing detection methods on real datasets and exhibits the best detection performance.

[0067] Therefore, the present application can not only capture the transient energy and time-frequency characteristics of fault signals more accurately, but also identify fault modes more accurately in dynamic environments. At the same time, it also significantly improves the processing capabilities of weak nonlinear and non-stationary signals, overcomes the limitations of traditional Transformers in processing such signals, and achieves higher-precision fault detection.

[0068] On the other hand, 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.

[0069] On the other hand, the present invention further discloses a computer device, including 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.

[0070] 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 main-distribution collaborative fault detection methods based on a signal processing enhanced Transformer in the above-mentioned embodiments.

[0071] 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 in the above method.

[0072] The embodiment of the present application also provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus. Memory, used to store computer programs; The processor is used to implement the main and distribution collaborative fault detection method based on the signal processing enhanced Transformer when executing the program stored in the memory.

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

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

[0075] The memory may include a random access memory (RAM) or 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.

[0076] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can 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.

[0077] 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.

[0078] 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 process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. 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 site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive SSD), etc.

[0079] 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 principle of the present invention should be included in the protection scope of the present invention.

[0080] 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 position relationship, movement status, etc. between the components in a certain specific posture. If the specific posture changes, the directional indication will also change accordingly.

[0081] 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 used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the meaning of "and / or" appearing in the full text includes three parallel schemes. Taking "A and / or B" as an example, it includes scheme A, or scheme B, or schemes that A and B meet 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 the field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered 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 main and distribution collaborative fault detection method based on signal processing enhanced Transformer, characterized in that: include: S1. Collect the fault voltage and current signals of the main distribution network for preprocessing and construct the training set FD; S2. Set up a fault feature encoding layer, which includes a transient weak feature enhancement attention mechanism and a learnable nonlinear waveform reconstruction mechanism, which is used to calculate and obtain the transient reconstruction features of the fault, and iteratively calculate the fault features of all layers downward according to the fault features of the previous layer, so as to construct a multi-layer perceptron fault detection layer and obtain the pre-detection results of the fault occurrence time and duration; The fault feature encoding layer and the multi-layer perceptron fault detection layer are combined to form a signal processing enhanced Transformer, which is then trained using the training set FD using back propagation and gradient descent to obtain the optimal model parameters; S3. Input the fault dataset as the test set sample and output the fault time prediction result based on the signal processing enhanced Transformer.

2. The main and distribution coordinated fault detection method based on signal processing enhanced Transformer according to claim 1 is characterized in that: The specific operation process of step S1 includes: S11. Collect fault voltage and current signal data under different main distribution network topologies and construct a main distribution network fault detection set, denoted as ,exist , , Indicates the total number of failures; in Indicates The signal data of fault voltage and current are , , Indicates Fault voltage and current Signal data at the sampling time, Indicates the total sampling time; S12. Construct a label information set of the starting time and duration of the fault voltage and current of the main distribution network, recorded as ; in Indicates Fault tag value, , Used to indicate the Whether a failure occurs at any time; S13. The fault voltage and current dataset with labels The order is randomly shuffled and used as the training set FD.

3. The main and distribution coordinated fault detection method based on signal processing enhanced Transformer according to claim 1 is characterized in that: The operation process of step S2 includes: S21. Set up a transient weak feature enhancement attention mechanism and a learnable nonlinear waveform reconstruction mechanism to construct a fault feature encoding layer; S22. The fault feature coding layer is based on Layer fault characteristics are calculated to obtain the first The fault characteristics of the layer are used to iteratively calculate the fault characteristics of all layers; S23. Further construct a multi-layer perceptron fault detection layer based on the fault feature encoding layer, which is used to obtain 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, the signal processing enhanced Transformer is trained using back propagation and gradient descent methods. When the number of training rounds reaches 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 occurrence time and duration detection network.

4. The main and distribution coordinated fault detection method based on signal processing enhanced Transformer according to claim 3 is characterized in that: The transient weak feature enhancement attention mechanism in step S21 is used in the Layer to layer Tier Fault Characteristics Transient feature enhancement is performed to obtain the The fault is in Voltage and current transient characteristics of the layer , the calculation formula for transient feature enhancement processing is: 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.

5. The main and distribution coordinated fault detection method based on signal processing enhanced Transformer according to claim 1 is characterized in that: 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: 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.

6. The main and distribution coordinated fault detection method based on signal processing enhanced Transformer according to claim 5 is characterized in that: The frequency domain modulation amplitude hides the feature The calculation formula is: in, It is Layer fault feature extraction encoding layer Fault feature No. Segment time-frequency domain amplitude modulation characteristics; It is Layer fault feature extraction coding layer amplitude modulation weight matrix; It is Layer fault feature extraction coded layer amplitude modulation bias matrix; is the activation function.

7. The main and distribution coordinated fault detection method based on signal processing enhanced Transformer according to claim 6 is characterized in that: The calculation process of the fault reconstruction feature includes: L1. Calculate the The fault is in Layer fault feature extraction Encoding layer fault feature reconstruction fragment , the calculation formula is: in, Indicates Layer fault feature extraction encoding layer Fault feature No. Segment phase information, is an imaginary unit; is the inverse Fourier transform; It is Layer fault feature extraction encoding layer The reconstructed time domain features of the fault features, It is Layer fault feature extraction encoding layer Fault feature No. Segment reconstruction time domain features; L2. Reconstruct the fragment based on the fault characteristics and calculate the The fault is in Fault reconstruction characteristics of the layer , the calculation 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.

8. The main and distribution coordinated fault detection method based on signal processing enhanced Transformer according to claim 7 is characterized in that: The specific calculation formula for calculating the fault feature by the fault feature coding layer in step S22 is: In the formula, It is Tier Fault transient reconstruction characteristics; It consists of two fully connected layers and a ReLU activation function. For the Layer fault feature extraction encoding layer Fault characteristics.

9. The main and distribution coordinated fault detection method based on signal processing enhanced Transformer according to claim 8 is characterized in that: The calculation formula for obtaining the pre-detection result of the fault occurrence time and duration in step S23 is: in, Represents the multi-layer perceptron gradient and back propagation calculation, Indicates The probability of failure at each sampling point of the fault line; Indicates The fault is in The failure probability of each sampling point is Indicates the prediction result of fault occurrence time and duration.

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

Citation Information

Patent Citations

  • Attention-enhanced harmonic reducer tiny fault diagnosis method and system

    CN115099286A

  • Industrial process tiny fault classification method based on CPSAMLP

    CN117520930A

  • Intelligent decision-making method and system fusing deep clustering and Transform model

    CN118940100A

  • 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