Real-time harmonic detection method and system based on sliding window

By using a sliding window-based real-time harmonic detection method, which processes the fundamental signal using Fast Fourier Transform and Discrete Fourier Transform, the problems of high computational complexity and poor real-time performance in existing technologies are solved, and high-precision harmonic detection is achieved.

CN120847474APending Publication Date: 2025-10-28KUNSHAN TYSEN KLD PHOTOELECTRIC TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510931446.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing harmonic detection algorithms cannot reduce the amount of calculation while meeting the calculation accuracy, cannot achieve real-time detection, and cannot accurately detect all harmonic frequencies.

Method used

A real-time harmonic detection method based on a sliding window is adopted. By acquiring the fundamental signal, the signal amplitude threshold and the window function, the fundamental signal is windowed and then subjected to fast Fourier transform and correction. Combined with discrete Fourier transform, the harmonic frequency points are located and the amplitude and phase data are obtained.

Benefits of technology

It reduces detection errors, lowers calculation complexity, realizes real-time detection, and improves the speed and accuracy of harmonic detection. In particular, the detection errors of the 3rd, 5th, and 7th harmonics are reduced by more than 50%, and the detection efficiency is increased several times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120847474A_ABST
    Figure CN120847474A_ABST
Patent Text Reader

Abstract

The invention relates to a real-time harmonic detection method and system based on a sliding window. The method comprises the following steps: step 1, acquiring a fundamental wave signal, a signal amplitude threshold and a window function; 2, processing the fundamental wave signal according to the window function to obtain a windowed fundamental wave signal; step 3, carrying out fast Fourier transform on the windowed fundamental wave signal to obtain a first frequency spectrum; 4, correcting the first frequency spectrum to obtain a first amplitude frequency spectrum of the fundamental wave signal; step 5, obtaining a second amplitude frequency spectrum of the fundamental wave signal according to the signal amplitude threshold; step 6, according to the second amplitude frequency spectrum, positioning a frequency point with harmonic waves; and step 7, obtaining amplitude data and phase data of the frequency point according to discrete Fourier transform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power signal detection, and in particular to a real-time harmonic detection method and system based on a sliding window. Background Technology

[0002] In power systems, the use of numerous nonlinear loads (such as rectifiers, frequency converters, and electric arc furnaces) generates harmonic currents and voltages. These harmonics can cause numerous problems for the normal operation of power equipment, such as increasing heat generation and losses in transformers and motors, accelerating insulation aging, interfering with communication systems, and affecting the accuracy of electricity metering. The purpose of harmonic detection is to accurately detect the content, frequency, phase, and other parameters of harmonics in the power system so that appropriate measures can be taken for mitigation, such as installing filters, thereby ensuring the safe, stable, and efficient operation of the power system.

[0003] While existing harmonic detection algorithms using only the Fast Fourier Transform (FFT) algorithm can quickly analyze the signal spectrum, their calculation accuracy is insufficient for frequencies around 50Hz, and they are prone to spectral leakage, leading to inaccurate detection of harmonic frequencies near the fundamental frequency. Conversely, using only the Discrete Fourier Transform (DFT) algorithm for precise calculation results in excessive computational load, failing to meet real-time requirements and making it unsuitable for power quality monitoring equipment with high real-time demands.

[0004] Chinese patent application CN108776263B describes a harmonic detection method based on a high-order Hanning self-convolution window and an improved interpolation algorithm, comprising: Step 1: Obtaining a discrete power system signal x(n) through an electronic instrument transformer, where n = 0, 1, 2, ..., N-1, and N is the sampling length; multiplying the signal x(n) by a high-order Hanning self-convolution window of equal length w(n); and performing a Discrete Fourier Transform (DFT) on the result to obtain the signal spectrum information; Step 2: Based on the signal spectrum information obtained in Step 1, finding... Step 3: Denote the ratio of W(k1) to W(k2) as α. Use an improved interpolation algorithm to construct the relationship between δ and α, and simplify the expression using the discrete convolution theorem to solve for the value of the deviation δ. Step 4: Based on the deviation δ obtained in Step 3, solve for the amplitude, frequency and phase angle of each harmonic.

