Power grid harmonic signal detection method and device

By adding windowing functions to the power grid harmonic signal and judging the main lobe interference, and using appropriate algorithms for detection, the spectrum leakage and similar harmonic interference caused by non-full period sampling in the prior art are solved, thereby achieving higher detection accuracy.

CN119936481APending Publication Date: 2025-05-06CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411901028.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The existing grid harmonic measurement methods are prone to spectrum leakage under non-full-period sampling, and it is difficult to effectively identify similar interharmonic interference, resulting in large errors in calculation of harmonic parameters.

Method used

A method for detecting harmonic signal of the power grid is proposed. By adding a window function to the harmonic signal of the power grid and determining whether main lobe interference occurs. If it occurs, the ZoomFFT algorithm is used, otherwise the six-spectral line interpolation algorithm is used for detection.

Benefits of technology

Effectively identifying similar interharmonics, reducing the calculation error of harmonic parameters and improving detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119936481A_ABST
    Figure CN119936481A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power quality harmonic detection, and particularly provides a power grid harmonic signal detection method and device, and the method comprises the steps: adding a windowing function to a power grid harmonic signal; judging whether the power grid harmonic signal of the windowing function has main lobe interference or not to obtain a judgment result; and detecting the harmonic signal of the power grid based on the judgment result. According to the technical scheme provided by the invention, judgment of harmonic main lobe interference and accurate calculation of amplitudes, frequencies and initial phases of harmonics and inter-harmonics can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power quality harmonic detection, and in particular to a method and device for detecting harmonic signals in a power grid. Background Art

[0002] As the installed capacity of new energy sources such as wind power and photovoltaic power increases year by year, the capacity of load-side power electronic equipment is increasing, and the proportion of power electronics in the power grid is further increasing. New power generation and power consumption equipment bring a large number of broadband high-order harmonics to the power grid, which further deteriorates the power quality and poses serious challenges to the safe and stable operation of the power grid.

[0003] Accurately measuring harmonics is the premise for effectively controlling harmonics. The commonly used method for harmonic measurement is Fast Fourier Transform (FFT). FFT is widely used in harmonic measurement due to its advantage of low computational complexity. FFT requires full-cycle sampling, but due to many interference factors such as frequency fluctuation, it is difficult to ensure complete full-cycle sampling in actual situations. In the case of non-full-cycle sampling of the signal, the spectrum of the signal will leak, so it is necessary to use windowing and interpolation methods to correct it. The window function used for windowing can be divided into two categories: single window function and composite window function. At present, many scholars have applied different single window functions to harmonic measurement, including Blackman window, Blackman-Harris window, Nuttall window, Hanning window, Rife-Vincent window, etc. Although these window functions are different, they are essentially a combination of several cosine functions with different coefficients. Because the coefficients of their cosine functions are different, they have different main lobe widths and sidelobe attenuation rates. At the same time, the interpolation algorithm is divided into three-line interpolation, four-line interpolation, six-line interpolation, etc. according to the number of selected spectral lines.

[0004] At present, a composite convolution window method has been proposed based on a single window function to reduce the sidelobe peak and accelerate the attenuation rate of the sidelobe. For example: Rife-Vincent self-multiplication-convolution window, Rife-Vincent composite convolution window with adjustable order, and convolution of Blackman window and Nuttall window twice. Its calculation accuracy is better than that of a single window, but the algorithm does not solve the problem of interference from similar harmonics. The method of local spectrum subdivision is used to overcome the problem of interference from similar harmonics, but this increases the amount of additional calculations and requires the use of main lobe interference as a pre-determination condition. Summary of the invention

[0005] In order to overcome the above defects, the present invention proposes a method and device for detecting harmonic signals in a power grid.

[0006] In a first aspect, a method for detecting a harmonic signal of a power grid is provided, the method comprising:

[0007] Add window function to power grid harmonic signal;

[0008] Determine whether the power grid harmonic signal with the window function has main lobe interference, and obtain a determination result;

[0009] The power grid harmonic signal is detected based on the judgment result.

[0010] Preferably, the power grid harmonic signal of the windowing function is as follows:

[0011]

[0012] In the above formula, w BN2 (ω) is the power grid harmonic signal with window function, w B (ω) is the power grid harmonic signal with Balckman window function added, w N (ω) is the power grid harmonic signal with 4 terms and 5th order Nuttall window function added.

[0013] Preferably, the determining whether the power grid harmonic signal of the windowing function has main lobe interference to obtain a determination result includes:

[0014] The power grid harmonic signal of the window function is subjected to discrete Fourier transformation to obtain a transformation result;

[0015] Eliminate the negative frequency part of the transformation result, retain the positive frequency part of the transformation result, and obtain the transformation result component;

[0016] Obtaining the phases of two adjacent spectral lines in the main lobe of the harmonic spectrum corresponding to the transformation result component, and determining a judgment factor based on the phases of the two adjacent spectral lines in the main lobe of the harmonic spectrum corresponding to the transformation result component;

