A Low-Power Metering Method Driven by Abnormal Events in an Electricity Meter

CN122568096APending Publication Date: 2026-08-14LIYANG HUAPENG ELECTRIC POWER METER
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]针对现有技术的不足,本发明提供了一种电能表异常事件驱动的低功耗计量方法,解决了现有技术中对ADC从上电开始的瞬态建立时间中的畸变采样点的处理方式会产生较大误差的技术问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122568096A_ABST
    Figure CN122568096A_ABST
Patent Text Reader

Abstract

This invention relates to the field of electricity meter technology, and in particular to a low-power metering method driven by abnormal events in electricity meters. The method provides a historical steady-state benchmark through a normal waveform template stored in step S1; adaptively calibrates the boundary of the transient distortion interval of the ADC power-on in step S2; extracts reliable observation information from stable data after the distortion interval in step S3; performs reverse recursive prediction under dual-end constraints to achieve high-precision reconstruction of the waveform in the distortion interval in step S4; and stitches together the complete waveform and completes the electricity metering in step S5. This method eliminates, to some extent, the electricity metering error caused by short-term abnormal events due to the ADC power-on transient setup time. Through a dual-condition joint decision mechanism, the endpoint of the distortion interval is jointly calibrated by short-term energy exceeding the limit and the continuous stability of the normalized variance, eliminating the problem of misjudgment under complex noise environments with a single energy criterion. This makes the calibration of the distortion interval boundary adaptive and unaffected by changes in signal amplitude.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electricity meter technology, and in particular to a low-power metering method driven by an abnormal event in an electricity meter. Background Technology

[0002] Under normal circumstances, in order to reduce its own operating power consumption, the high-power analog-to-digital converter (ADC) and metering processor of the electricity meter are usually in a dormant or completely powered-off state, with only the low-power abnormal event detection circuit remaining in operation. When the electricity meter detects abnormal events such as voltage surges, drops, and strong magnetic intrusions, it will be woken up, causing the ADC to be powered on again and start collecting voltage and current signals to ensure accurate metering of electricity.

[0003] However, from power-on to the stabilization of its internal reference voltage, the establishment of amplifier bias, and the entry of the sample-and-hold circuit into normal operation, an ADC typically requires a transient settling time of hundreds of microseconds to several milliseconds. During this time, the sampled values ​​output by the ADC are not a true mapping of the input analog signal, but rather exhibit significant and non-constant DC bias, gain drift, and nonlinear distortion, resulting in severe distortion of the initial sample points after wake-up. For short-duration abnormal events, such as voltage dips lasting only two to three power frequency cycles, the proportion of sample points in this distorted interval to the total number of sample points throughout the event duration is already significant. Existing technologies typically handle this by directly discarding distorted sample points or simply filling them with zero or fixed bias values. However, direct discarding results in the permanent loss of effective waveform information, leading to a significantly smaller measured increase in power during abnormal events; simple filling introduces spurious power components unrelated to the true waveform, resulting in overestimation of the measurement results and making it difficult to accurately reflect harmonic power. Especially in applications requiring high-precision power quality analysis and incident liability delineation, the metering errors caused by the above processing methods are highly likely to further introduce non-negligible errors into subsequent data analysis. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a low-power metering method driven by abnormal events in electricity meters, which solves the technical problem that the processing of distorted sampling points in the transient setup time of the ADC from power-on will produce large errors in existing technologies.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a low-power metering method driven by an abnormal event of an electricity meter, comprising the following steps:

[0006] S1. When the electricity meter is in normal metering state, collect electrical signals and periodically update and store normal waveform templates; the normal waveform template includes at least an end waveform sequence composed of L consecutive voltage sampling point values ​​at its end and the fundamental phase corresponding to the end;

[0007] S2. When an abnormal event triggers wake-up, calculate the short-time energy and normalized variance of the initial sampling sequence of the analog-to-digital converter (ADC) after power-on, and define the leading distortion interval from the wake-up time to the stable output time of the ADC.

[0008] S3. Take a series of sampling points of length M located after the leading distortion interval as a reliable observation sequence, extract the fundamental instantaneous phase of the reliable observation sequence at the first sampling point as the reliable starting phase, and estimate its fundamental frequency.

[0009] S4. Taking the first sampling point of the reliable observation sequence as the starting point of the recursion, and taking the reliable starting phase and fundamental frequency as the initial conditions, perform reverse recursive prediction point by point along the time decreasing direction to generate the compensation sampling value at the corresponding time to obtain the distortion interval compensation sequence; the reverse recursive prediction is performed under the following two-end constraints: the fundamental phase of the recursive endpoint compensation value must be continuous with the fundamental phase at the end of the normal waveform template, and the waveform envelope obtained by splicing the recursive endpoint compensation value and the end waveform sequence is smooth;

[0010] S5. The distortion interval compensation sequence and the reliable observation sequence are spliced ​​together in chronological order to form a complete waveform sequence and power integration is performed to obtain the power increment during the abnormal event, which is then added to the total power.

[0011] Preferably, step S2 specifically includes the following steps:

[0012] When an abnormal event triggers a wake-up, the initial sampling sequence of the analog-to-digital converter (ADC) output after power-on is obtained.

[0013] A sliding window of a preset length with a sliding step size of 1 is set on the initial sampling sequence. The sliding window slides from the first sampling point to the current time, and the short-time energy and normalized variance of the sliding window with each sampling point as the initial point are calculated point by point. The short-time energy is the sum of the squares of the voltage values ​​of each sampling point in the sliding window. The normalized variance is the ratio of the variance of each sampling point in the sliding window to the average power of each sampling point in the sliding window.

[0014] Set a noise energy threshold and a variance stability threshold. Then, in chronological order, take the first sampling point whose short-term energy is greater than the noise energy threshold and whose normalized variance of the sliding window corresponding to its subsequent multiple consecutive sampling points is less than the variance stability threshold as the end point of the leading distortion interval, and take the wake-up time of the analog-to-digital converter (ADC) as the starting point of the leading distortion interval.

