A Method for Measuring Reactive Power Variables in Energy Meters Based on Adaptive Frequency Domain Analysis

CN122385947BActive Publication Date: 2026-08-14JIANGYIN ZHONGHE POWER METER
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-11
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0007]本发明的目的在于克服现有技术的缺点,解决现有技术中处理非线性计量过程中功效平衡、干扰识别与物理约束存在的局限,导致计量准确度不足的技术问题,提供一种基于自适应频域分析的电能表无功电变量测量方法

Benefits of technology

1、在电能表无功电变量测量中,通过在频率跟踪环节引入基于前序时序动量的自适应时窗屏蔽机制,利用电网基波能量固有的物理惯性特征,为采样信号建立一个与工频周期深度耦合的逻辑免疫区间,在非线性负载引发电压波形产生高频突变或多重过零毛刺的工况下,屏蔽机制使系统能够根据前序稳态周期预判并隔离非真实的极性翻转信号,从而在底层逻辑层面消除因过零点识别误触发而导致的周期测算失真,确保后续频域变换的截断窗长与电网真实频率的物理同步,解决由于异步采样引发的频谱泄漏问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122385947B_ABST
    Figure CN122385947B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of nonlinear load metering technology in power systems, and relates to a method for measuring reactive power variables in energy meters based on adaptive frequency domain analysis. The method includes: sampling and acquiring voltage and current sequences; reading voltage data from previous measurement cycles to determine the previous steady-state fundamental period; and establishing a zero-crossing shielding period using a scaling factor; capturing the initial zero-crossing point and starting a timer; disabling polarity discrimination interruption during the period to isolate high-frequency distortion; resuming polarity detection and acquiring the final zero-crossing point after the timer ends, thereby determining the transient fundamental period; determining the truncated window length based on the period and performing frequency domain transformation; and using a multi-dimensional parameter correction model to complete error compensation. This invention utilizes the inertial characteristics of fundamental energy to establish a time-domain shielding interval, solving the period measurement distortion caused by false triggering of zero-crossing capture under nonlinear load conditions, ensuring physical synchronization between the sampling window and the grid frequency, and eliminating spectral leakage, effectively improving the accuracy of reactive power metering in complex grid environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of nonlinear load metering technology in power systems, and relates to a reactive power variable measurement method for electricity meters based on adaptive frequency domain analysis. It is used in electricity metering situations involving high-order harmonics and high-frequency surge interference, and can improve the accuracy of reactive power metering in complex power grid environments. Background Technology

[0002] Currently, electricity metering is a core component of power system settlement, energy efficiency analysis, and load forecasting. With the widespread penetration of nonlinear loads and power electronic devices in modern power grids, using intelligent algorithms to dynamically monitor complex waveforms has become a key path to improve metering accuracy. However, existing technologies still have limitations in handling power balance, interference identification, and physical constraints in nonlinear metering processes.

[0003] First, metering technology based on high-order numerical integration optimization; for example, Chinese invention patent CN101915872A discloses a nonlinear load power metering method that uses the high-order Newton-Cotes integral formula to improve algebraic accuracy. Its shortcomings are: the scheme is essentially a precision compensation at the algorithmic mathematical level, the decision logic lacks a rigid representation of the total resources of the metering chip under high-frequency sampling, and it does not map the timing lock-in effect caused by fluctuations in external environmental parameters into the boundary constraints of the integration step size, which may cause the model to output calculation instructions that violate the law of conservation of hardware efficiency under high load or extreme temperature change conditions.

[0004] Second, anti-interference judgment technology based on waveform feature point extraction; for example, Chinese invention patent CN112362952A discloses an anti-interference method for judging the zero-crossing point of grid voltage. The zero-crossing point is determined by comparing theoretical voltage to eliminate interference signals. Its drawback is that the technology focuses on the state recognition and open-loop prediction of a single feature point. Although it improves the accuracy of zero-crossing point measurement, it fails to establish a closed-loop correlation between the identified phase features and the error compensation of the subsequent metering algorithm. It cannot map the physical compression of the later control path by the early execution deviation in real time, and it is difficult to cope with the risk of metering data overdraft under extreme harmonic disturbances.

[0005] Third, load-driven mode switching regulation technology; for example, Chinese invention patent application CN119335467A discloses an adaptive regulation method and system for electricity meter measurement, which switches between accuracy mode and energy efficiency mode through load fluctuation index. Its drawback is that: existing regulation models of this kind usually regard mode switching as a discrete or fixed-step decision unit, ignoring the continuous response law of load change over long time; in long-cycle optimization, if there is a lack of a forced pruning mechanism based on the convergence of underlying numerical accuracy, the metering prediction trajectory is prone to cumulative drift, causing the output scheme to lose its practical value due to exceeding the real-time performance and system power consumption limits.

[0006] Therefore, how to construct a measurement architecture with harmonic sensing capability and timing resource locking mechanism, so that the accuracy correction logic converges to the real physical safety boundary throughout the entire cycle, is the technical problem to be solved by this invention. Summary of the Invention

[0007] The purpose of this invention is to overcome the shortcomings of the prior art and solve the technical problems of insufficient measurement accuracy caused by the limitations of the prior art in handling nonlinear metering processes, such as the balance of power, interference identification, and physical constraints. This invention provides a method for measuring reactive power variables of electricity meters based on adaptive frequency domain analysis.

