Electric energy quality disturbance classification and identification method and system

By adding adjustment layers to the traditional CNN structure and using the PSO algorithm to optimize parameters, the problems such as inconsistent basis function selection and high computational complexity in the traditional power quality disturbance classification and recognition method are solved, and higher classification recognition accuracy and noise resistance are achieved.

CN120145189APending Publication Date: 2025-06-13ANHUI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510223361.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The traditional classification and identification method for power quality disturbances has problems such as inconsistent selection of basis functions, lack of clear determination methods for decomposition layers, high computational complexity and insufficient time-frequency aggregation, resulting in low classification and identification accuracy and difficulty in real-time processing.

Method used

The PSO algorithm is used to optimize and improve the parameters of CNN. By adding adjustment layers to the basic CNN structure, local featureization and feature extraction are performed, combined with efficient search and optimization of PSO, avoiding gradient vanishing and local optimal solutions, and improving the convergence speed and classification accuracy of the model.

Benefits of technology

It effectively improves the classification and identification accuracy of the disturbed signals of power quality, reduces training time, enhances noise resistance, and realizes the ability to capture subtle features of the signal more sensitively and comprehensively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120145189A_ABST
    Figure CN120145189A_ABST
Patent Text Reader

Abstract

The invention discloses a power quality disturbance classification identification method and system, and the method comprises the steps: obtaining and processing a power quality disturbance signal, and obtaining a two-dimensional disturbance signal; adding an adjustment layer to a basic CNN structure layer to obtain an improved CNN; obtaining a feature matrix through a convolutional layer of an improved CNN, carrying out local characterization on the feature matrix, and carrying out feature extraction on the power quality disturbance signal by using a pooling layer to obtain a disturbance signal feature; performing fitting operation on the disturbance signal features through a full connection layer, inputting the fitted features into a classification layer for classification, and obtaining an initial classification recognition result; and optimizing the power quality disturbance classification model based on the improved CNN by using a PSO algorithm, and carrying out classification identification on the power quality disturbance measured data to obtain a target classification identification result. According to the method, the situation that the training time is too long or the effect is not ideal due to the fact that the parameters are manually selected too large or too small is avoided, the classification accuracy is high, and the anti-noise capacity is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of power quality signals, and particularly relates to a method and system for classifying and identifying power quality disturbances. Background Technique

[0002] With the country's strong advocacy for the development of new energy, more and more new energy power generation systems and integrated optimized energy systems are connected to the power grid. Compared with traditional power systems, more and more electronic devices are used in the power grid with the input of new energy, resulting in a series of power quality disturbance problems, such as voltage sags, harmonics, and transient oscillations. These power quality disturbance problems will have a serious impact on the safe and stable operation of the power system. Therefore, the accurate classification and identification of these power quality disturbance problems are crucial.

[0003] Traditional power quality disturbance classification and identification methods mainly adopt the means of combining feature extraction methods with classification methods. Among them, features are extracted through wavelet transform, and then a multi-label decision tree integration algorithm is used to classify power quality disturbance signals according to the extracted features; the clustering-improved S transform is combined with the support vector machine (SVM), and the clustering-improved S transform is used to obtain the features of power quality disturbance signals, and the SVM classifier is used to classify the disturbance signals according to these features. Although the traditional methods have good effects on the classification and identification of disturbance signals, there are also some defects: there is no unified standard for the selection of wavelet transform basis functions, and different basis functions have a great impact on the signal analysis results; there is also a lack of a clear determination method for the decomposition layer, and too many or too few layers will interfere with feature extraction and reduce the classification and identification accuracy; the computational complexity is high, involving a large number of convolution operations, and challenges will be faced when processing signals in real time. In the S transform, the window function is fixed and it is difficult to adaptively adjust according to the signal frequency change, and the flexibility of time-frequency localization analysis is poor; obvious edge effects will occur at the signal edges, and the analysis results have large errors; in the face of signals with multiple components and complex time-varying characteristics, the time-frequency aggregation is insufficient, which is not conducive to accurate classification and identification. Summary of the Invention

