Electric parameter calculation method of electricity meter, control device and computer readable storage medium

By using low-pass filters and interpolation resampling processing in the electricity meter, the problem of large calculation errors in the electrical parameters under high harmonic content is solved, and higher calculation accuracy and spectrum accuracy are achieved.

CN120577591APending Publication Date: 2025-09-02SHENZHEN CLOU POWER TECH CO LTD

Patent Information

Application Number
CN202510804070.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

In the case of high-order harmonic content, the calculation results of electrical parameters are large, and the number of cycle sampling points cannot be accurately calculated, resulting in spectrum leakage and distortion of calculation results.

Method used

The initial voltage sampling sequence is filtered by a low-pass filter, the number of circumferential sampling points between adjacent zero crossing points is determined, and the harmonic electrical parameters of the voltage signal and current signal are calculated through interpolation resampling processing. The harmonic and noise interference are filtered out using a 2nd order IIR low-pass filter to reduce the impact of rounding error.

Benefits of technology

The accuracy of electrical parameter calculation when the high harmonic content is high is improved, errors are reduced, and spectrum accuracy and harmonic calculation accuracy are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120577591A_ABST
    Figure CN120577591A_ABST
Patent Text Reader

Abstract

The invention discloses an electric parameter calculation method of an electric meter, a control device and a computer readable storage medium, and the method comprises the steps: filtering an initial voltage sampling sequence through employing a low-pass filter before calculating a zero crossing point of a cyclic wave sampling point number, filtering the interference of harmonic waves and noise on the zero crossing point, and calculating the zero crossing point of the cyclic wave sampling point number; finding a zero crossing point according to the filtered intermediate voltage sequence so as to determine the number of cycle sampling points; continuously taking data from zero crossing points of the initial voltage sampling sequence and the initial current sampling sequence according to the number of cycle sampling points so as to calculate a voltage effective value and a current effective value; and performing interpolation resampling processing on the initial voltage sampling sequence and the initial current sampling sequence according to the number of cyclic wave sampling points and a second resampling frequency, and calculating harmonic electric parameters of the voltage signal and the current signal according to the obtained voltage resampling sequence and the current resampling sequence. The electric parameter calculation accuracy of the measured signal when the higher harmonic content is relatively high can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric energy metering, and in particular to a method for calculating electric parameters of an electric meter, a control device, and a computer-readable storage medium. Background Art

[0002] AC standard meters often require measuring electrical parameters such as the frequency, effective value, phase, active power, reactive power, apparent power, harmonic content, harmonic phase, and harmonic distortion of voltage and current signals. Currently, the calculation of most electrical parameters requires the use of the original discrete sampling sequence's cycle sampling points. If the calculated parameter deviates significantly from the actual value, spectral leakage and distortion can occur in the intermediate calculation results, leading to deviations in the subsequent harmonic content, harmonic phase, harmonic distortion, and harmonic power calculations.

[0003] The scheme for determining the number of frequency sampling points in the existing technology can calculate a relatively accurate number of frequency sampling points when the signal has no harmonics or the harmonic distortion is small. However, when the signal contains a large amount of high-order harmonics, the number of frequency sampling points cannot be accurately calculated, which will lead to large errors in the subsequent calculation results of a series of electrical parameters. Summary of the Invention

[0004] The purpose of the present invention is to solve at least one of the technical problems existing in the prior art and to provide a method for calculating the electrical parameters of an electric meter, a control device and a computer-readable storage medium, which can improve the accuracy of the electrical parameter calculation when the measured signal has a large amount of high-order harmonics.

[0005] In a first aspect, an embodiment of the present invention provides a method for calculating electrical parameters of an electric meter, comprising:

[0006] Sampling the voltage signal and the current signal respectively according to a first sampling rate to obtain an initial voltage sampling sequence and an initial current sampling sequence;

[0007] Using a low-pass filter to filter the initial voltage sampling sequence to obtain an intermediate voltage sequence, and determining the number of cycle sampling points between two adjacent zero-crossing points based on the intermediate voltage sequence;

[0008] Finding a zero-crossing point from the initial voltage sampling sequence and the initial current sampling sequence, and continuously acquiring data starting from the zero-crossing point according to the number of cycle sampling points to calculate the effective value of voltage and the effective value of current;

[0009] The initial voltage sampling sequence and the initial current sampling sequence are interpolated and resampled according to the number of cycle sampling points and the second resampling frequency to obtain a voltage resampling sequence and a current resampling sequence to calculate the harmonic electrical parameters of the voltage signal and the current signal.

