Method and system for improving metering precision of three-phase cost control intelligent electric meter based on MCU

文档序号:632249 发布日期:2021-05-11 浏览:24次 中文

阅读说明:本技术 一种基于mcu提高三相费控智能电表计量精度的方法及系统 (Method and system for improving metering precision of three-phase cost control intelligent electric meter based on MCU ) 是由 孙林忠 洪晨力 马巧娟 余武军 王勤龙 于 2020-12-14 设计创作,主要内容包括:本发明涉及的一种基于MCU提高三相费控智能电表计量精度的方法,包括步骤:S11.在电表的MCU中对高频脉冲常数HFconst进行分频;S12.将分频后的高频脉冲常数HFconst写入计量芯片的高频脉冲常数寄存器中;S13.计量芯片的快速脉冲寄存器开始计数;S14.判断计量芯片的快速脉冲寄存器的计数值是否大于等于分频后的高频脉冲常数HFconst,若是,则执行步骤S15;若否,则继续执行步骤S13;S15.计量芯片的能量寄存器中的数据累计增加1;S16.MCU读取能量寄存器的计量数据。本发明对高频脉冲常数HFconst进行N分频后,快速脉冲寄存器计数的基数比原先减少了N倍,单位时间内计量的快速计量脉冲数是原先的N倍,计量精度与计量速度提升为原先的N倍。(The invention relates to a method for improving the metering precision of a three-phase cost control intelligent electric meter based on an MCU (microprogrammed control Unit), which comprises the following steps of: s11, frequency division is carried out on a high-frequency pulse constant HFconst in an MCU of the ammeter; s12, writing the high-frequency pulse constant HFconst after frequency division into a high-frequency pulse constant register of a metering chip; s13, starting counting by a fast pulse register of the metering chip; s14, judging whether the count value of the fast pulse register of the metering chip is larger than or equal to the high-frequency pulse constant HFconst after frequency division, if so, executing a step S15; if not, continue to step S13; s15, adding 1 to the data accumulation in an energy register of the metering chip; and S16, reading the metering data of the energy register by the MCU. After the high-frequency pulse constant HFconst is subjected to N frequency division, the base number counted by the rapid pulse register is reduced by N times compared with the original base number, the number of rapid metering pulses metered in unit time is N times of the original base number, and the metering precision and the metering speed are improved to N times of the original base number.)

1. A method for improving the metering accuracy of a three-phase cost control intelligent electric meter based on an MCU (microprogrammed control Unit) is characterized by comprising the following steps:

s1, frequency division is carried out on a high-frequency pulse constant HFconst in an MCU of an ammeter;

s2, writing the high-frequency pulse constant HFconst after frequency division into a high-frequency pulse constant register of a metering chip;

s3, starting counting by a fast pulse register of the metering chip;

s4, judging whether the count value of the fast pulse register of the metering chip is larger than or equal to the high-frequency pulse constant HFconst after frequency division, if so, executing a step S5; if not, continue to step S3;

s5, adding 1 to the data accumulation in an energy register of the metering chip;

and S6, reading the metering data of the energy register by the MCU.

2. The method for improving the metering accuracy of the three-phase fee-controlled intelligent electric meter according to the claim 1, wherein the step S1 is to divide the frequency of the high-frequency pulse constant HFconst in the MCU of the electric meter, which is expressed as: HFconst/N; where N denotes a frequency division number.

3. The method for improving the metering accuracy of the three-phase fee-controlled smart meter based on the MCU as claimed in claim 2, wherein the data accumulation increase in the energy register of the metering chip in the step S5 is specifically that the minimum unit of the fast pulse register is 1/EC/HFconst/nwh, and the energy register performs the metering accumulation increase with 1/EC/N as the minimum unit; where EC represents the meter constant.

4. The method for improving the metering accuracy of the three-phase fee-controlled intelligent electric meter based on the MCU as recited in claim 1, wherein the fast pulse register of the metering chip in the step S3 comprises one or more of FstCntA, FstCntB, FstCntC and FstCntT.

5. The method for improving the metering accuracy of the three-phase fee-controlled smart meter based on the MCU as recited in claim 1, wherein the energy register of the metering chip in the step S5 comprises one or more of Epa, Epb, Epc and Ept.