[0017] If the judgment factor exceeds the threshold, the main lobe interference occurs in the power grid harmonic signal of the window function; otherwise, the main lobe interference does not occur in the power grid harmonic signal of the window function.

[0018] Furthermore, the transformation result components are as follows:

[0019]

[0020] In the above formula, X i (k) is the i-th harmonic component of the transformation result component, A i is the amplitude of the i-th harmonic component of the transformation result component, j is an imaginary unit, is the initial phase of the i-th harmonic component of the transformation result component, W rect is the spectrum of the rectangular window, k is the frequency of the power grid harmonic signal, k iis the kth spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component.

[0021] Furthermore, the judgment factors are as follows:

[0022]

[0023] In the above formula, X i (k1) is the k1th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, arg(X i (k1)) is the phase corresponding to the k1th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, X i (k2) is the k2th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, arg(X i (k2)) is the phase corresponding to the k2th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, is the judgment factor, k1 and k2 are adjacent integers and k2-k1=1.

[0024] Furthermore, the threshold is 5°.

[0025] Preferably, the detecting of the power grid harmonic signal based on the judgment result includes:

[0026] If the main lobe interference occurs in the power grid harmonic signal of the window function, the ZoomFFT algorithm is used to detect the power grid harmonic signal of the window function. Otherwise, the six-spectral line interpolation algorithm is used to detect the power grid harmonic signal of the window function.

[0027] Furthermore, the use of the ZoomFFT algorithm to detect the grid harmonic signal of the window function includes:

[0028] Multiply the grid harmonic signal of the window function by the rotation factor e -jω0t Then the spectrum of the signal is obtained, and the spectrum of the signal is shifted to zero frequency by ω0 units to obtain a shifted spectrum;

[0029] Performing low-pass filtering on the shift spectrum and obtaining a low-frequency portion;

[0030] Performing IFFT transformation on the low-frequency part to obtain a time domain signal, and down-sampling the time domain signal to obtain a sampled signal;

[0031] Performing FFT transformation on the sampled signal to obtain a detection result of a power grid harmonic signal;

[0032] Wherein, e is a natural constant, j is an imaginary unit, ω0 is the center frequency of the frequency band in which interference exists in the power grid harmonic signal of the window function, and the detection result includes: frequency, phase and amplitude.

[0033] Furthermore, the six-spectral line interpolation algorithm is used to detect the power grid harmonic signal of the window function, including:

[0034] The frequency f0 of the power grid harmonic signal with window function is determined as follows:

[0035] f0=(k1+γ)f s / N

[0036] The phase j of the power grid harmonic signal with window function is determined as follows:

[0037]

[0038] The amplitude A of the power grid harmonic signal with the window function is determined by the following formula:

[0039]

[0040] In the above formula, k1 is the first spectrum line closest to the spectrum line of the peak frequency point of the power grid harmonic signal, γ is the replacement parameter, γ = k0-k1-0.5, k0 is the spectrum line of the peak frequency point of the power grid harmonic signal, f s is the sampling frequency, N is the length of the composite window, y1, y2, y3, y4, y5, and y6 are the amplitudes corresponding to the 1st, 2nd, 3rd, 4th, 5th, and 6th spectral lines closest to the peak frequency point of the power grid harmonic signal.

[0041] Furthermore, the amplitudes corresponding to the 1st, 2nd, 3rd, 4th, 5th and 6th spectral lines closest to the spectral line at the peak frequency point of the power grid harmonic signal are as follows:

[0042]

[0043]

[0044]

[0045]

[0046]

[0047]

[0048] In the above formula, j is an imaginary unit, e is a natural constant, and W BN2 is the spectrum of the composite window function.

[0049] In a second aspect, a power grid harmonic signal detection device is provided, the power grid harmonic signal detection device comprising:

[0050] A processing module, used for adding a window function to the power grid harmonic signal;

[0051] A judgment module is used to judge whether the power grid harmonic signal with the window function has main lobe interference and obtain a judgment result;

[0052] A detection module is used to detect the power grid harmonic signal based on the judgment result.

[0053] Preferably, the power grid harmonic signal of the windowing function is as follows:

[0054]

[0055] In the above formula, w BN2 (ω) is the power grid harmonic signal with window function, w B (ω) is the power grid harmonic signal with Balckman window function added, w N (ω) is the power grid harmonic signal with 4 terms and 5th order Nuttall window function added.

[0056] Preferably, the judgment module is specifically used for:

[0057] The power grid harmonic signal of the window function is subjected to discrete Fourier transformation to obtain a transformation result;

[0058] Eliminate the negative frequency part of the transformation result, retain the positive frequency part of the transformation result, and obtain the transformation result component;

[0059] Obtaining the phases of two adjacent spectral lines in the main lobe of the harmonic spectrum corresponding to the transformation result component, and determining a judgment factor based on the phases of the two adjacent spectral lines in the main lobe of the harmonic spectrum corresponding to the transformation result component;