[0008] To achieve the above-mentioned objectives, this invention provides a method for measuring reactive power variables in energy meters based on adaptive frequency domain analysis, comprising the following steps: Step S1, sampling and acquiring discrete voltage and current sampling sequences: sampling and acquiring discrete voltage sampling sequences and discrete current sampling sequences; Step S2, calculate the timestamp difference to determine the preceding steady-state fundamental frequency period: retrieve the discrete voltage sampling sequence output by the preceding measurement period, calculate the timestamp difference between two adjacent zero crossings, and determine the preceding steady-state fundamental frequency period; Step S3: Establish a zero-crossing shielding period based on the period and a preset scaling factor: Establish a zero-crossing shielding period based on half of the preceding steady-state fundamental period and a preset scaling factor, wherein the preset scaling factor is in the range of 0.75 to 0.85. Step S4, capture the polarity reversal point and mark it as the starting zero-crossing trigger point: capture the polarity reversal point of the discrete voltage sampling sequence. When the absolute value of the sampled value at the polarity reversal point is greater than the preset voltage zero-crossing physical dead zone threshold, mark the current time as the starting zero-crossing trigger point and start the hardware timer. Step S5, suspend polarity discrimination request to discard polarity reversal signal: During the period when the timing value of the hardware timer is less than the zero-crossing shielding period, control the main control chip to suspend the polarity discrimination interrupt request and discard the voltage polarity state reversal signal generated by the discrete voltage sampling sequence. Step S6, Capture the termination zero-crossing trigger point to determine the transient fundamental period: After the timing value of the hardware timer reaches the zero-crossing masking period, restore the polarity discrimination interrupt request, capture the next real zero-crossing point and mark it as the termination zero-crossing trigger point, and use the time difference between the start zero-crossing trigger point and the termination zero-crossing trigger point as the transient fundamental period. Step S7, extract the sampling sequence according to the window length to obtain the target analysis sampling vector: according to the time window length limited by the transient fundamental period, extract the discrete voltage sampling sequence and the discrete current sampling sequence to obtain the target analysis sampling vector; Step S8, perform frequency domain transformation and output measured values ​​using the correction model: perform adaptive discrete Fourier transform on the target analysis sampling vector to extract the fundamental voltage amplitude, fundamental current amplitude and fundamental voltage-current phase angle difference, and after calculating reactive power, use a multi-dimensional parameter correction model to perform error compensation on reactive power and output the measured value of reactive power variable.

[0009] The step S8 of this invention, which uses a multi-dimensional parameter correction model to perform error compensation for reactive power, includes: obtaining the real-time effective voltage value, real-time frequency, and system power factor of the current measurement cycle; substituting the real-time effective voltage value, real-time frequency, and system power factor into the multi-dimensional parameter correction model to map and obtain an error compensation factor corresponding to the original reactive power output value; performing a multiplication and addition operation on the error compensation factor and reactive power to correct the energy spectrum distribution deviation caused by the nonlinear load, and outputting the corrected reactive power variable measurement value.

[0010] The process of calculating the timestamp difference between two adjacent zero-crossing points in step S2 of the present invention includes: monitoring the slope direction of adjacent sampling points in the discrete voltage sampling sequence; recording the first zero-crossing time when the voltage sampling value changes from negative to positive polarity and the voltage slope is positive; recording the second zero-crossing time when the voltage sampling value changes from positive to negative polarity and the voltage slope is negative; and determining twice the absolute value of the difference between the first and second zero-crossing times as the preceding steady-state fundamental frequency period.

[0011] Before obtaining the target analysis sampling vector in step S7 of the present invention, the method further includes: calculating the period deviation between the transient fundamental period and the 50Hz standard power frequency period; dynamically adjusting the total number of sampling points of the adaptive discrete Fourier transform according to the period deviation, so that the sampling window length is synchronized with the change of the power grid transient frequency.

[0012] The process of extracting the fundamental voltage amplitude, fundamental current amplitude, and fundamental voltage-current phase angle difference in step S8 of the present invention includes: performing full-spectrum analysis on the target analysis sampling vector to obtain the fundamental voltage amplitude, fundamental current amplitude, and fundamental voltage-current phase angle difference; extracting harmonic frequency points whose amplitude ratio exceeds a preset reactive power distortion sensitivity threshold as target harmonic frequency points, and obtaining the harmonic voltage amplitude, harmonic current amplitude, and harmonic phase angle difference corresponding to the target harmonic frequency points.

[0013] After outputting the reactive power variable measurement value in step S8 of the present invention, the method further includes: establishing a historical measurement residual queue, extracting the reactive power output value under pure resistive load conditions as a local zero-point drift characterization quantity; when the local zero-point drift characterization quantity exceeds the preset tolerance boundary, updating the constant bias term in the multi-dimensional parameter correction model to offset the temperature drift of the metering component caused by changes in ambient temperature in situ.

[0014] In step S5 of this invention, during the process of discarding the voltage polarity state reversal signal generated by the discrete voltage sampling sequence, the main control chip maintains the internal clock counter to accumulate and logically shields the level reversal detection for the external interrupt pin until the timing value of the hardware timer reaches the number of clock cycles corresponding to the zero-crossing shielding period.

[0015] When the transient fundamental period is detected to change by more than 5% relative to the preceding steady-state fundamental period, the control method described in this invention reverts to steady-state protection mode. The preceding steady-state fundamental period is used as a substitute reference for the current period to implement time window interception, so as to maintain the convergence of the calculation of reactive power variable measurement value.

[0016] Compared with the prior art, the present invention has at least the following beneficial effects: 1. In the measurement of reactive power variables in electricity meters, an adaptive time window shielding mechanism based on preceding time momentum is introduced in the frequency tracking stage. By utilizing the inherent physical inertia characteristics of the fundamental energy of the power grid, a logically immune interval deeply coupled with the power frequency cycle is established for the sampled signal. Under the condition that the voltage waveform generates high-frequency abrupt changes or multiple zero-crossing glitches caused by nonlinear loads, the shielding mechanism enables the system to predict and isolate non-real polarity reversal signals based on the preceding steady-state cycle. This eliminates the period measurement distortion caused by false triggering of zero-crossing identification at the underlying logic level, ensures that the truncation window length of the subsequent frequency domain transformation is physically synchronized with the real frequency of the power grid, and solves the problem of spectrum leakage caused by asynchronous sampling.

