Digital electric energy metering method and device based on window function and electronic equipment

By using Hanning's double-window function and full-phase FFT algorithm in the electrical energy metering, combining polynomial approximation and adaptive least squares algorithm, the problems of low accuracy and insufficient adaptability in the existing technology are solved, and more efficient electrical energy metering is achieved.

CN119757930APending Publication Date: 2025-04-04BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510007068.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the prior art, the dual-spectral line interpolation FFT algorithm based on Nuttall windows has weak main lobe performance in electrical energy metering, low calculation accuracy, and insufficient ability to suppress spectrum leakage. At the same time, when the input signal is noise-free under on-site conditions, the algorithm error is large, and the adaptability needs to be improved.

Method used

The Hanning double-window function is used to sample the electrical energy signal, combined with the full-phase FFT algorithm and polynomial approximation single-spectral line interpolation technology, the weight of each harmonic in the spectrum information is adjusted through the recursive least squares algorithm of the adaptive variable forgetting factor to obtain the electrical energy signal used for measurement.

Benefits of technology

It improves the main lobe performance and calculation accuracy of the electrical energy signal, enhances the spectrum leakage suppression ability, and improves the field adaptability and accuracy of the electrical energy metering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119757930A_ABST
    Figure CN119757930A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a digital electric energy metering method and device based on a window function and electronic equipment, and relates to the technical field of electric energy metering. The method comprises the following steps: intercepting an electric energy signal from a monitoring signal by adopting a Hanning double-window function, and obtaining frequency spectrum information of the electric energy signal; correcting the amplitude of inter-harmonics in the frequency spectrum information based on the maximum spectral line in the frequency spectrum information; adjusting the weight of each harmonic wave in the frequency spectrum information through a least square algorithm based on a variable forgetting factor to obtain an adjusted electric energy signal; and inputting the adjusted electric energy signal into a self-adaptive linear combiner to obtain an electric energy signal for metering. According to the implementation mode provided by the invention, analog-to-digital conversion in electric energy metering is avoided, and meanwhile, better dynamic performance and metering precision are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electric energy metering, and in particular to a digital electric energy metering method based on a window function, a digital electric energy metering device based on a window function, an electronic device and a corresponding storage medium. Background Art

[0002] At present, there is a digital energy metering system that measures energy through an energy meter, a control center, and a cloud server. The energy meter includes a metering module, a processing module, a communication module, and a power module for supplying power to the internal components of the energy meter. The metering module samples the voltage and current in the power grid based on the voltage sampling circuit and the current sampling circuit, and calculates the sampled voltage and current through the improved energy metering algorithm to obtain the energy parameters. The processing module is used to obtain the energy parameters calculated by the metering module, and send the energy parameters to the control center and the cloud server through the communication module, and the cloud server stores the energy parameters. However, this method still requires an analog-to-digital converter to convert the analog signal into a digital signal.

[0003] In the prior art, there is a dual-line interpolation FFT algorithm based on the Nuttall window for measuring electric energy. However, the use of the Nuttall window to collect and process the electric energy signal in this scheme results in weak main lobe performance and low calculation accuracy. The ability of the dual-line interpolation FFT algorithm to suppress spectrum leakage needs to be improved.

[0004] In addition, the prior art also provides an electric energy metering system based on digital services, which is formed by combining multiple modules, using the metering module to sample the electric energy signal, combining with the ADC to convert the analog signal into a digital signal, and then calculating the numerical value of the electric energy parameter obtained by integral approximate calculation; at the same time, due to the fact that under field conditions, when the input signal contains noise, the algorithm error is large, and the field adaptability of this electric energy metering algorithm needs to be further improved. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a digital electric energy metering method, device and electronic device based on a window function, which directly performs electric energy metering by digitalizing the data processing of the electric energy signal, and adopts technical means such as Hanning double window, polynomial approximation and single spectrum line interpolation full-phase FFT algorithm, adaptive variable forgetting factor recursive least squares algorithm, etc., to at least solve some of the problems in the background technology.

[0006] In order to achieve the above object, the present application provides a digital electric energy metering method based on a window function, the method comprising:

[0007] The electric energy signal is intercepted from the monitoring signal by using a Hanning double window function to obtain the spectrum information of the electric energy signal; the amplitude of the interharmonics in the spectrum information is corrected based on the maximum spectrum line in the spectrum information; the weight of each harmonic in the spectrum information is adjusted by a least squares algorithm based on a variable forgetting factor to obtain an adjusted electric energy signal; the adjusted electric energy signal is input into an adaptive linear combiner to obtain an electric energy signal for measurement.