[0004] To solve the above technical problems, the present invention provides a method and system for classifying and identifying power quality disturbances, which uses the PSO algorithm to optimize and improve the parameters of the CNN, avoids situations such as gradient disappearance, and can be effectively applied to the classification and identification of power quality disturbance signals.

[0005] Among them, a method for classifying and identifying power quality disturbances specifically includes the following steps:

[0006] Obtain a power quality disturbance signal, process the power quality disturbance signal to obtain a two-dimensional disturbance signal;

[0007] Add an adjustment layer to the basic CNN structure level to obtain an improved CNN;

[0008] Obtain a feature matrix through the convolutional layer of the improved CNN, perform local feature extraction on the feature matrix, and use the pooling layer of the improved CNN to extract features from the power quality disturbance signal to obtain disturbance signal features;

[0009] Perform a fitting operation on the disturbance signal features through the fully connected layer of the improved CNN, input the fitted features into the classification layer of the improved CNN for classification, and obtain the initial classification and recognition result of the power quality disturbance signal;

[0010] Use the PSO algorithm to optimize the power quality disturbance classification model based on the improved CNN, classify and recognize the measured power quality disturbance data, and obtain the target classification and recognition result.

[0011] Preferably, the process of processing the power quality disturbance signal to obtain a two-dimensional disturbance signal includes:

[0012] Obtain a one-dimensional power quality disturbance sampling signal, convert the one-dimensional time series of the one-dimensional power quality disturbance sampling signal into a two-dimensional matrix with equal number of rows and columns, and perform data partitioning on the two-dimensional matrix to obtain the training data set and test data set of the two-dimensional disturbance signal.

[0013] Preferably, the process of adding an adjustment layer to the basic CNN structure level to obtain the improved CNN includes:

[0014] Add an adjustment layer between the convolutional layer and the pooling layer in the basic CNN structure to obtain the improved CNN;

[0015] The structure level of the improved CNN includes:

[0016] An input layer, a convolutional layer, an adjustment layer, a pooling layer, a fully connected layer, and a classification layer connected in sequence.

[0017] Preferably, the process of obtaining a feature matrix through the convolutional layer of the improved CNN and performing local feature extraction on the feature matrix includes:

[0018] First, after normalizing the power quality disturbance signal using the input layer of the improved CNN, the convolutional layer performs convolution on the power quality disturbance signal and the convolution kernel. When the convolutional layer obtains the disturbance signal feature matrix, according to the set different convolution kernel weights, multiple disturbance signal sub-feature matrices are obtained,

[0019] At the same time, set the same number of adjustment layer neurons as the number of disturbance signal feature matrices, calculate the adjustment layer neuron values and perform sorting processing to obtain the ordered adjustment layer values, and adjust the feature matrix output by the convolutional layer according to the position change of the adjustment layer neurons after sorting processing by the improved CNN.

[0020] Preferably, the process of using the pooling layer of the improved CNN to extract features from the power quality disturbance signal and obtain the disturbance signal features includes:

[0021] Reduce the spatial size of the features extracted from the convolutional layer through the pooling layer of the improved CNN, realize the feature extraction of the power quality disturbance signal, and obtain the disturbance signal features.

[0022] Preferably, the process of obtaining the initial classification and recognition result of the power quality disturbance signal includes:

[0023] Use the fully connected layer of the improved CNN to perform a fitting operation on the feature quantity of the power quality disturbance, and input the fitted features into the classification layer for classification. The classification layer outputs the probability of the corresponding category of the power quality disturbance signal, thereby realizing the classification of the power quality disturbance signal and obtaining the initial classification and recognition result of the power quality disturbance signal.

[0024] Preferably, the process of using the PSO algorithm to optimize the power quality disturbance classification model based on the improved CNN includes:

[0025] Randomly initialize the particle parameters, set the value range of the parameters that need to be optimized for the improved CNN, and use the value range as the range interval for updating the particle velocity and position. If it exceeds the value range, take the maximum and minimum values of the interval;

