Electric energy quality disturbance identification method and identification device, equipment and storage medium

By combining a one-dimensional convolutional neural network and a residual neural network with a multi-head attention mechanism, a deep learning method was developed to solve the problem of low accuracy in power quality disturbance identification in noisy environments. This approach achieves higher identification accuracy and noise resistance, supporting fault diagnosis in power systems.

CN120832571AActive Publication Date: 2025-10-24YUNNAN POWER GRID CO LTD +1

Patent Information

Application Number
CN202511261971.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-10-24
Estimated Expiration
2045-09-05

AI Technical Summary

Technical Problem

Existing power quality disturbance identification methods have low accuracy in complex and noisy environments, making it difficult to effectively distinguish noise from real disturbance features, especially when multiple disturbances coexist.

Method used

Feature extraction is performed using a one-dimensional convolutional neural network and a one-dimensional residual neural network, and feature fusion is performed by combining a multi-head attention mechanism. A classifier is then used for classification, and the denoised signal is identified by a deep learning model.

Benefits of technology

It improves the accuracy and noise resistance of disturbance identification, enhances classification performance and generalization ability, and can better identify power quality disturbances, supporting fault diagnosis of power systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832571A_ABST
    Figure CN120832571A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power quality identification, and discloses a power quality disturbance identification method and device, equipment and a storage medium, and the method comprises the steps: obtaining a power quality disturbance signal; performing feature extraction on the power quality disturbance signal by using a preset one-dimensional convolutional neural network and a one-dimensional residual neural network to obtain a target time feature vector of the power quality disturbance signal; performing feature fusion processing on the target time feature vector by using a preset multi-head attention mechanism to obtain a fused signal feature; and classifying the fused signal features by using a preset classifier to obtain a final classification result used for indicating the disturbance type of the power quality disturbance signal. According to the method, various feature information can be integrated, the influence of noise on a classification result is effectively reduced, the classification performance and generalization ability of a classifier are improved, better performance is achieved in the aspects of classification accuracy and noise immunity, disturbance recognition accuracy is improved, and effective support is provided for electric energy fault diagnosis in an electric power system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power quality recognition, and in particular to a power quality disturbance recognition method and device, equipment and a storage medium. BACKGROUND

[0002] Power quality disturbances (PQDs) include voltage sag, swell, interruption, harmonics, flicker and other types. With the power electronics of the power system, the recognition of power quality disturbances (PQDs) becomes more and more important.

[0003] Traditional power quality disturbance recognition methods are mainly based on artificial feature extraction and simple classifiers. When facing complex and noisy actual power quality signals, the effect is often poor, and it is difficult to effectively distinguish noise and real disturbance features. Moreover, the traditional method has limited processing capacity for complex situations (composite disturbance) where multiple disturbances exist simultaneously. Noise can mask the real characteristics of power quality disturbances, causing the traditional recognition method to produce false positives.

[0004] Therefore, the disturbance recognition accuracy needs to be improved. SUMMARY

[0005] The main purpose of the present application is to provide a power quality disturbance recognition method and device, equipment and a storage medium, which can solve the problem of improving the disturbance recognition accuracy in the prior art.

[0006] To achieve the above-mentioned purpose, the first aspect of the present application provides a power quality disturbance recognition method, which comprises: acquiring a power quality disturbance signal; extracting features of the power quality disturbance signal using a preset one-dimensional convolutional neural network and a one-dimensional residual neural network to obtain a target time feature vector of the power quality disturbance signal; performing feature fusion processing on the target time feature vector using a preset multi-head attention mechanism to obtain a fused signal feature; classifying the fused signal feature using a preset classifier to obtain a final classification result, wherein the final classification result is used to indicate the disturbance type of the power quality disturbance signal.