[0008] Optionally, acquiring the frequency spectrum information of the electric energy signal includes: using full-phase Fourier transform to obtain a single-frequency negative exponential sequence of the electric energy signal.

[0009] Optionally, the amplitude of the interharmonics in the spectrum information is corrected based on the maximum spectrum line in the spectrum information, including: determining the spectrum line closest to the desired interharmonic peak point by a polynomial approximation method; determining the interharmonic amplitude based on the determined spectrum line and using a single-peak spectrum line interpolation algorithm; and using the obtained interharmonic amplitude as the corrected interharmonic amplitude.

[0010] Optionally, the weight of each harmonic in the spectrum information is adjusted by a least squares algorithm based on a variable forgetting factor to obtain an adjusted electric energy signal, including: taking the single-frequency negative exponential sequence as a reference signal, determining the initial weight coefficient corresponding to the single-frequency negative exponential sequence of each order harmonic of the reference signal; obtaining the original sound signal according to the reference signal and the current weight coefficient, obtaining the expected signal according to the reference signal and a filtering channel function based on the harmonic order, adjusting the weight coefficient corresponding to the filtering channel function of each order harmonic according to the error between the original sound signal and the expected signal and the least squares algorithm; the adjustment of the weight coefficient is based on a variable forgetting factor; taking the adjusted weight coefficient as the current weight coefficient, repeating the previous step until the end condition is met; obtaining the adjusted electric energy signal based on the filtering channel function of each order harmonic and the weight coefficient when the end condition is met.

[0011] Optionally, determining the initial weight coefficient corresponding to the single-frequency negative exponential sequence of each order harmonic of the reference signal includes: determining the weight coefficient of the single-frequency negative exponential sequence of each order harmonic in the reference signal according to the weight coefficient of the single-frequency negative exponential sequence of the adjacent low-order harmonic, the gain vector and the prior error.

[0012] Optionally, the variable forgetting factor is a function with the harmonic order as the independent variable.

[0013] Optionally, the function with the harmonic order as the independent variable includes: an exponential function with the error signal corresponding to the harmonic order as the exponent.

[0014] Optionally, the adjusted electric energy signal is input into an adaptive linear combiner to obtain an electric energy signal for metering, including: determining an initial weighting coefficient of the linear combiner, wherein the initial weighting coefficient corresponds to a signal source equivalent to each harmonic signal in the linear combiner; inputting the adjusted electric energy signal into the linear combiner including the current weighting coefficient to obtain a corresponding output, adjusting the current weighting coefficient with the minimum mean square error between the input signal and the output signal of the linear combiner as the objective function to obtain an adjusted weighting coefficient; using the adjusted weighting coefficient as the current weighting coefficient, repeating the previous step until an end condition is met; determining the amplitude and phase of each harmonic with the weighting coefficient when the end condition is met to obtain an electric energy signal for metering.

[0015] Optionally, the amplitude and phase of each harmonic are determined by the weighting coefficient when the termination condition is reached, including: the amplitude of the nth-order harmonic is determined according to the sum of the squares of the value numbered 2n-1 and the value numbered 2n in the weighting coefficient; the phase of the nth-order harmonic is determined according to the ratio of the value numbered 2n-1 to the value numbered 2n in the weighting coefficient.

[0016] The present application also provides a digital electric energy metering device based on a window function, which includes: a spectrum acquisition module, which is used to extract an electric energy signal from a monitoring signal using a Hanning double window function to obtain spectrum information of the electric energy signal; an amplitude correction module, which is used to correct the amplitude of the interharmonics in the spectrum information based on the maximum spectrum line in the spectrum information; a weight adjustment module, which is used to adjust the weight of each harmonic in the spectrum information through a least squares algorithm based on a variable forgetting factor to obtain an adjusted electric energy signal; and a linear combination module, which is used to input the adjusted electric energy signal into an adaptive linear combiner to obtain an electric energy signal for metering.

[0017] The present application also provides an electronic device, comprising: at least one processor; a memory connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the aforementioned window function-based digital electric energy metering method by executing the instructions stored in the memory.

[0018] The present application also provides a machine-readable storage medium, on which instructions are stored. When the instructions are executed by a processor, the processor is configured to execute the aforementioned window function-based digital electric energy metering method.

[0019] The present application also provides a computer program product, including a computer program, which implements the aforementioned window function-based digital electric energy metering method when executed by a processor.