[0010] The method for calculating electrical parameters of an electric meter provided by an embodiment of the present invention has at least the following beneficial effects: before finding the zero-crossing point for calculating the number of cycle sampling points, the initial voltage sampling sequence is first filtered using a low-pass filter to remove interference from harmonics and noise on finding the zero-crossing point, and then the zero-crossing point is found based on the filtered intermediate voltage sequence. The number of signals between two adjacent zero-crossing points is counted to determine the number of cycle sampling points. In addition, before calculating the effective value of voltage and effective value of current, the zero-crossing point is first found in the initial voltage sampling sequence and the initial current sampling sequence, and data is continuously acquired from the zero-crossing points of the initial voltage sampling sequence and the initial current sampling sequence for calculation according to the number of cycle sampling points, thereby reducing the error caused by occasional rounding error jumps in the number of cycle sampling points. Finally, the initial voltage sampling sequence and the initial current sampling sequence are interpolated and resampled according to the number of cycle sampling points and the second resampling frequency, and the harmonic electrical parameters of the voltage and current signals are calculated based on the obtained voltage resampling sequence and current resampling sequence, which can effectively improve the accuracy of electrical parameter calculation when the measured signal contains a large amount of high-order harmonics.

[0011] According to the electric parameter calculation method provided by some embodiments of the present invention, the first sampling rate is recorded as f s And meet:

[0012] f s >2f MAX ;

[0013] Among them, f MAX is the highest frequency value that needs to be detected in the voltage signal or the current signal.

[0014] According to the electric parameter calculation method provided by some embodiments of the present invention, the low-pass filter is a second-order IIR low-pass filter, and the calculation formula is:

[0015] y n =b0x n +b1x n-1 +b2x n-2 +a1y n-1 +a2y n-2 ;

[0016] Among them, x n 、x n-1 、x n-2 are the nth, n-1th, and n-2th data in the initial voltage sampling sequence respectively; y n 、y n-1 、y n-2 are the nth, n-1th, and n-2th data in the intermediate voltage sequence respectively; b0, b1, b2, a1, and a2 are preset constants respectively.

[0017] According to some embodiments of the present invention, the electric parameter calculation method further includes calculating the frequency f of the voltage signal using the following formula: b :

[0018] f b =f s / N b ;

[0019] Where: N b is the number of sampling points of the cycle.

[0020] According to the electrical parameter calculation method provided in some embodiments of the present invention, the voltage effective value and the current effective value are calculated using the following formula:

[0021]

[0022] Among them: U rms is the effective value of the voltage, I rms is the effective value of the current, u n is the nth data in the initial voltage sampling sequence, i n is the nth data in the initial current sampling sequence, N b is the number of sampling points of the cycle.

[0023] According to the electrical parameter calculation method provided by some embodiments of the present invention, the interpolation resampling process is implemented using the following formula:

[0024] y m =k n +(k n+1 -k n )*(Δ*mn);

[0025] Where: k n 、k n+1 are the nth and n+1th data in the initial voltage sampling sequence or the initial current sampling sequence respectively; m is the mth data of the voltage resampling sequence or the current resampling sequence; Δ is the step value of interpolation resampling, Δ=N b / N s , N b is the number of sampling points of the cycle, N s is the number of resampling frequency points; n and m are both integers and n is the floor value of Δ*m.

[0026] According to some embodiments of the present invention, the electrical parameter calculation method provides that calculating the harmonic electrical parameters of the voltage signal and the current signal includes:

[0027] The continuous full-cycle data in the voltage resampling sequence and the current resampling sequence are used to perform FFT operations to obtain real part data and imaginary part data of each harmonic.

[0028] The electrical parameter calculation method provided in some embodiments of the present invention further includes calculating the harmonic phase using the following formula:

[0029]

[0030] in: is the phase of the nth harmonic, im n is the imaginary part of the nth harmonic, re n is the real part of the nth harmonic.

[0031] According to some embodiments of the present invention, the electrical parameter calculation method further includes calculating the harmonic amplitude and harmonic content using the following formula:

[0032]

[0033] Among them, rms n is the amplitude of the nth harmonic, rms1 is the amplitude of the fundamental wave, r n is the content of the nth harmonic.

[0034] The electrical parameter calculation method provided in some embodiments of the present invention further includes calculating harmonic distortion using the following formula:

[0035]

[0036] Where d is the harmonic distortion.

[0037] The electrical parameter calculation method provided in some embodiments of the present invention further includes calculating harmonic power using the following formula:

[0038] p n =u nre *i nre +u nim *i nim ;

[0039] q n =u nime *i nre -u nre *i nim ;

[0040] Among them, p n is the nth harmonic active power, q n is the nth harmonic reactive power, u nre is the real part of the nth harmonic voltage, u nim is the imaginary part of the nth harmonic voltage, i nreis the real part of the nth harmonic current, i nim is the imaginary part of the nth harmonic current.

[0041] In a second aspect, an embodiment of the present invention provides a control device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the electrical parameter calculation method as described in the embodiment of the first aspect above.

[0042] In a third aspect, an embodiment of the present invention provides an AC meter, comprising the control device described in the embodiment of the second aspect.

[0043] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the electrical parameter calculation method described in the embodiment of the first aspect above.

[0044] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation to the technical solution of the present invention.

[0046] The present invention will be further described below with reference to the accompanying drawings and embodiments;

[0047] Figure 1 It is a schematic diagram comparing the fundamental waveform and the waveform containing higher harmonics;

[0048] Figure 2 This is a flow chart of a method for calculating electrical parameters of an electric meter provided by an embodiment of the present invention;

[0049] Figure 3 is a structural diagram of a second-order IIR low-pass filter provided by an embodiment of the present invention;

[0050] Figure 4 This is a simulation diagram of a signal containing high-order harmonics input to a second-order IIR low-pass filter;

[0051] Figure 5 This is a block diagram of a data processing process for improving the accuracy of calculating electrical parameters of a signal containing high-order harmonics, provided by an embodiment of the present invention;

[0052] Figure 6This is a schematic diagram of the effect of interpolation resampling processing;

[0053] Figure 7 It is a structural diagram of a control device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0054] This section will describe in detail the specific embodiments of the present invention. The preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but it should not be understood as a limitation on the scope of protection of the present invention.

[0055] In the description of the embodiments of the present invention, "several" means one or more, "more" means more than two, "greater than," "less than," and "exceed" are understood to exclude the number itself, and "above," "below," and "within" are understood to include the number itself. "At least one" means one or more, "at least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. If the terms "first," "second," etc. are used in the description, they are only used to distinguish technical features and are not to be understood as indicating or implying relative importance, implicitly indicating the number of the indicated technical features, or implicitly indicating the order of the indicated technical features.

[0056] It should be noted that the terms "dispose," "install," and "connect" in the embodiments of the present invention should be interpreted broadly. Those skilled in the art can reasonably determine the specific meanings of these terms in the embodiments of the present invention based on the specific content of the technical solution. For example, the term "connect" can refer to mechanical connection, electrical connection, or communication; it can be direct connection or indirect connection through an intermediary.

[0057] It should be noted that the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0058] In AC standard meters, it's often necessary to measure electrical parameters such as the frequency, RMS value, phase, active power, reactive power, apparent power, harmonic content, harmonic phase, and harmonic distortion of voltage and current signals. The commonly used data processing process is as follows: First, the voltage and current signals are sampled at equal intervals to obtain the original discrete sampling sequence. The zero-crossing points in the original sampling sequence of the voltage signal are then found, and the number of cycle sampling points between two adjacent zero-crossing points is accumulated. The frequency is then calculated using the number of cycle sampling points. The RMS values ​​(i.e., the RMS voltage and current RMS values) are calculated using the original discrete sampling data of the voltage and current at consecutive cycle sampling points. In addition, the original discrete sampling data of voltage and current with continuous frequency points are interpolated and resampled to obtain frequency data with a frequency point that is an integer power of 2 that meets the FFT algorithm. The interpolated and resampled data are then subjected to FFT operations respectively, and the results of the FFT operations are further calculated to obtain electrical parameters such as the phase, active power, reactive power, apparent power, harmonic content, harmonic phase and harmonic distortion of the voltage and current signals. Therefore, the calculation process of most electrical parameters of the electricity meter requires the use of the cycle sampling points of the original discrete sampling sequence. If the calculated result of the parameter deviates significantly from the actual value, it will directly lead to deviations in the calculation results of the frequency and effective value, and directly cause the data after interpolation and resampling to not be integer cycle data. According to the characteristics of the FFT algorithm, using non-integer cycle data for FFT calculation will cause spectrum leakage in the calculation result. The manifestation in the calculation result is that the energy of the harmonic frequency component in the input signal leaks into the other frequency components on the left and right sides, causing the calculation result to be distorted, resulting in deviations in the subsequent harmonic content, harmonic phase, harmonic distortion and harmonic power calculation values.