[0007] To achieve the above-mentioned purpose, the second aspect of the present application provides a power quality disturbance recognition device, which comprises: a signal acquisition module for acquiring a power quality disturbance signal; Feature extraction module: used to extract features of the power quality disturbance signal using a preset one-dimensional convolutional neural network and a one-dimensional residual neural network to obtain a target time feature vector of the power quality disturbance signal; Attention fusion module: used to perform feature fusion processing on the target time feature vector using a preset multi-head attention mechanism to obtain fused signal features; Disturbance identification module: used to classify the fusion signal features using a preset classifier to obtain a final classification result, and the final classification result is used to indicate the disturbance type of the power quality disturbance signal.

[0008] To achieve the above-mentioned purpose, the third aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps of the method shown in the first aspect.

[0009] To achieve the above-mentioned purpose, the fourth aspect of the present invention provides 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 method shown in the first aspect.

[0010] The embodiments of the present invention have the following beneficial effects: The present invention provides a method for identifying power quality disturbances, the method comprising: obtaining a power quality disturbance signal; performing feature extraction on the power quality disturbance signal using a preset one-dimensional convolutional neural network and a one-dimensional residual neural network to obtain a target time feature vector of the power quality disturbance signal; performing feature fusion processing on the target time feature vector using a preset multi-head attention mechanism to obtain a fused signal feature; and classifying the fused signal feature using a preset classifier to obtain a final classification result, which is used to indicate the disturbance type of the power quality disturbance signal. The identification method proposed in the present invention can integrate a variety of feature information, can effectively reduce the impact of noise on the classification results, and improve the classification performance and generalization ability of the classifier. The proposed method has better performance in terms of classification accuracy and noise resistance, improves the accuracy of disturbance identification, and provides effective support for power fault diagnosis in power systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0012] in: Figure 1A flow chart of a power quality disturbance identification method in an embodiment of the present application; Figure 2 A structural block diagram of a power quality disturbance identification system in an embodiment of the present application; Figure 3 A model structural block diagram of a one-dimensional convolutional neural network and a one-dimensional residual neural network in an embodiment of the present application; Figure 4 A model structural block diagram of a multi-head attention structure in an embodiment of the present application; Figure 5 A structural block diagram of a power quality disturbance identification device in an embodiment of the present application; Figure 6 A structural block diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0013] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0014] It should be noted that, in order to solve the problems of redundancy in feature extraction and low recognition accuracy in traditional power quality disturbance identification in a strong noise environment, the present application proposes a noisy power quality disturbance identification method based on deep learning feature fusion. First, the power quality disturbance waveform signal in a noisy environment is obtained, and then the noisy disturbance signal is denoised by using an improved adaptive threshold and an improved threshold function algorithm. Second, the one-dimensional convolutional neural network and the one-dimensional residual neural network are used to extract features from the denoised power quality disturbance signal, and the multiplication fusion method is used for feature splicing to strengthen the spatial correlation of the features. Then, the multi-head attention mechanism is introduced to capture and fuse features at different levels and angles, and to extract and select appropriate features. Finally, the classification module is used to classify the features to obtain the final classification result. The noisy power quality disturbance identification model proposed in the present application integrates multiple feature information, which can effectively reduce the influence of noise on the classification result, improve the model classification performance and generalization ability, and has better performance in classification accuracy and noise resistance, thereby providing effective support for power fault diagnosis in power systems.

[0015] Please refer to Figure 1 , Figure 1 A flow chart of a power quality disturbance identification method in an embodiment of the present application, as shown in the method Figure 1 includes the following steps: 101, obtaining a power quality disturbance signal; It can be understood that, in order to realize the power quality disturbance identification, it is necessary to first collect the power quality disturbance signal, which can also be a signal after noise reduction.