[0060] If the judgment factor exceeds the threshold, the main lobe interference occurs in the power grid harmonic signal of the window function; otherwise, the main lobe interference does not occur in the power grid harmonic signal of the window function.

[0061] Furthermore, the transformation result components are as follows:

[0062]

[0063] In the above formula, X i (k) is the i-th harmonic component of the transformation result component, A i is the amplitude of the i-th harmonic component of the transformation result component, j is an imaginary unit, is the initial phase of the i-th harmonic component of the transformation result component, W rect is the spectrum of the rectangular window, k is the frequency of the power grid harmonic signal, k i is the kth spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component.

[0064] Furthermore, the judgment factors are as follows:

[0065]

[0066] In the above formula, X i (k1) is the k1th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, arg(X i (k1)) is the phase corresponding to the k1th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, X i (k2) is the k2th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, arg(X i (k2)) is the phase corresponding to the k2th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, is the judgment factor, k1 and k2 are adjacent integers and k2-k1=1.

[0067] Furthermore, the threshold is 5°.

[0068] Preferably, the detection module is specifically used for:

[0069] If the main lobe interference occurs in the power grid harmonic signal of the window function, the ZoomFFT algorithm is used to detect the power grid harmonic signal of the window function. Otherwise, the six-spectral line interpolation algorithm is used to detect the power grid harmonic signal of the window function.

[0070] Furthermore, the use of the ZoomFFT algorithm to detect the grid harmonic signal of the window function includes:

[0071] Multiply the grid harmonic signal of the window function by the rotation factor Then the spectrum of the signal is obtained, and the spectrum of the signal is shifted to zero frequency by ω0 units to obtain a shifted spectrum;

[0072] Performing low-pass filtering on the shift spectrum and obtaining a low-frequency portion;

[0073] Performing IFFT transformation on the low-frequency part to obtain a time domain signal, and down-sampling the time domain signal to obtain a sampled signal;

[0074] Performing FFT transformation on the sampled signal to obtain a detection result of a power grid harmonic signal;

[0075] Wherein, e is a natural constant, j is an imaginary unit, ω0 is the center frequency of the frequency band in which interference exists in the power grid harmonic signal of the window function, and the detection result includes: frequency, phase and amplitude.

[0076] Furthermore, the six-spectral line interpolation algorithm is used to detect the power grid harmonic signal of the window function, including:

[0077] The frequency f0 of the power grid harmonic signal with window function is determined as follows:

[0078] f0=(k1+γ)f s / N

[0079] The phase of the power grid harmonic signal with window function is determined as follows:

[0080]

[0081] The amplitude A of the power grid harmonic signal with the window function is determined by the following formula:

[0082]

[0083] In the above formula, k1 is the first spectrum line closest to the spectrum line of the peak frequency point of the power grid harmonic signal, γ is the replacement parameter, γ = k0-k1-0.5, k0 is the spectrum line of the peak frequency point of the power grid harmonic signal, f s is the sampling frequency, N is the length of the composite window, y1, y2, y3, y4, y5, and y6 are the amplitudes corresponding to the 1st, 2nd, 3rd, 4th, 5th, and 6th spectral lines closest to the peak frequency point of the power grid harmonic signal.

[0084] Furthermore, the amplitudes corresponding to the 1st, 2nd, 3rd, 4th, 5th and 6th spectral lines closest to the spectral line at the peak frequency point of the power grid harmonic signal are as follows:

[0085]

[0086]

[0087]

[0088]

[0089]

[0090]

[0091] In the above formula, j is an imaginary unit, e is a natural constant, and W BN2 is the spectrum of the composite window function.

[0092] In a third aspect, a computer device is provided, comprising: one or more processors;

[0093] The processor is configured to execute one or more programs;

[0094] When the one or more programs are executed by the one or more processors, the power grid harmonic signal detection method is implemented.

[0095] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed, the power grid harmonic signal detection method is implemented.

[0096] The above one or more technical solutions of the present invention have at least one or more of the following beneficial effects:

[0097] The present invention provides a method and device for detecting harmonic signals of a power grid, comprising: adding a window function to the harmonic signal of the power grid; judging whether the harmonic signal of the power grid with the window function has main lobe interference, and obtaining a judgment result; and detecting the harmonic signal of the power grid based on the judgment result. The technical solution provided by the present invention can effectively identify similar interharmonics, and the calculation error of harmonic parameters is better than that of existing algorithms. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] Figure 1 1 is a schematic flow chart of the main steps of the power grid harmonic signal detection method according to an embodiment of the present invention;

[0099] Figure 2 It is a spectrum diagram of the first and second order composite convolution windows of the Balckman window and the four-term fifth-order Nuttall window of the embodiment of the present invention as the windowing function of the signal;

[0100] Figure 3 It is a graph of adjacent frequency spectrum lines near a real frequency point corresponding to the frequency axis of the power grid signal of the embodiment of the present invention. DETAILED DESCRIPTION

