Power quality disturbance identification method based on multi-feature fusion, terminal equipment and storage medium
By using multi-feature fusion and deep learning techniques, and leveraging CNN and GRU networks to extract the time-frequency features and time-series information of power quality disturbance signals, this technology solves the problem of insufficient recognition accuracy in complex power grid environments in existing technologies, achieving higher recognition accuracy and noise resistance performance.
Patent Information
- Application Number
- CN202511328114.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2026-01-30
AI Technical Summary
Existing technologies lack sufficient accuracy in identifying power quality disturbances in complex power grid environments, making it difficult to effectively utilize multi-dimensional features and time-series information, resulting in a decline in identification performance.
A multi-feature fusion method is adopted to use the original power quality disturbance signal as a one-dimensional time-series feature for STFT transformation to construct a two-dimensional time-frequency feature. Local features are extracted through a CNN network, and the features are enhanced by combining the SE attention mechanism. The GRU network is used to capture the time-series dependencies, and finally the recognition result is output through a fully connected layer.
It significantly improves the recognition accuracy in complex disturbance environments, enhances the detection capability of power quality disturbance signals, and has strong anti-noise performance.
Smart Images

Figure CN121434871A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power quality disturbance identification technology, and in particular to a power quality disturbance identification method, terminal device and storage medium based on multi-feature fusion. Background Technology
[0002] With the increasing penetration of renewable energy in the power grid, a large number of power electronic devices such as power converters, reactive power devices, sensitive electronic components, and solid-state switches, as well as various nonlinear loads and frequent power faults and events, have triggered complex power quality disturbances (PQDs) in the power grid, making power quality problems increasingly serious. To ensure the safe and reliable operation of the power system, the power grid needs to detect and identify power signals to infer fault sources, assess grid operation risks, and formulate reasonable mitigation solutions. Therefore, research on power quality disturbance identification is of great significance for power quality management.
[0003] Traditional power quality disturbance identification methods typically rely on manually designed feature engineering and classifiers. Commonly used feature extraction methods include: Short-time Fourier Transform (STFT), Discrete Wavelet Transform (DWT), Stockwell Transform (ST), Empirical Mode Decomposition (EMD), and Variational Mode Decomposition (VMD). Based on the signals decomposed from these methods, various manually designed features are calculated and then input into a classifier for classification. Commonly used classifiers include Support Vector Machine (SVM), Decision Tree, Random Forest (RF), and Extreme Learning Machine (ELM). These methods have achieved good classification results. However, with the construction of new power systems, the waveforms of disturbances in the power grid have become more complex, with multiple disturbances occurring simultaneously and their features overlapping, leading to a significant increase in the difficulty of manually designing features and a substantial decline in classification performance. Deep learning technology offers a novel approach to identifying complex power quality disturbances, possessing powerful feature extraction and modeling capabilities and now widely applied in the electrical field. Against this backdrop, novel identification methods integrating deep learning and multimodal signal processing have become an important research topic in the field of power quality disturbance identification.
[0004] In recent years, the comparison of invention patent applications in the field of power quality disturbance identification technology is as follows: "Power quality disturbance identification method, system and medium based on convolutional neural network" (publication number: CN119066463A, publication date: 2024.12.03), which realizes time-frequency analysis of disturbance signals by adopting Kaiser window S transform with optimized window parameters, can significantly improve the energy concentration of signal time-frequency analysis, and then combines convolution attention neural network to automatically classify signal time-frequency feature map, which can realize accurate identification of power quality disturbance. However, its network only uses one-dimensional features as input, and does not use the complementary characteristics of multi-dimensional features of power quality disturbance signals to improve recognition accuracy and model generality. "Power quality disturbance signal identification method based on machine learning" (publication number: CN116881808B, publication date: 2025.02.11), which takes active distribution network as the research background, effectively fuses DTCWT and LPP algorithm, extracts features of various voltage quality disturbances using DTCWT-LPP and processes the feature quantities by dimension reduction, and constructs a classification model using a multi-level local density clustering algorithm to classify and identify power quality disturbance sources. However, it does not make good use of the complete information of the original time series data, and the recognition accuracy is insufficient in complex situations. SUMMARY
[0005] The technical problem to be solved by the present application is to provide a power quality disturbance identification method based on multi-feature fusion, a terminal device and a storage medium to improve the detection capability of power quality disturbance.
[0006] To solve the above technical problems, the technical solution adopted by the present application is: a power quality disturbance identification method based on multi-feature fusion, comprising the following steps:
[0007] S1, the original power quality disturbance signal is taken as a one-dimensional time series feature, and the one-dimensional time series feature is subjected to STFT transformation to obtain a two-dimensional time-frequency feature;
[0008] S2, the one-dimensional time series feature and the two-dimensional time-frequency feature are respectively input into respective CNN branches to extract local features, and the features output by the two CNN branches are spliced to obtain a fusion feature;
[0009] S3, high-dimensional features of the fusion feature are extracted, and the high-dimensional features are enhanced using an attention mechanism;
[0010] S4, the enhanced high-dimensional features are flattened and input into a GRU layer;
[0011] S5, output the detection result of the GRU layer through a full connection layer and an activation function, calculate the recognition detection error based on a cross-entropy loss function, and update the network weight by relying on the recognition detection error back propagation mechanism; the network comprises two parallel CNN branch networks and a GRU network; the two parallel CNN branch networks are connected with an attention module, and the attention module is connected with the GRU network.
[0012] The present application firstly fully utilizes the complementarity of different dimensional features, more comprehensively represents the characteristics of various disturbance signals, and highlights the difference between different disturbance signals; secondly, the CNN network is used to extract features from different dimensions of input data, so that the multi-element characteristics of the input data can be more fully captured; then, the fused features are deeply mined through convolution operation, and the expression ability of the features is strengthened; subsequently, the SE attention mechanism is used to adaptively focus on key features, and the utilization efficiency of effective information is improved; finally, the GRU is relied on to effectively capture the time sequence dynamic information in the adaptively weighted feature sequence, a more complete time sequence feature basis is constructed for accurate identification of power quality disturbance signals, and the identification accuracy of the network under complex disturbance is improved.
[0013] The expression of the fused feature x is: concat H and W are the height and width of the feature vector respectively, C1 and C2 are the channel numbers of the two feature vectors of the input CNN branch respectively, and represents the splicing operation.
[0014] The expression of the enhanced high-dimensional feature F' is: F' = M(F avg )⊙F; wherein, F(i,j,:) represents the feature of the i-th row and j-th column pixel, F is the input feature of the attention module, and F avg represents the feature vector obtained by performing global average pooling operation on F, M(F avg ) = σ(W1δ(W0(F avg ))), δ is a Relu activation function, σ is a Sigmoid activation function, W0 and W1 are weights of the full connection layer, ⊙ is a channel-by-channel multiplication, M is an attention weight matrix, and H and W are the height and width of the feature vector respectively.
[0015] The expression of the cross-entropy loss function Loss is: Wherein, p i represents the probability that the sample belongs to the i-th class; y0,..., y C-1 is a sample label, y i = 1 when the sample belongs to the i-th class, otherwise y i = 0; and C is a sample label.
[0016] As an inventive concept, the application also provides a terminal device comprising a memory, a processor and a computer program stored on the memory; the processor executes the computer program to implement the steps of the method.
[0017] As an inventive concept, the application also provides a computer readable storage medium having a computer program / instructions stored thereon; the computer program / instructions are executed by a processor to implement the steps of the method.
[0018] Compared with the prior art, the application has the beneficial effects that: the original power quality disturbance signal is taken as a one-dimensional time sequence feature, and a two-dimensional time-frequency feature of the power quality disturbance signal is constructed therefrom; a local time-frequency feature of the disturbance signal is extracted by using a CNN, the feature is enhanced by using an SE attention mechanism, and time sequence modeling is performed by using a GRU; and a detection result of the power quality disturbance is obtained by outputting a recognition result through a fully connected layer and a Softmax layer. The application firstly extracts features from input data in different dimensions by means of a CNN network, which can more fully capture the multi-element characteristics of the input data; secondly, the fused features are deeply mined by convolution operation to strengthen the expression ability of the features; then, the SE attention mechanism is used to adaptively focus on key features to improve the utilization efficiency of effective information; finally, the GRU is used to effectively capture the time sequence dynamic information in the adaptively weighted feature sequence, which builds a more complete time sequence feature basis for accurately identifying the power quality disturbance signal, and thus improves the recognition accuracy of the network under complex disturbance. The application adopts the progressive collaborative design of “multi-dimensional fusion-depth extraction-precise focusing-time sequence capture”, and builds a multi-dimensional, deep and highly adaptive power quality disturbance signal recognition system: on the one hand, the complementary information of different dimensional features is fused, and the multi-dimensional feature extraction capability of the CNN is relied on to realize complete characterization of the disturbance signal characteristics and full conversion of the multi-element characteristics, which solves the problems of incomplete single-dimensional representation and insufficient feature extraction; on the other hand, the convolution operation is used to deeply mine the fused features to strengthen the feature expression ability, and the SE attention mechanism is used to adaptively focus on key features to improve the effective information utilization efficiency and reduce redundant interference; at the same time, the GRU is used to capture the feature sequence dynamic law relying on the strong processing ability of the time sequence dependence, and a complete feature basis of “static feature + time sequence dynamic” is built, which finally significantly improves the recognition accuracy under complex disturbance. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 A flowchart of a CNN-Attention-GRU power quality disturbance recognition network based on multi-feature fusion according to an embodiment of the application is shown in the figure.
[0020] Figure 2This is a schematic diagram of the CNN-Attention-GRU power quality disturbance recognition network structure based on multi-feature fusion;
[0021] Figure 3 This is a schematic diagram of the SE attention mechanism module structure;
[0022] Figure 4 This is a comparison chart showing the recognition accuracy of different models under different noise environments. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] Example 1
[0025] This invention provides a CNN-Attention-GRU power quality perturbation identification method based on multi-feature fusion, comprising the following steps:
[0026] Step 1: Generate power quality disturbance signals and perform STFT transformation on them to obtain their two-dimensional time-frequency characteristics based on a one-dimensional time-domain signal sequence. According to the international IEEE_std_1159 power quality standard, 15 power quality disturbance signals were selected to establish mathematical models for research. Six of these are single disturbance signals: voltage sag, voltage rise, voltage interruption, voltage flicker, transient pulse, and harmonic signal. In addition, six common and highly detrimental composite double disturbance signals found in actual power grids were specifically selected: harmonic + rise, harmonic + sag, harmonic + interruption, flicker + rise, flicker + sag, and flicker + harmonic; and three composite triple disturbance signals were selected: flicker + harmonic + rise, flicker + harmonic + sag, and flicker + harmonic + interruption. The embodiments of the present invention generate datasets based on MATLAB. For each type of power quality disturbance signal, 500 samples are randomly generated within the parameter limit range. Each sample contains 2048 data points, and the dataset is divided according to the ratio of training set: test set = 8:2.
[0027] In power quality disturbance identification, the fundamental advantage of preserving the original time-domain signal sequence as input features is that it retains the complete information dimension of the signal without loss.
[0028] The original power quality disturbance signal record contains all the details of the time-domain waveform in the time dimension, especially the accurate time positioning and fine morphological structure of transient disturbances such as voltage sag mutation points, accurate envelope of oscillation, and rapid rising edge of pulse. Any other transformation or manual extraction of statistical features is essentially a kind of information compression or conversion, which may lose these key non-stationary characteristics and transient details.
[0029] At the same time, the deep learning model has strong automatic feature learning ability, which can directly mine and construct complex spatio-temporal patterns that distinguish different disturbances from raw data, effectively avoiding the subjectivity, potential information bottleneck and generalization limitation of traditional manual feature engineering, and providing the richest data basis for building more accurate and stronger anti-noise performance end-to-end intelligent diagnosis system.
[0030] The basic idea of Short-Time Fourier Transform (STFT) is to regard the signal as approximately stationary in short time, divide the signal into multiple short time periods (frames) by selecting a time-frequency localized window function, and apply the fast Fourier transform to each frame, so as to analyze the signal in both time and frequency dimensions, which can effectively capture the time-varying characteristics of the signal and overcome the defect that the traditional Fourier transform cannot locate the frequency change with time.
[0031] The mathematical transformation of STFT is as follows:
[0032]
[0033] Where x(t) is the original signal, w(t) is the window function, and X(t,f) represents the time-frequency energy at time t and frequency f.
[0034] Step 2, build a CNN-Attention-GRU power quality disturbance recognition network based on multi-feature fusion and train it.
[0035] The algorithm structure of the whole model is divided into four parts: first, the input layer accepts two-dimensional time-frequency graph and one-dimensional time domain sequence, and the two are extracted local features through parallel double branch convolution module, and the feature fusion is performed at the branch output end, which is the fusion of the dimension and form of the output matrix, then the global average pooling is used to compress the spatial information, and further extract the common features, then the time dimension average pooling is used to compress the sequence length, and then the 128-unit GRU layer is used to capture the time sequence dependence after flattening, and finally the classification decision part, the dropout layer randomly inactivates half of the neurons according to the probability, preventing overfitting, and the fully connected layer corresponds the features to 15 types of power quality disturbance signals one by one, and finally the recognition result is output through softmax. The network structure is as shown in Figure 2 .
[0036] Attention Mechanism is one of the core components in deep learning, which is used to determine which part of the input needs to be focused on, so that the model allocates limited computing resources to the most important information part.
[0037] In the embodiment of the application, the SE attention mechanism is used to enhance the high-dimensional features F extracted by convolution again after fusion, and the mathematical calculation is as follows.
[0038] F' = M(F avg ) o F
[0039] Wherein, F is the input feature of the SE attention mechanism module, F(i,j,:) represents the feature of the i-th row and j-th column pixel, F avg represents the feature vector obtained after the global average pooling operation on F; M(F avg ) = sigma(W1delta(W0(F avg ))), delta is the Relu activation function, sigma is the Sigmoid activation function, W0 and W1 are the weights of the full connection layer; o is the channel-by-channel multiplication, M is the SE attention weight matrix, and F' is the output feature map. The specific implementation process is as shown in Figure 3 .
[0040] Gated Recurrent Unit (GRU) is an improved recurrent neural network, which solves the gradient disappearance and long-range dependence problem of traditional RNN by introducing a gating mechanism. The core of GRU is the update gate and the reset gate, the update gate decides how much old information is retained in the new hidden state, and the reset gate decides how much old information is used to calculate the candidate hidden state. These two gating units control the flow of information, so that GRU can flexibly decide when to update the state, when to retain the historical state, and which historical information is related to the current calculation, so as to effectively capture the long-distance dependence relationship in the sequence. Compared with Long-Short Term Memory (LSTM), it reduces one gate, and through this simplified structure design, it can realize efficient feature extraction and information transmission.
[0041] The embodiment of the application carries out comparative experiments around the recognition effect, and uses common evaluation indexes for measuring the recognition effect, including accuracy, precision, recall and F1-score.
[0042] Accuracy refers to the proportion of all correctly predicted samples in the total samples, and the mathematical calculation is as follows.
[0043]
[0044] Accuracy is the most important and intuitive evaluation indicator in classification problems, but its disadvantage is that it treats positive and negative samples equally. When the proportion of positive and negative samples is unbalanced, the classification performance will be greatly discounted.
[0045] When analyzing precision and recall, it is necessary to clarify whether more attention is paid to positive samples or negative samples. The embodiment of the present application defaults that positive samples are the samples we are more interested in. Under this condition, precision refers to the proportion of actual positive samples in the samples predicted as positive. Its mathematical calculation is as follows.
[0046]
[0047] Precision reflects the credibility of the model's prediction of positive class. In the field of information retrieval, precision is also called "precision", but it does not consider the positive samples that are misclassified as negative, which may ignore a large part of the actual positive samples.
[0048] Recall is the proportion of samples correctly predicted as positive in all actual positive samples. Recall reflects the ability of the model to capture positive samples. In the field of information retrieval, recall is also called "recall", which is suitable for use in cases where the cost of missing reports is high. Its mathematical calculation is as follows.
[0049]
[0050] F1-score is a comprehensive indicator to balance the influence of precision and recall, which is the harmonic mean of precision and recall, and can comprehensively evaluate a classifier. Its mathematical calculation is as follows.
[0051]
[0052] Where TP is the number of actual positive and predicted positive samples, FP is the number of actual negative and predicted positive samples, FN is the number of actual positive and predicted negative samples, and TN is the number of actual negative and predicted negative samples.
[0053] Under the CNN-Attention-GRU hybrid model in the embodiment of the present application, the input features respectively use single STFT time-frequency graph features, single time sequence features, and STFT and time sequence fusion features, and the parameters of the model training are uniformly set as follows: the maximum training rounds are 50 rounds, the batch input size is 32, the initial learning rate is 0.001, the segmented learning strategy is adopted, and the learning rate decay coefficient is set to 0.1. At the same time, in order to verify the anti-noise performance of the model, the noise-free data set and the strong noise data set (SNR = 10 dB) are used for training respectively, the average accuracy rate of the final 15 kinds of disturbance signals is shown in Table 1, and the average precision rate, recall rate and F1-score under different input features are shown in Table 2.
[0054] Table 1 Average accuracy rate under different input features
[0055]
[0056] Table 2 Average precision rate, recall rate and F1 under different input features
[0057]
[0058] From the above two tables, it can be seen that the STFT-Time multi-feature fusion input not only has high recognition accuracy under the noise-free condition, but also has obvious anti-noise performance under strong noise interference, which can achieve a relatively ideal recognition effect. At the same time, under the multi-feature fusion input, the credibility of the model predicting correct results and the ability of capturing correct samples are better than those of the single feature input, especially under strong noise interference, the value of F1-score is obviously higher than that of the single feature input, which fully shows that the model quality is higher under the multi-feature input.
[0059] In the embodiment of the present application, traditional power quality disturbance recognition methods such as BP, SVM and single CNN network are used for recognition training. In the BP neural network, 'logsig' and 'purelin' are used as activation functions, 'tranlm' is used as a training function, the learning rate is set to 0.001, and the number of hidden layer nodes is set to 100; in the SVM support vector machine algorithm, the 'gauss' kernel function is selected, the kernel parameter is set to 2, and the penalty factor C is 0.2. In order to ensure the stability of the experimental results, each algorithm is run 50 times, and finally the average value is taken as the final experimental result; the training parameters of the CNN network are set to be the same as those of the hybrid network. The average precision rate, recall rate and F1 under different network models are shown in Table 3, and the recognition accuracy of different models is shown in Table 4. Figure 4
[0060] Table 3 Average precision rate, recall rate and F1 under different network models
[0061]
[0062] By comparing the different network model indicators in Table 3, it can be concluded that under the same conditions, the F1 score of the CNN-Attention-GRU hybrid model is significantly higher than that of other network models, which shows that the performance of the model is better than that of the traditional power quality disturbance identification method. At the same time, in the case of strong noise, the identification model can still achieve good identification effect, which proves that the proposed CNN-Attention-GRU hybrid model has strong anti-noise performance and feasibility in identifying and classifying power quality disturbance signals in actual power grid environment. Figure 4 From the identification accuracy of different models in Table 4, it can be seen that in various noise environments, the identification accuracy of the proposed hybrid model is higher than that of the traditional method and the single CNN network. For example, in the case of strong noise with SNR=15dB, the identification accuracy of the proposed model is 91.80%, which is much higher than that of the traditional BP neural network of 77.60% and the SVM support vector machine of 72.93%, and is also about 5% higher than that of the single CNN network.
[0063] The embodiment of the application also sets up five different levels of input signal-to-noise ratio groups without noise, 10dB, 20dB, 30dB and 40dB, and the accuracy, precision, recall rate and F1 index in different noise environments are shown in Table 4. By comparing the power quality disturbance signal identification effect of the CNN-Attention-GRU deep learning network model proposed in the embodiment of the application in different noise environments, it can be concluded that strong noise has a certain influence on the classification accuracy of the proposed model, but still can obtain high identification accuracy and precision, which verifies that the proposed CNN-Attention-GRU hybrid model has strong anti-noise performance and feasibility in identifying and classifying power quality disturbance signals in actual power grid environment.
[0064] Table 4 Accuracy, precision, recall rate and F1 index in different noise environments
[0065]
[0066] Embodiment 2
[0067] The terminal device of the embodiment 2 of the application corresponds to the above-mentioned embodiment 1, and the terminal device can be a processing device for a client, such as a mobile phone, a notebook computer, a tablet computer, a desktop computer, etc., to execute the method of the above-mentioned embodiment.
[0068] The terminal device of the embodiment includes a memory, a processor and a computer program stored in the memory; the processor executes the computer program stored in the memory to realize the steps of the method of the above-mentioned embodiment 1.
[0069] In some implementations, the memory can be a high-speed random access memory (RAM), and can also include a non-volatile memory, such as at least one disk memory.
[0070] In some other implementations, the processor can be a central processing unit (CPU), a digital signal processor (DSP), or various other types of general purpose processors, without limitation.
[0071] Embodiment 3
[0072] Embodiment 3 of the present application provides a computer readable storage medium corresponding to the above-mentioned embodiment 1, which stores computer programs / instructions. The computer programs / instructions are executed by the processor to implement the steps of the method of embodiment 1.
[0073] The computer readable storage medium can be a tangible device that maintains and stores instructions for use by an instruction execution device. The computer readable storage medium can be, for example but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination thereof.
[0074] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROMs, optical storage devices, etc.) containing computer usable program code. The solutions in the embodiments of the present application can be implemented in various computer languages, such as object-oriented programming languages Java and interpreted scripting language JavaScript, etc.
[0075] The present application is described with reference to flowcharts and / or block diagrams according to the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the computer or other programmable data processing devices produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1 The functions specified in a flow or multiple flows and / or blocks
[0076] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 Figure 1 The flowchart blocks or blocks in the flowcharts represent steps in a process or processes and / or functions specified in one or more blocks in the flowcharts and / or blocks in the flowcharts.
[0077] While the preferred embodiments of the application have been described, additional variations and modifications can be made to the preferred embodiments by those skilled in the art once they learn of the basic inventive concepts. Therefore, the appended claims are intended to cover all such additional variations and modifications as fall within the scope of the application.
[0078] It is apparent that a number of modifications and variations of the present application are possible in light of the above teachings. It is therefore intended that the present application covers all such modifications and variations of this application provided they come within the scope of the appended claims and their equivalents.
Claims
1. A method for power quality disturbance identification based on multi-feature fusion, characterized in that, The method comprises the following steps: S1, taking an original power quality disturbance signal as a one-dimensional time sequence feature, and performing an STFT transformation on the one-dimensional time sequence feature to obtain a two-dimensional time-frequency feature; S2, inputting the one-dimensional time sequence feature and the two-dimensional time-frequency feature into respective CNN branches respectively, extracting local features, splicing the features output by the two CNN branches, and obtaining fused features; S3, extracting high-dimensional features of the fused features, and enhancing the high-dimensional features by using an attention mechanism; S4, inputting the enhanced high-dimensional features into a GRU layer after flattening; S5, outputting a detection result by a fully connected layer and an activation function from an output of the GRU layer, calculating a recognition detection error based on a cross-entropy loss function, and updating network weights by a back propagation mechanism relying on the recognition detection error; the network comprises two parallel CNN branch networks and a GRU network; the two parallel CNN branch networks are connected to an attention module, and the attention module is connected to the GRU network.
2. The method of claim 1, wherein the method is based on multi-feature fusion. Fused feature x concat The expression is: H, W are the height and width of the feature vector respectively, C1, C2 are the channel numbers of the two feature vectors input into the CNN branch respectively, and → represents the splicing operation.
3. The method of claim 1, wherein the method is based on multi-feature fusion. The enhanced high-dimensional feature F' is represented as: F'=M(F avg )⊙F; wherein, F is the input feature of the attention module, F(i,j,:) represents the feature of the i-th row and j-th column pixel, F avg represents a feature vector obtained after a global average pooling operation on F, M(F avg ) = σ(W1δ(W0(F avg ))), δ is a Relu activation function, σ is a Sigmoid activation function, W0 and W1 are weights of a full connection layer, ⊙ is a channel-by-channel multiplication, M is an attention weight matrix, H and W are the height and width of the feature vector, respectively.
4. The method of claim 1, wherein the method is based on multi-feature fusion. The expression of cross-entropy loss function Loss is as follows: Wherein, p i represents the probability that the sample belongs to the i-th class; y0,..., y C-1 is a sample label, y i = 1 when the sample belongs to the i-th class, otherwise y i = 0; C is a sample label.
5. A terminal device comprising a memory, a processor, and a computer program stored on the memory; characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1-4.
6. A computer readable storage medium having stored thereon computer programs / instructions; characterized in that, The computer program / instruction is executed by the processor to implement the steps of the method in any one of claims 1-4.
Citation Information
Patent Citations
A method for identifying power quality disturbance signals based on machine learning
CN116881808B
Method and system for discriminating transient stability of power system based on deep learning
CN117668691A
Power quality disturbance classification method and system based on confidence reinforcement learning
CN118171159A
Electric energy quality disturbance identification method based on synchronous phasor measurement data
CN119046764A
Electric energy quality disturbance identification method and system based on convolutional neural network, and medium
CN119066463A