[0005] However, while the above method addresses the issue of excessive computation in harmonic detection algorithms, which hinders real-time performance, it still has limitations. This patent does not solve the problem that harmonic detection algorithms cannot accurately detect all harmonic frequencies. Summary of the Invention

[0006] This invention provides a real-time harmonic detection method and system based on a sliding window, which solves the technical problem that existing harmonic detection methods cannot reduce the amount of computation while meeting the requirements of computational accuracy, thus achieving real-time detection.

[0007] The first aspect of the present invention is as follows: a real-time harmonic detection method based on a sliding window, comprising:

[0008] Obtain the fundamental signal, signal amplitude threshold, and window function;

[0009] The fundamental signal is processed according to the window function to obtain a windowed fundamental signal;

[0010] The windowed fundamental signal is subjected to a fast Fourier transform to obtain the first spectrum;

[0011] The first spectrum is corrected to obtain the first amplitude spectrum of the fundamental signal;

[0012] The second amplitude spectrum of the fundamental signal is obtained based on the signal amplitude threshold.

[0013] Based on the second amplitude spectrum, locate the frequency points where harmonics exist;

[0014] The amplitude and phase data of the frequency point are obtained by using the discrete Fourier transform.

[0015] Furthermore, the window function is:

[0016] Where N is the window function length, and n is the time series index, ranging from [0, N-1]. Let be a cosine function, where the parameter is... Let n be the phase of the cosine function at index n in the time domain.

[0017] Furthermore, the fundamental signal is processed according to the window function to obtain a windowed fundamental signal, including:

[0018] The fundamental signal is multiplied by a window function to obtain the windowed fundamental signal;

[0019] The windowed fundamental signal is: x windowed (n) = x(n)·ω(n);

[0020] Where x(n) is the fundamental signal, ω(n) is the window function, and x windowed (n) Windowed fundamental signal.

[0021] Furthermore, a fast Fourier transform is performed on the windowed fundamental signal to obtain a first spectrum, including:

[0022] The first spectrum includes the initial amplitude spectrum and the phase spectrum;

[0023] The initial amplitude spectrum is obtained based on the first spectrum and the amplitude spectrum calculation formula;

[0024] The phase spectrum is obtained according to the first spectrum and the phase spectrum calculation formula.

[0025] Furthermore, the first spectrum is modified to obtain the first amplitude spectrum of the fundamental signal, including:

[0026] The initial amplitude spectrum is corrected according to the amplitude spectrum repair formula to obtain the first amplitude spectrum of the fundamental signal;

[0027] The amplitude spectrum repair formula is as follows:

[0028] Where N is the number of sampling points for the Fast Fourier Transform. X is the amplitude correction factor. windowed (f1) represents the first spectrum of the windowed fundamental signal after fast Fourier transform, A(f 11 () represents the restored amplitude spectrum.

[0029] Furthermore, based on the signal amplitude threshold, the second amplitude spectrum of the fundamental signal is obtained, including:

[0030] Compare the first amplitude spectrum with the amplitude threshold;

[0031] The amplitude values ​​in the first amplitude spectrum that are less than the amplitude threshold are reduced to zero to form the second amplitude spectrum of the fundamental signal.

[0032] Furthermore, based on the second amplitude spectrum, the frequency points where harmonics exist are located, including:

[0033] Obtain the theoretical harmonic frequency and frequency deviation tolerance;

[0034] Based on the theoretical harmonic frequency, frequency deviation tolerance, and second amplitude spectrum, the frequency points where harmonics exist are located.

[0035] Furthermore, based on the discrete Fourier transform, the amplitude data and phase data of the frequency point are obtained, including:

[0036] The second spectrum of the frequency point is obtained by using the discrete Fourier transform;

[0037] The amplitude data of the frequency point is obtained according to the second spectrum and amplitude spectrum calculation formula of the frequency point;

[0038] The phase data of the frequency point is obtained according to the second spectrum and phase spectrum calculation formula of the frequency point.

[0039] Furthermore, the formula for calculating the amplitude spectrum is as follows:

[0040] Among them, X r X is the real part. i Here, N is the number of sampling points, and A(f) is the amplitude data;

[0041] The formula for calculating the phase spectrum is:

[0042] Among them, X r X is the real part. i θ(f) is the imaginary component, and θ(f) is the phase data.

[0043] A second aspect of the invention provides a system comprising at least one processor and a memory storing instructions that, when executed by the at least one processor, implement the steps of the method according to the first aspect.

[0044] The beneficial effects of this invention are that it reduces detection errors and, while reducing the amount of computation, enables real-time detection of harmonics, and at the same time improves the real-time detection speed. Attached Figure Description

[0045] Figure 1 A schematic diagram of the real-time harmonic detection method based on a sliding window according to this application;

[0046] Figure 2 A schematic diagram of the real-time harmonic detection system based on a sliding window according to this application. Detailed Implementation

[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] In all embodiments of the present invention, unless otherwise specified, the terms are interpreted as follows.

[0049] Window function: A window function is a tool used in signal processing to truncate and weight signals. Its core function is to convert an infinitely long signal into a finite-length signal segment to reduce energy leakage in spectrum analysis.

[0050] Harmonic detection refers to the process of real-time or offline monitoring, measurement and analysis of non-sinusoidal components (i.e., harmonics) in a power system whose frequencies are integer multiples of the fundamental frequency, using specific instruments or algorithms.

[0051] While existing harmonic detection algorithms using only the Fast Fourier Transform (FFT) algorithm can quickly analyze the signal spectrum, their calculation accuracy is insufficient for frequencies around 50Hz, and they are prone to spectral leakage, leading to inaccurate detection of harmonic frequencies near the fundamental frequency. Conversely, using only the Discrete Fourier Transform (DFT) algorithm for precise calculation results in excessive computational load, failing to meet real-time requirements and making it unsuitable for power quality monitoring equipment with high real-time demands.

[0052] Chinese patent application CN108776263B describes a harmonic detection method based on a high-order Hanning self-convolution window and an improved interpolation algorithm, comprising: Step 1: Obtaining a discrete power system signal x(n) through an electronic instrument transformer, where n = 0, 1, 2, ..., N-1, and N is the sampling length; multiplying the signal x(n) by a high-order Hanning self-convolution window of equal length w(n); and performing a Discrete Fourier Transform (DFT) on the result to obtain the signal spectrum information; Step 2: Based on the signal spectrum information obtained in Step 1, finding... Step 3: Denote the ratio of W(k1) to W(k2) as α. Use an improved interpolation algorithm to construct the relationship between δ and α, and simplify the expression using the discrete convolution theorem to solve for the value of the deviation δ. Step 4: Based on the deviation δ obtained in Step 3, solve for the amplitude, frequency and phase angle of each harmonic.

[0053] However, while the above method addresses the issue of excessive computation in harmonic detection algorithms, which hinders real-time performance, it still has limitations. This patent does not solve the problem that harmonic detection algorithms cannot accurately detect all harmonic frequencies.

[0054] In some embodiments, such as Figure 1 As shown, the first aspect of this application provides a real-time harmonic detection method based on a sliding window, including as follows: Figure 1 The following steps are shown:

[0055] S1: Obtain the fundamental signal, signal amplitude threshold, and window function;

[0056] S2: Process the fundamental signal according to the window function to obtain a windowed fundamental signal;

[0057] S3: Perform a fast Fourier transform on the windowed fundamental signal to obtain the first spectrum;

[0058] S4: Correct the first spectrum to obtain the first amplitude spectrum of the fundamental signal;

[0059] S5: Obtain the second amplitude spectrum of the fundamental signal based on the signal amplitude threshold;

[0060] S6: Based on the second amplitude spectrum, locate the frequency points where harmonics exist;

[0061] S7: Obtain the amplitude and phase data of the frequency point according to the discrete Fourier transform.

[0062] This invention employs Fast Fourier Transform (FFT) for preliminary processing of the fundamental signal, reducing computational load and enabling real-time harmonic monitoring. By setting an amplitude threshold, amplitude results below the threshold are reset to zero, suppressing noise interference and reducing false positives. Finally, Discrete Fourier Transform (DFT) is used for calculation, improving the accuracy of amplitude and phase information and enhancing the precision of harmonic detection.

[0063] In some embodiments, the window function is:

[0064] Where N is the window function length, and n is the time series index, ranging from [0, N-1]. Let be a cosine function, where the parameter is... Let n be the phase of the cosine function at index n in the time domain.

[0065] Furthermore, n is a time series index, where n = 0 corresponds to the starting point of the window, n = N-1 corresponds to the ending point of the window, and intermediate points n = 1, 2, ..., N-2 cover the main part of the window. The time series index n corresponds to the time position of the window function, serving to identify the position of the window function in the discrete time series. Let be a cosine function, where the parameter is... The phase of the cosine function at time index n is given. The window function length N is an integer, the same as the selected length of the fundamental signal, and serves to determine the time range covered by the window function. The larger the value of N, the higher the time resolution and frequency resolution of the window function; the smaller the value of N, the lower the time resolution and the higher the frequency resolution. Therefore, in practical use, an appropriate value needs to be selected according to the signal characteristics and analysis requirements.

[0066] In some embodiments, processing the fundamental signal according to the window function to obtain a windowed fundamental signal includes:

[0067] The fundamental signal is multiplied by a window function to obtain the windowed fundamental signal;

[0068] The windowed fundamental signal is: x windowed (n) = x(n)·ω(n);

[0069] Where x(n) is the fundamental signal, ω(n) is the window function, and x windowed (n) represents the windowed fundamental signal.

[0070] Furthermore, the present invention obtains the windowed fundamental signal by multiplying the fundamental signal with a window function.

[0071] In harmonic detection, the infinitely long fundamental signal needs to be truncated into a finite-length signal, which is then processed using Fast Fourier Transform (FFT) and Discrete Fourier Transform (DFT). Directly truncating the fundamental signal, for example using a rectangular window, can cause abrupt changes at the fundamental signal boundaries, leading to spectral leakage and reduced detection accuracy. Therefore, by multiplying the window function of this invention with the fundamental signal to obtain the windowed fundamental signal, smooth weighting can reduce the amplitude of abrupt changes at the truncation point, allowing the signal to naturally decay to zero at the time domain boundaries. This reduces spectral leakage and improves harmonic detection accuracy.

[0072] Furthermore, an 80-point sampling can be performed on a power signal containing multiple cycles, with the sampling frequency set according to the Nyquist sampling theorem to ensure accurate signal acquisition.

[0073] In some embodiments, performing a Fast Fourier Transform on the windowed fundamental signal to obtain a first spectrum includes:

[0074] The first spectrum includes the initial amplitude spectrum and the phase spectrum;

[0075] The initial amplitude spectrum is obtained based on the first spectrum and the amplitude spectrum calculation formula;

[0076] The phase spectrum is obtained according to the first spectrum and the phase spectrum calculation formula.

[0077] Furthermore, using the Fourier transform formula, i.e. Where X(f1) is the first spectrum of the windowed fundamental signal after fast Fourier transform, x windowed (n) represents the windowed fundamental frequency signal. The first spectrum is obtained by performing a fast Fourier transform on the windowed fundamental signal, where the rotation factor is used.

[0078] Furthermore, the first spectrum X(f1) = X r1 +jX i1 , where X r1 X is the real component of the first spectrum. i1This is the imaginary component of the first spectrum.

[0079] Furthermore, the formula for calculating the phase spectrum is as follows: Among them, X r X is the real part. i The imaginary component. The real component X of the first spectrum X(f1) is... r1 and the imaginary part X i1 Substituting into the phase spectrum calculation formula, we obtain the phase spectrum θ(f1), that is,

[0080] Furthermore, the formula for calculating the amplitude spectrum is as follows: Where A(f) is the amplitude spectrum, X r X is the real part. i The imaginary component. The real component X of the first spectrum X(f1) is... r1 and the imaginary part X i1 Substituting into the phase spectrum calculation formula, we obtain the initial amplitude spectrum A(f1), that is...

[0081] Furthermore, the Fast Fourier Transform (FFT) used in this invention is the integer-domain Fast Fourier Transform, where both the input and output are integers, not floating-point complex numbers. Using an integer bit width (e.g., 16 bits) instead of floating-point numbers reduces computational complexity and storage requirements.

[0082] Furthermore, by employing Fast Fourier Transform (FFT) to perform preliminary processing on the windowed fundamental signal, the present invention can quickly complete harmonic detection within each power signal cycle, meet real-time monitoring requirements, and play a role in rapid analysis of the fundamental signal.

[0083] In some embodiments, the first spectrum is modified to obtain a first amplitude spectrum of the fundamental signal, including:

[0084] The initial amplitude spectrum is corrected according to the amplitude spectrum repair formula to obtain the first amplitude spectrum of the fundamental signal;

[0085] The amplitude spectrum repair formula is as follows:

[0086] Where N is the number of sampling points for the Fast Fourier Transform. Here, X(f1) is the amplitude correction coefficient, and A(f2) is the first spectrum of the windowed fundamental signal after fast Fourier transform. 11 () represents the first amplitude spectrum.

[0087] Furthermore, since the amplitude spectrum of the windowed fundamental signal after undergoing Fast Fourier Transform (FFT) is different from the initial amplitude spectrum obtained by directly performing Fast Fourier Transform (FFT) on the fundamental signal, it is necessary to correct the initial amplitude spectrum to ensure the accuracy of the amplitude spectrum.

[0088] Furthermore, the amplitude correction coefficient is determined based on the window function. When using the window function of the present invention, the amplitude correction coefficient is:

[0089] In some embodiments, obtaining the second amplitude spectrum of the fundamental signal based on the signal amplitude threshold includes:

[0090] Compare the first amplitude spectrum with the amplitude threshold;

[0091] The amplitude values ​​in the first amplitude spectrum that are less than the amplitude threshold are reduced to zero to form the second amplitude spectrum of the fundamental signal.

[0092] Furthermore, the amplitude threshold is 80,000. Specifically, the amplitude threshold is determined through optimization based on extensive experimental data and practical application scenarios. In actual power systems, when the fundamental signal amplitude is very small, it is likely due to strong noise interference, resulting in low reliability of the harmonic detection results. Therefore, when the first amplitude spectrum is detected to be less than the amplitude threshold, the amplitude result at the corresponding position in the first amplitude spectrum is reset to zero, yielding the second amplitude spectrum. This invention, through this small-signal protection mechanism, effectively improves the reliability of the real-time harmonic detection algorithm in complex electromagnetic environments.

[0093] In some embodiments, locating the frequency points where harmonics exist based on the second amplitude spectrum includes:

[0094] Obtain the theoretical harmonic frequency and frequency deviation tolerance;

[0095] Based on the theoretical harmonic frequency, frequency deviation tolerance, and second amplitude spectrum, the frequency points where harmonics exist are located.

[0096] Furthermore, the theoretical harmonic frequency is an integer multiple of the fundamental frequency, and the deviation tolerance is ±0.5%. Then, based on the theoretical harmonic frequency and the deviation tolerance, the harmonic frequency region is obtained, which is within ±0.5% of the integer multiples of the fundamental frequency. Finally, the frequency points located in the harmonic frequency region in the second amplitude spectrum are extracted to locate the frequency points where harmonics exist, thus accurately locating the harmonics.

[0097] Specifically, by analyzing the peak value of the second amplitude spectrum, it was initially determined that there are harmonics near the integer multiples of 50Hz.

[0098] In some embodiments, the amplitude data and phase data of the frequency point are obtained according to the discrete Fourier transform, including:

[0099] The second spectrum of the frequency point is obtained by using the discrete Fourier transform;

[0100] The amplitude data of the frequency point is obtained according to the second spectrum and amplitude spectrum calculation formula of the frequency point;

[0101] The phase data of the frequency point is obtained according to the second spectrum and phase spectrum calculation formula of the frequency point.

[0102] Furthermore, the second spectrum X(f2) = X r2 +jX i2 , where: X r2 X is the real part of the complex result of the second spectrum. i2 X(f2) is the imaginary part of the complex result of the second spectrum.

[0103] Furthermore, the real part and the imaginary part of the second spectrum are obtained according to the formulas for calculating the real part and the imaginary part.

[0104] Specifically, the formula for calculating the real part is: Where: X r2 Let x(n) be the real part of the complex result of the second spectrum, x(n) be the fundamental signal, f2 be the frequency, N be the number of sampling points, n be the time index, and T be the real part of the complex result of the second spectrum. s The sampling period is [period]. The formula for calculating the imaginary part is: Where: X i2 Let x(n) be the imaginary part of the complex result of the second spectrum, x(n) be the fundamental signal, f2 be the frequency point, N be the number of sampling points, n be the time index, and T be the frequency of the second spectrum. s is the sampling period.

[0105] Furthermore, based on the imaginary part of the complex result of the second spectrum, the real part of the complex result of the second spectrum, and the formula for calculating the amplitude spectrum, the amplitude data of the frequency point is obtained. Based on the imaginary part X of the complex result of the second spectrum... i2 The real part X of the complex result of the second spectrum r2 The phase data of the frequency point is obtained by using the phase spectrum calculation formula.

[0106] Furthermore, this invention employs Discrete Fourier Transform (DFT) to accurately calculate the frequency point, decomposing the windowed fundamental signal at the frequency point into real and imaginary parts for separate calculation. Through this precise calculation, very accurate amplitude and phase data at the frequency point can be obtained, thereby avoiding the problem of spectral leakage and improving the accuracy of harmonic detection.

[0107] In some embodiments, the amplitude spectrum calculation formula is:

[0108] Among them, X r X is the real part. i Here, N is the number of sampling points, and A(f) is the amplitude data;

[0109] The formula for calculating the phase spectrum is:

[0110] Among them, X r X is the real part. i θ(f) is the imaginary component, and θ(f) is the phase data.

[0111] Furthermore, the real part X of the second spectrum r2 and the imaginary part X of the second spectrum i2 Substituting into the amplitude spectrum calculation formula, the amplitude data A(f2) at the frequency point is obtained, that is: Where: X r2 X is the real part of the second spectrum. i2 Let f(f2) be the imaginary part of the second spectrum, N be the number of sampling points, and A(f2) be the amplitude data of the frequency point.

[0112] Furthermore, the real part X of the second spectrum r2 and the imaginary part X of the second spectrum i2 Substituting these values ​​into the phase spectrum calculation formula, we obtain the phase data θ(f2) at the specified frequency point, i.e.: Where X r2 X is the real part of the complex result of the second spectrum. i2 θ(f2) is the imaginary part of the complex result of the second spectrum, and θ(f2) is the phase data of the frequency point.

[0113] Furthermore, tests were conducted on actual power quality monitoring equipment, comparing the real-time harmonic detection method based on a sliding window of this invention with traditional harmonic detection methods using only Fast Fourier Transform (FFT) and Discrete Fourier Transform (DFT). The results show that, in terms of real-time performance, the real-time harmonic detection method based on a sliding window of this invention can quickly complete harmonic detection within each power signal cycle, meeting real-time monitoring requirements. In terms of accuracy, the detection error for common 3rd, 5th, and 7th harmonics is reduced by more than 50% compared to the method using FFT alone, and the detection efficiency is several times higher than that using either the DFT or FFT alone. This fully demonstrates that the real-time harmonic detection method based on a sliding window of this invention can balance both real-time performance and accuracy.

[0114] like Figure 2 As shown, this application also provides a real-time harmonic detection system based on a sliding window. The system includes at least one processor 101, a memory 102, an input device 103, and a display device 104. The input device 103 is used to obtain input from the outside. The memory 102 stores instructions. When the instructions are executed by at least one processor 101, the steps of the method described in the method embodiment are implemented, and the running results are displayed on the display device 104, thus implementing the steps of the method described in the method embodiment.

[0115] The embodiments and functional operations of the subject matter described in this specification can be implemented in the following ways: digital electronic circuits, tangibly implemented computer software or firmware, computer hardware, including the structures disclosed in this specification and their equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, that is, one or more modules of computer program instructions encoded on one or more tangible non-transitory program carriers, for execution by a data processing device or to control the operation of the data processing device.

[0116] Alternatively or additionally, program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are then generated as coded information to be transmitted to an appropriate receiver device executed by data processing equipment. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or one or more combinations of the above.

[0117] The processing and logic flows described in this specification can be executed by one or more programmable computers, which execute one or more computer programs by processing input data and generating output to run functions. The processing and logic flows can also be executed by special-purpose logic circuitry, such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits), and the device can also be implemented as special-purpose logic circuitry.

