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

Through the method of time and frequency feature fusion classification network, the noise reduction process is combined with adaptive noise decomposition and wavelet threshold method, and the time and frequency features are extracted by TCN-Transformer and feature fusion is used to fusion with the cross attention mechanism, which ultimately realizes high-precision power quality disturbance recognition, solving the problem of low recognition accuracy of existing methods in noise environments.

CN119807833APending Publication Date: 2025-04-11CHINA THREE GORGES UNIV
View PDF 0 Cites 16 Cited by

Patent Information

Application Number
CN202411821756.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The existing power quality disturbance recognition methods have significantly reduced the recognition accuracy in strong noise environments, and the deep network model-based method has a high computational burden during signal conversion, introducing additional computational complexity.

Method used

The composite power quality disturbance recognition method based on the time and frequency feature fusion classification network is adopted, and noise reduction is performed through complete mode decomposition of adaptive noise and wavelet threshold method to obtain frequency domain data of the noise reduction signal, and time and frequency feature extraction is performed through the deep network of TCN-Transformer, and finally the weighted fusion features are used to classify and identify them using the cross attention mechanism.

Benefits of technology

In a 30dB noise environment, the average recognition accuracy is achieved at 97.86%, which significantly improves the recognition accuracy, stability and generalization capabilities, and performs better than other mainstream deep learning recognition models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807833A_ABST
    Figure CN119807833A_ABST
Patent Text Reader

Abstract

The invention discloses a composite power quality disturbance identification method based on a time-frequency feature fusion classification network. The method comprises the following steps: carrying out noise reduction processing on a noise-containing disturbance signal based on self-adaptive noise complete mode decomposition in combination with a wavelet threshold method; obtaining frequency domain data of the noise reduction signal based on fast Fourier transform; based on a TCN-Transformer deep network, deep feature extraction is carried out on the denoised signals in parallel from a time domain and a frequency domain; and carrying out weighted fusion on the extracted signal time domain and frequency domain features based on a cross attention mechanism to finish classification and identification. The method is simple in principle, the average recognition accuracy rate in a 30dB noise environment can reach 97.86%, and compared with other mainstream deep learning recognition models, the method shows better recognition precision, recognition stability and generalization ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power quality disturbance signal preprocessing, and in particular to a composite power quality disturbance identification method based on a time and frequency feature fusion classification network. Background Art

[0002] With the large-scale investment in distributed energy and the continuous access to the power grid of a large number of new loads dominated by power electronic inverters, the complexity and diversity of modern power systems have become increasingly prominent. The variable load characteristics have posed higher challenges to the prevention and control technology of power quality disturbances (PQDs) in power systems. Power quality disturbances refer to adverse changes in voltage, current or frequency in power systems that endanger equipment safety, power availability and system stability. These adverse changes are divided into multiple single and compound disturbances such as harmonics, voltage fluctuations, transient oscillations, pulses, etc. according to the occurrence mechanism and parameter characteristics. Rapidly and accurately identifying the monitored power quality signals and determining the type of disturbance are crucial to the prevention and control of power quality problems.

[0003] The disturbance type identification of power quality is to extract the characteristic quantity in the disturbance signal and classify the disturbance type by using fuzzy logic, neural network, support vector machine or multi-label methods. There are two main methods for power quality disturbance identification currently used: disturbance identification method based on feature extraction combined with classifier and disturbance identification method based on deep network model.

[0004] The method based on feature extraction combined with classifier is to select the most representative and discriminative feature from the preprocessed signal through human experience or optimization algorithm, and then identify the disturbance type based on the selected features combined with the classifier. However, feature extraction has the limitations of human experience and specific experimental scenarios, and is not sufficient to characterize all types of disturbances.

[0005] The perturbation recognition method based on the deep network model combines automatic feature extraction and classification recognition into a closed-loop feedback network, which largely makes up for the shortcomings of slow manual feature extraction and low accuracy. From the perspective of the input signal dimension, the existing perturbation recognition methods based on deep network models can be divided into two categories: the first category is to directly use the one-dimensional PQDs signal as data input, and then use the deep network model to complete the time series signal feature extraction and perturbation type recognition; the second category is to convert the one-dimensional signal into two-dimensional image data through mathematical transformation methods, and then combine the image recognition ability of the deep network to realize the classification of PQDs. However, the recognition accuracy is significantly reduced in a strong noise environment. And the process of converting a one-dimensional signal into two-dimensional image data requires complex preprocessing steps, which will introduce additional computational burden. Summary of the invention

[0006] In order to solve the above technical problems, the present invention provides a composite power quality disturbance identification method based on a time and frequency feature fusion classification network. The method has a simple principle and an average recognition accuracy of 97.86% in a 30dB noise environment. Compared with other mainstream deep learning recognition models, it shows better recognition accuracy, recognition stability and generalization ability.

[0007] The technical solution adopted by the present invention is:

[0008] The composite power quality disturbance identification method based on the time and frequency feature fusion classification network includes the following steps:

[0009] Step 1: De-noise the noisy disturbance signal based on the complete modal decomposition of adaptive noise combined with the wavelet threshold method;

[0010] Step 2: Obtain frequency domain data of the noise reduction signal based on fast Fourier transform;

[0011] Step 3: Based on the deep network of TCN-Transformer, deep features of the denoised signal are extracted from the time domain and frequency domain in parallel;

[0012] Step 4: Complete classification and recognition based on the weighted fusion of the extracted signal time domain and frequency domain features based on the cross-attention mechanism.

[0013] In the step 1, the original power quality disturbance signal is first decomposed into a high-frequency IMF component containing noise, a low-frequency IMF component and a series of residual components by using an adaptive noise complete set empirical mode decomposition (CEEMDAN) method; secondly, the high-frequency IMF component containing noise is denoised by wavelet threshold to filter out the noise component in the high-frequency IMF component; finally, the high-frequency IMF component after wavelet denoising is reconstructed together with the low-frequency IMF component decomposed by CEEMDAN to obtain a denoised signal.