6. The utility model provides a system for it controls smart electric meter measurement accuracy to take based on MCU improves three-phase, its characterized in that includes:

the frequency division module is used for carrying out frequency division on the high-frequency pulse constant HFconst in the MCU of the electric meter;

the writing module is used for writing the high-frequency pulse constant HFconst after frequency division into a high-frequency pulse constant register of the metering chip;

the counting module is used for starting counting by a quick pulse register of the metering chip;

the judging module is used for judging whether the count value of the fast pulse register of the metering chip is more than or equal to the high-frequency pulse constant HFconst after frequency division;

the accumulation module is used for measuring the data accumulation increase 1 in an energy register of the chip;

and the reading module is used for reading the metering data of the energy register by the MCU.

7. The system for improving the metering accuracy of the three-phase fee-control intelligent electric meter based on the MCU as claimed in claim 6, wherein the frequency dividing module divides the high-frequency pulse constant HFconst in the MCU of the electric meter, and is represented as: HFconst/N; where N denotes a frequency division number.

8. The system for improving the metering accuracy of the three-phase fee-control smart meter based on the MCU as claimed in claim 7, wherein the data accumulation increase in the energy register of the metering chip in the accumulation module is specifically that the minimum unit of the fast pulse register is 1/EC/HFconst/N kwh, and the energy register performs the metering accumulation increase with 1/EC/N as the minimum unit; where EC represents the meter constant.

9. The system for improving the metering accuracy of the three-phase fee-control intelligent electric meter based on the MCU as recited in claim 6, wherein the fast pulse register of the metering chip in the counting module comprises one or more of FstCntA, FstCntB, FstCntC and FstCntT.

10. The system for improving the metering accuracy of the three-phase fee-control intelligent electric meter based on the MCU as recited in claim 6, wherein the energy register of the metering chip in the accumulation module comprises one or more of Epa, Epb, Epc and Ept.

Technical Field

The invention relates to the technical field of electric meters, in particular to a method and a system for improving the metering accuracy of a three-phase fee-control intelligent electric meter based on an MCU (microprogrammed control unit).

Background

The three-phase charge control intelligent electric meter is one of basic devices for data acquisition of an intelligent power grid (particularly an intelligent power distribution network), undertakes the tasks of original electric energy data acquisition, metering and transmission, and is the basis for realizing information integration, analysis optimization and information display.

Three-phase cost control smart electric meter is as the terminal of measurement electric energy, and the demand that improves the precision is constantly proposed to power company and user, and at present, the mode that improves three-phase cost control smart electric meter's measurement precision is like: the patent with publication number CN105223416 proposes a method for improving the metering accuracy of a smart meter. The method for improving the metering precision of the intelligent electric meter is wide in metering range and low in cost. The scheme is as follows: dividing the working temperature range of the electric meter from-40 ℃ to +70 ℃ into N1 … Nm intervals, calculating a voltage compensation gain value Ugain and a voltage compensation gain value Igain according to the following formula, and updating in real time, wherein the Ugain is Ugb +/-T (Tx-Tn) U; igain ═ Igb ± (Tx-Tn) × I. Although the method can improve the metering accuracy of the electric meter, the following problems still cannot be solved:

1. the metering in one meter pulse is discarded when the meter is powered down, and the operation is complex.

2. The high-frequency pulse constant HFconst is a fixed value for the same type of meter, and is written into a high-frequency pulse constant register of a special metering chip, and in the prior art, the meter pulse is taken as the minimum unit for metering, and the metering accuracy and speed are limited and limited by the metering chip.

Therefore, the technical problems existing in the prior art are improved.

Disclosure of Invention

The invention aims to provide a method and a system for improving the metering precision of a three-phase cost control intelligent electric meter based on an MCU (microprogrammed control unit) aiming at the defects of the prior art.

In order to achieve the purpose, the invention adopts the following technical scheme:

a method for improving the metering accuracy of a three-phase cost control intelligent electric meter based on an MCU (microprogrammed control Unit) is characterized by comprising the following steps:

s1, frequency division is carried out on a high-frequency pulse constant HFconst in an MCU of an ammeter;