[0026] Update the position and velocity of the particle, use the loss function value obtained by training the improved CNN as the fitness value of the PSO. If the fitness value is better than the individual best value and the global best value, update the individual best value and the global best value;

[0027] If the training reaches the accuracy requirement or the number of iterations, use the obtained parameters as the optimal structure parameters of the improved CNN, otherwise continue to update the individual best value and the global best value.

[0028] Preferably, the process of classifying and recognizing the measured data of the power quality disturbance and obtaining the target classification and recognition result includes:

[0029] After using the PSO algorithm to optimize the parameters of the improved CNN, verify the power quality disturbance signal classification model based on PSO-improved CNN. Use the test data set to verify the trained power quality disturbance classification model, obtain the classification results of various power quality disturbances according to the output, and determine the power quality disturbance classification model according to the classification results;

[0030] Based on the power quality disturbance classification model, classify and recognize the measured data of the power quality disturbance to obtain the target classification and recognition result.

[0031] The present invention also provides a power quality disturbance classification and recognition system, which is characterized in that it includes:

[0032] A data acquisition and processing module, configured to obtain power quality disturbance signals, process the power quality disturbance signals, and obtain two-dimensional disturbance signals;

[0033] A model improvement module, configured to add an adjustment layer to the basic CNN structure level to obtain an improved CNN;

[0034] A feature extraction module, configured to obtain a feature matrix through the convolutional layer of the improved CNN, localize the feature matrix, and use the pooling layer of the improved CNN to extract features of the power quality disturbance signals to obtain disturbance signal features;

[0035] An initial classification module, configured to perform a fitting operation on the disturbance signal features through the fully connected layer of the improved CNN, input the fitted features into the classification layer of the improved CNN for classification, and obtain an initial classification and recognition result of the power quality disturbance signals;

[0036] A target sub-module, configured to optimize a power quality disturbance classification model based on the improved CNN by using the PSO algorithm, classify and recognize measured power quality disturbance data, and obtain a target classification and recognition result.

[0037] Compared with the prior art, the present invention has the following advantages and technical effects:

[0038] The improved CNN proposed by the present invention adds an adjustment layer within the basic CNN structure level, localizes the feature matrix obtained by the convolutional layer of the improved CNN, can effectively obtain power quality disturbance signal features, and improves the accuracy of the final output result of the fully connected layer of the improved CNN power quality disturbance signal classification model according to the highest similarity of the elements in the features.

[0039] For the classification and recognition of power quality disturbance signals, the present invention establishes a power quality disturbance signal classification model based on PSO-improved CNN, which can extract the features of power quality disturbance signals by itself, efficiently search for and optimize the initial parameters of CNN through PSO, effectively avoid CNN falling into local optimal solutions during the training process, greatly accelerate the convergence speed of the model, and reduce the training time. The improved CNN further strengthens its feature extraction ability, can capture the subtle features of power quality disturbance signals more sensitively and comprehensively. It avoids the situations of too long training time or unsatisfactory effects caused by too large or too small artificially selected parameters, has high classification accuracy and strong anti-noise ability. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] Figure 1 This is the structural diagram of the improved CNN for extracting the characteristics of power quality disturbance signals in the embodiments of the present invention;

[0042] Figure 2 This is the schematic diagram of the method flow in the embodiments of the present invention; Specific embodiments

[0043] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will describe this application in detail with reference to the drawings and in combination with the embodiments.

[0044] It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0045] Embodiment 1

[0046] As Figure 1-2 shown, this embodiment provides a method for classifying and identifying power quality disturbances, including:

[0047] Obtain power quality disturbance signals, process the power quality disturbance signals to obtain two-dimensional disturbance signals;

[0048] Add an adjustment layer to the basic CNN structure hierarchy to obtain an improved CNN;

[0049] Obtain a feature matrix through the convolutional layer of the improved CNN, localize the feature matrix, and use the pooling layer of the improved CNN to extract the features of the power quality disturbance signals to obtain the disturbance signal features;