[0017] 2. This invention achieves deep adaptation between measurement and control logic and the physical laws of the power grid by forcibly shifting the dimension of interference suppression from the amplitude domain to a unidirectional time axis. This timestamp mask-based processing method avoids the excessive consumption of microprocessor computing power by relying on high-order digital filtering or complex phase-locked loop algorithms in traditional technologies. It enables ordinary embedded main control units to obtain anti-interference capabilities sufficient to resist high-frequency harmonic penetration without changing the hardware sampling frequency. This time-domain shielding logic works in conjunction with the subsequent targeted frequency-domain transformation, enabling the system to maintain hard real-time performance and numerical convergence of reactive power variable calculation while handling high-concurrency communication tasks, thus resolving the contradiction between limited hardware resources and high-precision metering requirements in edge node devices.

[0018] 3. The method reconstructs the discretized calculation process of reactive power, and constructs a complete closed-loop compensation system by adaptive frequency interception, energy spectrum feature extraction, and multi-dimensional error fitting. Based on the spatial fitting model established by transient frequency, effective voltage value, and system power factor, it can dynamically correct the original value output by the metering chip. This error convergence path, guided by physical laws, purified by logical shielding, and finally completed by multi-parameter spatial mapping, enables the energy meter to no longer be limited by the filter operator fixed in the underlying chip under extreme and harsh operating conditions such as alternating inductive and capacitive loads and sudden load changes. This broadens the adaptability boundary of the measuring equipment to complex nonlinear load environments at the system level. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the adaptive measurement process for reactive power variables with time-domain logic shielding according to the present invention; Figure 2 This is a schematic diagram of the multi-dimensional parameter space mapping correction engine and the value self-healing loop architecture of the present invention. Detailed Implementation

[0020] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments and accompanying drawings.

[0021] Example 1: This embodiment discloses a method for measuring reactive power variables of an energy meter based on adaptive frequency domain analysis, including the following steps: Step S1, sampling and acquiring discrete voltage and current sampling sequences: sampling and acquiring discrete voltage sampling sequences and discrete current sampling sequences; Step S2, calculate the timestamp difference to determine the preceding steady-state fundamental frequency period: retrieve the discrete voltage sampling sequence output by the preceding measurement period, calculate the timestamp difference between two adjacent zero crossings, and determine the preceding steady-state fundamental frequency period; Step S3: Establish a zero-crossing shielding period based on the period and a preset scaling factor: Establish a zero-crossing shielding period based on half of the preceding steady-state fundamental period and a preset scaling factor, wherein the preset scaling factor is in the range of 0.75 to 0.85. Step S4, capture the polarity reversal point and mark it as the starting zero-crossing trigger point: capture the polarity reversal point of the discrete voltage sampling sequence. When the absolute value of the sampled value at the polarity reversal point is greater than the preset voltage zero-crossing physical dead zone threshold, mark the current time as the starting zero-crossing trigger point and start the hardware timer. Step S5, suspend polarity discrimination request to discard polarity reversal signal: During the period when the timing value of the hardware timer is less than the zero-crossing shielding period, control the main control chip to suspend the polarity discrimination interrupt request and discard the voltage polarity state reversal signal generated by the discrete voltage sampling sequence. Step S6, Capture the termination zero-crossing trigger point to determine the transient fundamental period: After the timing value of the hardware timer reaches the zero-crossing masking period, restore the polarity discrimination interrupt request, capture the next real zero-crossing point and mark it as the termination zero-crossing trigger point, and use the time difference between the start zero-crossing trigger point and the termination zero-crossing trigger point as the transient fundamental period. Step S7, extract the sampling sequence according to the window length to obtain the target analysis sampling vector: according to the time window length limited by the transient fundamental period, extract the discrete voltage sampling sequence and the discrete current sampling sequence to obtain the target analysis sampling vector; Step S8, perform frequency domain transformation and output measured values ​​using the correction model: perform adaptive discrete Fourier transform on the target analysis sampling vector to extract the fundamental voltage amplitude, fundamental current amplitude and fundamental voltage-current phase angle difference, and after calculating reactive power, use a multi-dimensional parameter correction model to perform error compensation on reactive power and output the measured value of reactive power variable.

[0022] In this embodiment, step S8, which uses a multi-dimensional parameter correction model to perform error compensation for reactive power, includes: obtaining the real-time effective voltage value, real-time frequency, and system power factor of the current measurement cycle; substituting the real-time effective voltage value, real-time frequency, and system power factor into the multi-dimensional parameter correction model to map and obtain an error compensation factor corresponding to the original reactive power output value; performing a multiplication and addition operation between the error compensation factor and the reactive power to correct the energy spectrum distribution deviation caused by the nonlinear load, and outputting the corrected reactive power variable measurement value.

[0023] The process of calculating the timestamp difference between two adjacent zero-crossing points in step S2 of this embodiment includes: monitoring the slope direction of adjacent sampling points in the discrete voltage sampling sequence; recording the first zero-crossing time when the voltage sampling value changes from negative to positive polarity and the voltage slope is positive; recording the second zero-crossing time when the voltage sampling value changes from positive to negative polarity and the voltage slope is negative; and determining twice the absolute value of the difference between the first and second zero-crossing times as the preceding steady-state fundamental frequency period.

[0024] Before obtaining the target analysis sampling vector in step S7 of this embodiment, the method further includes: calculating the period deviation between the transient fundamental period and the 50Hz standard power frequency period; dynamically adjusting the total number of sampling points of the adaptive discrete Fourier transform according to the period deviation, so that the sampling window length is synchronized with the change of the power grid transient frequency.

[0025] The process of extracting the fundamental voltage amplitude, fundamental current amplitude, and fundamental voltage-current phase angle difference in step S8 of this embodiment includes: performing full-spectrum analysis on the target analysis sampling vector to obtain the fundamental voltage amplitude, fundamental current amplitude, and fundamental voltage-current phase angle difference; extracting harmonic frequency points whose amplitude ratio exceeds a preset reactive power distortion sensitivity threshold as target harmonic frequency points, and obtaining the harmonic voltage amplitude, harmonic current amplitude, and harmonic phase angle difference corresponding to the target harmonic frequency points.

