A power quality identification method and device based on staggered fusion coding

By employing interleaved fusion coding and deep learning methods, three-phase voltage signals are time-aligned, denoised, and standardized. Combined with a neural network model using dilated convolution and attention mechanisms, accurate identification of power quality disturbances is achieved, solving the problems of low accuracy and poor adaptability in identifying complex power quality issues in traditional methods.

CN120873769BActive Publication Date: 2026-02-03HUNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511413785.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-02-03
Estimated Expiration
2045-09-29

AI Technical Summary

Technical Problem

Traditional power quality identification methods are difficult to efficiently and accurately identify complex and intermittent power quality problems, especially when faced with nonlinear and impulsive loads, they cannot accurately capture the occurrence time and duration of power quality problems.

Method used

A power quality identification method based on interleaved fusion coding is adopted. The three-phase voltage signal is processed by time alignment, noise reduction and normalization, segmentation and frame processing are performed, and after being converted into a two-dimensional matrix, a neural network model with dilated convolution and dilated attention mechanism is used for identification.

Benefits of technology

It enables accurate and rapid identification of power quality disturbances, improves the accuracy and efficiency of identification, overcomes the problems of low accuracy and poor adaptability of traditional methods in complex power quality problems, and provides reliable technical support for the safe and stable operation of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873769B_ABST
    Figure CN120873769B_ABST
Patent Text Reader

Abstract

The application discloses a power quality identification method and device based on staggered fusion coding, which comprises the following steps: time sequence alignment, noise reduction and standardization of the pre-acquired three-phase voltage time sequence value to obtain a first data set; non-overlapping and skipping segment division of each phase based on the first data set to obtain a three-phase piece signal set; piece signal framing based on the first condition to obtain a frame signal set of each piece signal based on the piece signal set; the first condition comprises the same framing length in the same piece signal and the allowed data overlap between adjacent frame signals; data fusion based on the second condition to obtain a two-dimensional matrix of each piece signal based on the frame signal set; the second condition comprises that each row of the two-dimensional matrix corresponds to a framing moment, and each row alternately takes values from the frame signals of the same framing moment in sequence and fills them; converting each two-dimensional matrix into a single-channel image, and identifying the power quality of the single-channel image based on a neural network model based on a hollow convolution and a hollow attention mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system monitoring technology, and in particular to a power quality identification method and device based on interleaved fusion coding. Background Technology

[0002] With the continuous development and increasing complexity of modern power systems, a large number of nonlinear and impulsive loads are connected to the power grid, making power quality issues increasingly prominent. The quality of power directly affects the safe and stable operation of the power system and the normal operation of various electrical equipment. For example, three-phase voltage imbalance can cause motors to overheat, vibrate, or even be damaged, thus affecting the normal operation of industrial production; harmonic pollution increases grid losses and interferes with communication systems, etc.

[0003] Traditional power quality identification methods have several limitations. These methods primarily include those based on simple threshold judgments and those based on frequency domain analysis such as Fourier transforms. Existing methods based on simple threshold judgments can typically only provide a rough identification of power quality problems that significantly deviate from the normal range, while failing to accurately identify complex and intermittent power quality issues. Existing methods based on frequency domain analysis, such as Fourier transforms, often have limitations when processing time-varying signals, failing to accurately capture the timing and duration of power quality problems. Faced with the increasing complexity of power quality problems in power systems, traditional power quality identification methods struggle to meet the demands for accurate and rapid identification.

[0004] Therefore, a new technical solution is urgently needed to address the technical problem of how to efficiently and accurately identify power quality issues. Summary of the Invention

[0005] This invention provides a power quality identification method and apparatus based on interleaved fusion coding, which solves the technical problem of how to efficiently and accurately identify power quality problems.

[0006] To achieve the above objectives, the present invention provides a power quality identification method based on interleaved fusion coding, comprising:

[0007] The pre-acquired three-phase voltage timing values ​​are time-aligned, denoised, and normalized to obtain the first dataset; based on the first dataset, non-overlapping and skipped segments within each phase are segmented to obtain the three-phase slice signal set;

[0008] Based on the slice signal set, the slice signal is framed according to the first condition to obtain the frame signal set of each slice signal; the first condition includes that the frame length within each slice signal is the same and that data overlap is allowed between adjacent frame signals; based on the frame signal set, data is fused according to the second condition to obtain a two-dimensional matrix of each slice signal; the second condition includes that each row of the two-dimensional matrix corresponds to a frame time, and each row is sequentially filled with values ​​taken and alternately taken from the frame signals of the same frame time in three identical order;

[0009] Each two-dimensional matrix is ​​converted into a single-channel image, and power quality identification is performed on the single-channel image based on a neural network model with dilated convolution and dilated attention mechanisms.

[0010] Preferably, the timing alignment and noise reduction of the pre-acquired three-phase voltage timing values ​​include:

[0011] Select one phase as the reference phase, calculate the cross-correlation function value between the reference phase voltage signal and the remaining two phase voltage signals under a preset number of delay times based on the pre-acquired three-phase voltage timing values, and take the delay time corresponding to the maximum value of the cross-correlation function value as the first delay time between the remaining two phase voltage signals and the reference phase voltage signal. Based on the first delay time, perform time shift compensation and alignment between the remaining two phase voltage signals and the reference phase voltage signal to obtain three-phase voltage signals that are completely synchronized in time.

[0012] The three-phase voltage signals that are completely synchronized in time are decomposed by wavelet and then cyclically shifted to obtain a preset number of signal versions. Each signal version is independently subjected to wavelet threshold denoising and the denoising results are obtained separately. All denoising results are inversely shifted back to the aligned state and the average value is taken to obtain the first three-phase voltage signal. The first three-phase voltage signal is combined with the inter-layer differential threshold strategy to perform the first processing to obtain the second three-phase voltage signal, thus completing the denoising process. The first processing includes noise level estimation, threshold calculation and threshold function optimization performed sequentially.

[0013] Preferred, standardization includes:

[0014] Assume the second and third phase voltage signals are represented as follows: ; ; ;in Sampling rate, For the data collection time window, The three phases A, B, and C are respectively at time points. The instantaneous value of the voltage;

[0015] Three-phase joint standardization is performed based on the second and third phase voltage signals, including:

[0016] Calculate the overall average value of the three-phase voltage signal and overall standard deviation :

[0017] ;

[0018] ;

[0019] Then the three-phase voltage signal Points Standardized value Represented as:

[0020] .

[0021] Preferably, based on the first dataset, segmentation of each phase into non-overlapping and non-skipped segments yields a three-phase slice signal set including:

[0022] Based on the third condition, the three-phase voltage signals in the first dataset are divided into slice signals at a preset time interval to obtain a set of slice signals for the three phases; the third condition includes that the start and end times of the three-phase division are the same and the preset time interval is the same, and there is no data overlap or skipping between the slice signals;

[0023] Then each phase of the first Data of individual signals Represented as:

[0024] ;

[0025] in, ; ; The preset segmentation time interval; , This indicates rounding down to the nearest integer.

[0026] Preferably, the slice signal is framed based on the slice signal set according to the first condition, and the resulting frame signal set of each slice signal includes:

[0027] Assume that the subsequent three-phase voltage signals will be converted into an image with a width of H and a length of M; when performing segmented signal framing, assume the frame length is... When a slice of signal needs to be divided into a total of frames, At that time, the frame step size Represented as:

[0028] ;

[0029] in, ; ;

[0030] Then each phase of the first The first piece of signal The frame signal is represented as:

[0031] ;

[0032] in, ; ;

[0033] Maintain the following during frame division:

[0034] .

[0035] Preferably, data fusion is performed based on the frame signal set according to the second condition to obtain a two-dimensional matrix of each signal slice, including:

[0036] Construct a two-dimensional matrix with H rows and M columns, i.e., H in length and M in width. , Indicates the first Individual signal, Indicates the first OK, Indicates the first Columns; two-dimensional matrix The H lines correspond to a frame time in sequence;

[0037] For a two-dimensional matrix The first in The values ​​are sequentially and alternately taken from the frame signals at the three corresponding frame times, and the values ​​are selected according to the order of the data in each frame signal, including:

[0038] No. In the row, the first position is taken from phase A. The first value of the first frame signal is used for filling, and the second position is taken from the B phase. The first value of the first frame signal is used for filling, and the third position is taken from the C phase. The first value of the first frame signal is used for filling, and the fourth position is taken from the first value of phase A. The second value of the first frame signal is used for filling, and the fifth position is taken from the B phase. The second value of the first frame signal is used for filling, and the sixth position is taken from the C phase. The second value of each frame signal is used to fill the position, and so on, alternating between values ​​and filling, until M positions are filled.

[0039] Preferably, converting each two-dimensional matrix into a single-channel image includes:

[0040] The two-dimensional matrix is ​​transposed and then mapped and encoded to a preset pixel value intensity range to obtain a single-channel image corresponding to each slice signal. Zhang Single Channel Image Represented as:

[0041] ;

[0042] in, Indicates transpose. These are linear coefficients.

[0043] Preferably, power quality identification of single-channel images based on a neural network model using dilated convolution and dilated attention mechanisms includes:

[0044] Construct a neural network model based on dilated convolution and dilated attention mechanisms, including:

[0045] Construct an input layer, a predetermined number of dilated units connected end to end, a fully connected layer, and an output layer connected in sequence; the dilated unit includes a dilated convolutional layer, a normalization layer, a dilated channel attention mechanism module, an activation layer, and a regular convolutional layer;

[0046] In the Output feature map of the dilated convolutional layer in each dilated unit Represented as:

[0047] ;

[0048] in, Indicates the void ratio Aperture convolution; and These are learnable parameters; for Activation function; For the first Layer feature map; Represents convolution;

[0049] In the In the void channel attention mechanism module of each void unit, the receiver... ,Will Feature map Obtained through global average pooling Feature weight bars, where The number of channels is used; adaptive dilated convolution kernels are used to extract features from the feature weights, and the parameters of the adaptive dilated convolution kernels are dynamically adjusted according to the features of the input data; after feature extraction, the features are processed by an activation function, and the activated result is multiplied back into the original feature map. Output of the void channel attention mechanism module for each void unit Represented as:

[0050] ;

[0051] in, Indicates dilated convolution; Indicates average pooling;

[0052] In the dilated convolutional layer and dilated channel attention mechanism module of the dilated unit, the dilation rate is adaptively selected according to the resolution size of the input feature image. ,include:

[0053] ;

[0054] in, These are parameters used to control the coverage of the receptive field.

[0055] Preferably, the method of identifying power quality from single-channel images using a neural network model based on dilated convolution and dilated attention mechanisms further includes:

[0056] Training a neural network model based on dilated convolution and dilated attention mechanisms includes:

[0057] Three-phase voltage data were collected as training, validation, and test sets; data augmentation was performed on the data in the training set.

[0058] Determine the model's hyperparameters and set the learning rate to determine the step size for updating parameters in each iteration;

[0059] Initialize model parameters and train the model on the data-augmented training set. During training, periodically calculate the model's preset performance metrics on the validation set to evaluate whether the model has converged. After convergence, perform performance testing on the test set. After training is complete, use a neural network model based on dilated convolution and dilated attention mechanisms to perform image recognition on each single-channel image to obtain the power quality problem identification results.

[0060] The present invention also provides a power quality identification device based on interleaved fusion coding, which is used in the method of the present invention. The device includes a first module, a second module, a third module and a fourth module.

[0061] The first module is used to perform timing alignment, noise reduction, and normalization on the pre-acquired three-phase voltage timing values ​​to obtain the first dataset; based on the first dataset, non-overlapping and skipped segments are segmented within each phase to obtain the three-phase slice signal set;

[0062] The second module is used to perform segmentation of the segmented signals based on the segmented signal set and the first condition to obtain the frame signal set of each segmented signal; the first condition includes that the segmented frame lengths within each segmented signal are the same and that data overlap is allowed between adjacent frame signals;

