Harmonic electric energy analysis method and device and medium
By performing four-term fifth-order Nuttall window function weighting and three-spectral-line interpolation FFT processing on the voltage and current signals of the UHVDC system, the problem of insufficient harmonic measurement accuracy of the traditional FFT algorithm in the UHVDC system is solved, and high-precision harmonic measurement and total harmonic energy calculation are realized.
Patent Information
- Application Number
- CN202511831875.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-02-06
AI Technical Summary
In ultra-high voltage direct current transmission systems, traditional FFT algorithms suffer from spectral leakage and picket fence effects in complex scenarios with fundamental frequency fluctuations and abundant high-order harmonics, resulting in insufficient accuracy in harmonic measurement.
The voltage and current time-domain signals are weighted using four fifth-order Nuttall window functions. After FFT transformation, the three adjacent spectral lines with the largest amplitudes are selected. The discrete frequency domain spectral lines are then corrected using an interpolation algorithm. The true amplitude and phase of each harmonic are calculated. Finally, the active and reactive power are calculated to obtain the total harmonic energy.
It improves the accuracy of harmonic measurement, ensuring the accuracy of each harmonic measurement and the total harmonic energy in the UHVDC system, and reduces insufficient frequency resolution and measurement errors of higher harmonics.
Smart Images

Figure CN121476714A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power grids, and in particular to a method, apparatus and medium for harmonic power analysis. Background Technology
[0002] Due to the nonlinear characteristics of power electronic equipment in converter stations, a large number of characteristic harmonics are generated in ultra-high voltage direct current transmission systems. These harmonics are usually analyzed using the traditional Fast Fourier Transform (FFT) algorithm. The traditional FFT algorithm converts discrete signals in the time domain into discrete signals in the frequency domain, and achieves quantitative analysis of the frequency components of the signal through efficient calculation, providing basic technical support for harmonic detection and power metering in power systems.
[0003] However, in complex scenarios such as UHVDC transmission systems where there are fundamental frequency fluctuations, abundant high-order harmonics, and asynchronous sampling, the traditional FFT algorithm suffers from spectral leakage and picket fence effects under asynchronous sampling, leading to increased measurement errors. The frequency resolution is limited by the number of sampling points and the sampling frequency, resulting in insufficient measurement accuracy for high-order harmonics.
[0004] Therefore, improving the accuracy of harmonic measurement is a technical problem that urgently needs to be solved by those in this field. Summary of the Invention
[0005] The purpose of this application is to provide a harmonic energy analysis method, device, and medium to solve the problem of low accuracy in harmonic measurement.
[0006] To address the aforementioned technical problems, this application provides a harmonic energy analysis method, comprising:
[0007] The voltage and current signals of the ultra-high voltage direct current system are collected to obtain voltage time-domain signal sequences and current time-domain signal sequences.
[0008] The voltage time-domain signal sequence and the current time-domain signal sequence are weighted by four fifth-order Nuttall window functions to obtain the weighted voltage signal sequence and current signal sequence, respectively.
[0009] The weighted voltage signal sequence and the current signal sequence are subjected to FFT transformation to obtain the corresponding discrete frequency domain spectrum lines, and the three adjacent spectrum lines with the largest amplitudes are selected respectively.
[0010] Based on the amplitude and frequency information of the three adjacent spectral lines, an interpolation algorithm is used to correct the discrete frequency domain spectral lines to obtain the true amplitude and true phase of the current and voltage of each harmonic.
[0011] Based on the true amplitude and true phase of the current and voltage of each harmonic, the active power and reactive power of each harmonic are obtained.
[0012] The total harmonic power of the UHVDC system within a preset metering period is obtained based on the active and reactive power of each harmonic.
[0013] Optionally, in the above harmonic energy analysis method, the three adjacent spectral lines with the largest amplitudes are selected as follows:
[0014] The amplitude information of each spectral line is extracted based on the discrete frequency domain spectral lines after FFT transformation;
[0015] Sorting is based on the amplitude information of each spectral line;
[0016] The spectral line with the largest amplitude is identified as the second spectral line.
[0017] The second and third largest amplitude spectral lines are selected on both sides of the second spectral line as the first and third spectral lines, respectively.
[0018] Record the amplitude of the first spectral line The amplitude of the second spectral line The amplitude of the third spectral line ;in, These represent the frequency parameters of the first, second, and third spectral lines, respectively. These represent the amplitudes of the first, second, and third spectral lines, respectively; X(·) represents the complex amplitude of the frequency domain spectral line.
[0019] Optionally, in the above harmonic power analysis method, the interpolation algorithm is a three-spectrum interpolation algorithm. Based on the amplitude and frequency information of the three adjacent spectral lines, the interpolation algorithm is used to correct the discrete frequency domain spectral lines to obtain the true amplitude and true phase of the current and voltage of each harmonic, including:
[0020] Define auxiliary parameters ;in, Let α be the true harmonic frequency parameter, and let α take values in the range of (-0.5, 0.5).
[0021] A 7th-order polynomial fitting was performed on the mapping relationship between the amplitudes of the three adjacent spectral lines and the auxiliary parameter α to obtain polynomial approximations of α(β) and ν(α); where α(β) represents the polynomial approximation of α with the intermediate parameter β; ν(α) represents the polynomial approximation of the amplitude correction coefficient ν with α; and β is based on... Intermediate parameters;
[0022] Based on the polynomial approximation, auxiliary parameter α, frequency response function of four fifth-order Nuttall window functions, and amplitude correction formula, the true amplitude of each harmonic after correction is obtained.
[0023] The amplitude correction formula is as follows: ;
[0024] In the formula, A represents the corrected true amplitude; W(·) represents the frequency response function of the four-term fifth-order Nuttall window function; N represents the number of sampling points;
[0025] The true phase after harmonic correction is obtained based on the phase correction formula;
[0026] The phase correction formula is as follows: ;
[0027] In the formula, Indicates the corrected true phase; Indicates the second spectral line The corresponding complex argument.
[0028] Optionally, in the above harmonic power analysis method, the number of sampling points N ≥ 2n + 1; n is the highest harmonic order to be analyzed in the UHVDC system;
[0029] The sampling frequency fs ≥ 2 × fmax, where fmax is the highest harmonic frequency that needs to be analyzed in the UHVDC system.
[0030] Optionally, in the above harmonic energy analysis method, a 7th-order polynomial fitting is performed on the mapping relationship between the amplitudes of the three adjacent spectral lines and the auxiliary parameter α to obtain polynomial approximations of α(β) and ν(α), including:
[0031] A set of sample points is constructed based on the range of values for the auxiliary parameter α;
[0032] For each sample point, the theoretical amplitude values of the three adjacent spectral lines are obtained by combining the frequency response characteristics of the four fifth-order Nuttall window functions.
[0033] The intermediate parameter β corresponding to the amplitude of three adjacent spectral lines is determined based on the first formula;
[0034] The first formula is: ;
[0035] Using β as the input variable and α as the output variable, a 7th-order polynomial was fitted using a data fitting tool to obtain a polynomial approximation of α(β).
[0036] For each α sample point, the corrected true amplitude is obtained by combining the amplitude correction formula.
[0037] The amplitude correction coefficient is obtained based on the theoretical amplitude value and the corrected true amplitude value;
[0038] Using α as the input variable and the amplitude correction coefficient as the output variable, a 7th-order polynomial is fitted using a data fitting tool to obtain a polynomial approximation of ν(α).
[0039] Optionally, in the above harmonic power analysis method, the active power and reactive power of each harmonic are obtained based on the true amplitude and true phase of the current and voltage of each harmonic, including:
[0040] For each harmonic order, extract the true current amplitude, true current phase, true voltage amplitude, and true voltage phase corresponding to that harmonic.
[0041] The active power and reactive power are obtained based on the true amplitude and phase of the current, the true amplitude and phase of the voltage for each harmonic.
[0042] Optionally, in the above harmonic energy analysis method, the total harmonic energy of the UHVDC system within a preset metering period is obtained based on the active and reactive power of each harmonic, including:
[0043] Determine the preset metering cycle;
[0044] Within the preset metering period, the active power and reactive power corresponding to all harmonic orders to be analyzed are accumulated to obtain the sum of active power and reactive power of each harmonic order within the period.
[0045] Then, the sum of active power and the sum of reactive power are integrated with the duration of the preset metering cycle to obtain the total harmonic energy, which includes both active and reactive power.
[0046] To address the aforementioned technical problems, this application also provides a harmonic power analysis device, comprising:
[0047] The acquisition module is used to acquire voltage and current signals from the UHVDC system to obtain voltage time-domain signal sequences and current time-domain signal sequences.
[0048] The weighting processing module is used to perform weighting processing on the voltage time-domain signal sequence and the current time-domain signal sequence respectively through four fifth-order Nuttall window functions to obtain the weighted voltage signal sequence and current signal sequence.
[0049] The conversion module is used to perform FFT transformation on the weighted voltage signal sequence and the current signal sequence to obtain the corresponding discrete frequency domain spectrum lines, and to select the three adjacent spectrum lines with the largest amplitude respectively.
[0050] The interpolation module is used to correct the discrete frequency domain spectrum based on the amplitude and frequency information of the three adjacent spectral lines, respectively, and to obtain the true amplitude and true phase of the current and voltage of each harmonic.
[0051] The calculation module is used to obtain the active power and reactive power of each harmonic based on the true amplitude and true phase of the current and voltage of each harmonic.
[0052] The statistics module is used to obtain the total harmonic power of the UHVDC system within a preset metering period based on the active and reactive power of each harmonic.
[0053] To address the aforementioned technical problems, this application also provides a harmonic power analysis device, comprising:
[0054] Memory, used to store computer programs;
[0055] A processor is used to implement the steps of the above-described harmonic energy analysis method when executing the computer program.
[0056] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned harmonic energy analysis method.
[0057] The harmonic energy analysis method provided in this application first collects voltage and current time-domain signal sequences for the UHVDC system. It then uses a four-term fifth-order Nuttall window function to weight the time-domain signals, avoiding frequency domain energy diffusion caused by signal truncation and abrupt changes. After the FFT transform, it adds a selection of the three adjacent spectral lines with the largest amplitudes and interpolation algorithm corrections. Through targeted selection and correction of discrete frequency domain spectral lines, it accurately locates the spectral information corresponding to the true harmonic frequencies, solving the problems of insufficient frequency resolution and low accuracy of high-order harmonic measurement caused by the picket fence effect in traditional FFT algorithms. Simultaneously, it independently corrects the spectral lines of the voltage and current signals to ensure that the amplitude and phase parameters required for subsequent power calculations are true values. Finally, it calculates the power based on the corrected true amplitude and phase of each harmonic voltage and current, and accumulates them to obtain the total harmonic energy, thereby improving the accuracy of harmonic measurement and ensuring the accuracy of the total harmonic energy within the preset measurement period.
[0058] In addition, this application also provides an apparatus and a medium that correspond to the above-mentioned harmonic power analysis method and have the same effect. Attached Figure Description
[0059] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0060] Figure 1 A flowchart of a harmonic energy analysis method provided in this application embodiment;
[0061] Figure 2This is a schematic diagram of the picket fence effect during asynchronous sampling.
[0062] Figure 3 A simulation diagram illustrating the amplitude error of windowed interpolation FFT provided in this application embodiment;
[0063] Figure 4 A simulation diagram illustrating the phase error of a windowed interpolation FFT provided in this application embodiment;
[0064] Figure 5 A structural diagram of a harmonic power analysis device provided in an embodiment of this application;
[0065] Figure 6 A structural diagram of another harmonic power analysis device provided in an embodiment of this application. Detailed Implementation
[0066] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0067] The core of this application is to provide a harmonic power analysis method, device, and medium.
[0068] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0069] This application provides a method for harmonic power analysis, such as... Figure 1 As shown, it includes:
[0070] S11: Acquire voltage and current signals from the UHVDC system to obtain voltage time-domain signal sequences and current time-domain signal sequences;
[0071] S12: The voltage time-domain signal sequence and the current time-domain signal sequence are weighted by four fifth-order Nuttall window functions to obtain the weighted voltage signal sequence and current signal sequence, respectively.
[0072] S13: Perform FFT transformation on the weighted voltage signal sequence and current signal sequence to obtain the corresponding discrete frequency domain spectrum lines, and select the three adjacent spectrum lines with the largest amplitude respectively.
[0073] S14: Based on the amplitude and frequency information of three adjacent spectral lines, an interpolation algorithm is used to correct the discrete frequency domain spectral lines to obtain the true amplitude and true phase of the current and voltage of each harmonic.
[0074] S15: Based on the true amplitude and true phase of the current and voltage of each harmonic, obtain the active power and reactive power of each harmonic.
[0075] S16: Based on the active and reactive power of each harmonic, obtain the total harmonic power of the UHVDC system within the preset metering period.
[0076] The harmonic energy analysis method provided in this embodiment is designed for harmonic metering scenarios in ultra-high voltage direct current systems.
[0077] Ultra-high voltage direct current (UHVDC) systems refer to power systems with high transmission voltage levels (typically ≥ ±800kV) that employ direct current (DC) transmission technology. Their converter stations contain a large number of power electronic devices (such as converters and thyristors), which are the main sources of harmonic generation. Due to the nonlinearity of the converter equipment, UHVDC systems generate a large number of characteristic harmonics, such as the 11th, 13th, 23rd, and 25th orders, and also suffer from fundamental frequency fluctuations and an abundance of higher-order harmonics.
[0078] Step S11 involves acquiring voltage and current signals from the UHVDC system to obtain voltage time-domain signal sequences and current time-domain signal sequences. Voltage and current signals refer to the real-time changing voltage and current signals during system operation. The time-domain signal sequence refers to the ordered set of numbers obtained after discretely sampling continuous voltage / current signals at preset time intervals. Converting continuous signals into "time-domain signal sequences" is to meet the requirements of subsequent digital signal processing.
[0079] Step S12 involves weighting the voltage time-domain signal sequence and the current time-domain signal sequence using a four-term fifth-order Nuttall window (a type of cosine window) function to obtain the weighted voltage signal sequence and current signal sequence.
[0080] The four-term, fifth-order Nuttall window function is a cosine combination-based window function. "Four-term" refers to its four cosine functions, and "fifth-order" refers to the order of its frequency response. The core parameters of this window function are the weighting coefficients a0=0.3125, a1=0.46875, a2=0.1875, and a3=0.03125. Weighting involves multiplying each data point in the time-domain signal sequence by the corresponding function value of the window function, thus achieving smooth truncation of the signal.
[0081] Generally, when traditional FFT algorithms truncate signals, directly using a rectangular window can cause spectral leakage due to abrupt changes in the signal at the truncation point. Therefore, this step employs a four-term fifth-order Nuttall window function. By weighting, the time-domain signal gradually approaches zero at both ends of the truncation interval, avoiding abrupt signal changes and thus significantly suppressing spectral leakage. Compared to traditional window functions such as the Hanning window and Hamming window, the four-term fifth-order Nuttall window is superior in sidelobe suppression and sidelobe attenuation speed, effectively reducing sidelobe interference from higher harmonics (e.g., >38th order).
[0082] Step S13 performs FFT transformation on the weighted voltage signal sequence and current signal sequence to obtain the corresponding discrete frequency domain spectrum lines, and selects the three adjacent spectrum lines with the largest amplitude respectively.
[0083] Discrete frequency domain spectral lines refer to the amplitude and phase data corresponding to different frequency points obtained after FFT transformation. Each spectral line represents a signal component at a specific frequency. The three adjacent spectral lines with the largest amplitudes refer to the spectral lines corresponding to the three consecutive frequency points with the largest amplitude values in the frequency domain spectral lines, usually denoted as... (Left-side spectral lines) (Middle spectral line, with the largest amplitude) (Spectral lines on the right).
[0084] Only through FFT transformation can the frequency information of each harmonic be extracted from the voltage and current signals. This step adds a selection process after the FFT transformation, filtering for the three largest adjacent spectral lines. The purpose of this is to provide crucial data for subsequent interpolation correction: because the true frequency of the harmonics is usually located near the spectral line with the largest amplitude, selecting these three spectral lines maximizes the use of frequency domain information related to the true frequency, laying the foundation for accurate correction. Similarly, filtering the voltage and current spectral lines separately ensures the accuracy of their respective correction data.
[0085] Step S14 uses an interpolation algorithm to correct the discrete frequency domain spectrum based on the amplitude and frequency information of three adjacent spectral lines, obtaining the true amplitude and true phase of the current and voltage of each harmonic. The interpolation algorithm is a mathematical method for estimating unknown data points (amplitude and phase corresponding to the true harmonic frequency) using known data points (amplitude and frequency of the three spectral lines in this case). In this embodiment, it is specifically a three-spectral-line interpolation algorithm. The true amplitude and true phase refer to the amplitude and phase values that, after interpolation correction, approximate the actual physical characteristics of the harmonic.
[0086] Step S15: Based on the true amplitude and true phase of the current and voltage of each harmonic, obtain the active power and reactive power of each harmonic. The power calculation depends on the true amplitude and phase of the voltage and current. Step S16: Based on the active power and reactive power of each harmonic, obtain the total harmonic energy of the UHVDC system within the preset metering period. The total harmonic energy refers to the sum of the active and reactive energy of all harmonics within the preset metering period, where active energy is the integral of active power over time, and reactive energy is the integral of reactive power over time.
[0087] The harmonic energy analysis method provided in this application first collects voltage and current time-domain signal sequences for the UHVDC system. It then uses a four-term fifth-order Nuttall window function to weight the time-domain signals, avoiding frequency domain energy diffusion caused by signal truncation and abrupt changes. After the FFT transform, it adds a selection of the three adjacent spectral lines with the largest amplitudes and interpolation algorithm corrections. Through targeted selection and correction of discrete frequency domain spectral lines, it accurately locates the spectral information corresponding to the true harmonic frequencies, solving the problems of insufficient frequency resolution and low accuracy of high-order harmonic measurement caused by the picket fence effect in traditional FFT algorithms. Simultaneously, it independently corrects the spectral lines of the voltage and current signals to ensure that the amplitude and phase parameters required for subsequent power calculations are true values. Finally, it calculates the power based on the corrected true amplitude and phase of each harmonic voltage and current, and accumulates them to obtain the total harmonic energy, thereby improving the accuracy of harmonic measurement and ensuring the accuracy of the total harmonic energy within the preset measurement period.
[0088] Specifically, the three adjacent spectral lines with the largest amplitudes are selected as follows:
[0089] Extracting amplitude information of each spectral line based on the discrete frequency domain spectral lines after FFT transformation;
[0090] Sorting is based on the amplitude information of each spectral line;
[0091] The spectral line with the largest amplitude is identified as the second spectral line.
[0092] The second and third largest amplitude spectral lines were selected on either side of the second spectral line as the first and third spectral lines, respectively.
[0093] Record the amplitude of the first spectral line The amplitude of the second spectral line The amplitude of the third spectral line ;in, These represent the frequency parameters of the first, second, and third spectral lines, respectively. These represent the amplitudes of the first, second, and third spectral lines, respectively; X(·) represents the complex amplitude of the frequency domain spectral line.
[0094] Extracting spectral amplitude information refers to separating the amplitude data corresponding to each frequency point from the discrete frequency domain spectrum after FFT transformation, sorting the extracted amplitude information from largest to smallest, quickly identifying the spectral line with the largest amplitude, and improving the screening efficiency.
[0095] The spectral line with the largest amplitude after sorting is designated as the median spectral line. Because the true frequency of harmonics is usually located near the peak value of the amplitude, It can serve as a "reference point" for locating the true frequency, providing a reference for subsequent selection of adjacent spectral lines on both sides.
[0096] exist The second and third largest amplitude spectral lines were selected from adjacent sides as... (Left side) and (Right side) or the opposite, ensuring that the three spectral lines are continuous and distributed around the true frequency, covering the frequency domain information related to the true frequency to the maximum extent, and providing key data support for interpolation correction.
[0097] like Figure 2 As shown, performing a Fourier transform on the signal yields some discrete spectral lines. To obtain... This maximum value actually requires interpolation of the spectral lines, generally... They are all located near the three spectral lines with the largest amplitudes. This is determined by recording the amplitudes of the spectral lines. The screening results are converted into quantized data, providing input parameters for establishing the mapping relationship between amplitude and true frequency in subsequent interpolation algorithms.
[0098] Specifically, the interpolation algorithm is a three-spectral-line interpolation algorithm. Based on the amplitude and frequency information of three adjacent spectral lines, the interpolation algorithm is used to correct the discrete frequency domain spectral lines to obtain the true amplitude and true phase of the current and voltage of each harmonic, including:
[0099] Define auxiliary parameters ;in, Let α be the true harmonic frequency parameter, and let α take values in the range of (-0.5, 0.5).
[0100] A 7th-order polynomial fitting was performed on the mapping relationship between the amplitudes of three adjacent spectral lines and the auxiliary parameter α to obtain polynomial approximations of α(β) and ν(α); where α(β) represents the polynomial approximation of α with the intermediate parameter β; ν(α) represents the polynomial approximation of the amplitude correction coefficient ν with α; and β is based on... Intermediate parameters;
[0101] The true amplitude of each harmonic after correction is obtained based on the polynomial approximation, auxiliary parameter α, frequency response function of four fifth-order Nuttall window functions, and amplitude correction formula.
[0102] The amplitude correction formula is: ;
[0103] In the formula, A represents the corrected true amplitude; W(·) represents the frequency response function of the four-term fifth-order Nuttall window function; N represents the number of sampling points;
[0104] The true phase after harmonic correction is obtained based on the phase correction formula;
[0105] The phase correction formula is: ;
[0106] In the formula, Indicates the corrected true phase; Indicates the second spectral line The corresponding complex argument.
[0107] First, define the auxiliary parameters. And α∈(-0.5,0.5), because the true harmonic frequency is usually located on the spectral line with the largest amplitude. Nearly, the range of values for α can accurately quantify the true frequency and The degree of offset should be controlled to avoid the spread of correction errors due to excessive offset range.
[0108] Next, a 7th-order polynomial fitting was performed on the mapping relationship between the amplitudes of the three spectral lines and α to obtain approximations for α(β) and ν(α) (β is based on...). (Calculation) Since the mapping relationship between amplitude and α is nonlinear, the 7th order polynomial can control the computational complexity while ensuring fitting accuracy. It avoids the error caused by insufficient fitting of low-order polynomials and the stability problem caused by overfitting of high-order polynomials. β, as an intermediate parameter, can integrate the amplitude information of the three spectral lines into a single variable, simplifying the fitting process.
[0109] In the calculation of the true amplitude, a polynomial approximation, α, and four terms of the fifth-order Nuttall window frequency response function are combined and substituted into a specific amplitude correction formula. This formula weights the amplitudes of the three spectral lines (…). The highest weight is used (which is consistent with its characteristic of being closest to the true frequency), and the influence of the window function frequency response compensation window function weighting is introduced to offset the dual interference of spectral leakage and picket fence effect.
[0110] The true phase calculation uses a specific phase correction formula. for The complex argument, απ term is used to compensate for the true frequency and The phase shift, the π / 2 term is a fixed compensation introduced based on the phase characteristics of the four-term fifth-order Nuttall window, to ensure that the phase correction matches the phase change after the window function weighting, and finally makes the corrected phase close to the true harmonic phase.
[0111] Overall, by correcting the amplitude and phase separately, the sources of error in traditional FFT are offset.
[0112] Specifically, the number of sampling points N ≥ 2n + 1; n is the highest harmonic order to be analyzed in the UHVDC system;
[0113] The sampling frequency fs ≥ 2 × fmax, where fmax is the highest harmonic frequency that needs to be analyzed in the UHVDC system.
[0114] The number of sampling points N must satisfy N≥2n+1 (where n is the highest harmonic to be analyzed). The core purpose is to ensure that the frequency domain resolution is sufficient to distinguish each harmonic and avoid harmonic spectral line overlap. Because the UHVDC system needs to analyze high harmonic orders (e.g., >38), if N is too small, the frequency resolution after FFT transformation will be too large, causing the spectral lines of adjacent high-order harmonics to overlap, making it impossible to accurately separate each harmonic component. For example, when the highest harmonic n=50, N≥101 can ensure that the spectral line spacing between the 50th harmonic and the 49th and 51st harmonics is sufficient, accurately identifying the amplitude and frequency of each harmonic, and providing a clear frequency domain data foundation for subsequent interpolation correction.
[0115] The sampling frequency fs must satisfy fs≥2×fmax (where fmax is the highest harmonic frequency to be analyzed) to avoid aliasing of high-order harmonic signals. For example, when fmax=1900Hz, fs≥3800Hz can ensure that harmonic signals at and below 1900Hz can be accurately sampled without aliasing distortion, providing high-quality time-domain signals for subsequent processing such as window function weighting and FFT transformation, thus reducing measurement errors at the source.
[0116] Specifically, a 7th-order polynomial fitting is performed on the mapping relationship between the amplitudes of three adjacent spectral lines and the auxiliary parameter α to obtain polynomial approximations of α(β) and ν(α), including:
[0117] A set of sample points is constructed based on the range of values for the auxiliary parameter α;
[0118] For each sample point, the theoretical amplitude values of the three adjacent spectral lines are obtained by combining the frequency response characteristics of the four fifth-order Nuttall window functions.
[0119] The intermediate parameter β corresponding to the amplitude of three adjacent spectral lines is determined based on the first formula;
[0120] The first formula is: ;
[0121] Using β as the input variable and α as the output variable, a 7th-order polynomial was fitted using a data fitting tool to obtain a polynomial approximation of α(β).
[0122] For each α sample point, the corrected true amplitude is obtained by combining the amplitude correction formula;
[0123] The amplitude correction coefficient is obtained based on the theoretical amplitude value and the corrected true amplitude value;
[0124] Using α as the input variable and the amplitude correction coefficient as the output variable, a 7th-order polynomial is fitted using a data fitting tool to obtain a polynomial approximation of ν(α).
[0125] This embodiment first constructs a sample point set based on the value range of α∈(-0.5,0.5), covering the true frequency and All possible offset scenarios are considered. For each α sample point, the theoretical value of the spectral line amplitude is calculated by combining the frequency response characteristics of four fifth-order Nuttall windows.
[0126] Calculating the intermediate parameter β using the first formula essentially involves calculating the amplitudes of the three spectral lines. Transforming it into a single variable simplifies the fitting dimensions.
[0127] Using β as input and α as output, a 7th-order polynomial is fitted to obtain α(β). Subsequently, for α sample points, the true amplitude is obtained by combining the amplitude correction formula, the amplitude correction coefficient ν(α) is calculated, and then the ν(α) polynomial is fitted. The core is to compensate for the theoretical deviation of the amplitude correction formula.
[0128] Data fitting tools are typically used in Matlab. For example, in Matlab, the polyfit function is called to obtain a polynomial fitting approximation:
[0129] ;
[0130] Overall, by establishing a mapping model between α and spectral line amplitude, the actual characteristics of the window function are incorporated, and the fitting accuracy is guaranteed by a 7th-order polynomial.
[0131] Specifically, based on the true amplitude and true phase of the current and voltage of each harmonic, the active and reactive power of each harmonic are obtained, including:
[0132] For each harmonic order, extract the true current amplitude, true current phase, true voltage amplitude, and true voltage phase corresponding to that harmonic.
[0133] The active power and reactive power are obtained based on the true amplitude and phase of the current, the true amplitude and phase of the voltage for each harmonic.
[0134] Extracting the true amplitude and phase of current and voltage separately for each harmonic order is crucial because the amplitude and phase differences between different harmonics in UHVDC systems are significant. For example, the amplitudes of characteristic harmonics such as the 11th and 13th harmonics are typically higher than those of other higher harmonics, and the phase difference between voltage and current varies with the harmonic order. Mixing or combining these parameters would lead to interference between different harmonic parameters, making it impossible to accurately distinguish the power contribution of each harmonic. Separate extraction ensures that each set of parameters corresponds to a unique harmonic order, laying the foundation for accurate subsequent power calculations.
[0135] Subsequently, active and reactive power are calculated based on the parameters of each harmonic: active power depends on the product of the voltage and current amplitudes and the cosine of their phase difference, while reactive power depends on the product of the amplitudes and the sine of their phase difference. Since the true amplitude and phase have been obtained through interpolation correction, rather than the approximation of traditional FFT, parameter errors can be effectively avoided from being transmitted to the power calculation stage, ensuring that the active and reactive power of each harmonic is close to the actual values, and reducing errors caused by misjudgment of phase difference.
[0136] Specifically, the total harmonic power of the UHVDC system within a preset metering period is obtained based on the active and reactive power of each harmonic, including:
[0137] Determine the preset metering cycle;
[0138] Within the preset metering period, the active power and reactive power corresponding to all harmonic orders to be analyzed are accumulated to obtain the sum of active power and reactive power of each harmonic order within the period.
[0139] Then, the sum of active power and the sum of reactive power are integrated with the duration of the preset metering cycle to obtain the total harmonic energy, which includes both active and reactive power.
[0140] Preset metering cycles are typically measured in hours or days. Within the cycle, the active and reactive power of each harmonic is summed to obtain the total power. Finally, the total power is integrated with the cycle duration to obtain the total harmonic energy. This integration calculation can accurately calculate the total energy change over time within the cycle, avoiding metering errors caused by power fluctuations. Especially for UHVDC systems, the integration calculation can capture power dynamics in real time, ensuring that the total energy result is close to the actual energy consumption or transmission volume.
[0141] To verify the effectiveness of the improved algorithm, simulation analysis was conducted. The integer harmonic signal model used in the simulation was as follows: ;
[0142] Where, x(n): the time-domain signal value (current signal or voltage signal) of the nth sampling point; : The amplitude of the i-th harmonic signal; Fundamental frequency; : Sampling frequency; n: Sampling point number; : The initial phase of the i-th harmonic.
[0143] The simulation signal parameter settings are shown in Table 1.
[0144] Table 1 Simulation signal parameters
[0145]
[0146] The simulation signal was analyzed using the improved windowed interpolation FFT algorithm to obtain the following results: Figure 3 and Figure 4 The analysis results are shown.
[0147] Depend on Figure 3 and Figure 4 Simulation results show that after performing three-spectrum interpolation calculations using the Hanning window, Hamming window, Blackman window, Blackman-Harris window, and four-term fifth-order Nuttall window FFT algorithms, the amplitude error for analyzing each harmonic of complex harmonic signals does not exceed 0.075%, and the phase error does not exceed 0.25%. The improved three-spectrum interpolation FFT based on the four-term fifth-order Nuttall window has significantly smaller amplitude and phase errors than other common windowing functions, with a maximum amplitude error not exceeding 0.0105% and a maximum phase error not exceeding 0.0389%. Furthermore, it can be observed that when harmonic signals are present, the phase measurement error is significantly greater than the amplitude measurement accuracy. Simulation verification demonstrates that the four-term fifth-order Nuttall window three-spectrum interpolation algorithm used in this paper significantly reduces the measurement error for complex harmonic signals and achieves high detection accuracy.
[0148] The above embodiments have described the harmonic power analysis method in detail. This application also provides embodiments corresponding to the harmonic power analysis device. It should be noted that this application describes the embodiments of the device from two perspectives: one is based on the functional modules, and the other is based on the hardware.
[0149] From the perspective of functional modules Figure 5 A structural diagram of a harmonic power analysis device provided in an embodiment of this application is shown below. Figure 5 As shown, a harmonic power analysis device includes:
[0150] Acquisition module 21 is used to acquire voltage and current signals of the UHVDC system to obtain voltage time-domain signal sequences and current time-domain signal sequences;
[0151] The weighting processing module 22 is used to perform weighting processing on the voltage time-domain signal sequence and the current time-domain signal sequence respectively through four fifth-order Nuttall window functions to obtain the weighted voltage signal sequence and current signal sequence.
[0152] The conversion module 23 is used to perform FFT transformation on the weighted voltage signal sequence and current signal sequence to obtain the corresponding discrete frequency domain spectrum lines, and to select the three adjacent spectrum lines with the largest amplitude respectively.
[0153] Interpolation module 24 is used to correct the discrete frequency domain spectrum based on the amplitude and frequency information of three adjacent spectral lines using an interpolation algorithm, so as to obtain the true amplitude and true phase of the current and voltage of each harmonic.
[0154] The calculation module 25 is used to obtain the active power and reactive power of each harmonic based on the true amplitude and true phase of the current and voltage of each harmonic.
[0155] The statistics module 26 is used to obtain the total harmonic power of the UHVDC system within a preset metering period based on the active power and reactive power of each harmonic.
[0156] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.
[0157] Figure 6 A structural diagram of another harmonic power analysis device provided in the embodiments of this application is shown below. Figure 6 As shown, the harmonic power analysis device includes: a memory 30 for storing computer programs;
[0158] The processor 31 is used to execute a computer program to implement the steps of the method for obtaining user operation habit information as described in the above embodiment (harmonic power analysis method).
[0159] The harmonic power analysis device provided in this embodiment may include, but is not limited to, mobile terminals, personal computers, workstations, etc.
[0160] The processor 31 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 31 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 31 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 31 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 31 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.
[0161] The memory 30 may include one or more computer-readable storage media, which may be non-transitory. The memory 30 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 30 is used to store at least the following computer program 301, which, after being loaded and executed by the processor 31, is capable of implementing the relevant steps of the harmonic power analysis method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 30 may also include an operating system 302 and data 303, and the storage method may be temporary or permanent storage. The operating system 302 may include Windows, Unix, Linux, etc. The data 303 may include, but is not limited to, data involved in implementing the harmonic power analysis method.
[0162] In some embodiments, the harmonic power analysis device may further include a display screen 32, an input / output interface 33, a communication interface 34, a power supply 35, and a communication bus 36.
[0163] Those skilled in the art will understand that Figure 6 The structure shown does not constitute a limitation on the harmonic power analysis device and may include more or fewer components than shown.
[0164] The harmonic power analysis device provided in this application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: harmonic power analysis method.
[0165] Finally, this application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above-described harmonic energy analysis method embodiment.
[0166] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0167] The computer-readable storage medium provided in this embodiment stores a computer program thereon. When the processor executes the program, it can implement the following method: harmonic energy analysis method.
[0168] The harmonic power analysis method, apparatus, and medium provided in this application have been described in detail above. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
[0169] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for harmonic energy analysis, characterized in that, include: The voltage and current signals of the ultra-high voltage direct current system are collected to obtain voltage time-domain signal sequences and current time-domain signal sequences. The voltage time-domain signal sequence and the current time-domain signal sequence are weighted by four fifth-order Nuttall window functions to obtain the weighted voltage signal sequence and current signal sequence, respectively. The weighted voltage signal sequence and the current signal sequence are subjected to FFT transformation to obtain the corresponding discrete frequency domain spectrum lines, and the three adjacent spectrum lines with the largest amplitudes are selected respectively. Based on the amplitude and frequency information of the three adjacent spectral lines, an interpolation algorithm is used to correct the discrete frequency domain spectral lines to obtain the true amplitude and true phase of the current and voltage of each harmonic. Based on the true amplitude and true phase of the current and voltage of each harmonic, the active power and reactive power of each harmonic are obtained. The total harmonic power of the UHVDC system within a preset metering period is obtained based on the active and reactive power of each harmonic.
2. The harmonic energy analysis method according to claim 1, characterized in that, The three adjacent spectral lines with the largest amplitudes were selected as follows: The amplitude information of each spectral line is extracted based on the discrete frequency domain spectral lines after FFT transformation; Sorting is based on the amplitude information of each spectral line; The spectral line with the largest amplitude is identified as the second spectral line. The second and third largest amplitude spectral lines are selected on both sides of the second spectral line as the first and third spectral lines, respectively. Record the amplitude of the first spectral line The amplitude of the second spectral line The amplitude of the third spectral line ;in, These represent the frequency parameters of the first, second, and third spectral lines, respectively. These represent the amplitudes of the first, second, and third spectral lines, respectively; X(·) represents the complex amplitude of the frequency domain spectral line.
3. The harmonic energy analysis method according to claim 1, characterized in that, The interpolation algorithm is a three-spectral-line interpolation algorithm. Based on the amplitude and frequency information of the three adjacent spectral lines, the discrete frequency domain spectral lines are corrected using the interpolation algorithm to obtain the true amplitude and true phase of the current and voltage of each harmonic, including: Define auxiliary parameters ;in, Let α be the true harmonic frequency parameter, and let α take values in the range of (-0.5, 0.5). A 7th-order polynomial fitting was performed on the mapping relationship between the amplitudes of the three adjacent spectral lines and the auxiliary parameter α to obtain polynomial approximations of α(β) and ν(α); where α(β) represents the polynomial approximation of α with the intermediate parameter β; ν(α) represents the polynomial approximation of the amplitude correction coefficient ν with α; and β is based on... Intermediate parameters; Based on the polynomial approximation, auxiliary parameter α, frequency response function of four fifth-order Nuttall window functions, and amplitude correction formula, the true amplitude of each harmonic after correction is obtained. The amplitude correction formula is as follows: ; In the formula, A represents the corrected true amplitude; W(·) represents the frequency response function of the four-term fifth-order Nuttall window function; N represents the number of sampling points; The true phase after harmonic correction is obtained based on the phase correction formula; The phase correction formula is as follows: ; In the formula, Indicates the corrected true phase; Indicates the second spectral line The corresponding complex argument.
4. The harmonic energy analysis method according to claim 3, characterized in that, The number of sampling points N ≥ 2n + 1; n is the highest harmonic order that needs to be analyzed in the UHVDC system. The sampling frequency fs ≥ 2 × fmax, where fmax is the highest harmonic frequency that needs to be analyzed in the UHVDC system.
5. The harmonic energy analysis method according to claim 3, characterized in that, A 7th-order polynomial fitting is performed on the mapping relationship between the amplitudes of the three adjacent spectral lines and the auxiliary parameter α to obtain polynomial approximations of α(β) and ν(α), including: A set of sample points is constructed based on the range of values for the auxiliary parameter α; For each sample point, the theoretical amplitude values of the three adjacent spectral lines are obtained by combining the frequency response characteristics of the four fifth-order Nuttall window functions. The intermediate parameter β corresponding to the amplitude of three adjacent spectral lines is determined based on the first formula; The first formula is: ; Using β as the input variable and α as the output variable, a 7th-order polynomial was fitted using a data fitting tool to obtain a polynomial approximation of α(β). For each α sample point, the corrected true amplitude is obtained by combining the amplitude correction formula. The amplitude correction coefficient is obtained based on the theoretical amplitude value and the corrected true amplitude value; Using α as the input variable and the amplitude correction coefficient as the output variable, a 7th-order polynomial is fitted using a data fitting tool to obtain a polynomial approximation of ν(α).
6. The harmonic energy analysis method according to claim 1, characterized in that, Based on the true amplitude and true phase of the current and voltage of each harmonic, the active power and reactive power of each harmonic are obtained, including: For each harmonic order, extract the true current amplitude, true current phase, true voltage amplitude, and true voltage phase corresponding to that harmonic. The active power and reactive power are obtained based on the true amplitude and phase of the current, the true amplitude and phase of the voltage for each harmonic.
7. The harmonic energy analysis method according to claim 6, characterized in that, The total harmonic energy of the UHVDC system within a preset metering period is obtained based on the active and reactive power of each harmonic, including: Determine the preset metering cycle; Within the preset metering period, the active power and reactive power corresponding to all harmonic orders to be analyzed are accumulated to obtain the sum of active power and reactive power of each harmonic order within the period. Then, the sum of active power and the sum of reactive power are integrated with the duration of the preset metering cycle to obtain the total harmonic energy, which includes both active and reactive power.
8. A harmonic energy analysis device, characterized in that, include: The acquisition module is used to acquire voltage and current signals from the UHVDC system to obtain voltage time-domain signal sequences and current time-domain signal sequences. The weighting processing module is used to perform weighting processing on the voltage time-domain signal sequence and the current time-domain signal sequence respectively through four fifth-order Nuttall window functions to obtain the weighted voltage signal sequence and current signal sequence. The conversion module is used to perform FFT transformation on the weighted voltage signal sequence and the current signal sequence to obtain the corresponding discrete frequency domain spectrum lines, and to select the three adjacent spectrum lines with the largest amplitude respectively. The interpolation module is used to correct the discrete frequency domain spectrum based on the amplitude and frequency information of the three adjacent spectral lines, respectively, and to obtain the true amplitude and true phase of the current and voltage of each harmonic. The calculation module is used to obtain the active power and reactive power of each harmonic based on the true amplitude and true phase of the current and voltage of each harmonic. The statistics module is used to obtain the total harmonic power of the UHVDC system within a preset metering period based on the active and reactive power of each harmonic.
9. A harmonic energy analysis device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the harmonic energy analysis method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the harmonic energy analysis method as described in any one of claims 1 to 7.