[0026] After outputting the reactive power variable measurement value in step S8 of this embodiment, the method further includes: establishing a historical measurement residual queue, extracting the reactive power output value under pure resistive load conditions as a local zero-point drift characterization quantity; when the local zero-point drift characterization quantity exceeds the preset tolerance boundary, updating the constant bias term in the multi-dimensional parameter correction model to offset the temperature drift of the metering component caused by changes in ambient temperature in situ.

[0027] In step S5 of this embodiment, during the process of discarding the voltage polarity state reversal signal generated by the discrete voltage sampling sequence, the main control chip maintains the internal clock counter to accumulate and logically shields the level reversal detection for the external interrupt pin until the timing value of the hardware timer reaches the number of clock cycles corresponding to the zero-crossing shielding period.

[0028] In this embodiment, when the transient fundamental period is detected to change by more than 5% relative to the preceding steady-state fundamental period, the control method reverts to the steady-state protection mode. The preceding steady-state fundamental period is used as a substitute reference for the current period to implement time window interception, so as to maintain the convergence of the calculation of reactive power variable measurement value.

[0029] Example 2: In this embodiment, in a nonlinear load distribution network terminal metering scenario including frequency converters and high-power switching power supplies, high-frequency distortion components and pulse interference exist in the voltage zero-crossing interval. This interference causes the voltage zero-crossing capture logic to generate false triggering actions, resulting in the acquired sampling sequence window length being out of sync with the grid fundamental period and causing spectral leakage. The main control chip determines the preceding steady-state fundamental period by reading the discrete voltage sampling sequence of the preceding measurement period recorded in the internal memory. This period characterizes the physical inertial parameters of the system before it is subjected to transient disturbances. The main control chip uses the formula... Establish zero-shielding period ,in, For the zero-shielding period, For the preceding steady-state fundamental frequency period, The momentum scaling factor is set to a value between 0.75 and 0.85. When the main control chip detects the polarity reversal point of the discrete voltage sampling sequence and the absolute value of the sampled value at that point is greater than the preset voltage zero-crossing dead zone threshold, it marks the current moment as the starting zero-crossing trigger point and starts a hardware timer. In the specific underlying signal extraction path, the capture of the polarity reversal of the discrete voltage sampling sequence does not rely on the pure software high-frequency polling of the core computing unit of the main control chip. Instead, the hardware zero-crossing comparator in the metering analog front-end circuit converts the AC analog signal into a digital square wave in real time and connects it directly to the external interrupt pin of the main control chip configured as a dual-edge trigger mode. When the physical grid voltage crosses the zero level, causing the digital square wave level to jump, the interrupt pin immediately generates a hardware trigger signal and suspends the current general thread of the main control chip. The interrupt service function directly reads the current timestamp of the internal clock register. The system synchronously extracts the discrete voltage sampled value in the corresponding address area through the direct memory access channel to perform the numerical verification logic of the dead zone threshold, thus constructing a closed-loop triggering mechanism driven entirely by the underlying physical hardware.

[0030] During the hardware timer's countdown period when the countdown value is less than the zero-crossing shielding period During the continuous interval, the main control chip suspends the polarity discrimination interrupt request through its internal logic, directly eliminating non-true voltage polarity state reversal signals generated during this period. This adaptive time-window shielding extraction method based on preceding temporal momentum utilizes the temporal physical inertia of the grid fundamental energy to establish a logical immune interval, providing a sampling vector for subsequent energy spectrum characteristic transformation. The system achieves zero-crossing shielding during the period when the count value reaches zero. Furthermore, after detecting that the absolute value of the voltage sampling value exceeds the dead zone threshold again, the polarity capture is restored and the termination zero-crossing trigger point is determined. The transient fundamental period is calculated, and the final reactive power measurement value is compensated for through a multi-dimensional parameter correction model. Without adding an external hardware filter circuit, the energy meter maintains physical synchronization between the sampling window and the grid frequency under alternating inductive and capacitive load conditions, thereby improving the accuracy of electrical parameter measurement.

[0031] In dynamic power distribution scenarios with active filters and other high-frequency compensation devices, to address the local phase distortion of the voltage sampling sequence caused by rapid current switching, the main control chip determines the transient fundamental period. Then, the discrete voltage sampling sequence and the discrete current sampling sequence were truncated to the values ​​of... An analysis window with equal physical duration is used, and a Discrete Fourier Transform is performed. The initial reactive power measurement value is obtained by extracting the fundamental phase angle relationship between voltage and current within this analysis window. This dynamic window-length-dependent frequency domain transformation method can suppress spectral leakage caused by window mismatch. Based on the synchronous sampling principle, the physical truncation time window of the frequency domain transformation completely covers the basic electromagnetic cycle of the measured signal. The system is configured with a physical sampling frequency of [missing information]. The analog-to-digital conversion data acquisition channel, after the main control chip determines that there is a physical cycle deviation, uses the formula... Calculate the total number of sampling points, where, A dimensionless positive integer parameter characterizing the actual truncation length of the discrete Fourier transform sequence. The characterization steps determine the physical transient fundamental wave period time span scalar. Characterizes the physical sampling rate of the analog-to-digital conversion programmable in the underlying hardware channel. The floating-point number truncation instruction represents the convergence of a floating-point number to the nearest integer. The main control chip determines the truncation based on the total number of sampling points. The voltage and current sequences are extracted in proportion from the direct memory access controller data cache. A target analysis sampling vector physically aligned with the power grid transient frequency is established. To eliminate the microsecond-level truncation dead zone between the discrete sampling point group and the continuous power grid physical frequency time caused by forced rounding in mathematical operations, the main control chip extracts the theoretical floating-point product value and the total number of sampling points. The fractional part between the two is used as the tail time residual. The system then uses this time residual and the first time in the buffer to... The and the first The data values ​​of each discrete sampling point are subjected to first-order linear interpolation mathematical operations to reconstruct a virtual discrete point that matches the end of the actual physical transient fundamental frequency period. This virtual discrete point replaces the final physical sampling point of the original sequence. Thus, without changing the constant sampling frequency attribute of the underlying analog-to-digital conversion hardware, the integer truncation error is completely absorbed through the reconstruction of the data structure tail point, achieving complete physical synchronization between the analysis window length of the target analysis sampling vector and the actual power grid transient frequency.

