Power quality disturbance classification method based on Markov conversion field and particle swarm optimization

By using Markov transform field and particle swarm optimization, power quality disturbance signals are converted into two-dimensional images and classified using convolutional neural networks. This solves the problem of accurate classification of power quality disturbances in power systems, improving the safety, stability, and classification accuracy of the power grid.

CN118941854APending Publication Date: 2024-11-12NORTHEAST DIANLI UNIVERSITY

Patent Information

Application Number
CN202410985425.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

Existing technologies are unable to efficiently and accurately classify power quality disturbances in power systems, which increases the difficulty of ensuring the safe and stable operation of the power grid.

Method used

A Markov transformation field and particle swarm optimization method is used to convert one-dimensional time-series power quality disturbance signals into two-dimensional modal images. Convolutional neural networks are used for classification, and the model parameters are optimized by particle swarm optimization algorithm. The model performance is evaluated by combining indicators such as accuracy, precision, recall and F1-score.

Benefits of technology

It achieves high-accuracy classification of power quality disturbances, has strong noise resistance, can effectively identify multiple disturbance types, and improves the safety and stability of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941854A_ABST
    Figure CN118941854A_ABST
Patent Text Reader

Abstract

The invention discloses an electric energy quality disturbance classification method based on a Markov conversion field and particle swarm optimization, and belongs to the technical field of electric energy quality analysis in an electric power system.The electric energy quality disturbance classification method comprises the steps that firstly, an MTF is used for converting an electric energy quality disturbance signal of a one-dimensional time sequence into a two-dimensional modal image, and favorable conditions are created for subsequent data feature extraction; secondly, a CNN is used for constructing a power quality disturbance classification model with image modal data as input, parameters in the model are optimized through a PSO algorithm, the learning rate of the model is made to be optimal, and the phenomenon of under-fitting or over-fitting is avoided; and finally, obtaining a power quality disturbance classification result by using the classification model after parameter optimization, and evaluating the performance of the classification model by using an evaluation index. Simulation results show that the constructed classification model can well classify the power quality disturbance signals, and has higher classification accuracy and anti-noise capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of power quality analysis in power systems, and in particular relates to a power quality disturbance classification method based on Markov transition field and particle swarm optimization. Background Art

[0002] With the deepening of energy conservation and emission reduction, the proportion of renewable energy generation in new power systems is increasing, which brings about the PQDs (power quality disturbances, PQDs) problem that cannot be ignored, and increases the difficulty of ensuring the safe and stable operation of the power grid. At the same time, the access of a large number of power electronic equipment and large nonlinear loads makes the PQDs problem in new power systems more frequent. PQDs signals are mainly manifested as sudden or continuous changes in voltage and current waveforms, amplitudes, phase angles and frequencies, which make the originally ideal sine and cosine waveforms appear in various disturbance forms such as temporary sags, temporary rises, interruptions, etc., and are also accompanied by the coexistence of various disturbances such as temporary sags-flicker, temporary rises-harmonics, harmonics-flicker, etc. As the core indicator for measuring the performance of power systems, power quality plays a vital reference role in the regulation of power systems. Therefore, accurately classifying the types of PQDs is of great significance to ensuring the safe and stable operation of power systems. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a power quality disturbance classification method based on Markov switching field and particle swarm optimization, overcome the shortcomings of the existing technology, and establish a power quality disturbance classification method based on Markov switching field and particle swarm optimization that is scientific and reasonable, highly applicable, effective, and highly accurate.

[0004] The power quality disturbance classification method based on Markov switching field and particle swarm optimization includes the following steps:

[0005] Step 1: Use the Markov transition field MTF to visualize the data features, so that the one-dimensional time series power quality disturbance PQDs signal is converted into a two-dimensional modal image;

[0006] Step 2: Use the convolutional neural network (CNN) to build a PQDs classification model with image modality data as input, and optimize the parameters in the model through the particle swarm optimization algorithm (PSO) to obtain the optimal learning rate;

[0007] Step 3: Use the classification model with optimized parameters to obtain the PQDs classification results, and use evaluation indicators to evaluate the performance of the classification model.

