Power quality disturbance identification method based on Markov transition field and lightweight dense connection network
By combining Markov transformation fields and lightweight dense connection networks, the problem of rapid identification of complex power quality disturbances in new power systems is solved, achieving high-precision and efficient disturbance identification and meeting the real-time monitoring needs of modern power systems.
Patent Information
- Application Number
- CN202510930213.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-07-07
AI Technical Summary
Existing technologies are insufficient for quickly and accurately identifying complex power quality disturbances in new power systems. Furthermore, traditional methods rely on expert experience, have poor generalization capabilities, and are difficult to adapt to the identification needs of complex disturbances in the power grid.
A deep learning model based on Markov Transition Field (MTF) is used to convert one-dimensional signals into two-dimensional feature images. The model is combined with a lightweight densely connected network DenseNet-L and a deep learning model with a focus mechanism (CBAM). The DenseNet-LC model is constructed for recognition by dividing the training set, validation set and test set.
It improves the recognition accuracy and noise resistance of complex PQDs, reduces the time required for disturbance recognition, adapts to the real-time monitoring needs of modern power systems, and has efficient recognition capabilities and robustness.
Smart Images

Figure CN120995191A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power and relates to power system power quality health monitoring, specifically to a power quality disturbance identification method based on Markov transition fields and lightweight densely connected networks. Background Technology
[0002] In recent years, the proportion of distributed power generation and load integration into the grid, primarily driven by new energy sources, has been continuously increasing. While bringing substantial social benefits, this has also brought various challenges. In particular, the integration of numerous power electronic devices has led to new characteristics in power grid power quality disturbances (PQDs), primarily characterized by two aspects: 1) an increased scale of disturbance sources in the new power system; and 2) enhanced coupling and superposition of power quality disturbances. The interactive coupling of PQDs will exhibit extremely complex non-stationary fluctuations, further deteriorating power quality. This will not only cause problems for end-users, such as damage to sensitive equipment, data loss, and increased energy consumption, but in severe cases, may even lead to large-scale power outages. Therefore, accurate and rapid identification of complex PQDs under the new power system is a fundamental prerequisite for ensuring the safe and stable operation of the power grid.
[0003] Traditional PQDs identification algorithms typically combine manual feature extraction methods with machine learning classifiers. Feature extraction primarily utilizes signal processing techniques, including FFT, DFT, and S-transform. After manual feature extraction, machine learning classification algorithms such as SVM, RF, and artificial neural networks are used to establish a mapping relationship from continuous features to discrete labels, thus enabling PQD identification. However, this type of method is cumbersome in parameter selection and processing, heavily reliant on expert experience, and has poor generalizability. Considering the disturbance interaction coupling caused by the integration of numerous power electronic devices, this limits their generalization to complex disturbance events, making it difficult to meet the PQDs classification requirements in the context of new power systems. Compared to machine learning-based PQDs identification models based on manual feature extraction, deep learning-based PQDs identification models can effectively capture the deep temporal and spatial features in one-dimensional disturbance time-series signal data and achieve good disturbance identification results.
[0004] However, current research on combining signal visualization technology with image recognition networks for complex PQDs identification is relatively limited, and the focus of existing research is primarily on improving the overall recognition accuracy, while neglecting the performance of visualization imaging and deep learning models in terms of conversion and recognition efficiency. As the deployment coverage of sensors in power systems continues to expand, PQDs identification efficiency will become increasingly important for power grid power quality situational awareness.
[0005] Therefore, a new technological solution is needed to address these issues. Summary of the Invention
[0006] Purpose of the invention: In order to overcome the shortcomings of the existing technology, a power quality disturbance identification method based on Markov transition field and lightweight dense connection network is provided, which can improve the identification accuracy and noise resistance of complex PQDs, while significantly reducing the disturbance identification time.
[0007] Technical Solution: To achieve the above objectives, this invention provides a power quality disturbance identification method based on Markov transition fields and lightweight densely connected networks, comprising the following steps:
[0008] S1: Construct a standard signal set of one-dimensional power quality disturbances (PQDs), and based on the Markov transition field (MTF) visualization transformation method, transform the complex one-dimensional PQD signal set into a two-dimensional feature image dataset, and divide it into training set, validation set and test set;
[0009] S2: Develop a lightweight recognition network model based on the DenseNet-L dense connection mechanism (DenseNet);
[0010] S3: Construct a CBAM attention mechanism model that combines CAM and SAM;
[0011] S4: By combining the DenseNet-L lightweight recognition network model and the CBAM attention mechanism model through module fusion, a DenseNet-LC lightweight recognition model with both recognition accuracy and efficiency is constructed.
[0012] S5: Train the DenseNet-LC model using the training set, and at the same time combine the validation set to perform loss testing and performance verification on the model training process, and save the best performance model with the lowest loss value during the training process.
[0013] S6: Use the test set to test the recognition performance of the DenseNet-LC optimal performance model and obtain the final recognition results of complex PQDs.
[0014] Furthermore, the MTF visualization conversion method in step S1 is a one-dimensional time-series signal visualization conversion method based on MTF color encoding, and its specific operation includes:
[0015] Given a time series signal X = {x1, x2, ..., x...} N}, x i For the i-th sampling signal point, the MTF method first divides the time-series signal into Q quantile units q according to the amplitude. j (j∈[1,Q]) is discretized, and each value is quantized. For any numerical point x... i Mapped to the corresponding quantile q iThen, the sampling signal points x at previous and subsequent times are calculated along the time axis using a first-order Markov chain. t-1 With x t From region q i Transfer to q j The probabilities are calculated, and each probability P is used as an element w. ij We construct the Q×Q dimension Markov state transition matrix W, whose expression is as follows:
[0016]
[0017] Furthermore, to address the issue of significant loss of one-dimensional temporal information caused by the Markov state transition matrix in the MTF visualization transformation method, the Markov state transition matrix is improved using MTF. By considering the temporal positional relationship, each transition probability is arranged sequentially along time, extending the Markov state transition matrix W to a cross-timescale MTF matrix M, thus preserving the temporal correlation of the original signal. Its expression is:
[0018]
[0019] Where: M mn Indicates from sampling signal point x m The corresponding quantile region q i Transfer to x n The corresponding region q j The probability, i.e., q i With q j The transition probabilities of the corresponding quantile relationships on matrix W are represented by the elements on the diagonal, while the elements on the diagonal are the corresponding self-transition probabilities.
[0020] Furthermore, in step S1, the waveforms of various disturbance types are converted into two-dimensional feature images using the MTF visualization method and dynamic transfer information encoding; a one-dimensional signal database of complex PQDs is constructed based on the IEEE 1159 power quality standard, and the mathematical model of composite PQDs is as follows:
[0021] f(t)=λ(t)sin(ωt)+φ(t)
[0022] In the formula, ω represents the fundamental angular frequency of the system; λ(t) represents the multiplication coefficient module of the disturbance signal, including sag, rise, interruption and flicker disturbances; φ(t) represents the superposition module of the disturbance signal, including harmonics, oscillations, pulses, gaps and spike disturbances;
[0023] After obtaining the MTF feature image datasets corresponding to different PQDs types, they are divided into training, validation, and test sets in a 6:2:2 ratio, which serve as inputs for subsequent deep learning recognition models.
[0024] Furthermore, the DenseNet-L lightweight skeleton network based on the dense connection mechanism in step S2 consists of convolutional layers, pooling layers, activation functions, dense connection blocks, transition layers, and fully connected layers. The dense connection blocks comprise three groups, consisting of 3, 6, and 9 groups of convolutional layers stacked and connected, respectively, with a growth rate k of 48. To improve the computational efficiency and structural compactness of the network, bottleneck layers and transition layers are introduced to achieve feature map dimensionality reduction. The basic components of the model are as follows:
[0025] Convolutional layer: Performs convolution operations to extract local features of the image.
[0026]
[0027] Where X is the input, W is the convolution kernel, b is the bias term, and y is the output feature map;
[0028] Activation function: Applying the ReLU function (a non-linear mapping function)
[0029]
[0030] Pooling layers: reduce the dimensionality of feature maps, typically using max pooling.
[0031] y = max(X) i:i+f,j:j+f )
[0032] Unlike traditional CNN architectures, when the number of densely connected layers is L, the number of connections is L(L+1) / 2, not just L. Therefore, the feature map obtained from the l-th layer is the result of concatenating the feature maps output by all previous layers along the channel dimension, and its expression is:
[0033] x l =H l ([x0,x1,K,x l-1 ])
[0034] Where, x l [x0, x1, ...] represents the output of layer l; [x0, x1, ...] represents the concatenation operation of the output feature maps of each layer; H l (·) represents a nonlinear combination function, consisting of a batch normalization (BN) layer, a linear activation function (ReLU), and a 3×3 convolutional layer (Conv). The BN layer calculation process is as follows:
[0035]
[0036] Where, μ B , γ and β are the mean and variance of the batch data, respectively; γ and β are the parameters learned by the model's backpropagation. and y i These are the input and output of BN, respectively.
[0037] Furthermore, in step S3, the two sub-modules, Channel Attention (CAM) and Spatial Attention (SAM), together constitute the CBAM attention mechanism module. CAM aggregates all-channel information through average pooling and max pooling to generate two different one-dimensional feature vectors. These vectors are then added element-wise after passing through a fully connected layer, and channel attention weights M are generated through an activation operation. c Then, multiply it element-wise with the input feature map to obtain the channel attention-weighted feature map F1, whose calculation expression is:
[0038] M C (F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F)))
[0039] Where F is the input feature map; AvgPool and MaxPool represent average pooling and max pooling operations, respectively; MLP is the fully connected operation; σ represents the sigmoid function;
[0040] The feature map F1, after CAM weighting, is used as the input to the SAM module. The input feature map F1 is then spatially max-pooled and average-pooled to obtain two two-dimensional feature maps. These two maps are concatenated and then subjected to convolution and activation operations to finally generate the spatial attention weights M. s This leads to the SAM-weighted feature map. The SAM weight calculation expression is:
[0041]
[0042] Among them, f 3×3 This represents a dimensionality reduction convolution operation with a kernel size of 3×3.
[0043] Furthermore, in step S4, the deep feature capture capability of the deep learning recognition network is improved by adding a CBAM attention mechanism module after the terminal densely connected block and before the fully connected layer. Specifically, step S4 involves the following steps: the feature map F output from the terminal densely connected block first enters the CAM module and undergoes max pooling and average pooling operations by channel to obtain two 1×1×628 one-dimensional feature vectors. These two feature vectors are then fed into the fully connected layer for computation and weighting. After activation, channel attention weights M are generated. c Then multiply it with the feature map F to obtain the input feature map F1 of the SAM module;
[0044] In the SAM module, the feature map F1 is first subjected to max pooling and average pooling operations according to its spatial location, and the two results are concatenated to generate an 8×8×2 feature map. The spatial attention weights M are then obtained by dimensionality reduction through a convolutional layer with 1 channel and activation by the Sigmoid function.s Finally, M s The feature obtained by multiplying the input feature map F1 is the feature enhanced by CBAM.
[0045] The DenseNet-LC fusion model combines the fast recognition capabilities of DenseNet-L's lightweight architecture with the deep feature information capture capabilities of CBAM, enabling the fusion classification model to demonstrate superior recognition accuracy and response efficiency in complex PQDs recognition tasks.
[0046] Further, step S5 includes:
[0047] Step 5-1: Use the constructed DenseNet-LC recognition network to train the two-dimensional MTF color-coded image dataset corresponding to each category of PQDs, and select 60%, 20%, and 20% of the sample data as the training set, validation set, and test set, respectively.
[0048] Step 5-2: Set the output mode of the fully connected layer of the DenseNet-LC model and initialize the network parameters;
[0049] Step 5-3: Set up the input data preprocessing for the DenseNet-LC network, including the input size of the MTF feature image, the number of channels, and data augmentation processing;
[0050] Step 5-4: Set the batch size and learning rate of the DenseNet-LC network, set the number of iterations (Epoch), use SGD to optimize the trainer, and dynamically adjust the initial learning rate between [0,1].
[0051] Step 5-5: The ReLU function is used as the activation function of the DenseNet-LC network. Average recognition accuracy, floating-point operations (FLOPs), number of parameters, model size, and classification time per image are used as evaluation metrics to measure the model's recognition accuracy and efficiency. The optimal performance model for PQDs is obtained through training and validation. The relevant metric expressions are:
[0052]
[0053] Where n represents the total number of categories; m j m represents the quantity of the j-th class; jj This represents the number of correctly identified categories j;
[0054] The calculation formulas for FLOPs in traditional convolutional layers, group convolutional layers, depthwise separable convolutional layers, and fully connected layers of a model are as follows:
[0055] FLOPs1 = 2Hout D out C in K h K d C out
[0056] FLOPs2 = 2H out D out C in K h K d C out / s
[0057] FLOPs3 = 2H out D out C in (K h K d +C out )
[0058] FLOPs4=2C in C out
[0059] Among them, H out and D out These represent the height and width of the output feature map, respectively; C in and C out These represent the number of input and output channels, respectively; K h and K d ...
[0060] Beneficial Effects: Compared with existing technologies, this invention transforms one-dimensional time-series disturbance signals into a clearly identifiable two-dimensional visual image based on MTF color encoding technology. By considering the dependency relationship between each quantile unit and the time step, it avoids the loss of temporal information in the one-dimensional time-series signal. By designing a lightweight network architecture with a dense connection mechanism (DenseNet-L), the ability to extract local image features is improved while reducing the number of model parameters and computational complexity, effectively improving the efficiency of disturbance recognition. The introduction of the CBAM attention mechanism further enhances the network's ability to capture deep image features and improves robustness under environmental noise. The DenseNet-LC fusion model also reduces the risk of overfitting by introducing a dense connection mechanism and regularization, making the model more efficient in processing nonlinear and complex disturbance time-series data, thus meeting the needs of power quality health status monitoring in modern power systems. Therefore, the method of this invention can effectively improve the classification accuracy and noise resistance of complex PQDs, while also possessing real-time efficiency performance, providing technical support for the rapid perception of the operational health status of distribution network systems. Attached Figure Description
[0061] Figure 1 This is a flowchart of the method of the present invention;
[0062] Figure 2 This is a visual flowchart of the MTF conversion process for one-dimensional signals;
[0063] Figure 3 This is a structural diagram of the DenseNet-L model;
[0064] Figure 4 It is a class activation heatmap enhanced by the CBAM attention mechanism;
[0065] Figure 5 This is a visual transformation diagram of the measured disturbance signal using the method of the present invention;
[0066] Figure 6 This is a performance comparison chart between the method of this invention and existing advanced PQDs identification methods. Detailed Implementation
[0067] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.
[0068] Example 1:
[0069] like Figure 1 As shown, this embodiment provides a power quality disturbance identification method based on Markov transition fields and lightweight densely connected networks, including the following steps:
[0070] S1: Based on MTF color encoding technology, a one-dimensional signal data visualization conversion method based on MTF is proposed;
[0071] Reference Figure 2 Step S1 specifically includes:
[0072] A1: Given a time series signal X = {x1, x2, ..., x...} N}, x i For the i-th sampling signal point, the MTF method first divides the time-series signal into Q quantile units q according to the amplitude. j (j∈[1,Q]) is discretized, and each value is quantized. For any numerical point x... i It can be mapped to the corresponding quantile q i Then, the sampled signal points x at previous and subsequent times are calculated along the time axis using a first-order Markov chain. t-1 With x t From region qi Transfer to q j The probabilities are calculated, and each probability P is used as an element w. ij We construct the Q×Q dimension Markov state transition matrix W, whose expression is as follows:
[0073]
[0074] A2: To address the issue of significant loss of one-dimensional time-series information caused by Markov state transition matrices, an improvement is made using MTF (Mean Transition Factor). By considering temporal relationships, each transition probability is arranged sequentially along time, extending the Markov state transition matrix W to a cross-timescale MTF matrix M, thus preserving the temporal correlation of the original signal. Its expression is:
[0075]
[0076] Where: M mn Indicates from sampling signal point x m The corresponding quantile region q i Transfer to x n The corresponding region q j The probability, i.e., q i With q j The transition probabilities of the corresponding quantile relationships on matrix W are represented by the elements on the diagonal, while the elements on the diagonal are the corresponding self-transition probabilities.
[0077] S2: Construct a standard PQDs signal set. Based on the MTF visualization conversion method proposed in step S1, transform the complex one-dimensional PQDs signal set into a two-dimensional feature image dataset and divide it into a training set, a validation set, and a test set.
[0078] The waveforms of various disturbance types are transformed into two-dimensional feature images using the MTF visualization method and dynamic transfer information encoding. A one-dimensional signal database of complex PQDs is constructed based on the IEEE 1159 power quality standard. The mathematical model of composite PQDs is as follows:
[0079] f(t)=λ(t)sin(ωt)+φ(t)
[0080] In the formula, ω represents the fundamental angular frequency of the system; λ(t) represents the multiplication coefficient module of the disturbance signal, including sag, rise, interruption and flicker disturbance; φ(t) represents the superposition module of the disturbance signal, including harmonics, oscillations, pulses, gaps and spike disturbances.
[0081] After obtaining the MTF feature image datasets corresponding to different PQDs types, they are divided into training, validation, and test sets in a 6:2:2 ratio, which serve as inputs for subsequent deep learning recognition models.
[0082] S3: Develop a lightweight recognition network model based on a dense connection mechanism called DenseNet-L;
[0083] like Figure 3 As shown, the DenseNet-L lightweight backbone network based on a dense connection mechanism consists of convolutional layers, pooling layers, activation functions, dense connection blocks, transition layers, and fully connected layers. The dense connection blocks comprise three groups, consisting of 3, 6, and 9 groups of convolutional layers stacked together, respectively, with a growth rate k of 48. To improve the network's computational efficiency and structural compactness, bottleneck layers and transition layers are introduced to achieve feature map dimensionality reduction. The basic components of the model are as follows:
[0084] Convolutional layer: Performs convolution operations to extract local features of the image.
[0085]
[0086] Where X is the input, W is the convolution kernel, b is the bias term, and y is the output feature map;
[0087] Activation function: Applying the ReLU function (a non-linear mapping function)
[0088]
[0089] Pooling layers: reduce the dimensionality of feature maps, typically using max pooling.
[0090] y = max(X) i:i+f,j:j+f )
[0091] Unlike traditional CNN architectures, when the number of densely connected layers is L, the number of connections is L(L+1) / 2, not just L. Therefore, the feature map obtained from the l-th layer is the result of concatenating the feature maps output by all previous layers along the channel dimension, and its expression is:
[0092] x l =H l ([x0,x1,K,x l-1 ])
[0093] Where, x l [x0, x1, ...] represents the output of layer l; [x0, x1, ...] represents the concatenation operation of the output feature maps of each layer; H l (·) represents a nonlinear combination function, consisting of a batch normalization (BN) layer, a linear activation function (ReLU), and a 3×3 convolutional layer (Conv). The BN layer calculation process is as follows:
[0094]
[0095] Where, μ B , γ and β are the mean and variance of the batch data, respectively; γ and β are the parameters learned by the model's backpropagation. and y i These are the input and output of BN, respectively.
[0096] S4: Construct a CBAM attention mechanism module composed of CAM and SAM. CAM aggregates full-channel information through average pooling and max pooling to generate two different one-dimensional feature vectors. These vectors are then added element-wise after passing through a fully connected layer, and channel attention weights M are generated through activation operations. c Then, multiply it element-wise with the input feature map to obtain the channel attention-weighted feature map F1, whose calculation expression is:
[0097] M C (F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F)))
[0098] Where F is the input feature map; AvgPool and MaxPool represent average pooling and max pooling operations, respectively; MLP is the fully connected operation; and σ represents the sigmoid function.
[0099] The feature map F1, after CAM weighting, is used as the input to the SAM module. The input feature map F1 is then spatially max-pooled and average-pooled to obtain two two-dimensional feature maps. These two maps are concatenated and then subjected to convolution and activation operations to finally generate the spatial attention weights M. s This leads to the SAM-weighted feature map. The SAM weight calculation expression is:
[0100]
[0101] Among them, f 3×3 This represents a dimensionality reduction convolution operation with a kernel size of 3×3.
[0102] S5: By combining the DenseNet-L model and the CBAM model through module fusion, a lightweight DenseNet-LC recognition model with both recognition accuracy and efficiency is constructed.
[0103] The deep feature capture capability of deep learning recognition networks is improved by adding a CBAM attention mechanism module after the terminal densely connected block and before the fully connected layer. Specifically, the feature map F output by the terminal densely connected block first enters the CAM module and undergoes max pooling and average pooling operations by channel to obtain two 1×1×628 one-dimensional feature vectors. These two feature vectors are then fed into the fully connected layer for computation and weighting, and after activation, channel attention weights M are generated. c Then multiply it with the feature map F to obtain the input feature map F1 of the SAM module.
[0104] In the SAM module, the feature map F1 is first subjected to max pooling and average pooling operations according to its spatial location, and the two results are concatenated to generate an 8×8×2 feature map. The spatial attention weights M are then obtained by dimensionality reduction through a convolutional layer with 1 channel and activation by the Sigmoid function. s Finally, M s The feature obtained by multiplying the input feature map F1 is the feature enhanced by CBAM.
[0105] In this embodiment, the following is obtained: Figure 4 The image shows a class activation heatmap enhanced by the CBAM attention mechanism.
[0106] The DenseNet-LC fusion model combines the fast recognition capabilities of DenseNet-L's lightweight architecture with the deep feature information capture capabilities of CBAM, enabling the fusion classification model to demonstrate superior recognition accuracy and response efficiency in complex PQDs recognition tasks.
[0107] S6: Train DenseNet-LC using the training set, and at the same time combine the validation set to perform loss testing and performance verification on the model training process, and save the optimal training model with the lowest loss value during the training process.
[0108] Step S6 specifically includes the following steps 1 to 5:
[0109] Step 1: Use the constructed DenseNet-LC recognition network to train the two-dimensional MTF color-coded image dataset corresponding to each category of PQDs, and select 60%, 20%, and 20% of the sample data as the training set, validation set, and test set, respectively.
[0110] Step 2: Set the output mode of the fully connected layers in the DenseNet-LC model and initialize the network parameters;
[0111] Step 3: Set up input data preprocessing for the DenseNet-LC network, including MTF feature image input size, number of channels, and data augmentation processing;
[0112] Step 4: Set the batch size and learning rate of the DenseNet-LC network, set the number of iterations (epochs), use SGD to optimize the trainer, and dynamically adjust the initial learning rate between [0,1].
[0113] Step 5: The ReLU function is used as the activation function for the DenseNet-LC network. Average recognition accuracy, number of floating-point operations (FLOPs), number of parameters, model size, and classification time per image are used as evaluation metrics to measure the model's recognition accuracy and efficiency. The optimal performance model for PQDs is obtained through training and validation. The relevant metric expressions are:
[0114]
[0115] Where n represents the total number of categories; m j m represents the quantity of the j-th class; jj This represents the number of correctly identified categories j.
[0116] The calculation formulas for FLOPs in traditional convolutional layers, group convolutional layers, depthwise separable convolutional layers, and fully connected layers of a model are as follows:
[0117] FLOPs1 = 2H out D out C in K h K d C out
[0118] FLOPs2 = 2H out D out C in K h K d C out / s
[0119] FLOPs3 = 2H out D out C in (K h K d +C out )
[0120] FLOPs4=2C in C out
[0121] Among them, H out and D out These represent the height and width of the output feature map, respectively; C in and C out These represent the number of input and output channels, respectively; K h and K d ...
[0122] S7: The recognition performance of the DenseNet-LC optimal performance model is tested using the MTF image test set corresponding to the PQDs simulation generated signal and the actual disturbance signal of the substation, and the final complex PQDs recognition result is obtained.
[0123] Example 2:
[0124] To verify the effectiveness and effect of the method of the present invention, this embodiment applies the solution of the present invention in a practical way, specifically as follows:
[0125] The measured disturbance data used in this embodiment were obtained from a power quality monitoring device in a 10kV distribution system in a certain area of the Jiangsu power grid in southern Jiangsu Province. A total of 181 samples were collected, with the waveform recording device sampling frequency at 12.8kHz and the signal duration at 0.624s. To meet the input requirements of the IEEE Std1159-2019 standard and the image recognition network proposed in this invention, 10 cycles of typical data from each signal were extracted and normalized, serving as the input to the signal visualization module.
[0126] First, a recognition model was trained based on the MTF image database corresponding to the simulated disturbance signals from IEEE 1159, and the optimal performance model with the lowest loss value during training was saved. For the measured power quality data of this project, the typical disturbance portion of the measured signal was sliced into 10-cycle segments using the MTF color encoding method and then visualized. The disturbance signal data in the training set is shown in Table 1 below:
[0127] Table 1. Training Set Data for PQDs Standard Signals
[0128]
[0129]
[0130] A DenseNet-LC fusion recognition model was constructed based on the above training set. The parameters of the DenseNet-L lightweight skeleton model are shown in Table 2 below:
[0131] Table 2. Parameter settings for the DenseNet-L lightweight skeleton classification model
[0132]
[0133] The hyperparameter settings for training the PQDs recognition model are shown in Table 3. To obtain the optimal training model, the Adam optimizer was used, and the cross-entropy loss function was used to calculate the loss value. After obtaining the optimal training model, it was transferred to a dataset of 181 substation measured disturbances for disturbance recognition. The PQDs measured signal recognition results are shown in Table 4. The measured waveforms and MTF feature images of typical PQDs events are shown in Table 4. Figure 5As shown. Furthermore, to verify the superiority of the method of this invention, it was compared with two existing advanced PQDs deep learning recognition methods, as detailed below. Figure 6 As shown.
[0134] Table 3 Hyperparameter settings during the training process of the DenseNet-LC fusion model
[0135]
[0136] Table 4. Measured signal classification results of PQDs
[0137]
[0138] In summary, the PQDs identification method based on MTF and lightweight DenseNet proposed in this invention can effectively improve the overall identification accuracy of complex PQDs, has high robustness, and meets the requirements of real-time efficiency, providing technical support for intelligent situational awareness and precise operation and maintenance of power grids.
Claims
1. A method for identifying power quality disturbances based on Markov transition fields and lightweight densely connected networks, characterized in that, Includes the following steps: S1: Construct a standard PQDs signal set, and based on the MTF visualization transformation method, transform the complex one-dimensional PQDs signal set into a two-dimensional feature image dataset, and divide it into training set, validation set and test set; S2: Develop a lightweight recognition network model based on a dense connection mechanism called DenseNet-L; S3: Construct a CBAM attention mechanism model that combines CAM and SAM; S4: By combining the DenseNet-L lightweight recognition network model and the CBAM attention mechanism model through module fusion, the DenseNet-LC lightweight recognition model is constructed. S5: Train the DenseNet-LC model using the training set, and at the same time combine the validation set to perform loss testing and performance verification on the model training process, and save the best performance model with the lowest loss value during the training process. S6: Use the test set to test the recognition performance of the DenseNet-LC optimal performance model and obtain the final recognition results of complex PQDs.
2. The power quality disturbance identification method based on Markov transition fields and lightweight densely connected networks according to claim 1, characterized in that, The MTF visualization conversion method in step S1 is a one-dimensional time-series signal visualization conversion method based on MTF color encoding. Its specific operation includes: Given a time series signal X = {x1, x2, ..., x...} N }, x i For the i-th sampling signal point, the MTF method first divides the time-series signal into Q quantile units q according to the amplitude. j (j∈[1,Q]) is discretized, and each value is quantized. For any numerical point x... i Mapped to the corresponding quantile q i Then, the sampling signal points x at previous and subsequent times are calculated along the time axis using a first-order Markov chain. t-1 With x t From region q i Transfer to q j The probabilities are calculated, and each probability P is used as an element w. ij We construct the Q×Q dimension Markov state transition matrix W, whose expression is as follows:
3. The power quality disturbance identification method based on Markov transition fields and lightweight densely connected networks according to claim 2, characterized in that, The MTF visualization transformation method improves the Markov state transition matrix by utilizing MTF. By considering temporal relationships and arranging each transition probability sequentially along time, the Markov state transition matrix W is extended to a cross-timescale MTF matrix M, preserving the temporal correlation of the original signal. Its expression is: Where: M mn Indicates from sampling signal point x m The corresponding quantile region q i Transfer to x n The corresponding region q j The probability, i.e., q i With q j The transition probabilities of the corresponding quantile relationships on matrix W are represented by the elements on the diagonal, while the elements on the diagonal are the corresponding self-transition probabilities.
4. The power quality disturbance identification method based on Markov transition fields and lightweight densely connected networks according to claim 1, characterized in that, In step S1, the waveforms of various disturbance types are transformed into two-dimensional feature images through dynamic transfer information encoding using the MTF visualization method; a one-dimensional signal database of complex PQDs is constructed based on the IEEE 1159 power quality standard, and the mathematical model of composite PQDs is as follows: f(t)=λ(t)sin(ωt)+φ(t) In the formula, ω represents the fundamental angular frequency of the system; λ(t) represents the multiplication coefficient module of the disturbance signal, including sag, rise, interruption and flicker disturbance; φ(t) represents the superposition module of the disturbance signal, including harmonics, oscillations, pulses, gaps and spike disturbances.
5. The power quality disturbance identification method based on Markov transition fields and lightweight densely connected networks according to claim 1, characterized in that, The DenseNet-L lightweight skeleton network based on the dense connection mechanism in step S2 consists of convolutional layers, pooling layers, activation functions, dense connection blocks, transition layers, and fully connected layers. The dense connection blocks comprise three groups, consisting of stacked convolutional layers of 3, 6, and 9 groups respectively. To improve the network's computational efficiency and structural compactness, bottleneck layers and transition layers are introduced to achieve feature map dimensionality reduction. The basic components of the model are as follows: Convolutional layer: Performs convolution operations to extract local features of the image. Where X is the input, W is the convolution kernel, b is the bias term, and y is the output feature map; Activation function: Applying the ReLU function (a non-linear mapping). Pooling layers: reduce the dimensionality of feature maps, typically using max pooling. y=max(X i:i+f,j:j+f ) The feature map obtained from layer l is the result of concatenating the feature maps output by all previous layers along the channel dimension. Its expression is: x l =H l ([x0,x1,K,x l-1 ]) Where, x l [x0, x1, ...] represents the output of layer l; [x0, x1, ...] represents the concatenation operation of the output feature maps of each layer; H l (·) represents a nonlinear combination function, consisting of a batch normalization layer, a linear activation function, and a 3×3 convolutional layer; the batch normalization layer calculation process is as follows: Where, μ B , γ and β are the mean and variance of the batch data, respectively; γ and β are the parameters learned by the model's backpropagation. and y i These are the input and output of BN, respectively.
6. The power quality disturbance identification method based on Markov transition fields and lightweight densely connected networks according to claim 1, characterized in that, In step S3, the two sub-modules, Channel Attention (CAM) and Spatial Attention (SAM), together constitute the CBAM attention mechanism module. CAM aggregates all-channel information through average pooling and max pooling to generate two different one-dimensional feature vectors. These vectors are then added element-wise after passing through a fully connected layer, and channel attention weights M are generated through activation operations. c Then, multiply it element-wise with the input feature map to obtain the channel attention-weighted feature map F1, whose calculation expression is: M C (F)<σ(MLP(AvgPool(F))+MLP(MaxPool(F))) Where F is the input feature map; AvgPool and MaxPool represent average pooling and max pooling operations, respectively; MLP is the fully connected operation; σ represents the sigmoid function; The feature map F1, after CAM weighting, is used as the input to the SAM module. The input feature map F1 is then spatially max-pooled and average-pooled to obtain two two-dimensional feature maps. These two maps are concatenated and then subjected to convolution and activation operations to finally generate the spatial attention weights M. s This leads to the SAM-weighted feature map.
7. The power quality disturbance identification method based on Markov transition fields and lightweight densely connected networks according to claim 1, characterized in that, The expression for calculating the SAM weights in the SAM module of step S3 is as follows: Among them, f 3×3 This represents a dimensionality reduction convolution operation with a kernel size of 3×3.
8. The power quality disturbance identification method based on Markov transition fields and lightweight densely connected networks according to claim 1, characterized in that, In step S4, the combination of the DenseNet-L lightweight recognition network model and the CBAM attention mechanism model is achieved by adding the CBAM attention mechanism after the densely connected blocks at the ends and before the fully connected layers to improve the deep feature capture capability of the deep learning recognition network.
9. The power quality disturbance identification method based on Markov transition fields and lightweight densely connected networks according to claim 8, characterized in that, Step S4 specifically includes: the feature map F output by the terminal densely connected block first enters the CAM module, and performs max pooling and average pooling operations by channel to obtain two one-dimensional feature vectors. Then, these two feature vectors are fed into the fully connected layer for operation and weighting. After activation operation, channel attention weights M are generated. c Then multiply it with the feature map F to obtain the input feature map F1 of the SAM module; In the SAM module, the feature map F1 is first subjected to max pooling and average pooling operations according to its spatial location, and the two results are concatenated to generate a feature map. Then, the spatial attention weights M are obtained by dimensionality reduction through a convolutional layer with 1 channel and activation by the Sigmoid function. s Finally, M s The feature obtained by multiplying the input feature map F1 is the feature enhanced by CBAM.
10. The power quality disturbance identification method based on Markov transition fields and lightweight densely connected networks according to claim 1, characterized in that, Step S5 includes: Step 5-1: Use the constructed DenseNet-LC recognition network to train the two-dimensional MTF color-coded image dataset corresponding to each category of PQDs, and select 60%, 20%, and 20% of the sample data as the training set, validation set, and test set, respectively. Step 5-2: Set the output mode of the fully connected layer of the DenseNet-LC model and initialize the network parameters; Step 5-3: Set up the input data preprocessing for the DenseNet-LC network, including the input size of the MTF feature image, the number of channels, and data augmentation processing; Step 5-4: Set the batch size and learning rate of the DenseNet-LC network, set the number of iterations (Epoch), use SGD to optimize the trainer, and dynamically adjust the initial learning rate between [0,1]. Step 5-5: The ReLU function is used as the activation function of the DenseNet-LC network. Average recognition accuracy, floating-point operations (FLOPs), number of parameters, model size, and classification time per image are used as evaluation metrics to measure the model's recognition accuracy and efficiency. The optimal performance model for PQDs is obtained through training and validation. The relevant metric expressions are: Where n represents the total number of categories; m j m represents the quantity of the j-th class; jj This represents the number of correctly identified categories j; The calculation formulas for FLOPs in traditional convolutional layers, group convolutional layers, depthwise separable convolutional layers, and fully connected layers of a model are as follows: FLOPs1=2H out D out C in K h K d C out FLOPs2=2H out D out C in K h K d C out / s FLOPs3=2H out D out C in (K h K d +C out ) FLOPs4=2C in C out Among them, H out and D out These represent the height and width of the output feature map, respectively; C in and C out These represent the number of input and output channels, respectively; K h and K d ...
Citation Information
Patent Citations
Deep and far sea wind power PQDs classification method and system based on image recognition
CN116994040A
Intelligent fault diagnosis method for rolling bearing-rotor system based on VMTF-RBCBAM-Net
CN120067914A
Method and system for forecasting non-stationary time-series
US20230108916A1
Quick and intelligent IR7-EC network based classification method for concrete image crack type
US20240029402A1
Power quality analysis system and method for monitoring from the outside of multiconductor cables
WO2021160230A1
Cited By
Power quality disturbance classification method based on feature fusion and dense network
CN122244569A