[0118] To transmit interactions with a user, embodiments of the subject matter described in this specification can be implemented on a computer having: a display device, such as a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user; and a keyboard and a positioning device, such as a mouse or trackball, which the user can use to send input to the computer. Other types of devices can also be used to transmit interactions with the user; for example, feedback provided to the user can be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including sound input, voice input, or tactile input. Additionally, the computer can interact with the user by sending documents to and receiving documents from a device used by the user; for example, by sending a webpage to a web browser on the user's client device in response to a received request from a web browser.

[0119] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather as descriptions of features that can embody specific embodiments of a particular invention. Specific features described in this specification within the context of independent embodiments may also be implemented in combination with individual embodiments. Conversely, various features described within the context of individual embodiments may also be implemented independently.

[0120] The features may be implemented in multiple embodiments or in any suitable sub-combination. Furthermore, although the features may be described as having a combined effect and even initially required in this way, one or more features from the required combination may be removed from the combination in some cases, and the required combination may be redirected to a sub-combination or a variation of the sub-combination.

[0121] Similarly, although operations are described in the accompanying drawings in a specific order, it should not be construed as requiring that such operations be performed in the specific order shown or in sequential order, or that all illustrated operations be performed, in order to achieve the desired result. In certain cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and should be understood as...

[0122] Solution components and systems can typically be integrated into a single software product or packaged into multiple software products.

