An electricity metering method and metering box

By using a dynamic mirror continuation method driven by instantaneous frequency and VMD decomposition, the problem of phase reversal point distortion caused by changes in the position of non-steady-state harmonic extrema in traditional mirror continuation is solved, thereby improving the accuracy of power metering.

CN120993036BActive Publication Date: 2026-05-26ZHEJIANG GUANGLIANG ELECTRICAL CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG GUANGLIANG ELECTRICAL CO LTD
Filing Date
2025-08-21
Publication Date
2026-05-26

Smart Images

  • Figure CN120993036B_ABST
    Figure CN120993036B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for metering unsteady-state harmonic energy based on dynamic mirror extension, relating to the field of energy metering technology. The method extracts the instantaneous frequency of the unsteady-state harmonic signal through Hilbert transform, calculates the optimal reversal point spacing, and sets reversal points only at integer multiples of the optimal reversal point spacing. This solves the problem of phase reversal point distortion caused by the frequency variation of unsteady-state harmonic extrema in traditional mirror extension, effectively suppressing the endpoint effect, improving the signal-to-noise ratio of the extension segment, and enhancing the accuracy of energy metering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electrical energy metering technology, and in particular to a nonsteady-state harmonic electrical energy metering method and system based on dynamic mirror extension. Background Technology

[0002] In the process of electricity metering, unstable harmonics can significantly affect metering accuracy. To address this issue, existing technologies employ a VMD algorithm with adaptive penalty factors and mode numbers to accurately separate the fundamental and transient harmonic components of unsteady-state signals.

[0003] However, non-steady-state harmonics will generate spurious modal components at the signal cutoff boundary. The adaptive process will amplify the endpoint effect due to the frequent adjustment of the penalty factor and the number of modes. Specifically, the endpoint effect will be repeatedly introduced and spurious components will be misidentified as real harmonics.

[0004] To address the aforementioned endpoint effect problem, existing technologies employ a mirror extension method based on dynamic mirror length to suppress it. However, traditional mirror extension performs phase reversal at signal extrema, and the extrema positions of non-steady-state harmonics vary with frequency, leading to amplified distortion at the phase reversal points. Specifically, for low-frequency harmonics, the large spacing between extrema causes spurious envelope fluctuations in the extension segment; for high-frequency harmonics, the dense concentration of extrema intensifies high-frequency oscillations at the reversal points. Ultimately, these issues degrade the signal-to-noise ratio of the extension segment, contaminate the original signal, and affect the accuracy of power metering. Summary of the Invention

[0005] The present invention aims to solve the technical problem in the prior art that, in the process of non-steady-state harmonic energy metering, the traditional mirror extension method is used, which causes the distortion of the phase reversal point due to the change of the extreme point position of the non-steady-state harmonic with the frequency, resulting in the deterioration of the signal-to-noise ratio of the extension section and the pollution of the original signal.

[0006] A dynamic mirror extension energy metering method based on instantaneous frequency driving, characterized in that it includes:

[0007] Sampling steps: Sample the grid voltage signal at a sampling rate Fs to obtain a discrete signal x(n), n = 0,…,N–1, where x(n) is the discrete voltage signal and N is the number of sampling points;

[0008] Instantaneous frequency extraction step: Perform Hilbert transform on the discrete signal x(n) to obtain the analytic signal z(n), and calculate the instantaneous frequency f_i(n);

[0009] The optimal reversal point spacing calculation steps are as follows: Calculate the optimal reversal point spacing D_opt(n) based on the instantaneous frequency f_i(n);

[0010] Dynamic mirror extension step: Set a phase reversal point only at a distance of k·D_opt(n) from the signal endpoint, where k is a positive integer, and perform mirror extension on the discrete signal to obtain the extended signal x_ext(m), m = 0,…,N'–1, where N'=N+2 D_opt(n);

[0011] Variational Mode Decomposition Steps: Perform VMD decomposition on the extended signal x_ext(m), and adaptively adjust the penalty factor α and the number of modes K in the VMD decomposition algorithm to separate the fundamental component and the transient harmonic component;

[0012] Electricity metering steps: Calculate the electricity metering results based on the separated fundamental component.

[0013] The optimal reversal point spacing D_opt(n) is determined according to the following formula: D_opt(n) = round(Fs / (2·f_i(n))), where round(·) means rounding to the nearest integer.

[0014] In the variational mode decomposition step, the penalty factor α and the number of modes K are updated online iteratively using the BFGS optimization algorithm to minimize the sum of envelope entropy and reconstruction error.

[0015] The energy metering step mentioned above includes:

[0016] Perform a full-wave Fourier transform on the fundamental component to extract the fundamental amplitude and phase;

[0017] Calculate the active power P and reactive power Q based on the fundamental amplitude and phase;

[0018] The active power P is integrated over time to obtain the energy metering result E.

[0019] A dynamic mirror extension energy metering device based on instantaneous frequency driving, characterized in that it comprises:

[0020] The sampling module is configured to sample the grid voltage signal at a sampling rate Fs to obtain a discrete signal x(n), where x(n) is the discrete voltage signal and N is the number of sampling points;

[0021] The instantaneous frequency calculation module is configured to extract the instantaneous frequency f_i(n) of the discrete signal x(n) based on the Hilbert transform;

[0022] The dynamic mirror extension module is configured to calculate the optimal inversion point spacing D_opt(n) based on the instantaneous frequency f_i(n), and set the phase inversion point only at a distance of k·D_opt(n) from the signal endpoint to perform mirror extension, thereby obtaining the extended signal x_ext(m), m = 0,…,N'–1, where N'=N+2 D_opt(n);

[0023] The variational mode decomposition module is configured to perform VMD processing on the extended signal x_ext(m), and adaptively adjust the penalty factor α and the number of modes K in the VMD decomposition algorithm to separate the fundamental component and the transient harmonic component.

[0024] The metering module is configured to calculate the energy metering results based on the separated fundamental component.

[0025] Beneficial effects:

[0026] This invention extracts the instantaneous frequency of unsteady harmonic signals using Hilbert transform, calculates the optimal reversal point spacing, and sets reversal points only at integer multiples of this spacing. This effectively solves the problem of phase reversal point distortion caused by the frequency variation of unsteady harmonic extrema in traditional mirror extension. For low-frequency harmonics, it avoids spurious envelope fluctuations in the extension section; for high-frequency harmonics, it reduces the aggravation of high-frequency oscillations at the reversal points, thereby improving the signal-to-noise ratio of the extension section, reducing contamination of the original signal, and improving the accuracy of power metering.

[0027] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0028] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which:

[0029] Figure 1 is a flowchart of an exemplary electricity metering method of this application. Detailed Implementation

[0030] The present application is described below based on embodiments, but it is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.

[0031] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.

[0032] like Figure 1 As shown, this application provides a dynamic mirror extension energy metering method based on instantaneous frequency driving, comprising:

[0033] Sampling steps: Sample the grid voltage signal at a sampling rate Fs to obtain a discrete signal x(n), n = 0,…,N–1, where x(n) is the discrete voltage signal and N is the number of sampling points;

[0034] Instantaneous frequency extraction step: Perform Hilbert transform on the discrete signal x(n) to obtain the analytic signal z(n), and calculate the instantaneous frequency f_i(n);

[0035] The optimal reversal point spacing calculation steps are as follows: Calculate the optimal reversal point spacing D_opt(n) based on the instantaneous frequency f_i(n);

[0036] Dynamic mirror extension step: Set a phase reversal point only at a distance of k·D_opt(n) from the signal endpoint, where k is a positive integer, and perform mirror extension on the discrete signal to obtain the extended signal x_ext(m), m = 0,…,N'–1, where N'=N+2 D_opt(n);

[0037] Variational Mode Decomposition Steps: Perform VMD decomposition on the extended signal x_ext(m), and adaptively adjust the penalty factor α and the number of modes K in the VMD decomposition algorithm to separate the fundamental component and the transient harmonic component;

[0038] Electricity metering steps: Calculate the electricity metering results based on the separated fundamental component.

[0039] The optimal reversal point spacing D_opt(n) is determined according to the following formula: D_opt(n) = round(Fs / (2·f_i(n))), where round(·) means rounding to the nearest integer.

[0040] In the variational mode decomposition step, the penalty factor α and the number of modes K are updated online iteratively using the BFGS optimization algorithm to minimize the sum of envelope entropy and reconstruction error.

[0041] The energy metering step mentioned above includes:

[0042] Perform a full-wave Fourier transform on the fundamental component to extract the fundamental amplitude and phase;

[0043] Calculate the active power P and reactive power Q based on the fundamental amplitude and phase;

[0044] The active power P is integrated over time to obtain the energy metering result E.

[0045] A dynamic mirror extension energy metering device based on instantaneous frequency driving, characterized in that it comprises:

[0046] The sampling module is configured to sample the grid voltage signal at a sampling rate Fs to obtain a discrete signal x(n), where x(n) is the discrete voltage signal and N is the number of sampling points;

[0047] The instantaneous frequency calculation module is configured to extract the instantaneous frequency f_i(n) of the discrete signal x(n) based on the Hilbert transform;

[0048] The dynamic mirror extension module is configured to calculate the optimal inversion point spacing D_opt(n) based on the instantaneous frequency f_i(n), and set the phase inversion point only at a distance of k·D_opt(n) from the signal endpoint to perform mirror extension, thereby obtaining the extended signal x_ext(m), m = 0,…,N'–1, where N'=N+2 D_opt(n);

[0049] The variational mode decomposition module is configured to perform VMD processing on the extended signal x_ext(m), and adaptively adjust the penalty factor α and the number of modes K in the VMD decomposition algorithm to separate the fundamental component and the transient harmonic component.

[0050] The metering module is configured to calculate the energy metering results based on the separated fundamental component.