s2, writing the high-frequency pulse constant HFconst after frequency division into a high-frequency pulse constant register of a metering chip;

s3, starting counting by a fast pulse register of the metering chip;

s4, judging whether the count value of the fast pulse register of the metering chip is larger than or equal to the high-frequency pulse constant HFconst after frequency division, if so, executing a step S5; if not, continue to step S3;

s5, adding 1 to the data accumulation in an energy register of the metering chip;

and S6, reading the metering data of the energy register by the MCU.

Further, in step S1, the high frequency pulse constant HFconst is divided in the MCU of the electric meter, which is expressed as: HFconst/N; where N denotes a frequency division number.

Further, in the step S5, the data accumulation increase in the energy register of the metering chip is specifically that the minimum unit of the fast pulse register is 1/EC/HFconst/N kwh, and the energy register performs the metering accumulation increase with 1/EC/N as the minimum unit; where EC represents the meter constant.

Further, the fast pulse register of the metering chip in the step S3 includes one or more of FstCntA, FstCntB, FstCntC, FstCntT.

Further, the energy register of the metering chip in the step S5 includes one or more of Epa, Epb, Epc and Ept.

Correspondingly, still provide a system for improving three-phase expense accuse smart electric meter measurement accuracy based on MCU, include:

the frequency division module is used for carrying out frequency division on the high-frequency pulse constant HFconst in the MCU of the electric meter;

the writing module is used for writing the high-frequency pulse constant HFconst after frequency division into a high-frequency pulse constant register of the metering chip;

the counting module is used for starting counting by a quick pulse register of the metering chip;

the judging module is used for judging whether the count value of the fast pulse register of the metering chip is more than or equal to the high-frequency pulse constant HFconst after frequency division;

the accumulation module is used for measuring the data accumulation increase 1 in an energy register of the chip;

and the reading module is used for reading the metering data of the energy register by the MCU.

Further, in the frequency dividing module, the high-frequency pulse constant HFconst is divided in the MCU of the electric meter, which is expressed as: HFconst/N; where N denotes a frequency division number.

Further, the data accumulation increase in the energy register of the metering chip in the accumulation module is specifically that the minimum unit of the fast pulse register is 1/EC/HFconst/N kwh, and the energy register performs the metering accumulation increase by taking 1/EC/N as the minimum unit; where EC represents the meter constant.

Further, the fast pulse register of the metering chip in the counting module comprises one or more of FstCntA, FstCntB, FstCntC and FstCntT.

Further, the energy register of the metering chip in the accumulation module comprises one or more of Epa, Epb, Epc and Ept.

Compared with the prior art, the invention has the following beneficial effects:

1) after the high-frequency pulse constant HFconst is subjected to N frequency division, the base number counted by the rapid pulse register is reduced by N times compared with the original base number, the number of rapid metering pulses metered in unit time is N times of the original base number, and the metering precision and the metering speed are improved to N times of the original base number.

2) The MCU is used for storing and processing the high-frequency pulse constant HFconst by N frequency division and electric energy metering, and the pulse counting and electric energy metering principle of the metering chip is utilized and is not bound by the pulse counting and electric energy metering principle.

3) The setting of the N value can be set according to the electric energy metering number which needs to be reached, and is not limited by a metering chip.

4) The method is not only suitable for the three-phase electric energy metering chip, but also suitable for other electric energy metering chips;

5) all relevant energy data of the electric meter, including current total and split-phase electric quantity, frozen electric quantity, event-related electric quantity and the like, are processed and stored in scales which are more detailed, and various applications which need to do more detailed management on electric energy can be met.

Drawings

Fig. 1 is a flowchart of a method for improving the metering accuracy of a three-phase cost-control smart meter based on an MCU according to an embodiment one;

fig. 2 is a flowchart of a method for improving the metering accuracy of a three-phase cost-control smart meter based on an MCU according to the second embodiment;

fig. 3 is a system configuration diagram for improving the metering accuracy of the three-phase cost-control smart meter based on the MCU provided in the third embodiment.

Detailed Description

The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.

The invention aims to provide a method and a system for improving the metering precision of a three-phase cost control intelligent electric meter based on an MCU (microprogrammed control unit), aiming at the defects of the prior art.