[0016] Exemplarily, the identification method is applied to a power quality disturbance identification system, which is as shown in Figure 2 Figure 2 is a structural block diagram of a power quality disturbance identification system in an embodiment of the present application. Figure 2 It is shown that: the data input module: acquires the power quality disturbance waveform signal in the noisy environment; and inputs it into the signal noise reduction module; the signal noise reduction module: reduces the noise of the noisy disturbance signal through the improved adaptive threshold and the improved threshold function algorithm; and inputs the power quality disturbance signal after noise reduction into the feature extraction module; the feature extraction module: processes the power quality disturbance signal after noise reduction, extracts the features of the power quality disturbance signal after noise reduction by using the one-dimensional convolutional neural network and the one-dimensional residual neural network, and uses the multiplication fusion method for feature splicing to strengthen the spatial correlation of the features; and inputs the power quality disturbance signal after feature extraction into the feature fusion module; the feature fusion module: introduces the multi-head attention mechanism, simultaneously captures and fuses the features at different levels and angles, extracts and selects appropriate features; and inputs them into the classification module; the classification module: uses the Softmax classifier to classify the features to obtain the final classification result.

[0017] Among them, step 101 is realized by setting the data input module and the signal noise reduction module as shown in Figure 2 , step 102 is realized by setting the feature extraction module as shown in Figure 2 ; step 103 is realized by setting the feature fusion module as shown in Figure 2 ; and step 104 is realized by setting the classification module as shown in Figure 2 .

[0018] In combination with Figure 2 , the noise reduction mode can be: acquiring the power quality disturbance signal in the noisy environment; wavelet decomposing the power quality disturbance signal to obtain J-layer wavelet coefficients of the power quality disturbance signal; using the preset improved adaptive threshold algorithm and the improved threshold function algorithm to reduce the noise of the wavelet coefficients to obtain the denoising wavelet coefficients; and reconstructing the signal based on the denoising wavelet coefficients to obtain the noise reduction signal of the power quality disturbance signal. That is, the improved adaptive threshold algorithm and the improved threshold function algorithm are used to reduce the noise of the power quality disturbance signal to reduce the interference of the noise on the signal.

[0019] Specifically, the noise reduction mode can refer to the following content: S1, acquiring the power quality disturbance signal in the noisy environment; ​S2, wavelet-decomposing the power quality disturbance signal to obtain J-layer wavelet coefficients of the power quality disturbance signal; S3, performing noise reduction processing on the wavelet coefficients by using a preset improved adaptive threshold algorithm and an improved threshold function algorithm to obtain denoised wavelet coefficients; It should be noted that the power quality disturbance signal in a noisy environment is obtained, the power quality disturbance signal is wavelet-decomposed to obtain J-layer wavelet coefficients of the power quality disturbance signal, and the wavelet coefficients are processed by using a preset improved adaptive threshold algorithm and an improved threshold function algorithm to obtain denoised wavelet coefficients.

[0020] The power quality disturbance signal can be a power quality disturbance waveform signal. The wavelet coefficients of the signal are obtained by wavelet decomposition, the wavelet threshold of the wavelet coefficients is obtained by using an improved adaptive threshold algorithm, and the denoised wavelet coefficients are obtained by using the wavelet threshold and the wavelet coefficients.

[0021] In a feasible implementation manner, step S3 includes steps A01 to A03: A01, determining a noise standard deviation based on the J-layer wavelet coefficients and a preset standard deviation algorithm ; It should be noted that a noise standard deviation is calculated for each layer , and specifically, the noise standard deviation is determined based on the J-layer wavelet coefficients and a preset standard deviation algorithm .

[0022] A02, determining a wavelet threshold corresponding to each layer of wavelet coefficients by using a peak and ratio correction factor of each layer of wavelet coefficients, the noise standard deviation, and a preset improved adaptive threshold algorithm; It should be noted that the threshold is used as a demarcation between noise and real signal in splitting wavelet detail coefficients. The traditional universal threshold is: (1) (2) is the wavelet threshold, is the number of signal sampling points, is each layer of wavelet coefficients, is the standard deviation of noise, which is used to estimate the noise of the whole signal. Since the universal threshold is fixed, and the distribution of noise is random, the fixed threshold used in other decomposition layers will cause too many real signal coefficients to be removed. Therefore, the threshold setting is improved based on the above.

[0023] A wavelet threshold is calculated for each layer, and the wavelet threshold corresponding to each layer's wavelet coefficient is determined by using the peak-sum-ratio correction factor of each layer's wavelet coefficient, the noise standard deviation, and the preset improved adaptive threshold algorithm. .