[0059] In the prior art, the scheme for determining the number of cycle sampling points can calculate a relatively accurate number of cycle sampling points when the signal has no harmonics or the harmonic distortion is small, because the signal zero crossing point is clear, but when the signal contains a lot of high-order harmonics, the manifestation on the signal waveform is that multiple repeated zero crossing points appear near the zero crossing point of the fundamental wave due to the effect of high-order harmonics. For example, Figure 1 As shown, in this case, it is impossible to accurately find the zero-crossing point in the original sampling sequence, which leads to the inability to accurately calculate the number of cycle sampling points, and then leads to large errors in the subsequent calculation results of a series of electrical parameters.

[0060] Based on this, an embodiment of the present invention provides an electric parameter calculation method, a control device, and a computer-readable storage medium for an electric meter, which can improve the accuracy of electric parameter calculation when the measured signal contains a large amount of high-order harmonics.

[0061] The embodiments of the present invention are further described below with reference to the accompanying drawings.

[0062] Figure 2 This is a flow chart of the method for calculating the electrical parameters of an electric meter provided by an embodiment of the present invention. Figure 2 The first embodiment of the present invention provides a method for calculating electrical parameters of an electric meter, including but not limited to steps S210 to S240, wherein:

[0063] Step S210: sampling the voltage signal and the current signal respectively at a first sampling rate to obtain an initial voltage sampling sequence and an initial current sampling sequence.

[0064] It is understandable that the first sampling rate is generally a fixed value. Therefore, in this step, the voltage signal is sampled at equal intervals according to the fixed sampling rate to obtain an initial voltage sampling sequence; the current signal is sampled at equal intervals according to the fixed sampling rate to obtain an initial current sampling sequence. The first sampling rate can be denoted as f s In some embodiments, according to Nyquist theorem, the first sampling rate f s The following relationship should be satisfied:

[0065] f s >2f MAX ;

[0066] Among them, f MAX It is the highest frequency value that needs to be detected in the voltage signal or current signal.

[0067] Step S220: filtering the initial voltage sampling sequence with a low-pass filter to obtain an intermediate voltage sequence, and determining the number of cycle sampling points between two adjacent zero-crossing points based on the intermediate voltage sequence.

[0068] In some embodiments, the low-pass filter can be a 2nd order IIR low-pass filter. The structure diagram of the 2nd order IIR low-pass filter can be referred to Figure 3 As shown. The calculation formula of the second-order IIR low-pass filter is:

[0069] y n =b0x n +b1x n-1 +b2x n-2 +a1y n-1 +a2y n-2 ;

[0070] Among them, x n 、x n-1 、x n-2 are the nth, n-1th, and n-2th data in the initial voltage sampling sequence respectively; y n 、y n-1 、y n-2are the nth, n-1th, and n-2th data in the intermediate voltage sequence respectively; b0, b1, b2, a1, and a2 are preset constants respectively.

[0071] It should be noted that after the signal containing high-order harmonics is input into the above-mentioned second-order IIR low-pass filter, a signal containing only the fundamental wave and phase lag will be obtained. For example, Figure 4 As shown, the phase lag has no effect on the calculation of the next cycle sampling points.

[0072] Step S230: Find the zero-crossing point from the initial voltage sampling sequence and the initial current sampling sequence, and continuously acquire data from the zero-crossing point according to the number of cycle sampling points to calculate the effective value of voltage and the effective value of current.

[0073] Step S240: performing interpolation resampling processing on the initial voltage sampling sequence and the initial current sampling sequence according to the number of cycle sampling points and the second resampling frequency to obtain a voltage resampling sequence and a current resampling sequence to calculate harmonic electrical parameters of the voltage signal and the current signal.