[0020] The above technical solution has the following beneficial effects:

[0021] (1) No analog-to-digital conversion unit is required, only digital quantity reception and electric energy metering algorithm links are required, which simplifies the analog-to-digital processing steps and circuit structure.

[0022] (2) The Hanning double window is used to sample the electric energy signal, so that the collected signal has better main lobe performance.

[0023] (3) The full-phase FFT algorithm that uses polynomial approximation for single spectrum line interpolation has better calculation accuracy and can better suppress spectrum leakage.

[0024] (4) The least squares algorithm and adaptive linear combiner are used to adaptively adjust the coefficient according to the field input signal. It has good tracking performance and convergence, and can ensure the accuracy of electric energy metering.

[0025] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:

[0027] Figure 1 The following is a schematic diagram showing the steps of a digital electric energy metering method based on a window function according to an embodiment of the present application;

[0028] Figure 2 The flowchart of spectrum correction based on Hanning double window according to the embodiment of the present application is schematically shown;

[0029] Figure 3 The schematic diagram of the algorithm flow of the full-phase FFT of the present invention in the embodiment of the present application is shown;

[0030] Figure 4 A schematic diagram of spectral line distribution in spectrum information according to an embodiment of the present application is shown schematically;

[0031] Figure 5 The schematic diagram schematically shows the principle of adjusting weights according to the least squares algorithm in the implementation manner of the present application;

[0032] Figure 6 A schematic diagram of an implementation step of a digital electric energy metering method based on a window function according to an embodiment of the present application is schematically shown;

[0033] Figure 7 The structure diagram of the digital electric energy metering device based on the window function according to the embodiment of the present application is schematically shown;

[0034] Figure 8 The internal structure of an electronic device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0035] The specific implementation of the embodiment of the present application is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present application, and is not used to limit the embodiment of the present application.

[0036] Figure 1 The following is a schematic diagram showing the steps of a digital electric energy metering method based on a window function according to an embodiment of the present application. Figure 1 As shown, the method includes:

[0037] S01, using a Hanning double window function to extract an electric energy signal from a monitoring signal to obtain spectrum information of the electric energy signal;

[0038] S02. correcting the amplitude of the interharmonics in the spectrum information based on the maximum spectrum line in the spectrum information;

[0039] S03, adjusting the weight of each harmonic in the spectrum information by a least squares algorithm based on a variable forgetting factor to obtain an adjusted electric energy signal;

[0040] S04. Inputting the adjusted electric energy signal into an adaptive linear combiner to obtain an electric energy signal for metering.

[0041] The time domain discrete function of the Hanning double window function in step S01 is:

[0042] w Han =0.5-0.5cos(2πn / N),(n=0,1,…,N-1);

[0043] Under real load conditions, after receiving the signal transmitted by the monitoring device in the substation, the data source has a large harmonic content, and the signal is intercepted through the Hanning double window function. Figure 2 The schematic diagram of the process flow of spectrum correction based on Hanning double window according to the implementation mode of the present application is shown as follows: Figure 2 As shown in the figure, after the harmonic signal is transformed by Hanning double window and Fourier transform, the amplitude A0, frequency ω0 and phase in the spectrum information can be obtained. It can be seen that the Hanning double window can reduce the impact of spectrum leakage, reduce noise and frequency fluctuation. In the field of electric energy calculation, the present invention uses the Hanning double window function sampling to perform spectrum correction on the electric energy signal, which has better anti-noise ability.

[0044] In step S02, the spectrum line with the maximum amplitude in the discrete spectrum of the carrier signal is searched for, and the amplitude correction is performed based on it, and the carrier amplitude of the carrier signal of the acquisition device communication is estimated, while effectively overcoming interference problems such as harmonics and random noise.

[0045] In step S03 and step S04, the least squares algorithm with adaptive variable forgetting factor and adaptive linear combiner are used to measure the electric energy in the field of electric energy calculation, which significantly improves the measurement accuracy of the electric energy signal. The least squares algorithm in this application is preferably a recursive least squares algorithm.

[0046] Through the above implementation, the electric energy metering does not need an analog-to-digital conversion unit, only digital quantity reception and electric energy metering algorithm links. The implementation in this application directly performs the electric energy metering link, does not need an analog-to-digital conversion unit, and simplifies the metering circuit structure. The implementation of this application adopts an adaptive variable forgetting factor recursive least squares algorithm, which can adaptively adjust the coefficient according to the field input signal, has good tracking performance and convergence, and can ensure the accuracy of electric energy metering. In summary, the electric energy metering algorithm proposed in the implementation of this application has good field adaptability and metering accuracy.