[0015] Preferably, in step S1, the normal waveform template further includes the amplitudes of each harmonic of the voltage and current and their phase shifts relative to the fundamental wave.

[0016] In step S4, the reverse recursive prediction uses the amplitude of each harmonic of voltage and current in the normal waveform template and its phase shift relative to the fundamental wave as prior information to constrain the amplitude ratio and phase relationship of each harmonic in the generated distortion interval compensation sequence to be consistent with the normal waveform template.

[0017] Preferably, in step S4, the specific steps of the reverse recursive prediction are as follows:

[0018] Calculate the autocorrelation coefficient of the reliable observation sequence in forward time order;

[0019] The reflection coefficient and autoregressive model coefficient are recursively solved based on the autocorrelation coefficient, so as to minimize the sum of the forward prediction error power and the backward prediction error power;

[0020] Taking the first sampling point of the reliable observation sequence as the starting point of the recursion, along the direction of time decrease, the compensation sampling value is generated point by point using the autoregressive model coefficients according to the forward prediction formula;

[0021] Calculate the phase deviation between the fundamental phase of the recursive endpoint compensation value and the fundamental phase at the end of the normal waveform template, as well as the difference in the first derivative of the envelope between the recursive endpoint compensation value and the end waveform sequence splicing point; use the weighted sum of the phase deviation and the first derivative of the envelope as the correction target, iteratively adjust the coefficients of the autoregressive model, and then re-execute the point-by-point generation of compensation sampling values ​​until the weighted sum is lower than the preset tolerance or reaches the preset maximum number of iterations.

[0022] Preferably, in step S4, the waveform envelope smoothing obtained by concatenating the recursive endpoint compensation value and the terminal waveform sequence specifically refers to:

[0023] The spliced ​​sequence is obtained by concatenating the recursive endpoint compensation value with the terminal waveform sequence;

[0024] Extract the waveform envelope of the spliced ​​sequence, and calculate the approximate value of the first derivative of the envelope at the sampling point before the splicing point and the approximate value of the first derivative of the envelope at the sampling point after the splicing point. Make the absolute value of the difference between the two less than the envelope smoothing tolerance so that the waveform envelope obtained by splicing is smooth.

[0025] Preferably, before performing the reverse recursive prediction in step S4, the method further includes:

[0026] Based on the waveform characteristics of the first few cycles of the reliable observation sequence, determine the type of abnormal event corresponding to this wake-up;

[0027] If the abnormal event is determined to be a voltage dip or short-term interruption, the waveform shape of the end waveform sequence in the normal waveform template is kept unchanged, and its fundamental amplitude is scaled proportionally to the ratio of the current fundamental amplitude of the reliable observation sequence to the fundamental amplitude of the normal waveform template to obtain the final end waveform sequence.

[0028] If the abnormal event is determined to be of the frequency offset type, then the time-domain scaling transformation of the end waveform sequence in the normal waveform template is performed according to the ratio of the fundamental frequency of the reliable observation sequence to the fundamental frequency of the normal waveform template to obtain the final end waveform sequence.

[0029] Preferably, in step S1, the specific steps for periodically updating the stored normal waveform template include:

[0030] During a continuous period when the power grid is detected to be operating in a steady state and no abnormal events have occurred, the fundamental frequency, fundamental amplitude, and phase difference of the voltage and current signals collected at the current moment are extracted, and the values ​​of multiple consecutive voltage sampling points at the end are extracted as the current end waveform sequence.

[0031] Using an exponentially weighted moving average method, the fundamental frequency voltage fundamental amplitude, current fundamental amplitude, phase difference, terminal fundamental phase, and the value of each sampling point in the terminal waveform sequence stored in the normal waveform template are updated according to the weighted sum of the corresponding parameter values ​​stored in the template and the corresponding parameter values ​​extracted at the current time.

[0032] By employing the above technical solution, the present invention provides a low-power metering method driven by abnormal events in electricity meters, which has at least the following beneficial effects:

[0033] 1. This invention provides a historical steady-state benchmark through the normal waveform template stored in step S1, adaptively calibrates the boundary of the transient distortion interval of the ADC power-on in step S2, extracts reliable observation information from the stable data after the distortion interval in step S3, performs reverse recursive prediction under double-end constraints to achieve high-precision reconstruction of the waveform in the distortion interval in step S4, and stitches together the complete waveform and completes the power metering in step S5. To a certain extent, this invention eliminates the power metering error of short-term abnormal events caused by the transient setup time of the ADC power-on, and the metering accuracy is no longer constrained by the hardware setup time.

[0034] 2. This invention uses a dual-condition joint decision mechanism to jointly calibrate the end point of the distortion interval by combining short-time energy exceeding the limit and the continuous stability of normalized variance. This eliminates the problem of easy misjudgment of a single energy criterion in complex noise environments, making the calibration of the distortion interval boundary adaptive and unaffected by changes in signal amplitude.

[0035] 3. This invention uses an exponentially weighted moving average update mechanism to ensure that the normal waveform template always fits the latest steady-state characteristics of the power grid, avoiding template mismatch caused by slow drift of power grid parameters, and improving the timeliness and reliability of the dual-end constraint.

[0036] 4. This invention introduces a template transformation method that is adaptive to event type by harmonic prior, enabling the reconstruction framework to cope with different abnormal scenarios such as voltage sag and frequency shift, while maintaining compatibility with steady-state waveforms in the frequency domain, thus improving the accuracy of harmonic power measurement. Attached Figure Description

[0037] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0038] Figure 1 This is a flowchart of the low-power metering method driven by abnormal events of the electricity meter according to the present invention. Detailed Implementation

[0039] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. This will allow for a full understanding of how the present application uses technical means to solve technical problems and achieve technical effects, and to facilitate its implementation.

[0040] To address the significant errors arising from the handling of distorted sampling points during the transient setup time of an ADC from power-on in existing technologies, this embodiment provides a low-power metering method driven by an abnormal event in an energy meter. The specific steps include:

[0041] S1. When the electricity meter is in normal metering mode, it collects electrical signals and periodically updates and stores a normal waveform template. The normal waveform template includes at least an end waveform sequence consisting of L consecutive voltage sampling points at its end and the fundamental phase corresponding to that end. .

[0042] In this step of this embodiment, by pre-establishing and continuously maintaining a normal waveform template that accurately reflects the steady-state waveform characteristics of the power grid before the occurrence of an abnormal event, accurate data references can be provided for subsequent reverse recursive prediction. Under normal metering conditions, the ADC and metering processor of the energy meter are in full-speed operating mode, operating at a preset sampling frequency. For grid voltage signals and current signal Perform continuous sampling, sampling frequency The frequency can be set from 3.2kHz to 12.8kHz as needed to ensure effective capture of the fundamental frequency and all harmonics. In this state, the energy meter extracts the fundamental frequency of the voltage. voltage fundamental amplitude Current fundamental amplitude and the phase difference between voltage and current Meanwhile, the most recent L consecutive voltage sampling points are retained in the storage space to form the final waveform sequence. Its expression can be represented as:

[0043]

[0044] in, This refers to the latest voltage sampling point value acquired within the current update cycle. The corresponding time is the last moment of the normal waveform template, and the fundamental phase corresponding to this last moment is denoted as the final fundamental phase. In this embodiment, L is the number of sampling points corresponding to one complete power frequency cycle, i.e. To ensure the end waveform sequence Carry sufficient waveform morphology information, for example, when the sampling frequency... Take 6400Hz, the fundamental frequency of the power grid. When taking 50Hz, One sampling point.

[0045] Furthermore, in step S1, since the fundamental frequency, amplitude, and other parameters of the power grid are not absolutely constant, they will slowly drift with changes in load switching and power generation output. If a fixed template that is stored once and used permanently is used, the template will gradually deviate from the current actual state of the power grid over time, leading to a decrease in the accuracy of subsequent reconstructing. By periodically updating the stored normal waveform template, the normal waveform template is made to always conform to the latest steady-state characteristics of the power grid, providing a highly timely constraint benchmark for reverse recursive prediction. Therefore, in this embodiment, the specific steps for periodically updating the stored normal waveform template include: considering that distorted waveforms during power grid transient disturbances may be mixed into the template, polluting the accuracy of historical benchmarks, and that sampled data during abnormal events may be mixed into the template, causing the template itself to be polluted by abnormal events and forming incorrect constraint targets, therefore, during the continuous time period when the power grid is detected to be in steady-state operation and no abnormal events have occurred, the fundamental frequency, fundamental amplitude, and phase difference of the voltage and current signals collected at the current moment are extracted, and multiple consecutive voltage sampling point values ​​at the end are extracted as the current end waveform sequence; wherein, the determination of steady-state operation can be achieved by monitoring the voltage amplitude fluctuation range and frequency deviation. For example, when the voltage amplitude fluctuation is within ±5% of the rated value and the frequency deviation is within ±0.1Hz for a preset duration (such as 1 second), the power grid is determined to be in steady-state operation. Then, using an exponentially weighted moving average method, the fundamental frequency voltage amplitude, fundamental current amplitude, phase difference, terminal fundamental phase, and the value of each sampling point in the terminal waveform sequence stored in the normal waveform template are updated according to the weighted sum of the corresponding parameter values ​​stored in the template and the corresponding parameter values ​​extracted at the current moment. Its expression can be represented as:

[0046]

[0047] in, and These represent the corresponding parameter values ​​before and after the update in the normal waveform template, respectively. This represents the corresponding parameter value extracted from the power grid signal at the current moment. The forgetting factor is a preset value, set to 0.1 in this embodiment. The advantage of using an exponentially weighted moving average instead of an equal-weighted arithmetic average in this embodiment is that the forgetting factor... By assigning a higher contribution weight to the recent steady-state waveform, while the influence of earlier historical values ​​gradually decays at an exponential rate, this mechanism allows the template to adaptively track the slow drift of the grid state, such as voltage level shifts caused by seasonal load changes. Simultaneously, it suppresses the interference of random noise from single sampling on template stability, improving the timeliness and reliability of the template as a truth anchor. Furthermore, in modern distribution networks, the widespread use of power electronic loads results in significant harmonic components in voltage and current waveforms. If the normal waveform template only contains fundamental wave information, the backward recursive prediction in step S4 can only constrain the fundamental wave component. The reconstructed waveform in the distorted region may be correct in fundamental wave morphology, but the amplitude ratio and phase relationship of the harmonic components do not match the actual steady-state state, leading to deviations in harmonic power measurement. Therefore, this embodiment further incorporates steady-state harmonic characteristics into the normal waveform template, making the reconstructed waveform compatible with historical steady-state values ​​in the frequency domain, thus improving the accuracy of harmonic power measurement. (Amplitude values ​​of each harmonic are listed below.) and phase shift The normal waveform template can be extracted from the steady-state sampled data using Fast Fourier Transform (FFT), and then incorporated into the subsequent exponentially weighted moving average update mechanism along with the fundamental wave parameters. Specifically, the normal waveform template in this embodiment also includes the amplitudes of each harmonic of the voltage and current, and their phase shifts relative to the fundamental wave. In particular, in addition to storing the fundamental wave characteristics, the normal waveform template also stores the h-th harmonic amplitude of the voltage. The amplitude of the h-th harmonic of the current And the phase shift of each harmonic relative to the fundamental frequency. ,in, , The highest harmonic order stored is [15, 31], which in this embodiment ranges from 750 Hz to 1550 Hz and is sufficient to cover the characteristic harmonics generated by most nonlinear loads.