[0032] Example 3: This embodiment uses a signal generator on the current test platform to simulate power distribution conditions containing high-order harmonics and high-frequency surge interference characteristic of frequency converters. The analog-to-digital conversion resolution of the physical acquisition environment is set to 24 bits, with a maximum continuous sampling rate of 12.8kHz. The test group uses an adaptive time-window shielding measurement method, while the control group uses a fixed voltage threshold comparison method. When a voltage sequence with a root mean square value of 220.15V and a total harmonic distortion rate of 12.5% ​​is input, the control group experiences 8 polarity reversals near the voltage zero-crossing point, causing the calculated transient fundamental period to jump between 18.45ms and 21.62ms. This results in a mismatch between the sampling window length and the actual frequency, with a relative error of 3.42% in the reactive power measurement value. The test group reads the preceding steady-state fundamental period... It is 19.98ms, according to the formula The zero-crossing shielding period was calculated. It is 7.99ms, of which, For the zero-shielding period, This is the momentum scaling factor, which is set to 0.80 here. It is half the period of the preceding steady-state fundamental wave; because the main control chip suspends the voltage polarity discrimination interrupt request within this time window, it shields the glitch group interference near the zero crossing point, and the captured termination zero crossing trigger point is consistent with the physical law of the power grid. The determined transient fundamental wave period is 20.02ms. At this time, the truncated window length is physically synchronized with the fundamental wave component, and the relative error of reactive power variable measurement decreases to 0.18%.

[0033] To verify the stability of the scheme, the intensity gradient of harmonic interference was increased. When the total harmonic distortion rate increased from 5% to 20%, the reactive power measurement error of the experimental group remained stable within 0.25%, demonstrating a nonlinear anti-interference characteristic that maintains steady-state measurement performance as the interference intensity increases; momentum scaling factor The setting logic lies in balancing the shielding depth for narrow pulse glitches with the response sensitivity for capturing the zero-crossing point of the next cycle. When the mains voltage is at the rated frequency of 50Hz, the fundamental period corresponds to 20ms. If the scaling factor... Below the lower limit of 0.75, zero-crossing shielding period The shortening, residual high-frequency glitches penetrate the shielded area and trigger a pseudo-polarity reversal interruption, resulting in a random oscillation of the measured frequency between 48.5Hz and 51.5Hz; if the scaling factor... Values ​​exceeding the upper limit of 0.85 are subject to zero-crossing masking. When the load fluctuation causes frequency drift, the main control chip blocks the true zero-crossing trigger point and adjusts the momentum scaling factor accordingly. Within the range of 0.75 to 0.85, the reliability of the logic response can be maintained. Experimental data shows that when the harmonic content reaches 25% and the surge frequency reaches more than 0.5 times the sampling frequency, the distortion of the sampling sequence outside the shielded interval exceeds the voltage zero-crossing dead zone threshold, and the system measurement error shows a performance inflection point shifting towards 0.52%. This phenomenon indicates that within the limited parameter range, this measurement method has an optimized working window under typical industrial nonlinear load conditions. It utilizes the time-domain logic immune interval to solve the problem of calculation accuracy degradation caused by spectral leakage, and meets the engineering implementation requirements of power metering in complex power grid environments.

[0034] Example 4: This embodiment combines Figures 1 to 2 This section describes the method for measuring reactive power variables in energy meters based on adaptive frequency domain analysis. Figure 1As shown, the measurement process is divided into multiple execution stages. It begins with step S1, which performs sampling to obtain discrete voltage and current sampling sequences. Based on this data, it proceeds to step S2, where the timestamp difference is calculated to determine the preceding steady-state fundamental frequency period. In step S3, a zero-crossing shielding period is established according to the period and a preset scaling factor, and then proceeds to step S4 to capture the polarity reversal point and mark it as the starting zero-crossing trigger point. Next, it proceeds to step S5 to suspend the polarity discrimination request to discard the polarity reversal signal. After leaving the shielding interval, in step S6, the terminating zero-crossing trigger point is captured to determine the transient fundamental frequency period. Based on this period, in step S7, the sampling sequence is truncated according to the window length to obtain the target analysis sampling vector. Finally, it proceeds to step S8 to perform frequency domain transformation and output the measurement value using the corrected model.

[0035] like Figure 2 As shown, the core architecture of the data processing consists of a three-dimensional spatial mapping correction engine. On the left side of this engine are three boxes: the transient fundamental period input vector, the real-time voltage RMS value input vector, and the system power factor input vector. The lines extending from these three boxes converge to the right into a solid line pointing precisely to the three-dimensional correction coefficient table inside the engine. A solid line extends downwards from the engine's non-volatile memory, pointing to this three-dimensional correction coefficient table. A solid line extends downwards from this three-dimensional correction coefficient table, pointing to the trilinear interpolation algorithm. The output line of the trilinear interpolation algorithm points to the right towards multiply-accumulate operation compensation. The logic is as follows: the initial reactive power measurement value box leads downwards with a solid line pointing to the multiply-accumulate compensation logic, which outputs the corrected reactive power variable measurement value with a solid line. At the same time, the self-healing and zero-point calibration loop includes a historical measurement residual queue and a local zero-point drift characterization quantity. The historical measurement residual queue is pointed to the local zero-point drift characterization quantity by a dashed arrow, and the local zero-point drift characterization quantity is pointed upwards to the three-dimensional correction coefficient table by a dashed arrow. The output line of the corrected reactive power variable measurement value is fed back to the historical measurement residual queue by a dashed arrow.