Example one

The embodiment provides a method for improving the metering accuracy of a three-phase cost control smart electric meter based on an MCU (microprogrammed control Unit), as shown in FIG. 1, the method comprises the following steps:

s11, frequency division is carried out on a high-frequency pulse constant HFconst in an MCU of the ammeter;

s12, writing the high-frequency pulse constant HFconst after frequency division into a high-frequency pulse constant register of a metering chip;

s13, starting counting by a fast pulse register of the metering chip;

s14, judging whether the count value of the fast pulse register of the metering chip is larger than or equal to the high-frequency pulse constant HFconst after frequency division, if so, executing a step S15; if not, continue to step S13;

s15, adding 1 to the data accumulation in an energy register of the metering chip;

and S16, reading the metering data of the energy register by the MCU.

In step S11, the high-frequency pulse constant HFconst is divided in the MCU of the electricity meter.

Carrying out N frequency division on the high-frequency pulse constant HFconst in an MCU of an ammeter to obtain HFconst/N; the embodiment divides the frequency of the high-frequency pulse constant so as to enable the subsequent metering to be more accurate.

In step S13, the fast pulse register of the metering chip starts counting.

The fast pulse registers of the metering chip include one or more of FstCntA, FstCntB, FstCntC, FstCntT.

In step S14, it is determined whether the count value of the fast pulse register of the metering chip is greater than or equal to the divided high frequency pulse constant HFconst, if yes, step S15 is executed; if not, the process continues to step S13.

In step S15, the data accumulation in the energy register of the metering chip is incremented by 1.

When the counting value of the fast pulse register FstCntA/FstCntB/FstCntC/FstCntT of the metering chip is larger than or equal to HFconst/N, 1 is added to the corresponding energy register Epa/Epb/Epc/Ept, the minimum unit of the fast pulse register is 1/EC/HFconst/N kwh, and the corresponding energy register performs metering accumulation by taking 1/EC/N as the minimum unit.

In this embodiment, a HT7038 three-phase metering chip is taken as an example, and pulse constants EC and HFconst are 1000imp/kwh, 100, and 10, respectively.

Taking the example of not dividing frequency in the prior art as an example, the calculation is carried out:

the minimum unit of the electric meter pulse represents that 1/EC is equal to 0.001kwh, the minimum unit of the fast pulse is equal to 1/EC/HFconst is equal to 0.00001kwh, although the minimum unit of the fast metering pulse is 0.00001kwh, the value in the fast pulse counting register is not read and stored, and the metering in a pulse constant is easy to discard when the power is off, thereby affecting the accuracy in the metering precision range.

Taking the frequency division of the present embodiment as an example, the calculation is performed:

the MCU sets and writes the value of the high-frequency pulse constant register to HFconst/N as 100/10 as 10, the minimum unit of the fast pulse in the metering chip is 1/EC/HFconst/N as 0.000001kwh, and when the value counted by the fast pulse counting register FstCntA/FstCntB/FstCntC/FstCntT is more than or equal to 10, the corresponding energy register Epa/Epb/Epc/Ept correspondingly adds 1.

Compared with the pulse counting of the prior art, the pulse counting of the embodiment is faster by 100-10/10 times to 9 times, and the pulse metering precision is improved from 0.001kwh of the original scheme to 0.0001kwh of the scheme of the invention.

It should be noted that, the number of frequency division numbers N in this embodiment may be set according to how much precision needs to be improved, and is not limited by the metering chip.

Compared with the prior art, the embodiment has the following beneficial effects:

1) after the high-frequency pulse constant HFconst is subjected to N frequency division, the base number counted by the rapid pulse register is reduced by N times compared with the original base number, the number of rapid metering pulses metered in unit time is N times of the original base number, and the metering precision and the metering speed are improved to N times of the original base number.

2) The MCU is used for storing and processing the high-frequency pulse constant HFconst by N frequency division and electric energy metering, and the pulse counting and electric energy metering principle of the metering chip is utilized and is not bound by the pulse counting and electric energy metering principle.

3) The setting of the N value can be set according to the electric energy metering number which needs to be reached, and is not limited by a metering chip.