[0101] The specific implementation modes of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0102] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0103] As disclosed in the background technology, with the annual growth of installed capacity penetration of new energy sources such as wind power and photovoltaic power, the capacity of load-side power electronic equipment is increasing, and the proportion of power electronics in the power grid is further increasing. New power generation and power consumption equipment bring a large number of broadband high-order harmonics to the power grid, further deteriorating the power quality, and the safe and stable operation of the power grid is also seriously challenged.

[0104] Accurately measuring harmonics is the premise for effectively controlling harmonics. The commonly used method for harmonic measurement is Fast Fourier Transform (FFT). FFT is widely used in harmonic measurement due to its advantage of low computational complexity. FFT requires full-cycle sampling, but due to many interference factors such as frequency fluctuation, it is difficult to ensure complete full-cycle sampling in actual situations. In the case of non-full-cycle sampling of the signal, the spectrum of the signal will leak, so it is necessary to use windowing and interpolation methods to correct it. The window function used for windowing can be divided into two categories: single window function and composite window function. At present, many scholars have applied different single window functions to harmonic measurement, including Blackman window, Blackman-Harris window, Nuttall window, Hanning window, Rife-Vincent window, etc. Although these window functions are different, they are essentially a combination of several cosine functions with different coefficients. Because the coefficients of their cosine functions are different, they have different main lobe widths and sidelobe attenuation rates. At the same time, the interpolation algorithm is divided into three-line interpolation, four-line interpolation, six-line interpolation, etc. according to the number of selected spectral lines.

[0105] At present, a composite convolution window method has been proposed based on a single window function to reduce the sidelobe peak and accelerate the attenuation rate of the sidelobe. For example: Rife-Vincent self-multiplication-convolution window, Rife-Vincent composite convolution window with adjustable order, and convolution of Blackman window and Nuttall window twice. Its calculation accuracy is better than that of a single window, but the algorithm does not solve the problem of interference from similar harmonics. The method of local spectrum subdivision is used to overcome the problem of interference from similar harmonics, but this increases the amount of additional calculations and requires the use of main lobe interference as a pre-determination condition.

[0106] In order to improve the above problems, the present invention provides a method and device for detecting power grid harmonic signals, comprising: adding a window function to the power grid harmonic signal; judging whether the power grid harmonic signal with the window function has main lobe interference, and obtaining a judgment result; and detecting the power grid harmonic signal based on the judgment result. The technical solution provided by the present invention can effectively identify similar interharmonics, and the calculation error of harmonic parameters is better than that of existing algorithms.

[0107] The above scheme is described in detail below.

[0108] Example 1

[0109] See attached Figure 1 , Figure 1 FIG. 1 is a flow chart showing the main steps of a method for detecting harmonic signals in a power grid according to an embodiment of the present invention. Figure 1 As shown, the power grid harmonic signal detection method in the embodiment of the present invention mainly includes the following steps:

[0110] Step S101: adding a window function to the power grid harmonic signal;

[0111] Step S102: determining whether the power grid harmonic signal with the window function has main lobe interference, and obtaining a determination result;

[0112] Step S103: Detecting the power grid harmonic signal based on the judgment result.

[0113] In this embodiment, Figure 2 This is the spectrum of the first and second order composite convolution windows of the Balckman window and the 4-term 5th order Nuttall window as the windowing function of the signal, Figure 2 It can be seen that the sidelobe peak of the first-order composite convolution window is about -150dB, which is lower than -58dB of the Balckman window and -8dB of the Nuttall window; the sidelobe characteristics of the second-order composite convolution window are better than those of the first-order composite convolution window, and its sidelobe peak is about -224dB, and the attenuation rate is also faster. Therefore, the present invention selects the second-order composite convolution window of the Balckman window and the 4-term 5th-order Nuttall window as the windowing function of the signal, and the power grid harmonic signal of the windowing function is as follows:

[0114]

[0115] In the above formula, w BN2 (ω) is the power grid harmonic signal with window function, w B (ω) is the power grid harmonic signal with Balckman window function added, w N (ω) is the power grid harmonic signal with 4 terms and 5th order Nuttall window function added.

[0116] In this embodiment, when performing spectrum analysis on a signal, if the frequency resolution is not high, main lobe interference is likely to occur in the spectrum of adjacent interharmonics, causing harmonic and interharmonic parameter calculations to deviate from true values. Therefore, it is necessary to find a method that can effectively determine main lobe interference. The method of determining whether main lobe interference occurs in the power grid harmonic signal of the windowing function is to obtain a determination result, including:

[0117] The power grid harmonic signal of the window function is subjected to discrete Fourier transformation to obtain a transformation result;

[0118] Eliminate the negative frequency part of the transformation result, retain the positive frequency part of the transformation result, and obtain the transformation result component;