[0024] Exemplarily, the adaptive threshold algorithm is improved as follows: (3) (4) (5) Where, is the noise standard deviation, Represents the wavelet coefficient in the kth direction in the i-th layer wavelet decomposition; represents the median of the absolute values ​​of all wavelet coefficients, For the j layer wavelet threshold; is the standard deviation of the noise, is the number of signal sampling points, For the The wavelet threshold of the layer, For the The noise standard deviation of the layer, To express the peak sum ratio correction factor, is the natural logarithm, For the The ratio of the peak value to the sum value in the layer wavelet coefficients, For the The length of the layer wavelet coefficients.

[0025] By introducing Estimate the noise standard deviation of the wavelet coefficients in each layer layer by layer to reduce the Overall estimation. This formula not only reduces the value of the first-layer threshold, but also increases the threshold values ​​of the subsequent layers, which can more effectively retain the wavelet coefficients of the real signal.

[0026] In a feasible implementation, before step A02, the method further includes: using the length of each layer of wavelet coefficients L j The ratio of the peak value to the sum value in the wavelet coefficients P SRj , determine the peak-sum ratio correction factor of each layer of wavelet coefficients .

[0027] A03. Utilize the wavelet threshold of each layer and the improved threshold function algorithm to reduce noise on the wavelet coefficients to determine denoised wavelet coefficients.

[0028] Then, the wavelet coefficients are denoised using the wavelet threshold of each layer and an improved threshold function algorithm to determine denoised wavelet coefficients. Specifically, the improved threshold function algorithm includes a first denoising algorithm, a second denoising algorithm and a third denoising algorithm.

[0029] Specifically, step S3 includes the following steps: B01. Determine the adjustable parameters of each layer of wavelet coefficients using a preset adjustable parameter determination rule, wherein the adjustable parameter determination rule at least includes that the higher the number of decomposition layers, the lower the adjustable parameters; For each layer of wavelet coefficients and wavelet thresholds, the following processing is performed: B02. If the wavelet coefficient is greater than or equal to the wavelet threshold, obtain denoised wavelet coefficients using a first denoising algorithm, the adjustable parameters, the wavelet coefficients, and the wavelet threshold; B03. If the absolute value of the wavelet coefficient is less than the wavelet threshold, obtain denoised wavelet coefficients using a second denoising algorithm, the adjustable parameter, the wavelet coefficient, and the wavelet threshold; B04. If the wavelet coefficient is less than or equal to the negative value of the wavelet threshold, obtain denoised wavelet coefficients using a third denoising algorithm, the adjustable parameters, the wavelet coefficients, and the wavelet threshold.

[0030] By comparing the wavelet coefficients of each layer with the wavelet threshold of the layer where it is located, the denoising algorithm of the wavelet coefficients of the layer is determined, thereby obtaining the denoised wavelet coefficients of the layer and realizing adaptive denoising of the wavelet coefficients.

[0031] It should be noted that the noisy signal is defined as , which consists of a pure signal and noise signal Composition, namely: (6) Traditional soft threshold function Defined as: (7) Where, is a step function, is the wavelet threshold.

[0032] Traditional hard threshold function Defined as: (8) In order to have both and The advantages of this method are to retain more detailed information after signal noise reduction, and to construct an improved threshold function algorithm. Achieve adaptive adjustment.

[0033] Exemplarily, the improved threshold function algorithm is as follows: (9) In the formula, is a wavelet coefficient, is a wavelet threshold, is an adjustable parameter, is a first denoising algorithm; is a second denoising algorithm; is a third denoising algorithm; is a wavelet coefficient x of a denoising wavelet coefficient.