[0008] The method of visualizing data features by the Markov transition field MTF is as follows: according to n time intervals, the power quality disturbance PQDs signal is divided into n sampling signals x i , represented by X={x1,x2,…,x n Markov transition field MTF is based on the amplitude characteristics of the signal, dividing the sampled signal into Z regions, each of which is marked as q i (i=1,2,…,Z); each sampling signal x i is mapped to region q i Calculate the adjacent time sampling signal x i-1 and x i From area q i Transition to region q j The probability w ij ; Establish a dynamic probability transfer matrix M across time scales,

[0009]

[0010] Where: M 1,2 It represents the transition probability of signal x1 transferring to signal x2, corresponding to q i to q j The main diagonal represents the self-transition probability, and the time interval is 0; the MTF image with dimension n×n is obtained; the element w of the matrix M ij The time interval is |ij|, which indicates the transition probability of two signals after the time interval |ij|;

[0011] If the power quality disturbance PQDs signal is divided into n sampling signals as a large data set, a fuzzy kernel of size m×m is introduced, in which each element value is 1 / m 2 ; Through the blur kernel, each non-overlapping pixel is averaged, and the dimension reduction and aggregation of the MTF image are performed to obtain a two-dimensional image with smaller dimension; the aggregated image is an aggregation of dynamic transition probabilities, which is used as the input data of PQDs.

[0012] 1. The power quality disturbance classification method based on Markov switching field and particle swarm optimization according to claim 1 is characterized in that: the PQDs classification model includes a convolution layer, a pooling layer, a fully connected layer and an output layer;

[0013] The convolution layer uses the convolution kernel to convolve the PQDs signal to extract the key features of the signal; the output result of the convolution layer is:

[0014]

[0015] In the formula: all represent in layer t, is the weight between the jth and lth neurons; is the bias of the lth neuron; is the lth neuron; f(·) represents the activation function in the convolutional layer;

[0016] The pooling layer is used to compress the spatial dimension of the features extracted by the convolutional layer, extract feature information, and adopt the maximum pooling strategy. The formula is:

[0017] The fully connected layer is used to fit the features extracted from the pooling layer, pass the original score of each disturbance type to the output layer, normalize it through the Softmax classifier, and output the probability that the disturbance signal belongs to a certain disturbance type. The formula is:

[0018] Where: p ij represents the probability that PQDs signal i belongs to disturbance type j; m represents the number of disturbance categories; b j and b k It represents the raw scores of the fully connected layer output PQDs signal belonging to types j and k.

[0019] The method for optimizing the parameters in the model by using the particle swarm optimization algorithm PSO is:

[0020] First, in the PSO algorithm, a group of particles are initialized, and the speed and position of the particles are continuously updated through iteration, and the optimal solution to the problem is obtained in the iterative process;

[0021] Y i (0) = Y max -α(Y max -Y min )

[0022] x i (0) = 0.1S + R

[0023] Where: Y max and Y min Respectively represent the maximum and minimum values ​​of particle velocity; Y i (0) represents the initialization speed of particle i; x i (0) represents the initial position of particle i; S represents a random number in the interval (-1, 1); α represents a random number in the interval (0, 1);

[0024] The particle continuously iterates and updates the expression of position and velocity:

[0025] x i (t+1)=x i (t)+Y i (t+1)

[0026] Yi (t+1)=wY i (t)+h1R1(P i -x i (t))+h2R2(P l -x i (t))

[0027] Where: x i (t), Y i (t) are the starting position and velocity of particle i at the tth iteration; w is the inertia factor; h1 and h2 are the acceleration factors; R1 and R2 are random numbers between (0, 1).

[0028] The evaluation indicators include accuracy ACC, precision PRE, recall REC and F1-score;

[0029] The accuracy rate ACC reflects the proportion of samples correctly classified by the classification model to the total samples, and evaluates the overall performance of the model. The accuracy rate formula is:

[0030]

[0031] In the formula, TP is a true positive example, which indicates a sample that is correctly judged as a disturbance event; TN is a true negative example, which indicates a sample that is correctly judged as not disturbed; FP is a false positive example, which indicates a sample that is incorrectly judged as a disturbance event; FN is a false negative example, which indicates a sample that is incorrectly judged as not disturbed.

[0032] The precision rate PRE reflects the proportion of samples predicted as positive disturbance events that are actually positive, and evaluates the accuracy of the model's prediction of positive samples. The formula is:

[0033] The recall rate REC is used to quantify the proportion of positive samples correctly predicted by the model to all actual positive samples, and evaluate the ability of the model to capture positive samples. The formula is:

[0034] The F1-score is the harmonic mean of precision and recall, which combines precision and recall to evaluate the accuracy and robustness of the model. The formula is:

[0035] Through the above-mentioned design scheme, the present invention can bring the following beneficial effects: Based on the power quality disturbance classification method of Markov transition field and particle swarm optimization, first, the one-dimensional time series power quality disturbance signal is converted into a two-dimensional modal image using MTF, creating favorable conditions for subsequent data feature extraction; secondly, CNN is used to construct a power quality disturbance classification model with image modal data as input, and the parameters in the model are optimized through the PSO algorithm to optimize its learning rate to avoid underfitting or overfitting. Finally, the classification model after optimizing the parameters is used to obtain the power quality disturbance classification result, and the performance of the classification model is evaluated using the evaluation index. The simulation results show that the constructed classification model can classify the power quality disturbance signal well, and has higher classification accuracy and noise resistance. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The present invention is further described below with reference to the accompanying drawings and specific embodiments:

[0037] Figure 1 It is a schematic diagram of the principle of the power quality disturbance classification method based on Markov switching field and particle swarm optimization of the present invention.

[0038] Figure 2 It is a flow chart of the power quality disturbance classification method based on Markov switching field and particle swarm optimization of the present invention.

[0039] Figure 3 This is a single and compound disturbance signal waveform diagram of a specific implementation method of the power quality disturbance classification method based on Markov switching field and particle swarm optimization of the present invention.

[0040] Figure 4 This is a specific implementation method of the power quality disturbance classification method based on Markov switching field and particle swarm optimization of the present invention, and a Markov switching field image type diagram.

[0041] Figure 5 It is the classification accuracy curve of 0dB, 20dB and 30dB of the specific implementation method of the power quality disturbance classification method based on Markov switching field and particle swarm optimization of the present invention.

[0042] Figure 6 It is a specific implementation method of the power quality disturbance classification method based on Markov switching field and particle swarm optimization of the present invention, and the classification loss rate curves of 0dB, 20dB and 30dB.

[0043] Figure 7 It is the confusion matrix of the MTF-PSO-CNN disturbance classification model in the specific implementation method of the power quality disturbance classification method based on Markov switching field and particle swarm optimization of the present invention.

[0044] Figure 8This is a comparison chart of the accuracy of MTF-PSO-CNN and CNN in the specific implementation method of the power quality disturbance classification method based on Markov switching field and particle swarm optimization of the present invention. DETAILED DESCRIPTION

[0045] The technical solution adopted to implement the power quality disturbance classification method based on Markov switching field and particle swarm optimization of the present invention is as follows: Figure 1 and Figure 2 As shown in the figure, the MTF visualization data features are used to build the PQDs classification model, and the disturbance classification model parameters and disturbance classification model evaluation indicators are optimized based on the PSO algorithm. The specific contents are as follows:

[0046] 1) Using MTF to visualize data features