[0047] In some implementations of the present application, acquiring the frequency spectrum information of the electric energy signal includes: using full-phase Fourier transform to obtain a single-frequency negative exponential sequence of the electric energy signal. Figure 3 The schematic diagram of the algorithm flow of the full-phase FFT of the present invention in the embodiment of the present application is shown schematically. Figure 3 As shown in the figure, the signal collected by the Hanning window is transformed by fast full-phase Fourier transform, and the single-frequency negative exponential sequence sampled by the window function is:

[0048]

[0049] Where ω0 is the digital angular frequency of the sequence, Represents the initial phase of the sequence, and A is the sequence amplitude. When the sequence x(n) is subjected to windowed FFT and double-window apFFT (all-phase Fast Fourier Transform), the window in the windowed FFT is a non-rectangular window, and the observation interval of the FFT is n∈[0, N-1]; the double window in the double-window apFFT is a convolution window of two non-rectangular windows, and the observation interval of the apFFT is n∈[-N+1, N-1].

[0050] In some embodiments of the present application, the amplitude of the interharmonics in the spectrum information is corrected based on the maximum spectrum line in the spectrum information, including: determining the spectrum line closest to the desired interharmonic peak point by a polynomial approximation method; determining the interharmonic amplitude by using a single-peak spectrum line interpolation algorithm based on the determined spectrum line; and using the obtained interharmonic amplitude as the corrected interharmonic amplitude. For example:

[0051] The discrete spectra of the double-window apFFT are:

[0052] Figure 4 The following schematically shows the distribution diagram of spectrum lines in the spectrum information according to the implementation mode of the present application. Figure 4 As shown, where k and k( 0,1…n ) represent different spectral lines. The ratio of the side spectral line to the main spectral line is:

[0053]

[0054] y1 is the amplitude of the main spectrum line, and y2 is the amplitude of the side spectrum line.

[0055] Assume k0-k1=±α, then α∈(-1,1). When the window function is the Hanning window, the normalized modulus function of the Hanning window is:

[0056]

[0057] According to the polynomial approximation algorithm, the amplitude correction formula of the main spectral line and the side spectral line can be obtained as follows:

[0058]

[0059] Take k2=k1+1 as an example (k2=k1-1 can be obtained in the same way), that is, k1-k0=-α, we can get:

[0060]

[0061] According to the above analysis, the frequency interpolation correction can be obtained:

[0062]

[0063] Based on the estimated frequency correction, the amplitude of the sequence can be estimated as:

[0064]

[0065] Using apFFT spectrum analysis, the initial phase The estimation of can be directly taken as the phase value on the main spectrum line k1.

[0066] Assume γ = k0-k, and assume that the spectrum line with the largest amplitude is the kth line. If k1 is the spectrum line with the largest amplitude from the peak point, then k is k1, otherwise k is k2. The amplitude correction formula can be converted to:

[0067]

[0068] Taking the polynomial approximation of the denominator λ(γ), the amplitude correction formula is:

[0069] A0"=N -1 ·Y k ·λ(γ)

[0070] The value range of γ is [0.5, 0.5], γ=k0-k. Any set of γ values ​​is substituted into the discrete spectrum part corresponding to the window, and then modified to obtain a set of λ(γ) values. N is the length of the intercepted data interval.

[0071] Through the above implementation method, data correction processing and measurement are performed on the electric energy signal collected by the Hanning double window, which significantly improves the measurement accuracy of the electric energy signal.

[0072] In some embodiments of the present application, the weight of each harmonic in the spectrum information is adjusted by a least squares algorithm based on a variable forgetting factor to obtain an adjusted electric energy signal, including: taking the single-frequency negative exponential sequence as a reference signal, determining the initial weight coefficient corresponding to the single-frequency negative exponential sequence of each order harmonic of the reference signal; obtaining an original sound signal according to the reference signal and a current weight coefficient, obtaining an expected signal according to the reference signal and a filtering channel function based on the harmonic order, adjusting the weight coefficient corresponding to the filtering channel function of each order harmonic according to the error between the original sound signal and the expected signal and the least squares algorithm; the adjustment of the weight coefficient is based on a variable forgetting factor; taking the adjusted weight coefficient as the current weight coefficient, repeating the previous step until the end condition is reached; obtaining the adjusted electric energy signal based on the filtering channel function of each order harmonic and the weight coefficient when the end condition is reached. Figure 5 The schematic diagram schematically shows the principle of adjusting weights using the least squares algorithm in the embodiment of the present application. Figure 5 As shown, d(n) represents the expected signal after X(n) passes through the main channel P(n) for filtering, Y(n) represents the secondary sound signal output by the filter, e(n) represents the residual signal after cancellation, and L is the filter order. The process is as follows:

[0073] Assume that the corrected electric energy single-frequency negative exponential sequence signal is:

[0074]

[0075] The single-frequency negative exponential sequence is expressed as the reference signal:

[0076] X(n)=[x(n),x(n-1),x(n-2)…x(nL)]

[0077] The weight coefficient is expressed as:

[0078] W(n)=[W0(n),W1(n),W2(n)…W L (n)]

[0079] The formula for RLS algorithm update is derived as follows:

[0080] W(n)=W(n-1)+K(n)ξ(n)

[0081]

[0082] e(n)=d(n)-Y(n)=d(n)-W T (n)X(n)

[0083] ξ(n)=d(n)-W T (n-1)X(n)

[0084] Where ξ(n) is the prior error and K(n) is defined as the gain vector:

[0085] K(n)=P(n)X(n)

[0086] The collected reference signal X(n) is filtered to output the original sound signal Y(n). The error signal e(n) is the expected signal d(n) after Y(n) and the residual signal are offset. The reference signal X(n) and the residual signal e(n) are updated through the RLS algorithm to update the adaptive filter tap weight coefficients, and the filter output is adjusted to gradually reduce the error signal e(n) to achieve the purpose of noise reduction.

[0087] In some embodiments of the present application, determining the initial weight coefficient corresponding to the single-frequency negative exponential sequence of each order harmonic of the reference signal includes: determining the weight coefficient of the single-frequency negative exponential sequence of each order harmonic in the reference signal according to the weight coefficient of the single-frequency negative exponential sequence of the adjacent low-order harmonic, the gain vector and the prior error. For example:

[0088] W(n)=W(n-1)+K(n)ξ(n);

[0089] Among them, ξ(n) is the prior error, K(n) is the gain vector, W(n) and W(n-1) are the weight coefficients corresponding to the n-order harmonic and n-1-order harmonic, respectively.

[0090] Assume that the electric energy signal obtained by iterating the adaptive RLS algorithm is expressed as follows:

[0091]

[0092] This implementation method can adaptively adjust the coefficient according to the field input signal through the adaptive RLS algorithm, has good tracking performance and convergence, and can ensure the accuracy of electric energy measurement.

[0093] In some embodiments of the present application, the variable forgetting factor is a function with the harmonic order as an independent variable. Further, the function with the harmonic order as an independent variable includes: an exponential function with the error signal corresponding to the harmonic order as an exponent. The variable forgetting factor can be expressed as:

[0094]

[0095] Among them, 0≤β<1 and α≥0 are artificial control parameters, β is used to control the value range of the function, α is used to control the shape of the function, and 0<λ min =1-β≤1 is the minimum value of the forgetting factor. In the above formula, the variable forgetting factor λ(n) is used to replace the immutable forgetting factor λ, which can better adaptively optimize the weight coefficient W(n).

[0096] In some embodiments of the present application, the adjusted electric energy signal is input into an adaptive linear combiner to obtain an electric energy signal for measurement, including: determining an initial weighting coefficient of the linear combiner, wherein the initial weighting coefficient corresponds to a signal source to which each harmonic signal is equivalent in the linear combiner.

[0097] This embodiment updates the coefficients through an adaptive linear combiner. The power signal obtained after the RLS algorithm based on the variable forgetting factor is corrected is u(n). The input signal u(n) of any sampling point is equivalent to the sampling values ​​of 2N signal sources at time n. The linear combination of each element of the input signal u(n) is equal to the output y(n). It can also be considered that the output at this time is the weighted sum of the input signals. Such a system is called a linear combiner. Its output is:

[0098]

[0099] Where k is the total number of sampling points. The weight coefficient of the linear combiner is expressed as follows:

[0100] w(n)=[w1(n),w2(n),w3(n)…w 2N-1 (n),w 2N (n)] T

[0101] The vector representation of the output y(n) is:

[0102] y(n)=u(n) T w(n)=w(n) T u(n)