[0063] The third module is used to perform data fusion based on the frame signal set and the second condition to obtain a two-dimensional matrix of each signal. The second condition includes that each row of the two-dimensional matrix corresponds to a frame time, and each row is sequentially filled with values ​​taken and filled from the three identical frame signals at the same frame time.

[0064] The fourth module is used to convert each two-dimensional matrix into a single-channel image and perform power quality identification on the single-channel image based on a neural network model with dilated convolution and dilated attention mechanisms.

[0065] The present invention has the following beneficial effects:

[0066] This invention presents a power quality identification method based on interleaved fusion coding. Through time-series alignment, noise reduction, and standardization preprocessing, it effectively improves data quality and consistency. By segmenting and framing the signal, it achieves accurate capture of local features of power quality disturbances. Using a three-phase interleaved fusion coding method, it converts one-dimensional time-series signals into two-dimensional images, effectively preserving the time-series features and phase-to-phase correlations of voltage signals, providing an optimal input format for deep learning-based pattern recognition. By constructing a neural network model that integrates dilated convolution and dilated channel attention mechanisms, it significantly reduces computational complexity and improves model efficiency and accuracy while expanding the receptive field and capturing long-range dependencies. This invention effectively overcomes the problems of low accuracy and poor adaptability of traditional methods when dealing with complex, transient power quality issues, achieving accurate and rapid identification of various power quality disturbance types, and providing reliable technical support for the safe and stable operation of power systems.

[0067] The power quality identification device based on interleaved fusion coding of the present invention, when used in the method of the present invention, has the same beneficial effects as the method of the present invention.

[0068] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description

[0069] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0070] Figure 1 This is a schematic diagram of the method flow of a preferred embodiment of the present invention.

[0071] Figure 2 This is a schematic diagram of a neural network model structure based on dilated convolution and dilated attention mechanisms according to a preferred embodiment of the present invention.

[0072] Figure 3 This is a schematic diagram of a cavity unit according to a preferred embodiment of the present invention.

[0073] Figure 4 This is a schematic diagram of the training curve of a preferred embodiment of the present invention.

[0074] Figure 5 This is an example image of a single-channel grayscale image of the three-phase voltage timing data interleaved and fused in a preferred embodiment of the present invention, where L0~L11 are power quality type labels.

[0075] Figure 6 This is a schematic diagram of the confusion matrix according to a preferred embodiment of the present invention. Detailed Implementation

[0076] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings, but the present invention can be implemented in many different ways as defined and covered by the claims.

[0077] See Figure 1 In a preferred embodiment of the present invention, a power quality identification method based on interleaved fusion coding is provided, specifically including the following steps:

[0078] S1. Perform timing alignment, noise reduction, and standardization on the pre-acquired three-phase voltage timing values ​​to obtain the first dataset.

[0079] In a preferred embodiment of the present invention, a sampling rate higher than a preset multiple of the power grid base frequency is used. Three-phase voltage timing values ​​are collected at a sampling rate ranging from 10 kHz to 100 kHz to ensure coverage of harmonics (up to the 50th order) and transient disturbances (such as voltage spikes / sags). In a preferred embodiment of the invention, sampling is performed at 60.4 kHz, with approximately 128 data points collected per cycle.

[0080] In a preferred embodiment of the present invention, timing alignment of the pre-acquired three-phase voltage timing values ​​includes:

[0081] Select one phase as the reference phase, calculate the cross-correlation function value between the reference phase voltage signal and the remaining two phase voltage signals under a preset number of delay times based on the pre-acquired three-phase voltage timing values, and take the delay time corresponding to the maximum value of the cross-correlation function value as the first delay time between the remaining two phase voltage signals and the reference phase voltage signal. Based on the first delay time, perform time shift compensation and alignment between the remaining two phase voltage signals and the reference phase voltage signal to obtain three-phase voltage signals that are completely synchronized in time.

[0082] Specifically, assuming phase A is taken as the reference phase, the voltage signal of phase A is calculated. With phase B voltage signal Different delay times Find the cross-correlation function values ​​under given conditions, and then find the value that maximizes the cross-correlation function. Value, this This value represents the time delay between phases A and B. Similarly, the time delay between phases A and C can be calculated. The above dual cross-correlation calculation can eliminate the starting position error caused by differences in acquisition equipment and the influence of transmission lines. Taking phase A as the reference phase, the time delays of phases B and C relative to phase A are calculated respectively to ensure that all phase deviations are uniformly corrected to the same time axis. The specific steps include:

[0083] Calculate the time delay of phase B, and calculate the cross-correlation function between phase A and phase B:

[0084] ;

[0085] in, The time delay is an integer, with the unit being the number of sampling points, and the value range is... ; The maximum delay corresponds to the time. Typically, the number of points corresponding to 1 to 2 fundamental frequency cycles is taken.

[0086] B is aligned with A, find the phase that makes B equal to A. Maximum latency ,Right now:

[0087] ;

[0088] Time-shift compensation is applied to the B-phase signal, and the aligned B-phase is as follows:

[0089] ;

[0090] Calculate the time delay of phase C, and calculate the cross-correlation function between phase A and phase C:

[0091] ;

[0092] C is aligned with A, find the phase that makes C equal to A. Maximum latency ,Right now:

[0093] ;

[0094] Time-shift compensation is applied to the C-phase signal, and the aligned C-phase is as follows:

[0095] ;

[0096] In a preferred embodiment of the present invention, time shift may result in a reduction in data length. Therefore, all phase data must be truncated to the same length. If the original length needs to be retained, cyclic shifting or zero padding can be used. Based on the above calculation results, the trigger time of the data acquisition equipment should be adjusted, or the signal should be time-shifted during data processing to achieve sampling accuracy alignment and ensure that the three-phase voltage signals are completely synchronized in time, thus providing a guarantee for accurate power quality analysis in the future.

[0097] In a preferred embodiment of the present invention, denoising the pre-acquired three-phase voltage timing values ​​includes:

[0098] The three-phase voltage signals that are completely synchronized in time are decomposed by wavelet and then cyclically shifted to obtain a preset number of signal versions. Each signal version is independently subjected to wavelet threshold denoising and the denoising results are obtained separately. All denoising results are inversely shifted back to the aligned state and the average value is taken to obtain the first three-phase voltage signal. The first three-phase voltage signal is combined with the inter-layer differential threshold strategy to perform the first processing to obtain the second three-phase voltage signal, thus completing the denoising process. The first processing includes noise level estimation, threshold calculation and threshold function optimization performed sequentially.

[0099] Specifically, an improved method combining wavelet and adaptive thresholding is used to remove background noise from the voltage signal collected under natural conditions, as well as noise generated by the collection device itself.

[0100] Based on the characteristics of the captured voltage signal, including local abrupt changes (such as voltage drops) and steady-state components (such as harmonics), the Db4 wavelet basis was selected for signal decomposition. Through five-level wavelet decomposition, the main signal (50Hz fundamental frequency) and the main noise were separated across the frequency band, with the signal progressively separated into different sub-bands from high to low frequency. The main components, such as the 50Hz power frequency fundamental frequency, are mainly distributed in the low-frequency approximation coefficients of the third level and above due to their low-frequency characteristics, while noise is mainly concentrated in the high-frequency detail coefficients of the first and second levels. This natural frequency-based separation lays a crucial foundation for the subsequent implementation of differentiated denoising strategies.

[0101] To improve the robustness of the denoising algorithm to phase changes at the signal's starting point (i.e., to reduce sensitivity to signal translation), a cyclic translation-denoising-averaging strategy is introduced. First, eight versions of the original signal with different cyclic shifts (1 to 8 sampling points) are generated. Then, wavelet thresholding denoising is performed independently on each shifted version. Finally, all denoising results are inversely shifted back to the aligned state and averaged to obtain the final denoised signal output, thereby improving the stability of the processing results.

[0102] Furthermore, an inter-layer differentiated thresholding strategy is employed to avoid over-smoothing (loss of transient features) or under-denoising (residual high-frequency noise) caused by a single threshold. Specific steps include:

[0103] (1) Noise level estimation

[0104] For each layer of detail coefficients Calculate the first The estimated standard deviation of layer noise includes:

[0105] ;

[0106] in, This indicates that the median of a set is calculated.

[0107] Detail coefficients of each layer The recursive formula for calculation is:

[0108] First layer:

[0109] ;

[0110] ;

[0111] Second layer:

[0112] ;

[0113] ;

[0114] No. layer:

[0115] ;

[0116] ;

[0117] in, Represents the convolution operation; These are the high-pass filter coefficients for the Db4 wavelet (used for detail extraction). These are the low-pass filter coefficients for the Db4 wavelet (used for approximation extraction). This indicates Dyadic Downsampling, which means taking one of every two sampling points; That is, the first The level of detail required for each layer. The approximate coefficients representing the first level of detail coefficients; Indicates the first Approximate coefficients for layer detail coefficients.

[0118] (2) Threshold calculation

[0119] High frequency layer An improved SUREShrink threshold is used to balance noise suppression and detail preservation.

[0120] ;

[0121] Mid-to-low frequency layer Using a proportional threshold, only significant noise components are processed.

[0122] ;

[0123] (3) Threshold function optimization

[0124] Using non-concave penalty functions (such as MC penalty) instead of traditional hard / soft thresholding can reduce signal distortion while compressing noise, including:

[0125] ;

[0126] in, This indicates the extraction of the positive and negative signs; This indicates finding the maximum value; Shrinkage strength coefficient, in this embodiment, is taken as .

[0127] In a preferred embodiment of the present invention, standardization includes:

[0128] Assume the second and third phase voltage signals are represented as follows: ; ; ;in Sampling rate, For the data collection time window, The three phases A, B, and C are respectively at time points. The instantaneous value of the voltage;

[0129] Three-phase joint standardization is performed based on the second and third phase voltage signals, including:

[0130] Calculate the overall average value of the three-phase voltage signal and overall standard deviation :

[0131] ;

[0132] ;

[0133] Then the three-phase voltage signal Points Standardized value Represented as:

[0134] ;

[0135] In actual calculations, the three-phase voltage signals are first arranged into a one-dimensional array in time order, and then the mean and standard deviation of the array are calculated.

[0136] S2. Based on the first dataset, perform segmentation of each phase without overlap or skipping segments to obtain the slice signal set of the three phases.

[0137] S2 specifically includes: based on the third condition, dividing the three-phase voltage signals in the first dataset into slice signals at a preset division time interval to obtain a set of slice signals for the three phases; the third condition includes that the start and end times of the division between the three phases are the same and the preset division time interval is the same, and there is no data overlap or skipping between each slice signal.

[0138] Then each phase of the first Data of individual signals Represented as:

[0139] ;

[0140] in, ; ; The preset segmentation time interval needs to be determined based on the characteristics of the specific power quality disturbance and the sampling rate. It can generally be taken from several hundred milliseconds to several seconds. In this embodiment, the signal is segmented with a segmentation time interval of 10 cycles, which is about 0.2 seconds. , This indicates rounding down to the nearest integer.

[0141] The segmented signal can better reflect the local characteristics of power quality disturbances, which facilitates subsequent frame processing and feature extraction.

[0142] S3. Based on the slice signal set and the first condition, perform slice signal framing to obtain the frame signal set of each slice signal; the first condition includes that the frame length within each slice signal is the same and that data overlap is allowed between adjacent frame signals.

[0143] In a preferred embodiment of the present invention, the slice signal is framed based on a first condition according to the slice signal set, and the resulting frame signal set of each slice signal includes:

[0144] Assume that the subsequent three-phase voltage signals will be converted into an image with a width of H and a length of M; when performing segmented signal framing, assume the frame length is... When a slice of signal needs to be divided into a total of frames, At that time, the frame step size Represented as:

[0145] ;