[0048] S2. From the moment of power-on, the ADC's internal bandgap reference voltage source needs to be charged and established, the operational amplifier's input bias needs to be stabilized, and the sample-and-hold capacitor needs to reach its steady-state operating point. During this transient setup time, the ADC outputs the digital code... The signal is not a true mapping of the input analog signal, exhibiting low amplitude and drastic fluctuations. Once the ADC enters a stable operating state, the output amplitude jumps to a normal level, and the fluctuation amplitude significantly converges. To quantify this process, this embodiment calculates the short-time energy and normalized variance of the initial sampling sequence of the analog-to-digital converter (ADC) after power-on wake-up triggered by an abnormal event, thus defining the leading distortion interval from the wake-up time to the stable output time of the ADC. Specifically, after power-on wake-up triggered by an abnormal event, the initial sampling sequence of the analog-to-digital converter (ADC) after power-on is obtained. That is, the digital code output by the ADC during the transient setup time; then, a preset length with a sliding step size of 1 is set on the initial sampling sequence. Sliding window, The value is typically one-quarter to one-half of the number of sampling points for one power frequency cycle. For example, when taking one-quarter, when the sampling frequency... Take 6400Hz, the fundamental frequency of the power grid. When taking 50Hz, There are 32 sampling points. Then, the sliding window starts from the first sampling point (i.e....) The sliding window begins to slide towards the current time, calculating the short-time energy and normalized variance point by point, with each sampling point as the initial point; where, the short-time energy... The short-time energy is the sum of the squares of the voltage values ​​at each sampling point within the sliding window, reflecting the overall power level of the signal within the window. When the ADC is not yet stable, the output signal amplitude is generally low, and the short-time energy is small. Once the ADC enters a stable operating state, the output amplitude jumps to a normal level, and the short-time energy increases significantly. By subsequently setting an appropriate noise energy threshold, a preliminary distinction can be made between the low-energy distortion state and the normal energy stable state. Normalized variance This is the ratio of the variance of each sampling point within the sliding window to the average power of each sampling point within the sliding window. In this embodiment, the advantage of using normalized variance instead of the original variance is that the absolute value of the original variance is significantly affected by the signal amplitude. In power grids with different voltage levels, or when the voltage level of the same power grid shifts at different times, the original variance values ​​corresponding to the same degree of stable state differ greatly, making it difficult to set a universally applicable stability threshold. Normalized variance, by dividing by the window's average power, transforms the fluctuation measure into a dimensionless relative index, eliminating the influence of signal amplitude on the fluctuation scale. Regardless of how the signal amplitude changes, as long as the ADC output reaches a stable state, its normalized variance converges to a stable range determined by quantization noise and the inherent harmonic content of the signal. This allows the method of this embodiment to use a single, fixed variance stability threshold applicable to scenarios with different voltage levels and different signal amplitudes.

[0049] Subsequently, a noise energy threshold was set. and variance stability threshold , The value of is determined based on the minimum effective signal energy of the ADC under normal operating conditions, and is usually taken as 0.1 to 0.3 times the signal energy within a window when the ADC outputs stably. The value of is determined based on the normalized variance level under the combined effects of inherent harmonics and quantization noise of the mains signal when the ADC outputs stably, and is typically set to a value between 0.05 and 0.15. Finally, in chronological order, find the first sampling point that simultaneously satisfies the following two conditions. :

[0050] 1. This sampling point represents the short-time energy of the corresponding sliding window. This indicates that the signal energy has significantly exceeded the noise level;

[0051] 2. This sampling point and its subsequent continuous... Each sliding window satisfies This indicates that the signal fluctuations have converged to a stable state and have remained so, ruling out false triggering caused by transient spikes. It is a preset positive integer, and its value range is usually [3,5].

[0052] Following the chronological order, the first sampling point that satisfies the above two conditions is determined as the end point of the leading distortion interval. The number of sampling points contained in the distortion interval is denoted as... The wake-up time of the analog-to-digital converter (ADC) is taken as the starting point of the leading distortion interval (the sampling point number here is...). This determined the entire leading distortion interval, and the corresponding sampling point number range was [range missing]. Furthermore, it should be noted that this embodiment employs a combined judgment based on two conditions, rather than a single condition. This is primarily based on the following considerations: When relying solely on short-term energy, brief spikes may occur during the ADC's transient setup process, causing local energy to momentarily exceed limits, leading to premature misjudgment of the distortion interval endpoint. Conversely, when relying solely on normalized variance, if the power grid signal itself fluctuates significantly, such as with drastic load changes, even if the ADC has stabilized, the normalized variance may still be high due to signal variations, resulting in a delayed determination of the distortion interval endpoint. The combined judgment based on two conditions can accurately distinguish between distortion caused by ADC instability and fluctuations caused by power grid signal variations under complex noise and signal fluctuation environments, significantly improving the reliability of the leading distortion interval calibration.

[0053] S3. Reverse recursive prediction requires a definite starting point and accurate signal model parameters. Therefore, in this embodiment, a continuous sampling sequence of length M located after the leading distortion interval is taken as a reliable observation sequence. , The sequence consists entirely of valid sampled values ​​after ADC stabilization, accurately reflecting the grid voltage signal state after an abnormal event. The fundamental instantaneous phase at the first sampling point of the reliable observation sequence is extracted as the reliable starting phase, and its fundamental frequency is estimated. In this embodiment, the reliable observation sequence... The selection of M should include at least the number of sampling points for two complete power frequency cycles, i.e. To ensure sufficient statistical sample size for subsequent frequency estimation and autoregressive model parameter estimation, in this embodiment, M is taken as the number of sampling points corresponding to four power frequency cycles. For example, when the sampling frequency... Take 6400Hz, the fundamental frequency of the power grid. When the frequency is 50Hz, M represents 512 sampling points. Furthermore, when extracting the fundamental instantaneous phase at the first sampling point of the reliable observation sequence as the reliable starting phase, the following method can be used: First, bandpass filter the reliable observation sequence to remove the DC component and harmonic components higher than the fundamental frequency, obtaining an approximate fundamental signal; then, apply this approximate fundamental signal to... The sampled values ​​at a given point are combined with the differential information from adjacent sampling points to calculate the instantaneous phase using arctangent calculation. Simultaneously, the fundamental frequency of the reliable observation sequence is estimated. The fundamental frequency can be estimated using the time-domain zero-crossing detection method, which involves detecting the time positions of multiple consecutive positive zero-crossings in a reliable observation sequence, calculating the time interval between adjacent positive zero-crossings, and taking the average value to obtain the fundamental period. Alternatively, frequency domain interpolation (FFT) can be used to overcome frequency resolution limitations by interpolating the spectrum near the peak of the fundamental frequency, thereby obtaining a more accurate frequency estimate. Reliable initial phase. It provides a phase angle reference at the starting point of the reverse recursive prediction, and the fundamental frequency. This provides frequency parameters that accurately match the current actual state of the power grid for the construction of the recursive model.

