Electric energy measurement method and system based on fast discrete Stockwell transform

By adopting fast discrete Stockwell transformation and frequency scaling technology in the electrical energy measurement algorithm, the problem of inaccurate power measurement under large-scale electric vehicles is solved, and efficient and accurate power measurement is achieved.

CN117949726BActive Publication Date: 2025-02-07STATE GRID HUBEI ELECTRIC POWER INFORMATION & TELECOMMUNICATION COMPANY +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311806230.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2025-02-07
Estimated Expiration
2043-12-25

AI Technical Summary

Technical Problem

Existing electrical energy measurement algorithms are difficult to achieve rapid and accurate measurement of electrical energy under large-scale electric vehicles access, especially when processing non-periodic signals, there are problems of spectrum leakage and inaccurate measurements.

Method used

The electric energy measurement method based on fast discrete Stockwell transform is adopted, and the calculation amount of Fourier transform and inverse transform is reduced through frequency scaling technology and adjustment of Gaussian window function, and the measurement accuracy and processing efficiency are improved.

Benefits of technology

It realizes rapid and accurate measurement of electrical energy when large-scale electric vehicles are connected to the power grid, significantly improving information processing efficiency, and improving metrology accuracy and calculation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117949726B_ABST
    Figure CN117949726B_ABST
Patent Text Reader

Abstract

An electric energy metering method, system, device and storage medium based on fast discrete Stockwell transform, S1, fast discrete Stockwell transform is performed on the sampled current and voltage sampling signals respectively; S2, the amplitude and phase value of the voltage, the amplitude and phase value of the current can be obtained according to the fast discrete Stockwell transform results; S3, after phase correction, the actual phase difference of the voltage and current corresponding to the sampling frequency is obtained, and the active and reactive power are calculated to obtain the consumed electric energy. The algorithm selects part of the frequency of the sampling signal for subsequent calculation through frequency scaling technology, and the Gaussian window function can also be scaled according to the adjusted frequency, which greatly reduces the calculation amount of Fourier transform and inverse transform. Compared with the electric energy metering algorithm based on Fourier transform and filter, the algorithm established by the present invention has low calculation complexity and high measurement accuracy; it can significantly improve the information processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric energy metering algorithms, and is particularly applicable to an electric energy metering method, system, device and storable medium based on fast discrete Stockwell transformation. Background Art

[0002] In recent years, in response to the demand for energy conservation and emission reduction, the sales of electric vehicles have increased significantly. Although large-scale electric vehicles have reduced dependence on fossil energy and environmental pollution, they have also posed new challenges to the power grid. The simultaneous charging of large-scale electric vehicles may cause local voltage fluctuations in the power grid, affecting voltage stability and quality and even frequency stability. In addition, the power electronics in the electric vehicle charging piles may introduce harmonics into the power grid, affecting the quality of power supplied to other users. The use of advanced power grid monitoring and management technology to predict and manage the fluctuations caused by electric vehicle charging can alleviate these effects and ensure the safety of the charging process. To this end, the charging voltage, current, grid frequency, harmonic distortion rate, etc. during the charging process must be accurately sensed and calculated, so an energy metering algorithm is needed.

[0003] At present, fast Fourier transform and filter-based design are mainly used in the field of electric energy metering to estimate the amplitude, frequency, and power factor of voltage and current. However, fast Fourier transform is only applicable to periodic signals. For non-periodic signals, spectrum leakage may occur, resulting in additional peaks or inaccurate frequency components outside the spectrum, reducing the accuracy of measurement. Filter-based design is limited by the selection of filter order and type, and it is difficult to apply to different scenarios. In recent years, Stockwell transform has been widely used in signal processing and spectrum analysis. It combines the advantages of short-time Fourier transform and wavelet transform, provides higher time-frequency resolution, can more accurately capture the transient and frequency changes of signals in time and frequency, and has better effect in processing non-periodic nonlinear signals. However, the Stockwell transform has high computational complexity and is difficult to process massive information.