[0036] Example 5: In this embodiment, for automated monitoring scenarios used for factory accuracy calibration of single-phase smart energy meters, the main control chip needs to determine the voltage zero-crossing dead zone threshold based on the noise floor characteristics of the analog-to-digital converter to eliminate static monitoring errors caused by the process discreteness of semiconductor devices. Under a zero-signal state with the voltage input terminal short-circuited, the main control chip acquires the voltage sequence of 1024 consecutive sampling points and calculates the root mean square value. , root mean square value The threshold for the voltage zero-crossing dead zone is determined to be three times the voltage. This dynamic calibration method based on the thermal noise distribution of the hardware system provides a logical boundary at the physical and statistical level for the subsequent capture of the initial zero-crossing trigger point, so that the system will not cause false polarity discrimination triggering due to noise fluctuations when processing signals with a signal-to-noise ratio of less than 40dB.

[0037] After completing the time-domain logic masking and acquiring the discrete voltage sampling sequence, the system starts the calculation program of the multi-dimensional parameter correction model. This program follows an ordered logical path, that is, the main control chip determines the transient fundamental period based on the timestamp difference between the captured start zero-crossing trigger point and the end zero-crossing trigger point. And extract the corresponding effective voltage value. With power factor Based on the physical attenuation law of power quality fluctuations, the physical interference intensity of high-frequency distortion components on the total energy spectrum of the system is directly positively correlated with the relative proportion of the fundamental wave energy. The main control chip performs fast Fourier transform to analytically extract the target analysis sampling vector, extracts the effective values ​​of the 2nd to 31st harmonic voltages, calculates the ratio of the square root of the sum of the squares of the effective values ​​of each harmonic to the effective value of the fundamental wave, and obtains the dimensionless total harmonic distortion rate. The main control chip is based on the formula Set a threshold for reactive power distortion sensitivity, where, The lower limit of the absolute critical value of the physical waveform voltage used to characterize and identify abnormal high-frequency interference. Environmental physical characteristics parameter characterizing total harmonic distortion (THD). The fundamental scalar representing the real-time effective value of the voltage during the current signal period. The dimensionless distortion tolerance physical coefficients are obtained through pre-calibration based on a purely resistive load standard traceability environment. The underlying computational logic of this pre-calibration process is as follows: Under purely resistive operating conditions, the system uses a built-in pseudo-random waveform generator to inject discrete broadband white noise with an amplitude ranging from 1% to 20% of the rated voltage into the grid's basic sine wave. The main control chip simultaneously captures and records the steady-state leakage fundamental power residual value corresponding to each gradient total harmonic distortion rate. It then calls the least squares algorithm engine in the non-volatile memory to perform quadratic polynomial parameter fitting on the residual sequence and the total harmonic distortion rate. When the determination coefficient of the fitted parabola is detected to be greater than 0.99 for four consecutive approximation iterations and the error norm 2 decays to the level of the lowest effective bit of the underlying analog-to-digital converter, the inverse value of the vertex radius of curvature at the position where the first derivative of the quadratic fitted parabola is zero is directly extracted, truncated, rounded, and stored in a register as a physical coefficient. For subsequent use, the main control chip traverses the frequency domain data array, screening for amplitude percentages exceeding the reactive power distortion sensitivity threshold. The discrete frequency points are identified and locked as target harmonic frequencies. Subsequently, the associated harmonic phase difference is extracted to construct a discrete feature parameter cluster. The main control chip will then... , and As the input vector, a three-dimensional correction coefficient table pre-stored in non-volatile memory is retrieved. The three-dimensional correction coefficient table consists of spatial nodes interwoven with 16 sets of frequency gradients, 8 sets of voltage gradients, and 10 sets of power factor gradients. Each spatial node stores a compensation gain after tracing back through a standard table. The main control chip uses a trilinear interpolation algorithm to calculate the compensation gain under the current operating condition based on the known gains of adjacent nodes. The final reactive power correction value satisfies the formula. ;in, This is the corrected reactive power measurement value. The initial reactive power measurement value is obtained after frequency domain transformation. To extract the compensation gain coefficient from the three-dimensional correction coefficient table and obtain it through interpolation, based on the physical law of power vector superposition in non-sinusoidal circuits, an external nonlinear load device injects a high-order distorted energy flow to form an independent fundamental physical additional power entity. The main control chip retrieves and locks the target harmonic frequency points and the corresponding harmonic voltage amplitude, harmonic current amplitude, and harmonic phase angle difference parameters. According to the AC physical power integral law, it calculates the reactive algebraic characteristic quantities generated at each target harmonic frequency point and physically accumulates them one by one to generate the high-order harmonic bias. The main control chip then uses the three-dimensional spatial mapping output as a basis for correction, and calculates the reactive power output value of the terminal, including the additive physical correction attribute. The specific mathematical correlation follows the formula. ,in, The physical output scalar of the reactive power variable at the terminal after the complete operation of the multiplication-addition compensation logic represents the reactive power variable. The output of the preprocessor is a three-dimensional spatial mapping multiplication correction product value. The physical bias accumulation value characterizes the high-frequency leakage characteristics of nonlinear loads.

[0038] This closed-loop compensation method, which couples hardware noise floor characteristics with multi-parameter spatial mapping, enables the system to automatically compensate for phase nonlinear distortion caused by the low-pass filter inside the metering chip within an operating temperature range of -25℃ to 70℃. The reactive power output of the system not only includes the fundamental component but also suppresses residual components caused by spectral leakage through a multi-dimensional parameter correction model. This ensures that the metering error fluctuation range of the energy meter is maintained within 0.05% in power distribution environments where inductive and capacitive loads frequently switch. This parameter setting method and step-by-step correction logic, determined by a programmed procedure, solves the problem of high dependence of software algorithms on specific hardware models and improves the adaptability of the measurement method across different hardware platforms.