[0074] According to an embodiment of the present invention, a method for calculating electrical parameters of an electric meter is provided. Before finding the zero crossing point for calculating the number of cycle sampling points, an initial voltage sampling sequence is first filtered using a low-pass filter to remove interference from harmonics and noise on finding the zero crossing point. Then, the zero crossing point is found based on the filtered intermediate voltage sequence, and the number of signals between two adjacent zero crossing points is counted to determine the number of cycle sampling points. In addition, before calculating the effective value of voltage and effective value of current, zero crossing points are first found in the initial voltage sampling sequence and the initial current sampling sequence. Then, data is continuously acquired from the zero crossing points of the initial voltage sampling sequence and the initial current sampling sequence for calculation according to the number of cycle sampling points, thereby reducing the error caused by occasional rounding error fluctuations in the number of cycle sampling points. Finally, the initial voltage sampling sequence and the initial current sampling sequence are interpolated and resampled according to the number of cycle sampling points and a second resampling frequency, and the harmonic electrical parameters of the voltage and current signals are calculated based on the obtained voltage and current resampling sequences. This method can effectively improve the accuracy of electrical parameter calculation when the measured signal contains a large amount of high-order harmonics.

[0075] Figure 5 This is a block diagram of a data processing process for improving the accuracy of calculating the electrical parameters of a signal containing high-order harmonics provided by an embodiment of the present invention. Figure 5 Some steps of the electric parameter calculation method of the present invention are specifically introduced. In the electric parameter calculation method provided in some embodiments of the present invention, combined with Figure 5 After determining the number of cycle sampling points between two adjacent zero-crossing points according to the intermediate voltage sequence in step S220, the frequency f of the voltage signal is calculated using the following formula: b :

[0076] f b =f s / N b ;

[0077] Where: N b is the number of sampling points per cycle.

[0078] In the electrical parameter calculation method provided in some embodiments of the present invention, the voltage effective value and the current effective value in step S230 are calculated using the following formula:

[0079]

[0080] Among them: U rms is the effective value of voltage, I rms is the effective value of current, u n is the nth data in the initial voltage sampling sequence, i n is the nth data in the initial current sampling sequence, N b is the number of sampling points per cycle.

[0081] That is, in this embodiment, by finding the zero point from the initial voltage sampling sequence, and then accumulating N consecutive b data, using this N b The root mean square value of each data is calculated to obtain the effective value of the voltage; similarly, by finding the zero point from the initial current sampling sequence, and then accumulating N consecutive currents from the zero point backward b data, using this N b The RMS value is calculated from the data to get the effective value of the current.

[0082] In the electrical parameter calculation method provided in some embodiments of the present invention, the interpolation resampling process in step S240 is implemented using the following formula:

[0083] y m =k n +(k n+1 -k n )*(Δ*mn);

[0084] Where: k n 、k n+1 are the nth and n+1th data in the initial voltage sampling sequence or the initial current sampling sequence respectively; m is the mth data of the voltage resampling sequence or the current resampling sequence; Δ is the step value of interpolation resampling, Δ=N b / N s , N b is the number of sampling points, N s is the number of resampling frequency points; n and m are both integers and n is the floor value of Δ*m.

[0085] In this embodiment, it is equivalent to using a specific resampling frequency f s '=N s *f b , interpolation resampling is performed on the initial voltage sampling sequence or the initial current sampling sequence to obtain a resampling sequence of n points with a cycle of exactly 2. It can be understood that when k n 、k n+1 When the nth and n+1th data in the initial voltage sampling sequence are respectively, y m is the mth data of the voltage resampling sequence; when k n 、k n+1 When the nth and n+1th data in the initial current sampling sequence are respectively, y m is the mth data of the current resampling sequence. It should also be noted that the purpose of the interpolation resampling process is to meet the conditions of the subsequent FFT operation. The effect of the interpolation resampling process can be referred to Figure 6 As shown in the figure, the basic principle is to use the original sampling sequence data whose frequency points may not be the set value, and use the interpolation algorithm to calculate the resampling sequence whose frequency points are the set value.

[0086] In the electrical parameter calculation method provided in some embodiments of the present invention, calculating the harmonic electrical parameters of the voltage signal and the current signal in step S240 includes:

[0087] The continuous full-cycle data in the voltage resampling sequence and the current resampling sequence are used to perform FFT operation to obtain the real part data and imaginary part data of each harmonic.

[0088] It is understood that FFT (Fast Fourier Transform) is a fast Fourier transform, which is an efficient discrete Fourier transform algorithm that can transform a discrete sequence in the time domain into the frequency domain in order to analyze the amplitude and phase parameters of each harmonic frequency point contained in the original signal. According to the characteristics of the FFT algorithm, the harmonic frequency resolution f of the final calculation result is: f = f s ' / N=N s *f b / N, where N is the number of resampling points for FFT operation. s When they are equal, f is equal to f b , which is the fundamental frequency.