[0146] in, ; The non-overlapping area between adjacent frames is the step size for the movement division.

[0147] Then each phase of the first The first piece of signal The frame signal is represented as:

[0148] ;

[0149] in, ; ;

[0150] All intra-chip frames should utilize the data from the complete chip signal as much as possible and be evenly distributed to maintain the continuity of signal characteristics. Therefore, the following conditions must be met during framing:

[0151] ;

[0152] The individual signal segments are divided into frames to obtain the frame signal set of each segment.

[0153] In a preferred embodiment of the present invention, when the intra-slice frame time length is With step size When the value of is large, meaning that the duration of the in-chip framed signal shortens when it reaches the end of the frame, padding with zeros at the end is considered to make it the same as the original frame. When the length of the in-chip framed signal is... With step size When the value of is small, that is, when there is redundant data in the slice signal after the in-slice frame signal is divided, the redundant data should be discarded.

[0154] Through reasonable adjustments and The value of ensures that the framing results can fully utilize the slice signal data while maintaining the integrity of signal features, providing a good data foundation for subsequent interleaving and fusion. In this embodiment, the intra-slice framing signal is divided with a sampling duration of 96 points and a step size of 12. A slice signal is then divided into... The in-chip frame signal.

[0155] S4. Based on the frame signal set and the second condition, perform data fusion to obtain a two-dimensional matrix of each signal segment. The second condition includes that each row of the two-dimensional matrix corresponds to a frame time, and each row is sequentially filled with values ​​taken and alternately taken from the frame signals of the same frame time in three identical frames. S4 specifically includes:

[0156] In a preferred embodiment of the present invention, data fusion based on a second condition is performed on the frame signal set to obtain a two-dimensional matrix of each signal slice, including:

[0157] Construct a two-dimensional matrix with H rows and M columns, i.e., H in length and M in width. , Indicates the first Individual signal, Indicates the first OK, Indicates the first Columns; two-dimensional matrix The H lines correspond to a frame time in sequence;

[0158] For a two-dimensional matrix The first in The values ​​are sequentially and alternately taken from the frame signals at the three corresponding frame times, and the values ​​are selected according to the order of the data in each frame signal, including:

[0159] No. In the row, the first position is taken from phase A. The first value of the first frame signal is used for filling, and the second position is taken from the B phase. The first value of the first frame signal is used for filling, and the third position is taken from the C phase. The first value of the first frame signal is used for filling, and the fourth position is taken from the first value of phase A. The second value of the first frame signal is used for filling, and the fifth position is taken from the B phase. The second value of the first frame signal is used for filling, and the sixth position is taken from the C phase. The second value of each frame signal is used for filling, and this process of alternating values ​​and filling continues until all M positions are filled. This can be expressed by the formula:

[0160] ;

[0161] in, Indicates the remainder; ; and Represent the first two-dimensional matrix respectively row and number List.

[0162] In a preferred embodiment of the present invention, the values ​​of the three phases A, B, and C are directly arranged in an alternating and fused manner. That is, the first three-phase signal segment fills the first matrix. The first element of the first row of the first matrix is ​​filled with the first value of the first intra-segment frame of the A-phase segment; the second element is filled with the first value of the first intra-segment frame of the B-phase segment; the third element is filled with the first value of the first intra-segment frame of the C-phase segment; the fourth element is filled with the second value of the first intra-segment frame of the A-phase segment; the fifth element is filled with the second value of the first intra-segment frame of the B-phase segment, and so on, forming a matrix of size 96.96 and a frame step size of 40.

[0163] S5. Convert each two-dimensional matrix into a single-channel image, and perform power quality identification on the single-channel image based on a neural network model based on dilated convolution and dilated attention mechanisms.

[0164] In a preferred embodiment of the present invention, converting each two-dimensional matrix into a single-channel image includes:

[0165] The two-dimensional matrix is ​​transposed and then mapped and encoded to a preset pixel value intensity range to obtain a single-channel image corresponding to each slice signal. Zhang Single Channel Image Represented as:

[0166] ;

[0167] in, Indicates transpose. These are linear coefficients. In this embodiment, it is converted to an 8-bit grayscale image. The value is 255.

[0168] In a preferred embodiment of the present invention, power quality identification of a single-channel image based on a neural network model using dilated convolution and dilated attention mechanisms includes:

[0169] Construct a neural network model based on dilated convolution and dilated attention mechanisms, including:

[0170] See Figures 2 to 3 The system constructs an input layer, a preset number of dilated units connected end to end, a fully connected layer, and an output layer, which are connected in sequence. The dilated unit includes a dilated convolutional layer, a normalization layer, a dilated channel attention mechanism module, an activation layer, and a regular convolutional layer.

[0171] Dilated convolutional layers expand the receptive field without increasing the number of parameters, better capturing long-range dependencies in images. The dilated channel attention mechanism obtains long-range weight relationships through dilated convolutions while saving computational resources. Specifically, when building the model, the conventional convolutions commonly used in classic convolutional neural networks are replaced with dilated convolutions.

[0172] In the Output feature map of the dilated convolutional layer in each dilated unit Represented as:

[0173] ;

[0174] in, Indicates the void ratio Aperture convolution; and These are learnable parameters; for Sigmoid Activation function; For the first Layer feature map; Represents convolution;

[0175] In the In the void channel attention mechanism module of each void unit, the receiver ,Will Feature map Obtained through global average pooling The feature weight bars represent the relative importance of different channels in the entire feature map, where... The number of channels is used. An adaptive dilated convolution kernel is applied to the feature weights for feature extraction. The parameters of the adaptive dilated convolution kernel are dynamically adjusted based on the features of the input data to accurately capture long-range dependencies between channels. When dealing with certain power quality anomalies, the features of specific channels may have long-range correlations in time or space; the adaptive dilated convolution kernel can effectively mine these correlations. After feature extraction, an activation function is applied to introduce non-linear factors and enhance the model's expressive power. The activated result is then multiplied back into the original feature map. Output of the void channel attention mechanism module for each void unit Represented as:

[0176] ;

[0177] in, Indicates dilated convolution; This indicates average pooling.

[0178] In the dilated convolutional layer and dilated channel attention mechanism module of the dilated unit, the dilation rate is adaptively selected according to the resolution size of the input feature image. ,include:

[0179] ;

[0180] in, These are parameters used to control the coverage area of ​​the receptive field. In this embodiment, we take... The field covers approximately 70% of the area.

[0181] In a preferred embodiment of the present invention, the ResNet18 network model is used as the basis, the first convolutional layer in its basic module is replaced with a dilated convolution, and a dilated attention mechanism is added to the input feature map.

[0182] Training a neural network model based on dilated convolution and dilated attention mechanisms includes:

[0183] Three-phase voltage data were collected as training, validation, and test sets; data augmentation was performed on the data in the training set.

[0184] Determine the model's hyperparameters and set the learning rate to determine the step size for updating parameters in each iteration;

[0185] The model parameters are initialized and trained using a data-augmented training set. During training, image data from the validation set is periodically input into the trained model to calculate preset performance metrics (e.g., loss value and accuracy) on the validation set to evaluate model convergence. After convergence, the model's performance is tested using a test set. After training is complete, a neural network model based on dilated convolution and dilated attention mechanisms is used to perform image recognition on each single-channel image to obtain the power quality problem identification results. See the training curves. Figure 4 After 250 cycles, both accuracy and loss tended to stabilize, with the highest accuracy reaching 98.50% and the lowest loss being 0.046.

[0186] Specifically, during model training, the large amount of collected three-phase voltage data is divided into training, validation, and test sets according to a certain ratio. The training set is used to train the network model, the validation set is used to adjust the model's hyperparameters and prevent overfitting, and the test set is used to evaluate the model's final performance. The data is divided into training, validation, and test sets in a 7:2:1 ratio.

[0187] In a preferred embodiment of the present invention, data augmentation operations are performed on the training data to increase data diversity and improve the generalization ability of the model. Data augmentation methods include random pruning, rotation, flipping, and adding noise. This embodiment includes 12 types of power quality: normal, spurt, stagnation, interruption, spike, oscillation, fluctuation, notch, harmonic, spurt + harmonic, stagnation + harmonic, and interruption + harmonic, corresponding to labels L0~L11. Figure 5 Examples of single-channel grayscale images after conversion for each category.

[0188] In a preferred embodiment of the present invention, the initial learning rate is set to 0.001 and adjusted during training according to a certain strategy. When the loss on the validation set no longer decreases over 50 consecutive epochs, the learning rate is reduced to 60% of its original value to accelerate model convergence and improve optimization performance. A fixed number of samples is used for gradient calculation and parameter updates in each iteration, based on available computing resources. In a preferred embodiment of the present invention, the batch size can be set to 64.

[0189] In a preferred embodiment of the present invention, the Xavier initialization method is used to initialize the weight parameters of the network model and initialize the bias parameters of the network model to 0.

[0190] After inputting image data from the training set into the network model, forward propagation computation is performed through the input layer, dilated convolutional layer, dilated attention mechanism module, fully connected layer, and output layer. In each layer of the network, an output feature map or probability distribution is calculated based on the layer's parameters and activation function. In the dilated convolutional layer, the input image is convolved using a convolution kernel and dilation rate to obtain a new feature map. In the dilated attention mechanism module, the feature map is weighted using operations such as global average pooling, dilated convolution, and activation functions to highlight important feature channels. Based on the network model's output and the corresponding ground truth labels, the loss value is calculated using the cross-entropy loss function. The loss value reflects the difference between the model's predicted output and the ground truth labels; the smaller the loss value, the more accurate the model's prediction. Based on the calculated loss value, the gradient is calculated using the backpropagation algorithm. The backpropagation algorithm follows a chain rule, starting from the output layer and calculating the gradient layer by layer until the input layer. During gradient calculation, the parameter gradient and input gradient of each layer are calculated, multiplied by the learning rate, and used as new parameters for the next iteration update.

[0191] During training, the network model is periodically evaluated using a validation set. Image data from the validation set is input into the trained model, and performance metrics such as loss and accuracy are calculated on the validation set. The model's convergence is then assessed using the validation set.

[0192] The accuracy of the network model in identifying the collected data was tested: The trained network model was applied to actual power quality monitoring equipment to identify and classify the real-time collected three-phase voltage data, and to promptly detect power quality problems. In a preferred embodiment of the invention, 12 types of power quality problems were actually collected, with 100 samples for each type. The final experimental accuracy rate was 98.5%. For specific results, please refer to [link to specific results]. Figure 6 The confusion matrix and comparison of different methods are shown in Table 1:

[0193] Table 1. Comparison of results between the method of the present invention and other methods.

[0194] ;

[0195] This invention presents a power quality identification method based on interleaved fusion coding. Through time-series alignment, noise reduction, and standardization preprocessing, it effectively improves data quality and consistency. By segmenting and framing the signal, it achieves accurate capture of local features of power quality disturbances. Using a three-phase interleaved fusion coding method, it converts one-dimensional time-series signals into two-dimensional images, effectively preserving the time-series features and phase-to-phase correlations of voltage signals, providing an optimal input format for deep learning-based pattern recognition. By constructing a neural network model that integrates dilated convolution and dilated channel attention mechanisms, it significantly reduces computational complexity and improves model efficiency and accuracy while expanding the receptive field and capturing long-range dependencies. This invention effectively overcomes the problems of low accuracy and poor adaptability of traditional methods when dealing with complex, transient power quality issues, achieving accurate and rapid identification of various power quality disturbance types, and providing reliable technical support for the safe and stable operation of power systems.

[0196] In a preferred embodiment of the present invention, a power quality identification device based on interleaved fusion coding is also provided for use with the method of the present invention. The device includes a first module, a second module, a third module, and a fourth module.

