Electric energy quality disturbance detection method based on fast Hanning self-convolution window S transformation
By adopting the fast Hanning self-convolution window S transformation method in the detection of power quality disturbance, the shortcomings of the existing technology in time-frequency resolution and high-frequency component extraction are solved, and high-precision feature extraction and rapid detection of power quality disturbance signals are realized, thereby improving classification accuracy.
Patent Information
- Application Number
- CN202510269785.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-06-27
AI Technical Summary
The existing power quality disturbance detection methods have shortcomings in time-frequency resolution and high-frequency component extraction, which leads to insufficient extraction of power quality disturbances, which affects the rapid detection and classification of power quality.
The power mass disturbance detection method based on the fast Hanning self-convolution window S transformation is adopted. By generating the power mass disturbance signal, discrete Fourier transform and Hanning window self-convolution processing are performed, the time frequency matrix is constructed, the "basic frequency-amplitude" and "frequency-amplitude" curves are extracted, and the feature extraction and classification are performed.
It improves the feature extraction accuracy of the power quality disturbance signal, reduces detection errors, improves the calculation speed, adapts to the rapid detection of power quality disturbances, and improves the classification accuracy of the disturbance characteristics.
Smart Images

Figure CN120217040A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart grids, and particularly to a method for detecting power quality disturbances based on a fast Hanning self-convolution window S-transform. Background Art
[0002] With the continuous development of the power grid and the increase of various nonlinear loads, power quality problems have become increasingly obvious and attracted more and more attention. The quality of power directly affects the stable, safe and efficient operation of all walks of life. For example, harmonics can interfere with communications and increase power grid losses; transient oscillations may induce misoperations of relay protection devices, causing power outages; and if the voltage is below 60% for more than 12 cycles, computers cannot work properly, affecting normal production and life. Therefore, the rapid and accurate detection and accurate classification of power quality disturbance signals are important parts of solving power quality problems and are the basis and prerequisite for ensuring the power quality of the power system.
[0003] Currently, common feature extraction methods for power quality disturbances include fast Fourier transform, short-time Fourier transform, wavelet transform, and S-transform, etc. The S-transform has good time-frequency analysis characteristics. After the signal is processed by the S-transform, a two-dimensional matrix containing time-domain information and frequency-domain information will be obtained. On the basis of the S-transform, multi-resolution generalized S-transform (MGST) and double-resolution S-transform (DRST) have also been proposed. MGST can better meet the time-frequency resolution requirements of different frequency bands by segmentally setting the window width adjustment factor, but there is a problem of uneven transition between different frequency bands, which will have a certain impact on the later feature extraction of power quality disturbances. DRST has obtained better time-frequency resolution by modifying the window function, but its window width is still roughly inversely proportional to the frequency, which leads to a low frequency resolution in the case of rich high-frequency components and may cause high-frequency component aliasing. Summary of the Invention
[0004] Based on the technical problems existing in the background art, the present invention proposes a method for detecting power quality disturbances based on a fast Hanning self-convolution window S-transform.
[0005] The method for detecting power quality disturbances based on a fast Hanning self-convolution window S-transform proposed by the present invention is as follows:
[0006] S1: Generate a power quality disturbance signal x(nT), and perform a discrete Fourier transform on the disturbance signal to construct a matrix D with the transformed signal M×N ;
[0007] S2: The Hanning window can be discretized to obtain a Hanning window sequence of length L. The self-convolution of the Hanning window can be performed to obtain a Hanning self-convolution window of length 2L-1, and a matrix G is constructed with the spectrum of the Hanning self-convolution window. M×N ;
[0008] S3: According to matrix D M×N and matrix G M×N Calculate the modulus time-frequency matrix of the S-transform of the Hanning self-convolution window;
[0009] S4: The "fundamental frequency - amplitude" curve and the "frequency - amplitude" curve can be obtained through the modulus time-frequency matrix, and the time-domain and frequency-domain characteristics of the power quality disturbance are extracted;
[0010] S5: Classify the time-domain and frequency-domain characteristics and output the classification result.
[0011] Preferably, the transformed signal sequence X k in S1 is:
[0012]
[0013] where k = 0, 1,..., N-1 and T is the sampling time interval.
[0014] Preferably, the Hanning window sequence in S2 is:
[0015] w H (n, L) = 0.5(1 - cos(2πn / L)), n = 0, 1,..., L-1.
[0016] Preferably, the expression of the Hanning self-convolution window in S2 is:
[0017]
[0018] where, represents rounding down.
[0019] Preferably, an iterative smoothing filtering algorithm is used to process the disturbance signal to determine the main frequency k i of the disturbance signal, and the S-transform of the Hanning self-convolution window is performed at the main frequency k i .
[0020] The beneficial technical effects of the present invention:
[0021] The detection method of the present invention has high precision in extracting the characteristics of power quality disturbance signals. The simulation results show that the fundamental frequency amplitude detection error of the present invention is almost zero at the lowest, meeting the current requirements for accurate detection of power quality disturbances; the calculation speed of the detection method of the present invention has been improved, and the lowest single calculation time is less than 10 ms, which is suitable for the rapid detection of power quality disturbances; the rapid and accurate extraction of power quality disturbance characteristics by the present invention provides strong support for improving the classification accuracy of power quality disturbances. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a flowchart of the power quality disturbance detection method based on the fast Hanning self-convolution window S transform proposed by the present invention;
[0023] Figure 2 is a flowchart of the fast Hanning self-convolution window S transform proposed by the present invention;
[0024] Figure 3 For the present invention, (a-c) are respectively the time-domain signal, "time-amplitude" curve, and "frequency-amplitude" curve of the voltage sag disturbance; (d-f) are respectively the time-domain signal, "time-amplitude" curve, and "frequency-amplitude" curve of the voltage swell disturbance; (g-i) are respectively the time-domain signal, "time-amplitude" curve, and "frequency-amplitude" curve of the interruption disturbance. DETAILED DESCRIPTION OF THE INVENTION
[0025] The present invention will be further described below with reference to specific embodiments.
[0026] Refer to Figure 1-2 , the power quality disturbance detection method based on the fast Hanning self-convolution window S transform proposed by the present invention has the following method steps:
[0027] (1) Generate the power quality disturbance signal x(nT), and perform discrete Fourier transform on the disturbance signal to obtain X k
[0028]
[0029] where k = 0, 1,..., N-1, and T is the sampling time interval.
[0030] Use X k to construct the matrix D M×N , with a total of M = N2 rows.
[0031]
[0032] (2) Discretize the Hanning window to obtain a Hanning window sequence of length L:
[0033] wH (n, L) = 0.5(1 - cos(2πnL)), n = 0, 1, ..., L - 1 (3)
[0034] The window length of the Hanning self-convolution window is controlled by adjusting L. According to the low-frequency band (0 to 100 Hz), the middle-frequency band (100 Hz to 700 Hz), and the high-frequency band (700 Hz to 1600 Hz), let L be 65, 160, and 65 respectively, that is, the window widths of the Hanning self-convolution window are 129, 319, and 129.
[0035] The Hanning self-convolution window can be obtained by performing self-convolution on the Hanning window:
[0036]
[0037] In the formula, represents rounding down.
[0038] Using the relevant theory of Fourier transform, the spectrum W H2 (n, L), n = 0, 1, ..., N - 1, is used to construct the matrix G M×N .
[0039]
[0040] The matrix G M×N is divided into: the low-frequency band is from row 1 to rows, the middle-frequency band is from to the high-frequency band is from to row M ( represents rounding up).
[0041] (3) Perform the S transform of the Hanning self-convolution window and obtain the modulus time-frequency matrix.
[0042]
[0043] (4) Obtain the "fundamental frequency - amplitude" curve and the "frequency - amplitude" curve from the modulus time-frequency matrix, and extract the time-domain and frequency-domain characteristics of the power quality disturbance.
[0044] (5) Classify the time-domain and frequency-domain characteristics. For example, use random forest (RF) to classify the extracted time-domain and frequency-domain characteristics, divide the training set and the test set according to 1:1, and output the detection result.
[0045] In order to further improve the detection efficiency, after generating the power quality disturbance signal x(nT), the iterative smoothing filtering algorithm can be used to process the disturbance signal, as shown in formula (7), where i = 1, 2, 3..., k = 2, 3,…N - 3, N is the total number of points of the disturbance signal, i = 5, a certain threshold δ = 0.007 is set, h = 2, and the maximum value point of |X5(k / NT)| is taken to determine the main frequency k of the power quality disturbance signal i 。
[0046]
[0047] |X i (k / NT)| > δ (8)
[0048] Then, only at the main frequency k i a Hanning self - convolution window S - transform is performed to obtain the fast Hanning self - convolution window S - transform:
[0049]
[0050] To verify the effectiveness of the present invention, sags, swells, interruptions, and harmonics are generated by MATLAB simulation, relevant parameters and durations are set, and the ST, MGST, DRST, and the algorithm FHSCST of the present invention are respectively used to detect the amplitudes. The following table shows the amplitudes of the disturbances and the relative errors. It can be seen from Table 1 that the detection error and calculation time under the present invention are significantly lower than those of the other three methods.
[0051] Table 1 Comparison of relative errors and calculation times of different power quality disturbance signal amplitudes
[0052]
[0053] Figure 3 Figures are the time - domain signals, "time - amplitude" curves, and "frequency - amplitude" curves of ST, MGST, DRST, and FHSCST under sags, swells, and interruptions. Under swell disturbances, compared with ST, MGST, and DRST, FHSCST can more clearly reflect the process that the time - domain amplitude first rises and then falls along the time axis; under sag and interruption disturbances, compared with ST, MGST, and DRST, FHSCST can more clearly reflect the process that the time - domain amplitude first falls and then rises along the time axis.
[0054] To verify the effectiveness of the present invention, 500 samples of 24 kinds of power quality signals shown in Table 2 were generated by MATLAB simulation at 10 dB, 20 dB, 30 dB and noiseless conditions respectively. The fundamental frequency was 50 Hz, and parameters such as disturbance amplitude and duration were randomly generated. The disturbance features were extracted by ST, MGST, DRST and the FHSCST of the present invention respectively, and the random forest was used to classify the extracted disturbance features. The training set and the test set were divided according to 1:1, and the classification accuracy rates are shown in the table. It can be seen from Table 3 that the classification accuracy rate of the present invention under noiseless conditions is 99.2433%, and the average accuracy rate in the four cases (10 dB, 20 dB, 30 dB and noiseless) is 95.0508%, which are all higher than those of ST, MGST and DRST. The extracted disturbance features are more discriminative and can better meet the accurate classification of power quality disturbances.
[0055] Table 2 Types of Power Quality Signals
[0056]
[0057]
[0058] Table 3 Classification Accuracy Rates of Different Algorithms
[0059]
[0060] Although the embodiments of the present application have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present application. The scope of the present application is defined by the appended claims and their equivalents, and all of them should be included within the protection scope of the present application.
Claims
1. A method for detecting power quality disturbances based on fast Hanning self-convolution window S transform, characterized in that: The steps are as follows: S1: Generate power quality disturbance signal x(nT), perform discrete Fourier transform on the disturbance signal, and construct matrix D with the transformed signal M×N ; S2: Discretize the Hanning window to get a Hanning window sequence of length L, perform self-convolution on the Hanning window to get a Hanning self-convolution window of length 2L-1, and construct the matrix G with the spectrum of the Hanning self-convolution window M×N ; S3: According to the matrix D M×N and the matrix G M×N Calculate the modulus time-frequency matrix of the Hanning self-convolution window S transform; S4: The "fundamental frequency-amplitude" curve and "frequency-amplitude" curve can be obtained through the modulus time-frequency matrix, and the time-domain and frequency-domain characteristics of power quality disturbance can be extracted; S5: Classify the time domain and frequency domain features and output the classification results.
2. The power quality disturbance detection method based on fast Hanning self-convolution window S transform according to claim 1 is characterized in that: The transformed signal sequence X in S1 k for: Wherein k=0,1,...,N-1, and T is the sampling time interval.
3. The power quality disturbance detection method based on fast Hanning self-convolution window S transform according to claim 1 is characterized in that: The Hanning window sequence in S2 is: w H (n,L)=0.5(1-cos(2πn / L)),n=0,1,...,L-1。 4. The power quality disturbance detection method based on fast Hanning self-convolution window S transform according to claim 3 is characterized in that: The expression of Hanning self-convolution window in S2 is: In the formula, Indicates rounding down.
5. The power quality disturbance detection method based on fast Hanning self-convolution window S transform according to claim 1 is characterized in that: The iterative smoothing filter algorithm is used to process the disturbance signal to determine the main frequency k of the disturbance signal. i , and at the main frequency k i Perform Hanning self-convolution window S transform at .