[0004] Similar to the following problem, existing algorithms are difficult to achieve fast and accurate measurement of electric energy when large-scale electric vehicles are connected. The present invention provides an electric energy measurement method based on fast discrete Stockwell transform. The algorithm selects part of the frequency of the sampling signal for subsequent calculations through frequency scaling technology, and the Gaussian window function can also be scaled according to the adjusted frequency, which greatly reduces the amount of calculation of Fourier transform and inverse transform. Compared with the electric energy measurement algorithms based on Fourier transform and filter, the algorithm established by the present invention has low computational complexity and high measurement accuracy. When large-scale electric vehicles are connected, massive electric energy data will be generated. The algorithm proposed by the present invention can significantly improve the efficiency of information processing. Summary of the invention

[0005] The purpose of the present invention is to overcome the problem in the prior art that complex data is difficult to measure accurately, and to provide an electric energy measurement method, system, device and storable medium based on fast discrete Stockwell transformation.

[0006] To achieve the above objectives, the technical solution of the present invention is:

[0007] An electric energy measurement method based on fast discrete Stockwell transform, the electric energy measurement method comprising the following steps:

[0008] S1. Sampling and monitoring the current and voltage of the circuit to be measured, and performing fast discrete Stockwell transformation on the sampled current and voltage sampling signals respectively;

[0009] S2. The amplitude and phase values ​​of the voltage and the amplitude and phase values ​​of the current can be obtained according to the fast discrete Stockwell transform result;

[0010] S3. After phase correction, the actual phase difference between the voltage and current corresponding to the sampling frequency is obtained, and the active and reactive power are calculated to obtain the consumed power.

[0011] The fast discrete Stockwell transform in S1 is:

[0012] S1.1, scaling the frequency of the sampled signal according to its amplitude;

[0013] S1.2, obtaining the fast Fourier transform form of the sampling signal by setting the bandpass filter width;

[0014] S1.3, after frequency scaling, recalculate the Gaussian window function;

[0015] S1.4, the fast Fourier transform of the input signal is multiplied by the fast Fourier transform of the window function to obtain the signal expression after frequency scaling;

[0016] S1.5, calculate important frequency components, and perform inverse fast Fourier transform on the important frequency components;

[0017] In S1.1, the frequency scaling is as follows: first, the frequency is scaled according to the amplitude of the sampled signal, and the scaling formula is shown in formula (1):

[0018]

[0019] Where S represents the time-frequency matrix of the voltage and current signals, x is the measured voltage or current signal, k is the time domain displacement convolved with the window function W, T is the sampling period, x(n) is the function, x(kT) is the value of the function at n=kT, x(kT) is the measured value of the kth sampling, N is the sampling number of the window function, n is the sampling sequence number of the window function, and the value is 0, 1, 2...N, An / NT is the sampled signal amplitude, A set is the given signal amplitude, j is the number of rows in the time-frequency matrix, and its value range is 0, 1, 2…N-1;

[0020] In S1.2, the fast Fourier transform form of the signal is obtained by setting the bandpass filter width, as shown in formula (2):

[0021] X(k)=FFT{x(n)} (2)

[0022] Where x(n) is the discrete signal in the time domain, and X(k) is the corresponding discrete signal in the frequency domain;

[0023] In S1.3, after frequency scaling, the Gaussian window function W(k, n) is recalculated, as shown in formula (3):

[0024]

[0025] Where r and b are scale factors for controlling window oscillation, and a and c are real constants;

[0026] In S1.4, the fast Fourier transform X(k) of the input signal is multiplied by the fast Fourier transform of the window function Q(k, n) to obtain the signal expression G(k, n) after frequency scaling, as shown in formula (4):

[0027] G(k,n)=X(k)·FFT[W(k,n)] (4)

[0028] Due to frequency scaling, the rows with frequencies that do not meet the requirements are set to 0, and the matrix G is a sparse matrix.

[0029] After frequency scaling, the important frequency components are calculated, where the important frequency components are those whose frequency amplitude is greater than the set amplitude A. set The frequency components of , and then perform inverse fast Fourier transform on the important frequency components, as shown in formula (5):

[0030]

