CN103149397A - Electric energy metering creeping algorithm and control circuit - Google Patents

Electric energy metering creeping algorithm and control circuit Download PDF

Info

Publication number
CN103149397A
CN103149397A CN2013100659419A CN201310065941A CN103149397A CN 103149397 A CN103149397 A CN 103149397A CN 2013100659419 A CN2013100659419 A CN 2013100659419A CN 201310065941 A CN201310065941 A CN 201310065941A CN 103149397 A CN103149397 A CN 103149397A
Authority
CN
China
Prior art keywords
sign
register
reg
power
shunt running
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.)
Granted
Application number
CN2013100659419A
Other languages
Chinese (zh)
Other versions
CN103149397B (en
Inventor
张伟伟
万巍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chipsea Technologies Shenzhen Co Ltd
Original Assignee
Chipsea Technologies Shenzhen Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Chipsea Technologies Shenzhen Co Ltd filed Critical Chipsea Technologies Shenzhen Co Ltd
Priority to CN201310065941.9A priority Critical patent/CN103149397B/en
Publication of CN103149397A publication Critical patent/CN103149397A/en
Application granted granted Critical
Publication of CN103149397B publication Critical patent/CN103149397B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Control Of Electrical Variables (AREA)

Abstract

The invention discloses an electric energy metering creeping algorithm and an electric energy metering creeping control circuit. The creeping algorithm comprises the following steps of: 1, judging whether sign bits of adjacent power are consistent, if the sign bits are not consistent, electric energy creeps, and if the sign bits are consistent, the electric energy does not creep; and 2, if the electric energy creeps, removing the accumulation of the current power without removal of the previously metered electric quantity, and otherwise, continuously accumulating the power and metering the electric quantity. The electric energy metering creeping control circuit comprises a first register and an exclusive-OR gate. By the creeping algorithm and the control circuit, creeping can be accurately judged, and the interference and influence of the creeping on electric energy metering are avoided.

Description

A kind of electric energy metrical shunt running algorithm and control circuit
Technical field
The invention belongs to the technical field of electric energy metrical, particularly a kind of computing method of electric energy shunt running and control device.
Background technology
In the electric energy metrical field, in the situation that the situation appearance that the electrical appliance ammeter is had good luck need to shield for the power in minimum situation, think that power is 0 in order to prevent the user when minimum power, so just do not have the situation appearance that ammeter is had good luck, i.e. so-called shunt running.
Can why in the situation that the user does not make electrical appliance, also minimum power appear? this is because the noise of ammeter computation chip itself causes.Therefore, the error of calculation for fear of the electric energy shunt running brings needs to calculate elimination in the energy calculate process, with accurate-metering user's electric energy operating position.Typical shunt running algorithm is (as described in patented claim 200610162224.8) as shown in Figure 1.
Typical shunt running algorithm flow is described below.
A, at first judge the positive and negative of power;
B, according to the positive and negative selection threshold value of power, general threshold value 1 and threshold value 2 are numbers that absolute value equates, but one be positive number, one is negative.If power is just selected positive threshold value for just; Otherwise just select negative threshold value;
C, subtract the difference of threshold value according to the positive negative judgement power of power: if power for just, threshold value is also for just, power subtracted threshold value less than 0 o'clock, thought shunt running; Otherwise, be not shunt running.If power is for negative, also for negative, power subtracted threshold value greater than 0 o'clock to threshold value, thought shunt running; Otherwise, be not shunt running.
D, according to whether the output of shunt running power ratio control: if shunt running, power stage is 0; Otherwise power is directly exported.
E, the last cumulative electric quantity metering that carries out according to power.
This mode; although can realize the judgement of electric energy shunt running; but this mode judges by threshold values; the selection of threshold values just is called the key factor that affects the shunt running metering; and threshold values often can be subject to the interference of various factors; therefore be not very accurate to the calculating of shunt running, and typical shunt running algorithm need the selector switch (is used for selecting threshold value, an output of selecting power) of two multidigits, the subtracter of a multidigit, the comparer of a multidigit at least.Structure is relatively complicated, and it is many that step is controlled in judgement.
Summary of the invention
For addressing the above problem, the object of the present invention is to provide a kind of electric energy metrical shunt running algorithm and control circuit, this shunt running algorithm and control circuit can judge shunt running exactly, avoid shunt running on interference and the impact of electric energy metrical.
Another object of the present invention is to provide a kind of electric energy metrical shunt running algorithm and control circuit, and this shunt running algorithm and control circuit can judge the electric energy shunt running quickly and accurately, and in time zero clearing; And this shunt running algorithm and control device are easy to realize, can greatly reduce costs than existing algorithm, and the enough resources still less of energy realize calculating and the control of electric energy shunt running.
For achieving the above object, technical scheme of the present invention is as follows.
A kind of electric energy metrical shunt running algorithm, this shunt running algorithm comprises the steps:
1, before and after the judgement, whether the sign bit of adjacent power is consistent: if inconsistent, just think shunt running; Otherwise, be not shunt running;
2 if the cumulative of current power just removed in shunt running, but the electric weight of metering before not removing; Otherwise, continue the metering of the cumulative and electric weight of power.
Further, in step 1,101, under noise effect, during minimum power, the sign bit of power changes, and power has on the occasion of negative value is also arranged.At first get the sign bit sign of power P ower, the most significant digit of power P ower value is exactly sign bit.
Further again, 102, the sign bit sign of power is deposited with the first register Reg1, this is equivalent to power symbol sign is postponed a beat.Described sign is connected to the D end of the first register Reg1, upgrades with the Power value clock end that the clock CLK of synchronizeing is connected to register Reg1, the Q end output sign_reg of the first register Reg1, and sign_reg is the sign bit of a upper performance number.
103, sign and sign_reg are through XOR gate output clear signal, and sign is connected to the A end of XOR gate, and sign_reg is connected to the B end of XOR gate, and the clear signal is by the Z end output of XOR gate, clear=sign﹠amp; A sign_reg+! Sign﹠amp; Sign_reg: if sign is different from sign_reg, clear is just 1, is shunt running; Otherwise clear is 0, is not shunt running.
Further, in step 2, by totalizer, power P ower and accu_sum_reg addition are obtained accu_sum, wherein, described power P ower is connected the input end of totalizer with accu_sum_reg, the output accu_sum of totalizer is connected to the D end of the second register Reg2; Accu_sum_reg is subjected to the clear signal controlling from the Q end of the second register Reg2, and clear is connected to the CLR end of the second register Reg2, if clear=1, accu_sum_reg=0; Otherwise, accu_sum_reg=accu_sum; Namely when shunt running, cumulative and accu_sum_reg before makes zero, and restarts power and adds up, and so just can avoid also having the electric quantity metering situation to occur when minimum power.
A kind of electric energy metrical shunt running control circuit is characterized in that this circuit includes the first register and an XOR gate, and described the first register is connected in power P ower output terminal, after XOR gate is connected in the first register, and output clear signal.
The sign bit sign that gets power P ower inputs to the first register, and the most significant digit of performance number is exactly sign bit, so only needs the most significant digit of performance number is connected by line to get final product, and does not need unnecessary device.
The first above-mentioned register, sign are connected to the D end of the first register Reg1, upgrade with the Power value clock end that the clock CLK of synchronizeing is connected to register Reg1, and the Q end output sign_reg of the first register Reg1 is to XOR gate.
Above-mentioned control circuit, its sign are also connected to the A end of XOR gate, and sign_reg is connected to the B end of XOR gate, and the clear signal is by the Z end output of XOR gate.
Described control circuit, it also further includes totalizer and the second register, described totalizer obtains accu_sum with power P ower and accu_sum_reg addition, wherein, described power P ower is connected the input end of totalizer with accu_sum_reg, the output accu_sum of totalizer is connected to the D end of the second register Reg2; Accu_sum_reg is from the Q end of the second register Reg2, and the clear signal of the first register Reg1 output is connected to the CLR end of the second register Reg2.By clear signal controlling accu_sum_reg, if clear=1, accu_sum_reg=0; Otherwise, accu_sum_reg=accu_sum; That is to say when shunt running, power before is cumulative to make zero with accu_sum_reg, restarts power and adds up, and so just can avoid also having the electric quantity metering situation to occur when minimum power.
Resource required for the present invention is compared with typical shunt running algorithm and is reduced a lot, only needs a register and an XOR gate just can realize the judgement of power shunt running.Compare with typical shunt running algorithm, reduced by three flow processs: according to the positive and negative selection threshold value of power, subtract the difference of threshold value and the output of power according to the positive negative judgement power of power.Importantly, needn't select threshold values, improve accuracy and reliability that shunt running is calculated, can judge exactly the shunt running in electric energy metrical.
In typical shunt running algorithm, need at least the selector switch (is used for selecting threshold value, an output of selecting power) of two multidigits, the subtracter of a multidigit, the comparer of a multidigit to complete the processing of shunt running.Before and after the present invention only need judge, whether the sign bit of adjacent power is consistent, just can carry out the shunt running judgement, and then the metering of the cumulative and electric energy of power ratio control, simple in structure like this, be easy to realize, can the decrease shunt running control cost, and the saving chip cost.
Description of drawings
Fig. 1 is the process flow diagram that prior art is implemented.
Fig. 2 is the principle schematic that the present invention implements.
Fig. 3 is the structural representation that the present invention implements the shunt running control device.
Fig. 4 is the process flow diagram that the present invention implements the shunt running algorithm.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, is not intended to limit the present invention.
Please refer to shown in Figure 2ly, the electric energy shunt running algorithm that the present invention implements is mainly to determine whether it being shunt running by the judgement to the power sign bit, if the sign bit of front and back power is consistent, is not shunt running; Inconsistently be judged as shunt running.For shunt running, do not carry out power and add up, do not calculate electric weight; During for non-shunt running, carry out continuously power and add up, calculate electric weight, thereby carry out electric weight output accurately.
The hardware configuration that concrete electric energy shunt running algorithm is realized as shown in Figure 3.The process flow diagram of electric energy shunt running algorithm as shown in Figure 4.
In conjunction with Fig. 3 and Fig. 4, the implementation procedure of electric energy shunt running algorithm and control is:
1, under noise effect, during minimum power, the sign bit of power changes, and power has on the occasion of negative value is also arranged.At first get the sign bit sign of power P ower, the most significant digit of performance number is exactly sign bit, only needs the most significant digit of performance number is connected by line to get final product, and does not need unnecessary device.
2, power symbol sign is deposited with register Reg1, be equivalent to power symbol sign is postponed a beat, obtain sign_reg.
Wherein, sign is connected to the D end of register Reg1, upgrades with the Power value clock end that the clock CLK of synchronizeing is connected to register Reg1, the Q end output sign_reg of register Reg1, and sign_reg is the sign bit of a upper performance number.
3, sign and sign_reg through XOR gate output clear signal, determine whether shunt running by the clear signal.
Wherein, sign is connected to the A end of XOR gate, and sign_reg is connected to the B end of XOR gate, and the clear signal is by the Z end output of XOR gate.
Clear=sign﹠amp; A sign_reg+! Sign﹠amp; Sign_reg: if sign is different from sign_reg, clear is just 1, is shunt running; Otherwise clear is 0, is not shunt running.
4, power P ower and accu_sum_reg addition obtain accu_sum, and Power is connected the input end of totalizer with accu_sum_reg, and the output accu_sum of totalizer is connected to the D end of register Reg2; Accu_sum_reg is subjected to the clear signal controlling from the Q end of register Reg2, and clear is connected to the CLR end of register Reg2, if clear=1, accu_sum_reg=0; Otherwise, accu_sum_reg=accu_sum; Namely when shunt running before cumulative and accu_sum_reg before removing, restart power cumulative, so just can avoid also having the appearance of electric quantity metering situation when minimum power.
Wherein, Power: performance number, multidigit signed number.
The sign bit of sign:Power.
The register output of sign_reg:Sign.
CLK: upgrade the clock of synchronizeing with Power.
Clear: shunt running signal.
Accu_sum:Power cumulative and.
Accu_sum register output under the accu_sum_reg:clear signal controlling.
Resource required for the present invention is compared with typical shunt running algorithm and is reduced a lot, only needs a register and an XOR gate just can realize the judgement of power shunt running.In typical shunt running algorithm, need at least the selector switch (is used for selecting threshold value, an output of selecting power) of two multidigits, the subtracter of a multidigit, the comparer of a multidigit to complete the processing of shunt running.The present invention compares with typical shunt running algorithm, has reduced by three flow processs: according to the positive and negative selection threshold value of power, subtract the difference of threshold value and the output of power according to the positive negative judgement power of power.Importantly, needn't select threshold values, improve accuracy and reliability that shunt running is calculated, can judge exactly the shunt running in electric energy metrical.
And the present invention implement simple in structure, be easy to realize, can the decrease shunt running control cost, save chip cost.
The above is only preferred embodiment of the present invention, not in order to limiting the present invention, all any modifications of doing within the spirit and principles in the present invention, is equal to and replaces and improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. an electric energy metrical shunt running algorithm, is characterized in that this shunt running algorithm comprises the steps:
1), before and after the judgement, whether the sign bit of adjacent power is consistent: if inconsistent, just think shunt running; Otherwise, be not shunt running;
2) if the cumulative of current power just removed in shunt running, but the electric weight of metering before not removing; Otherwise, continue the metering of the cumulative and electric weight of power.
2. electric energy metrical shunt running algorithm as claimed in claim 1, is characterized in that further, in step 1), under noise effect, during minimum power, at first gets the sign bit sign of power, and the most significant digit of performance number is exactly sign bit.
3. electric energy metrical shunt running algorithm as claimed in claim 2, is characterized in that the sign bit sign of power is deposited with the first register, and the output sign_reg of the first register, sign_reg are the sign bits of a upper performance number.
4. electric energy metrical shunt running algorithm as claimed in claim 3, is characterized in that sign and sign_reg are through XOR gate output clear signal, clear=sign﹠amp; A sign_reg+! Sign﹠amp; Sign_reg: if sign is different from sign_reg, clear is just 1, is shunt running; Otherwise clear is 0, is not shunt running.
5. electric energy metrical shunt running algorithm as claimed in claim 1, it is characterized in that step 2) in, by totalizer, power P ower and accu_sum_reg addition are obtained accu_sum, wherein, described power P ower is connected the input end of totalizer with accu_sum_reg, the output accu_sum of totalizer is connected to the second register; Accu_sum_reg is subjected to the clear signal controlling from the second register, and clear is connected to the second register, if clear=1, accu_sum_reg=0; Otherwise, accu_sum_reg=accu_sum.
6. .A kind of electric energy metrical shunt running control circuit is characterized in that this circuit includes the first register and an XOR gate, and described the first register is connected in power P ower output terminal, after XOR gate is connected in the first register, and output clear signal.
7. .Electric energy metrical shunt running control circuit as claimed in claim 6 is characterized in that the sign bit sign that gets power P ower inputs to the first register, and the most significant digit of performance number is exactly sign bit.
8. .Electric energy metrical shunt running control circuit as claimed in claim 7, it is characterized in that the first above-mentioned register, sign is connected to the D end of the first register, upgrade with performance number the clock end that the clock CLK of synchronizeing is connected to the first register, the Q end output sign_reg of the first register is to XOR gate.
9. .Electric energy metrical shunt running control circuit as claimed in claim 8 is characterized in that above-mentioned control circuit, and its sign is also connected to the A end of XOR gate, and sign_reg is connected to the B end of XOR gate, and the clear signal is by the Z end output of XOR gate.
10. electric energy metrical shunt running control circuit as claimed in claim 6, it is characterized in that described control circuit, it also includes totalizer and the second register, described totalizer obtains accu_sum with Power and accu_sum_reg addition, wherein, described Power is connected the input end of totalizer with accu_sum_reg, the output accu_sum of totalizer is connected to the D end of the second register; Accu_sum_reg is from the Q end of the second register, and the clear signal of the first register output is connected to the CLR end of the second register.
CN201310065941.9A 2013-03-01 2013-03-01 A kind of electric energy metrical shunt running algorithm and control circuit Active CN103149397B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310065941.9A CN103149397B (en) 2013-03-01 2013-03-01 A kind of electric energy metrical shunt running algorithm and control circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310065941.9A CN103149397B (en) 2013-03-01 2013-03-01 A kind of electric energy metrical shunt running algorithm and control circuit

