Self-convolution window design method for power quality monitoring
Through a hybrid optimization strategy combining genetic algorithm and internal point method, the self-convolution window function is designed, which solves the shortcomings of traditional window function in different signal detection, and realizes high-precision detection of power harmonic signals. It is suitable for distributed power generation systems such as photovoltaics to ensure the safety of the power grid.
Patent Information
- Application Number
- CN202510260952.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-08-01
AI Technical Summary
The existing self-convolution window function parameters are fixed, and the side lobe asymptotic attenuation rate and side lobe peak level of the window function cannot be dynamically adjusted according to the application scenario, resulting in low power harmonic detection accuracy, especially in distributed power generation systems such as photovoltaics.
The objective function is designed using a genetic algorithm, and the initial solution that satisfies the objective function is searched and the inner point method is used to optimize it. The self-convolution window function is constructed, combining Fourier transform and two-spectral line interpolation algorithm to achieve accurate detection of the harmonic signal of the power grid.
It improves the accuracy and accuracy of power harmonic detection, and can flexibly adjust the window function characteristics according to different signal types and application scenarios. It is suitable for distributed power generation systems such as photovoltaics to ensure the safe operation of the power grid.
Smart Images

Figure CN120408256A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power grid harmonic detection, in particular to a self-convolution window design method for power quality monitoring, and more specifically, a self-convolution window design method based on a hybrid optimization algorithm applied to the field of power harmonic detection. Background Art
[0002] In recent years, with the clear proposal of the "dual carbon" goal, the large-scale access of distributed power generation systems such as photovoltaic power into the power grid has caused increasingly serious harmonic pollution problems, thus having an adverse impact on the power grid and its related electrical equipment. In addition, considering that the light energy is easily affected by external factors, the output current harmonics of the photovoltaic grid-connected system exhibit unique characteristics such as volatility and randomness, posing higher technical requirements for effective harmonic control.
[0003] With the rapid development of renewable energy sources such as photovoltaic power, the complexity and nonlinear characteristics of the power grid are constantly increasing. Traditional offline harmonic analysis methods (such as harmonic analysis instruments, etc.) are difficult to meet the needs of modern power grids. By using the windowed FFT method to monitor, accurately analyze and flexibly respond to harmonic pollution in the power grid in real time, it can provide a strong guarantee for the safe operation of the power grid. Especially in the photovoltaic grid-connected system, it ensures that it can interact smoothly with the power grid and provide high-quality electric energy. This is not only crucial for the current operation of the power grid but also lays a foundation for the development of future smart grids.
[0004] The Genetic Algorithm (GA) was first proposed by John Holland in the United States in the 1970s. This algorithm is designed based on the evolutionary laws of organisms in nature. It is a computational model that simulates the natural selection and genetic mechanism of Darwin's biological evolution theory, and is a method for searching for the optimal solution by simulating the natural evolution process. This algorithm uses mathematical methods and computer simulation operations to convert the problem-solving process into processes similar to the crossover and mutation of chromosome genes in biological evolution. When solving relatively complex combinatorial optimization problems, compared with some conventional optimization algorithms, it can usually obtain better optimization results more quickly. The genetic algorithm has been widely applied in fields such as combinatorial optimization, machine learning, signal processing, adaptive control, and artificial life.
[0005] The interior point method is an effective algorithm for dealing with constrained optimization problems. Its relatively fast convergence speed and stability have made the interior point method widely used in the numerical solution of optimization problems.
[0006] Harmonic analysis often uses the Fast Fourier Transform (FFT). However, when this algorithm is applied, there will be problems such as spectral leakage and the fence effect, which will affect the results of harmonic power metering. In response to this, scholars at home and abroad have proposed various improvement schemes, including windowed interpolation FFT, time-frequency joint analysis algorithms based on wavelet transform, etc. Among them, windowed interpolation FFT is the most commonly used harmonic analysis algorithm. This algorithm uses a window function with an appropriate main lobe width and significant side lobe attenuation to suppress spectral leakage, and designs a spectral interpolation correction algorithm according to the selected window function to reduce the error caused by the fence effect. Classic window functions include Hann window, Blackman window, Nuttall window, and Kaiser-Bessel window, etc. On this basis, some scholars have proposed improved algorithms such as self-convolution window, side lobe lowest and fastest descent window, etc., and applied them to power harmonic analysis, obtaining superior detection accuracy.
[0007] However, the parameters of these commonly used self-convolution window functions are fixed and cannot dynamically adjust the side lobe asymptotic attenuation rate and side lobe peak level of the window function according to the application scenario, so the applicable range is relatively narrow. Therefore, it is of great significance to explore a window function that can suit specific signal types and application scenarios. Summary of the Invention
[0008] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a self-convolution window design method for power quality monitoring, so as to solve the problem of low detection accuracy of power harmonics in scenarios such as distributed generation systems like photovoltaic.
[0009] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0010] A self-convolution window design method for power quality monitoring includes the following steps:
[0011] 1) Design an objective function by autonomously adjusting the side lobe peak level weight and the side lobe asymptotic attenuation rate weight;
[0012] 2) Use the genetic algorithm to search for the initial solution that satisfies the objective function;
[0013] 3) Optimize the initial solution obtained in step 2) through the interior point method to obtain the optimal solution;
[0014] 4) Construct a self-convolution window function through the optimal solution in step 3);
[0015] 5) Perform analog-to-digital conversion on the signal to be measured in the power grid according to the sampling frequency, and perform a truncation operation on the signal after analog-to-digital conversion according to the number of sampling points to obtain a sampling value sequence;
[0016] 6) Window the sampled value sequence using the self-convolution window obtained in step 4), and calculate the local maximum and the second largest value near the peak point of the target-order harmonic through Fourier transform on the windowed sampled value sequence;
[0017] 7) Use the local maximum and the second largest value near the peak point of the target-order harmonic to perform double-spectrum line interpolation to obtain the frequency, phase, and amplitude correction coefficient of the target frequency, determine the frequency, phase, and amplitude of the signal to be measured, calculate the harmonic electric energy according to the amplitude and phase of the signal to be measured, and perform power quality monitoring based on the harmonic electric energy.
[0018] In step 1), the objective function is:
[0019]
[0020] where is the sidelobe peak level, ω > 0 is the sidelobe asymptotic attenuation rate, α0 > 0 is the sidelobe peak level weight, β0 > 0 is the sidelobe asymptotic attenuation rate weight, and α0 + β0 = 1.
[0021] This objective function plays a key role in the optimization algorithm in quantifying the optimization objective, guiding the search process, and providing an evaluation of the quality of the solution. The optimization algorithm repeatedly evaluates the value of the objective function until the optimal solution or a near-optimal solution for the sidelobe peak level and the sidelobe asymptotic attenuation rate is found.
[0022] In step 3), optimize the initial solution obtained in step 2) through the interior point method to obtain the optimal solution, specifically including:
[0023] Use the fmincon function in MATLAB to call the interior point method to optimize the initial solution to obtain the optimal solution O b = [b0, b1, ···, b M-1 . b0, b1, b M-1 are the coefficients of the window function obtained through the hybrid optimization algorithm.
[0024] In step 4), construct the discrete spectrum modulus sequence of the p-order self-convolution window through the optimal solution in step 3), specifically including:
[0025]
[0026] where b m are the coefficients of the window function and 0 < b m < 1, n = 0, 1 ···, N - 1, N is the window function length; M is the number of terms of the window function, k = 0, 1, ···, N - 1.
[0027] This self-designed self-convolution window can improve the accuracy and precision of power grid harmonic signal detection by adjusting the sidelobe asymptotic attenuation rate and the sidelobe peak level of the window function.
[0028] In step 5), the signal to be measured in the power grid is a voltage signal to be measured or a current signal to be measured.
[0029] In step 6), the Fourier transform is the fast Fourier transform FFT.
[0030] In step 7), the local maximum and the second maximum near the peak point of the target order harmonic are used for double spectral line interpolation to obtain the frequency, phase and amplitude correction coefficient of the target frequency, which specifically includes:
[0031] The local maximum and the second maximum near the peak point of the target order harmonic are respectively: Y1 = |X(k1·Δf)|, Y2 =
[0032] |X(k2·Δf)|.
[0033] Where X(·) is the signal spectrum after windowing, Δf = f s / N, k1 is the spectral line number corresponding to the local maximum, and k2 is the spectral line number corresponding to the local second maximum.
[0034] The correction coefficient Δk of the frequency, phase and amplitude of the target frequency: Δk = α + 0.5.
[0035] Where α is obtained by substituting into the fitting polynomial α = f -1 (β).
[0036] In step 6), the harmonic electric energy is calculated according to the amplitude and phase of the signal to be measured, which specifically includes:
[0037] The target order harmonic amplitudes of the voltage and current signals to be measured are respectively: The phases are respectively: Then the electric energy of the target order harmonic is:
[0038] Where Y U1 , Y I1 are the local maximums near the peak point of the target order harmonic, is the phase corresponding to the local maximum.
[0039] Furthermore, a self-convolution window design method for power quality monitoring includes the following steps:
[0040] 1) Design the objective function;
[0041] Under the constraint conditions of satisfying the combined cosine window, the objective function is designed according to the application scenario by considering the sidelobe asymptotic attenuation rate and the sidelobe peak level.
[0042] 2) Set the parameters of the genetic algorithm (GA) to obtain the coefficients of the self-convolution window as the optimal solution;
[0043] Set the parameters of the genetic algorithm such as population size, crossover probability, mutation probability, termination condition, etc.;
[0044] 3) Use the optimal solution obtained by the genetic algorithm as the initial solution of the interior point method to obtain the optimal solution that satisfies the constraint conditions, thereby obtaining the self-convolution window function applicable to the current scenario.
[0045] 4) Perform analog-to-digital conversion on the signal to be measured according to the sampling frequency, and perform truncation operation on the signal after analog-to-digital conversion according to the number of sampling points to obtain the sampling value sequence;
[0046] 5) Perform convolution window processing on the sampling value sequence, and calculate the local maximum and sub-maximum values near the peak point of the target-order harmonic through Fourier transform on the processed sampling value sequence;
[0047] 6) Use the local maximum and sub-maximum values near the peak point of the target-order harmonic to perform bispectral interpolation to obtain the frequency and amplitude correction coefficients of the target frequency, thereby determining the frequency and amplitude of the signal to be measured.
[0048] The present invention selects the best individual searched by the genetic algorithm as the initial solution for the iteration of the interior point method, and then uses the interior point method to finely optimize this optimal solution, which can improve the accuracy of the solution; the present invention utilizes the adjustable objective function of the optimization algorithm, and can freely select the weight between the sidelobe asymptotic attenuation rate and the sidelobe peak level, which can improve the flexibility of the solution; the present invention utilizes the hybrid optimization algorithm to be able to flexibly adjust according to the scenario to obtain a convolution window that meets the specific signal requirements.
[0049] Further, the constraint conditions of the combined cosine window function are:
[0050]
[0051] where 0 < b m < 1, n = 0, 1 ···, N - 1, N is the window function length; M is the number of terms of the window function.
[0052] Further, to accurately obtain the coefficients b m of the self-convolution window, the target optimization function is:
[0053]
[0054] where is the sidelobe peak level, ω > 0 is the sidelobe asymptotic attenuation rate, α > 0 is the sidelobe peak level weight, β > 0 is the sidelobe asymptotic attenuation rate weight, and α + β = 1;
[0055] Further, to accurately obtain the time-domain expression of the auto-convolution window, the p-order auto-convolution window w p (t) can be expressed as p identical windows undergoing (p - 1) times of convolution operations:
[0056] w p (t) = w(t) * w(t) * ··· * w(t)
[0057] Further, the spectral function W(ω) can be obtained from w(t) through Fourier transform, and the spectral function W(ω) can be expressed as:
[0058]
[0059] where ω is the angular frequency after frequency normalization; M is a power of 2.
[0060] Further, with Δω = 2π / N, the above spectral modulus function |W(ω)| is discretized in the frequency domain to obtain a discrete spectral modulus sequence |W(k)| of length N = M, and the discrete spectral modulus sequence |W(k)| can be expressed as:.
[0061]
[0062] where k = 0, 1, ···, N - 1
[0063] Further, to accurately obtain the discrete spectral sequence |W p (k)| of the p-order auto-convolution window, the discrete spectral sequence |W p (k)| can be expressed as:
[0064]
[0065] where N = pM;
[0066] Further, to accurately determine the amplitude and frequency of the signal to be measured, the determination process of the frequency and amplitude of the signal to be measured is as follows:
[0067] A. Add the auto-convolution window to the sampled value sequence x(n) and perform Fourier transform to obtain the windowed signal spectrum X(k)X(k·Δf), where X(k) is the spectral function of the windowed signal and X(k·Δf) is the discrete spectral function of the windowed signal.
[0068]
[0069] where represents the amplitude of the h-th harmonic, represents the initial phase of the h-th harmonic, and k h represents the spectral line number corresponding to the peak point of the h-th harmonic spectrum;
[0070] B. Establish the first auxiliary parameter and the second auxiliary parameter based on the local maximum and the second maximum near the k-th peak point of the h-th harmonic, where the first auxiliary parameter is α and the second auxiliary parameter is β h
[0071]
[0072] C. Determine the amplitudes of the left and right spectral line numbers k1 and k2 according to the windowed signal spectrum X(k·Δf), determine the second auxiliary parameter β, establish the functional relationship between the second auxiliary parameter β and the first auxiliary parameter α, and solve the inverse function;
[0073] D. Use the amplitudes of the left and right spectral line numbers k1 and k2 obtained in step C) to determine the second auxiliary parameter β, substitute the obtained auxiliary parameter into the inverse function to calculate the first auxiliary parameter α, and determine the frequency f, phase and amplitude A of the signal to be measured.
[0074] Further, the determination process of step C is as follows:
[0075] a. The amplitudes of the left and right spectral line numbers k1 and k2 obtained from the windowed signal spectrum X(k·Δf) are respectively:
[0076] Y1 = |X(k1·Δf)|
[0077] Y2 = |X(k2·Δf)|
[0078] b. Calculate the second auxiliary parameter β according to the amplitudes obtained in step a:
[0079]
[0080] c. Take values of α at set intervals within (-0.5, 0.5), a series of values of β can be obtained. Call the polyfit function in MATLAB for polynomial fitting of the corresponding α and β to find the inverse function α = f -1 (β)
[0081] Further, the frequency f of the signal to be measured obtained in step D is:
[0082]
[0083] where f s is the sampling frequency of the signal, Δk = k1 - k i , and N is the number of sampling points.
[0084] Further, the frequency of the signal to be measured obtained in step D is:
[0085]
[0086] wherein is the phase corresponding to the spectral line number k1.
[0087] Furthermore, the amplitude A of the signal to be measured obtained in step D is:
[0088]
[0089] where Y1 is the amplitude corresponding to the spectral line number k1, and |W P (·)| is the discrete spectrum modulus sequence of the convolution window.
[0090] Compared with the prior art, the present invention has the following advantages:
[0091] 1. By adopting a hybrid strategy combining the genetic algorithm and the interior point method, the coefficients of the target window function can be effectively solved.
[0092] 2. A novel convolution window function is independently designed, which overcomes the problem of insufficient detection ability of traditional window functions for different signals, and improves the accuracy and precision of signal detection.
[0093] 3. The method of the present invention first designs an objective function, which is determined by the sidelobe asymptotic attenuation rate and the sidelobe peak level, and by adjusting the weight between the two, the characteristics of the convolution window can be flexibly controlled. Then, the genetic algorithm is used to quickly search the solution space that meets the constraint conditions, and then the interior point method is used to finely optimize the generated candidate solutions to improve the superiority of the solutions. Based on the optimal solution obtained by the hybrid optimization algorithm, the discrete spectrum modulus sequence of the convolution window is deduced, and the bispectral line interpolation algorithm is applied to correct the target frequency band, realizing the accurate detection of power harmonic signals. The present invention can independently design a novel convolution window function, which overcomes the problem of insufficient detection ability of traditional window functions for different signals, and improves the accuracy and precision of signal detection. This method provides an efficient solution to the harmonic pollution problem caused by the access of distributed generation systems such as photovoltaic power to the power grid, and has important practical significance for ensuring the safe operation of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] Figure 1 is the overall flowchart of the self-convolution window design method based on the hybrid optimization algorithm of the present invention.
[0095] Figure 2 is the flowchart of the design of the objective optimization function of the hybrid optimization algorithm.
[0096] Figure 3 is the flowchart of the interior point method iteration. DETAILED DESCRIPTION OF THE INVENTION
[0097] The following will describe in detail the specific implementation manners of the embodiments of the present invention with reference to the accompanying drawings. It should be understood that the specific implementation manners described herein are only for explaining and understanding the embodiments of the present invention, and are not used to limit the embodiments of the present invention.
[0098] The present invention first proposes a hybrid optimization algorithm with adjustable objective function. By flexibly selecting the weight between the sidelobe asymptotic attenuation rate and the sidelobe peak level, the design process of the self-convolution window becomes more flexible, so as to meet the specific requirements of distributed power generation systems such as photovoltaic systems. At the same time, a hybrid strategy combining the genetic algorithm and the interior point method is adopted to quickly and accurately solve the coefficients of the target window function. In addition, the present invention also obtains the correction formulas for the target frequency, phase and amplitude through the bispectral interpolation method of the convolution window, thereby further improving the accuracy and reliability of signal detection. The specific implementation process of this method is as Figure 1 shown, and the specific implementation steps are as follows.
[0099] 1. Determine the optimization constraint conditions and the objective optimization function.
[0100] For the parameter optimization of the combined cosine window function, its constraint conditions and general form are respectively:
[0101]
[0102] Where 0 < b m < 1, n = 0, 1 ···, N - 1, N is the window function length; M is the number of terms of the window function.
[0103] Calling the conv function of MATLAB can obtain the self-convolution window sequence w′(n) of w(n). Performing Fourier transform on w′(n) can obtain the normalized spectrum modulus value sequence of the self-convolution window. The sidelobe peak level and the sidelobe asymptotic attenuation rate can be obtained from the normalized spectrum modulus value sequence.
[0104] The sidelobe peak level and the sidelobe asymptotic attenuation rate of the window function are the key indicators to measure its excellence in harmonic detection. Therefore, the objective optimization function is constructed as:
[0105]
[0106] Where is the sidelobe peak level, ω > 0 is the sidelobe asymptotic attenuation rate, α0 > 0 is the sidelobe peak level weight, and β0 > 0 is the sidelobe asymptotic attenuation rate weight.
[0107] 2. Use the hybrid optimization algorithm to obtain the optimal solution O b = [b0, b1, ···, b M-1 , ].
[0108] Set the parameters of the genetic algorithm, including the encoding type, population size, selection function, mutation function, crossover function, and other population initialization parameters.
[0109] After completing the parameter setting of the genetic algorithm, use the genetic algorithm to quickly search the solution space that meets the constraint conditions, and generate a series of possible solutions as the initial solutions for the interior-point method iteration.
[0110] Use the fmincon function in MATLAB to call interior-point to finely optimize the initial solutions generated by the genetic algorithm, improve the superiority of the solutions, and finally obtain the optimal solution O b 。
[0111] 3. Obtain the sampling signal and perform analog-to-digital conversion on the sampling signal to obtain an N-point sampling value sequence.
[0112] The present invention performs analog-to-digital conversion on the sampling signal at a specific sampling frequency, and truncates the sampled sequence after analog-to-digital conversion with the number of sampling points N to obtain a sampling value sequence with a signal length of N. To avoid the interference of high-frequency noise, the N-point sampling value sequence is also filtered for high-frequency noise through a low-pass filter, and the filtered signal is denoted as x(n).
[0113] 4. Calculate the frequency resolution according to the sampling frequency and the number of sampling points, and use the frequency resolution to determine the spectral line numbers and amplitudes corresponding to the local maximum and the second maximum near the peak point of the i-th harmonic.
[0114] The frequency resolution is the ratio of the sampling frequency to the number of sampling points. If the sampling frequency is f s , and the number of sampling points is N, then the frequency resolution Δf is:
[0115] Δf = f s / N
[0116] When there is a frequency offset, the spectral line number k corresponding to the peak point of the harmonic spectrum of the target order h is often non-integer, that is, the target frequency f h = k h ·Δf is difficult to be exactly located at the discrete spectral line frequency points. Under the influence of the fence effect, only other spectral lines near k h can be used for discrete spectrum correction to determine the actual value of k h , so as to obtain the target frequency f h .
[0117] Call the FFT function to perform N-point processing on the windowed sequence to obtain a complex sequence. Then use the abs function to process this complex sequence and multiply it by the coefficient 2 / N to obtain the spectral modulus sequence, and use the angle function to process this complex sequence to obtain the spectral phase sequence.
[0118] After obtaining the sequence of spectral magnitude values, search within the range of six spectral lines on both the left and right sides of the target frequency. Traverse to find the spectral line numbers corresponding to the local maximum and the second maximum. Denote the spectral line number on the left as k1, the spectral line number on the right as k2, and the amplitudes as Y1 and Y2 respectively.
[0119] 5. Perform double spectral line interpolation on the sampled signal x(n) according to the obtained spectral line numbers k1 and k2, and then obtain the target frequency f h , phase and amplitude A h .
[0120] Add a self-convolution window to the discrete signal x(n) and perform Fourier transform to obtain the spectrum X(k·Δf) of the windowed signal;
[0121]
[0122] In the formula: A h is the amplitude of the signal x(n), represents the initial phase.
[0123] The frequency point of f1 is k1, and there is f1 = k1·Δf. The frequency point of f2 is k2, and there is f2 = k2·Δf, satisfying k1 ≤ k h ≤ k2 = k1 + 1. Introduce an auxiliary parameter α, satisfying α = k h - k1 - 0.5, and α ∈ (-0.5, 0.5). Based on the amplitudes Y1 and Y2 of the frequency points k1 and k2, define the parameter β = (Y2 - Y1) / (Y2 + Y1).
[0124] Then the amplitudes of the frequency points k1 and k2 are Y1 = |X(k1·Δf)| and Y2 = |X(k2·Δf)| respectively. It can be seen that the parameter β satisfies the following expression:
[0125]
[0126] Through the above expression, the functional relationship β = f(α) with α as the independent variable and β as the dependent variable is obtained. Take values of α at intervals of 0.0001 within (-0.5, 0.5), a series of β values can be obtained. Call polyfit(β, α, 5) in MATLAB for the corresponding α and β for polynomial fitting, and the inverse function α = f -1 (β) can be obtained.
[0127] According to the parameter β, substitute it into the inverse function α = f -1 (β) to obtain the parameter α:
[0128] Based on the obtained parameter α, substitute it into the following formula to obtain the true frequency f, phase and amplitude A of each harmonic signal:
[0129]
[0130] Through the above process, the true frequency, phase and amplitude of the sampled signal can be accurately obtained, and the harmonic electric energy of each order can be further obtained, so as to realize the monitoring of the power harmonic signal.
[0131] The present invention first designs an objective function determined by the sidelobe asymptotic attenuation rate and the sidelobe peak level. By adjusting the weight between the two, the objective function of the hybrid optimization algorithm can be flexibly adjusted. First, the genetic algorithm is used to quickly search the solution space that meets the constraint conditions, and a series of possible solutions are generated as the initial solutions for the interior point method iteration. Then, the interior point method finely optimizes the initial solutions generated by the genetic algorithm, thereby improving the superiority of the solutions. Next, based on the optimal solution obtained by the hybrid optimization algorithm, the discrete spectrum modulus sequence of the convolution window is derived. Finally, the double spectral line interpolation algorithm is used to correct the target frequency, phase and amplitude using the maximum peak and the secondary peak within the target frequency band, so as to realize the monitoring of the power harmonic signal. It can be seen from the above process that the present invention can flexibly adjust the weight between the sidelobe asymptotic attenuation rate and the sidelobe peak level, design an optimized objective function, thereby realizing the design of the convolution window for different scenarios, and can independently design a new convolution window function, solving the deficiencies of the traditional window function in detecting different signals. The present invention adopts a hybrid strategy combining the genetic algorithm and the interior point method, significantly improving the solution speed and its superiority.
Claims
1. A self-convolution window design method for power quality monitoring, characterized in that, It includes the following steps: 1) Design the objective function by autonomously adjusting the sidelobe peak level weight and the sidelobe asymptotic attenuation rate weight; 2) Use the genetic algorithm to search for the initial solution that satisfies the objective function; 3) Optimize the initial solution obtained in step 2) by the interior point method to obtain the optimal solution; 4) Construct the self-convolution window function through the optimal solution in step 3); 5) Perform analog-to-digital conversion on the signal to be measured in the power grid according to the sampling frequency, and perform truncation operation on the signal after analog-to-digital conversion according to the number of sampling points to obtain the sampling value sequence; 6) Use the self-convolution window function obtained in step 4) to perform windowing processing on the sampling value sequence, and calculate the local maximum value and the second largest value near the peak point of the target-order harmonic through Fourier transform on the windowed sampling value sequence; 7) Use the local maximum value and the second largest value near the peak point of the target-order harmonic to perform double-spectrum line interpolation to obtain the frequency, phase, and amplitude correction coefficient of the target frequency, determine the frequency, phase, and amplitude of the signal to be measured, calculate the harmonic electric energy according to the amplitude and phase of the signal to be measured, and perform power quality monitoring according to the harmonic electric energy.
2. The method according to claim 1, wherein In step 1), the objective function F o is as follows: wherein, is the sidelobe peak level, ω>0 is the sidelobe asymptotic attenuation rate, α0>0 is the sidelobe peak level weight, β0>0 is the sidelobe asymptotic attenuation rate weight, and α0 + β0 = 1.
3. The method according to claim 1, characterized in that In step 3), the initial solution obtained in step 2) is optimized by the interior point method to obtain the optimal solution, which specifically includes: Use the fmincon function in MATLAB to call the interior point method to optimize the initial solution and obtain the optimal solution O b = [b0, b1, ···, b M-1 , where b0, b1, b M-1 are the coefficients of the window function.
4. The method according to claim 1, wherein In step 4), the self-convolution window function is constructed through the optimal solution in step 3), which specifically includes: Among them, the self-convolution window function |W p (k)| is the discrete spectrum modulus sequence of the p-order self-convolution window, 0 < b m < 1, n = 0, 1 ···, N - 1, where N is the window function length; M is the number of terms of the window function, and k = 0, 1, ···, N - 1.
5. The method according to claim 1, characterized in that In step 5), the signal to be measured in the power grid is the voltage signal to be measured or / and the current signal to be measured.
6. The method according to claim 1, wherein In step 6), the Fourier transform is the fast Fourier transform FFT.
7. The method according to claim 1, wherein In step 7), using the local maximum value and the second largest value near the peak point of the target-order harmonic to perform double-spectrum line interpolation to obtain the frequency, phase, and amplitude correction coefficient of the target frequency, specifically includes: The local maximum value Y1 and the second largest value Y2 near the peak point of the target-order harmonic of the voltage signal to be measured or the current signal to be measured are respectively: Y1 = |X(k1·Δf)|, Y2 = |X(k2·Δf)|; where X(·) is the signal spectrum after windowing, Δf = f s / N, k1 is the spectral line number corresponding to the local maximum value, and k2 is the spectral line number corresponding to the local sub-maximum value; The frequency, phase, and amplitude correction coefficient Δk of the target frequency: Δk = α + 0.5; where α is obtained by substituting into the fitting polynomial α = f -1 (β).
8. The method according to claim 1, characterized in that In step 7), calculating the harmonic electric energy according to the amplitude and phase of the signal to be measured, specifically includes: The amplitudes of the target-order harmonics of the voltage and current signals to be measured are respectively: The phases are respectively: Then the harmonic electric energy is: where Y U1 and Y I1 are local maxima near the peak point of the i-th harmonic, is the phase corresponding to the local maximum.