[0119] Obtaining the phases of two adjacent spectral lines in the main lobe of the harmonic spectrum corresponding to the transformation result component, and determining a judgment factor based on the phases of the two adjacent spectral lines in the main lobe of the harmonic spectrum corresponding to the transformation result component;

[0120] If the judgment factor exceeds the threshold, the main lobe interference occurs in the power grid harmonic signal of the window function; otherwise, the main lobe interference does not occur in the power grid harmonic signal of the window function.

[0121] In one embodiment, the transformation result components are as follows:

[0122]

[0123] In the above formula, X i (k) is the i-th harmonic component of the transformation result component, A i is the amplitude of the i-th harmonic component of the transformation result component, j is an imaginary unit, is the initial phase of the i-th harmonic component of the transformation result component, W rect is the spectrum of the rectangular window, k is the frequency of the power grid harmonic signal, k i is the kth spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component.

[0124] In one embodiment, the determination factor is as follows:

[0125]

[0126] In the above formula, X i (k1) is the k1th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, arg(X i (k1)) is the phase corresponding to the k1th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, X i (k2) is the k2th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, arg(X i (k2)) is the phase corresponding to the k2th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, is the judgment factor, k1 and k2 are adjacent integers and k2-k1=1.

[0127] In one embodiment, the threshold is 5°.

[0128] In this embodiment, the detecting of the power grid harmonic signal based on the judgment result includes:

[0129] If the main lobe interference occurs in the power grid harmonic signal of the window function, the ZoomFFT algorithm is used to detect the power grid harmonic signal of the window function. Otherwise, the six-spectral line interpolation algorithm is used to detect the power grid harmonic signal of the window function.

[0130] In one embodiment, the use of the ZoomFFT algorithm to detect the power grid harmonic signal of the window function includes:

[0131] Multiply the grid harmonic signal of the window function by the rotation factor Then the spectrum of the signal is obtained, and the spectrum of the signal is shifted to zero frequency by ω0 units to obtain a shifted spectrum;

[0132] Performing low-pass filtering on the shift spectrum and obtaining a low-frequency portion;

[0133] Performing IFFT transformation on the low-frequency part to obtain a time domain signal, and down-sampling the time domain signal to obtain a sampled signal;

[0134] Performing FFT transformation on the sampled signal to obtain a detection result of a power grid harmonic signal;

[0135] Wherein, e is a natural constant, j is an imaginary unit, ω0 is the center frequency of the frequency band in which interference exists in the power grid harmonic signal of the window function, and the detection result includes: frequency, phase and amplitude.

[0136] In one embodiment, due to the non-integer period truncation of the signal and the frequency offset, multiple spectral lines often appear near the corresponding real frequency point on the frequency axis, instead of directly presenting the real frequency value, such as Figure 3 As shown, in the figure, f is the frequency, k1 to k6 are the 1st to 6th spectrum lines closest to the peak frequency point of the power grid harmonic signal, so the spectrum lines need to be interpolated to calculate the true value of the harmonic frequency.

[0137] Generally, the spectral line interpolation algorithm has three spectral lines, four spectral lines, six spectral lines, etc. The more spectral lines are selected, the more accurate the calculation result is. After the interpolation formula is determined, the number of selected spectral lines does not affect the amount of calculation; in addition, harmonic analysis does not require high real-time performance, so the present invention selects six spectral lines for interpolation. The six-spectral line interpolation algorithm is used to detect the harmonic signal of the power grid with the window function, including:

[0138] The frequency f0 of the power grid harmonic signal with window function is determined as follows:

[0139] f0=(k1+γ)f s / N

[0140] The phase j of the power grid harmonic signal with window function is determined as follows:

[0141]

[0142] The amplitude A of the power grid harmonic signal with the window function is determined by the following formula:

[0143]

[0144] In the above formula, k1 is the first spectrum line closest to the spectrum line of the peak frequency point of the power grid harmonic signal, γ is the replacement parameter, γ = k0-k1-0.5, k0 is the spectrum line of the peak frequency point of the power grid harmonic signal, f s is the sampling frequency, N is the length of the composite window, y1, y2, y3, y4, y5, and y6 are the amplitudes corresponding to the 1st, 2nd, 3rd, 4th, 5th, and 6th spectral lines closest to the peak frequency point of the power grid harmonic signal.

[0145] In one embodiment, the amplitudes corresponding to the first, second, third, fourth, fifth, and sixth spectral lines closest to the spectral line at the peak frequency point of the power grid harmonic signal are as follows:

[0146]

[0147]

[0148]

[0149]

[0150]

[0151]

[0152] In the above formula, j is an imaginary unit, e is a natural constant, and W BN2 is the spectrum of the composite window function, which is a second-order composite convolution window function of a Balckman window and a 4-term 5-order Nuttall window.

[0153] Example 2

[0154] Based on the same inventive concept, the present invention also provides a power grid harmonic signal detection device, the power grid harmonic signal detection device comprising:

[0155] A processing module, used for adding a window function to the power grid harmonic signal;