[0050] Perform a fitting operation on the disturbance signal features through the fully connected layer of the improved CNN, input the fitted features into the classification layer of the improved CNN for classification, and obtain the initial classification and identification results of the power quality disturbance signals;

[0051] Use the PSO algorithm to optimize the power quality disturbance classification model based on the improved CNN, classify and identify the measured data of the power quality disturbances, and obtain the target classification and identification results.

[0052] Furthermore, it specifically includes the following steps:

[0053] S1: Obtain the one-dimensional disturbance sampling signals of the power quality, convert the one-dimensional time series of the one-dimensional disturbance sampling signals of the power quality into a two-dimensional matrix with equal number of rows and columns, and perform data division on the two-dimensional matrix to obtain the training data set and the test data set of the two-dimensional disturbance signals.

[0054] S2: As Figure 1 shown, add an adjustment layer within the basic CNN structure hierarchy; specifically, add an adjustment layer between the convolutional layer and the pooling layer in the basic CNN structure to obtain an improved CNN;

[0055] The structural hierarchy of the improved CNN includes:

[0056] An input layer, a convolutional layer, an adjustment layer, a pooling layer, a fully connected layer, and a classification layer connected in sequence.

[0057] Localize the feature matrix obtained by the convolutional layer of the improved CNN, and use the pooling layer to extract the features of the power quality disturbance signal;

[0058] After normalizing the power quality disturbance signal at the input layer of the improved CNN, the convolutional layer convolves the power quality disturbance signal with the convolutional kernel. To more accurately obtain the features of the power quality disturbance signal, when the convolutional layer obtains the disturbance signal feature matrix, different convolutional kernel weights need to be set, so multiple disturbance signal sub-feature matrices are obtained. At the same time, set the same number of adjustment layer neurons as the number of disturbance signal feature matrices, calculate the values of the adjustment layer neurons and perform sorting processing to obtain the ordered values of the adjustment layer. According to the position change of the adjustment layer neurons after sorting processing by the improved CNN, adjust the feature matrix output by the convolutional layer. The pooling layer reduces the spatial size of the features extracted from the convolutional layer to achieve the feature extraction of the power quality disturbance signal.

[0059] S3: Use the fully connected layer of the improved CNN to perform a fitting operation on the extracted disturbance signal features, input the fitted features into the classification layer for classification, and the classification layer outputs the probability of the corresponding category of the power quality disturbance signal, thereby realizing the classification and recognition of the power quality disturbance signal;

[0060] As Figure 2 shown, the specific steps are as follows:

[0061] Randomly initialize the particle parameters;

[0062] Randomly initialize the particle parameters, set the value range of the parameters that need to be optimized by the improved CNN, and use this value range as the range interval for updating the particle velocity and position. If it exceeds the value range, take the maximum and minimum values of the interval;

[0063] Update the position and velocity of the particle, and use the loss function value obtained from training the improved CNN as the fitness value of the PSO. If the fitness value is better than the individual best value and the global best value, update the individual best value and the global best value;

[0064] If the training reaches the accuracy requirement or the number of iterations, take the obtained parameters as the optimal structure parameters of the improved CNN, otherwise continue to update the individual best value and the global best value.

[0065] The improved CNN is tested with optimal parameters to obtain the classification results of power quality disturbance signals.

[0066] S4: Use the PSO algorithm to optimize the power quality disturbance classification model based on the improved CNN, and classify and identify the measured data of power quality disturbances.

[0067] Specifically, after using the PSO algorithm to optimize the parameters of the improved CNN, the power quality disturbance signal classification model based on PSO-improved CNN is verified. The test data set is used to verify the trained power quality disturbance classification model. According to the output, the classification results of various power quality disturbances are obtained. Based on the classification results, the power quality disturbance classification model is determined, and finally the classification and identification of the measured data of power quality disturbances are realized.