[0089] In the electric parameter calculation method provided in some embodiments of the present invention, the harmonic phase is calculated using the following formula:

[0090]

[0091] in: is the phase of the nth harmonic, im n is the imaginary part of the nth harmonic, re n is the real part of the nth harmonic.

[0092] It can be understood that the phase of the measured signal can be calculated using the FFT operation result of the previous step. The harmonic frequency resolution expression calculated by the above formula is: b At this time, n=0 represents the data of the DC component, n=1 represents the phase of the fundamental wave, and n>1 represents the phase of the harmonic.

[0093] In some embodiments of the present invention, the electrical parameter calculation method further includes calculating the harmonic amplitude and harmonic content using the following formula:

[0094]

[0095] Among them, rms n is the amplitude of the nth harmonic, rms1 is the amplitude of the fundamental wave, r n is the content of the nth harmonic. Similarly, it can be understood that when n=1, it represents the amplitude of the fundamental wave, and when n>1, it represents the amplitude of the harmonic.

[0096] In the electrical parameter calculation method provided in some embodiments of the present invention, the harmonic distortion is calculated using the following formula:

[0097]

[0098] Where d is the harmonic distortion.

[0099] In the electrical parameter calculation method provided in some embodiments of the present invention, the harmonic power is calculated using the following formula:

[0100] p n =u nre *i nre +u nim *i nim ;

[0101] q n =u nime *i nre -u nre *i nim ;

[0102] Among them, p n is the nth harmonic active power, q n is the nth harmonic reactive power, u nre is the real part of the nth harmonic voltage, u nim is the imaginary part of the nth harmonic voltage, i nre is the real part of the nth harmonic current, inim is the imaginary part of the nth harmonic current.

[0103] According to an embodiment of the present invention, a method for calculating electrical parameters of an electric meter is provided. Before finding the zero crossing point for calculating the number of cycle sampling points, an initial voltage sampling sequence is first filtered using a low-pass filter to remove interference from harmonics and noise on finding the zero crossing point. Then, the zero crossing point is found based on the filtered intermediate voltage sequence, and the number of signals between two adjacent zero crossing points is counted to determine the number of cycle sampling points. In addition, before calculating the effective value of voltage and effective value of current, zero crossing points are first found in the initial voltage sampling sequence and the initial current sampling sequence. Then, data is continuously acquired from the zero crossing points of the initial voltage sampling sequence and the initial current sampling sequence for calculation according to the number of cycle sampling points, thereby reducing the error caused by occasional rounding error fluctuations in the number of cycle sampling points. Finally, the initial voltage sampling sequence and the initial current sampling sequence are interpolated and resampled according to the number of cycle sampling points and a second resampling frequency, and the harmonic electrical parameters of the voltage and current signals are calculated based on the obtained voltage and current resampling sequences. This method can effectively improve the accuracy of electrical parameter calculation when the measured signal contains a large amount of high-order harmonics.

[0104] In addition, refer to Figure 7 The second embodiment of the present invention provides a control device 700, including a memory 710, a processor 720, and a computer program stored in the memory 710 and executable on the processor 720. The processor 720 executes the program to implement the electric parameter calculation method of the first embodiment, for example, Figure 2 Method steps S210 to S240.

[0105] In addition, a third embodiment of the present invention provides an AC meter, comprising the control device 700 of the second embodiment.

[0106] In addition, a fourth aspect of the present invention provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are used to enable a computer to execute the electric parameter calculation method of the first aspect of the present invention, such as executing Figure 2 Method steps S210 to S240.

[0107] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on computer-readable media, which can include computer storage media or non-transitory media and communication media or transient media. As is well known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVDs) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0108] The embodiments of the present invention are described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by ordinary technicians in the technical field without departing from the spirit of the present invention.

Claims

1. A method for calculating electrical parameters of an electric meter, characterized in that: include: Sampling the voltage signal and the current signal respectively according to a first sampling rate to obtain an initial voltage sampling sequence and an initial current sampling sequence; Using a low-pass filter to filter the initial voltage sampling sequence to obtain an intermediate voltage sequence, and determining the number of cycle sampling points between two adjacent zero-crossing points based on the intermediate voltage sequence; Finding a zero-crossing point from the initial voltage sampling sequence and the initial current sampling sequence, and continuously acquiring data starting from the zero-crossing point according to the number of cycle sampling points to calculate the effective value of voltage and the effective value of current; The initial voltage sampling sequence and the initial current sampling sequence are interpolated and resampled according to the number of cycle sampling points and the second resampling frequency to obtain a voltage resampling sequence and a current resampling sequence to calculate the harmonic electrical parameters of the voltage signal and the current signal.