[0103] Input the adjusted electric energy signal into the linear combiner including the current weighting coefficient to obtain the corresponding output, and adjust the current weighting coefficient with the minimum mean square error between the input signal and the output signal of the linear combiner as the objective function to obtain the adjusted weighting coefficient; use the adjusted weighting coefficient as the current weighting coefficient and repeat the previous step until the end condition is reached; determine the amplitude and phase of each harmonic with the weighting coefficient when the end condition is reached to obtain the electric energy signal for measurement. The weighting coefficient w is continuously and automatically adjusted through the adaptive algorithm. k (n), k = 1, 2, 3, ..., 2N, so that the mean square error is minimized. This is the adaptive process of the linear combiner. After a period of continuous adjustment, its weight vector is:

[0104] w=[w1,w2,…,w 2n-1 ,w 2n ,…,w 2N-1 ,w 2N ] T

[0105] In the field of electric energy calculation, this implementation adopts an adaptive variable forgetting factor recursive least squares algorithm combined with an adaptive linear combiner to perform electric energy metering, which can ensure the accuracy of electric energy metering.

[0106] In some embodiments of the present application, the amplitude and phase of each harmonic are determined by the weighting coefficient when the termination condition is reached, including: the amplitude of the nth order harmonic is determined according to the square sum of the value numbered 2n-1 and the value numbered 2n in the weighting coefficient; the phase of the nth order harmonic is determined according to the ratio of the value numbered 2n-1 to the value numbered 2n in the weighting coefficient. For example, the amplitude and phase angle of the nth order harmonic can be expressed as:

[0107]

[0108] The electric energy signal can be obtained more accurately according to the corrected phase angle and amplitude:

[0109]

[0110] At this time, x(n)* is the electric energy signal used for measurement.

[0111] Figure 6 The following schematically shows a schematic diagram of an implementation step of a digital electric energy metering method based on a window function according to an embodiment of the present application. Figure 6As shown, the implementation includes the following steps: monitoring electric energy signals; truncating infinitely long electric energy signals through the Hanning double window function; transforming the signal from the time domain to the frequency domain to obtain the spectrum information of the electric energy signal based on the full-phase FFT algorithm of the split base; correcting the amplitude and phase of the electric energy signal through the single spectrum line interpolation method of polynomial approximation; adjusting the weight through the adaptive least squares algorithm based on the variable forgetting factor; updating the coefficient through the adaptive linear combiner to improve the quality of electric energy calculation, etc. Through the above implementation, accurate measurement of electric energy can be achieved without analog-to-digital conversion.

[0112] Based on the same inventive concept, the present application also provides a digital electric energy metering device based on a window function. Figure 7 The structure diagram of the digital electric energy metering device based on the window function according to the embodiment of the present application is schematically shown. Figure 7 As shown, the device includes: a spectrum acquisition module, which is used to intercept the electric energy signal from the monitoring signal by using the Hanning double window function to obtain the spectrum information of the electric energy signal; an amplitude correction module, which is used to correct the amplitude of the interharmonics in the spectrum information based on the maximum spectrum line in the spectrum information; a weight adjustment module, which is used to adjust the weight of each harmonic in the spectrum information by a least squares algorithm based on a variable forgetting factor to obtain an adjusted electric energy signal; and a linear combination module, which is used to input the adjusted electric energy signal into an adaptive linear combiner to obtain an electric energy signal for metering.

[0113] In some optional implementations of the present application, acquiring the frequency spectrum information of the electric energy signal includes: using full-phase Fourier transform to obtain a single-frequency negative exponential sequence of the electric energy signal.

[0114] In some optional embodiments of the present application, the amplitude of the interharmonics in the spectrum information is corrected based on the maximum spectrum line in the spectrum information, including: determining the spectrum line closest to the desired interharmonic peak point by a polynomial approximation method; determining the interharmonic amplitude by a single-peak spectrum line interpolation algorithm based on the determined spectrum line; and using the obtained interharmonic amplitude as the corrected interharmonic amplitude.

[0115] In some optional embodiments of the present application, the weight of each harmonic in the spectrum information is adjusted by a least squares algorithm based on a variable forgetting factor to obtain an adjusted electric energy signal, including: taking the single-frequency negative exponential sequence as a reference signal, determining the initial weight coefficient corresponding to the single-frequency negative exponential sequence of each order harmonic of the reference signal; obtaining the original sound signal according to the reference signal and the current weight coefficient, obtaining the expected signal according to the reference signal and the filtering channel function based on the harmonic order, adjusting the weight coefficient corresponding to the filtering channel function of each order harmonic according to the error between the original sound signal and the expected signal and the least squares algorithm; the adjustment of the weight coefficient is based on a variable forgetting factor; taking the adjusted weight coefficient as the current weight coefficient, repeating the previous step until the end condition is met; obtaining the adjusted electric energy signal based on the filtering channel function of each order harmonic and the weight coefficient when the end condition is met.