[0197] The first module is used to perform timing alignment, noise reduction, and standardization on the pre-acquired three-phase voltage timing values ​​to obtain the first dataset; based on the first dataset, non-overlapping and skipped segments are segmented within each phase to obtain the three-phase slice signal set.

[0198] In a preferred embodiment of the present invention, the first module includes three independent acquisition channels, each receiving a three-phase signal. Each channel includes a step-down unit, an isolation protection unit, and an analog-to-digital converter. It receives a three-phase four-wire voltage signal (phases A, B, and C, and the neutral line), with a rated voltage range of 0~600V (configurable to 100V / 220V / 380V via jumpers). The step-down ratio is 400:5, and sampling is done with 16 bits.

[0199] The second module is used to perform segmented framing of the segmented signals based on the segmented signal set and the first condition, to obtain the frame signal set of each segmented signal; the first condition includes that the segmented lengths within each segmented signal are the same and that data overlap is allowed between adjacent frame signals.

[0200] The third module is used to perform data fusion based on the second condition according to the frame signal set to obtain a two-dimensional matrix of each signal; the second condition includes that each row of the two-dimensional matrix corresponds to a frame time, and each row is sequentially filled with values ​​taken and filled from the frame signals of the same frame time in three identical frames.

[0201] The fourth module is used to convert each two-dimensional matrix into a single-channel image and perform power quality identification on the single-channel image based on a neural network model with dilated convolution and dilated attention mechanisms.

[0202] In a preferred embodiment of the present invention, the fourth module deploys a trained neural network model based on dilated convolution and dilated attention mechanisms. This fourth module converts three-phase voltage data into a single-channel image using an interleaved fusion encoding method. While preserving the timing characteristics and phase relationships of the three-phase voltage signals, it converts the data into an image format suitable for neural network processing. Then, the generated single-channel image is input into the neural network model to identify power quality disturbances and obtain power quality problem identification results. In this preferred embodiment, an FPGA (Field-Programmable Gate Array) is used to deploy and run the neural network model. FPGAs have advantages such as strong parallel processing capabilities and low latency, enabling them to efficiently complete the recognition calculation task of the input image and quickly output the recognition results, meeting the needs of real-time power quality monitoring in power systems.

[0203] In a preferred embodiment of the present invention, the device further includes a fifth module; the fifth module is used to send the power quality problem identification results obtained by the fourth module to achieve information transmission and sharing. Specifically, the fifth module encapsulates the identified power quality problem types (such as three-phase voltage imbalance) according to a preset communication protocol and sends them to the relevant power system monitoring center, the terminal equipment of operation and maintenance personnel, or other systems that need to access the power quality information via wired or wireless communication methods (such as wired Ethernet, 4G / 5G wireless networks, etc.). This ensures that power system managers and maintenance personnel can obtain the power quality status in a timely and accurate manner, so as to take corresponding measures for adjustment and optimization, ensure the stable and reliable operation of the power system, and improve power supply quality and service levels.

[0204] The power quality identification device based on interleaved fusion coding of the present invention, when used in the method of the present invention, has the same beneficial effects as the method of the present invention.

[0205] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A power quality identification method based on interleaved fusion coding, characterized in that, include: The pre-acquired three-phase voltage timing values ​​are time-aligned, denoised, and standardized to obtain the first dataset; Based on the first dataset, segments without overlap or skipping are segmented within each phase to obtain a three-phase slice signal set; Based on the slice signal set, the slice signal is framed according to the first condition to obtain the frame signal set of each slice signal; the first condition includes that the frame length within each slice signal is the same and that data overlap is allowed between adjacent frame signals; based on the frame signal set, data is fused according to the second condition to obtain a two-dimensional matrix of each slice signal; the second condition includes that each row of the two-dimensional matrix corresponds to a frame time, and each row is sequentially filled with values ​​taken and alternately taken from three frame signals with the same frame time. Each two-dimensional matrix is ​​converted into a single-channel image, and power quality identification is performed on the single-channel image based on a neural network model with dilated convolution and dilated attention mechanisms.

2. The power quality identification method based on interleaved fusion coding according to claim 1, characterized in that, The step of timing alignment and noise reduction of the pre-acquired three-phase voltage timing values ​​includes: Select one phase as the reference phase, calculate the cross-correlation function value between the reference phase voltage signal and the remaining two phase voltage signals under a preset number of delay times based on the pre-acquired three-phase voltage timing value, and take the delay time corresponding to the maximum value of the cross-correlation function value as the first delay time between the remaining two phase voltage signals and the reference phase voltage signal. Based on the first delay time, perform time shift compensation and alignment between the remaining two phase voltage signals and the reference phase voltage signal to obtain three-phase voltage signals that are completely synchronized in time. The three-phase voltage signals that are completely synchronized in time are decomposed by wavelet and then cyclically shifted to obtain a preset number of signal versions. Each signal version is independently subjected to wavelet threshold denoising and the denoising results are obtained separately. All denoising results are inversely shifted back to the aligned state and the average value is taken to obtain the first three-phase voltage signal. The first processing is performed based on the first three-phase voltage signal and the inter-layer differential threshold strategy to obtain the second three-phase voltage signal, thus completing the denoising process. The first processing includes noise level estimation, threshold calculation and threshold function optimization performed sequentially.

3. The power quality identification method based on interleaved fusion coding according to claim 2, characterized in that, The standardization includes: Assume the second three-phase voltage signal is represented as ; ; ;in Sampling rate, For the data collection time window, The three phases A, B, and C are respectively at time points. The instantaneous value of the voltage; Three-phase joint standardization is performed based on the second and third phase voltage signals, including: Calculate the overall average value of the three-phase voltage signal and overall standard deviation : ; ; Then the three-phase voltage signal Points Standardized value Represented as: 。 4. The power quality identification method based on interleaved fusion coding according to claim 3, characterized in that, Based on the first dataset, segmentation of each phase into non-overlapping and non-skipped segments is performed to obtain a three-phase slice signal set including: Based on the third condition, the three-phase voltage signals in the first dataset are divided into slice signals at a preset segmentation time interval to obtain a set of slice signals for the three phases; the third condition includes that the start and end times of the segmentation between the three phases are the same and the preset segmentation time interval is the same, and there is no data overlap or skipping between each slice signal; Then each phase of the first Data of individual signals Represented as: ; in, ; ; The preset segmentation time interval; , This indicates rounding down to the nearest integer.