[0031] Where S(k, n) is the Stockwell matrix, which is obtained by inverse fast Fourier transform of the windowed matrix G(k, n), s is a set of selected important frequency components.

[0032] According to the inverse fast Fourier transform results, the voltage and current amplitude A can be obtained v , A i , the phase of voltage and current As shown in equations (6) to (9):

[0033]

[0034]

[0035]

[0036]

[0037] In the formula, [S v ] MAX is the maximum voltage after Stockwell transformation; [S i ] MAX is the maximum current after Stockwell transformation, imag represents the imaginary part, and real represents the real part.

[0038] After phase correction, the sampling frequency is f s The actual phase difference between voltage and current is θ c As shown in formula (11):

[0039]

[0040] The active power P and reactive power Q are shown in formula (12):

[0041] P=A v ·A i cosθ c , Q = A v ·A i sinθ c (11)

[0042] The power consumption E is shown in formula (13):

[0043]

[0044] Where f is the frequency of the alternating current.

[0045] An electric energy metering system based on fast discrete Stockwell transform, the electric energy metering system comprising:

[0046] The fast discrete Stockwell transform module is used to perform fast discrete Stockwell transform on the sampled current and voltage sampling signals respectively; and is used to implement the following method:

[0047] The fast discrete Stockwell transform in S1 is:

[0048] S1.1, scaling the frequency of the sampled signal according to its amplitude;

[0049] In S1.1, the frequency scaling is as follows: first, the frequency is scaled according to the amplitude of the sampled signal, and the scaling formula is shown in formula (1):

[0050]

[0051] Where S represents the time-frequency matrix of the voltage and current signals, x is the measured voltage or current signal, k is the time domain displacement convolved with the window function W, T is the sampling period, x(n) is the function, x(kT) is the value of the function at n=kT, x(kT) is the measured value of the kth sampling, N is the sampling number of the window function, n is the sampling sequence number of the window function, and the value is 0, 1, 2...N, A n / NT is the sampled signal amplitude, A set is the given signal amplitude, j is the number of rows in the time-frequency matrix, and its value range is 0, 1, 2…N-1;

[0052] S1.2, obtaining the fast Fourier transform form of the sampling signal by setting the bandpass filter width;

[0053] In S1.2, the fast Fourier transform form of the signal is obtained by setting the bandpass filter width, as shown in formula (2):

[0054] X(k)=FFT{x(n)} (14)

[0055] Where x(n) is the discrete signal in the time domain, and X(k) is the corresponding discrete signal in the frequency domain;

[0056] S1.3, recalculate the Gaussian window function;

[0057] In S1.3, after frequency scaling, the Gaussian window function W(k, n) is recalculated, as shown in formula (3):

[0058]

[0059] Where r and b are scale factors for controlling window oscillation, and a and c are real constants;

[0060] S1.4, the fast Fourier transform of the input signal is multiplied by the fast Fourier transform of the window function to obtain the signal expression after frequency scaling;

[0061] In S1.4, the fast Fourier transform X(k) of the input signal is multiplied by the fast Fourier transform of the window function W(k, n) to obtain the signal expression G(k, n) after frequency scaling, as shown in formula (4):

[0062] G(k,n)=X(k)·FFT[W(k,n)] (16)

[0063] Due to frequency scaling, the rows with frequencies that do not meet the requirements are set to 0, and the matrix G is a sparse matrix.

[0064] S1.5, calculate important frequency components, and perform inverse fast Fourier transform on the important frequency components;

[0065] After frequency scaling, the important frequency components are calculated, where the important frequency components are those whose frequency amplitude is greater than the set amplitude A. set The frequency components of , and then perform inverse fast Fourier transform on the important frequency components, as shown in formula (5):

[0066]

[0067] Where S(k, n) is the Stockwell matrix, which is obtained by inverse fast Fourier transform of the windowed matrix G(k, n), F s is a set of selected important frequency components.

[0068] The electric energy feature extraction module is used to calculate the amplitude and phase value of the voltage and the amplitude and phase value of the current according to the fast discrete Stockwell transform result; and is used to implement the following method:

[0069] According to the inverse fast Fourier transform results, the voltage and current amplitude A can be obtained v , A i , the phase of voltage and current As shown in equations (6) to (9):

[0070]

[0071]

[0072]

[0073]

[0074] In the formula, [S v ] MAx is the maximum voltage after Stockwell transformation; [S i ] MAx is the maximum current after Stockwell transformation, imag represents the imaginary part, and real represents the real part.

[0075] The electric energy metering module is used to perform phase correction, calculate active and reactive power, and obtain the consumed electric energy. It is used to implement the following methods:

[0076] After phase correction, the sampling frequency is f s The actual phase difference between voltage and current is θ c As shown in formula (11):

[0077]

[0078] The active power P and reactive power Q are shown in formula (12):

[0079] P=A v ·A i cosθ c , Q = A v ·A i sinθ c (twenty three)

[0080] The power consumption E is shown in formula (13):

[0081]

[0082] Where f is the frequency of the alternating current.

[0083] An electric energy metering device based on fast discrete Stockwell transformation comprises a memory and a processor, wherein the memory is used to store computer program code and transmit the computer program code to the processor;

[0084] The processor is used to execute an electric energy metering method based on fast discrete Stockwell transform according to instructions in the computer program code.

[0085] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the electric energy metering method based on fast discrete Stockwell transformation is implemented.

[0086] The beneficial effects of the present invention are:

[0087] 1. The electric energy metering method based on fast discrete Stockwell transform of the present invention selects important frequencies for processing through frequency scaling technology, and the Gaussian window function can also be scaled according to the adjusted frequency, which greatly reduces the calculation amount of Fourier transform and inverse transform. Compared with the electric energy metering algorithm based on Fourier transform and filter, the algorithm not only has lower calculation amount, but also higher calculation efficiency and metering accuracy.

[0088] 2. The electric energy metering system based on fast discrete Stockwell transform of the present invention includes: a fast discrete Stockwell transform module, which is used to perform fast discrete Stockwell transform on the sampled current and voltage sampling signals respectively; an electric energy feature extraction module, which is used to calculate the amplitude and phase value of the voltage, the amplitude and phase value of the current respectively according to the fast discrete Stockwell transform results; an electric energy metering module, which is used to perform phase correction, calculate the active and reactive power, and obtain the consumed electric energy. The system is used to implement the steps of the electric energy metering method based on fast discrete Stockwell transform as provided in any of the above technical solutions. Therefore, the system also includes all the beneficial effects of the electric energy metering method based on fast discrete Stockwell transform as provided in any of the above technical solutions, which will not be repeated here.

[0089] 3. The electric energy metering device based on fast discrete Stockwell transform of the present invention includes a processor and a memory, the memory is used to store computer program code, and transmit the computer program code to the processor, and the processor is used to execute the electric energy metering method based on fast discrete Stockwell transform provided in any of the above technical solutions according to the instructions in the computer program code. Therefore, the device also includes all the beneficial effects of the electric energy metering method based on fast discrete Stockwell transform provided in any of the above technical solutions, which will not be repeated here.

[0090] 4. The present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the electric energy metering method based on fast discrete Stockwell transform as provided in any of the above technical solutions are implemented. Therefore, the computer-readable storage medium also includes all the beneficial effects of the electric energy metering method based on fast discrete Stockwell transform as provided in any of the above technical solutions, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] Figure 1 It is a structural diagram of the electric energy metering algorithm system of the present invention.

[0092] Figure 2 It is a schematic diagram of the electric energy metering device of the present invention.

[0093] Figure 3 This is a flow chart of the power quality event classification algorithm based on voltage signals of Example 2.

[0094] Figure 4 This is a diagram showing the result of active power calculation in Example 2. DETAILED DESCRIPTION

[0095] Embodiment 1:

[0096] See also Figure 1-Figure 2, an electric energy measurement method based on fast discrete Stockwell transform, the electric energy measurement method comprising the following steps:

[0097] S1. Sampling and monitoring the current and voltage of the circuit to be measured, and performing fast discrete Stockwell transformation on the sampled current and voltage sampling signals respectively;