[0051] The present invention will be further described in detail below with reference to specific embodiments.

[0052] Example:

[0053] S1. Sampling: The grid voltage is synchronously sampled at 12.8 kHz to obtain the discrete signal x(n).

[0054] S2. Instantaneous Frequency Extraction: Perform a Hilbert transform on x(n) to obtain the analytic signal z(n), and calculate the instantaneous frequency.

[0055] f_i(n) = (1 / 2π) · d[arg(z(n))] / dn

[0056] S3. Calculation of optimal reversal point spacing:

[0057] D_opt(n) = round( Fs / (2 · f_i(n)) )

[0058] Where Fs is the sampling rate.

[0059] S4. Dynamic Mirror Extension: If the current data segment length is N, then the extended length N′ = N + 2 D_opt(n).

[0060] S5.VMD Decomposition:

[0061] Initialize the penalty factor α and the number of modes K in the VMD algorithm;

[0062] The Broyden-Fletcher-Goldfarb-Shanno (BFGS) method is used to iteratively and adaptively update α and K.

[0063] The fundamental component IMF1 and harmonic components IMF2…IMFK are obtained.

[0064] S6. Metering: Perform a full-wave Fourier transform on IMF1 to calculate active / reactive energy.

[0065] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the specific details described above.

[0066] 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. For system embodiments, since they largely correspond to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0067] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0068] It should also be noted that in the apparatus, devices, and methods of this disclosure, the components or steps are decomposable and / or recombinable. Such decomposition and / or recombination should be considered equivalent to the present disclosure. The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0069] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

[0070] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A dynamic mirror extension energy metering method based on instantaneous frequency driving, characterized in that, include: Sampling steps: Sample the grid voltage signal at a sampling rate Fs to obtain a discrete signal x(n), n = 0,...,N-1, where x(n) is the discrete voltage signal and N is the number of sampling points; Instantaneous frequency extraction step: Perform Hilbert transform on the discrete signal x(n) to obtain the analytic signal z(n), and calculate the instantaneous frequency f_i(n); The optimal reversal point spacing calculation steps are as follows: Calculate the optimal reversal point spacing D_opt(n) based on the instantaneous frequency f_i(n); Dynamic mirror extension step: Set a phase reversal point only at a distance of k·D_opt(n) from the signal endpoint, where k is a positive integer, and perform mirror extension on the discrete signal to obtain the extended signal x_ext(m), m = 0,...,N'-1, where N'=N+2 D_opt(n); Variational Mode Decomposition Steps: Perform VMD decomposition on the extended signal x_ext(m), and adaptively adjust the penalty factor α and the number of modes K in the VMD decomposition algorithm to separate the fundamental component and the transient harmonic component; Energy metering steps: Calculate the energy metering results based on the separated fundamental component; The optimal reversal point spacing D_opt(n) is determined according to the following formula: D_opt(n) = round(Fs / (2·f_i(n))), where round(·) means rounding to the nearest integer.

2. The method according to claim 1, wherein in the variational mode decomposition step, the penalty factor α and the number of modes K are updated online iteratively using the BFGS optimization algorithm to minimize the sum of envelope entropy and reconstruction error.

3. The method according to claim 2, wherein the energy metering step comprises: Perform a full-wave Fourier transform on the fundamental component to extract the fundamental amplitude and phase; Calculate the active power P and reactive power Q based on the fundamental amplitude and phase; The active power P is integrated over time to obtain the energy metering result E.

4. A dynamic mirror-extended energy metering device based on instantaneous frequency driving, characterized in that, include: The sampling module is configured to sample the grid voltage signal at a sampling rate Fs to obtain a discrete signal x(n), where x(n) is the discrete voltage signal and N is the number of sampling points; The instantaneous frequency calculation module is configured to extract the instantaneous frequency f_i(n) of the discrete signal x(n) based on the Hilbert transform; The dynamic mirror extension module is configured to calculate the optimal reversal point spacing D_opt(n) based on the instantaneous frequency f_i(n), and set phase reversal points only at positions k·D_opt(n) from the signal endpoint to perform mirror extension, thereby obtaining the extended signal x_ext(m), m = 0,...,N'-1, where N'=N+2 D_opt(n); wherein the optimal reversal point spacing D_opt(n) is determined according to the following formula: D_opt(n) = round(Fs / (2·f_i(n))), where round(·) represents rounding to the nearest integer; the variational mode decomposition module is configured to perform VMD processing on the extended signal x_ext(m), adaptively adjusting the penalty factor α and the number of modes K in the VMD decomposition algorithm to separate the fundamental component and the transient harmonic component; The metering module is configured to calculate the energy metering results based on the separated fundamental component.

5. An electricity metering box, comprising a memory and a processor, wherein computer instructions on the memory are executed by the processor, causing the processor to implement the method as described in any one of claims 1 to 3.

6. A computer-readable storage medium storing a processor-executable program, characterized in that: The processor-executable program, when executed by the processor, is used to implement the method as described in any one of claims 1 to 3.