Power quality composite disturbance classification method and system based on three-channel convolutional neural network
Through the three-channel convolutional neural network, combined with one-dimensional and multi-scale convolutional neural networks and Shapelet module, the problem of weak feature extraction ability in the classification of power quality composite disturbances is solved, and high-precision and efficient power quality disturbance classification is achieved.
Patent Information
- Application Number
- CN202510694251.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-09
AI Technical Summary
The existing power quality composite disturbance classification methods have weak feature extraction capabilities, resulting in long training time and low classification accuracy.
A three-channel convolutional neural network is adopted to process the power quality disturbance signal through one-dimensional convolutional neural network and multi-scale convolutional neural network. The Shapelet module is combined to perform defect subsequence screening, and the one-dimensional data is converted into two-dimensional data through improved phase space reconstruction to enhance the feature extraction capability.
The accuracy and efficiency of power quality composite disturbance classification are improved, achieving faster response speed and higher classification accuracy.
Smart Images

Figure CN120611286A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power quality disturbance classification, and more specifically, to a power quality composite disturbance classification method and system based on a three-channel convolutional neural network. Background Art
[0002] The development of industries like wind turbines and photovoltaics has driven the rise of the new energy sector. These renewable energy sources, such as photovoltaics and wind power, inherently exhibit randomness, volatility, and intermittency. Grid integration inevitably impacts power quality, leading to harmonic interference, voltage sag, three-phase voltage imbalance, oscillation, voltage fluctuation, and flicker, increasing the probability of compound power quality disturbances. Therefore, effectively identifying PQDs (Peripheral Quality Disturbances) such as harmonic interference and voltage sag caused by renewable energy grid integration is crucial for power quality analysis and management.
[0003] In the prior art, the classification methods for power quality composite disturbances mainly include:
[0004] 1. Collect three-phase power disturbance signal data, then preprocess the data and convert it into an RGB image. Then, use the three-phase power RGB image as input to build a convolutional neural network model for training and classification.
[0005] This method has the following problems: although the three-phase power RGB image is used as input to meet the input requirements of the subsequent convolutional neural network, the feature information contained in the three-phase power RGB image is the power curve. The image contains too much useless information, which affects the subsequent training time and training accuracy.
[0006] 2. The one-dimensional power quality disturbance signal is normalized and converted into polar coordinates, and then converted into a two-dimensional image using the Gram matrix. Finally, the generated image is imported into the transfer learning model AlexNet for training and classification.
[0007] This method suffers from the following problems: the feature map formed by the Gram angle field lacks distinct features, making it difficult for a single convolutional network to quickly and effectively extract features from it. This results in long training cycles and low classification accuracy. This invention employs a Shapelet module to perform preliminary defect sequence screening on PQDs signals, enhancing the distinction between different types of PQDs signals. Furthermore, through a multi-channel approach, this enhances feature extraction capabilities and ultimately improves classification accuracy. Summary of the Invention
[0008] In order to solve the deficiencies in the prior art, the present invention provides a new power quality composite disturbance classification method based on a three-channel convolutional neural network, which can solve the technical problem of weak feature extraction capability in the existing power quality composite disturbance classification method.
[0009] The present invention adopts the following technical solutions.
[0010] A three-channel convolutional neural network power quality composite disturbance classification method includes the following steps:
[0011] Collecting one-dimensional power quality disturbance signals to be classified;
[0012] Process the one-dimensional power quality disturbance signal to obtain three-channel network preparation data;
[0013] A three-channel convolutional neural network is constructed based on the one-dimensional convolutional neural network and the multi-scale convolutional neural network, and the three-channel convolutional neural network is trained;
[0014] The trained three-channel convolutional neural network is used to extract features from the three-channel network preparation data respectively;
[0015] The feature extraction results of the three-channel network are fused to obtain the power quality disturbance category of the one-dimensional power quality disturbance signal to be classified.
[0016] Preferably, the one-dimensional power quality disturbance signal includes a single power quality disturbance signal and a composite power quality disturbance signal;
[0017] Among them, the operating condition types of a single power quality disturbance signal include normal voltage, sag, swell, interruption, harmonic, flicker, oscillation transient, pulse transient, notch and spike pulse signal;
[0018] The operating condition types of composite power quality disturbance signals include sag + harmonics, swell + harmonics, interruption + harmonics, flicker + harmonics, flicker + sag, and flicker + swell.
[0019] Preferably, the one-dimensional power quality disturbance signal is processed separately to obtain three-channel network preparation data, specifically including:
[0020] The collected one-dimensional power quality disturbance signal data is used as the preparation data of channel one;
[0021] The one-dimensional power quality disturbance signal is converted into a two-dimensional image through improved phase space reconstruction as the preparation data for channel two;
[0022] The Shapelet module is used to screen the defective subsequences of the one-dimensional power quality disturbance signal and then perform an improved phase space reconstruction transformation as the preparation data for channel three.
[0023] Preferably, the step of converting the one-dimensional power quality disturbance signal into a two-dimensional image through improved phase space reconstruction as preparation data for channel two specifically includes:
[0024] Normalizing the one-dimensional power quality disturbance signal data to obtain a normalized time series;
[0025] Calculate the autocorrelation function of the normalized time series and calculate the lag time based on the autocorrelation function:
[0026] Combined with the delay time, the normalized time series is constructed into a multidimensional phase space according to the embedding dimension m, and an m-dimensional reconstructed phase space sequence is obtained;
[0027] Perform neighbor search and distance calculation on the points in the m-dimensional reconstructed phase space sequence to obtain candidate neighbor points;
[0028] Perform false neighbor determination on the obtained candidate neighbor points to obtain false neighbors;
[0029] Calculate the statistical indicators of the embedding dimension m, including the false neighbor ratio and the average distance ratio, and select the larger value of the convergence value of the statistical indicators as the embedding dimension m;
[0030] Reconstruct the phase space of the normalized time series according to the delay time and the embedding dimension m to obtain the reconstructed phase space series;
[0031] Generate a two-dimensional image based on the reconstructed phase space sequence as preparation data for channel two.
[0032] Preferably, the use of the Shapelet module to screen defect subsequences of the one-dimensional power quality disturbance signal and then perform an improved phase space reconstruction transformation as the preparation data for channel three specifically includes:
[0033] Set the length of the sliding window L to extract all defect subsequences of length L in the time series of one-dimensional power quality disturbances:
[0034] Normalize the time series and defect subsequences, and calculate the distance between the normalized time series and defect subsequences;
[0035] Combine the distance between the time series and the defect subsequence to calculate the information gain of each subsequence;
[0036] The best defect subsequence is selected according to the information gain of the subsequence, and the best defect subsequence is transformed using the improved phase space reconstruction transformation to obtain the transformed two-dimensional image as the preparation data for channel three.
[0037] Preferably, the method of using the trained three-channel convolutional neural network to perform feature extraction on the three-channel network preparation data respectively includes:
[0038] The one-dimensional convolutional neural network is used as channel one, the prepared data of channel one is input into the one-dimensional convolutional neural network, and the one-dimensional convolutional neural network outputs a two-dimensional feature vector as the feature extraction result of channel one;
[0039] The multi-scale convolutional neural network is used as channel two and channel three, and the prepared data of channel two and channel three are converted into the convolution results of feature maps as the feature extraction results of channel two and channel three respectively.
[0040] Preferably, the processing of the feature extraction result of the three-channel network to obtain the power quality disturbance category of the one-dimensional power quality disturbance signal to be classified specifically includes:
[0041] The feature vectors of the three channels are spliced together, and the spliced feature vector is used as the final two-dimensional feature vector;
[0042] The final two-dimensional feature vector is then decoded through a fully connected layer. The final output of the fully connected layer is [1×16], which represents 16 types of power quality disturbances. The power quality disturbance type to which each signal belongs is determined based on the probability of occurrence of each type.
[0043] The present invention also proposes a three-channel convolutional neural network power quality composite disturbance classification system, which is used to implement the three-channel convolutional neural network power quality composite disturbance classification method, including: an acquisition module, a processing module, a convolutional neural network module, a feature extraction module, and a classification module;
[0044] The acquisition module is used to acquire the one-dimensional power quality disturbance signal to be classified;
[0045] The processing module is used to process the one-dimensional power quality disturbance signal to obtain three-channel network preparation data;
[0046] The convolutional neural network module constructs a three-channel convolutional neural network based on the one-dimensional convolutional neural network and the multi-scale convolutional neural network, and trains the three-channel convolutional neural network;
[0047] The feature extraction module is used to extract features from the three-channel network preparation data using the trained three-channel convolutional neural network;
[0048] The classification module is used to perform fusion processing on the feature extraction results of the three-channel network to obtain the power quality disturbance category of the one-dimensional power quality disturbance signal to be classified.
[0049] The present invention also provides a terminal, comprising a processor and a storage medium;
[0050] The storage medium is used to store instructions;
[0051] The processor is used to operate according to the instructions to execute the steps of a new three-channel convolutional neural network power quality composite disturbance classification method.
[0052] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the power quality composite disturbance classification method of the novel three-channel convolutional neural network.
[0053] The beneficial effects of the present invention are that, compared with the prior art, the present invention adopts an improved phase space reconstruction method to map one-dimensional data into two-dimensional data, thereby enhancing the key feature range of the two-dimensional image and preventing the subsequent convolutional neural network from convolving useless blank information; the data is processed separately by a one-dimensional convolutional neural network and a multi-scale convolutional neural network, and the obtained feature extraction structure is spliced to form a new fused feature vector, and finally the fused feature vector is passed through multiple fully connected layers to obtain the final classification result. The method of the present invention innovatively proposes a three-channel network framework, combines multi-dimensional information, enhances feature extraction capabilities, and thus improves the final classification accuracy.
[0054] The present invention has at least the following beneficial effects:
[0055] 1. The present invention combines one-dimensional PQDs signals and two-dimensional PSR images by constructing a three-channel network framework. The multi-dimensional signal can enhance the information received by the network. The time information contained in the one-dimensional signal and the spatial and chaotic information contained in the two-dimensional signal complement each other in the global space-time information, achieving the effect of complete features.
[0056] 2. During the signal processing process, the present invention can directly extract the defect subsequence of the PQDs signal through the Shapelet module, eliminating the interference of other normal signals and enhancing the characteristic differences of different types of signals;
[0057] 3. The present invention uses a multi-scale convolutional neural network to extract features from two-dimensional images. It can adaptively select convolution kernels and update parameters according to the size of the feature map, so as to achieve the effect of convolving the two-dimensional image with convolution kernels of different sizes. Convolution kernels of different sizes can provide a more comprehensive field of view, so that the model can capture features at different scales of the two-dimensional image.
[0058] 4. The method of the present invention proposes a new idea for the classification of power quality composite disturbances by combining multi-dimensional data, Shapelet module and multi-scale convolutional neural network. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1It is a schematic diagram of the overall process of the power quality composite disturbance classification method of the three-channel convolutional neural network in the present invention;
[0060] Figure 2 This is a schematic diagram of multi-channel input information in the present invention;
[0061] Figure 3 Schematic diagram of extracting defect subsequences for Shapelet;
[0062] Figure 4 It is a structural diagram of the power quality composite disturbance classification system of the three-channel convolutional neural network in the present invention;
[0063] Figure 5 This is the disturbance recognition confusion matrix diagram finally obtained by the algorithm of the present invention. DETAILED DESCRIPTION
[0064] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. The embodiments described in this application are only part of the embodiments of the present invention, not all of them. Based on the spirit of the present invention, other embodiments obtained by ordinary technicians in this field without making creative efforts are all within the scope of protection of the present invention.
[0065] like Figure 1 As shown, the present invention provides a three-channel convolutional neural network power quality composite disturbance classification method, comprising the following steps:
[0066] Step 1: Collect one-dimensional power quality disturbance signals and construct a data set. The one-dimensional power quality disturbance signals include single power quality disturbance signals and composite power quality disturbance signals, and the data set is divided.
[0067] Specifically, according to the IEEE Std.1159-2019 standard, the one-dimensional power quality disturbance signal data collected in the present invention includes a single PQDs (Power Quality Disturbance signal) signal and a composite PQDs signal, wherein the disturbance types of the single PQDs signal include normal voltage, sag, swell, interruption, harmonics, flicker, oscillation transient, pulse transient, notch and spike pulse, a total of 10 operating conditions; the disturbance types of the composite PQDs signal include sag + harmonics, swell + harmonics, interruption + harmonics, flicker + harmonics, flicker + sag, flicker + swell, a total of 6 operating conditions, and a total of 16 PQDs operating conditions for single and composite PQDs signals.
[0068] Furthermore, a data set containing single and composite power quality disturbance signals is collected, and the data set is divided into a training set and a test set. The ratio of the training set to the test set is 4:1. The single and composite PQDs together constitute the one-dimensional PQDs data.
[0069] Among them, the types of 16 power quality disturbance signals are shown in Table 1 below:
[0070] Table 1: 16 disturbance signals and their corresponding mathematical models and constraints
[0071]
[0072]
[0073] The characters in Table 1 have the following meanings:
[0074] (1) y(t) / f(t): mathematical model of voltage variation over time, describing the change of voltage waveform under disturbance;
[0075] (2) u(t-t1), u(t-t2): unit step function, indicating a sudden change or disturbance at time points t1 and t2;
[0076] (3)α: Amplitude change coefficient, used to describe the voltage waveform sag, swell, interruption or pulse intensity. The value range varies according to the type of disturbance.
[0077] (4) T: The period of the voltage signal, which is usually related to the power frequency. For example, the period of 50 Hz is T = 1 / 50 s.
[0078] (5)ω: angular frequency, indicating the frequency of the signal, ω = 2πf, where f is the signal frequency;
[0079] (6) t1, t2: Indicates the time points at which the disturbance begins and ends, and is used to define the duration of the disturbance or the duration of the pulse. t2-t1 defines the duration of the disturbance, which depends on the specific type of disturbance;
[0080] (7) β: frequency multiple, often used to describe the frequency of flicker, usually between 5Hz and 20Hz;
[0081] (8)α f : Flicker amplitude factor, which describes the flicker intensity in the voltage signal, and the value range is usually 0.1
[0082] ≤α f ≤0.2;
[0083] (9)ω n : The natural angular frequency of the oscillatory transient, describing the frequency of the oscillatory part of the voltage, ω nThe value range is 300≤2πω n ≤900rad / s;
[0084] (10)τ: time constant, used to describe the decay rate of oscillation transients;
[0085] (11)α1, α3, α5, α7: Amplitude coefficients corresponding to different order harmonics. The coefficients in the harmonic function define the amplitudes of different order harmonic components, satisfying ∑(ai 2 )=1;
[0086] (12) K: In a spike pulse or notch, it represents the amplitude factor of the waveform, usually in the range of 0.1≤K≤0.4;
[0087] (13) sign(sin(ωt)): sign function, which depends on the sign of the sine function and is used to describe the polarity of the spike pulse or notch waveform.
[0088] Step 2: Process the one-dimensional power quality disturbance signal data separately to obtain three-channel network preparation data;
[0089] Reference Figure 2 , Figure 2 This is a schematic diagram of multi-channel input information. The specific operations of step 2 include:
[0090] Step 2-1: The collected original one-dimensional power quality disturbance signal data is used as the preparation data for channel one, and the one-dimensional power quality disturbance signal is converted into a two-dimensional image through improved PSR (Phase Space Reconstruction) as the preparation data for channel two;
[0091] Step 2-1 specifically includes:
[0092] Step 2-1-1: normalize the one-dimensional power quality disturbance signal data to obtain the normalized time series
[0093] Here, each one-dimensional power quality disturbance signal data is taken as a time series X:
[0094] X={x1,x2,x3,…,x N}
[0095] Among them, x i Represents the i-th data in the one-dimensional power quality disturbance signal, i∈[1,N], N represents the sequence length, that is, the number of data in the one-dimensional power quality disturbance signal.
[0096] Normalize the time series X corresponding to the one-dimensional power quality disturbance signal to obtain the normalized time series
[0097]
[0098] in, is the normalized time series value.
[0099] Step 2-1-2, calculate the autocorrelation function of the normalized time series, and calculate the delay time τ based on the autocorrelation function:
[0100] Calculate the autocorrelation function R(τ) of the normalized time series X and take the value when it first drops to 1 / e as the delay time τ:
[0101]
[0102] Where N is the sequence length, R(0) is the initial autocorrelation value, the value range of k is [0, N], and x(t) and x(t+τ) represent the normalized time series values at time t and time t+τ, respectively.
[0103] Step 2-1-3, according to the delay time τ, normalize the time series According to the embedding dimension m, a multi-dimensional phase space is constructed to obtain an m-dimensional reconstructed phase space sequence;
[0104] Normalized time series X is embedded in different dimensions m∈[1,m max ] to refactor:
[0105] X m (i)=[x(i),x(i+τ),x(i+2τ),...,x(i+(m-1)τ)]
[0106] Among them, X m (i) represents the reconstructed phase space sequence when the embedding dimension is m; x(i) represents the reconstructed one-dimensional power quality disturbance signal.
[0107] Step 2-1-4, perform neighbor search and distance calculation on the points in the m-dimensional reconstructed phase space sequence to obtain candidate neighbor points;
[0108] For each point in the m-dimensional space, a high-dimensional spatial index structure tree KDTree is constructed, the distance between each point is calculated, and the k nearest neighbors of each point are searched as candidate neighbor points, where k is m+1.
[0109] The nearest neighbor calculation formula is as follows:
[0110] d m (i,j)=||X m (i)-X m (j)||2
[0111] Among them, d m (i, j) represents the Euclidean distance in m-dimensional space, X m (i) represents the m-dimensional state of the system at time point i, X m (j) represents the m-dimensional state of the system at time point j, i is the index of the current point, the value range is N-(m-1)τ-1, and j is the index of the candidate neighbor point.
[0112] In step 2-1-5, false neighbor determination is performed on the calculated candidate neighbor points to obtain false neighbors.
[0113] Specifically, for each candidate neighbor point j, the m+1-dimensional distance d is calculated m+1 (i,j):
[0114] d m+1 (i,j)=||X m+1 (i)-X m+1 (j)||2
[0115] Then calculate the distance ratio for testing. The calculation formula of the distance ratio is as follows:
[0116] R ij R ij
[0117]
[0118] Set a false neighbor determination threshold, when it is determined to be a false neighbor; in this embodiment
[0119] R tol R ij >R tol
[0120] Take 10.
[0121] R tol Step 2-1-6, calculate the statistical indicators of the embedding dimension m, the statistical indicators include the false neighbor ratio and the average distance ratio, and select the larger value of the convergence value of the statistical indicators as the embedding dimension m.
[0122] For each embedding dimension m, two statistical indicators are calculated: the false neighbor ratio E(m) and the average distance ratio E s (m), the calculation formulas are as follows:
[0123]
[0124] Among them, N f (m) is the total number of false neighbors in the m-dimensional space, N tolal (m) is the number of valid samples, and satisfies n tolal (m) = N - (m - 1) τ.
[0125] After obtaining the two statistical indicators, the larger value of the convergence values of the two statistical indicators is taken as the embedding dimension m.
[0126] Step 2-1-7, reconstruct the phase space of the normalized time series according to the delay time and the embedding dimension to obtain the reconstructed phase space series;
[0127] After obtaining the delay time and embedding dimension, the normalized time series Perform phase space reconstruction, and the reconstructed phase space sequence X is as follows:
[0128]
[0129] Where M is the number of delay vectors, and M=N-(m-1)τ.
[0130] Step 2-1-8, generate a two-dimensional image based on the reconstructed phase space sequence as the preparation data for channel two.
[0131] Two-dimensional image conversion: After obtaining the phase space sequence, a 255×255 color two-dimensional image is generated according to the point values in the phase space sequence.
[0132] The two-dimensional image amplifies the differences between the original power quality disturbance signals, and the two-dimensional image format facilitates the subsequent use of convolutional neural networks to extract features.
[0133] Step 2-2: Use the Shapelet module to filter the defective subsequences of the one-dimensional power quality disturbance signal and then perform an improved PSR transform as the preparation data for channel three.
[0134] Selected subsequence reference Figure 3 The specific steps of step 3 are as follows:
[0135] Step 2-2-1, set the length L, and extract the defect subsequence S of length L from the one-dimensional power quality disturbance time series X:
[0136] S=[s1,s2,…,s L ]
[0137] Among them, S represents the selected entire subsequence, s i Represents the value of each point in the subsequence, where i∈[1,L].
[0138] Preferably, L is artificially set to 32 based on the sequence length in which power quality disturbances generally occur.
[0139] In step 2-2-2, in the one-dimensional power quality disturbance time series X, all subsequences of length L are obtained using a sliding window to generate all possible subsequences.
[0140] The i-th subsequence S of length L i as follows:
[0141] S i =[t i ,t i+1 ,…,t i+L-1 ]
[0142] The starting position i of the subsequence ranges from 1 to n-L+1.
[0143] t i ~t i+L-1 It represents all subsequences that can be selected in X when i meets the length range.
[0144] Step 2-2-3, calculate the distance between the subsequence of length L and the time series X, including normalizing the time series X and the subsequence S, and then calculating the Euclidean distance between the normalized time series X and the subsequence S;
[0145] In order to eliminate the scale effect, the time series X and subsequence S are first normalized:
[0146]
[0147] Where x i 、s i Represent the original time series and a selected subsequence, μ T 、μ S They represent the mean of the time series and subsequence, σ T , σ S They represent the standard deviation of the time series and subsequence respectively.
[0148] Furthermore, the Euclidean distance is used to measure the similarity between a subsequence S and the entire time series X. The minimum Euclidean distance of all possible matching positions j of the normalized subsequence S on the time series X is calculated as the distance D(T,S) between the time series and the subsequence:
[0149]
[0150] The value range of j is 1 to n-L+1, and the value range of k is 1 to L.
[0151] Step 2-2-4, evaluate the ability to distinguish subsequences: combine the distance between the time series and the subsequences to calculate the information gain of each subsequence.
[0152] Use information gain to evaluate whether the subsequence can effectively distinguish categories:
[0153] IG(T,S)=H(Y)-H(Y|D(T,S))
[0154] Where IG(T,S) represents information gain, H(Y) represents the entropy of category Y in the dataset, and H(Y|D(T,S)) is the conditional entropy after partitioning based on the time series and subsequence distance D(T,S).
[0155] Step 2-2-5, select the best defect subsequence based on the information gain of the subsequence.
[0156] Among all possible subsequences S generated in step 2-2-2, select the subsequence with the highest information gain as the final optimal defect subsequence:
[0157]
[0158] The best defect subsequence S obtained * It can well represent the original PQDs signal X, remove the normal signal in X, and only retain the defect subsequence segment, which can better distinguish different PQDs signal categories.
[0159] Furthermore, the improved PSR is used to identify the best defect subsequence S * Perform the transformation and transform it into a two-dimensional image as the preparation data for channel three.
[0160] Step 3: Feature extraction of three-channel network.
[0161] The specific operations of step 3 include:
[0162] Step 3-1: Use a one-dimensional convolutional neural network to extract features of the one-dimensional power quality disturbance signal of the prepared data of channel one.
[0163] The structure of a one-dimensional convolutional neural network is as follows:
[0164] Step 3-1-1, the first convolutional layer Conv1, the number of input channels is 1, the number of output channels is 32, the size of the convolution kernel is 3, the step size is 1; and the activation function layer ReLU.
[0165] In step 3-1-2, the second convolutional layer Conv2 has 32 input channels, 32 output channels, a convolution kernel size of 3, and a stride of 1; as well as the activation function layer ReLU and the pooling layer MaxPool1d.
[0166] Step 3-1-3, the third convolutional layer Conv3, the number of input channels is 32, the number of output channels is 64, the size of the convolution kernel is 3, the step size is 1; as well as the activation function layer ReLU and the pooling layer MaxPool1d.
[0167] Step 3-1-4, the fourth convolutional layer Conv4, with the number of input channels being 64, the number of output channels being 64, the size of the convolutional kernel being 3, and the stride being 1; as well as the activation function layer ReLU, the fourth pooling layer MaxPool1d, and the batch normalization layer BatchNorm1d.
[0168] Step 3-1-5, the fifth convolutional layer Conv5, with the number of input channels being 64, the number of output channels being 128, the size of the convolutional kernel being 3, and the stride being 1; as well as the batch normalization layer BatchNorm1d.
[0169] Step 3-1-6, the sixth convolutional layer Conv6, with the number of input channels being 128, the number of output channels being 128, the size of the convolutional kernel being 3, and the stride being 1; as well as the global max pooling layer AdaptiveMaxPool1d and the batch normalization layer BatchNorm1d, and the output size of the global max pooling layer is 60.
[0170] Step 3-1-7, change the features into two-dimensional feature vectors through the reshaping layer to prepare for the subsequent three-channel fusion.
[0171] Take the one-dimensional convolutional neural network as Channel 1, input the one-dimensional power quality disturbance signal into the one-dimensional convolutional neural network, and the one-dimensional convolutional neural network outputs a two-dimensional feature vector as the feature extraction result of Channel 1, and the size of the two-dimensional feature vector is 1*N.
[0172] Step 3-2: Use the multi-scale convolutional neural network to extract features from the two-dimensional images of Channels 2 and 3.
[0173] The specific steps are as follows:
[0174] Step 3-2-1, in Step 2, the one-dimensional power quality disturbance signal is converted into a two-dimensional image, and the size I of the two-dimensional image is set as:
[0175] I∈R D×D
[0176] where D represents the length size of the image.
[0177] Then, define a set of convolutional kernel size sets according to the input size:
[0178] {k1,k_{2},\cdots,k m}
[0179] where k1 = 3, k2 = 5, k3 = 7, k4 = 9, \cdots, k m <D, and m is the number of convolutional kernels.
[0180] Each convolutional branch uses a convolutional kernel of the corresponding size to extract features, which is specifically expressed as:
[0181] F i =I*K i ,i=1,2,…,m
[0182] Where, F i represents the extracted features, K i Represents the corresponding adaptively selected convolution kernel.
[0183] In the classification of power quality disturbance signals, the size of the feature map is determined to be 255×255, and the size of m is determined to be 13.
[0184] Step 3-2-2, after the convolution operation of each branch, the multi-scale feature map F is obtained cat :
[0185] F cat =(F1,F2,…,F m )
[0186] Then use 1×1 convolution to fuse the spliced feature maps to obtain the fused feature map F fused :
[0187] F fused =ψ(F cat ;W 1×1 )
[0188] Among them, ψ(·; W 1×1 ) represents a 1×1 convolution operation, W 1×1 is the corresponding convolution kernel parameter, and the fused features are finally output C out Indicates the number of channels of the fused feature map.
[0189] Step 3-2-3, the fused feature map F fused Flattened into a two-dimensional vector
[0190]
[0191] Where flatten() is the flattening operation.
[0192] Then, nonlinear mapping is performed through the fully connected layer to obtain the mapping result z:
[0193]
[0194] Among them, W f and b are the weight and bias of the fully connected layer respectively, and σ is the activation function.
[0195] A training data set is collected to train the three-channel network, and the trained three-channel network is used to extract features of the collected one-dimensional power quality disturbance signal.
[0196] Step 4: Splicing and classification of three-channel networks.
[0197] The specific operations in step 4 include:
[0198] The dataset constructed in step 1 is processed using the feature vectors generated by channel one, channel two, and channel three, respectively. The feature vector generated by channel one is the output result of step 3.1.7, the feature vector generated by channel two is the convolution result of the multi-scale convolutional neural network on the initial PQDs signal converted into a feature map through phase space reconstruction, and the feature vector generated by channel three is the convolution result of the multi-scale convolutional neural network on the defect subsequence converted into a feature map through phase space reconstruction. The feature vectors of the three channels are spliced together to form the final two-dimensional feature vector.
[0199] The final two-dimensional feature vector is then decoded through five fully connected layers. The output of the last layer is [1×16], representing the final 16 PQDs types. The power quality disturbance category to which each signal belongs is determined based on the probability of occurrence.
[0200] like Figure 4 As shown, the present invention also proposes a three-channel convolutional neural network power quality composite disturbance classification system, which is used for the above-mentioned three-channel convolutional neural network power quality composite disturbance classification method. The system includes: an acquisition module, a processing module, a convolutional neural network module, a feature extraction module, and a classification module;
[0201] The acquisition module is used to acquire the one-dimensional power quality disturbance signal to be classified;
[0202] The processing module is used to process the one-dimensional power quality disturbance signal to obtain three-channel network preparation data;
[0203] The convolutional neural network module constructs a three-channel convolutional neural network based on the one-dimensional convolutional neural network and the multi-scale convolutional neural network, and trains the three-channel convolutional neural network;
[0204] The feature extraction module is used to extract features from the three-channel network preparation data using the trained three-channel convolutional neural network;
[0205] The classification module is used to perform fusion processing on the feature extraction results of the three-channel network to obtain the power quality disturbance category of the one-dimensional power quality disturbance signal to be classified.
[0206] In order to verify the beneficial effects of the method proposed in this invention, the final disturbance recognition confusion matrix diagram of the algorithm of this invention is shown in FIG. Figure 5 The system achieved 100% classification accuracy for seven signal types: flicker, flicker + harmonics, harmonics, normal voltage, oscillation transients, sags, and sags + harmonics. The accuracy for flicker + sag disturbances was 99.5%, flicker + swell disturbances was 99%, pulse transient disturbances was 98%, interruptions were 99.5%, interruptions + harmonics were 99.5%, notches were 95.5%, spikes were 98%, swells were 98.5%, and swells + harmonics were 99.5%. The overall classification accuracy for the 3,200 test samples was 99.18%.
[0207] In summary, the present invention aims at the detection and classification of power quality disturbance signals in power systems and provides a new three-channel convolutional neural network method for classifying power quality composite disturbances: first, the 16 one-dimensional PQDs signals and image signals after PSR and image signals processed by the Shapelet module determined in Table 1 are used as three-channel network inputs, and then a one-dimensional convolutional neural network and a multi-scale convolutional neural network are constructed to extract features of the one-dimensional signal and the two-dimensional signal respectively. Finally, the features of the three channels are fused and the final classification result is obtained through multiple fully connected layers. Based on the method proposed in the present invention, 16 disturbance signals were tested, and the final average classification accuracy of the 16 disturbance categories was 99.18%, which has good classification performance.
[0208] The beneficial effect of the present invention is that, compared with the prior art, the present invention provides an effective means for classifying power quality disturbances, and the classification results obtained by the method of the present invention are highly accurate and have a fast response speed.
[0209] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0210] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.
[0211] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0212] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0213] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. A three-channel convolutional neural network power quality composite disturbance classification method, characterized in that: The following steps are involved: Collecting one-dimensional power quality disturbance signals to be classified; Process the one-dimensional power quality disturbance signal to obtain three-channel network preparation data; A three-channel convolutional neural network is constructed based on the one-dimensional convolutional neural network and the multi-scale convolutional neural network, and the three-channel convolutional neural network is trained; The trained three-channel convolutional neural network is used to extract features from the three-channel network preparation data respectively; The feature extraction results of the three-channel network are fused to obtain the power quality disturbance category of the one-dimensional power quality disturbance signal to be classified.
2. The power quality composite disturbance classification method of a three-channel convolutional neural network according to claim 1 is characterized in that: The one-dimensional power quality disturbance signal includes a single power quality disturbance signal and a composite power quality disturbance signal; Among them, the operating condition types of a single power quality disturbance signal include normal voltage, sag, swell, interruption, harmonic, flicker, oscillation transient, pulse transient, notch and spike pulse signal; The operating condition types of composite power quality disturbance signals include sag + harmonics, swell + harmonics, interruption + harmonics, flicker + harmonics, flicker + sag, and flicker + swell.
3. The power quality composite disturbance classification method of a novel three-channel convolutional neural network according to claim 1 is characterized in that: The one-dimensional power quality disturbance signal is processed separately to obtain three-channel network preparation data, specifically including: The collected one-dimensional power quality disturbance signal data is used as the preparation data of channel one; The one-dimensional power quality disturbance signal is converted into a two-dimensional image through improved phase space reconstruction as the preparation data for channel two; The Shapelet module is used to screen the defective subsequences of the one-dimensional power quality disturbance signal and then perform an improved phase space reconstruction transformation as the preparation data for channel three.
4. The novel three-channel convolutional neural network power quality composite disturbance classification method according to claim 3 is characterized in that: The step of converting the one-dimensional power quality disturbance signal into a two-dimensional image through improved phase space reconstruction as preparation data for channel two specifically includes: Normalizing the one-dimensional power quality disturbance signal data to obtain a normalized time series; Calculate the autocorrelation function of the normalized time series and calculate the lag time based on the autocorrelation function: Combined with the delay time, the normalized time series is constructed into a multidimensional phase space according to the embedding dimension m, and an m-dimensional reconstructed phase space sequence is obtained; Perform neighbor search and distance calculation on the points in the m-dimensional reconstructed phase space sequence to obtain candidate neighbor points; Perform false neighbor determination on the obtained candidate neighbor points to obtain false neighbors; Calculate the statistical indicators of the embedding dimension m, including the false neighbor ratio and the average distance ratio, and select the larger value of the convergence value of the statistical indicators as the embedding dimension m; Reconstruct the phase space of the normalized time series according to the delay time and the embedding dimension m to obtain the reconstructed phase space series; Generate a two-dimensional image based on the reconstructed phase space sequence as preparation data for channel two.
5. The method for classifying power quality composite disturbances using a novel three-channel convolutional neural network according to claim 3 is characterized in that: The use of the Shapelet module to screen defect subsequences of the one-dimensional power quality disturbance signal and then perform an improved phase space reconstruction transformation as the preparation data for channel three specifically includes: Set the length of the sliding window L to extract all defect subsequences of length L in the time series of one-dimensional power quality disturbances: Normalize the time series and defect subsequences, and calculate the distance between the normalized time series and defect subsequences; Combine the distance between the time series and the defect subsequence to calculate the information gain of each subsequence; The best defect subsequence is selected according to the information gain of the subsequence, and the best defect subsequence is transformed using the improved phase space reconstruction transformation to obtain the transformed two-dimensional image as the preparation data for channel three.
6. The method for classifying power quality composite disturbances using a novel three-channel convolutional neural network according to claim 1 is characterized in that: The method of using the trained three-channel convolutional neural network to extract features from the three-channel network preparation data specifically includes: The one-dimensional convolutional neural network is used as channel one, the prepared data of channel one is input into the one-dimensional convolutional neural network, and the one-dimensional convolutional neural network outputs a two-dimensional feature vector as the feature extraction result of channel one; The multi-scale convolutional neural network is used as channel two and channel three, and the prepared data of channel two and channel three are converted into the convolution results of feature maps as the feature extraction results of channel two and channel three respectively.
7. The novel three-channel convolutional neural network power quality composite disturbance classification method according to claim 1 is characterized in that: The feature extraction result of the three-channel network is processed to obtain the power quality disturbance category of the one-dimensional power quality disturbance signal to be classified, specifically including: The feature vectors of the three channels are spliced together, and the spliced feature vector is used as the final two-dimensional feature vector; The final two-dimensional feature vector is decoded through a fully connected layer, which ultimately outputs the probability of occurrence of the power quality disturbance type. The power quality disturbance type to which the one-dimensional power quality disturbance signal to be classified belongs is determined based on the probability of occurrence of each type.
8. A three-channel convolutional neural network power quality composite disturbance classification system, used to implement the three-channel convolutional neural network power quality composite disturbance classification method according to any one of claims 1 to 7, characterized in that: include: Acquisition module, processing module, convolutional neural network module, feature extraction module, classification module; The acquisition module is used to acquire the one-dimensional power quality disturbance signal to be classified; The processing module is used to process the one-dimensional power quality disturbance signal to obtain three-channel network preparation data; The convolutional neural network module constructs a three-channel convolutional neural network based on the one-dimensional convolutional neural network and the multi-scale convolutional neural network, and trains the three-channel convolutional neural network; The feature extraction module is used to extract features from the three-channel network preparation data using the trained three-channel convolutional neural network; The classification module is used to perform fusion processing on the feature extraction results of the three-channel network to obtain the power quality disturbance category of the one-dimensional power quality disturbance signal to be classified.
9. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the power quality composite disturbance classification method of the novel three-channel convolutional neural network according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the power quality composite disturbance classification method of a novel three-channel convolutional neural network described in any one of claims 1-7 are implemented.