[0014] The step 1 includes the following steps:

[0015] Step 1.1: Add a Gaussian white noise signal that obeys the normal distribution to the original power quality disturbance signal data to obtain the signal to be processed z i (t);

[0016] z i (t) = z(t) + ε0n i (t),i=1,2,3,…,T;

[0017] Where: z(t) represents the original disturbance signal; i represents the number of times white noise is added, ε0 is the standard deviation of white noise, n i(t) represents the Gaussian white noise signal added to the original power quality disturbance signal, and T represents the number of times the Gaussian white noise is added.

[0018] Step 1.2: Use the EEMD algorithm to decompose the signal to be processed I times to obtain the first modal component IMF1(t);

[0019]

[0020] Where: IMF i1 (t) represents the intermediate modal component obtained by EEMD decomposition signal;

[0021] Step 1.3: Subtract the first modal component from the original signal z(t) to obtain the first residual component r1(t);

[0022] r1(t)=z(t)-IMF1(t);

[0023] Where: IMF1(t) represents the first modal component decomposed by CEEMDAN;

[0024] Step 1.4: Decompose the first residual component r1(t) and the added Gaussian white noise by EEMD to obtain the first component E1[n i (t)], calculate the second modal component IMF2(t);

[0025]

[0026] Where: ε1 is the standard deviation of white noise.

[0027] Step 1.5: Through the kth residual component r k (t) Calculate the k+1th modal component IMF K+1 (t);

[0028] r k (t) = r k-1 (t)-IMF k (t);

[0029] Where: r k-1 (t) represents the k-1th residual component;

[0030]

[0031] Where: E k [n i (t)] represents the i-th signal to be processed n i (t) The kth modal component obtained after ensemble empirical mode decomposition (EEMD).

[0032] Step 1.6: Repeat the operation in step 1.5, and stop decomposition when the original signal and the decomposed modal components and residual components satisfy the following relationship;

[0033]

[0034] Where: r n (t) represents the nth residual component;

[0035] Step 1.7: Perform wavelet decomposition on the high-frequency IMF components containing noise to obtain the corresponding wavelet coefficients. Use the threshold function to process the decomposed wavelet coefficients.

[0036]

[0037] Where: w j,k represents the wavelet coefficients obtained by wavelet decomposition, represents the wavelet coefficient after threshold processing, sgn is the sign function, and λ is the threshold. The processed wavelet coefficients are selected, and the wavelet coefficients that are reduced to 0 after the threshold function processing are used as noise filters, and the non-zero wavelet coefficients after the threshold processing are reconstructed to obtain the denoised high-frequency IMF components.

[0038] Step 1.8: Finally, the high-frequency IMF components after wavelet denoising are reconstructed together with the low-frequency IMF components decomposed by CEEMDAN to obtain the denoised signal

[0039]

[0040] Where: x denoised (t) represents the denoised signal, IMF i (t) represents the high-frequency modal component after wavelet denoising; m is the number of high-frequency modal components, and r(t) represents the low-frequency modal component decomposed by CEEMDAN.

[0041] In step 2, the power quality signal after noise reduction is obtained in step 1, and step 2 uses FFT to obtain frequency domain data from the power quality signal. The time series signal z(n) is converted into a series of frequency domain data Z after FFT. f = {Z 1f ,Z 2f ,...,Z Nf}, Z 1f ,Z 2f ,...,Z Nf They respectively represent the complex components in the frequency domain data obtained after the noise reduction signal is subjected to the fast Fourier transform (FFT). The details are as follows:

[0042] For a discrete signal z(n), its discrete Fourier transform (DFT) is defined as:

[0043]

[0044] Where Z[q] represents the frequency domain data of z(n) after DFT transformation, N represents the length of discrete signal samples, and q is the sample point from 0 to N-1. For simplicity, let Therefore,

[0045]

[0046] The FFT decomposes the signal of length N into two signals of length The even and odd sample sub-signals are processed.

[0047]

[0048] Consider the two summation terms as the DFT transforms of the two sub-signals,

[0049]

[0050] in: Therefore, the DFT transform of the even sample signal is:

[0051]

[0052] The DFT transform of the odd sample signal is:

[0053]

[0054] Wherein, O[k] represents the frequency domain data obtained by DFT transformation of odd samples.

[0055] The conversion process of FFT is expressed as:

[0056]

[0057] The time series signal z(n) is converted into a series of frequency domain data Z after FFT f = {Z 1f ,Z 2f ,...,Z Nf}.

[0058] In step 3, the TCN module is used to extract the global spatial features in the signal sequence; specifically, Fig.11 As shown in the figure, the signal sequence is transformed through the expansion convolution layer to convert the huge input signal [Z1, Z2, ..., Z T ]Converted into signal features through convolution kernel and convolution operation Output,

[0059] The convolution operation process is as follows: Fig.12As shown in the figure, when one set of numbers slides over another set of numbers like a sliding window, the corresponding data are multiplied and summed to get a new set of numbers. The convolution kernel only sets the size and side length, and the parameters in the convolution kernel are randomly generated.

[0060] The details are as follows:

[0061] Feature extraction is performed on time domain and frequency domain data separately and simultaneously, and the TCN module is used to extract global spatial features in the signal sequence. The TCN time series convolutional network (Temporal Convolutional Networks, TCN) module adds dilated causal convolution on the basis of CNN. Dilated causal convolution ensures that future data does not affect the output at the current moment by zero-filling only the past moments of the input sequence. Dilated causal convolution enables the local convolution kernel to skip a certain distance of the input tensor, so that the convolution operation can cover more input data. The skipped distance is the size of the dilation rate (Dilation rate), and the dilation rate is calculated as Dilation rate = Dilation base i , where Dilation base represents the dilation base, which is generally 2, and i represents the number of convolution layers. To achieve full historical coverage of the input sequence by the receptive field, the following relationship must be satisfied between the number of network layers n, the convolution kernel size w, the input sequence length l, and the dilation base:

[0062]

[0063] Then calculate the minimum number of network layers n min for:

[0064]

[0065] In the formula, w represents the side length of the convolution kernel, and b represents the dilation odd number, which is the Dilation base;

[0066] The dilated causal convolution structure may also cause problems such as gradient explosion and overfitting as the number of convolution layers increases. To this end, the TCN module changes the simple one-dimensional dilated causal convolution layer into a residual block containing two layers of dilated convolution and residual links, such as Fig.13 As shown in the figure, this figure shows the structure of a residual block. The output of the two dilated causal convolutional layers in the residual block is used as the input of the next residual block, and the 1×1 convolution is the residual link.

[0067] In order to introduce nonlinearity and further suppress model overfitting, a weight normalization layer is added above the dilated causal convolution layer, a ReLu activation function is added, and regularization is introduced through dropout. The complete residual block structure after the transformation is as follows Fig.14 shown.

[0068] Since a residual block contains two basic dilated causal convolution layers, its receptive field width is doubled compared to the first dilated causal convolution layer. The total receptive field width r of a TCN module consisting of m residual blocks is expressed as:

[0069]

[0070] Where b i represents the expansion rate of the i-th layer, b m represents the expansion rate of m residual blocks, and w represents the size of the convolution kernel;

[0071] To achieve full coverage of the input sequence l, the minimum number of residual blocks m required is min It is expressed as:

[0072]

[0073] The number of layers and structural complexity of the TCN module composed of residual blocks are significantly reduced.

[0074] In step 3, the Transformer module is used to extract the time series features of long-term dependencies in the signal sequence (referring to the relationship between the features of certain moments in the sequence and the features of several moments before and after it). TCN can maintain the causal relationship in time series data, but it cannot assign different attention levels according to the importance of different data elements in the signal sequence to the sequence. The Transformer encoder layer can effectively capture the global information in the sequence and assign weights according to the relevance of different positions in the sequence. The signal sequence input to the encoder first passes through the self-attention mechanism layer. When processing sequence data, the self-attention mechanism layer captures the dependency between different elements in the sequence by calculating the importance of each data element in the sequence in the entire sequence.

[0075] The self-attention mechanism layer converts each element unit in the input sequence into three vectors: query vector (Query), key vector (Key) and value vector (Value). For the input sequence x = [x1, x2, ..., x n ],

[0076] First, calculate the Q, K, V vectors:

[0077] Q = xW Q ,K=xW K ,V=xW V ;

[0078] Among them, W Q ,W K ,W V Both represent weight matrices, used to map inputs to query, key, and value vectors.

[0079] Secondly, do a dot product operation between the input query vector and the key vectors of all sequences to obtain a series of attention scores;

[0080] Scores = QK T ;

[0081] Scores represents the attention score, and T represents the matrix transpose.

[0082] Then, the scores are normalized by Softmax to obtain the importance of each sequence element and ensure that the sum of all importances is 1;

[0083] Attention weights=Softmax(Scores);

[0084] Among them, Attention weights represent the importance of each sequence element;

[0085] Next, the importance is multiplied by each element value vector, and the sum of the results is the output of the first input sequence.

[0086] Output=Attention weights·V;

[0087] In order to further improve the operation efficiency and speed, the Multi-head Self-Attention (MSA) mechanism is introduced to split the input sequence into multiple subspaces. Each subspace runs multiple self-attention layers in parallel. Each "head" (subspace) learns different attention weights independently. The outputs of these "heads" are then merged to produce the final output. The details are as follows:

[0088] The input sequence x is split into h subspaces, each of which contains a d / h-dimensional vector, where d is the dimension of the input sequence and h is the number of heads. Each subspace runs the self-attention layer in parallel and learns different attention weights independently, that is, each layer independently performs the attention mechanism operation in the above steps. For the input x of each subspace i , calculate Q i , K i 、V i vector:

[0089] Q i =x i W i Q ,K i =x i W i K ,V i =x i Wi V ;

[0090] Then calculate the attention score:

[0091]

[0092] Normalized attention score:

[0093] Attention weights i =Softmax(Scores i );

[0094] Weighted sum:

[0095] Output i =Attention weights i ·V i ;

[0096] Finally merge the output:

[0097] Output=Concat(Output1,Output2,…,Output h )W O ;

[0098] Where: h represents the number of subspaces, W O Represents the output weight matrix, and Concat represents the weighted concatenation operation. The advantage of multi-head attention is that it can simultaneously capture and integrate multi-faceted sequence interaction information in different subspaces.