Publications (2)

Publication Number Publication Date
CN103149397A true CN103149397A (en) 2013-06-12
CN103149397B CN103149397B (en) 2016-02-24

Family

ID=48547596

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310065941.9A Active CN103149397B (en) 2013-03-01 2013-03-01 A kind of electric energy metrical shunt running algorithm and control circuit

Country Status (1)

Country Link
CN (1) CN103149397B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105629013A (en) * 2014-10-30 2016-06-01 上海贝岭股份有限公司 Timing anti-creeping device and method for electric energy metering

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2718904Y (en) * 2004-06-16 2005-08-17 上海贝岭股份有限公司 Anti-shunt running circuit with valve value in electric energy metering chip
CN2718903Y (en) * 2004-06-16 2005-08-17 上海贝岭股份有限公司 Anti-shunt running circuit in electric energy metering chip
CN1963533A (en) * 2006-12-06 2007-05-16 北京中星微电子有限公司 Circuit and method for preventing shunt running in electric energy measurement
CN203101466U (en) * 2013-03-01 2013-07-31 深圳市芯海科技有限公司 Electric energy measuring creeping control circuit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2718904Y (en) * 2004-06-16 2005-08-17 上海贝岭股份有限公司 Anti-shunt running circuit with valve value in electric energy metering chip
CN2718903Y (en) * 2004-06-16 2005-08-17 上海贝岭股份有限公司 Anti-shunt running circuit in electric energy metering chip
CN1963533A (en) * 2006-12-06 2007-05-16 北京中星微电子有限公司 Circuit and method for preventing shunt running in electric energy measurement
CN203101466U (en) * 2013-03-01 2013-07-31 深圳市芯海科技有限公司 Electric energy measuring creeping control circuit

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
刘幸媛等: "电能表潜动的判断方法", 《农村电工》, no. 3, 31 December 2009 (2009-12-31), pages 42 *
张林等: "智能电表起潜动功能检测新方法研究", 《产业与科技论坛》, vol. 10, no. 17, 31 December 2011 (2011-12-31), pages 80 - 82 *
牟民生等: "《电能计量基础与技术实践》", 31 January 2011, 中国电力出版社, article "第三节 电能表潜动形成的原因与解决办法", pages: 334-336 *
黄伟等: "采用功率比较法测量电能表基本误差", 《中国仪器仪表》, no. 7, 31 December 2009 (2009-12-31), pages 70 - 73 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105629013A (en) * 2014-10-30 2016-06-01 上海贝岭股份有限公司 Timing anti-creeping device and method for electric energy metering
CN105629013B (en) * 2014-10-30 2019-12-10 上海贝岭股份有限公司 timing anti-creeping device and method for electric energy metering