[0068] The present invention proposes a method for classifying and identifying power quality disturbance signals based on PSO-improved CNN. The improved CNN is used to extract the features of power quality disturbance signals. An adjustment layer is added to the basic CNN structure in the improved CNN to localize the feature matrix obtained by the convolutional layer of the improved CNN, which can effectively obtain the features of power quality disturbance signals and improve the accuracy of the final output result of the fully connected layer of the power quality disturbance signal classification model of the improved CNN. The PSO is used to efficiently search for and optimize the initial parameters of the CNN, effectively avoiding the CNN falling into a local optimal solution during the training process, greatly accelerating the convergence speed of the model, and reducing the training time. The improved CNN further strengthens its feature extraction ability and can capture the subtle features of power quality disturbance signals more sensitively and comprehensively. It avoids the situation of too long training time or unsatisfactory results caused by too large or too small artificially selected parameters, has high classification accuracy and strong anti-noise ability.

[0069] Embodiment 2

[0070] Based on the same inventive concept, this embodiment also provides a power quality disturbance classification and identification system, including:

[0071] A data acquisition and processing module, configured to acquire power quality disturbance signals, process the power quality disturbance signals, and obtain two-dimensional disturbance signals;

[0072] A model improvement module, configured to add an adjustment layer to the basic CNN structure level to obtain an improved CNN;

[0073] A feature extraction module, configured to obtain a feature matrix through the convolutional layer of the improved CNN, localize the feature matrix, and use the pooling layer of the improved CNN to extract the features of the power quality disturbance signals to obtain disturbance signal features;

[0074] An initial classification module, which is used to fit the features of the disturbance signal by improving the fully connected layer of the CNN, input the fitted features into the classification layer of the improved CNN for classification, and obtain the initial classification and recognition result of the power quality disturbance signal;

[0075] A target sub-module, which is used to optimize the power quality disturbance classification model based on the improved CNN by using the PSO algorithm, classify and recognize the measured data of the power quality disturbance, and obtain the target classification and recognition result.

[0076] The power quality disturbance classification and recognition system provided in this embodiment has all the advantages of the power quality disturbance classification and recognition method provided in Embodiment 1.

[0077] Embodiment 3

[0078] This embodiment also discloses a computer device, including 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 described in Embodiment 1.

[0079] Embodiment 4

[0080] This embodiment also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the method described in Embodiment 1.

[0081] Embodiment 5

[0082] This embodiment also discloses a computer program product, including a computer program. When the computer program is executed by a processor, it implements the steps of the method described in Embodiment 1.

[0083] The above is only a preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for classifying and identifying power quality disturbances, characterized in that: include: Acquiring a power quality disturbance signal, and processing the power quality disturbance signal to obtain a two-dimensional disturbance signal; Add adjustment layers to the basic CNN structure to obtain an improved CNN; Acquire a feature matrix through the convolution layer of the improved CNN, perform local characterization on the feature matrix, and use the pooling layer of the improved CNN to extract features of the power quality disturbance signal to obtain disturbance signal features; Performing a fitting operation on the disturbance signal features through the fully connected layer of the improved CNN, inputting the fitted features into the classification layer of the improved CNN for classification, and obtaining an initial classification and recognition result of the power quality disturbance signal; The PSO algorithm is used to optimize the power quality disturbance classification model based on the improved CNN, and the measured data of power quality disturbance is classified and identified to obtain the target classification and identification results.

2. The method according to claim 1, characterized in that The process of processing the power quality disturbance signal to obtain a two-dimensional disturbance signal includes: A one-dimensional power quality disturbance sampling signal is obtained, the one-dimensional time series of the one-dimensional power quality disturbance sampling signal is converted into a two-dimensional matrix with equal rows and columns, data is partitioned on the two-dimensional matrix, and a training data set and a test data set of the two-dimensional disturbance signal are obtained.

3. The method according to claim 1, characterized in that The process of adding adjustment layers to the basic CNN structure hierarchy to obtain an improved CNN includes: Add an adjustment layer between the convolution layer and the pooling layer in the basic CNN structure to obtain an improved CNN; The structural hierarchy of the improved CNN includes: The input layer, convolution layer, adjustment layer, pooling layer, fully connected layer, and classification layer are connected in sequence.