[0098] S2. The amplitude and phase values ​​of the voltage and the amplitude and phase values ​​of the current can be obtained according to the fast discrete Stockwell transform result;

[0099] S3. After phase correction, the actual phase difference between the voltage and current corresponding to the sampling frequency is obtained, and the active and reactive power are calculated to obtain the consumed power.

[0100] The fast discrete Stockwell transform in S1 is:

[0101] S1.1, scaling the frequency of the sampled signal according to its amplitude;

[0102] S1.2, obtaining the fast Fourier transform form of the sampling signal by setting the bandpass filter width;

[0103] S1.3, after frequency scaling, recalculate the Gaussian window function;

[0104] S1.4, the fast Fourier transform of the input signal is multiplied by the fast Fourier transform of the window function to obtain the signal expression after frequency scaling;

[0105] S1.5, calculate important frequency components, and perform inverse fast Fourier transform on the important frequency components;

[0106] In S1.1, the frequency scaling is as follows: first, the frequency is scaled according to the amplitude of the sampled signal, and the scaling formula is shown in formula (1):

[0107]

[0108] Where S represents the time-frequency matrix of the voltage and current signals, x is the measured voltage or current signal, k is the time domain displacement convolved with the window function W, T is the sampling period, x(n) is the function, x(kT) is the value of the function at n=kT, x(kT) is the measured value of the kth sampling, N is the sampling number of the window function, n is the sampling sequence number of the window function, and the value is 0, 1, 2...N, A n / NT is the sampled signal amplitude, A set is the given signal amplitude, j is the number of rows in the time-frequency matrix, and its value range is 0, 1, 2…N-1;

[0109] In S1.2, the fast Fourier transform form of the signal is obtained by setting the bandpass filter width, as shown in formula (2):

[0110] X(k)=FFT{x(n)} (26)

[0111] Where x(n) is the discrete signal in the time domain, and X(k) is the corresponding discrete signal in the frequency domain;

[0112] In S1.3, after frequency scaling, the Gaussian window function W(k, n) is recalculated, as shown in formula (3):

[0113]

[0114] Where r and b are scale factors for controlling window oscillation, and a and c are real constants;

[0115] In S1.4, the fast Fourier transform X(k) of the input signal is multiplied by the fast Fourier transform of the window function W(k, n) to obtain the signal expression G(k, n) after frequency scaling, as shown in formula (4):

[0116] G(k,n)=X(k)·FFT[W(k,n)] (28)

[0117] Due to frequency scaling, the rows with frequencies that do not meet the requirements are set to 0, and the matrix G is a sparse matrix.

[0118] After frequency scaling, the important frequency components are calculated, where the important frequency components are those whose frequency amplitude is greater than the set amplitude A. set The frequency components of , and then perform inverse fast Fourier transform on the important frequency components, as shown in formula (5):

[0119]

[0120] Where S(k, n) is the Stockwell matrix, which is obtained by inverse fast Fourier transform of the windowed matrix G(k, n), F s is a set of selected important frequency components.

[0121] According to the inverse fast Fourier transform results, the voltage and current amplitude A can be obtained v , A i , the phase of voltage and current As shown in equations (6) to (9):

[0122]

[0123]

[0124]

[0125]

[0126] In the formula, [S v ] MAx is the maximum voltage after Stockwell transformation; [S i ] MAX is the maximum current after Stockwell transformation, imag represents the imaginary part, and real represents the real part.

[0127] After phase correction, the sampling frequency is f s The actual phase difference between voltage and current is θ c As shown in formula (11):

[0128]

[0129] The active power P and reactive power Q are shown in formula (12):

[0130] P=A v ·A i cosθ c , Q = A v ·A i sinθ c (35)

[0131] The power consumption E is shown in formula (13):

[0132]

[0133] Where f is the frequency of the alternating current.

[0134] Embodiment 2:

[0135] See also Figure 1 , including a fast Fourier transform module, a frequency scaling module, an inverse fast Fourier transform module, a Stockwell transform calculation module, an electric quantity feature extraction module and an electric energy metering module. The specific principle is to first perform a fast Fourier transform on the voltage and current signals, then perform frequency scaling, and multiply by a Gaussian window function. After that, only the important frequency components are calculated, and an inverse fast Fourier transform is performed on them to obtain a Stockwell transform matrix. The electric quantity feature extraction module calculates the amplitude, phase, and power factor of the voltage and current from the Stockwell transform matrix. Finally, the active and reactive power consumed by the system is calculated through the electric energy metering module.

[0136] See also Figure 3, flow chart of the algorithm for classifying power quality disturbance events based on voltage signals. The algorithm established by the present invention can further classify power quality disturbance events. The specific process is as follows: the voltage amplitude, event duration, and number of voltage spikes are calculated by the Stockwell transformation matrix, and then different power quality events are classified according to the above parameters. Specifically, when the number of spikes is less than 1, the voltage fluctuation can be judged as rising or falling by judging the size of the voltage amplitude; when the number of spikes is greater than 1, the event can be classified as harmonic interference.

[0137] See also Figure 4 , Active power calculation example: The voltage harmonic and current harmonic expressions used are:

[0138]

[0139]

[0140] from Figure 4 It can be seen that the true value of the harmonic active power is very close to the estimated value using this algorithm, which proves the effectiveness of the method proposed in the present invention.

[0141] Embodiment 3:

[0142] An electric energy metering system based on fast discrete Stockwell transform, the electric energy metering system comprising:

[0143] The fast discrete Stockwell transform module is used to perform fast discrete Stockwell transform on the sampled current and voltage sampling signals respectively; and is used to implement step S1 in embodiment 1.

[0144] The electric energy feature extraction module is used to calculate the amplitude and phase value of the voltage and the amplitude and phase value of the current according to the fast discrete Stockwell transform result; and is used to implement step S2 in embodiment 1.

[0145] The electric energy metering module is used to perform phase correction, calculate active power and reactive power, and obtain consumed electric energy. It is used to implement step S3 in embodiment 1.

[0146] Embodiment 4:

[0147] An electric energy metering device based on fast discrete Stockwell transformation comprises a memory and a processor, wherein the memory is used to store computer program code and transmit the computer program code to the processor;

[0148] The processor is used to execute the method in Example 1 according to the instructions in the computer program code.

[0149] Embodiment 5:

[0150] A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method in the first embodiment when executed by a processor.

[0151] Generally speaking, the computer instructions for implementing the method of the present invention may be carried in any combination of one or more computer-readable storage media. Non-transitory computer-readable storage media may include any computer-readable media, except for the signal itself that is temporarily propagating.

[0152] Computer-readable storage media, for example, may be, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or devices, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with a system, device or device for executing instructions.

[0153] One or more programming languages ​​or their combinations can be used to write computer program codes for performing the operation of the present invention. These programming languages ​​include object-oriented programming languages, such as Java, Smalltalk, C++, and also include conventional procedural programming languages, such as C language or similar programming languages. In particular, Python language suitable for neural network calculations and platform frameworks based on TensorFlow, PyTorch, etc. can be used. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through various types of networks, including a local area network (LAN) or a wide area network (WAN), or an Internet connection is performed through an Internet service provider.

[0154] Although the embodiments of the present invention have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. An electric energy measurement method based on fast discrete Stockwell transform, characterized in that: The electric energy metering method comprises the following steps: S1. Sampling and monitoring the current and voltage of the circuit to be measured, and performing fast discrete Stockwell transformation on the sampled current and voltage sampling signals respectively; S1.

1. Scale the frequency of the sampled signal according to its amplitude; the frequency scaling is as follows: first scale the frequency according to the amplitude of the sampled signal, and the scaling formula is shown in formula (1): Where S represents the time-frequency matrix of the voltage and current signals, x is the measured voltage or current signal, k is the time domain displacement convolved with the window function W, T is the sampling period, x(n) is the function, x(kT) is the value of the function at n=kT, x(kT) is the measured value of the kth sampling, N is the sampling number of the window function, n is the sampling sequence number of the window function, and the value is 0, 1, 2...N, A n / NT is the sampled signal amplitude, Ase t is the given signal amplitude, j is the number of rows in the time-frequency matrix, and its value range is 0, 1, 2…N-1; S1.