[0034] According to and the energy distribution characteristics of each decomposition layer of the wavelet transform, a mathematical model of is established: (10) In the formula: , are the energies of the first layer decomposition and respectively. The rest , the values of on each decomposition layer can be calculated, and the range is [1, 11]. In the low decomposition layer of the wavelet transform, a larger value is selected to make the layer threshold function biased , and most of the noise coefficients are filtered out; in the high decomposition layer, a smaller value is selected to be biased , and the information of the local abrupt points is better preserved. S4, reconstructing the signal based on the denoising wavelet coefficient to obtain the denoised signal of the power quality disturbance signal.

[0035] Finally, the denoising wavelet coefficient is used for signal reconstruction, such as using the wavelet inverse transform to restore the signal, to obtain the denoised signal of the power quality disturbance signal.

[0036] Among them, the denoised signal is input into a deep learning model for power quality disturbance identification. Deep learning can automatically learn features from raw data, which can overcome the limitations of traditional methods and simple machine learning methods, thereby more effectively identifying noisy power quality disturbance signals. Therefore, the present application proposes a noisy power quality disturbance identification method based on deep learning feature fusion, which can further improve the disturbance identification accuracy, has faster convergence speed, smaller fluctuation amplitude, stronger anti-noise performance, and higher recognition accuracy in different noise environments.

[0037] ​

[0038] It can be understood that the deep learning model shown in the present application is a model for identifying power quality disturbances, which is a trained model. The training samples used for training of the model include the corresponding relationship of a plurality of power quality disturbance signals and disturbance type labels. The training samples are used to let the original deep learning model learn the relationship between the signals and the labels until the deep learning model can output the correct label corresponding to the signal based on the signal, so as to obtain a power quality disturbance identification model that can identify the disturbance type of the signal. The specific training process is not described in detail and can refer to the training process of the existing deep learning model when performing a classification task.

[0039] The deep learning model at least includes a one-dimensional convolutional neural network, a one-dimensional residual neural network, a multi-head attention network, and a classifier. For details, refer to the following content.

[0040] 102. Extracting features of the power quality disturbance signal by using the preset one-dimensional convolutional neural network and one-dimensional residual neural network to obtain a target time feature vector of the power quality disturbance signal; After obtaining the power quality disturbance signal, the preset one-dimensional convolutional neural network and one-dimensional residual neural network can be used to extract features of the power quality disturbance signal to obtain a target time feature vector of the power quality disturbance signal, thereby obtaining preliminary disturbance features. The one-dimensional convolutional neural network and one-dimensional residual neural network are used to process the denoised power quality disturbance signal, reduce the dimension of the power quality disturbance data, and extract a time feature vector (PQDs) with high distinguishability. and ). Figure 2 and Figure 3 , Figure 3 is a model structure block diagram of a one-dimensional convolutional neural network and a one-dimensional residual neural network in an embodiment of the present application. The feature extraction module shown in Figure 2 and Figure 3 is used to extract features of the signal.

[0041] Referring to Figure 2 and Figure 3 , the feature extraction of the power quality disturbance signal by using the preset one-dimensional convolutional neural network and one-dimensional residual neural network to obtain the target time feature vector of the power quality disturbance signal includes C01 to C03: C01. Extracting features of the power quality disturbance signal based on the one-dimensional convolutional neural network to obtain a first time feature vector of the power quality disturbance signal; In one feasible implementation, the one-dimensional convolutional neural network includes multiple convolutional layers and fully connected layers connected in series; then step C01 includes: inputting the power quality disturbance signal into the convolutional layer and the fully connected layer, and processing the convolutional layer and the fully connected layer in sequence to obtain a first time feature vector of the power quality disturbance signal.

[0042] C02. performing feature extraction on the power quality disturbance signal based on the one-dimensional residual neural network to obtain a second time feature vector of the power quality disturbance signal; In a feasible implementation, the one-dimensional residual neural network includes several convolutional layers, residual connection layers and fully connected layers connected in series, and step C02 includes: inputting the power quality disturbance signal into the convolutional layer to obtain the signal characteristics after convolution processing; inputting the power quality disturbance signal and the signal characteristics after convolution processing into the residual connection layer to obtain the signal characteristics after residual connection; inputting the signal characteristics after residual connection into the fully connected layer to obtain a second time feature vector.