[0156] A judgment module is used to judge whether the power grid harmonic signal with the window function has main lobe interference and obtain a judgment result;

[0157] A detection module is used to detect the power grid harmonic signal based on the judgment result.

[0158] Preferably, the power grid harmonic signal of the windowing function is as follows:

[0159]

[0160] In the above formula, w BN2 (ω) is the power grid harmonic signal with window function, w B(ω) is the power grid harmonic signal with Balckman window function added, w N (ω) is the power grid harmonic signal with 4 terms and 5th order Nuttall window function added.

[0161] Preferably, the judgment module is specifically used for:

[0162] The power grid harmonic signal of the window function is subjected to discrete Fourier transformation to obtain a transformation result;

[0163] Eliminate the negative frequency part of the transformation result, retain the positive frequency part of the transformation result, and obtain the transformation result component;

[0164] Obtaining the phases of two adjacent spectral lines in the main lobe of the harmonic spectrum corresponding to the transformation result component, and determining a judgment factor based on the phases of the two adjacent spectral lines in the main lobe of the harmonic spectrum corresponding to the transformation result component;

[0165] If the judgment factor exceeds the threshold, the main lobe interference occurs in the power grid harmonic signal of the window function; otherwise, the main lobe interference does not occur in the power grid harmonic signal of the window function.

[0166] Furthermore, the transformation result components are as follows:

[0167]

[0168] In the above formula, X i (k) is the i-th harmonic component of the transformation result component, A i is the amplitude of the i-th harmonic component of the transformation result component, j is an imaginary unit, is the initial phase of the i-th harmonic component of the transformation result component, W rect is the spectrum of the rectangular window, k is the frequency of the power grid harmonic signal, k i is the kth spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component.

[0169] Furthermore, the judgment factors are as follows:

[0170]

[0171] In the above formula, X i (k1) is the k1th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, arg(X i (k1)) is the phase corresponding to the k1th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, X i (k2) is the k2th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, arg(X i(k2)) is the phase corresponding to the k2th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, is the judgment factor, k1 and k2 are adjacent integers and k2-k1=1.

[0172] Furthermore, the threshold is 5°.

[0173] Preferably, the detection module is specifically used for:

[0174] If the main lobe interference occurs in the power grid harmonic signal of the window function, the ZoomFFT algorithm is used to detect the power grid harmonic signal of the window function. Otherwise, the six-spectral line interpolation algorithm is used to detect the power grid harmonic signal of the window function.

[0175] Furthermore, the use of the ZoomFFT algorithm to detect the grid harmonic signal of the window function includes:

[0176] Multiply the grid harmonic signal of the window function by the rotation factor Then the spectrum of the signal is obtained, and the spectrum of the signal is shifted to zero frequency by ω0 units to obtain a shifted spectrum;

[0177] Performing low-pass filtering on the shift spectrum and obtaining a low-frequency portion;

[0178] Performing IFFT transformation on the low-frequency part to obtain a time domain signal, and down-sampling the time domain signal to obtain a sampled signal;

[0179] Performing FFT transformation on the sampled signal to obtain a detection result of a power grid harmonic signal;

[0180] Wherein, e is a natural constant, j is an imaginary unit, ω0 is the center frequency of the frequency band in which interference exists in the power grid harmonic signal of the window function, and the detection result includes: frequency, phase and amplitude.

[0181] Furthermore, the six-spectral line interpolation algorithm is used to detect the power grid harmonic signal of the window function, including:

[0182] The frequency f0 of the power grid harmonic signal with window function is determined as follows:

[0183] f0=(k1+γ)f s / N

[0184] The phase j of the power grid harmonic signal with window function is determined as follows:

[0185]

[0186] The amplitude A of the power grid harmonic signal with the window function is determined by the following formula:

[0187]

[0188] In the above formula, k1 is the first spectrum line closest to the spectrum line of the peak frequency point of the power grid harmonic signal, γ is the replacement parameter, γ = k0-k1-0.5, k0 is the spectrum line of the peak frequency point of the power grid harmonic signal, f s is the sampling frequency, N is the length of the composite window, y1, y2, y3, y4, y5, and y6 are the amplitudes corresponding to the 1st, 2nd, 3rd, 4th, 5th, and 6th spectral lines closest to the peak frequency point of the power grid harmonic signal.

[0189] Furthermore, the amplitudes corresponding to the 1st, 2nd, 3rd, 4th, 5th and 6th spectral lines closest to the spectral line at the peak frequency point of the power grid harmonic signal are as follows:

[0190]

[0191]

[0192]

[0193]

[0194]

[0195]

[0196] In the above formula, j is an imaginary unit, e is a natural constant, and W BN2 is the spectrum of the composite window function.

[0197] Example 3

[0198] Based on the same inventive concept, the present invention also provides a computer device, which includes a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing one or more instructions in a computer storage medium to implement a corresponding method flow or a corresponding function, so as to implement the steps of a power grid harmonic signal detection method in the above embodiment.