[0047] According to n time intervals, the PQDs signal is divided into n sampling signals x i , which is expressed in the form of X={x1,x2,…,x n MTF divides the signal into Z different regions based on its amplitude characteristics, and each region is marked as q i (i=1,2,…,Z). There are three types of partitioning strategies: uniform partitioning, normal partitioning, and quantile partitioning. Uniform partitioning keeps the amplitude of each region the same; normal partitioning is based on the normal distribution characteristics of the number of sampling points in the region; quantile partitioning ensures that the number of sampling points in each region is the same.

[0048] Each sampled signal x i Will be mapped to region q i Calculate the adjacent time sampling signal x i-1 and x i From area q i Transition to region q j The probability of ij , the Markov state transfer matrix W is shown in formula (1):

[0049]

[0050] From formula (1), we can see that W is mainly for the probability between regions, with a dimension of Z×Z, and for the signal x before and after i-1 and x i The transfer probability on Z regions is calculated, but the importance of dynamic probability transfer in time series data is ignored. To address this shortcoming, the matrix W is improved and the dynamic probability transfer matrix M across time scales is calculated, as shown in formula (2):

[0051]

[0052] Where: M 1,2represents the transition probability of signal x1 transferring to signal x2, corresponding to q on W i to q j The main diagonal represents the self-transition probability, and the time interval is 0; thus, the MTF image with dimension n×n is obtained from the dimension Z×Z. The element w of the matrix M is ij The time interval is |ij|, which represents the transition probability of two signals after the time interval |ij|.

[0053] When facing a large data set, directly using MTF to generate images often results in an image size that is too large, which not only increases the burden on computer storage, but also affects the efficiency of fast calculation and analysis. Therefore, a blur kernel of size m×m is introduced, in which each element value is 1 / m 2 Through this blur kernel, each non-overlapping pixel is averaged, thereby achieving dimensionality reduction and aggregation of the MTF image, and obtaining a two-dimensional image with a smaller dimension. The aggregated image is an aggregation of dynamic transition probabilities, which is used as the input data of PQDs.

[0054] 2) Constructing PQDs classification model