4. The method according to claim 1, characterized in that: The process of obtaining a feature matrix through the convolution layer of the improved CNN and performing local characterization on the feature matrix includes: First, the input layer of the improved CNN is used to normalize the power quality disturbance signal. Then, the convolution layer convolves the power quality disturbance signal with the convolution kernel. When the convolution layer obtains the disturbance signal feature matrix, multiple disturbance signal sub-feature matrices are obtained according to the different convolution kernel weights set. At the same time, the same number of adjustment layer neurons as the characteristic matrix of the disturbance signal is set, the values ​​of the adjustment layer neurons are calculated and sorted, and the ordered values ​​of the adjustment layer are obtained. According to the change of the position of the adjustment layer neurons after the improved CNN sorting process, the characteristic matrix output by the convolutional layer is adjusted.

5. The method according to claim 1, characterized in that The process of extracting features of the power quality disturbance signal by using the pooling layer of the improved CNN and obtaining the features of the disturbance signal includes: The improved CNN pooling layer is used to reduce the spatial size of the features extracted from the convolutional layer, thereby achieving feature extraction of the power quality disturbance signal and obtaining the disturbance signal features.

6. The method according to claim 1, characterized in that The process of obtaining the initial classification and identification results of the power quality disturbance signal includes: The fully connected layer of the improved CNN is used to fit the characteristic quantities of the power quality disturbance, and the fitted features are input into the classification layer for classification. The classification layer outputs the probability of the power quality disturbance signal corresponding to the category, thereby realizing the classification of the power quality disturbance signal and obtaining the initial classification and recognition result of the power quality disturbance signal.

7. The method according to claim 1, characterized in that The process of optimizing the power quality disturbance classification model based on improved CNN using PSO algorithm includes: Randomly initialize particle parameters, set the value range of the parameters that need to be optimized for improving CNN, and use the value range as the range interval for updating particle speed and position. If the value range exceeds the value range, take the maximum and minimum values ​​of the interval; Update the position and speed of the particle, and use the loss function value obtained by training the improved CNN as the fitness value of PSO. If the fitness value is better than the individual optimal value and the global optimal value, update the individual optimal value and the global optimal value. If the training reaches the accuracy requirement or the number of iterations, the obtained parameters are used as the optimal structural parameters of the improved CNN, otherwise the individual optimal value and the global optimal value are continued to be updated.

8. The method according to claim 1, characterized in that The process of classifying and identifying the measured power quality disturbance data and obtaining the target classification and identification results includes: After optimizing and improving CNN parameters using the PSO algorithm, the power quality disturbance signal classification model based on the PSO-improved CNN is verified. The trained power quality disturbance classification model is verified by the test data set. The classification results of various types of power quality disturbances are obtained according to the output, and the power quality disturbance classification model is determined according to the classification results. Based on the power quality disturbance classification model, the power quality disturbance measured data is classified and identified to obtain a target classification and identification result.

9. A power quality disturbance classification and identification system, characterized in that: include: A data acquisition and processing module, used for acquiring a power quality disturbance signal, processing the power quality disturbance signal, and obtaining a two-dimensional disturbance signal; Model improvement module, used to add adjustment layers to the basic CNN structure hierarchy to obtain improved CNN; A feature extraction module, used to obtain a feature matrix through the convolution layer of the improved CNN, perform local characterization on the feature matrix, and use the pooling layer of the improved CNN to extract features of the power quality disturbance signal to obtain disturbance signal features; An initial classification module, used for fitting the disturbance signal features through the fully connected layer of the improved CNN, inputting the fitted features into the classification layer of the improved CNN for classification, and obtaining an initial classification and recognition result of the power quality disturbance signal; The target classification module is used to optimize the power quality disturbance classification model based on the improved CNN by using the PSO algorithm, classify and identify the measured power quality disturbance data, and obtain the target classification and identification results.