[0099] When the attention output passes through the normalization layer, a residual link is introduced, and the input is added to the attention output to obtain the input of the feedforward neural network; specifically, Fig.15 From [x1,x2,…,x n ] to [y'1,y'2,…,y' n ], the residual link is [x1,x2,…,x n ] and [y1,y2,…,y n ] overlay.

[0100] The purpose of adding residual links is to prevent the degradation of the neural network caused by the increase in the number of network layers during training. The introduction of residual blocks enables the network to stack more layers to increase complexity without damaging the learning effect of the existing layers.

[0101] The feedforward neural network is used to process the output after the self-attention mechanism and normalization, which includes two linear layers and two dropout layers. The first linear transformation layer maps the input data to an intermediate dimension, and the second linear transformation layer maps the output of the intermediate dimension back to the original dimension to keep the input and output dimensions consistent. The dropout layer is applied after the two linear layers to reduce overfitting. Fig.16 shown.

[0102] In step 4, a cross-attention mechanism is used to fuse time-frequency features. Cross-Attention is to calculate attention on two different sequences to process the relationship between the two sequences and establish a connection. This step uses the cross-attention mechanism to establish the association between the time domain signal sequence and the frequency domain signal sequence, and fuse the feature information in the two sequences.

[0103] The frequency domain feature F is used as the query sequence, the time domain feature T is used as the key-value pair sequence, and the input sequence and the corresponding weight matrix W are used as the query sequence. q , W k , W v Multiply to get Q, K, V; generate query vector Q through frequency domain sequence, Q = FW q , the time domain sequence generates the key vector K and the value vector V, K = TW k ,V=TW v For each position of Q, calculate its correlation degree with all positions in K to obtain the similarity matrix. The calculation formula of the similarity matrix S is:

[0104] S=QK T ;

[0105] Among them, S ij Represents the elements in the matrix S, that is, the similarity between the i-th position of Q and the j-th position of K.

[0106] The similarity matrix is ​​normalized using the softmax function to obtain the weight matrix, which is expressed as follows:

[0107] A = Softmax(S);

[0108] Among them, A ij Represents the elements in the weight matrix A, that is, the similarity between the i-th position of Q and the j-th position of K. It expresses the degree of correlation between the elements of the frequency domain sequence Q and the time domain sequence K;

[0109] Then the weight matrix A is multiplied by V for weighted summation to obtain the new feature sequence O after adding conditional attention, as follows:

[0110] O = AV;

[0111] Among them, O is a matrix in which each row corresponds to the weighted summation result of a position in the query sequence Q. This weighted summation result reflects the degree of association between the query sequence and the key-value pair sequence, and integrates the information from the value vector V, and the new feature sequence is consistent with the input feature dimension.

[0112] Finally, the fusion features are processed through the fully connected layer to finally complete the recognition and classification of the disturbance signal, as follows:

[0113] The fully connected layer receives the fused features O output by the cross-attention mechanism as input. These features contain information in the time domain and frequency domain. The fully connected layer performs a linear transformation on the input features, and the calculation formula is:

[0114] U = OW + b;

[0115] Among them, W is the weight matrix, b is the bias vector, and U is the output after linear transformation.

[0116] Then the ReLU activation function is used to introduce nonlinearity;

[0117] B = max(0,U);

[0118] Finally, the Softmax function is applied to calculate the probability of each category;

[0119] P = Softmax(B);

[0120] This step can directly define the classification dimension in the programming environment of the Pytorch framework using Pycharm as the platform.

[0121] The present invention provides a composite power quality disturbance identification method based on a time and frequency feature fusion classification network, and the technical effects are as follows:

[0122] 1) Advantages of step 1 of the present invention: The noise disturbance signal is denoised based on the complete modal decomposition of adaptive noise combined with the wavelet threshold method, which can effectively remove noise and retain signal characteristics, thereby improving the accuracy and robustness of power quality disturbance identification.

[0123] 2) Advantages of step 2 of the present invention: The frequency domain data of the noise reduction signal is obtained based on the fast Fourier transform, which can quickly convert the time domain signal into the frequency domain signal, greatly reducing the amount of calculation and time consumption.

[0124] 3) Advantages of step 3 of the present invention: The deep network based on TCN-Transformer performs deep feature extraction on the denoised signal in parallel from the time domain and frequency domain, which can simultaneously capture the timing dynamics and frequency components of the signal, and utilizes the timing analysis capability of TCN and the global dependency capture capability of Transformer to automatically extract deep-level features and improve the recognition accuracy and generalization ability of the model.

[0125] 4) Advantages of step 4 of the present invention: Based on the cross-attention mechanism, the extracted time and frequency features are weighted and fused to complete classification and recognition, which can establish the association between time domain and frequency domain features, and effectively integrate the time series and frequency information by calculating the importance of different features and assigning corresponding weights, thereby improving the accuracy and robustness of the classification model. BRIEF DESCRIPTION OF THE DRAWINGS

[0126] The present invention will be further described below in conjunction with the accompanying drawings and examples;

[0127] Figure 1 This is the network structure diagram for identifying noisy composite power quality disturbances.

[0128] Figure 2 This is the flow chart of CEEMDAN-wavelet threshold joint denoising.

[0129] Figure 3 This is the TCN structure diagram.

[0130] Figure 4 This is the encoder structure diagram.

[0131] Figure 5 This is the structural diagram of the cross-attention fusion mechanism.

[0132] Figure 6 This is the decomposition effect diagram of CEEMDAN.

[0133] Figure 7 This is a comparison chart before and after noise reduction of harmonic + flicker composite disturbance at 10dB.

[0134] Figure 8 This is a comparison chart of the denoising effects of various algorithms.

[0135] Fig. 9 This is a comparison chart of the recognition accuracy of four models in different noise environments.

[0136] Fig.10 This is a comparison chart of the training process of different classification models in a 30db noise environment.

[0137] Fig.11 Schematic diagram of the TCN module used to extract global spatial features in signal sequences.

[0138] Fig.12Schematic diagram of the convolution operation process.

[0139] Fig.13 Schematic diagram of the residual block structure.

[0140] Fig.14 Schematic diagram of the complete residual block structure after transformation.

[0141] Fig.15 Schematic diagram of the input principle of a feedforward neural network obtained by adding input to the attention output.

[0142] Fig.16 Schematic diagram of the principle of feedforward neural network used to process the output after self-attention mechanism and normalization. DETAILED DESCRIPTION

[0143] The power quality disturbance preprocessing method based on singular spectrum decomposition and local mean decomposition includes the following steps:

[0144] Step 1: First, the power quality disturbance signal containing noise pollution is denoised by using the complementary ensemble efficient mode decomposition with adaptive noise (CEEMDAN) combined with the wavelet threshold method;

[0145] Step 2: Secondly, perform Fast Fourier Transform (FFT) on the denoised disturbance signal to obtain the frequency domain data of the signal;

[0146] Step 3: Then, feature extraction is performed on the time domain and frequency domain signals separately and simultaneously, and a deep network model based on TCN-Transformer is used to extract spatial and temporal features in the time and frequency domain signals;

[0147] Step 4: Finally, the cross-attention mechanism is used to perform weighted fusion of the time domain and frequency domain features and send them to the fully connected layer. The fused features are processed by the fully connected layer to finally complete the recognition and classification of the disturbance signal.

[0148] In the step 1, the noise disturbance signal is subjected to denoising based on the complete modal decomposition of adaptive noise combined with the wavelet threshold method, which includes the following steps:

[0149] Step S1.1: According to the IEEE standard, 24 power quality disturbance signal models are established, and the parameters are randomly generated within the range. The signal model and standard parameters of the power quality disturbance voltage are shown in Table 1 and Table 2.

[0150] Table 1 Single power quality disturbance model

[0151]

[0152] Table 2 Mathematical model of power quality composite disturbance

[0153]

[0154] The model parameters are randomly changed, and each disturbance type is set to generate 500 sample waveforms, generating a total of 12,000 PQDs samples. The signal base frequency is 50Hz, the sampling frequency is set to 5120Hz, the sampling interval is 10 cycles, that is, 0.2 seconds, 5120 samples per second, 1024 samples per 0.2 seconds, and the sample length is 1024 sampling points. The 12,000 PQDs data are randomly divided into training, verification, and test sets in a ratio of 7:2:1. Considering that the actual power quality signals are usually exposed to noisy environments, and in order to verify the disturbance recognition ability of the proposed method for noisy signals, the signal-to-noise ratios of 10, 20, and 30dB are set in the data set respectively.

[0155] Step S1.2: The disturbance signal of harmonics + flicker combines the waveform distortion of harmonics and the voltage fluctuation characteristics of flicker. It not only includes the complex frequency change components of harmonics, but also includes the randomness and non-periodic changes of flicker. Compared with other disturbance types, the complexity of the harmonic + flicker composite disturbance in a noisy environment lies in that it combines the changes in the frequency domain and the time domain, and has nonlinear and non-stationary characteristics, which places higher requirements on the noise reduction algorithm. In order to visualize the noise reduction effect of the proposed noise reduction method, taking the composite disturbance harmonic + flicker as an example, the disturbance signal length is 1024 sampling points, 10dB extreme Gaussian white noise is added, and it is decomposed by CEEMDAN.

[0156] The composite disturbance signal of harmonics + flicker is decomposed into 8 IMF components. IMF1-IMF5 are high-frequency modal components, which contain a large amount of Gaussian white noise, and IMF6-8 are low-frequency modal components, which contain more useful features of the original signal.

[0157] After performing CEEMDAN decomposition on 24 disturbance types in multiple noise environments, the decomposed IMF components were analyzed and it was found that IMF5 was the dividing point between high- and low-frequency modal components. Therefore, IMF6 and subsequent components were regarded as the parts containing effective signals, and wavelet threshold denoising was performed on the high-frequency IMF1-IMF5 containing noise.

[0158] Step S1.3: Select the appropriate wavelet basis and decomposition level through comparative simulation, and select sym8 as the optimal wavelet basis among the sym wavelet basis, db wavelet basis and coif wavelet basis, with the decomposition level of 4. Filter out the noise components in the high-frequency IMF components. Finally, reconstruct the denoised signal together with the IMF components after wavelet denoising and the low-frequency IMF components decomposed by CEEMDAN.

[0159] In the step 2, the frequency domain data of the noise reduction signal is obtained based on the fast Fourier transform, which includes the following steps:

[0160] Step S2.1: Use FFT to obtain frequency domain data from the power quality signal. The time series signal z(n) is converted into a series of frequency domain data Z after FFT. f = {Z 1f ,Z 2f ,...,Z Nf}.

[0161] In step 3, the deep network based on TCN-Transformer performs deep feature extraction on the denoised signal in the time domain and frequency domain in parallel, including the following steps:

[0162] Step S3.1: Using Pycharm as the platform, the TCN-Transformer recognition model was built using the Pytorch framework, with batch_size set to 64, learning_rate set to 0.001, and epoch set to 50. The operating environment configuration table is shown in Table 3.

[0163] Table 3 Operating environment configuration table

[0164]

[0165] Step S3.2: Input the time series signal data and the frequency domain data after FFT processing into the recognition model, and extract features from the time domain and frequency domain data separately and simultaneously. The TCN module is used to extract the global spatial features in the signal sequence. The Transformer module is used to extract the time series features of the long-term dependency relationship in the signal sequence.

[0166] In step 4, the extracted time and frequency features are weighted and fused based on the cross attention mechanism to complete the classification recognition, including: taking the frequency domain features as the query sequence, the time domain features as the key-value pair sequence, and the input sequence and the corresponding weight matrix W q , W k , W vMultiply to get Q, K, and V. Generate query vector Q through frequency domain sequence, and generate key vector K and value vector V through time domain sequence. For each position of Q, calculate its correlation degree with all positions in K to get similarity matrix. Normalize the similarity matrix to get weight matrix, which expresses the correlation degree between each element of frequency domain sequence Q and time domain sequence K, and then multiply it with V for weighted summation to get new feature sequence representation after adding conditional attention, and the new feature sequence is consistent with the input feature dimension. Finally, the fusion features are processed by the fully connected layer to finally complete the recognition and classification of the disturbance signal.