[0116] In some optional embodiments of the present application, the initial weight coefficient corresponding to the single-frequency negative exponential sequence of each order harmonic of the reference signal is determined, including: the weight coefficient of the single-frequency negative exponential sequence of each order harmonic in the reference signal is determined according to the weight coefficient of the single-frequency negative exponential sequence of the adjacent low-order harmonic, the gain vector and the prior error.

[0117] In some optional implementations of the present application, the variable forgetting factor is a function with the harmonic order as the independent variable.

[0118] In some optional implementations of the present application, the function with the harmonic order as the independent variable includes: an exponential function with the error signal corresponding to the harmonic order as the exponent.

[0119] In some optional embodiments of the present application, the adjusted electric energy signal is input into an adaptive linear combiner to obtain an electric energy signal for measurement, including: determining an initial weighting coefficient of the linear combiner, wherein the initial weighting coefficient corresponds to a signal source equivalent to each harmonic signal in the linear combiner; inputting the adjusted electric energy signal into the linear combiner including the current weighting coefficient to obtain a corresponding output, adjusting the current weighting coefficient with the minimum mean square error between the input signal and the output signal of the linear combiner as the objective function to obtain an adjusted weighting coefficient; using the adjusted weighting coefficient as the current weighting coefficient, repeating the previous step until an end condition is met; determining the amplitude and phase of each harmonic with the weighting coefficient when the end condition is met to obtain an electric energy signal for measurement.

[0120] In some optional embodiments of the present application, the amplitude and phase of each harmonic are determined by the weighting coefficient when the termination condition is reached, including: the amplitude of the nth-order harmonic is determined according to the sum of the squares of the value numbered 2n-1 and the value numbered 2n in the weighting coefficient; the phase of the nth-order harmonic is determined according to the ratio of the value numbered 2n-1 to the value numbered 2n in the weighting coefficient.

[0121] The specific definition of each functional module in the above-mentioned digital electric energy metering device based on window function can be found in the above definition of the digital electric energy metering method based on window function, which will not be repeated here. Each module in the above-mentioned system can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory in the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. It also achieves the advantages of no need for analog-to-digital conversion and accurate electric energy measurement.

[0122] In some embodiments of the present application, an electronic device is also provided, comprising: at least one processor; a memory connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the aforementioned digital electric energy metering method based on window function. Its internal structure diagram can be as follows Figure 8 shown. Figure 8 The internal structure diagram of an electronic device according to an embodiment of the present application is schematically shown. The electronic device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected via a system bus. Among them, the processor A01 of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The network interface A02 of the electronic device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, a digital electric energy metering method based on a window function is implemented.

[0123] Those skilled in the art will understand that Figure 8 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0124] In one embodiment provided in the present application, a machine-readable storage medium is provided, on which instructions are stored. When the instructions are executed by a processor, the processor is configured to execute the aforementioned window function-based digital electric energy metering method.

[0125] In one embodiment provided in the present application, a computer program product is provided, including a computer program, which implements the aforementioned window function-based digital electric energy metering method when executed by a processor.

[0126] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0127] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0128] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0129] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps for the functions specified in one or more boxes.

[0130] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0131] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0132] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0133] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0134] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A digital electric energy metering method based on window function, characterized in that: The method includes: A Hanning double window function is used to extract an electric energy signal from a monitoring signal to obtain frequency spectrum information of the electric energy signal; Correcting the amplitude of the interharmonics in the spectrum information based on the maximum spectrum line in the spectrum information; The weight of each harmonic in the spectrum information is adjusted by a least squares algorithm based on a variable forgetting factor to obtain an adjusted electric energy signal; The adjusted electric energy signal is input into an adaptive linear combiner to obtain an electric energy signal for metering.

2. The method according to claim 1, characterized in that Acquiring the frequency spectrum information of the electric energy signal includes: using full-phase Fourier transform to obtain a single-frequency negative exponential sequence of the electric energy signal.