[0043] C03. Perform feature splicing using the first time feature vector and the second time feature vector to obtain a target time feature vector of the power quality disturbance signal.

[0044] It should be noted that the feature extraction module uses multiplication fusion (based on The feature concatenation method is to use the exponential feature multiplication method (element-wise multiplication of the base). The formula for the multiplication fusion feature concatenation is: ; (11) Where: for The weight; for , B is the first time eigenvector, A is the second time eigenvector, is the target time feature vector.

[0045] The advantage of multiplication fusion is that it can fully consider the interaction between each pair of feature elements. Multiplication fusion is also more robust when dealing with outliers (especially extremely large or small values) because it is less likely to cause a rapid increase in values ​​during multiplication.

[0046] 103. Perform feature fusion processing on the target time feature vector using a preset multi-head attention mechanism to obtain a fused signal feature; Specifically, step 103 includes: using the multi-head attention mechanism to simultaneously capture the features of the target time feature vector at different levels and angles and fuse and splice them to obtain a fused signal feature. Figure 2 and Figure 4 ,Figure 4 A model structure block diagram of a multi-head attention structure in an embodiment of the present application.

[0047] Through Figure 2 and Figure 4 the feature fusion module shown: introduce multi-head attention mechanism, capture and fuse features at different levels and angles, extract and screen suitable features, and input them into the classification module.

[0048] It should be noted that the multi-head attention mechanism is an extended form of the attention mechanism, which captures features at different levels and angles by introducing multiple independent attention heads to improve the expression ability and generalization ability of the model. The soft attention mechanism is selected based on the deep learning feature fusion module, and the attention weight is calculated and weighted average is performed, and the calculation process is as follows: Suppose there is a set of PQD feature data , and a query vector is given, the relevance of each input and is calculated by the scoring function , and then the relevance score output is normalized by the Softmax function to obtain the attention distribution corresponding to the PQD , and finally the weighted sum of the input data is obtained by the attention distribution to obtain the output result , the calculation formula is: (12) (13) The attention scoring function , is the dimension of the input vector.

[0049] Compared with the conventional attention mechanism, the multi-head attention mechanism (multi-head attention, MA) can make the output of the attention layer contain representation information in different subspaces, thereby enhancing the expression ability of the model. It uses different query vectors to focus on different parts of the input information, so as to analyze the current input information from different angles, and the multi-head attention structure is as shown in Figure 4 .

[0050] It mainly includes 3 steps: first, the extracted features are input, then is linearly transformed, and is mapped to the query space , the key space and the value space respectively.; Then use the scaled dot product and Softmax function to calculate each attention distribution, and weighted sum the attention distribution to get the corresponding output Finally, multiple output results are spliced ​​together using the splicing method. The formulas are shown in equations (14) to (18).

[0051] (14) (15) (16) (17) (18) Where C is the fusion signal feature, is the i-th query vector q The weighted sum of all keys; 、 、 Query space Q , key space K , value space V The linear transformation parameters of ; A matrix with the number of dimensions for each key; is the element vector in the key space; is the element vector in the value space; is the transpose transformation; q is the query vector, is the number of query vectors; is the feature concatenation function; is the number of dimensions after linear transformation; H is the target time feature vector, ; is the softmax function; To calculate the i query vector Hedi j Key vector The correlation between them.

[0052] 104. Classify the fused signal features using a preset classifier to obtain a final classification result, where the final classification result is used to indicate a disturbance type of the power quality disturbance signal.

[0053] Finally, the fusion signal feature C is input into the classifier for classification and identification of the disturbance type, that is, setting Figure 2 The classification module shown in the figure is used to receive fused features and perform classification and recognition, and use the Softmax classifier to classify the features to obtain the final classification results.

[0054] The power quality disturbance recognition model disclosed by the present application can comprehensively use various feature information, effectively reduce the influence of noise on the classification result, and improve the classification performance and generalization ability of the model.

[0055] The method has better performance in classification accuracy and noise resistance, and provides effective support for power fault diagnosis in a power system.

[0056] The present application provides a power quality disturbance recognition method, which comprises the following steps: obtaining a power quality disturbance signal; using a preset one-dimensional convolutional neural network and a one-dimensional residual neural network to extract features of the power quality disturbance signal, to obtain a target time feature vector of the power quality disturbance signal; using a preset multi-head attention mechanism to perform feature fusion processing on the target time feature vector, to obtain a fused signal feature; and using a preset classifier to classify the fused signal feature, to obtain a final classification result, which is used to indicate the disturbance type of the power quality disturbance signal. The recognition method disclosed by the present application can comprehensively use various feature information, effectively reduce the influence of noise on the classification result, improve the classification performance and generalization ability of the classifier, has better performance in classification accuracy and noise resistance, improves the disturbance recognition accuracy, and provides effective support for power fault diagnosis in a power system.

[0057] Please refer to Figure 5 , Figure 5 The structure block diagram of the power quality disturbance recognition device in the embodiment of the present application is shown in Figure 5 The device comprises the following modules: A signal acquisition module 501 is configured to acquire a power quality disturbance signal. A feature extraction module 502 is configured to use a preset one-dimensional convolutional neural network and a one-dimensional residual neural network to extract features of the power quality disturbance signal, to obtain a target time feature vector of the power quality disturbance signal. An attention fusion module 503 is configured to use a preset multi-head attention mechanism to perform feature fusion processing on the target time feature vector, to obtain a fused signal feature. A disturbance recognition module 504 is configured to use a preset classifier to classify the fused signal feature, to obtain a final classification result, which is used to indicate the disturbance type of the power quality disturbance signal.

[0058] It should be noted that Figure 5 The content of each module in the recognition device is similar to the content of each step in the recognition method shown in Figure 1 To avoid repetition, the specific content of each step in the recognition method shown in Figure 1 is not described here.

[0059] The present invention provides a device for identifying power quality disturbances, which includes: a signal acquisition module for acquiring a power quality disturbance signal; a feature extraction module for extracting features from the power quality disturbance signal using a preset one-dimensional convolutional neural network and a one-dimensional residual neural network to obtain a target time feature vector of the power quality disturbance signal; an attention fusion module for performing feature fusion processing on the target time feature vector using a preset multi-head attention mechanism to obtain a fused signal feature; a disturbance identification module for classifying the fused signal feature using a preset classifier to obtain a final classification result, which is used to indicate the disturbance type of the power quality disturbance signal. The present invention proposes an identification method that can integrate multiple feature information, effectively reduce the impact of noise on the classification results, and improve the classification performance and generalization ability of the classifier. The proposed method has better performance in terms of classification accuracy and noise resistance, improves the accuracy of disturbance identification, and provides effective support for power fault diagnosis in power systems.

[0060] Figure 6 FIG1 shows an internal structure diagram of a computer device in an embodiment. The computer device can be a terminal or a server. Figure 6 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the above method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can implement the above method. It will be understood by those skilled in the art that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0061] In one embodiment, a computer device is provided, 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 performs the following Figure 1 Steps of the method shown.