[0167] Figure 2 This is the CEEMDAN-wavelet threshold joint denoising flow chart. Corresponding to step 1, the original power quality disturbance signal is first decomposed into high-frequency IMF components containing noise, low-frequency IMF components and a series of residual components by the CEEMDAN method. Secondly, the high-frequency IMF components containing noise are denoised by wavelet threshold to filter out the noise components in the high-frequency IMF components. Finally, the IMF components after wavelet denoising are reconstructed together with the low-frequency IMF components decomposed by CEEMDAN to obtain the denoised signal.

[0168] Figure 6 This is the CEEMDAN decomposition effect diagram. Figure 6 It can be seen that the composite disturbance signal of harmonics + flicker is decomposed into 8 IMF components. IMF1-IMF5 are high-frequency modal components, which contain a large amount of Gaussian white noise, and IMF6-8 are low-frequency modal components, which contain more useful features of the original signal.

[0169] Figure 7 This is a comparison chart before and after the noise reduction of the harmonic + flicker composite disturbance at 10dB. Figure 7 Noise interference can be significantly weakened, and the real waveform of the signal can be highlighted.

[0170] Figure 8 This is a comparison chart of denoising effects of various algorithms. Figure 8 It can be seen that under 10dB, 20dB, and 30dB noise environments, the signal-to-noise ratio of the power quality disturbance signal is improved by 11.79dB, 8.51dB, and 6.39dB, respectively, after the CEEMDAN-wavelet threshold joint noise reduction processing proposed in the present invention. Compared with the threshold estimation, morphological filtering, and optimized adaptive denoising and stationary wavelet transform improved threshold of the traditional method, it has obvious superiority in noise reduction effect.

[0171] Fig. 9 This is a comparison chart of the recognition accuracy of four models under different noise environments. Fig. 9It can be seen that the noise environment has caused different degrees of influence on the recognition ability of each model, but the model proposed in the present invention has shown good recognition accuracy and robustness in a variety of different noise environments. It can still achieve an accuracy of more than 90% under the interference of an extreme noise environment of 10dB. After processing the signal in a 30dB noise environment in combination with the noise reduction method proposed in the present invention, the classification model recognition accuracy reached as high as 99.96%, which is 5.04%, 4.02% and 1.94% higher than the CNN-Transformer, CNN-BiLSTM and TCN-Attention deep learning models under the same conditions, respectively.

[0172] Fig.10 This is a comparison chart of the training process of different classification models in a 30db noise environment. Fig.10 It can be seen that the four classification models did not experience overfitting during the 50 rounds of training, and the training accuracy and verification accuracy showed a continuous upward trend as the number of rounds increased. However, the convergence speed, precision and stability of the accuracy and loss value curves during the training process show the advantages and disadvantages of the recognition performance of each model. CNN-BiLSTM and TCN-Attention converge slowly, and CNN-BiLSTM still cannot stabilize in the later stage of training. CNN-Transformer converges faster in the early stage, but fluctuates significantly in the middle of training. In contrast, the model proposed in the present invention has excellent convergence speed and convergence trend. In the 9th round, the accuracy of the training set and the verification set both reached more than 99.5%, and in the 41st round, the accuracy of the training set reached 99.9%, and finally stabilized at 99.94%, and the accuracy of the verification set stabilized at 99.79%.

[0173] From the perspective of signal recognition, CEEMDAN combined with the wavelet threshold method can effectively process nonlinear and non-stationary signals, effectively filtering out noise while retaining the effective features of the signal to the greatest extent. In a multi-group noise environment, it still has a good effect on complex disturbance signals that combine time and frequency domain changes and have nonlinear and non-stationary characteristics. In terms of the construction of the classification network, feature extraction is performed on time domain and frequency domain data separately and simultaneously. The TCN module is used to extract the global spatial features in the signal sequence, and the Transformer module is used to extract the temporal features of the long-term dependency in the signal sequence. The classification network model shows good recognition accuracy, recognition stability and generalization ability.

Claims

1. A composite power quality disturbance identification method based on a time-frequency feature fusion classification network, characterized by The following steps are involved: Step 1: De-noise the noisy disturbance signal based on the complete modal decomposition of adaptive noise combined with the wavelet threshold method; Step 2: Obtain frequency domain data of the noise reduction signal based on fast Fourier transform; Step 3: Based on the deep network of TCN-Transformer, deep features of the denoised signal are extracted from the time domain and frequency domain in parallel; Step 4: Complete classification and recognition based on the weighted fusion of the extracted signal time domain and frequency domain features based on the cross-attention mechanism.

2. The composite power quality disturbance identification method based on the time and frequency feature fusion classification network according to claim 1 is characterized by: In the step 1, the original power quality disturbance signal is first decomposed into a high-frequency IMF component containing noise, a low-frequency IMF component and a series of residual components by using an adaptive noise complete set empirical mode decomposition (CEEMDAN) method; Secondly, the high-frequency IMF component containing noise is denoised by wavelet threshold to filter out the noise component in the high-frequency IMF component; finally, the high-frequency IMF component after wavelet denoising is reconstructed together with the low-frequency IMF component decomposed by CEEMDAN to obtain the denoised signal.

