Anti-interference compensation method for complex working condition electric energy metering
Patent Information
- Application Number
- CN202611168416.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-23
AI Technical Summary
[0007]针对新能源并网、大功率冲击负荷等复杂工况的电能计量需求,现有技术存在四大核心技术缺陷,无法同时满足宽频干扰抑制、基波参数无偏提取、微秒级实时响应的核心要求,具体如下:
[0035]有益效果:突破了时频分辨率与实时性的原理性约束,解决了两者不可兼顾的行业核心矛盾。本发明通过单周期正交基解耦的拟合方法,将时间分辨率与频率分辨率完全解耦,时间分辨率由采样频率决定,可达到微秒级,频率分辨率由正交基的基波频率决定,实现无偏提取,同时算法计算量极低,单周期内可完成全部计算,完全满足法制计量对终端响应实时性的硬性要求,同时实现了宽频干扰下的高精度计量,打破了现有算法"精度提升必然伴随实时性下降"的固有约束。
Smart Images

Figure CN122962486A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electricity metering, specifically relating to a method for anti-interference compensation in electricity metering under complex operating conditions. Background Technology
[0002] With the large-scale grid connection of new energy power generation and the widespread application of high-power power electronic loads, the operating conditions of the power system are showing significant increasing complexity and non-stationarity. In scenarios such as low-voltage ride-through of wind power and photovoltaics, electric arc furnace smelting, power supply to high-speed rail traction networks, and DC fast charging stations, the grid voltage and current signals are no longer ideal power frequency sinusoidal steady-state signals, but rather wide-frequency multi-component coupled non-stationary signals superimposed with subsynchronous oscillations, interharmonics, integer harmonics, and supersynchronous harmonics. This places extremely high demands on the accuracy, real-time performance, and anti-interference capabilities of power metering.
[0003] The core of electricity metering is the accurate extraction of fundamental energy parameters and the effective compensation for metering errors. Existing electricity metering algorithms for complex operating conditions are mainly divided into three categories, and their core technical principles and application status are as follows:
[0004] The first category consists of steady-state metering algorithms based on Fourier transform, with windowed Fast Fourier Transform (FFT) and windowed interpolation FFT as core representatives. The core principle of this type of algorithm is to convert the time-domain signal into a frequency-domain signal through integer-cycle sampling, suppress spectral leakage through a window function, correct the picket fence effect through an interpolation algorithm, and finally extract the amplitude and phase parameters of the fundamental wave and each harmonic to complete the energy metering. This type of algorithm has simple computational logic and low hardware implementation difficulty, and is currently the core commercial algorithm for mainstream energy metering terminals, meeting the metering accuracy requirements under steady-state grid operation conditions.
[0005] The second category comprises nonlinear time-frequency analysis algorithms, with wavelet transform, Hilbert-Huang transform (HHT), and Wegener-Vell distribution (WVD) as core representatives. The core principle of this class of algorithms is to overcome the steady-state signal assumption of Fourier transform and achieve component decomposition and parameter extraction of non-stationary signals through joint time-frequency analysis. Wavelet transform separates signals in different frequency bands through multi-resolution analysis, while HHT decomposes the signal into multiple intrinsic mode functions through empirical mode decomposition (EMD). Finally, Hilbert transform is used to obtain the instantaneous frequency and amplitude, adapting to the processing requirements of non-stationary signals. In laboratory simulation environments, this class of algorithms significantly outperforms traditional FFT algorithms in processing non-stationary signals and is currently a research hotspot in the academic field.
[0006] The third category comprises adaptive filtering and parameter identification algorithms, with Kalman filtering, phase-locked loops (PLLs), and least-squares fitting as core representatives. The core principle of this type of algorithm is to construct a dynamic model of the signal, track its time-varying parameters in real time, and achieve dynamic extraction of the fundamental component. Specifically, synchronous phase-locked loops can track the frequency and phase of the power grid's fundamental wave in real time, while Kalman filtering can achieve optimal signal estimation in noisy environments, finding wide application in dynamic power quality monitoring.
[0007] To address the complex electricity metering needs of new energy grid connection and high-power impact loads, existing technologies suffer from four core technical deficiencies, failing to simultaneously meet the core requirements of broadband interference suppression, unbiased extraction of fundamental parameters, and microsecond-level real-time response. These deficiencies are as follows:
[0008] First, traditional windowed FFT algorithms have inherent fundamental flaws, only applicable to steady-state sinusoidal signals and unsuitable for metering requirements under non-stationary time-varying conditions. The core premise of these algorithms is that the signal remains stable within an integer sampling window. However, loads under complex conditions exhibit rapid time-varying characteristics at the microsecond level, with the amplitude and phase of the fundamental wave changing significantly within a single period. The Fourier transform within an integer window cannot reflect the local time-varying characteristics of the signal, inevitably leading to spectral leakage and the picket-fence effect. Simultaneously, there is an irreconcilable contradiction between the main lobe width and side lobe attenuation of the window function. A wide main lobe reduces frequency resolution, making it impossible to separate interharmonics and fundamental components with similar frequencies; high side lobe attenuation exacerbates spectral leakage, ultimately resulting in systematic deviations in the extracted fundamental amplitude and phase, directly causing errors in power metering.
[0009] Second, existing nonlinear time-frequency analysis algorithms suffer from core problems such as mutually exclusive time-frequency resolutions, mode aliasing, and endpoint effects, making it impossible to achieve accurate and unbiased extraction of fundamental parameters. Wavelet transform inherently has a mutually exclusive constraint between time and frequency resolution: high-frequency bands have high time resolution but low-frequency resolution, while low-frequency bands have high frequency resolution but low time resolution. Furthermore, signals under complex operating conditions simultaneously exhibit subsynchronous low-frequency oscillations and supersynchronous high-frequency interference. A single wavelet basis function cannot simultaneously meet the time-frequency resolution requirements across the entire frequency domain, failing to achieve accurate separation of the fundamental component. The EMD decomposition process of the HHT algorithm is extremely sensitive to noise and cross-components. Under multi-component coupling interference, severe mode aliasing occurs, making it impossible to effectively separate the fundamental component from the interference components. Simultaneously, the endpoint effects of EMD decomposition lead to significant errors in the decomposition results at both ends of the signal. These errors accumulate during the sieving process, ultimately distorting the extraction results of the fundamental instantaneous amplitude and phase. In addition, these algorithms have extremely high computational complexity, requiring multi-cycle iterative calculations, which cannot meet the microsecond-level real-time response requirements, making them difficult to implement in embedded metering terminals.
[0010] Third, existing algorithms cannot resolve the core technical contradiction between metering accuracy and real-time performance, and cannot simultaneously meet the stringent requirements of legal metrology and the accuracy demands of complex operating conditions. Legal metrology imposes clear and stringent requirements on the real-time response of electricity metering terminals; the update delay of core metering parameters must not exceed the microsecond level. However, the metering accuracy of existing high-precision algorithms is positively correlated with computational complexity; improving accuracy inevitably comes with a significant increase in computational load, making it impossible to complete the calculation within a single cycle. While traditional windowed FFT algorithms have low computational load and strong real-time performance, their metering accuracy under broadband interference cannot meet the requirements. High-precision time-frequency analysis algorithms, while highly accurate, fail to meet real-time performance standards. This contradiction is a common industry pain point in the current implementation of electricity metering in complex operating conditions.
[0011] Fourth, existing algorithms lack the ability to indiscriminately suppress multi-component cross-coupling interference across a wide frequency domain, failing to meet the metering requirements of complex operating conditions across all scenarios. Most existing algorithms are designed for single-type interference scenarios, such as integer harmonics or subsynchronous oscillations, and cannot simultaneously handle cross-coupling interference across the entire frequency domain, including subsynchronous oscillations, interharmonics, integer harmonics, and supersynchronous harmonics. The core technical reason is that most existing algorithms employ a single processing architecture, failing to differentiate processing based on the characteristics of interference in different frequency bands. Interference components in different frequency bands will cross-couple during processing, causing mode aliasing, ultimately leading to biased extraction of the fundamental component and resulting in overcompensation or undercompensation problems in active and reactive energy metering. Summary of the Invention
[0012] The purpose of this invention is to provide a method for anti-interference compensation of power metering under complex operating conditions, so as to solve the problems mentioned in the background art.
[0013] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0014] A method for anti-interference compensation in power metering under complex operating conditions, characterized by comprising the following steps:
[0015] Step 1: Set the number of sampling points and sampling frequency per cycle according to the rated fundamental frequency of the power grid. Use hardware phase-locked loop or software synchronization algorithm to achieve synchronous sampling. Use single-cycle moving average method to remove DC component and odd-point median filtering method to suppress impulse noise.
[0016] Step 2: Divide the full frequency domain of the signal into four non-overlapping frequency bands. Use a linear phase finite-length unit impulse response low-pass filter to filter out the supersynchronous high-frequency components in a zero-phase filtering manner. Use an adaptive noise canceller to filter out the subsynchronous oscillation components. Use a comb filter with a recursive structure to filter out integer harmonics and interharmonic components.
[0017] Step 3: Construct strictly orthogonal in-phase basis functions and orthogonal basis functions, and use the least squares linear fitting method based on orthogonal basis to obtain the in-phase component and orthogonal component of the fundamental wave. Calculate the amplitude and phase of the fundamental wave and perform real-time closed-loop correction.
[0018] Step 4: Calculate the fundamental active power and reactive power based on the unbiased fundamental parameters, calculate the total metering error of interference components in each frequency band and perform synchronous compensation, and update the cumulative active energy value using the trapezoidal integration method.
[0019] Step 5: Output the core measurement parameters in real time, and adaptively adjust the algorithm parameters based on the verification results and the time-varying characteristics of the signal.
[0020] Furthermore, in step one, the number of sampling points per cycle is taken as an integer power of 2 greater than or equal to 128, and the sampling frequency is equal to the number of sampling points per cycle multiplied by the rated fundamental frequency of the power grid; the sliding window length of the single-cycle moving average method is consistent with the number of sampling points per cycle; the filtering window of the odd-point median filtering is taken as 3 points or 5 points.
[0021] Furthermore, in step two, the four frequency bands are as follows: the subsynchronous frequency band is greater than 0 and less than 0.5 times the rated fundamental frequency of the power grid; the fundamental frequency band is greater than or equal to 0.8 times and less than or equal to 1.2 times the rated fundamental frequency of the power grid; the harmonic and interharmonic frequency band is greater than 1.2 times and less than or equal to 50 times the rated fundamental frequency of the power grid; and the supersynchronous high-frequency band is greater than 50 times the rated fundamental frequency of the power grid.
[0022] Furthermore, in step two, the passband cutoff frequency of the linear phase finite-length unit impulse response low-pass filter is 50 times the rated fundamental frequency of the power grid, the stopband cutoff frequency is 52 times the rated fundamental frequency of the power grid, the passband ripple is no greater than 0.01dB, the stopband attenuation is no less than 60dB, and the filter order is 1 / 4 of the number of sampling points in a single cycle.
[0023] Furthermore, in step two, the main input of the adaptive noise canceller is the signal sequence after high-frequency filtering, and the reference input is the subsynchronous frequency band sequence after low-pass filtering at a cutoff frequency of 0.5 times the rated fundamental frequency of the power grid. The adaptive filtering algorithm adopts the least mean square algorithm, and the filter weight length is 1 / 8 of the number of sampling points in a single cycle.
[0024] Furthermore, in step two, the comb tooth spacing of the comb filter of the recursive structure is the rated fundamental frequency of the power grid, the passband center frequency is an integer multiple of the rated fundamental frequency of the power grid, and notch points are set at integer harmonic frequencies from the 2nd to the 50th order, with a notch depth of not less than 40dB.
[0025] Furthermore, in step three, the least squares linear fitting based on orthogonal bases adopts a sliding window recursive mechanism, which updates the window sequence and fitting results once each time a new sampling point is entered.
[0026] Furthermore, in step three, the real-time closed-loop correction includes: real-time detection of the actual frequency of the power grid by the interval between the zero-crossing points of the fundamental wave in two adjacent cycles, and correction of the angular frequency of the orthogonal basis function according to the frequency offset; and fixed phase compensation for the fixed group delay of the sliding window, with the compensation amount being the phase angle corresponding to half a sampling cycle.
[0027] Furthermore, in step four, the active and reactive power of the subsynchronous oscillation component, harmonic and interharmonic components, and supersynchronous high-frequency component are calculated respectively, and the total metering error is obtained by summing them. The compensated active power is equal to the fundamental active power minus the total active power error, and the compensated reactive power is equal to the fundamental reactive power minus the total reactive power error.
[0028] Furthermore, in step five, the output delay of the core measurement parameters does not exceed one sampling period; the core parameters of the adaptively adjusted algorithm include the number of sampling points per period, the filter order, the minimum mean square algorithm step size factor, and the sliding window length.
[0029] This application also discloses an electronic device, including:
[0030] At least one processor; and
[0031] A memory communicatively connected to the at least one processor; wherein,
[0032] The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the above-described method for anti-interference compensation of power metering under complex operating conditions according to the present invention.
[0033] This application also discloses a power metering anti-interference compensation device for complex operating conditions, including:
[0034] The signal preprocessing module removes DC components using a single-period moving average method and suppresses impulse noise using an odd-point median filtering method. The multi-band filtering module divides the signal's full frequency domain into four non-overlapping bands, uses a linear-phase finite-length unit impulse response low-pass filter with zero-phase filtering to remove supersynchronous high-frequency components, an adaptive noise canceller to remove subsynchronous oscillation components, and a recursive comb filter to remove integer harmonics and interharmonics. The fundamental parameter extraction module constructs strictly orthogonal in-phase and orthogonal basis functions, employing a minimum frequency response method based on orthogonal bases. The two-square linear fitting method obtains the in-phase and quadrature components of the fundamental wave, and calculates the amplitude and phase of the fundamental wave; the fundamental wave parameter correction module is used to perform real-time closed-loop correction on the calculated fundamental wave amplitude and phase; the power metering calculation module is used to calculate the fundamental wave active power and reactive power based on the unbiased fundamental wave parameters, and update the cumulative active power value using the trapezoidal integral method; the metering error compensation module is used to calculate the total metering error of interference components in each frequency band and perform synchronous compensation; the parameter output and adaptive module is used to output the core metering parameters in real time and adaptively adjust the algorithm parameters according to the verification results and the time-varying characteristics of the signal.
[0035] Beneficial effects: This invention breaks through the fundamental constraints of time-frequency resolution and real-time performance, resolving the core industry contradiction where the two cannot be simultaneously achieved. Through a single-cycle orthogonal basis decoupling fitting method, this invention completely decouples time resolution and frequency resolution. The time resolution, determined by the sampling frequency, reaches the microsecond level, while the frequency resolution is determined by the fundamental frequency of the orthogonal basis, achieving unbiased extraction. Simultaneously, the algorithm has extremely low computational complexity, completing all calculations within a single cycle. This fully meets the stringent real-time requirements of legal metrology for terminal response and achieves high-precision metrology under wideband interference, breaking the inherent constraint of existing algorithms that "improved accuracy inevitably leads to decreased real-time performance."
[0036] This invention achieves indiscriminate suppression of multi-component coupled interference across the entire frequency domain, eliminating the effects of mode aliasing and spectral leakage at their source. It employs a hierarchical decoupling processing architecture, using differentiated filtering methods for different frequency domain characteristics of subsynchronous oscillations, interharmonics, integer harmonics, and supersynchronous harmonics. The interference processing for different frequency bands is completely independent, avoiding mode aliasing problems caused by multi-component cross-coupling. Simultaneously, the combined processing of zero-phase filtering, adaptive cancellation, and comb filtering does not introduce any phase distortion or fundamental component attenuation, eliminating spectral leakage and picket-fence effects inherent in traditional FFT algorithms, thus laying the foundation for unbiased extraction of fundamental parameters.
[0037] This invention achieves unbiased identification of time-varying fundamental parameters, solving the overcompensation and undercompensation problems in power metering. Through the construction of strictly orthogonal basis functions, it achieves complete decoupled fitting of in-phase and quadrature components, with no systematic errors in the fitting results. Simultaneously, real-time closed-loop corrections are performed for grid frequency offset and sliding window phase delay, ensuring unbiased extraction of fundamental amplitude and phase under complex time-varying conditions. Power calculation based on unbiased fundamental parameters has no inherent bias. Combined with real-time quantization and dynamic compensation of interference components, the compensation amount perfectly matches the metering error caused by actual interference, eliminating the overcompensation and undercompensation problems commonly found in traditional algorithms. Attached Figure Description
[0038] Figure 1 This is an overall flowchart of the complex working condition power metering anti-interference compensation method of the present invention;
[0039] Figure 2 is a flowchart of the full-frequency domain interference component hierarchical decoupling and pre-filtering in an embodiment of this application;
[0040] Figure 3 is a flowchart of the unbiased extraction and parameter identification of the fundamental component in the embodiments of this application;
[0041] Figure 4 is a flowchart of the dynamic compensation calculation for power metering error in an embodiment of this application;
[0042] Figure 5 is a flowchart of the real-time output and closed-loop verification of measurement results in the embodiments of this application;
[0043] Figure 6 is a comparison of the spectrum before and after full-frequency domain interference suppression of power signals under complex operating conditions in the embodiments of this application. Detailed Implementation
[0044] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. 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 of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0045] This invention provides a method for anti-interference compensation in power metering under complex operating conditions, such as... Figure 1 As shown, the steps include:
[0046] Step 1: Synchronous and equally spaced sampling and preprocessing of power signals. The number of sampling points and the sampling frequency per cycle are set according to the rated fundamental frequency of the power grid. Synchronous sampling is achieved using a hardware phase-locked loop or a software synchronization algorithm, ensuring strict synchronization between the sampling start point and the fundamental zero-crossing point, and a fixed number of sampling points per cycle. The DC component is removed using a single-cycle moving average method, and pulse noise is suppressed using an odd-point median filtering method, resulting in a preprocessed signal sequence.
[0047] Step 2: Full-frequency domain interference component hierarchical decoupling and pre-filtering. Based on the grid's rated fundamental frequency, the signal's full-frequency domain is divided into four non-overlapping bands: subsynchronous band, fundamental band, harmonic and interharmonic band, and supersynchronous high-frequency band. A linear-phase finite-length unit impulse response low-pass filter is used to filter out supersynchronous high-frequency components using zero-phase filtering. An adaptive noise canceller is used to filter out subsynchronous oscillation components. A recursive comb filter is used to filter out integer harmonic and interharmonic components, resulting in a clean signal sequence containing only the fundamental band.
[0048] Step 3: Unbiased Extraction and Parameter Identification of Fundamental Components. For the single-cycle sampling sequence after hierarchical decoupling and pre-filtering, strictly orthogonal in-phase and orthogonal basis functions are constructed. The in-phase and orthogonal components of the fundamental wave are obtained using a least-squares linear fitting method based on orthogonal base functions. The amplitude and phase of the fundamental wave are calculated in real-time based on the in-phase and orthogonal components. Real-time closed-loop correction is performed to address the phase delay introduced by the grid frequency offset and sliding window, resulting in unbiased fundamental wave parameters.
[0049] Step 4: Dynamic Compensation Calculation for Energy Metering Error. Calculate the fundamental active and reactive power based on the unbiased voltage and current fundamental parameters; calculate the contribution of each frequency band interference component filtered out in stages to the energy metering error, and sum them to obtain the total metering error; synchronously compensate the total metering error into the fundamental power calculation results to obtain the compensated active and reactive power; use the trapezoidal integral method to update the cumulative active energy value in real time, and use a first-order inertial filter to smooth the instantaneous power fluctuations.
[0050] Step 5: Real-time output and closed-loop verification of measurement results. The compensated core measurement parameters are output in real time according to the prescribed format; a dual-path redundancy verification mechanism is adopted to compare the calculation results of the present invention method with those of the traditional windowed FFT algorithm in real time. When the deviation exceeds the set threshold, an abnormal alarm is triggered and the system automatically switches to the redundant calculation path; based on the closed-loop verification results and the time-varying characteristics of the signal, the core parameters of the algorithm are adjusted in real time to achieve adaptive adaptation under all operating conditions.
[0051] Furthermore, in step one, the number of sampling points per cycle is taken as an integer power of 2 greater than or equal to 128, and the sampling frequency is equal to the number of sampling points per cycle multiplied by the rated fundamental frequency of the power grid; the sliding window length of the single-cycle moving average method is consistent with the number of sampling points per cycle; the filtering window of the odd-point median filtering is taken as 3 points or 5 points.
[0052] Further, in step two, the subsynchronous frequency band is greater than 0 and less than 0.5 times the rated fundamental frequency of the power grid, the fundamental frequency band is greater than or equal to 0.8 times and less than or equal to 1.2 times the rated fundamental frequency of the power grid, the harmonic and interharmonic frequency band is greater than 1.2 times and less than or equal to 50 times the rated fundamental frequency of the power grid, and the supersynchronous high-frequency band is greater than 50 times the rated fundamental frequency of the power grid; the passband cutoff frequency of the linear phase finite-length unit impulse response low-pass filter is 50 times the rated fundamental frequency of the power grid, the stopband cutoff frequency is 52 times the rated fundamental frequency of the power grid, the passband ripple is not greater than 0.01dB, the stopband attenuation is not less than 60dB, and the filter order is 1 / 4 of the number of sampling points in a single cycle; the main input of the adaptive noise canceller is the signal sequence after high-frequency filtering, and the reference input is the signal after the cutoff frequency is 0.5 times. The subsynchronous frequency band sequence after low-pass filtering at the grid's rated fundamental frequency is used. The adaptive filtering algorithm adopts the least mean square algorithm, and the filter weight length is 1 / 8 of the number of sampling points in a single cycle. The comb tooth spacing of the recursive comb filter is the grid's rated fundamental frequency, the passband center frequency is an integer multiple of the grid's rated fundamental frequency, and notch points are set at the 2nd to 50th integer harmonic frequencies with a notch depth of not less than 40dB.
[0053] Furthermore, in step three, the least squares linear fitting based on orthogonal basis adopts a sliding window recursive mechanism, and the window sequence and fitting result are updated once each time a new sampling point is entered; the actual frequency of the power grid is detected in real time by the zero-crossing interval of the fundamental wave in two adjacent periods, and the angular frequency of the orthogonal basis function is corrected according to the frequency offset; fixed phase compensation is performed for the fixed group delay of the sliding window, and the compensation amount is the phase angle corresponding to half a sampling period.
[0054] Furthermore, in step four, the active and reactive power of the subsynchronous oscillation component, harmonic and interharmonic components, and supersynchronous high-frequency component are calculated respectively, and the total metering error is obtained by summing them. The compensated active power is equal to the fundamental active power minus the total active power error, and the compensated reactive power is equal to the fundamental reactive power minus the total reactive power error. The filtering time constant of the first-order inertial filter can be adaptively adjusted according to the operating conditions.
[0055] Furthermore, in step five, the output delay of the core measurement parameters does not exceed one sampling period; the dual-path redundancy verification also includes real-time verification of the fundamental wave fitting residual, calculating the mean square value of the fitting residual, and automatically adjusting the filter parameters when the mean square value exceeds the threshold; the core parameters of the algorithm that are adjusted in real time include the number of sampling points per cycle, the filter order, the minimum mean square algorithm step size factor, and the sliding window length.
[0056] This application also provides an embodiment of an electronic device. The electronic device is manifested in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: one or more processors or processing units, memory, and buses connecting different components (including memory and processing units).
[0057] A bus refers to one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. Examples of these architectures include, but are not limited to, Industry Standard Architecture (ISA) buses, Micro Channel Architecture (MCA) buses, Enhanced ISA buses, Video Electronics Standards Association (VESA) local buses, and Peripheral Component Interconnect (PCI) buses.
[0058] Electronic devices typically include a variety of computer-readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, and removable and non-removable media.
[0059] The memory may include computer-readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. Electronic devices may further include other removable / non-removable, volatile / non-volatile computer device storage media. By way of example only, the storage system may be used to read and write non-removable, non-volatile magnetic media.
[0060] The electronic device can also communicate with one or more external devices (e.g., keyboard, pointing device, camera, etc.), may include a display, and may communicate with one or more devices that enable a user to interact with the electronic device, and / or with any device that enables the electronic device to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via an input / output (I / O) interface. Furthermore, the electronic device can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public networks, such as the Internet) via a network adapter. The network adapter communicates with other modules of the electronic device via a bus. The processor executes various functional applications and data processing by running programs stored in memory, such as implementing the complex operating condition power metering anti-interference compensation method provided in the above embodiments of the present invention.
[0061] This application will be described below with reference to specific embodiments:
[0062] Example 1
[0063] This embodiment applies to the low-voltage side power metering terminal of a DC fast charging station for new energy vehicles. The rated fundamental frequency of my country's power grid is 50Hz. In this scenario, the power grid signal is superimposed with 2kHz-10kHz hypersynchronous high-frequency harmonics, 3rd-30th integer harmonics, and interharmonic interference. The charging pile exhibits microsecond-level rapid time-varying characteristics during load start-up and shutdown, making it a typical complex metering scenario. The specific implementation process of this embodiment is as follows:
[0064] The specific implementation of synchronous and equally spaced sampling and preprocessing of power signals first determines the core sampling parameters: the number of sampling points per cycle is 256, so the sampling frequency is 256 multiplied by 50Hz equals 12800Hz, or 12.8kHz, and the single sampling interval is 78.125μs, which meets the time accuracy requirements of microsecond-level response.
[0065] Synchronous sampling employs a hardware phase-locked loop (PLL) mechanism. The PLL utilizes TI's CDCE913 clock synthesizer chip to track the fundamental zero-crossing point of the grid voltage in real time, outputting a synchronous sampling trigger signal to ensure strict synchronization between the sampling start point and the fundamental zero-crossing point. The PLL's frequency tracking range is 45Hz-55Hz, covering the normal frequency offset range of the grid. When the actual grid frequency changes, the PLL dynamically adjusts the sampling clock frequency to ensure that the number of sampling points per cycle remains fixed at 256, eliminating initial errors caused by non-integer cycle sampling.
[0066] The sampling channel adopts a 16-bit synchronous sampling ADC chip ADS8688, which simultaneously collects three-phase voltage and three-phase current signals of the power grid. The sampling resolution meets the accuracy requirement of 0.1-class electric energy metering terminals. For the discrete voltage sequence and discrete current sequence obtained by ADC sampling, DC component removal is performed first, using the single-cycle moving average method. The length of the moving window is fixed at 256 points, and the arithmetic average of the 256 sampling values in the window is the DC component corresponding to the window. Each sampling value in the window is subtracted by this DC component to obtain the voltage sequence and current sequence after removing the DC offset. This method adopts a sliding window mechanism, which updates the window and the DC component every time a new sampling point is input, has no phase delay, and can eliminate the DC offset introduced by the sampling channel and the ADC chip in real time.
[0067] Subsequently, impulse noise suppression is performed on the sequences after DC component removal, using a 5-point median filtering method. For the nth sampling point, 5 consecutive sampling points n-2, n-1, n, n+1, n+2 are taken, the 5 sampling values are sorted by size and the median is taken as the filtering output of the nth sampling point, so as to obtain the preprocessed voltage sequence and current sequence. The 5-point median filtering can effectively suppress the spike pulse interference generated during the switching process of the charging pile power device, and will not damage the time-domain mutation characteristic of the signal when the load starts and stops. The filtering calculation of a single sampling point only requires 5 numerical comparisons, which can be completed within the sampling interval of 78.125μs, fully meeting the real-time requirement.
[0068] Specific implementation of hierarchical decoupling and pre-filtering of full-frequency-domain interference components In this embodiment, as shown Figure 2 , according to the rated fundamental frequency of 50Hz, the signal frequency domain is divided into 4 standard frequency bands: the subsynchronous frequency band is 0<f<25Hz, the fundamental frequency band is 40Hz≤f≤60Hz, the harmonic and interharmonic frequency band is 60Hz<f≤2500Hz, and the supersynchronous high-frequency band is f>2500Hz. Aiming at the interference characteristics of different frequency bands, hierarchical decoupling and pre-filtering are carried out in sequence, and the specific implementation is as follows:
[0069] (1) Zero-phase filtering of supersynchronous high-frequency components: design a linear-phase finite-duration impulse response low-pass filter, with core parameters as follows: passband cutoff frequency is 2500Hz, stopband cutoff frequency is 2600Hz, maximum passband ripple is no more than 0.01dB, minimum stopband attenuation is no less than 60dB, and the filter order is 64, that is, 1 / 4 of the number of sampling points in a single cycle. The group delay of the filter is fixed at 32 sampling points, which can be completely eliminated by subsequent phase compensation.
[0070] The filter is designed using the window function method, with a Blackman window selected as the window function. The Blackman window achieves a sidelobe attenuation of up to 74dB, meeting the stopband attenuation requirement of over 60dB. Simultaneously, it exhibits minimal passband ripple, ensuring no attenuation of fundamental or harmonic signals below 2500Hz. The filter's unit impulse response is obtained by multiplying the unit impulse response of the ideal low-pass filter by the Blackman window. The coefficients are pre-stored in the MCU flash memory of the metering terminal and can be directly read upon retrieval, eliminating the need for real-time calculation.
[0071] Zero-phase filtering is used to filter the preprocessed sequence. The specific execution process is as follows: First, the input sequence is subjected to forward finite-length unit impulse response filtering to obtain the forward filtered output sequence. Second, the forward filtered output sequence is time-reversed and passed through the same 64th-order finite-length unit impulse response filter again to obtain the inverse filtered output sequence. Third, the inverse filtered output sequence is time-reversed again to obtain the final zero-phase filtered output sequence. Zero-phase filtering can completely eliminate the phase delay and phase distortion introduced by the finite-length unit impulse response filter, ensuring that the phase information of the fundamental component is completely unbiased. At the same time, it completely filters out the supersynchronous high-frequency components above 2500Hz, avoiding mode aliasing interference from high-frequency components to subsequent low-frequency processing.
[0072] (2) Adaptive cancellation of subsynchronous oscillation components: For subsynchronous oscillation components below 25Hz, an adaptive noise canceller is used for filtering. The canceller is set with a main input channel and a reference input channel. The main input is the sequence after high-frequency filtering, and the reference input is the subsynchronous frequency band sequence after low-pass filtering with a finite-length unit impulse response at a cutoff frequency of 25Hz. The low-pass filter of the reference input channel adopts the same finite-length unit impulse response filter design method as the high-frequency filtering above, with an order of 32, to ensure distortion-free extraction of subsynchronous components.
[0073] The adaptive filtering algorithm employs the least mean square (LMS) algorithm, with a filter weight length of order 32 and a step size factor of 0.01. This step size factor ensures that the algorithm converges within 1 / 4 of a period (i.e., 64 sampling points), while maintaining a steady-state error of less than 0.1%, thus meeting the subsynchronous interference suppression requirements of DC fast charging stations. The core iterative process of the LMS algorithm is as follows: within each sampling interval, based on the main input, reference input, and current weights, the error output and updated weight values are calculated. The updated weights are then used for calculation at the next sampling point. The output of the adaptive canceller is the error sequence, i.e., the pure sequence after filtering out the subsynchronous oscillation component.
[0074] This method can adaptively track the frequency and amplitude changes of the subsynchronous component, completely eliminate subsynchronous oscillation interference, and at the same time will not produce any attenuation or phase distortion of the fundamental frequency band signal in the 40Hz-60Hz range. It solves the problem that traditional fixed coefficient low-pass filters will attenuate the fundamental low-frequency sideband when filtering out the subsynchronous component.
[0075] (3) Frequency domain comb of harmonic and interharmonic components, pre-filtering After the first two steps, only the fundamental frequency band component, the 2nd to 50th integer harmonics and interharmonic components remain in the sequence. This step uses a comb filter with a recursive structure for pre-filtering.
[0076] The core parameters of the comb filter are: a comb spacing of 50Hz, a passband center frequency that is an integer multiple of 50Hz, a stopband frequency that is a non-integer multiple of 50Hz, and notch points set at the 2nd to 50th integer harmonic frequencies with a notch depth of not less than 40dB. The filter adopts a single-pole recursive structure, and the calculation of a single sampling point requires only one multiplication and two additions and subtractions, resulting in minimal computational load, which can be completed within a single sampling interval.
[0077] After processing by the comb filter, a pure signal sequence containing only the fundamental frequency band is obtained. The 2nd to 50th integer harmonics and interharmonic components are effectively filtered out with a filtering efficiency of more than 99%. At the same time, the amplitude and phase of the fundamental component are completely preserved without any distortion, thus eliminating the interference of harmonic and interharmonic components on the extraction of fundamental parameters from the root.
[0078] The specific implementation of unbiased extraction and parameter identification of the fundamental component involves performing unbiased extraction and parameter identification of the fundamental component for the voltage and current sequences after hierarchical decoupling and pre-filtering. Taking the voltage sequence as an example, for instance... Figure 3 As shown, the specific implementation process is as follows:
[0079] (1) Single-cycle sliding window orthogonal basis construction: A single-cycle sliding window with a length of 256 points is used, containing the current sampling point and the previous 255 sampling points to form a single-cycle sampling sequence. For this sequence, a strictly orthogonal basis function set is constructed. The in-phase basis function is the cosine function, and the orthogonal basis function is the sine function. The inner product of the two basis functions in the sampling point range of 0-255 is 0, which is completely decoupled and has no cross-coupling terms. After the numerical pre-calculation of the basis functions is completed, it is stored in the flash memory of the MCU and can be directly read when called, without the need for real-time calculation of trigonometric functions, which greatly reduces the amount of computation.
[0080] (2) Unbiased fitting of the fundamental in-phase / quadrature components: The least squares fitting method based on orthogonal basis is used to calculate the in-phase and quadrature components of the voltage fundamental. A sliding window recursive mechanism is adopted. Each time a new sampling point is entered, the sliding window moves forward one position, the earliest sampling point is removed, and the new sampling point is added. The summation result is updated recursively. There is no need to recalculate the multiplication and summation of all 256 sampling points, which reduces the amount of computation by more than 99%. The fitting calculation can be completed within a single sampling interval, achieving a parameter update speed of 78.125μs, which meets the microsecond-level real-time response requirements.
[0081] (3) Real-time identification of fundamental amplitude and phase: Based on the in-phase and quadrature components obtained from the fitting, the amplitude and phase of the fundamental voltage are calculated in real time. The CORDIC algorithm is used to calculate the square root and arctangent functions, without the need to call the floating-point arithmetic library, resulting in fast calculation speed and accuracy that meets the requirements of 0.1-level metering terminals. The amplitude and phase of the fundamental current are calculated using the same method.
[0082] (4) Error correction of time-varying fundamental parameters: The actual frequency of the power grid is detected in real time by the zero-crossing interval of the voltage fundamental between two adjacent cycles, the frequency offset is calculated, and the angular frequency of the orthogonal basis function is corrected according to the frequency offset to eliminate the fitting error caused by the frequency offset. At the same time, fixed phase compensation is performed for the fixed group delay of the sliding window (128 sampling points, i.e., half a cycle), and the compensation amount is π radians to ensure that the fundamental phase identification is absolutely unbiased.
[0083] The specific implementation of dynamic compensation calculation for electricity metering errors, such as... Figure 4 As shown:
[0084] (1) Unbiased calculation of fundamental active and reactive power: Based on the extracted fundamental voltage amplitude and phase, and fundamental current amplitude and phase, the fundamental active and reactive power are calculated. Among them, the power factor angle is the difference between the voltage phase and the current phase. The calculation is performed by looking up the pre-stored cosine and sine function tables to ensure the calculation speed and accuracy.
[0085] (2) Quantitative calculation of broadband interference measurement error: For each frequency band interference component that is filtered out in stages, the active power error is calculated separately: the active power of the supersynchronous high-frequency component, the active power of the subsynchronous oscillation component, and the active power of the harmonic and interharmonic components. The total measurement error is the sum of the three. The same method is used to calculate the total measurement error of reactive power. The error quantification process is executed synchronously with the interference filtering process. The error value is updated once for each sampling point, and the changes of interference components can be tracked in real time.
[0086] (3) Dynamic compensation for power metering error: The total metering error obtained by real-time quantification is synchronously compensated into the fundamental power calculation result to obtain the compensated active power and reactive power. The compensation process is not delayed and is completed synchronously with parameter identification. It can fully adapt to the working conditions of rapid load changes of charging piles and eliminate overcompensation and undercompensation problems.
[0087] (4) Real-time update of cumulative energy value: Based on the compensated active power, the trapezoidal integral method is used to update the cumulative active energy value in real time. The energy increment of each sampling interval is the average active power of the current sampling point and the previous sampling point multiplied by the sampling interval. The energy increment is added to the total cumulative energy value. At the same time, a first-order inertial filter is used to smooth the instantaneous power fluctuation. The filter time constant is 10ms to ensure the stability of the cumulative energy value without affecting the dynamic response speed.
[0088] The specific implementation of real-time output and closed-loop verification of measurement results:
[0089] (1) The measurement results are output in real time. The core measurement parameters such as the compensated fundamental amplitude, phase, active power, reactive power, and cumulative active energy are output in real time according to the preset format. The output update frequency is consistent with the sampling frequency, that is, it is updated once every 78.125μs. The output delay does not exceed 1 sampling cycle, which fully meets the real-time requirements of legal measurement.
[0090] (2) Dual-path redundancy verification adopts a dual-path redundancy verification mechanism. One path is the calculation result of the method of this invention, and the other path is the benchmark calculation result of the FFT algorithm based on the Hanning window. The FFT algorithm uses 1024 points and 4 cycles for calculation, with an update frequency of 50Hz. The relative deviation of the two active power calculation results is compared in real time. When the relative deviation exceeds 1%, an abnormal alarm is triggered, and the system automatically switches to the FFT benchmark calculation path to ensure the continuity of the metering process. At the same time, the mean square value of the fundamental fitting residual is calculated in real time. When the mean square value exceeds the set threshold, the notch depth of the comb filter and the stopband attenuation of the finite-length unit impulse response filter are automatically increased to enhance the interference suppression capability.
[0091] (3) Adaptive parameter adjustment under working conditions: When the starting and stopping of the charging pile load or the enhancement of the time-varying characteristics of the signal are detected, the sliding window length is automatically adjusted from 256 points to 128 points to improve the dynamic response speed; when the grid frequency deviation is detected to exceed ±0.5Hz, the angular frequency of the orthogonal basis function is adaptively adjusted to ensure the fitting accuracy; when strong harmonic interference is detected, the smoothing coefficient of the comb filter is automatically adjusted to improve the harmonic filtering effect and realize the adaptive adaptation under all working conditions.
[0092] like Figure 6As shown in the figure, this diagram illustrates the spectral comparison of the voltage signal before and after interference suppression in the full frequency domain under complex operating conditions at a DC fast charging station for new energy vehicles. The original signal clearly shows the 50Hz fundamental component, as well as the 15Hz subsynchronous oscillation, the 3rd / 5th / 7th / 11th integer harmonics, the 120 / 200Hz interharmonics, and the 2000 / 3000 / 5000Hz supersynchronous high-frequency interference, with a total harmonic distortion of 18.7%.
[0093] After the hierarchical decoupling filtering process proposed in this application, interference in each frequency band is significantly suppressed: the supersynchronous high-frequency component is attenuated by more than 60 dB, the subsynchronous oscillation component is attenuated by more than 45 dB, and the integer harmonic and interharmonic components are attenuated by more than 40 dB, retaining only the pure 50 Hz fundamental component. The fundamental amplitude error is less than 0.1%, and the phase error is less than 0.1°, fully meeting the 0.1 class energy metering accuracy requirements.
[0094] The figure clearly marks the four frequency band boundaries defined in this application, verifying the effectiveness of the hierarchical decoupling architecture. Different filtering methods are used for different frequency bands, avoiding cross-coupling interference and eliminating the spectral leakage and mode mixing problems of traditional FFT algorithms at the source. This demonstrates the excellent suppression effect of this invention under multi-component coupled interference in the full frequency domain.
[0095] Example 2
[0096] The application scenario of this embodiment is the power metering terminal of the high-speed rail traction network. The rated fundamental frequency of the power grid is 50Hz. In this scenario, there are significant interharmonic, subsynchronous oscillation, and supersynchronous harmonic interferences, and the traction load changes extremely rapidly, which is a typical highly non-stationary and complex operating condition. The core difference between this embodiment and Embodiment 1 is:
[0097] Sampling core parameters adjusted: the number of sampling points per cycle is set to 512, the sampling frequency is 512 multiplied by 50Hz equals 25600Hz, and the single sampling interval is 39.0625μs, further improving the dynamic response speed and adapting to the rapid time-varying characteristics of traction load.
[0098] Adaptive filtering algorithm optimization: The minimum mean square algorithm is replaced with the normalized minimum mean square algorithm, and the step size factor is adaptively adjusted according to the power of the input signal, improving the convergence speed to 1 / 8 of the cycle, which is suitable for the rapid change characteristics of the subsynchronous components of the traction network.
[0099] Filter parameter adjustment: The passband cutoff frequency of the finite-length unit impulse response low-pass filter is adjusted to 100 times the rated fundamental frequency of the power grid, i.e., 5000Hz, to cover higher frequency harmonic interference from the traction network. The filter order is adjusted to 128 to ensure that the stopband attenuation is not less than 80dB, thereby improving the filtering effect under strong interference environment.
[0100] The remaining implementation steps of this embodiment are completely consistent with those of Embodiment 1, which can realize power metering anti-interference and accurate compensation under complex working conditions of high-speed rail traction network, and verify the full-scenario adaptability of the method of the present invention.
[0101] Alternative implementation methods:
[0102] Alternative embodiments of the present invention include, but are not limited to:
[0103] In the fundamental parameter fitting stage, the least squares fitting method based on orthogonal bases can be replaced with a recursive least squares algorithm to further improve the tracking speed of time-varying signals and adapt to extremely fast time-varying conditions. The recursive least squares algorithm, by introducing a forgetting factor, can track the time-varying characteristics of the signal more quickly and has better adaptability to impact loads with extremely rapid changes, but the computational complexity increases slightly.
[0104] In the synchronous sampling stage, a hardware phase-locked loop (PLL) can be replaced with a software synchronous PLL, reducing hardware costs and adapting to the application requirements of low-cost metering terminals. The software synchronous PLL tracks the fundamental frequency and phase of the power grid through digital signal processing algorithms, eliminating the need for additional hardware chips and reducing terminal hardware costs; however, it places certain demands on the computing power of the MCU.
[0105] In the impulse noise suppression stage, median filtering can be replaced with amplitude limiting filtering to further reduce computational load and adapt to low-end MCU platforms with limited computing resources. Amplitude limiting filtering, by setting a reasonable threshold, restricts sampled values exceeding the threshold to within the threshold range, effectively suppressing spike interference. Its computational load is much less than that of median filtering, but its suppression effect on impulse noise is slightly inferior to that of median filtering.
[0106] In the error compensation stage, based on the frequency band error quantization, a correction for the cross-coupling error between the interference component and the fundamental component can be introduced to further improve the compensation accuracy. For extreme operating conditions with strong cross-coupling interference, quantifying the cross-coupling power between the interference component and the fundamental component can more accurately calculate the total metering error, further improving the compensation accuracy.
[0107] This application also discloses a power metering anti-interference compensation device for complex operating conditions, including:
[0108] The signal preprocessing module removes DC components using a single-period moving average method and suppresses impulse noise using an odd-point median filtering method. The multi-band filtering module divides the signal's full frequency domain into four non-overlapping bands, uses a linear-phase finite-length unit impulse response low-pass filter with zero-phase filtering to remove supersynchronous high-frequency components, an adaptive noise canceller to remove subsynchronous oscillation components, and a recursive comb filter to remove integer harmonics and interharmonics. The fundamental parameter extraction module constructs strictly orthogonal in-phase and orthogonal basis functions, employing a minimum frequency response method based on orthogonal bases. The two-square linear fitting method obtains the in-phase and quadrature components of the fundamental wave, and calculates the amplitude and phase of the fundamental wave; the fundamental wave parameter correction module is used to perform real-time closed-loop correction on the calculated fundamental wave amplitude and phase; the power metering calculation module is used to calculate the fundamental wave active power and reactive power based on the unbiased fundamental wave parameters, and update the cumulative active power value using the trapezoidal integral method; the metering error compensation module is used to calculate the total metering error of interference components in each frequency band and perform synchronous compensation; the parameter output and adaptive module is used to output the core metering parameters in real time and adaptively adjust the algorithm parameters according to the verification results and the time-varying characteristics of the signal.
[0109] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for anti-interference compensation in power metering under complex operating conditions, characterized in that, Includes the following steps: Step 1: Set the number of sampling points and sampling frequency per cycle according to the rated fundamental frequency of the power grid. Use hardware phase-locked loop or software synchronization algorithm to achieve synchronous sampling. Use single-cycle moving average method to remove DC component and odd-point median filtering method to suppress impulse noise. Step 2: Divide the full frequency domain of the signal into four non-overlapping frequency bands. Use a linear phase finite-length unit impulse response low-pass filter to filter out the supersynchronous high-frequency components in a zero-phase filtering manner. Use an adaptive noise canceller to filter out the subsynchronous oscillation components. Use a comb filter with a recursive structure to filter out integer harmonics and interharmonic components. Step 3: Construct strictly orthogonal in-phase basis functions and orthogonal basis functions, and use the least squares linear fitting method based on orthogonal basis to obtain the in-phase component and orthogonal component of the fundamental wave. Calculate the amplitude and phase of the fundamental wave and perform real-time closed-loop correction. Step 4: Calculate the fundamental active power and reactive power based on the unbiased fundamental parameters, calculate the total metering error of interference components in each frequency band and perform synchronous compensation, and update the cumulative active energy value using the trapezoidal integration method. Step 5: Output the core measurement parameters in real time, and adaptively adjust the algorithm parameters based on the verification results and the time-varying characteristics of the signal.
2. The method for anti-interference compensation of power metering under complex operating conditions according to claim 1, characterized in that, In step one, the number of sampling points per cycle is taken as an integer power of 2 greater than or equal to 128, and the sampling frequency is equal to the number of sampling points per cycle multiplied by the rated fundamental frequency of the power grid; the sliding window length of the single-cycle moving average method is consistent with the number of sampling points per cycle. The filtering window for odd-point median filtering is set to 3 or 5 points.
3. The method for anti-interference compensation of power metering under complex operating conditions according to claim 1, characterized in that, In step two, the four frequency bands are as follows: the subsynchronous frequency band is greater than 0 and less than 0.5 times the rated fundamental frequency of the power grid; the fundamental frequency band is greater than or equal to 0.8 times and less than or equal to 1.2 times the rated fundamental frequency of the power grid; the harmonic and interharmonic frequency band is greater than 1.2 times and less than or equal to 50 times the rated fundamental frequency of the power grid; and the supersynchronous high-frequency band is greater than 50 times the rated fundamental frequency of the power grid.
4. The method for anti-interference compensation of power metering under complex operating conditions according to claim 3, characterized in that, In step two, the passband cutoff frequency of the linear phase finite-length unit impulse response low-pass filter is 50 times the rated fundamental frequency of the power grid, the stopband cutoff frequency is 52 times the rated fundamental frequency of the power grid, the passband ripple is no greater than 0.01dB, the stopband attenuation is no less than 60dB, and the filter order is 1 / 4 of the number of sampling points in a single cycle.
5. The method for anti-interference compensation of power metering under complex operating conditions according to claim 3, characterized in that, In step two, the main input of the adaptive noise canceller is the signal sequence after high-frequency filtering, and the reference input is the subsynchronous frequency band sequence after low-pass filtering with a cutoff frequency of 0.5 times the rated fundamental frequency of the power grid. The adaptive filtering algorithm adopts the least mean square algorithm, and the filter weight length is 1 / 8 of the number of sampling points in a single cycle.
6. The method for anti-interference compensation of power metering under complex operating conditions according to claim 3, characterized in that, In step two, the comb tooth spacing of the comb filter in the recursive structure is the rated fundamental frequency of the power grid, the passband center frequency is an integer multiple of the rated fundamental frequency of the power grid, and notch points are set at integer harmonic frequencies from the 2nd to the 50th order, with a notch depth of not less than 40dB.
7. The method for anti-interference compensation of power metering under complex operating conditions according to claim 1, characterized in that, In step three, the least squares linear fitting based on orthogonal bases adopts a sliding window recursive mechanism, which updates the window sequence and fitting results once each time a new sampling point is entered.
8. The method for anti-interference compensation of power metering under complex operating conditions according to claim 1, characterized in that, In step three, the real-time closed-loop correction includes: real-time detection of the actual frequency of the power grid by the interval between the zero-crossing points of the fundamental wave in two adjacent cycles, and correction of the angular frequency of the orthogonal basis function according to the frequency offset; and fixed phase compensation for the fixed group delay of the sliding window, with the compensation amount being the phase angle corresponding to half a sampling cycle.
9. The method for anti-interference compensation of power metering under complex operating conditions according to claim 1, characterized in that, In step four, the active and reactive power of the subsynchronous oscillation component, harmonic and interharmonic components, and supersynchronous high-frequency component are calculated respectively, and the total metering error is obtained by summing them. The compensated active power is equal to the fundamental active power minus the total active power error, and the compensated reactive power is equal to the fundamental reactive power minus the total reactive power error.
10. The method for anti-interference compensation of power metering under complex operating conditions according to claim 1, characterized in that, In step five, the output delay of the core measurement parameters does not exceed one sampling period; the core parameters of the adaptively adjusted algorithm include the number of sampling points per period, the filter order, the minimum mean square algorithm step size factor, and the sliding window length.