[0062] In one embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor is caused to execute the following Figure 1 Steps of the method shown.

[0063] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0064] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0065] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A method of identifying power quality disturbances, characterized by, The method comprises: Obtain power quality disturbance signals; Using a preset one-dimensional convolutional neural network and a one-dimensional residual neural network to extract features of the power quality disturbance signal, and obtain a target time feature vector of the power quality disturbance signal; Using a preset multi-head attention mechanism to perform feature fusion processing on the target time feature vector to obtain a fused signal feature; The fused signal features are classified using a preset classifier to obtain a final classification result, where the final classification result is used to indicate the disturbance type of the power quality disturbance signal.

2. The method of claim 1, wherein, The method of extracting features of the power quality disturbance signal by using a preset one-dimensional convolutional neural network and a one-dimensional residual neural network to obtain a target time feature vector of the power quality disturbance signal includes: Performing feature extraction on the power quality disturbance signal based on the one-dimensional convolutional neural network to obtain a first time feature vector of the power quality disturbance signal; Performing feature extraction on the power quality disturbance signal based on the one-dimensional residual neural network to obtain a second time feature vector of the power quality disturbance signal; The first time feature vector and the second time feature vector are used to perform feature splicing to obtain a target time feature vector of the power quality disturbance signal.

3. The method of claim 2, wherein the step of identifying is characterized by, The one-dimensional convolutional neural network includes a plurality of convolutional layers and fully connected layers connected in series; the feature extraction of the power quality disturbance signal based on the one-dimensional convolutional neural network to obtain a first time feature vector of the power quality disturbance signal includes: The power quality disturbance signal is input into the convolutional layer and the fully connected layer, and is processed by the convolutional layer and the fully connected layer in sequence to obtain a first time feature vector of the power quality disturbance signal.

