CN113777400A - Software frequency conversion sampling metering method for standard electric energy meter - Google Patents
Software frequency conversion sampling metering method for standard electric energy meter Download PDFInfo
- Publication number
- CN113777400A CN113777400A CN202111331296.1A CN202111331296A CN113777400A CN 113777400 A CN113777400 A CN 113777400A CN 202111331296 A CN202111331296 A CN 202111331296A CN 113777400 A CN113777400 A CN 113777400A
- Authority
- CN
- China
- Prior art keywords
- sampling
- metering
- voltage
- period
- current
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R22/00—Arrangements for measuring time integral of electric power or current, e.g. electricity meters
- G01R22/06—Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods
- G01R22/10—Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods using digital techniques
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Measurement Of Current Or Voltage (AREA)
Abstract
The invention discloses a standard electric energy meter software frequency conversion sampling metering method, and belongs to the field of electric energy metering. The technical scheme comprises the following steps: setting initial power frequency voltage frequency and sampling number per period, calculating initial A/D sampling frequency, and determining sampling interval; starting A/D sampling, sampling voltage and current, and recording a sampling value and a sampling sequence value; judging whether the voltage passes through zero upwards or not; calculating the time between two sampling points before and after the voltage zero crossing point; accumulating the electric quantity before the zero crossing point to the current metering period; calculating the metering power and the accumulated total electric quantity of the metering period; calculating and setting a new sampling frequency; saving the current sampling data and entering a new sampling period; and continuing A/D sampling and recording the sampling value and the sampling sequence value. The invention provides a high-precision electric energy metering method, which eliminates metering errors generated by non-whole periods in metering sampling, can achieve very high metering precision, does not need complex hardware devices, and completes high-precision metering.
Description
Technical Field
The invention relates to the field of electric energy metering, in particular to a standard electric energy meter software frequency conversion sampling metering method.
Background
The electric energy metering is realized by combining a secondary circuit, a mutual inductor and an electric energy meter according to a certain structure. The electric energy metering device is used for metering the electricity consumption, and the accuracy of the electric energy metering device has direct influence on the economic benefits of both power supply parties. Therefore, the accuracy of power consumption metering is improved, the comprehensive error of the metering device is reduced to the maximum extent, and fair and reasonable charging can be really achieved. The precision required by the existing standard table is generally 0.05%, and the highest precision is difficult to achieve to be 0.01%.
The electric energy meter is developed to the existing electronic electric energy meter from an electromechanical type, the electronic electric energy meter is metered to the existing digital metering from analog multiplication, and the precision is continuously improved. When the current electronic electric energy meter works, voltage and current are respectively sampled by the sampling circuit and then sent to the amplifying circuit for buffering and amplification, and then are converted into digital signals by the metering chip, and the high-performance microcontroller is responsible for analyzing and processing data and calculating voltage, current frequency, phase, power and electric quantity.
Disclosure of Invention
In order to solve the problems, the invention provides a standard electric energy meter software variable frequency sampling metering method aiming at the metering error generated by the non-whole period of sampling different frequency signals under the fixed sampling frequency, and the purpose of the invention can be realized by the following technical scheme:
a standard electric energy meter software frequency conversion sampling metering method comprises the following steps:
step 1: setting initial power frequency voltage frequency and sampling number per period, calculating initial A/D sampling frequency, and determining sampling interval;
step 2: starting A/D sampling, sampling voltage and current, and recording a sampling value and a sampling sequence value;
step 3, judging whether the voltage passes through zero upwards or not, namely judging whether a sampling period of voltage sampling is finished or not, jumping to step 5 if the sampling period of the voltage sampling is finished, and continuing to step 4 if the sampling period is not finished;
and 4, step 4: accumulates the electric quantity in the sampling period and then jumps to step 11
And 5: calculating the time between two sampling points before and after the voltage zero crossing point;
step 6: accumulating the electric quantity before the zero crossing point to the current metering period;
and 7: calculating the metering power and the accumulated total electric quantity of the metering period;
and 8: calculating and setting a new sampling frequency;
and step 9: saving the current sampling data, using the current sampling data as the next time for judging whether the sampling is over zero, and entering a new sampling period;
step 10: continuing A/D sampling and recording a sampling value and a sampling sequence value;
step 11: and (5) circularly executing the step 3 to the step 10.
Further, the initial power frequency voltage frequency set in step 1 is f, the number of samples per cycle is m, the sampling rate fs = m × f, and the sampling interval T = 1/fs.
Further, in step 2, V0,V1,V2Representing a stored variable of voltage sampled values, I0,I1,I2Representing stored variables of sampled values of the current, the sampled values being stored first in V0 、I0When a new sampling value is stored in V0 、I0In the middle, V will now be0 、I0Transferring the median value to V1 、I1Middle, and so on; um is the sampled voltage amplitude, Im is the sampled current amplitude,
the sampling can be started at any time t, and the current voltage sampling value V is recorded1Value of current sample I1A sample sequence count of n =1, where n is a count of the number of samples in each period of the voltage, the 1 st sample at the beginning of each period n =1,
V1=Um*sin(2πf t) ;I1=Im*sin(2πf t-φ) ;V0= V1; I0= I1。
further, in step 3, it is determined whether the voltage crosses zero upwards, i.e. whether V1<0 and V2Not less than 0 or V1≤0 and V2>0。
Further, in step 4, the power in the sampling period is accumulated, SUM = SUM + V1*I1*T;At the same time, the sample sequence count is increased by 1, i.e. n = n + 1.
Further, in step 5, the time T before the zero-crossing point0= -T*V1/(V2-V1) (ii) a Time T after zero crossing1= T*V2/(V2-V1)。
Further, in step 6, the amount of electricity before the zero-crossing point is accumulated to the present metering period, SUM = SUM + V1*I1*T0。
Further, in step 7, the power P = SUM/(n × T + T) is calculated0+T2) And calculating the total electric quantity Q = SUM + Q.
Further, in step 8, the new sampling frequency is set to f =1/(n × T + T)0+T2)。
Further, in step 9, the current sample data, V, is saved1=V2,I1=I2(ii) a After entering a new sampling period, T after the zero crossing point0The charge of the time segment is discharged to a new sampling period, i.e. SUM = V1*I1*T0(ii) a The sampling sequence count is set to 1, i.e., n = 1; preservation of T1To T2For calculation of new sampling frequency, i.e. T2=T1。
Further, in step 10, the voltage sample value V is recorded2Value of current sample I2;t=t+T;V1=Um*sin(2πf t);I1=Im*sin(2πf t-φ)。
The beneficial technical effects of the invention are as follows: the high-precision electric energy metering method eliminates the metering error generated by non-whole period in metering sampling, achieves high metering precision, does not need complex hardware devices, and realizes high-precision metering.
Drawings
FIG. 1 is a general flow chart of a standard electric energy meter software frequency conversion sampling metering method.
Fig. 2 is a simulation operation result of the standard electric energy meter software frequency conversion sampling measurement method based on the specific embodiment of the invention.
Fig. 3 is a simulation operation result of the standard electric energy meter software frequency conversion sampling measurement method based on the specific embodiment of the invention.
Detailed Description
Hereinafter, embodiments of the present invention will be further described with reference to the accompanying drawings.
Fig. 1 shows a general flowchart of a standard electric energy meter software frequency conversion sampling metering method, which includes the following steps:
step 1: setting initial power frequency voltage frequency and sampling number per period, calculating initial A/D sampling frequency, and determining sampling interval;
step 2: starting A/D sampling, sampling voltage and current, and recording a sampling value and a sampling sequence value;
step 3, judging whether the voltage passes through zero upwards or not, namely judging whether a sampling period of voltage sampling is finished or not, jumping to step 5 if the sampling period of the voltage sampling is finished, and continuing to step 4 if the sampling period is not finished;
and 4, step 4: accumulates the electric quantity in the sampling period and then jumps to step 11
And 5: calculating the time between two sampling points before and after the voltage zero crossing point;
step 6: accumulating the electric quantity before the zero crossing point to the current metering period;
and 7: calculating the metering power and the accumulated total electric quantity of the metering period;
and 8: calculating and setting a new sampling frequency;
and step 9: saving the current sampling data, using the current sampling data as the next time for judging whether the sampling is over zero, and entering a new sampling period;
step 10: continuing A/D sampling and recording a sampling value and a sampling sequence value;
step 11: and (5) circularly executing the step 3 to the step 10.
The initial power frequency voltage frequency set in step 1 is f, the number of samples per cycle is m, fs = m × f, and the sampling interval T = 1/fs.
In step 2, sampling can be started at any time t, and the current voltage sampling value V is recorded1Value of current sample I1Sampling sequence meterThe number n =1, where n is a count of the number of samples of the voltage per cycle, the 1 st sample n =1 at the beginning of each cycle;
V1=Um*sin(2πf t) ;I1=Im*sin(2πf t-φ) ;V0= V1; I0= I1。
in step 3, it is determined whether the voltage crosses zero upwards, i.e. whether V is determined1<0 and V2Not less than 0 or V1≤0 and V2>0。
In step 4, the power in the sampling period is accumulated, SUM = SUM + V1*I1T; at the same time, the sample sequence count is increased by 1, i.e. n = n + 1.
In step 5, the time T before the zero crossing0= -T*V1/(V2-V1) (ii) a Time T after zero crossing1= T*V2/(V2-V1)。
In step 6, the amount of electricity before the zero-crossing point is accumulated to the present metering period, SUM = SUM + V1*I1*T0。
In step 7, the power P = SUM/(n × T + T) is calculated0+T2) And calculating the total electric quantity Q = SUM + Q.
In step 8, the new sampling frequency is set to f =1/(n × T + T)0+T2)。
In step 9, after entering a new sampling period, the current sample data, V, is saved1=V2,I1=I2(ii) a T after zero crossing0The charge of the time segment is discharged to a new sampling period, i.e. SUM = V1*I1T0; the sampling sequence count is set to 1, i.e., n = 1; preservation of T1To T2For calculation of new sampling frequency, i.e. T2=T1。
In step 10, the voltage sample values V are recorded2Value of current sample I2;t=t+T;V1=Um*sin(2πf t);I1=Im*sin(2πf t-φ)。
As shown in fig. 2 and fig. 3, a simulation operation result of the standard electric energy meter software frequency conversion sampling measurement method based on the specific embodiment of the present invention is shown. Assume an input voltage of 220V, a current of 10A, and a current phase of 60 degrees.
Step 1: setting initial power frequency voltage frequency, sampling number per period, calculating initial A/D sampling frequency, and determining sampling interval; an initial voltage (current) frequency of 50Hz is set, 360 samples per cycle, fs =50 × 360=18000, and a sampling interval T = 1/18000.
Step 2: starting A/D sampling, and recording the sampling value and the sampling sequence value. The sampling can be started at any time t (assuming t =0.01 s), and the current voltage sample value V is recorded1Value of current sample I1Sample sequence count n = 1. (n is used as a count of the number of samples of voltage per cycle, with the 1 st sample at the beginning of each cycle n = 1);
V0=V1;I0=I1。
and step 3: and judging whether the voltage sampling is finished in one sampling period or not, and judging whether the voltage passes through zero upwards or not. Judging whether V is present1<0 and V2Not less than 0 or V1≤0 and V2>0; and if the voltage sampling is finished in one sampling period, jumping to the step 5, and if the voltage sampling is not finished in one sampling period, continuing to the step 4.
And 4, step 4: accumulating the electric quantity in the sampling period, then jumping to step 11, and calculating SUM = SUM + V1*I1T; sample sequence count is increased by 1: n = n + 1.
And 5: calculating the time between two sampling points before and after the voltage zero crossing point; calculating the time T before the zero crossing0= -T*V1/(V2-V1) Calculating the time T after the zero crossing1= T*V2/(V2-V1)。
Step 6: accumulating the electric quantity before the zero crossing point to the metering period, and calculating SUM = SUM + V1*I1*T0。
And 7: calculating the metering power and the metering electric quantity of the metering period, wherein the calculated power P = SUM/(n × T + T)0+T2) (ii) a The calculated power Q = SUM + Q.
And 8: calculating and setting a new sampling frequency, the new sampling frequency f =1/(n × T + T)0+T2)。
And step 9: and storing the current sampling data, using the current sampling data as the next time for judging whether the sampling is over zero, and entering a new sampling period. V1=V2,I1=I2(ii) a Will T0The charge of the time segment is accumulated to a new sampling period: SUM = V1*I1*T0(ii) a Sample sequence count set 1: n = 1; preservation of T1To T2For the calculation of the new sampling frequency: t is2=T1。
Step 10: continuing A/D sampling, recording the sampling value and sampling sequence value, and recording the current voltage sampling value V2Value of current sample I2。t=t+T;
Step 11: and (5) circularly executing the step 3 to the step 10.
As shown in fig. 2 and fig. 3, according to the simulation operation result of the standard electric energy meter software frequency conversion sampling measurement method based on the specific embodiment of the present invention, it is assumed that the voltage and the current values are respectively:
sampling 360 points per cycle; calculating the electric quantity error according to the electric quantity accumulated by the standard power, wherein the power standard value is 1100, and the accumulated electric quantity standard value of 100 cycles is as follows: 2444.4444, wherein: maximum error of each cycle power calculated by simulation: -3.72e-5And the error of the accumulated electric quantity calculated by simulation: -3.60e-5. The simulation calculation result in the embodiment of the method shows that the power measurement precision and the accumulated electric quantity precision of the method can reach 0.01 percent, the measurement precision requirement of a high-precision standard electric energy meter is met, and the measurement precision exceeds the current standard meter.
The number of samples per period in the embodiment of the method is not limited to 360, and can be adjusted according to actual conditions, and the higher the number of samples per period is, the higher the metering accuracy is.
In conclusion, the invention discloses a software variable sampling frequency metering method for a standard electric energy meter, which can simplify the design complexity of the standard electric energy meter due to the design of the high-precision standard electric energy meter.
The above-mentioned embodiments are illustrative of the specific embodiments of the present invention, and are not restrictive, and those skilled in the relevant art can make various changes and modifications to the corresponding equivalent technical solutions without departing from the spirit and scope of the present invention, so that all equivalent technical solutions should be included in the scope of the present invention.
Claims (11)
1. A standard electric energy meter software frequency conversion sampling metering method is characterized by comprising the following steps:
step 1: setting initial power frequency voltage frequency and sampling number per period, calculating initial A/D sampling frequency, and determining sampling interval;
step 2: starting A/D sampling, sampling voltage and current, and recording a sampling value and a sampling sequence value;
step 3, judging whether the voltage passes through zero upwards or not, namely judging whether a sampling period of voltage sampling is finished or not, jumping to step 5 if the sampling period of the voltage sampling is finished, and continuing to step 4 if the sampling period is not finished;
and 4, step 4: accumulating the electric quantity in the sampling period, and then jumping to the step 11;
and 5: calculating the time between two sampling points before and after the voltage zero crossing point;
step 6: accumulating the electric quantity before the zero crossing point to the current metering period;
and 7: calculating the metering power and the accumulated total electric quantity of the metering period;
and 8: calculating and setting a new sampling frequency;
and step 9: saving the current sampling data, using the current sampling data as the next time for judging whether the sampling is over zero, and entering a new sampling period;
step 10: continuing A/D sampling and recording a sampling value and a sampling sequence value;
step 11: and (5) circularly executing the step 3 to the step 10.
2. The method according to claim 1, wherein the initial power frequency voltage frequency set in step 1 is f, the number of samples per cycle is m, the sampling rate fs = m × f, and the sampling interval T = 1/fs.
3. The standard electric energy meter software frequency conversion sampling metering method according to claim 2, characterized in that in step 2, V0,V1,V2Representing a stored variable of voltage sampled values, I0,I1,I2Representing stored variables of sampled values of the current, the sampled values being stored first in V0 、I0When a new sampling value is stored in V0 、I0In the middle, V will now be0 、I0Transferring the median value to V1 、I1Middle, and so on; um is the sampled voltage amplitude, Im is the sampled current amplitude,
the sampling may start at any time tRecording the current voltage sampling value V1Value of current sample I1A sample sequence count of n =1, where n is a count of the number of samples in each period of the voltage, the 1 st sample at the beginning of each period n =1,
V1=Um*sin(2πf t) ;I1=Im*sin(2πf t-φ) ;V0= V1; I0= I1。
4. the standard electric energy meter software frequency conversion sampling metering method according to claim 3, characterized in that in step 3, whether the voltage passes through zero upwards or not is judged, namely whether V is judged or not1<0 and V2Not less than 0 or V1≤0 and V2>0。
5. The method according to claim 4, wherein in step 4, the electric quantity in the sampling period is accumulated, and SUM = SUM + V1*I1T; at the same time, the sample sequence count is increased by 1, i.e. n = n + 1.
6. The method according to claim 5, wherein in step 5, the time T before the zero crossing point is measured0= -T*V1/(V2-V1) (ii) a Time T after zero crossing1= T*V2/(V2-V1)。
7. The method as claimed in claim 6, wherein in step 6, the electric quantity before the zero crossing point is accumulated to the current metering period, SUM = SUM + V1*I1*T0。
8. The method according to claim 7, wherein in step 7, the calculation power P = SUM/(n × T + T)0+T2) And calculating the total electric quantity Q = SUM + Q.
9. The method according to claim 8, wherein in step 8, the new sampling frequency is set to f =1/(n x T + T)0+T2)。
10. The standard electric energy meter software frequency conversion sampling metering method according to claim 9, characterized in that in step 9, the current sampling data, V, is stored1=V2,I1=I2(ii) a After entering a new sampling period, T after the zero crossing point0The charge of the time segment is discharged to a new sampling period, i.e. SUM = V1*I1*T0(ii) a The sampling sequence count is set to 1, i.e., n = 1; preservation of T1To T2For calculation of new sampling frequency, i.e. T2=T1。
11. The method as claimed in claim 10, wherein in step 11, the voltage sampled value V is recorded2Value of current sample I2; t=t+T;V1=Um*sin(2πf t);I1=Im*sin(2πf t-φ)。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111331296.1A CN113777400A (en) | 2021-11-11 | 2021-11-11 | Software frequency conversion sampling metering method for standard electric energy meter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111331296.1A CN113777400A (en) | 2021-11-11 | 2021-11-11 | Software frequency conversion sampling metering method for standard electric energy meter |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113777400A true CN113777400A (en) | 2021-12-10 |
Family
ID=78873823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111331296.1A Withdrawn CN113777400A (en) | 2021-11-11 | 2021-11-11 | Software frequency conversion sampling metering method for standard electric energy meter |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113777400A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102495282A (en) * | 2011-12-27 | 2012-06-13 | 国电南瑞科技股份有限公司 | Measuring method of alternating current voltage frequency |
CN104155517A (en) * | 2014-09-03 | 2014-11-19 | 国家电网公司 | Error compensation method and system for non-full period sampling of digital electric energy meter |
CN109709390A (en) * | 2018-12-19 | 2019-05-03 | 深圳市中电电力技术股份有限公司 | A kind of three-phase high-precision harmonic electric energy meter |
CN209342802U (en) * | 2018-03-19 | 2019-09-03 | 深圳市航智精密电子有限公司 | The metering circuit of direct current instantaneous power |
CN110244116A (en) * | 2018-03-19 | 2019-09-17 | 深圳市航智精密电子有限公司 | The metering circuit of direct current instantaneous power and its plesiochronous calculation method |
CN110297125A (en) * | 2019-06-12 | 2019-10-01 | 国网浙江省电力有限公司电力科学研究院 | A kind of intelligent electric energy meter having non-intrusion type load monitoring function |
CN112213557A (en) * | 2019-12-20 | 2021-01-12 | 青岛鼎信通讯股份有限公司 | Direct-current metering method for electric energy meter |
-
2021
- 2021-11-11 CN CN202111331296.1A patent/CN113777400A/en not_active Withdrawn
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102495282A (en) * | 2011-12-27 | 2012-06-13 | 国电南瑞科技股份有限公司 | Measuring method of alternating current voltage frequency |
CN104155517A (en) * | 2014-09-03 | 2014-11-19 | 国家电网公司 | Error compensation method and system for non-full period sampling of digital electric energy meter |
CN209342802U (en) * | 2018-03-19 | 2019-09-03 | 深圳市航智精密电子有限公司 | The metering circuit of direct current instantaneous power |
CN110244116A (en) * | 2018-03-19 | 2019-09-17 | 深圳市航智精密电子有限公司 | The metering circuit of direct current instantaneous power and its plesiochronous calculation method |
CN109709390A (en) * | 2018-12-19 | 2019-05-03 | 深圳市中电电力技术股份有限公司 | A kind of three-phase high-precision harmonic electric energy meter |
CN110297125A (en) * | 2019-06-12 | 2019-10-01 | 国网浙江省电力有限公司电力科学研究院 | A kind of intelligent electric energy meter having non-intrusion type load monitoring function |
CN112213557A (en) * | 2019-12-20 | 2021-01-12 | 青岛鼎信通讯股份有限公司 | Direct-current metering method for electric energy meter |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103257271A (en) | Device and method for detecting micro grid harmonic wave and inter-harmonics based on STM32F107VCT6 | |
CN104808056B (en) | A kind of frequency characteristic test method and apparatus based on comparator conversion | |
CN103852637B (en) | Intelligent electric meter with fundamental wave metering function and measurement method thereof | |
CN202093092U (en) | All-round power metering chip | |
CN106932642B (en) | Electric Power Harmonic Analysis method | |
CN101499791A (en) | PWM control method | |
CN203287435U (en) | A micro electrical network harmonic wave and inter-harmonic wave test apparatus based on an STM32F107VCT6 | |
CN102332918A (en) | Quick high-precision method for sampling analog quantity in alternating current speed regulating system of mine hoist | |
CN103499733B (en) | High-precision voltage detection circuit and method | |
CN113777400A (en) | Software frequency conversion sampling metering method for standard electric energy meter | |
CN104426548B (en) | A kind of analog-to-digital conversion sample circuit and computation chip | |
CN108241129A (en) | Switching power supply output filter capacitor monitoring device and method | |
CN104931826A (en) | Phase error test device and method of analog input type merging unit | |
CN107104674B (en) | Noise power estimation device in electric parameter measurement process | |
CN107356799A (en) | A kind of electric current delay method of sampling | |
CN108362940B (en) | Dynamic harmonic frequency extraction method of half-cycle distortion signal | |
CN115291158A (en) | Automatic electric quantity calibration method and device of settlement metering device | |
CN106932746B (en) | Electronic current transformer performance test system and method | |
CN110086197A (en) | Inductive current sampling calculation method | |
CN115639400A (en) | High-precision alternating current electric energy metering method | |
CN112035786B (en) | Current algorithm of battery management system | |
CN106645926B (en) | A kind of method of three-phase circuit power measuring and calculating | |
CN209841927U (en) | Meter source integrated synchronous dynamic distortion power source with trigger | |
CN102721862B (en) | Method for reducing electric energy pulse jitter | |
CN101888172B (en) | Power factor correction device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20211210 |