[0039] Example 6: In this embodiment, under the scenario of factory-preset parameter calibration of a single-phase smart energy meter, the main control chip fills the three-dimensional correction coefficient table in the non-volatile memory with compensation data. It uses a standard power source with an output accuracy better than 0.02 as a measurement reference, selecting 16 discrete points on the frequency axis and the rated voltage on the voltage axis. Eight discrete points and ten discrete points selected on the power factor axis are used to determine each spatial node, which corresponds to the initial reactive power measurement value received by the metering chip from the main control chip. The main control chip synchronously acquires the true value of the standard power provided by the standard power source. And calculate the compensation gain coefficient. ,in, To compensate for the gain coefficient, This is the true value of the standard power. As the initial reactive power measurement value, the main control chip stores the obtained coefficients in the address mapping area of ​​the non-volatile memory.

[0040] When the system encounters phase delay conditions caused by the discreteness of semiconductor devices, the main control chip initiates in-situ zero-point offset calibration during the initial power-on initialization phase. Under the condition that the external current input terminal is in an open circuit state and the voltage input terminal is applied with a rated voltage, it continuously acquires discrete voltage sampling sequences and obtains 20 fundamental frequency cycles, and calculates the voltage sampling sequence and current sampling sequence during the zero-crossing shielding period. After the waveform peak offset is completed, the main control chip determines the offset as the initial value of the phase compensation of the system and uses it as the zero offset input item of the three-dimensional correction coefficient table. By combining the three-dimensional correction coefficient table to complete the interpolation compensation, the measurement system can offset the inherent phase delay of the analog-to-digital converter hardware channel before the network is connected. The system enters the standby monitoring state and keeps the correction operators at all levels in the register in the ready mode.

[0041] To construct the deterministic input vector for the multi-dimensional parameter correction model, the main control chip calculates the effective voltage value of the current cycle by performing instantaneous power integration and root mean square operation on the acquired discrete sampling sequence. and power factor Using these spatial coordinates, the system retrieves the corresponding compensation gain coefficient from a pre-stored three-dimensional correction coefficient table in memory. Then, dynamic error compensation for reactive power variables is performed according to the preset mapping logic. On this basis, in order to cope with the slow-changing thermodynamic deviation caused by long-term operation of the equipment, the main control chip continuously monitors the system power factor during the dynamic compensation process. Once it is determined that the device is in the purely resistive range of 0.999 to 1.000 within ten consecutive power grid cycles, the reactive power measurement value at the current moment is used as a residual and pushed into the first-in-first-out historical measurement residual queue. The main control chip uses a moving average filtering algorithm to extract the mathematical expectation of the data in this queue as a local zero-point drift characterization quantity. When the absolute value of this characterization quantity exceeds the preset tolerance boundary set in the temperature drift data manual of the metering chip, this characterization quantity is algebraically accumulated as a dynamic compensation component into the corresponding static bias term in the three-dimensional correction coefficient table. Thus, without adding external temperature measurement hardware, by continuously capturing the purely resistive transient state during system operation as the zero-point self-calibration anchor point, the initial cold-state calibration evolves into a dynamic tracking mechanism that follows the physical gradual change of the thermodynamic properties of the device.

[0042] Example 7: This embodiment is used to determine the momentum scaling factor. In offline calibration scenarios for optimal values, the main control chip utilizes a standard calibration platform to construct a voltage input sequence with a frequency step-by-step variation within the range of 45Hz to 55Hz. The system operates at a momentum scaling factor... With test gradients of 0.75, 0.80, and 0.85 respectively, according to the formula... Calculate the zero-shielding period And record the phase deviation of the termination zero-crossing trigger point relative to the theoretical zero-crossing point of the fundamental wave; where, This is the momentum scaling factor. For the zero-shielding period, To determine the minimum value of the measurement error within the range of the preceding steady-state fundamental frequency period, the main control chip calculates the root mean square value of the phase deviation under each test gradient. It then sets 0.80 as the configuration parameter and writes it into a preset register in the non-volatile memory. Before officially locking the single minimum configuration parameter, to scientifically define the physical safety envelope boundary of this coefficient, the main control chip additionally activates a boundary sweep frequency approximation module for continuous simulation and verification. The main control chip forces the control coefficient α to increase continuously from 0.60 in increments of 0.01 to 0.95, and quantifies and records the glitch penetration at each step point in real time. The resulting abrupt change rate in the measurement cycle and the missed detection rate of the true zero-crossing point due to the excessively long shielding period were analyzed by continuous frequency sweep output. The results showed that when the coefficient was below 0.75, the abrupt change rate increased uncontrollably in a logarithmic manner, confirming that the shielding time window had been broken down by the high-order harmonic envelope of the power grid, resulting in physical immunity failure. When the coefficient exceeded 0.85, the missed detection rate rose sharply, confirming that the true zero-crossing point was abnormally swallowed on the physical time axis due to the large downward fluctuation of the transient frequency of the power grid. Thus, the complete and continuous engineering test data solidified the logical completeness of the range of 0.75 to 0.85 as the absolutely reliable anti-interference interval from the bottom layer.

[0043] When the system experiences phase shift due to aging of the metering transformer hardware parameters, the main control chip initiates an online repair procedure during the no-load period of initial power-on initialization. The system applies rated voltage... Under these conditions, the discrete voltage sampling sequence is continuously read and 20 complete cycles of waveform data are acquired. The sampling sequence is then calculated during the zero-crossing shielding period. After the peak offset of the time-domain cross-correlation function is completed, the main control chip determines the hardware phase shift of the measurement channel based on the delay step size corresponding to the peak value, and uses it as the initial static compensation value of the multi-dimensional parameter correction model, so that the final output reactive power measurement value can automatically offset the delay error of the hardware channel.

Claims