[0199] Example 4

[0200] Based on the same inventive concept, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It can be understood that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the steps of a power grid harmonic signal detection method in the above embodiment.

[0201] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0202] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0203] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0204] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0205] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for detecting harmonic signals in a power grid, characterized in that: The method comprises: Add window function to power grid harmonic signal; Determine whether the power grid harmonic signal with the window function has main lobe interference, and obtain a determination result; The power grid harmonic signal is detected based on the judgment result.

2. The method according to claim 1, characterized in that The power grid harmonic signal of the windowing function is as follows: In the above formula, w BN2 (ω) is the power grid harmonic signal with window function, w B (ω) is the power grid harmonic signal with Balckman window function added, w N (ω) is the power grid harmonic signal with 4 terms and 5th order Nuttall window function added.

3. The method according to claim 1, characterized in that The step of determining whether the power grid harmonic signal of the windowing function has main lobe interference and obtaining a determination result includes: The power grid harmonic signal of the window function is subjected to discrete Fourier transformation to obtain a transformation result; Eliminate the negative frequency part of the transformation result, retain the positive frequency part of the transformation result, and obtain the transformation result component; Obtaining the phases of two adjacent spectral lines in the main lobe of the harmonic spectrum corresponding to the transformation result component, and determining a judgment factor based on the phases of the two adjacent spectral lines in the main lobe of the harmonic spectrum corresponding to the transformation result component; If the judgment factor exceeds the threshold, the main lobe interference occurs in the power grid harmonic signal of the window function; otherwise, the main lobe interference does not occur in the power grid harmonic signal of the window function.

4. The method according to claim 3, characterized in that The transformation result components are as follows: In the above formula, X i (k) is the i-th harmonic component of the transformation result component, A i is the amplitude of the i-th harmonic component of the transformation result component, j is an imaginary unit, is the initial phase of the i-th harmonic component of the transformation result component, W rect is the spectrum of the rectangular window, k is the frequency of the power grid harmonic signal, k i is the kth spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component.

5. The method according to claim 3, characterized in that The judgment factors are as follows: In the above formula, X i (k1) is the k1th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, arg(X i (k1)) is the phase corresponding to the k1th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, X i (k2) is the k2th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, arg(X i (k2)) is the phase corresponding to the k2th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, is the judgment factor, k1 and k2 are adjacent integers and k2-k1=1.

6. The method according to claim 3, characterized in that The threshold is 5°.

7. The method according to claim 1, characterized in that The detecting of the power grid harmonic signal based on the judgment result includes: If the main lobe interference occurs in the power grid harmonic signal of the window function, the ZoomFFT algorithm is used to detect the power grid harmonic signal of the window function. Otherwise, the six-spectral line interpolation algorithm is used to detect the power grid harmonic signal of the window function.

8. The method according to claim 7, characterized in that The method of using the ZoomFFT algorithm to detect the power grid harmonic signal of the window function includes: Multiply the grid harmonic signal of the window function by the rotation factor Then the spectrum of the signal is obtained, and the spectrum of the signal is shifted to zero frequency by ω0 units to obtain a shifted spectrum; Performing low-pass filtering on the shift spectrum and obtaining a low-frequency portion; Performing IFFT transformation on the low-frequency part to obtain a time domain signal, and down-sampling the time domain signal to obtain a sampled signal; Performing FFT transformation on the sampled signal to obtain a detection result of a power grid harmonic signal; Wherein, e is a natural constant, j is an imaginary unit, ω0 is the center frequency of the frequency band in which interference exists in the power grid harmonic signal of the window function, and the detection result includes: frequency, phase and amplitude.

9. The method according to claim 7, characterized in that The six-spectral line interpolation algorithm is used to detect the power grid harmonic signal of the window function, including: The frequency f0 of the power grid harmonic signal with window function is determined as follows: f0=(k1+γ)f s / N The phase of the power grid harmonic signal with window function is determined as follows: The amplitude A of the power grid harmonic signal with the window function is determined by the following formula: In the above formula, k1 is the first spectrum line closest to the spectrum line of the peak frequency point of the power grid harmonic signal, γ is the replacement parameter, γ = k0-k1-0.5, k0 is the spectrum line of the peak frequency point of the power grid harmonic signal, f s is the sampling frequency, N is the length of the composite window, y1, y2, y3, y4, y5, and y6 are the amplitudes corresponding to the 1st, 2nd, 3rd, 4th, 5th, and 6th spectral lines closest to the peak frequency point of the power grid harmonic signal.

10. The method according to claim 9, characterized in that The amplitudes corresponding to the 1st, 2nd, 3rd, 4th, 5th and 6th spectral lines closest to the peak frequency point of the power grid harmonic signal are as follows: In the above formula, j is an imaginary unit, e is a natural constant, and W BN2 is the spectrum of the composite window function.