[0123] Specific implementations of the subject matter have been described. Other implementations are within the scope of the following claims. For example, the activities described in the claims can be performed in a different order and still achieve the desired result. As an example, the processes described in the drawings do not necessarily require a specific order or sequence to be shown in order to achieve the desired result. In certain implementations, multitasking and parallel processing may be advantageous.

Claims

1. A real-time harmonic detection method based on a sliding window, characterized in that, include: Obtain the fundamental signal, signal amplitude threshold, and window function; The fundamental signal is processed according to the window function to obtain a windowed fundamental signal; The windowed fundamental signal is subjected to a fast Fourier transform to obtain the first spectrum; The first spectrum is corrected to obtain the first amplitude spectrum of the fundamental signal; The second amplitude spectrum of the fundamental signal is obtained based on the signal amplitude threshold. Based on the second amplitude spectrum, locate the frequency points where harmonics exist; The amplitude and phase data of the frequency point are obtained by using the discrete Fourier transform.

2. The real-time harmonic detection method based on a sliding window according to claim 1, characterized in that, The window function is: Where N is the window function length, and n is the time series index, ranging from [0, N-1]. Let be a cosine function, where the parameter is... Let n be the phase of the cosine function at index n in the time domain.

3. The real-time harmonic detection method based on a sliding window according to claim 2, characterized in that, The fundamental signal is processed according to the window function to obtain a windowed fundamental signal, including: The fundamental signal is multiplied by a window function to obtain the windowed fundamental signal; The windowed fundamental signal is: x windowed (n) = x(n)·ω(n); Where x(n) is the fundamental signal, ω(n) is the window function, and x windowed (n) Windowed fundamental signal.