[0055] The structure of the perturbation classification model mainly includes convolution layer, pooling layer, fully connected layer and output layer, and it shows excellent recognition and classification characteristics for two-dimensional image data. The PQDs signal is processed by stacking multiple chain convolution kernels, and the convolution kernels all have nonlinear activation functions, which can capture the complex features in the PQDs signal. After fitting the features through the fully connected layer, it is passed to the output layer, and the Softmax classifier is used to obtain the probability distribution of each sample belonging to each category.

[0056] The convolution layer uses the convolution kernel to convolve the PQDs signal to extract the key features of the signal. The output of the convolution layer is shown in formula (3):

[0057]

[0058] In the formula: all represent in layer t, is the weight between the jth and lth neurons; is the bias of the lth neuron; is the lth neuron; f(·) represents the activation function in the convolutional layer.

[0059] The role of the pooling layer in the model is to compress the spatial dimension of the features extracted by the convolution layer and retain the most representative feature information. There are two ways to reduce the dimension, namely average pooling and maximum pooling. Considering that the PQDs signal is easily affected by noise, the present invention prefers to use maximum pooling as the pooling strategy, as shown in formula (4):

[0060]

[0061] The main function of the fully connected layer is to fit the features extracted from the pooling layer, pass the original score of each disturbance type to the output layer, normalize it through the Softmax classifier, and output the probability that the disturbance signal belongs to a certain disturbance type, as shown in formula (5):

[0062]

[0063] Where: p ij represents the probability that PQDs signal i belongs to disturbance type j; m represents the number of disturbance categories; b j and b k It represents the raw scores of the fully connected layer output PQDs signal belonging to types j and k.

[0064] In the perturbation classification model, the gradient descent method is often used to reduce the loss function value, where the loss function adopts the cross entropy function, and the loss value is shown in formula (6):

[0065]

[0066] Where: y ij The meaning is: when the disturbance signal i belongs to the disturbance category j, y ij =1; otherwise y ij = 0. The loss value indicates the deviation between the predicted value and the actual value in the classification result. The smaller the loss value, the higher the accuracy of the classification model.

[0067] 3) Optimize disturbance classification model parameters based on PSO algorithm

[0068] The PSO algorithm originated from the study of bird flock predation behavior. It uses a massless particle to imitate birds. First, it identifies the individual optimal value of the entire particle group and uses it as the current global optimal value. Then, it uses the individual optimal value and the global optimal value to continuously update and adjust the speed and position of the particle to achieve the optimization goal.

[0069] The disturbance classification model proposed in this paper can effectively extract PQDs signal features and classify them, but the setting of the learning rate depends on human experience, which may lead to overfitting or underfitting problems. Therefore, it is very important to find an optimization method that converges quickly and has significant effects. Considering the advantages of the PSO algorithm in computing speed and efficiency, the PSO algorithm is used to optimize the disturbance classification model, and the loss function of the model is used as the fitness evaluation function of the PSO algorithm.

[17] In order to further improve the classification performance of the model, the steps of optimizing the model parameters using the PSO algorithm are as follows:

[0070] First, in the PSO algorithm, a group of particles are initialized, and the speed and position of the particles are continuously updated through iteration, and the optimal solution of the problem is gradually found in the iterative process. As shown in formula (7) (8):

[0071] Y i (0) = Y max -α(Y max -Y min ) (7)

[0072] x i (0) = 0.1S + R (8)

[0073] Where: Y max and Y min Respectively represent the maximum and minimum values ​​of particle velocity; Y i (0) represents the initialization speed of particle i; x i (0) represents the initial position of particle i; S represents a random number in the interval (-1, 1); α represents a random number in the interval (0, 1). The expressions for the particle's position and velocity are continuously updated in iterations as shown in formulas (9) and (10):

[0074] x i (t+1)=x i (t)+Y i (t+1) (9)

[0075] Y i (t+1)=wY i (t)+h1R1(P i -x i (t))+h2R2(P l -x i (t)) (10)

[0076] Where: x i (t), Y i (t) are the starting position and velocity of particle i at the tth iteration; w is the inertia factor; h1 and h2 are the acceleration factors; R1 and R2 are random numbers between (0, 1).

[0077] 4) Evaluation indicators of disturbance classification model

[0078] After the classification model completes the classification of the PQDs signal, the accuracy, recall, precision and F1-score evaluation indicators can be calculated by using the confusion matrix, and the classification results of the model on each disturbance type can be clearly displayed. In the evaluation indicators: True Positives (TP) indicates samples that are correctly judged as disturbance events; True Negatives (TN) indicates samples that are correctly judged as no disturbance; False Positives (FP) indicates samples that are incorrectly judged as disturbances; and False Negatives (FN) indicates samples that are incorrectly judged as no disturbances. The present invention uses accuracy (ACC), precision (PRE), recall (REC) and F1-score as evaluation indicators for PQDs classification. The definitions of each indicator are as follows:

[0079] The accuracy reflects the proportion of samples correctly classified by the classification model to the total samples. It is an intuitive indicator for evaluating the overall performance of the model. The accuracy is shown in formula (11):

[0080]

[0081] The precision measures the proportion of samples predicted to be positive (disturbance events) that are actually positive. It focuses on the accuracy of the model's prediction of positive samples, as shown in formula (12):

[0082]

[0083] The recall rate quantifies the proportion of positive samples correctly predicted by the model to all actual positive samples, reflecting the ability of the model to capture positive samples, as shown in formula (13):

[0084]

[0085] F1-score is the harmonic mean of precision and recall. It takes precision and recall into account and is an important indicator for measuring the accuracy and robustness of the model, as shown in formula (14):

[0086]

[0087] By calculating and analyzing these performance indicators, we can have a comprehensive understanding of the performance of the model and make targeted optimizations and improvements to achieve higher performance levels.

[0088] A specific implementation is as follows:

[0089] 1) Simulation data and model settings

[0090] The mathematical model of the PQDs signal is constructed based on the IEEE Std 1159-2019 standard. The details are shown in Table 1. The present invention sets the basic frequency signal to 50 Hz and generates 11 different PQDs signals. The 7 single disturbance signals are (S1) transient oscillation, (S2) transient pulse, (S3) harmonic, (S4) voltage interruption, (S5) voltage swell, (S6) voltage sag and (S7) voltage flicker. It also includes 4 composite disturbances, namely (S8) harmonic-swell, (S9) harmonic-sag, (S10) harmonic-voltage flicker and (S11) harmonic-voltage interruption.

[0091] Table 1 Power quality disturbance signal model

[0092]

[0093]

[0094] The meanings of the expression variables of the eight power quality disturbance signals in Table 1 are as follows:

[0095] In S0, ω0 represents the angular frequency, and its expression is ω0=2πf0, where f0 is the rated frequency; in S1, τ represents the attenuation coefficient, and its value is 10≤τ≤20; ε represents the unit step function; t1 and t2 represent the start time and end time of the transient oscillation, respectively, and the duration of the transient oscillation is 0.5T≤t2-t1≤3T. Set the start time of the transient oscillation to 0.06s, the end time to 0.1s, the oscillation amplitude ε=0.5, and the attenuation coefficient τ=15; in S3, k i Indicates the amplitude of the harmonic, its value is 0.05≤k i ≤0.3, i=3, 5, 7…. Set the signal to contain 3rd, 5th, and 7th harmonics, and their amplitudes are k3=k5=k7=0.15; ε in S2, S4, S5, and S6 represents the unit step function; α represents the action amplitude of the power quality disturbance; its value is 0.1≤α≤0.9; t1, t2 represent the start time and end time of the action respectively, and the duration is T≤t2-t1≤9T; b in S7 represents the frequency of voltage flicker, and its value is 0.1≤b≤0.5; α represents the amplitude of voltage flicker, and its value is 0.1≤α≤0.2. Set the parameters in voltage flicker to α=0.15, b=0.4.

[0096] When constructing the data set, 1000 samples were generated for each type of disturbance, 8800 samples were randomly selected to form the training set, and 2200 samples were used as the test set. The waveform amplitudes of all samples were standardized and converted to per-unit values ​​based on 220kV for easy subsequent analysis and processing. Figure 3In order to enhance the authenticity and generalization ability of the data, Gaussian white noise with a signal-to-noise ratio of 20dB and 30dB was added to the original signal to simulate the noise interference that may exist in the actual environment, so that the generated signal waveform is closer to the actual situation.

[0097] In the process of extracting data features from PQDs, in order to optimize classification efficiency and reduce storage pressure, the input data in the embodiment of the present invention is an MTF image with a size of 64×64×1. In terms of the partitioning strategy, a uniform partitioning method is adopted, and the partitioning area value is set to 4. The MTF image is as follows Figure 4 shown.

[0098] The perturbation classification model contains a network structure with four convolutional layers. Among them, the size of the convolution kernel is set to two different sizes, 3×3 and 5×5, to adapt to feature extraction of different scales. The number of digital filters corresponding to each convolution layer is 32 and 64, respectively, to gradually enhance the representation ability of the features. Relu is selected as the activation function, which can speed up the training speed and prevent the gradient from disappearing. The same strategy is adopted for image padding to ensure that the size of the feature map remains unchanged after the convolution operation. The kernel of the maximum pooling layer is set to 2×2 in the pooling layer package, and 3 filters are set, which helps to extract the most representative features and reduce the computational complexity. The batch normalization layer is introduced to normalize the extracted features in order to effectively prevent overfitting and underfitting and improve the generalization ability of the model. At the same time, the probability parameter of the exit layer is set to 0.5 to enhance the robustness of the model. During the training process, the setting of the learning rate is crucial. Too large a learning rate may cause the perturbation classification model to overfit, while too small a learning rate will slow down the learning speed or cause underfitting, so a suitable learning rate is crucial to reducing the loss function and increasing the convergence speed. Therefore, the present invention uses the PSO algorithm to optimize the learning rate of the disturbance classification model in order to find the optimal value of the learning rate. During the optimization process, the upper limit of the learning rate is set to 0.01 and the lower limit is set to 0.0001, and the fitness evaluation index of the PSO algorithm is set to the loss function value to ensure the accuracy and effectiveness of the optimization process. To ensure that the model achieves the best training effect.

[0099] 2) Model verification and evaluation

[0100] In the model training stage, the number of iterations is set to 100 to fully train the model. In order to comprehensively evaluate the performance of the classification model, the accuracy and loss rate of the model are compared and analyzed in depth. When the accuracy of the model shows an upward trend and the loss rate gradually decreases, it means that the classification performance of the classification model is constantly improving. Therefore, the improvement of accuracy and the reduction of loss rate together constitute important indicators for evaluating the performance of the classification model. The present invention uses the PSO algorithm to optimize the learning rate of the perturbation classification model. When the number of iterations or the fitness value is less than the loss rate, the optimization is stopped. At this time, the learning rate is 0.0008, and the classification accuracy of the classification model reaches the highest.

[0101] Gaussian white noise with a signal-to-noise ratio of 20 dB and 30 dB was added to the PQDs signal to simulate a real disturbance environment, verify whether the method of the present invention has a higher classification accuracy and a lower loss rate for noisy signals, and verify whether the MTF-PSO-CNN has noise resistance after processing the signal features through MTF.