5. The power quality identification method based on interleaved fusion coding according to claim 4, characterized in that, Based on the slice signal set and the first condition, the slice signal is framed to obtain the frame signal set of each slice signal, including: Assume that the subsequent three-phase voltage signals will be converted into an image with a width of H and a length of M; when performing segmented signal framing, assume the frame length is... When a slice of signal needs to be divided into a total of frames, At that time, the frame step size Represented as: ; in, ; ; Then each phase of the first The first piece of signal The frame signal is represented as: ; in, ; ; Maintain the following during frame division: 。 6. The power quality identification method based on interleaved fusion coding according to claim 5, characterized in that, Based on the frame signal set and the second condition, data fusion is performed to obtain a two-dimensional matrix of each signal slice, including: Construct a two-dimensional matrix with H rows and M columns, i.e., H in length and M in width. , Indicates the first Individual signal, Indicates the first OK, Indicates the first Columns; two-dimensional matrix The H lines correspond to a frame time in sequence; For a two-dimensional matrix The first in The values ​​are sequentially and alternately taken from the frame signals at the three corresponding frame times, and the values ​​are selected according to the order of the data in each frame signal, including: No. In the row, the first position is taken from phase A. The first value of the first frame signal is used for filling, and the second position is taken from the B phase. The first value of the first frame signal is used for filling, and the third position is taken from the C phase. The first value of the first frame signal is used for filling, and the fourth position is taken from the first value of phase A. The second value of the first frame signal is used for filling, and the fifth position is taken from the B phase. The second value of the first frame signal is used for filling, and the sixth position is taken from the C phase. The second value of each frame signal is used to fill the position, and so on, alternating between values ​​and filling, until M positions are filled.

7. The power quality identification method based on interleaved fusion coding according to claim 6, characterized in that, The process of converting each two-dimensional matrix into a single-channel image includes: The two-dimensional matrix is ​​transposed and then mapped and encoded to a preset pixel value intensity range to obtain a single-channel image corresponding to each slice signal. Zhang Single Channel Image Represented as: ; in, Indicates transpose. These are linear coefficients.

8. The power quality identification method based on interleaved fusion coding according to claim 7, characterized in that, The method of identifying power quality in single-channel images based on a neural network model using dilated convolution and dilated attention mechanisms includes: Constructing the neural network model based on dilated convolution and dilated attention mechanisms includes: An input layer, a predetermined number of dilated units connected end-to-end, a fully connected layer, and an output layer are constructed sequentially; the dilated unit includes a dilated convolutional layer, a normalization layer, a dilated channel attention mechanism module, an activation layer, and a regular convolutional layer; In the In each dilated unit, the output feature map of the dilated convolutional layer Represented as: ; in, Indicates the void ratio Aperture convolution; and These are learnable parameters; for Activation function; For the first Layer feature map; Represents convolution; In the In the void channel attention mechanism module of each void unit, the received ,Will Feature map Obtained through global average pooling Feature weight bars, where The number of channels is used; adaptive dilated convolution kernels are used to extract features from the feature weights, and the parameters of the adaptive dilated convolution kernels are dynamically adjusted according to the features of the input data; after feature extraction, the features are processed by an activation function, and the activated result is multiplied back into the original feature map. The output of the void channel attention mechanism module of each void unit Represented as: ; in, Indicates dilated convolution; Indicates average pooling; In the dilated convolutional layer and dilated channel attention mechanism module of the dilated unit, the dilation rate is adaptively selected according to the resolution size of the input feature image. ,include: ; in, These are parameters used to control the coverage of the receptive field.

9. The power quality identification method based on interleaved fusion coding according to claim 8, characterized in that, The method of identifying power quality from single-channel images using a neural network model based on dilated convolution and dilated attention mechanisms also includes: Training the neural network model based on dilated convolution and dilated attention mechanisms includes: Three-phase voltage data are collected as training, validation, and test sets; data augmentation is performed on the data in the training set. Determine the model's hyperparameters and set the learning rate to determine the step size for updating parameters in each iteration; The model parameters are initialized and the model is trained on the data-enhanced training set. During the training process, the preset performance index of the model on the validation set is calculated periodically to evaluate whether the model has converged. After convergence, the model is tested on the test set. After training is completed, the neural network model based on dilated convolution and dilated attention mechanism is used to perform image recognition on each single-channel image to obtain the power quality problem recognition result.

10. A power quality identification device based on interleaved fusion coding, used in the method described in any one of claims 1 to 9, characterized in that, The device includes a first module, a second module, a third module, and a fourth module; The first module is used to perform timing alignment, noise reduction and standardization on the pre-acquired three-phase voltage timing values ​​to obtain a first dataset; and to perform segmentation of non-overlapping and skipped segments within each phase based on the first dataset to obtain a three-phase slice signal set. The second module is used to perform segmented framing of the segmented signals based on the segmented signal set and a first condition to obtain a frame signal set for each segmented signal; the first condition includes that the segmented frame lengths within each segmented signal are the same and that data overlap is allowed between adjacent frame signals; The third module is used to perform data fusion based on the frame signal set and the second condition to obtain a two-dimensional matrix of each signal; the second condition includes that each row of the two-dimensional matrix corresponds to a frame time, and each row is sequentially filled with values ​​taken and filled from the three identical frame signals at the same frame time in sequence. The fourth module is used to convert each two-dimensional matrix into a single-channel image, and to perform power quality identification on the single-channel image according to a neural network model based on dilated convolution and dilated attention mechanisms.

Citation Information

Patent Citations

  • Three-phase power quality disturbance detection method based on convolutional neural network

    CN110703006A

  • Double-three-phase permanent magnet synchronous motor control method for alternately executing sampling and control programs

    CN112737444A