A hybrid power quality disturbance classification method based on multi-source feature selection
By using multi-source feature selection and an improved particle swarm optimization algorithm to optimize the support vector machine, the problem of difficulty in identifying power quality disturbance types in complex power grids was solved, and comprehensive and accurate classification and identification of power quality disturbance signals were achieved.
Patent Information
- Application Number
- CN202310011458.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-05
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2043-01-05
AI Technical Summary
Existing technologies are insufficient to fully reflect the types of power quality disturbances in complex power grids. The amount of feature extraction is insufficient and the computational complexity of the classifier is high, resulting in low accuracy in identifying power quality disturbances.
A multi-source feature selection method is adopted, combined with nearest neighbor component analysis and an improved particle swarm optimization algorithm to optimize the support vector machine. Through time-domain data processing and feature labeling, a hybrid power quality disturbance classification method with multiple feature selections is used. The hybrid power quality disturbance signal feature is extracted through time-domain data processing and feature selection, and the support vector machine is optimized by combining nearest neighbor component analysis and an improved particle swarm optimization algorithm to perform feature selection and classification.
It achieves comprehensive and accurate classification of power quality disturbance signals, improves the recognition accuracy and reduces the data computation complexity, thus meeting the practical application needs of engineering.
Smart Images

Figure CN115879035B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of power quality analysis and detection methods, and particularly relates to a hybrid power quality disturbance classification method based on multi-source feature selection. BACKGROUND
[0002] With the continuous development of electric power energy, the power grid structure and load composition are complex and changeable, and more and more nonlinear, impact and unbalanced loads are connected to the power grid, causing various power quality disturbance problems such as voltage fluctuation, harmonics, three-phase voltage imbalance and the like of the power grid, so it is necessary to carry out in-depth monitoring and analysis on power quality. At present, the power quality disturbance signal has been from the traditional single disturbance to the composite disturbance, the disturbance types are more and the signal is more complex, and the research on the classification of power quality signals puts forward higher requirements.
[0003] The traditional power quality disturbance identification process includes two links of feature extraction and pattern recognition. Among them, the feature extraction is to transform and reconstruct the original waveform, and to extract effective classification features therefrom, and the commonly used methods include Fourier transform, wavelet transform, S transform and the like; the pattern recognition step is used to determine the disturbance category to which the disturbance signal sample belongs, and the main methods include neural network, support vector machine, decision tree and the like.
[0004] The invention with the publication number CN107832777B discloses a power quality disturbance identification method using time domain compression multi-resolution fast S transform feature extraction. The invention uses fast S transform to calculate the windowed Fourier transform inverse transform result of each main frequency point to retain the required information, extracts four types of features to form a feature vector for classifier identification. The invention has certain anti-noise performance, but the feature extraction amount is too small, and the S transform is mainly concentrated on the detection of steady-state disturbance, and it is difficult to fully represent the power quality disturbance type in the face of modern complex power system quality analysis.
[0005] The invention with the publication number CN109271975B discloses a power quality disturbance identification method based on big data multi-feature extraction collaborative classification. The invention uses improved generalized S transform, generalized harmonic wavelet, EEMD / LMD and the like to fuse and extract power quality signal features, then uses a compressed sensing classifier, an epsilon machine complex system identification classifier and a neural network classifier to classify the feature vectors, and finally uses an improved decision template method to complete the decision. Although the training information is fully used, the types of classifiers are various, the data operation complexity is large, and the result is not strong in interpretability.
[0006] Due to the limited information contained in the single source feature, there are many ambiguities and uncertainties, and the ability to describe the research target is limited, and it is difficult to fully reflect the power grid operation state. With the rapid development of various monitoring technologies and information processing means and other related fields, the amount of data available is also increasing. Therefore, how to ensure the identification ability of high-dimensional features while avoiding the occurrence of data dimension disaster is a problem that needs to be solved at present. SUMMARY
[0007] The present application is to solve the above-mentioned deficiencies in the prior art, and proposes a hybrid power quality disturbance classification method based on multi-source feature selection, so as to comprehensively utilize the advantages of various feature extraction methods, solve the problems of large data sample size and unobvious feature expression, accurately identify various power quality disturbance signals, and improve the power quality disturbance identification accuracy.
[0008] To achieve the above-mentioned purpose, the technical scheme adopted by the present application is:
[0009] The hybrid power quality disturbance classification method based on multi-source feature selection has the characteristics that it comprises the following steps:
[0010] Step one, collecting power quality disturbance signals of power quality monitoring points in the power grid, so as to obtain n disturbance signal samples of different disturbance categories;
[0011] Step two, extracting the features of the disturbance signal samples, and normalizing the features and adding category labels, so as to obtain n feature samples of the power quality disturbance signals with labels {(x i ,y i )|i=1,2,…,n},wherein x i ∈R D represents the i-th feature sample, and x i =[x i1 ,x i2 ,…,x ir ,…,x iD ],x ir represents the r-th feature quantity in the i-th feature sample x i , D represents the dimension of the feature sample, y i represents the category label of x i , and y i ∈{1,2,…,c},c is the number of category labels;Let the feature set matrix be
[0012] Step three, multi-source feature selection, and obtain the key feature matrix F m :
[0013] Step 3.1, calculate the feature set matrix Fs The i-th feature sample x i and the j-th feature sample x j distance d w (x i ,x j );
[0014]
[0015] In equation (1), w r x represents the feature weight of the r-th feature; jr Let x represent the j-th feature sample respectively. j The r-th feature;
[0016] Step 3.2: Calculate the i-th feature sample x using equation (2). i The nearest neighbor distribution;
[0017]
[0018] In equation (2), p ij Represents the i-th feature sample x i Randomly select the j-th feature sample x j After becoming neighbors, x i Inheritance x j The tag y j The probability of;
[0019] Step 3.3: Construct the objective function F(w) containing the regularization term using equation (3);
[0020]
[0021] In equation (3), λ is the regularization parameter; y ij Indicates label y i Is it related to the tag y? j The same, when y i =y j At that time, let y ij Set y to 1; otherwise, set y to 1. ij =0; w is the feature weight vector;
[0022] Step 3.4: Use equation (4) to solve for the feature weight vector corresponding to the maximum objective function F(w).
[0023]
[0024] Step 3.5: Convert the feature set matrix F s The features of class D are sorted in descending order of feature weight, and the top M features are selected to form the key feature matrix. Where, q i∈ R M represents the ith key feature sample, M < D;
[0025] Step four, using improved particle swarm optimization support vector machine model;
[0026] Step 4.1, select the input parameters of support vector machine penalty parameter and kernel function parameter as optimization object, and initialize the particle swarm algorithm in each parameter, including: the total number of particles P, iteration k = 1, the maximum iteration K;
[0027] Step 4.2, the kth generation of particle swarm is generated, and the penalty parameter and the kernel function parameter are used as two variables of each particle, so as to obtain the current position of the dth variable of the pth particle in the kth generation of particle swarm And the current speed Wherein, 1≤k≤K, 1≤p≤P, 1≤d≤L; L represents the total number of variables, and L = 2;
[0028] Step 4.3, the fitness of each particle in the kth generation of particle swarm is calculated, so as to obtain the local optimal particle of each particle in the kth generation of particle swarm, and the particle corresponding to the maximum fitness value is selected as the global optimal particle of the kth generation;
[0029] Step 4.4, the velocity of the pth particle in the k+1th generation of particle swarm is calculated by formula (5)
[0030]
[0031] In formula (5), is the local optimal particle of the dth variable of the pth particle in the kth generation of particle swarm, is the global optimal particle of the dth variable in the kth generation of particle swarm; c1 and c2 are learning factors; r1 and r2 are random numbers distributed in the interval [0, 1]; ω(k) is the dynamic inertia weight of the kth generation, and is obtained by formula (6);
[0032]
[0033] In formula (6), U(0, 1) is a random number uniformly distributed between 0 and 1, ω max represents the maximum value of dynamic inertia weight; ω min represents the minimum value of dynamic inertia weight;
[0034] Step 4.5, the fitness of P particles in the k+1 generation particle group is calculated, and the fitness is compared with that of the k generation, the particle corresponding to the larger fitness value is taken as the local optimal particle of the P particles in the k+1 generation particle group, and the optimal particle corresponding to the maximum fitness value is selected from the k+1 generation particle group as the global optimal particle of the k+1 generation particle group;
[0035] Step 4.6, after k+1 is assigned to k, return to step 4.4 for sequential execution until k>K, so that the global optimal particle of the K generation particle group is obtained, and the K generation global optimal particle is taken as the optimal penalty parameter and the optimal kernel function parameter of the support vector machine;
[0036] Step 4.7, the key feature matrix F m is input into the support vector machine containing the optimal penalty parameter and the optimal kernel function parameter for training, so that the optimal support vector machine model is obtained;
[0037] Step five, the optimal support vector machine model is used for classifying the to-be-tested power quality disturbance signal, and the category label of the to-be-tested power quality disturbance signal is output.
[0038] The electronic device comprises a memory and a processor, and the memory is used for storing a program supporting the processor to execute the hybrid power quality disturbance classification method based on multi-source feature selection, and the processor is configured to execute the program stored in the memory.
[0039] The computer readable storage medium stores a computer program, and the computer program is executed by the processor to execute the steps of the hybrid power quality disturbance classification method based on multi-source feature selection.
[0040] Compared with the prior art, the beneficial effects of the present application are reflected in:
[0041] 1. The present application uses time domain extraction, Fourier transform, short-time Fourier transform, wavelet transform and S transform and other multi-source methods for hybrid power quality disturbance signal feature extraction, and the extracted features are more comprehensive and accurate.
[0042] 2. The present application introduces a new dynamic inertia weight and global neighborhood search, which prevents the algorithm from falling into local optimum, balances the global and local optimization performance of the algorithm, improves the support vector machine classification performance, and accurately identifies the power quality disturbance problem while ensuring rapidity, and meets the application requirements of automatic classification of power quality disturbance signals in engineering practice. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 is a schematic diagram of the overall process of the present application;
[0044] Figure 2 is an example diagram of the feature weight calculation result of the present application;
[0045] Figure 3 is a graph of the relationship between the dynamic inertia weight and the number of iterations in the improved particle swarm algorithm of the present application;
[0046] Figure 4 is an example diagram of the hybrid power quality disturbance classification test result based on multi-source feature selection of the present application. DETAILED DESCRIPTION
[0047] In this embodiment, a hybrid power quality disturbance classification method based on multi-source feature selection, as shown in Figure 1 includes the following steps:
[0048] Step one, collect the power quality disturbance signals of the power quality monitoring points in the power grid, including one or more composite disturbance types such as temporary rise, temporary drop, harmonic, interruption, flicker, transient pulse, transient oscillation, etc., thereby obtaining disturbance signal samples of n different disturbance categories;
[0049] In this embodiment, Matlab simulation model is used to generate 8 different disturbance categories of power quality disturbance signals, 400 groups of signals for each type, of which 120 groups of signals are used for the test set, a total of 3200 original samples, the signal sampling frequency is 6.4kHz, the sampling time is 0.4s, and the fundamental frequency is 50Hz.
[0050] Step two, the features of the mixed power quality disturbance signal are extracted by using time domain, Fourier transform, short-time Fourier transform, wavelet transform and S transform, etc., including the average value, peak-to-peak value, waveform factor and pulse factor of the power quality disturbance signal obtained in step one; the power quality disturbance signal in step one is processed by using fast Fourier transform (FFT) to obtain FFT amplitude spectrum A(f), and then the main two frequencies and their amplitudes, barycenter frequency, mean square frequency, frequency variance and standard deviation are directly extracted from A(f); the power quality disturbance signal in step one is processed by using short-time Fourier transform to obtain STFT transform amplitude matrix, and the maximum and minimum values of the fundamental frequency, the wave peak of the high frequency amplitude and the corresponding frequency, and the crossing times of the fundamental frequency amplitude are extracted; the power quality disturbance signal in step one is processed by using wavelet transform to obtain five-layer wavelet coefficient standard deviation, energy of each layer and wavelet energy entropy; the power quality disturbance signal in step one is processed by using S transform to obtain S transform modulus time-frequency matrix, and the related features of the amplitude variation characteristics of the high and low frequency parts are extracted therefrom; and the features are normalized and labeled to obtain n labeled feature samples of the power quality disturbance signal {(x i ,y i )|i=1,2,…,n},wherein x i ∈R D represents the i-th feature sample, and x i =[x i1 ,x i2 ,…,x ir ,…,x iD ], x ir represents the r-th feature quantity in the i-th feature sample x i , D represents the dimension of the feature sample, y i represents the class label of x i , and y i ∈{1,2,…,c},c is the number of class labels; let the feature set matrix
[0051] Step three, the distance between the feature samples of the power quality disturbance signal is calculated by using the nearest component analysis, the feature weight vector is obtained by learning the regularization parameter, the multi-source feature selection is performed, and the key feature matrix F m is obtained:
[0052] Step 3.1, the distance d w (x i ,x j ) between the i-th feature sample x i and the j-th feature sample x j in the feature set matrix F s is calculated by using formula (1):
[0053]
[0054] In formula (1), w r is the feature weight of the rth feature quantity; x jr respectively represents the rth feature quantity in the jth feature sample x j ;
[0055] Step 3.2, the neighbor distribution of the ith feature sample x i is calculated by using formula (2);
[0056]
[0057] In formula (2), p ij represents the probability that the ith feature sample x i inherits the label y j of x i after the jth feature sample x j is randomly selected as the neighbor of x j ;
[0058] Step 3.3, a target function F(w) containing a regularization term is constructed by using formula (3);
[0059]
[0060] In formula (3), λ is a regularization parameter; y ij represents whether the label y i is the same as the label y j ; when y i =y j , y ij is 1, otherwise, y ij is 0; w is the feature weight vector;
[0061] Step 3.4, the feature weight vector w corresponding to the maximum target function F(w) is solved by using formula (4);
[0062]
[0063] Step 3.5, the D-class feature quantities in the feature set matrix F s are sorted in descending order according to the feature weight, and the first M-class feature quantities are selected to form a key feature matrix wherein q i ∈R M represents the ith key feature sample, and M<D;
[0064] Figure 2For example, the extracted feature and the corresponding feature weight relationship diagram is shown in FIG. 1. Using the multiple feature extraction methods in step two, a total of 33 features are extracted as examples, Figure 2 It is shown that different feature quantities have different performance characteristics in performing power quality disturbance classification, and through the near neighbor component analysis feature weight calculation, the visualization of feature selection can be realized.
[0065] Step four, using the improved particle swarm algorithm to optimize the support vector machine model;
[0066] Step 4.1, select the penalty parameter and the kernel function parameter in the input parameter of the support vector machine as the optimization object, and initialize the parameters in the particle swarm algorithm, including: the total number of particles P, the iteration number k = 1, the maximum iteration number K;
[0067] Step 4.2, generate the kth generation particle swarm, and take the penalty parameter and the kernel function parameter as two variables of each particle, so as to obtain the current position of the dth variable of the pth particle in the kth generation particle swarm And the current speed Wherein, 1≤k≤K, 1≤p≤P, 1≤d≤L; L represents the total number of variables, and L = 2;
[0068] Step 4.3, calculate the fitness of each particle in the kth generation particle swarm, so as to obtain the local optimal particle of each particle in the kth generation particle swarm, and select the particle corresponding to the maximum fitness value as the global optimal particle of the kth generation;
[0069] Step 4.4, calculate the speed of the pth particle in the k+1th generation particle swarm by formula (5)
[0070]
[0071] In formula (5), is the local optimal particle of the dth variable of the pth particle in the kth generation particle swarm, is the global optimal particle of the dth variable in the kth generation particle swarm; c1 and c2 are learning factors; r1 and r2 are random numbers distributed in the interval [0, 1]; ω(k) is the dynamic inertia weight of the kth generation, and is obtained by formula (6);
[0072]
[0073] In formula (6), U(0, 1) is a random number uniformly distributed between 0 and 1, ω max represents the maximum value of the dynamic inertia weight, which is set to 0.9; ω min represents the minimum value of the dynamic inertia weight, which is set to 0.2; the dynamic inertia weight changes with the iteration number, which is shown in the example Figure 3As shown, in the initial stage of population search, ω(k) tends to take a larger value, which is conducive to the global search ability, and in the later stage of search, ω(k) takes a smaller value with a greater probability, and the local mining ability is enhanced. However, the inertia weight generally decreases with the increase of the iteration number;
[0074] Step 4.5, calculate the fitness of the P particles in the k+1 generation particle group, and compare it with the fitness of the k generation, the particle corresponding to the larger fitness value is taken as the local optimal particle of the P particles in the k+1 generation particle group, and the optimal particle corresponding to the maximum fitness value is selected from the k+1 generation particle group as the global optimal particle of the k+1 generation particle group;
[0075] Step 4.6, after assigning k+1 to k, return to step 4.4 for sequential execution until k>K, thereby obtaining the global optimal particle of the K generation particle group, and taking the K generation global optimal particle as the optimal penalty parameter and the optimal kernel function parameter of the support vector machine;
[0076] Step 4.7, input the key feature matrix F m to the support vector machine containing the optimal penalty parameter and the optimal kernel function parameter for training to obtain the optimal support vector machine model;
[0077] Step five, using the optimal support vector machine model to classify the to-be-tested power quality disturbance signal, and output the class label of the to-be-tested power quality disturbance signal.
[0078] In this embodiment, an electronic device includes a memory for storing a program supporting a processor to execute the above-mentioned hybrid power quality disturbance classification method based on multi-source feature selection, and the processor is configured to execute the program stored in the memory.
[0079] In this embodiment, a computer readable storage medium stores a computer program on the computer readable storage medium, and the computer program is executed by a processor to perform the steps of the above-mentioned hybrid power quality disturbance classification method based on multi-source feature selection.
[0080] Figure 4 In order to utilize the 33 features extracted in step two, after calculating the feature weight vector by the nearest neighbor component analysis, the features are sorted in descending order of feature weight, and the first 12 features are selected for classification. The predicted results are compared with the actual results.
[0081] In summary, the embodiment based on multi-source feature selection classification model realizes automatic detection and classification of mixed power quality disturbance signals. Unlike traditional detection and classification methods, the model analyzes and extracts original signal features, performs automatic visual feature selection process, avoids dramatic increase in data dimension, and realizes correct classification and identification of mixed power quality disturbance signals. It can be used for analysis and classification detection of power quality disturbance problems.
Claims
1. A hybrid power quality disturbance classification method based on multi-source feature selection, characterized in that, Includes the following steps: Step 1: Collect power quality disturbance signals from power quality monitoring points in the power grid to obtain n disturbance signal samples of different disturbance categories; Step 2: Extract features from the disturbance signal samples, normalize the features, and add category labels to obtain n labeled feature samples of the power quality disturbance signal {(x i ,y i )|i=1,2,…,n}, where x i ∈R D Let x represent the i-th feature sample, and x i =[x i1 ,x i2 ,…,x ir ,…,x iD ], x ir Represents the i-th feature sample x i The r-th feature is given by y, where D represents the dimension of the feature sample. i x represents i The category label, and y i ∈{1,2,…,c}, where c is the number of class labels; let the feature set matrix Step 3: Multi-source feature selection and obtaining the key feature matrix F m : Step 3.1: Calculate the feature set matrix F using equation (1). s The i-th feature sample x i and the j-th feature sample x j distance d w (x i ,x j ); In equation (1), w r x represents the feature weight of the r-th feature; jr Let x represent the j-th feature sample respectively. j The r-th feature; Step 3.2: Calculate the i-th feature sample x using equation (2). i The nearest neighbor distribution; In equation (2), p ij Represents the i-th feature sample x i Randomly select the j-th feature sample x j After becoming neighbors, x i Inheritance x j The tag y j The probability of; Step 3.3: Construct the objective function F(w) containing the regularization term using equation (3); In equation (3), λ is the regularization parameter; y ij Indicates label y i Is it related to the tag y? j The same, when y i =y j At that time, let y ij Set y to 1; otherwise, set y to 1. ij =0; w is the feature weight vector; Step 3.4: Use equation (4) to solve for the feature weight vector corresponding to the maximum objective function F(w). Step 3.5: Convert the feature set matrix F s The features of class D are sorted in descending order of feature weight, and the top M features are selected to form the key feature matrix. Where, q i ∈R M Let M represent the i-th key feature sample, where M < D; Step 4: Optimize the support vector machine model using the improved particle swarm optimization algorithm; Step 4.1: Select the penalty parameter and kernel function parameter from the input parameters of the support vector machine as the optimization objects, and initialize the various parameters in the particle swarm optimization algorithm, including: total number of particles P, number of iterations k=1, and maximum number of iterations K; Step 4.2: Generate the k-th generation particle swarm, and use the penalty parameter and kernel function parameter as two variables for each particle, thereby obtaining the current position of the d-th variable of the p-th particle in the k-th generation particle swarm. and current speed Where 1≤k≤K, 1≤p≤P, 1≤d≤L; L represents the total number of variables, and L=2; Step 4.3: Calculate the fitness of each particle in the k-th generation particle swarm to obtain the local optimal particle for each particle in the k-th generation particle swarm, and select the particle with the maximum fitness value as the global optimal particle of the k-th generation. Step 4.4: Calculate the velocity of the p-th particle in the (k+1)-th generation particle swarm using equation (5). In equation (5), Let be the locally optimal particle with the d-th variable among the p-th particles of the k-th generation particle swarm. is the globally optimal particle with the dth variable in the kth generation particle swarm; c1 and c2 are learning factors; r1 and r2 are random numbers distributed in the interval [0,1]; ω(k) is the dynamic inertia weight of the kth generation, which is obtained from equation (6); In equation (6), U(0,1) is a random number uniformly distributed between 0 and 1, and ω max ω represents the maximum value of the dynamic inertia weight. min This represents the minimum value of the dynamic inertia weight; Step 4.5: Calculate the fitness of P particles in the (k+1)th generation particle swarm and compare it with the fitness of the kth generation. Select the particle with the larger fitness value as the local optimal particle of the (k+1)th generation particle swarm and select the optimal particle with the largest fitness value from the (k+1)th generation particle swarm as the global optimal particle of the (k+1)th generation particle swarm. Step 4.6: After assigning k+1 to k, return to step 4.4 and execute sequentially until k>K, thereby obtaining the globally optimal particle of the Kth generation particle swarm. The globally optimal particle of the Kth generation is used as the optimal penalty parameter and optimal kernel function parameter of the support vector machine. Step 4.7: Extract the key feature matrix F m The input is fed into a support vector machine containing the optimal penalty parameters and the optimal kernel function parameters for training, resulting in the optimal support vector machine model; Step 5: Use the optimal support vector machine model to classify the power quality disturbance signal to be tested, and output the category label of the power quality disturbance signal to be tested.
2. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the hybrid power quality disturbance classification method based on multi-source feature selection as described in claim 1, wherein the processor is configured to execute the program stored in the memory.
3. A computer-readable storage medium storing a computer program, characterized in that, The computer program, when run by the processor, executes the steps of the hybrid power quality disturbance classification method based on multi-source feature selection as described in claim 1.
Citation Information
Patent Citations
A power quality disturbance identification method employing time-domain compressed multi-resolution fast S-transform feature extraction
CN107832777B
A Power Quality Disturbance Identification Method Based on Big Data Multi-Feature Extraction and Collaborative Classification
CN109271975B