11. A power grid harmonic signal detection device, characterized in that: The device comprises: A processing module, used for adding a window function to the power grid harmonic signal; A judgment module is used to judge whether the power grid harmonic signal with the window function has main lobe interference and obtain a judgment result; A detection module is used to detect the power grid harmonic signal based on the judgment result.

12. The device according to claim 11, characterized in that The power grid harmonic signal of the windowing function is as follows: In the above formula, w BN2 (ω) is the power grid harmonic signal with window function, w B (ω) is the power grid harmonic signal with Balckman window function added, w N (ω) is the power grid harmonic signal with 4 terms and 5th order Nuttall window function added.

13. The device according to claim 11, characterized in that The judgment module is specifically used for: The power grid harmonic signal of the window function is subjected to discrete Fourier transformation to obtain a transformation result; Eliminate the negative frequency part of the transformation result, retain the positive frequency part of the transformation result, and obtain the transformation result component; Obtaining the phases of two adjacent spectral lines in the main lobe of the harmonic spectrum corresponding to the transformation result component, and determining a judgment factor based on the phases of the two adjacent spectral lines in the main lobe of the harmonic spectrum corresponding to the transformation result component; If the judgment factor exceeds the threshold, the main lobe interference occurs in the power grid harmonic signal of the window function; otherwise, the main lobe interference does not occur in the power grid harmonic signal of the window function.

14. The device according to claim 13, characterized in that The transformation result components are as follows: In the above formula, X i (k) is the i-th harmonic component of the transformation result component, A i is the amplitude of the i-th harmonic component of the transformation result component, j is an imaginary unit, is the initial phase of the i-th harmonic component of the transformation result component, W rect is the spectrum of the rectangular window, k is the frequency of the power grid harmonic signal, k i is the kth spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component.

15. The device according to claim 13, characterized in that The judgment factors are as follows: In the above formula, X i (k1) is the k1th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, arg(X i (k1)) is the phase corresponding to the k1th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, X i (k2) is the k2th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, arg(X i (k2)) is the phase corresponding to the k2th spectral line in the main lobe of the spectrum of the i-th harmonic of the transformation result component, is the judgment factor, k1 and k2 are adjacent integers and k2-k1=1.

16. The device according to claim 13, characterized in that The threshold is 5°.

17. The device according to claim 11, characterized in that The detection module is specifically used for: If the main lobe interference occurs in the power grid harmonic signal of the window function, the ZoomFFT algorithm is used to detect the power grid harmonic signal of the window function. Otherwise, the six-spectral line interpolation algorithm is used to detect the power grid harmonic signal of the window function.

18. The device according to claim 17, characterized in that The method of using the ZoomFFT algorithm to detect the power grid harmonic signal of the window function includes: Multiply the grid harmonic signal of the window function by the rotation factor Then the spectrum of the signal is obtained, and the spectrum of the signal is shifted to zero frequency by ω0 units to obtain a shifted spectrum; Performing low-pass filtering on the shift spectrum and obtaining a low-frequency portion; Performing IFFT transformation on the low-frequency part to obtain a time domain signal, and down-sampling the time domain signal to obtain a sampled signal; Performing FFT transformation on the sampled signal to obtain a detection result of a power grid harmonic signal; Wherein, e is a natural constant, j is an imaginary unit, ω0 is the center frequency of the frequency band in which interference exists in the power grid harmonic signal of the window function, and the detection result includes: frequency, phase and amplitude.

19. The device according to claim 17, characterized in that The six-spectral line interpolation algorithm is used to detect the power grid harmonic signal of the window function, including: The frequency f0 of the power grid harmonic signal with window function is determined as follows: f0=(k1+γ)f s / N The phase of the power grid harmonic signal with window function is determined as follows: The amplitude A of the power grid harmonic signal with the window function is determined by the following formula: In the above formula, k1 is the first spectrum line closest to the spectrum line of the peak frequency point of the power grid harmonic signal, γ is the replacement parameter, γ = k0-k1-0.5, k0 is the spectrum line of the peak frequency point of the power grid harmonic signal, f s is the sampling frequency, N is the length of the composite window, y1, y2, y3, y4, y5, and y6 are the amplitudes corresponding to the 1st, 2nd, 3rd, 4th, 5th, and 6th spectral lines closest to the peak frequency point of the power grid harmonic signal.

20. The device according to claim 19, characterized in that The amplitudes corresponding to the 1st, 2nd, 3rd, 4th, 5th and 6th spectral lines closest to the peak frequency point of the power grid harmonic signal are as follows: In the above formula, j is an imaginary unit, e is a natural constant, and W BN2 is the spectrum of the composite window function.

21. A computer device, characterized in that: include: one or more processors; The processor is configured to execute one or more programs; When the one or more programs are executed by the one or more processors, the power grid harmonic signal detection method according to any one of claims 1 to 10 is implemented.

22. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed, the power grid harmonic signal detection method as claimed in any one of claims 1 to 10 is implemented.