[0054] S4, using the first sampling point of the reliable observation sequence (i.e. The first true sample value acquired after the ADC stabilizes is taken as the starting point for the recursion, possessing the highest reliability. Using a reliable initial phase and fundamental frequency as initial conditions, it provides phase and frequency references for the recursive process. Then, it performs reverse recursive prediction point by point along the decreasing time direction, i.e., from... From this moment forward, towards The corresponding time points are progressively advanced, generating compensated sample values ​​for each corresponding time point. To obtain the distortion interval compensation sequence , Since the reliable observation sequence is located later in the distortion interval (i.e., distortion occurs first and stabilization occurs later), the prediction proceeds from the known points in the later interval to the unknown region in the earlier interval along the decreasing time direction. This ensures that the previous values ​​(values ​​located later on the time axis) on which each prediction step depends are either reliable observation points that were actually sampled or compensation points that have already been generated and verified in the previous step. Therefore, this recursive method in this embodiment is beneficial for controlling the accumulation and propagation of errors, and has higher numerical stability compared to extrapolating from the historical template in the earlier interval along the increasing time direction. In addition, the reverse recursive prediction is performed under the following two-end constraints: the first constraint is the phase continuity constraint, i.e., the compensation value at the end of the recursion. The fundamental phase must be continuous with the fundamental phase at the end of the normal waveform template. The endpoint of the recursion is the moment when the recursion is finally reached in reverse. This refers to the compensated sample value at the wake-up time, which is immediately adjacent to the last moment of the normal waveform template before the abnormal event occurred. The physical meaning of the phase continuity constraint is that it requires a seamless connection between the starting point of the reconstructed waveform and the ending point of the historical steady-state waveform in the fundamental phase angle dimension, ensuring that the fundamental sinusoidal oscillation waveform does not experience phase breaks or abrupt changes. Let's assume... The fundamental phase obtained by fundamental phase extraction is Then the phase continuity constraint can be expressed as ,in, The preset phase continuity tolerance can be set to 0.01 radians in this embodiment. The second constraint is the envelope smoothing constraint, which is the smoothing of the waveform envelope obtained by splicing the recursive endpoint compensation value with the terminal waveform sequence. This constraint focuses on the amplitude profile of the time-domain waveform, requiring the reconstructed waveform and the historical steady-state waveform to achieve a natural transition of amplitude envelope near the splicing point, without abrupt amplitude jumps or slope changes. Specifically, in this embodiment, its implementation is as follows:

[0055] The recursive endpoint compensation value spliced ​​to the end waveform sequence In Then, the spliced ​​sequence is obtained. In this spliced ​​sequence, The sampling point before the splicing point, This is the sampling point after the splicing point. Then, the waveform envelope of the spliced ​​sequence is extracted. The waveform envelope extraction can be performed using the Hilbert transform method, that is, performing the Hilbert transform on the spliced ​​sequence to obtain its analytic signal; the magnitude of the analytic signal is the instantaneous envelope of the sequence. Alternatively, a peak detection method can be used, that is, detecting each local maximum point in the spliced ​​sequence and connecting the maximum points through interpolation to form the upper envelope. This embodiment preferably uses the Hilbert transform method because it does not require detecting local extreme points and has better robustness to noise and sampling jitter. After extracting the envelope function... Next, calculate the sampling point before the splicing point (i.e. Approximate value of the first derivative of the envelope at () and the next sampling point after the splicing point (i.e. Approximate value of the first derivative of the envelope at () The approximate value of the first derivative of the envelope can be calculated using the finite difference method, i.e. for The envelope value at the point and the end waveform sequence The difference in envelope values ​​at each location, for The envelope value at the location and The difference between the envelope values ​​at each point is used to smooth the envelope of the spliced ​​waveform. The expression for this is: , To achieve the preset envelope smoothing tolerance, in this embodiment, it can be taken as 0.05 times the peak amplitude of the spliced ​​sequence envelope. In this embodiment, the phase continuity constraint only ensures the continuous transition of the fundamental wave in the phase angle dimension, but cannot constrain the rate of change of the waveform amplitude. If only the phase constraint is applied without the envelope constraint, the compensation value... Possibly in terms of amplitude Significant differences or abrupt slope changes can cause visual misalignment in the spliced ​​waveform, resulting in a non-physical instantaneous jump in the measured power at the splicing point. Envelope smoothing constraints incorporate amplitude transitions into the optimization objective, ensuring that the spliced ​​waveform continues naturally in the time domain profile. The combined effect of the two-end constraints transforms the reconstruction process from blind extrapolation into a deterministic reconstruction problem guided by clear boundaries.

[0056] In this embodiment, the reverse recursive prediction uses the amplitudes of each harmonic of voltage and current in the normal waveform template and their phase shifts relative to the fundamental wave as prior information to constrain the amplitude ratios and phase relationships of each harmonic in the generated distortion interval compensation sequence to remain consistent with the normal waveform template. The technical significance of this extension lies in the fact that in modern distribution networks with prevalent nonlinear loads, harmonic components are significant in voltage waveforms. If the reverse recursive prediction only uses the fundamental wave phase and envelope smoothing as constraints, the generated compensation sequence, while correct in fundamental wave shape and time-domain envelope, may deviate from the actual steady-state waveform in terms of harmonic component amplitude ratios and relative phases. By introducing harmonic prior information, the recursive model, when generating each compensation sampling point, is not only constrained by the double-ended constraints of the fundamental wave phase and envelope but also by the spectral shape constraints of the steady-state harmonic characteristics, ensuring that the reconstructed distortion interval waveform is compatible with historical steady-state structures in the frequency domain. This extension makes a substantial contribution to improving the accuracy of harmonic power measurement. In practical implementation, a harmonic constraint penalty term can be added to the objective function of the reverse recursive prediction. This term is defined as the difference between the amplitude of the h-th harmonic of the compensation sequence and the amplitude of the harmonic in the template. The deviation, and the phase of the h-th harmonic relative to the fundamental wave and the template. The weighted sum of squared deviations is used, and the optimization direction during the recursive process is to minimize the comprehensive objective function that includes the penalty term. Specifically, the specific steps of the backward recursive prediction are as follows:

[0057] First, calculate the autocorrelation coefficient of the reliable observation series in forward time sequence. For the reliable observation series... , In forward chronological order, that is, according to from arrive Calculate its autocorrelation coefficient ,in, , is the delay step number. The predefined order of the autoregressive model is given, and Then the autocorrelation coefficient The calculation formula is:

[0058]

[0059] in, The arithmetic mean of the reliable observation sequence, autocorrelation coefficient Describes the interval in the reliable observation sequence. The statistical correlation between two sampled values ​​at each sampling point forms the data foundation for constructing the subsequent autoregressive model. The model order... The choice of order needs to balance prediction accuracy and computational complexity. If the order is too low, the model cannot fully capture the temporal structure of the waveform, resulting in insufficient prediction accuracy. If the order is too high, the model is sensitive to noise and the computational load increases significantly. The value range is generally [4,8], and 5 is taken in this embodiment.

[0060] The reflection coefficient and autoregressive model coefficients are recursively solved based on the autocorrelation coefficient, minimizing the sum of the forward prediction error power and the backward prediction error power. In this embodiment, the Burg algorithm is used for the solution. The core idea of ​​the Burg algorithm is: within the Levinson recursive framework, the reflection coefficient is solved stepwise by minimizing the sum of the forward prediction error power and the backward prediction error power, without directly estimating higher-order statistics other than the autocorrelation coefficient. Specifically, the forward prediction error sequence is first initialized. and backward prediction error sequence For the order of the autoregressive model Calculate the reflection coefficient of the m-th order. The calculation formula is as follows:

[0061]

[0062] in, and These are the forward and backward prediction error sequences for the (m-1)th order recursion, respectively. Then, using the reflection coefficient... Update the first... using the Levinson recurrence formula

[0063] The coefficients of an m-th order autoregressive model. For example, This indicates that the sequence number in the autoregressive model obtained by the m-th recursion is... The coefficient of is updated as follows:

[0064]

[0065] for ,have:

[0066]

[0067] in, In the autoregressive model obtained by recursion of order m-1, the index is... coefficient, Let mi be the coefficient in the autoregressive model obtained by recursion at order m-1. The physical meaning of this update formula is that the coefficients of higher-order models are obtained by a weighted combination of the coefficients of lower-order models and the reflection coefficient. Simultaneously, the forward and backward prediction error sequences are updated, and their expressions are as follows:

[0068]

[0069] After the recursion is completed, we obtain The final coefficients of the autoregressive model, i.e. , ,in Indicates the first In the autoregressive model obtained by the order recursion, the sequence number is The coefficients. In this embodiment, the advantages of choosing the Burg algorithm are as follows: First, the Burg algorithm is based on the maximum entropy spectral estimation principle, and its spectral estimation accuracy is better than the traditional Yule-Walker autocorrelation method under the condition of short data length (M is finite); Second, the Burg algorithm minimizes the forward and backward prediction error power at the same time, so that the obtained model parameters take into account the prediction optimality in both directions, providing a more robust starting point for subsequent backward recursive prediction; Third, the Burg algorithm ensures the stability of the autoregressive model, that is, all poles are located inside the unit circle, avoiding numerical divergence in the recursive prediction process.

[0070] Subsequently, using the first sampling point of the reliable observation sequence as the starting point for recursion, and along the decreasing time direction, compensated sampling values ​​are generated point-by-point using the autoregressive model coefficients according to the forward prediction formula. Along the decreasing time direction, i.e. from... Initially, the final autoregressive model coefficients that have already been solved are used. The compensated sample values ​​are generated point by point according to the forward prediction formula, and its expression is:

[0071]

[0072] In the above formula, This represents the voltage sample estimate generated by the reverse recursive prediction algorithm at the nth sampling time. exist Known sampled values ​​from reliable observation sequences are taken at that time. ,exist At that time, take the already generated compensated sample value. The recursive order is as follows In each step of the recursion, all the necessary steps on the right side of the formula are required. The values ​​are all known. to All data are derived from reliable observation sequences. When extrapolating to earlier times, some sampling points use self-generated compensation values ​​that have been corrected through subsequent iterations. The physical meaning of the forward prediction formula is: the sampled value at the current time is predicted by the weighted sum of the sampled values ​​at its p future times.

[0073] Finally, the phase deviation between the fundamental phase of the recursive endpoint compensation value and the fundamental phase at the end of the normal waveform template, as well as the difference in the first derivative of the envelope between the recursive endpoint compensation value and the end waveform sequence splicing point, are calculated. Using the weighted sum of this phase deviation and the first derivative of the envelope as the correction target, the coefficients of the autoregressive model are iteratively adjusted, and the point-by-point generation of compensation sampling values ​​is repeated until the weighted sum is lower than the preset tolerance or the preset maximum number of iterations is reached. After completing all iterations for the first time... After generating each compensated sample value, the recursive endpoint compensation value is tested. Does the double-ended constraint satisfy the condition? Calculate the recursive endpoint compensation value. fundamental phase Phase with the fundamental wave at the end of the normal waveform template phase deviation Simultaneously, calculate the difference of the first derivative of the envelope at the splice point using the method mentioned above. With phase deviation Difference between the first derivative and the envelope The weighted sum is used as the modified objective function. ,Right now:

[0074]

[0075] in, and These are the positional bias weight and the envelope bias weight, respectively. In this embodiment, both are set to 1. If the objective function is corrected... If the value is greater than the preset target tolerance, then the correction objective function will be reduced. The objective value is set as the target value. The coefficients of the autoregressive model are fine-tuned, and all compensated sample values ​​are regenerated point by point along the decreasing time direction. The corrected objective function is then tested again. The value of and the magnitude of the target tolerance are used to iterate until the objective function is finally corrected. The value is less than the target tolerance, or the maximum number of iterations is reached. In this embodiment, the target tolerance can be 0.05, and the maximum number of iterations can be set to 10. The reason for setting this iterative correction mechanism in this embodiment is that the autoregressive model coefficients solved by the Burg algorithm are the best fit to the reliable observation sequence in a statistical sense, but this purely statistically optimal solution may not exactly satisfy the two-sided constraints imposed by the physical boundary conditions. By quantifying the two-sided constraints into a computable objective function and performing closed-loop iterative adjustment on the model coefficients, the final reconstructed waveform is made to be consistent with the time-domain structure of the reliable observation sequence at the statistical level, and strictly satisfy the splicing boundary conditions at the physical level, thus achieving a unity of statistical optimality and physical rationality.

[0076] The normal waveform template is stored under steady-state grid conditions before the occurrence of an abnormal event, and the fundamental amplitude and frequency recorded therein reflect the steady-state operating conditions. However, the abnormal event itself may be accompanied by significant changes in voltage amplitude (such as voltage sags) or shifts in fundamental frequency (such as frequency fluctuations during system oscillations). If the steady-state template is used directly as the anchor point for the double-ended constraints without distinction, there may be a systematic deviation between the template and the current actual signal state. If the steady-state template is used directly as the absolute reference for the double-ended constraints in step S4 without distinction, the constraint conditions themselves will contain inherent errors, resulting in the reconstructed waveform not being optimally matched with the historical waveform at the junction, affecting the reconstruction accuracy. Therefore, this embodiment further includes a step of first determining the event type and then performing a corresponding adaptive transformation on the template before performing the reverse recursive prediction in step S4. The specific content is as follows:

[0077] Based on the waveform characteristics of the first few cycles of the reliable observation sequence, the type of abnormal event corresponding to this wake-up is determined. Step S3 has already obtained the reliable observation sequence, which directly reflects the true state of the power grid after the abnormal event occurs. The first one to two complete power frequency cycles of this sequence are taken, and their key characteristic parameters, including the root mean square (RMS) voltage value and fundamental frequency, are calculated. These two characteristic parameters are compared with the corresponding parameters of the normal waveform template stored in step S1 to determine the event type. The normal waveform template stores the steady-state RMS voltage value and the steady-state fundamental frequency. The steady-state RMS voltage value can be calculated from the fundamental amplitude and harmonic amplitude. Then, a voltage sag judgment threshold can be set, for example, to 0.9, and a frequency offset judgment threshold can be set, for example, to 0.1Hz. If the steady-state RMS voltage value is less than the product of the voltage sag judgment threshold and the frequency offset judgment threshold, then a voltage sag or short-term interruption event is determined to have occurred. If the fundamental frequency... With the fundamental frequency of the power grid If the absolute value of the difference is greater than the frequency offset judgment threshold, then a frequency offset event is determined to have occurred; both events may occur simultaneously.

[0078] Subsequently, based on the judgment result, an adaptive transformation is performed on the normal waveform template. If the abnormal event is determined to be a voltage sag or short-term interruption, the waveform shape of the terminal waveform sequence in the normal waveform template is kept unchanged, and its fundamental amplitude is scaled proportionally to the ratio of the current fundamental amplitude of the reliable observation sequence to the fundamental amplitude of the normal waveform template to obtain the final terminal waveform sequence. If the abnormal event is determined to be a frequency offset, the scaling factor is obtained by calculating the ratio of the fundamental frequency of the reliable observation sequence to the fundamental frequency of the normal waveform template. ,Right now Then through the scaling factor A time-domain scaling transform is performed on the terminal waveform sequence in the normal waveform template to obtain the final terminal waveform sequence. The purpose of this transform is to align the period of the template with the actual period of the current signal. The scaling factor is calculated. Then, by analyzing the original end waveform sequence Perform interpolation resampling, that is, use the time coordinates of the original sequence. Based on this, generate new time coordinates. The waveform values ​​at the new time coordinates are obtained by Lagrange interpolation or sinc interpolation, forming the final end waveform sequence after transformation.

[0079] S5. Concatenate the distortion interval compensation sequence and the reliable observation sequence sequentially according to their sampling times to form a complete waveform sequence starting from the wake-up time and covering the entire duration of the abnormal event. It should be noted that if the duration of the abnormal event exceeds the length M of the reliable observation sequence, the complete waveform sequence should continue to be concatenated with the sampled values ​​of the subsequent ADC outputs until the abnormal event ends and the energy meter returns to normal. All subsequent concatenated sampled values ​​are stable ADC outputs and do not require compensation. Then, based on the voltage and corresponding current sampled values ​​in this complete waveform sequence, perform a power dot product operation and integrate over time to calculate the active energy increment during the abnormal event. Finally, accumulate the calculated energy increment into the total energy register to complete the complete energy metering process during the abnormal event. Since the waveform in the distortion interval has already undergone high-precision reconstruction in step S4, The error between the actual waveform and the actual waveform has been controlled within the tolerance range. Therefore, the accuracy of the power increment is no longer affected by the transient setup process of the ADC power-on. Its error sources are limited to the conventional quantization error and algorithm numerical calculation error after the ADC stabilizes, thereby improving the accuracy of power measurement for short-term abnormal events during the ADC transient setup process.

[0080] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0081] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. Since the above embodiments are substantially similar to the method embodiments, their descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0082] The above embodiments provide a detailed description of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A low-power metering method driven by an abnormal event of an electricity meter, characterized in that, Includes the following steps: S1. When the electricity meter is in normal metering state, collect electrical signals and periodically update the stored normal waveform template; The normal waveform template includes at least an end waveform sequence consisting of L consecutive voltage sampling point values ​​at its end and the fundamental phase corresponding to that end; S2. When an abnormal event triggers wake-up, calculate the short-time energy and normalized variance of the initial sampling sequence of the analog-to-digital converter (ADC) after power-on, and define the leading distortion interval from the wake-up time to the stable output time of the ADC. S3. Take a series of sampling points of length M located after the leading distortion interval as a reliable observation sequence, extract the fundamental instantaneous phase of the reliable observation sequence at the first sampling point as the reliable starting phase, and estimate its fundamental frequency. S4. Taking the first sampling point of the reliable observation sequence as the starting point of the recursion, and taking the reliable starting phase and fundamental frequency as the initial conditions, perform reverse recursive prediction point by point along the time decreasing direction to generate the compensation sampling value at the corresponding time to obtain the distortion interval compensation sequence; the reverse recursive prediction is performed under the following two-end constraints: the fundamental phase of the recursive endpoint compensation value must be continuous with the fundamental phase at the end of the normal waveform template, and the waveform envelope obtained by splicing the recursive endpoint compensation value and the end waveform sequence is smooth; S5. The distortion interval compensation sequence and the reliable observation sequence are spliced ​​together in chronological order to form a complete waveform sequence and power integration is performed to obtain the power increment during the abnormal event, which is then added to the total power.

2. The low-power metering method according to claim 1, characterized in that, Step S2 specifically includes the following steps: When an abnormal event triggers a wake-up, the initial sampling sequence of the analog-to-digital converter (ADC) output after power-on is obtained. A sliding window of a preset length with a sliding step size of 1 is set on the initial sampling sequence. The sliding window slides from the first sampling point to the current time, and the short-time energy and normalized variance of the sliding window with each sampling point as the initial point are calculated point by point. The short-time energy is the sum of the squares of the voltage values ​​of each sampling point in the sliding window. The normalized variance is the ratio of the variance of each sampling point in the sliding window to the average power of each sampling point in the sliding window. Set a noise energy threshold and a variance stability threshold. Then, in chronological order, take the first sampling point whose short-term energy is greater than the noise energy threshold and whose normalized variance of the sliding window corresponding to its subsequent multiple consecutive sampling points is less than the variance stability threshold as the end point of the leading distortion interval, and take the wake-up time of the analog-to-digital converter (ADC) as the starting point of the leading distortion interval.

3. The low-power metering method according to claim 1, characterized in that, In step S1, the normal waveform template also includes the amplitudes of each harmonic of the voltage and current and their phase shifts relative to the fundamental wave; In step S4, the reverse recursive prediction uses the amplitude of each harmonic of voltage and current in the normal waveform template and its phase shift relative to the fundamental wave as prior information to constrain the amplitude ratio and phase relationship of each harmonic in the generated distortion interval compensation sequence to be consistent with the normal waveform template.

4. The low-power metering method according to claim 3, characterized in that, In step S4, the specific steps of the reverse recursive prediction are as follows: Calculate the autocorrelation coefficient of the reliable observation sequence in forward time order; The reflection coefficient and autoregressive model coefficient are recursively solved based on the autocorrelation coefficient, so as to minimize the sum of the forward prediction error power and the backward prediction error power; Taking the first sampling point of the reliable observation sequence as the starting point of the recursion, along the direction of time decrease, the compensation sampling value is generated point by point using the autoregressive model coefficients according to the forward prediction formula; Calculate the phase deviation between the fundamental phase of the recursive endpoint compensation value and the fundamental phase at the end of the normal waveform template, as well as the difference between the first derivative of the envelope at the splicing point of the recursive endpoint compensation value and the end waveform sequence. Using the weighted sum of the phase deviation and the difference of the first derivative of the envelope as the correction target, the coefficients of the autoregressive model are iteratively adjusted, and then the point-by-point generation of compensation sampling values ​​is re-executed until the weighted sum is lower than the preset tolerance or the preset maximum number of iterations is reached.

5. The low-power metering method according to claim 1, characterized in that, In step S4, the waveform envelope smoothing obtained by concatenating the recursive endpoint compensation value with the terminal waveform sequence specifically refers to: The spliced ​​sequence is obtained by concatenating the recursive endpoint compensation value with the terminal waveform sequence; Extract the waveform envelope of the spliced ​​sequence, and calculate the approximate value of the first derivative of the envelope at the sampling point before the splicing point and the approximate value of the first derivative of the envelope at the sampling point after the splicing point. Make the absolute value of the difference between the two less than the envelope smoothing tolerance so that the waveform envelope obtained by splicing is smooth.

6. The low-power metering method according to claim 1, characterized in that, Before performing the reverse recursive prediction in step S4, the following steps are also included: Based on the waveform characteristics of the first few cycles of the reliable observation sequence, determine the type of abnormal event corresponding to this wake-up; If the abnormal event is determined to be a voltage dip or short-term interruption, the waveform shape of the end waveform sequence in the normal waveform template is kept unchanged, and its fundamental amplitude is scaled proportionally to the ratio of the current fundamental amplitude of the reliable observation sequence to the fundamental amplitude of the normal waveform template to obtain the final end waveform sequence. If the abnormal event is determined to be of the frequency offset type, then the time-domain scaling transformation of the end waveform sequence in the normal waveform template is performed according to the ratio of the fundamental frequency of the reliable observation sequence to the fundamental frequency of the normal waveform template to obtain the final end waveform sequence.

7. The low-power metering method according to claim 1, characterized in that, In step S1, the specific steps for periodically updating the stored normal waveform template include: During a continuous period when the power grid is detected to be operating in a steady state and no abnormal events have occurred, the fundamental frequency, fundamental amplitude, and phase difference of the voltage and current signals collected at the current moment are extracted, and the values ​​of multiple consecutive voltage sampling points at the end are extracted as the current end waveform sequence. Using an exponentially weighted moving average method, the fundamental frequency voltage fundamental amplitude, current fundamental amplitude, phase difference, terminal fundamental phase, and the value of each sampling point in the terminal waveform sequence stored in the normal waveform template are updated according to the weighted sum of the corresponding parameter values ​​stored in the template and the corresponding parameter values ​​extracted at the current time.