4. The method of claim 2, wherein the step of identifying is characterized by, The one-dimensional residual neural network includes several convolutional layers, residual connection layers, and fully connected layers connected in series. Then, the feature extraction of the power quality disturbance signal based on the one-dimensional residual neural network to obtain the second time feature vector of the power quality disturbance signal includes: Inputting the power quality disturbance signal into the convolution layer to obtain signal features after convolution processing; Inputting the power quality disturbance signal and the signal features after the convolution processing into the residual connection layer to obtain the signal features after the residual connection; The signal features after the residual connection are input into the fully connected layer to obtain a second time feature vector.

5. The method of claim 2, wherein the step of identifying is characterized by, The target time feature vector is as follows: ; where B is a first time eigenvector, A is a second time eigenvector, is a component of is a component of is a target time eigenvector.​​ 6. The method of claim 1, wherein, The method of performing feature fusion processing on the target time feature vector using a preset multi-head attention mechanism to obtain a fused signal feature includes: By utilizing the multi-head attention mechanism, the features of the target time feature vector at different levels and angles are captured simultaneously and fused and spliced ​​to obtain fused signal features.

7. The method of claim 6, wherein the step of identifying is characterized by, The fusion signal characteristics are as follows: ; ; ; ; ; Where C is the fusion signal feature, is the i-th query vector q The weighted sum of all keys; 、 、 Query space Q , key space K , value space V The linear transformation parameters of ; A matrix with the number of dimensions for each key; is the element vector in the key space; is the element vector in the value space; is the transpose transformation; q is the query vector, is the number of query vectors; is the feature concatenation function; is the number of dimensions after linear transformation; H is the target time feature vector, ; is the softmax function; To calculate the i query vector Hedi j Key vector The correlation between them.

8. An apparatus for identifying power quality disturbances, characterized by The device comprises: Signal acquisition module: used to obtain power quality disturbance signals; Feature extraction module: used to extract features of the power quality disturbance signal using a preset one-dimensional convolutional neural network and a one-dimensional residual neural network to obtain a target time feature vector of the power quality disturbance signal; An attention fusion module is configured to perform feature fusion processing on the target time feature vector by using a preset multi-head attention mechanism to obtain a fused signal feature. A disturbance recognition module is configured to perform classification on the fused signal feature by using a preset classifier to obtain a final classification result, which is used to indicate a disturbance type of the power quality disturbance signal.

9. A computer readable storage medium storing a computer program, characterized in that, The computer program, when executed by a processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7. 10.A computer device, comprising a memory and a processor, and characterized in that, The memory stores a computer program, and the computer program, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Petrochemical industry electric energy quality disturbance identification method based on multi-scale TCN and multi-head self-attention mechanism

    CN118395244A

  • Composite power quality disturbance identification method based on time and frequency feature fusion classification network

    CN119807833A

  • Complex device fault diagnosis method and system based on multi-dimensional features

    US12314149B1

Cited By

  • Signal anti-interference method and device, storage medium and electronic equipment

    CN121730985A