[0102] Figure 5 It is the classification accuracy curve when no noise, Gaussian white noise with a noise ratio of 20dB and 30dB are added to the disturbance signal respectively. Figure 6 is the classification loss rate curve of adding no noise, Gaussian white noise with a noise ratio of 20dB and 30dB to the disturbance signal. Figure 5 and Figure 6 Analysis shows that in the early stage of training the PDQs classification model, the accuracy of the training set is at a low level. With the increase in the number of iterations, it gradually stabilizes at a higher accuracy level. At the same time, after training, the accuracy of the test set also reaches a higher level; the loss function curve drops rapidly from a higher loss rate at the beginning of the iteration. With the continuous increase in the number of iterations, the loss rate decreases less and less and reaches a lower loss rate level, and finally reaches a loss rate level approaching 0. During the entire training process, no overfitting or underfitting phenomenon was observed. Through comparative analysis, the model performs well in the classification task of power quality disturbance signals, and also has a higher classification accuracy and a lower loss rate for disturbance signals containing Gaussian white noise with a noise ratio of 20dB and 30dB, which verifies that the method of the present invention has a good classification effect on noisy PQDs, and the model has a certain noise resistance.

[0103] The evaluation index is used to analyze the classification results and the confusion matrix is ​​obtained as follows: Figure 7The corresponding indicators PRE, REC and F1-score are shown in Table 2. By observing the confusion matrix and analyzing the three evaluation indicators, it can be seen that the model performs well in the classification process, can accurately distinguish different types of disturbances, and has a strong ability to classify positive examples, which proves that the classification model of the present invention has a high classification accuracy.

[0104]

[0105] Figure 8 This is a comparison chart of the PQDs classification accuracy based on MTF-PSO-CNN and CNN disturbance classification models. From the analysis of the figure, it can be seen that compared with the traditional CNN model, the method of the present invention shows a higher accuracy in the classification of power quality disturbances, especially in the four disturbance types of S2, S5, S9 and S10, the accuracy of MTF-PSO-CNN has been significantly improved. In summary, MTF-PSO-CNN shows a good classification effect in the classification of PQDs. Regardless of the type of PQDs, the classification accuracy has reached a high level. At the same time, when there is noise in the disturbance signal, the model also has a high accuracy, indicating that the method has good noise resistance.

[0106] The specific embodiments used in the present invention have been used to fully illustrate the contents of the present invention, but are not limited to the present embodiments. Any obvious changes made by those skilled in the art based on the teachings of the present invention are within the scope of protection of the present invention.

Claims

1. Power quality disturbance classification method based on Markov switching field and particle swarm optimization, Its characteristics are: The following steps are included: Step 1: Use the Markov transition field MTF to visualize the data features, so that the one-dimensional time series power quality disturbance PQDs signal is converted into a two-dimensional modal image; Step 2: Use the convolutional neural network (CNN) to build a PQDs classification model with image modality data as input, and optimize the parameters in the model through the particle swarm optimization algorithm (PSO) to obtain the optimal learning rate; Step 3: Use the classification model with optimized parameters to obtain the PQDs classification results, and use evaluation indicators to evaluate the performance of the classification model.