Also Published As

Publication number Publication date
CN103149397B (en) 2016-02-24

Similar Documents

Publication Publication Date Title
US9563530B2 (en) Device state estimation apparatus, device power consumption estimation apparatus, and program
CN105094282A (en) Management method for application programs and terminal
CN104461136A (en) Dynamic threshold adjusting circuit in touch-control device
CN107526007A (en) The recognition methods of fault type and device
CN107634901A (en) Session expression pushing method and device and terminal equipment
CN203101466U (en) Electric energy measuring creeping control circuit
CN114089951A (en) Fast divider and operation method thereof
CN103149397B (en) A kind of electric energy metrical shunt running algorithm and control circuit
CN112730654B (en) Fault detection method and device for sulfur hexafluoride electrical equipment and terminal equipment
CN111399803A (en) Division operation method, device, storage medium and electronic equipment
CN111181881A (en) Server signal transmission system and method, electronic equipment and storage medium
CN110968938A (en) Ideal switch process analysis method and system for electromagnetic transient simulation
CN116148666A (en) Battery SOC signal processing method, device, vehicle, computer readable storage medium and computer program product
CN102789376B (en) Floating-point number adder circuit and implementation method thereof
CN102722600A (en) Method for calculating chip power consumption
CN104931847A (en) Terminal of determining whether NFC antenna to be in poor contact state and method thereof
CN115017732A (en) Lightning protection analysis simulation step length calculation method, device, equipment and medium
CN100426219C (en) Data operating method and apparatus in integrated circuit
CN111353118B (en) Method of squaring and corresponding circuit for squaring
CN110426638B (en) Method and system for rapidly calculating open-circuit voltage of battery
CN110196354B (en) Method and device for detecting switching event of load
CN108173608B (en) Method, apparatus and storage medium for obtaining power estimation value and electronic device
CN103713189A (en) Power shunt running quick detection circuit
CN115208257B (en) Permanent magnet synchronous motor pole pair number detection system and method and electronic equipment
CN115333715B (en) Synchronization method, device, communication equipment and medium of narrowband communication system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 518000 Nanhai Avenue, Nanshan District, Shenzhen City, Guangdong Province, 1079 Garden City Digital Building, Block A, 901A

Patentee after: Xinhai Science and Technology (Shenzhen) Co., Ltd.

Address before: 518067 Nanshan District, Shenzhen, Nanhai Avenue, garden city, No. 1079, building A, block, floor 9

Patentee before: Xinhai Science and Technology Co., Ltd., Shenzhen City