2. The electric parameter calculation method according to claim 1, characterized in that: The first sampling rate is denoted as f s And meet: in s >2f MAX ; Among them, f MAX is the highest frequency value that needs to be detected in the voltage signal or the current signal.

3. The electric parameter calculation method according to claim 1, characterized in that: The low-pass filter is a second-order IIR low-pass filter, and the calculation formula is: y n =b0x n +b1x n-1 +b2x n-2 +a1y n-1 +a2y n-2 ; Among them, x n 、x n-1 、x n-2 are the nth, n-1th, and n-2th data in the initial voltage sampling sequence respectively; y n 、y n-1 、y n-2 are the nth, n-1th, and n-2th data in the intermediate voltage sequence respectively; b0, b1, b2, a1, and a2 are preset constants respectively.

4. The electric parameter calculation method according to claim 2, characterized in that: It also includes calculating the frequency f of the voltage signal using the following formula b : f b =f s / N b ; Where: N b is the number of sampling points of the cycle.

5. The electric parameter calculation method according to claim 1, characterized in that: The voltage effective value and the current effective value are calculated using the following formula: Among them: U rms is the effective value of the voltage, I rms is the effective value of the current, u n is the nth data in the initial voltage sampling sequence, i n is the nth data in the initial current sampling sequence, N b is the number of sampling points of the cycle.

6. The electric parameter calculation method according to claim 1, characterized in that: The interpolation resampling process is implemented using the following formula: y m =k n +(k n+1 -k n )*(Δ*m-n); Where: k n 、k n+1 are the nth and n+1th data in the initial voltage sampling sequence or the initial current sampling sequence respectively; m is the mth data of the voltage resampling sequence or the current resampling sequence; Δ is the step value of interpolation resampling, Δ=N b / N s , N b is the number of sampling points of the cycle, N s is the number of resampling frequency points; n and m are both integers and n is the floor value of Δ*m.

7. The electric parameter calculation method according to claim 6, characterized in that: The calculating of harmonic electrical parameters of the voltage signal and the current signal includes: Performing FFT calculations on the continuous full-cycle data in the voltage resampling sequence and the current resampling sequence to obtain real and imaginary data of each harmonic; The electrical parameter calculation method further includes calculating the harmonic phase using the following formula: in: is the phase of the nth harmonic, im n is the imaginary part of the nth harmonic, re n is the real part of the nth harmonic.

8. The electric parameter calculation method according to claim 7, characterized in that: It also includes the calculation of harmonic amplitude and harmonic content using the following formulas: Among them, rms n is the amplitude of the nth harmonic, rms1 is the amplitude of the fundamental wave, r n is the content of the nth harmonic.

9. The electric parameter calculation method according to claim 8, characterized in that: It also includes the calculation of harmonic distortion using the following formula: Where d is the harmonic distortion.

10. The electric parameter calculation method according to claim 7, characterized in that: It also includes the calculation of harmonic power using the following formula: p n =in nre *and nre +in nim *and nim ; q n =u nime *i nre -u nre *i nim ; Among them, p n is the nth harmonic active power, q n is the nth harmonic reactive power, u nre is the real part of the nth harmonic voltage, u nim is the imaginary part of the nth harmonic voltage, i nre is the real part of the nth harmonic current, i nim is the imaginary part of the nth harmonic current.

11. A control device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for calculating electrical parameters according to any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the electric parameter calculation method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Double-spectral-line interpolation DFT harmonic analysis method and system based on spectral resolution self-adaption and medium

    CN111308199A

  • Fundamental frequency measurement method, measurement terminal and storage medium

    CN111896807A

  • Measurement and control device and method for higher harmonic suppression of power system

    CN115372698A

  • Harmonic power determination method and device, electricity meter and readable storage medium

    CN119986124A

  • Calibration phase value determination method and device, storage medium and electric metering equipment

    CN120065099A

Cited By

  • Rapid power calculation method suitable for electric energy meter and use and acquisition terminal, electric energy meter and use and acquisition terminal

    CN121231850A