2. The fast Fourier transform form of the signal is obtained by setting the bandpass filter width, as shown in formula (2): X(k)=FFT{x(n)} (2) Where x(n) is the discrete signal in the time domain, and X(k) is the corresponding discrete signal in the frequency domain; In S1.3, after frequency scaling, the Gaussian window function W(k, n) is recalculated, as shown in formula (3): Where r and b are scale factors for controlling window oscillation, and a and c are real constants; S1.3, after frequency scaling, recalculate the Gaussian window function; S1.4, the fast Fourier transform of the input signal is multiplied by the fast Fourier transform of the window function to obtain the signal expression after frequency scaling; The fast Fourier transform X(k) of the input signal is multiplied by the fast Fourier transform of the window function W(k,n) to obtain the signal expression G(k,n) after frequency scaling, as shown in equation (4): G(k,n)=X(k)·FFT[W(k,n)] (4) Due to frequency scaling, the rows with frequencies that do not meet the requirements are set to 0, and the matrix G is a sparse matrix. S1.

5. Calculate important frequency components and perform inverse fast Fourier transform on the important frequency components; the important frequency components are those whose frequency amplitude is greater than the set amplitude A. set The frequency components of S2. The amplitude and phase values ​​of the voltage and the amplitude and phase values ​​of the current can be obtained according to the fast discrete Stockwell transform result; S3. After phase correction, the actual phase difference between the voltage and current corresponding to the sampling frequency is obtained, and the active and reactive power are calculated to obtain the consumed power.

2. The electric energy metering method based on fast discrete Stockwell transform according to claim 1 is characterized in that: After frequency scaling, the important frequency components are calculated, and then the important frequency components are inversely fast Fourier transformed, as shown in formula (5): Where S(k,n) is the Stockwell matrix, which is obtained by inverse fast Fourier transform of the windowed matrix G(k,n), s is a set of selected important frequency components.

3. The electric energy metering method based on fast discrete Stockwell transform according to claim 2 is characterized in that: According to the inverse fast Fourier transform results, the voltage and current amplitude A can be obtained v , A i , the phase of voltage and current As shown in equations (6) to (9): In the formula, [S v ] MAX is the maximum voltage after Stockwell transformation; [S i ] MAX is the maximum current after Stockwell transformation, imag represents the imaginary part, and real represents the real part.

4. The electric energy metering method based on fast discrete Stockwell transform according to claim 3 is characterized in that: After phase correction, the sampling frequency is f s The actual phase difference θc between voltage and current is shown in equation (11): The active power P and reactive power Q are shown in formula (12): P=A v ·A i cosθ c ,Q=A v ·A i sinθ c (11) The power consumption E is shown in formula (13): Where f is the frequency of the alternating current.

5. An electric energy metering system based on fast discrete Stockwell transform, the system being used to execute the electric energy metering method based on fast discrete Stockwell transform according to any one of claims 1 to 4, characterized in that: The electric energy metering system comprises: A fast discrete Stockwell transform module is used to perform fast discrete Stockwell transform on the sampled current and voltage sampling signals respectively; The electric energy feature extraction module is used to calculate the amplitude and phase value of the voltage and the amplitude and phase value of the current according to the fast discrete Stockwell transform result; The electric energy metering module is used to perform phase correction and calculate the active and reactive power to obtain the consumed electric energy.

6. An electric energy metering device based on fast discrete Stockwell transform, characterized in that: The method comprises a memory and a processor, wherein the memory is used to store computer program code and transmit the computer program code to the processor; The processor is used to execute the electric energy metering method based on fast discrete Stockwell transform according to any one of claims 1 to 4 according to the instructions in the computer program code.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the electric energy metering method based on fast discrete Stockwell transform described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Dynamic harmonic wave electric energy metering method based on multi-resolution short-time Fourier transformation

    CN106771567A