3. The composite power quality disturbance identification method based on the time and frequency feature fusion classification network according to claim 2 is characterized by: The step 1 includes the following steps: Step 1.1: Add a Gaussian white noise signal that obeys the normal distribution to the original power quality disturbance signal data to obtain the signal to be processed z i (t); z i (t)=z(t)+ε0n i (t),i=1,2,3,…,T; Where: z(t) represents the original disturbance signal, i represents the number of times white noise is added, ε0 is the standard deviation of white noise, n i (t) represents the Gaussian white noise signal added to the original power quality disturbance signal, and T represents the number of times the Gaussian white noise is added; Step 1.2: Use the EEMD algorithm to decompose the signal to be processed I times to obtain the first modal component IMF1(t); Where: IMF i1 (t) represents the intermediate modal component obtained by EEMD decomposition signal; Step 1.3: Subtract the first modal component from the original signal z(t) to obtain the first residual component r1(t); r1(t)=z(t)-IMF1(t); Where: IMF1(t) represents the first modal component decomposed by CEEMDAN; Step 1.4: Decompose the first residual component r1(t) and the added Gaussian white noise by EEMD to obtain the first component E1[n i (t)], calculate the second modal component IMF2(t); Where: ε1 is the standard deviation of white noise; Step 1.5: Through the kth residual component r k (t) Calculate the k+1th modal component IMF K+1 (t); r k (t)=r k-1 (t)-IMF k (t); Where: r k-1 (t) represents the k-1th residual component; Where: E k [n i (t)] represents the i-th signal to be processed n i (t) the kth modal component obtained after performing ensemble empirical mode decomposition (EEMD); Step 1.6: Repeat the operation in step 1.5, and stop decomposition when the original signal and the decomposed modal components and residual components satisfy the following relationship; Where: r n (t) represents the nth residual component; Step 1.7: Perform wavelet decomposition on the high-frequency IMF components containing noise to obtain the corresponding wavelet coefficients; use the threshold function to process the decomposed wavelet coefficients. Where: w j,k represents the wavelet coefficients obtained by wavelet decomposition, represents the wavelet coefficient after threshold processing, sgn is the sign function, and λ is the threshold; the processed wavelet coefficients are selected, the wavelet coefficients reduced to 0 after the threshold function processing are used as noise filters, and the non-zero wavelet coefficients after the threshold processing are reconstructed to obtain the denoised high-frequency IMF components; Step 1.8: Finally, the high-frequency IMF components after wavelet denoising are reconstructed together with the low-frequency IMF components decomposed by CEEMDAN to obtain the denoised signal Where: x denoised (t) represents the denoised signal, IMF i (t) represents the high-frequency modal component after wavelet denoising; m is the number of high-frequency modal components, and r(t) represents the low-frequency modal component decomposed by CEEMDAN.

4. The composite power quality disturbance identification method based on the time and frequency feature fusion classification network according to claim 1 is characterized by: In step 2, FFT is used to obtain frequency domain data from the power quality signal, and the time series signal z(n) is converted into a series of frequency domain data Zf={Z1f, Z2f, ..., ZNf} after FFT. 1f ,Z 2f ,...,Z Nf They represent the complex components in the frequency domain data obtained after the noise reduction signal is subjected to the fast Fourier transform (FFT), as follows: For a discrete signal z(n), its discrete Fourier transform (DFT) is defined as: Where Z[q] represents the frequency domain data of z(n) after DFT transformation, N represents the length of discrete signal samples, q is the sample point from 0 to N-1, and Therefore: The FFT decomposes the signal of length N into two signals of length Processing the even and odd sample sub-signals; The two summation terms are considered as the DFT transforms of the two sub-signals; in: Therefore, the DFT transform of the even sample signal is: The DFT transform of the odd sample signal is: Where, O[k] represents the frequency domain data obtained by DFT transformation of odd samples; The conversion process of FFT is expressed as: The time series signal z(n) is converted into a series of frequency domain data Z after FFT f = {Z 1f ,Z 2f ,...,Z Nf }.

5. The composite power quality disturbance identification method based on the time-frequency feature fusion classification network according to claim 1 is characterized by: In step 3, the TCN module is used to extract the global spatial features in the signal sequence. The signal sequence is transformed by the expansion convolution layer to convert the input signal [Z1, Z2, ..., Z T ]Converted into signal features through convolution kernel and convolution operation Output; During the convolution operation, when one set of numbers slides over another set of numbers like a sliding window, the corresponding data are multiplied and summed to obtain a new set of numbers. The convolution kernel only sets the size and side length, and the parameters in the convolution kernel are randomly generated.

6. The composite power quality disturbance identification method based on the time-frequency feature fusion classification network according to claim 5 is characterized by: Feature extraction is performed on time domain and frequency domain data separately and simultaneously, and the TCN module is used to extract the global spatial features in the signal sequence. The TCN module adds dilated causal convolution on the basis of CNN. The dilated causal convolution enables the convolution operation to cover more input data by making the local convolution kernel skip a certain distance of the input tensor. The skipped distance is the size of the dilation rate, and the dilation rate is calculated as Dilation rate = Dilation base i , where Dilation base represents the dilation base, and i represents the number of convolution layers. To achieve full historical coverage of the input sequence by the receptive field, the following relationship must be satisfied between the number of network layers n, the convolution kernel size w, the input sequence length l, and the dilation base: Then calculate the minimum number of network layers n min for: In the formula, w represents the side length of the convolution kernel, and b represents the dilation odd number; The TCN module changes the one-dimensional dilated causal convolution layer into a residual block containing two layers of dilated convolution and residual links. The output of the two dilated causal convolution layers in the residual block serves as the input of the next residual block, and the 1×1 convolution is the residual link.

7. The composite power quality disturbance identification method based on the time-frequency feature fusion classification network according to claim 6 is characterized by: Add a weight normalization layer on top of the dilated causal convolutional layer, add a ReLu activation function, and introduce regularization through dropout; Since a residual block contains two basic dilated causal convolution layers, its receptive field width is doubled compared to the first dilated causal convolution layer; the total receptive field width r of a TCN module consisting of m residual blocks is expressed as: Where b i represents the expansion rate of the i-th layer, b m represents the expansion rate of m residual blocks, and w represents the size of the convolution kernel; To achieve full coverage of the input sequence l, the minimum number of residual blocks m required is min It is expressed as:

8. The composite power quality disturbance identification method based on the time-frequency feature fusion classification network according to claim 6 is characterized by: In step 3, the signal sequence input to the encoder first passes through the self-attention mechanism layer. When processing sequence data, the self-attention mechanism layer captures the dependencies between different elements in the sequence by calculating the importance of each data element in the entire sequence; The self-attention mechanism layer converts each element unit in the input sequence into three vectors: query vector (Query), key vector (Key) and value vector (Value); for the input sequence x = [x1, x2, ..., x n ]; First, calculate the Q, K, V vectors: Q=xW Q ,K=xW K ,V=xW V ; W Q ,W K ,W V Both represent weight matrices, used to map inputs to query, key, and value vectors; Secondly, do a dot product operation between the input query vector and the key vectors of all sequences to obtain a series of attention scores; Scores=QK T ; Scores represents the attention score, and T represents the matrix transpose; Then, the scores are normalized by Softmax to obtain the importance of each sequence element and ensure that the sum of all importances is 1; Attention weights=Softmax(Scores); Among them, Attention weights represent the importance of each sequence element; Next, the importance is multiplied by the respective element value vector, and the sum of the results is the output of the first input sequence; Output=Attention weights·V.

9. The composite power quality disturbance identification method based on the time-frequency feature fusion classification network according to claim 8 is characterized by: In order to further improve the computational efficiency and speed, the multi-head attention mechanism MSA is introduced to split the input sequence into multiple subspaces. Each subspace runs multiple self-attention layers in parallel. Each subspace independently learns different attention weights. The outputs of these "heads" are then merged to produce the final output; the details are as follows: The input sequence x is split into h subspaces, each of which contains a d / h-dimensional vector, where d is the dimension of the input sequence and h is the number of heads; each subspace runs the self-attention layer in parallel and learns different attention weights independently, that is, each layer independently performs the attention mechanism operation in the above steps. For the input x of each subspace i , calculate Q i , K i 、V i vector: Q i =x i W i Q ,K i =x i W i K ,V i =x i W i V ; Then calculate the attention score: Normalized attention score: Attention weights i =Softmax(Scores i ); Weighted sum: Output i =Attention weights i ·V i ; Finally merge the output: Output=Concat(Output1,Output2,…,Output h )W O ; Where: h represents the number of subspaces, W O represents the output weight matrix, and Concat represents the weighted concatenation operation; When the attention output passes through the normalization layer, a residual link is introduced, and the input is added to the attention output to obtain the input of the feedforward neural network; the details are as follows: That is, from [x1, x2, …, x n ] to [y'1,y'2,…,y' n ], the residual link is [x1,x2,…,x n ] and [y1,y2,…,y n ] superposition; The feedforward neural network is used to process the output after self-attention mechanism and normalization, which includes two linear layers and two dropout layers; the first linear transformation layer maps the input data to an intermediate dimension, and the second linear transformation layer maps the output of the intermediate dimension back to the original dimension to keep the input and output dimensions consistent. Dropout layers are applied after both linear layers to reduce overfitting.

10. The composite power quality disturbance identification method based on the time-frequency feature fusion classification network according to claim 8 is characterized by: In step 4, a cross-attention mechanism is used to establish a correlation between the time domain signal sequence and the frequency domain signal sequence, and the feature information in the two sequences is fused; The frequency domain feature F is used as the query sequence, the time domain feature T is used as the key-value pair sequence, and the input sequence and the corresponding weight matrix W are used as the query sequence. q , W k , W v Multiply to get Q, K, V; generate query vector Q through frequency domain sequence, Q = FW q , the time domain sequence generates the key vector K and the value vector V, K = TW k ,V=TW v ; For each position of Q, calculate its correlation degree with all positions in K to obtain the similarity matrix. The calculation formula of the similarity matrix S is: S=QK T ; Among them, S ij Represents the elements in the matrix S, that is, the similarity between the i-th position of Q and the j-th position of K; The similarity matrix is ​​normalized using the softmax function to obtain the weight matrix, which is expressed as follows: A = Softmax(S); Among them, A ij Represents the elements in the weight matrix A, that is, the similarity between the i-th position of Q and the j-th position of K; expresses the degree of correlation between the elements of the frequency domain sequence Q and the time domain sequence K; Then the weight matrix A is multiplied by V for weighted summation to obtain the new feature sequence O after adding conditional attention, as follows: O = AV; Where O is a matrix in which each row corresponds to the weighted sum of a position in the query sequence Q; this weighted sum reflects the degree of association between the query sequence and the key-value pair sequence, and integrates the information from the value vector V, and the new feature sequence is consistent with the input feature dimension; Finally, the fusion features are processed through the fully connected layer to finally complete the recognition and classification of the disturbance signal, as follows: The fully connected layer receives the fused features O output by the cross-attention mechanism as input; these features contain information in the time domain and frequency domain; the fully connected layer performs a linear transformation on the input features, and the calculation formula is: U = OW + b; Among them, W is the weight matrix, b is the bias vector, and U is the output after linear transformation; Then the ReLU activation function is used to introduce nonlinearity; B = max(0,U); Finally, the Softmax function is applied to calculate the probability of each category; P = Softmax(B).

Citation Information

Cited By

  • Method and system for monitoring state of ball mill

    CN120011976A

  • Blockage detection method, system and equipment of flow measuring device and medium

    CN120293267A

  • Communication risk identification method and system based on multi-modal behavior fusion

    CN120342715A

  • Communication risk identification method and system based on multimodal behavior fusion

    CN120342715B

  • Municipal road abnormity monitoring method and system based on cloud platform

    CN120429595A