2. According to claim 1, the power quality disturbance classification method based on Markov switching field and particle swarm optimization, Its characteristics are: The method of visualizing data features by the Markov transition field MTF is as follows: according to n time intervals, the power quality disturbance PQDs signal is divided into n sampling signals x i , expressed as X = {x 1 ,x 2 ,…,x n Markov transition field MTF is based on the amplitude characteristics of the signal, dividing the sampled signal into Z regions, each of which is marked as q i (i=1,2,…,Z); each sampling signal x i is mapped to region q i Calculate the adjacent time sampling signal x i-1 and x i From area q i Transition to region q j The probability w ij ; Establish a dynamic probability transfer matrix M across time scales, Where: M 1,2 Represents signal x 1 Transfer to signal x 2 The transition probability, corresponding to q i to q j The main diagonal represents the self-transition probability, and the time interval is 0; the MTF image with dimension n×n is obtained; the element w of the matrix M ij The time interval is |ij|, which indicates the transition probability of two signals after the time interval |ij|; If the power quality disturbance PQDs signal is divided into n sampling signals as a large data set, a fuzzy kernel of size m×m is introduced, in which each element value is 1 / m 2 ; Through the blur kernel, each non-overlapping pixel is averaged, and the dimension reduction and aggregation of the MTF image are performed to obtain a two-dimensional image with smaller dimension; the aggregated image is an aggregation of dynamic transition probabilities, which is used as the input data of PQDs.

3. The power quality disturbance classification method based on Markov switching field and particle swarm optimization according to claim 1, Its characteristics are: The PQDs classification model includes a convolution layer, a pooling layer, a fully connected layer and an output layer; The convolution layer uses the convolution kernel to convolve the PQDs signal to extract the key features of the signal; the output result of the convolution layer is: In the formula: all represent in layer t, is the weight between the jth and lth neurons; b t l is the bias of the lth neuron; x t l is the lth neuron; f(·) represents the activation function in the convolutional layer; The pooling layer is used to compress the spatial dimension of the features extracted by the convolutional layer, extract feature information, and adopt the maximum pooling strategy. The formula is: The fully connected layer is used to fit the features extracted from the pooling layer, pass the original score of each disturbance type to the output layer, normalize it through the Softmax classifier, and output the probability that the disturbance signal belongs to a certain disturbance type. The formula is: Where: p ij represents the probability that PQDs signal i belongs to disturbance type j; m represents the number of disturbance categories; b j and b k It represents the raw scores of the fully connected layer output PQDs signal belonging to types j and k.

4. The power quality disturbance classification method based on Markov switching field and particle swarm optimization according to claim 1, Its characteristics are: The method for optimizing the parameters in the model by using the particle swarm optimization algorithm PSO is: First, in the PSO algorithm, a group of particles are initialized, and the speed and position of the particles are continuously updated through iteration, and the optimal solution to the problem is obtained in the iterative process; AND i (0)=Y max -α(Y max -AND min ) x i (0)=0.1S+R Where: Y max and Y min Respectively represent the maximum and minimum values ​​of particle velocity; Y i (0) represents the initialization speed of particle i; x i (0) represents the initial position of particle i; S represents a random number in the interval (-1, 1); α represents a random number in the interval (0, 1); The particle continuously iterates and updates the expression of position and velocity: x i (t+1)=x i (t)+Y i (t+1) Y i (t+1)=wY i (t)+h 1 R 1 (P i -x i (t))+h 2 R 2 (P l -x i (t)) Where: x i (t), Y i (t) are the starting position and velocity of particle i at the tth iteration; w is the inertia factor; h 1 、h 2 is the acceleration factor; R 1 and R 2 is a random number between (0, 1).

5. The power quality disturbance classification method based on Markov switching field and particle swarm optimization according to claim 1, Its characteristics are: The evaluation indicators include accuracy ACC, precision PRE, recall REC and F1-score; The accuracy rate ACC reflects the proportion of samples correctly classified by the classification model to the total samples, and evaluates the overall performance of the model. The accuracy rate formula is: In the formula, TP is a true positive example, which indicates a sample that is correctly judged as a disturbance event; TN is a true negative example, which indicates a sample that is correctly judged as not disturbed; FP is a false positive example, which indicates a sample that is incorrectly judged as a disturbance event; FN is a false negative example, which indicates a sample that is incorrectly judged as not disturbed. The precision rate PRE reflects the proportion of samples predicted as positive disturbance events that are actually positive, and evaluates the accuracy of the model's prediction of positive samples. The formula is: The recall rate REC is used to quantify the proportion of positive samples correctly predicted by the model to all actual positive samples, and evaluate the ability of the model to capture positive samples. The formula is: The F1-score is the harmonic mean of precision and recall, which combines precision and recall to evaluate the accuracy and robustness of the model. The formula is:

Citation Information

Patent Citations

  • Stainless steel weld defect detection method based on multi-domain expression data enhancement and model self-optimization

    CN113129266A

  • Rolling bearing fault intelligent diagnosis method

    CN115290326A

Cited By

  • Power quality disturbance classification method based on multi-channel separable convolution

    CN119884930A

  • A power quality disturbance classification method based on multi-channel separable convolution

    CN119884930B