4) The method is not only suitable for the three-phase electric energy metering chip, but also suitable for other electric energy metering chips.

Example two

The embodiment provides a method for improving the metering accuracy of a three-phase cost control smart electric meter based on an MCU (microprogrammed control Unit), as shown in FIG. 2, the method comprises the following steps:

s11, carrying out N frequency division on a high-frequency pulse constant HFconst in an MCU of the ammeter;

s12, writing the high-frequency pulse constant HFconst after frequency division into a high-frequency pulse constant register of a metering chip;

s13, starting counting by a fast pulse register of the metering chip;

s14, judging whether the count value of the fast pulse register of the metering chip is larger than or equal to the high-frequency pulse constant HFconst after frequency division, if so, executing a step S15; if not, continue to step S13;

s15, adding 1 to the data accumulation in an energy register of the metering chip;

s16, reading the metering data of the energy register by the MCU;

and S17, the MCU stores the read metering data, judges whether the stored metering data reaches N, and outputs 1 external pulse if the stored metering data reaches N.

It should be noted that the implementation manners of steps S11-S16 are similar to those of the embodiments, and are not described herein again.

Step S17 specifically includes: the MCU stores the read metering data into a counter of the MCU, the MCU judges whether the metering data stored in the MCU counter reaches N, and if the metering data reaches N, 1 external pulse is output; if not, the method continues to steps S13-S16.

According to the embodiment, whether the metering data stored in the MCU counter reaches N is further judged, the metering precision of the metering chip is improved, the processing and storage scales of all related energy data of the ammeter, including the current total and split-phase electric quantity, the frozen electric quantity, the event related electric quantity and the like are more detailed, and various applications requiring more detailed management on the electric energy can be met.

EXAMPLE III

This embodiment provides a system for improving three-phase cost accuse smart electric meter measurement accuracy based on MCU, as shown in fig. 3, include:

the frequency division module 11 is used for dividing the frequency of the high-frequency pulse constant HFconst in the MCU of the electric meter;

a write-in module 12, configured to write the frequency-divided high-frequency pulse constant HFconst into a high-frequency pulse constant register of the metering chip;

the counting module 13 is used for starting counting by a fast pulse register of the metering chip;

the judging module 14 is configured to judge whether a count value of a fast pulse register of the metering chip is greater than or equal to the high-frequency pulse constant HFconst after frequency division;

the accumulation module 15 is used for measuring the data accumulation increase 1 in an energy register of the chip;

and the reading module 16 is used for reading the metering data of the energy register by the MCU.

Further, in the frequency dividing module, the high-frequency pulse constant HFconst is divided in the MCU of the electric meter, which is expressed as: HFconst/N; where N denotes a frequency division number.

Further, the data accumulation increase in the energy register of the metering chip in the accumulation module is specifically that the minimum unit of the fast pulse register is 1/EC/HFconst/N kwh, and the energy register performs the metering accumulation increase by taking 1/EC/N as the minimum unit; where EC represents the meter constant.

Further, the fast pulse register of the metering chip in the counting module comprises one or more of FstCntA, FstCntB, FstCntC and FstCntT.

Further, the energy register of the metering chip in the accumulation module comprises one or more of Epa, Epb, Epc and Ept.

It should be noted that, the system for improving the metering accuracy of the three-phase cost-control smart meter based on the MCU provided in this embodiment is similar to the embodiment, and details are not repeated herein.

Compared with the prior art, the embodiment has the following beneficial effects:

1) after the high-frequency pulse constant HFconst is subjected to N frequency division, the base number counted by the rapid pulse register is reduced by N times compared with the original base number, the number of rapid metering pulses metered in unit time is N times of the original base number, and the metering precision and the metering speed are improved to N times of the original base number.

2) The MCU is used for storing and processing the high-frequency pulse constant HFconst by N frequency division and electric energy metering, and the pulse counting and electric energy metering principle of the metering chip is utilized and is not bound by the pulse counting and electric energy metering principle.

3) The setting of the N value can be set according to the electric energy metering number which needs to be reached, and is not limited by a metering chip.

4) The method is not only suitable for the three-phase electric energy metering chip, but also suitable for other electric energy metering chips.

It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种电能计量终端、方法、电力服务系统及介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!