1. A method for measuring reactive power variables in an energy meter based on adaptive frequency domain analysis, characterized in that, Includes the following steps: Step S1: Sample and obtain discrete voltage sampling sequences and discrete current sampling sequences; Step S2: Retrieve the discrete voltage sampling sequence output from the previous measurement cycle, calculate the timestamp difference between two adjacent zero crossings, and determine the previous steady-state fundamental frequency period; Step S3: Establish a zero-crossing shielding period based on half of the preceding steady-state fundamental frequency period and a preset scaling factor, wherein the preset scaling factor is in the range of 0.75 to 0.

85. Step S4: Capture the polarity reversal point of the discrete voltage sampling sequence. When the absolute value of the sampled value at the polarity reversal point is greater than the preset voltage zero-crossing physical dead zone threshold, mark the current moment as the starting zero-crossing trigger point and start the hardware timer. Step S5: When the timing value of the hardware timer is less than the zero-crossing shielding period, control the main control chip to suspend the polarity determination interrupt request and discard the voltage polarity state reversal signal generated by the discrete voltage sampling sequence. Step S6: After the timing value of the hardware timer reaches the zero-crossing masking period, resume the polarity discrimination interrupt request, capture the next real zero-crossing point and mark it as the termination zero-crossing trigger point, and use the time difference between the start zero-crossing trigger point and the termination zero-crossing trigger point as the transient fundamental period. Step S7: According to the time window length defined by the transient fundamental period, extract the discrete voltage sampling sequence and the discrete current sampling sequence to obtain the target analysis sampling vector; Step S8: Perform adaptive discrete Fourier transform on the target analysis sampling vector to extract the fundamental voltage amplitude, fundamental current amplitude, and fundamental voltage-current phase angle difference. After calculating the reactive power, use a multi-dimensional parameter correction model to perform error compensation on the reactive power and output the reactive power variable measurement value. Furthermore, step S8, which uses a multi-dimensional parameter correction model to perform error compensation for reactive power, includes: obtaining the real-time effective voltage value, real-time frequency, and system power factor of the current measurement cycle; substituting the real-time effective voltage value, real-time frequency, and system power factor into the multi-dimensional parameter correction model to map and obtain the error compensation factor corresponding to the original reactive power output value; performing a multiplication and addition operation on the error compensation factor and reactive power to correct the energy spectrum distribution deviation caused by the nonlinear load, and outputting the corrected reactive power variable measurement value.

2. The method for measuring reactive power variables of an energy meter based on adaptive frequency domain analysis according to claim 1, characterized in that, The process of calculating the timestamp difference between two adjacent zero-crossing points in step S2 includes: monitoring the slope direction of adjacent sampling points in the discrete voltage sampling sequence; recording the first zero-crossing time when the voltage sampling value changes from negative to positive polarity and the voltage slope is positive; recording the second zero-crossing time when the voltage sampling value changes from positive to negative polarity and the voltage slope is negative; and determining twice the absolute value of the difference between the first and second zero-crossing times as the preceding steady-state fundamental frequency period.

3. The method for measuring reactive power variables of an energy meter based on adaptive frequency domain analysis according to claim 1, characterized in that, Before obtaining the target analysis sampling vector in step S7, the following steps are also included: calculating the period deviation between the transient fundamental period and the 50Hz standard power frequency period; dynamically adjusting the total number of sampling points of the adaptive discrete Fourier transform based on the period deviation to synchronize the sampling window length with the change of the power grid transient frequency.

4. The method for measuring reactive power variables of an energy meter based on adaptive frequency domain analysis according to claim 1, characterized in that, The process of extracting the fundamental voltage amplitude, fundamental current amplitude, and fundamental voltage-current phase angle difference in step S8 includes: performing full-spectrum analysis on the target analysis sampling vector to obtain the fundamental voltage amplitude, fundamental current amplitude, and fundamental voltage-current phase angle difference; extracting harmonic frequency points whose amplitude ratio exceeds the preset reactive power distortion sensitivity threshold as target harmonic frequency points, and obtaining the harmonic voltage amplitude, harmonic current amplitude, and harmonic phase angle difference corresponding to the target harmonic frequency points.

5. The method for measuring reactive power variables of an energy meter based on adaptive frequency domain analysis according to claim 1, characterized in that, After outputting the reactive power variable measurement value in step S8, the following steps are also included: establishing a historical measurement residual queue, extracting the reactive power output value under pure resistive load conditions as a local zero-point drift characterization quantity; when the local zero-point drift characterization quantity exceeds the preset tolerance boundary, updating the constant bias term in the multi-dimensional parameter correction model to offset the temperature drift of the metering component caused by changes in ambient temperature in situ.

6. The method for measuring reactive power variables of an energy meter based on adaptive frequency domain analysis according to claim 1, characterized in that, In step S5, during the process of discarding the voltage polarity state reversal signal generated by the discrete voltage sampling sequence, the main control chip maintains the internal clock counter to accumulate and logically shields the level reversal detection for the external interrupt pin until the timing value of the hardware timer reaches the number of clock cycles corresponding to the zero-crossing shielding period.

7. The method for measuring reactive power variables of an energy meter based on adaptive frequency domain analysis according to claim 1, characterized in that, When the transient fundamental period is detected to have a change of more than 5% relative to the preceding steady-state fundamental period, the control method reverts to steady-state protection mode. The preceding steady-state fundamental period is used as a substitute reference for the current period to implement time window interception, so as to maintain the convergence of the calculation of reactive power variable measurement.

Citation Information

Patent Citations

  • Nonlinear-load electric energy measuring method

    CN101915872A

  • Anti-interference judgment method for power grid voltage zero crossing point

    CN112362952A

  • Self-adaptive adjustment method and system for measurement of electric energy meter

    CN119335467A

  • High-precision harmonic analysis method of sampling data synchronization

    CN102243272A

  • Reactive power adaptive calculating method

    CN105467201A