3. The method according to claim 1, characterized in that Correcting the amplitude of the interharmonics in the spectrum information based on the maximum spectrum line in the spectrum information includes: Determine the spectrum line closest to the desired interharmonic peak point by polynomial approximation method; Taking the determined spectrum line as a reference, the interharmonic amplitude is determined by using the single peak spectrum line interpolation algorithm; The obtained interharmonic amplitude is used as the amplitude of the corrected interharmonic.

4. The method according to claim 2, characterized in that: The weight of each harmonic in the spectrum information is adjusted by the least squares algorithm based on a variable forgetting factor to obtain the adjusted power signal, including: Taking the single-frequency negative exponential sequence as a reference signal, determining initial weight coefficients corresponding to the single-frequency negative exponential sequences of each order harmonic of the reference signal; The original sound signal is obtained according to the reference signal and the current weight coefficient, the expected signal is obtained according to the reference signal and the filter channel function based on the harmonic order, and the weight coefficient corresponding to the filter channel function of each order harmonic is adjusted according to the error between the original sound signal and the expected signal and the least square algorithm; the adjustment of the weight coefficient is based on a variable forgetting factor; Use the adjusted weight coefficient as the current weight coefficient and repeat the previous step until the end condition is reached; Based on the filtering channel functions of each order of harmonics and the weight coefficient when the end condition is reached, an adjusted electric energy signal is obtained.

5. The method according to claim 4, characterized in that Determining the initial weight coefficient corresponding to the single-frequency negative exponential sequence of each order harmonic of the reference signal includes: The weight coefficient of the single-frequency negative exponential sequence of each order harmonic in the reference signal is determined according to the weight coefficient of the single-frequency negative exponential sequence of the adjacent low-order harmonic, the gain vector and the priori error.

6. The method according to claim 4, characterized in that The variable forgetting factor is a function with the harmonic order as the independent variable.

7. The method according to claim 5, characterized in that The function with the harmonic order as the independent variable includes: an exponential function with the error signal corresponding to the harmonic order as the exponent.

8. The method according to claim 1, characterized in that The adjusted electric energy signal is input into an adaptive linear combiner to obtain an electric energy signal for measurement, including: Determine an initial weighting coefficient of the linear combiner, wherein the initial weighting coefficient corresponds to a signal source to which each harmonic signal is equivalent in the linear combiner; Inputting the adjusted electric energy signal into the linear combiner including the current weighting coefficient to obtain a corresponding output, taking the minimum mean square error between the input signal and the output signal of the linear combiner as the objective function, adjusting the current weighting coefficient to obtain an adjusted weighting coefficient; Using the adjusted weighting coefficient as the current weighting coefficient, repeat the previous step until the end condition is reached; The amplitude and phase of each harmonic are determined by the weighted coefficient when the end condition is reached, and the electric energy signal used for measurement is obtained.

9. The method according to claim 8, characterized in that The amplitude and phase of each harmonic are determined by the weighting coefficient when the end condition is reached, including: The amplitude of the nth order harmonic is determined based on the sum of the squares of the value with the serial number 2n-1 and the value with the serial number 2n in the weighting coefficient; The phase of the n-th order harmonic is determined according to the ratio of the value with the sequence number 2n-1 to the value with the sequence number 2n in the weighting coefficient.

10. A digital electric energy metering device based on window function, characterized in that: The device includes: A spectrum acquisition module, used to extract the electric energy signal from the monitoring signal by using a Hanning double window function, and obtain spectrum information of the electric energy signal; An amplitude correction module, used for correcting the amplitude of the interharmonics in the spectrum information based on the maximum spectrum line in the spectrum information; A weight adjustment module, used for adjusting the weight of each harmonic in the spectrum information by a least squares algorithm based on a variable forgetting factor to obtain an adjusted electric energy signal; and The linear combination module is used to input the adjusted electric energy signal into the adaptive linear combiner to obtain the electric energy signal for measurement.

11. An electronic device, characterized in that: include: at least one processor; a memory connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the at least one processor implements the steps of the digital electric energy metering method based on window function as described in any one of claims 1 to 9 by executing the instructions stored in the memory.

12. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of the digital electric energy metering method based on window function described in any one of claims 1 to 9 are implemented.

13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the digital electric energy metering method based on window function described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Harmonic energy metering method of Nuttall self-convolution weighted Fourier transform

    CN102435845A

  • Hanning self-multiplying convolution window FFT tri-spectrum line interpolation harmonic analysis method

    CN109030941A

Cited By

  • Electric energy metering data analysis method and system based on digital signal processing

    CN120993103A

  • A digital signal processing-based electric energy metering data analysis method and system

    CN120993103B