4. The real-time harmonic detection method based on a sliding window according to claim 1, characterized in that, Performing a Fast Fourier Transform on the windowed fundamental signal yields a first spectrum, including: The first spectrum includes the initial amplitude spectrum and the phase spectrum; The initial amplitude spectrum is obtained based on the first spectrum and the amplitude spectrum calculation formula; The phase spectrum is obtained according to the first spectrum and the phase spectrum calculation formula.

5. The real-time harmonic detection method based on a sliding window according to claim 4, characterized in that, The first spectrum is corrected to obtain the first amplitude spectrum of the fundamental signal, including: The initial amplitude spectrum is corrected according to the amplitude spectrum repair formula to obtain the first amplitude spectrum of the fundamental signal; The amplitude spectrum repair formula is as follows: Where N is the number of sampling points for the Fast Fourier Transform. X is the amplitude correction factor. windowed (f1) represents the first spectrum of the windowed fundamental signal after fast Fourier transform, A(f 11 () represents the restored amplitude spectrum.

6. The real-time harmonic detection method based on a sliding window according to claim 5, characterized in that, Based on the signal amplitude threshold, the second amplitude spectrum of the fundamental signal is obtained, including: Compare the first amplitude spectrum with the amplitude threshold; The amplitude values ​​in the first amplitude spectrum that are less than the amplitude threshold are reduced to zero to form the second amplitude spectrum of the fundamental signal.

7. The real-time harmonic detection method based on a sliding window according to claim 6, characterized in that, Based on the second amplitude spectrum, the frequency points where harmonics exist are located, including: Obtain the theoretical harmonic frequency and frequency deviation tolerance; Based on the theoretical harmonic frequency, frequency deviation tolerance, and second amplitude spectrum, the frequency points where harmonics exist are located.

8. The real-time harmonic detection method based on a sliding window according to claim 7, characterized in that, Based on the discrete Fourier transform, the amplitude and phase data of the frequency point are obtained, including: The second spectrum of the frequency point is obtained by using the discrete Fourier transform; The amplitude data of the frequency point is obtained according to the second spectrum and amplitude spectrum calculation formula of the frequency point; The phase data of the frequency point is obtained according to the second spectrum and phase spectrum calculation formula of the frequency point.

9. The real-time harmonic detection method based on a sliding window according to claim 8, characterized in that, The formula for calculating the amplitude spectrum is: Among them, X r X is the real part. i Here, N is the number of sampling points, and A(f) is the amplitude data; The formula for calculating the phase spectrum is: Among them, X r X is the real part. i θ(f) is the imaginary component, and θ(f) is the phase data.

10. A system, characterized in that, The system includes at least one processor; and a memory storing instructions that, when executed by the at least one processor, perform the steps of the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Harmonic Detection Method Based on High-Order Hanning Self-Convolution Window and Improved Interpolation Algorithm

    CN108776263B