Ammeter and low error pulse output intent thereof
Technical field
General general survey of the present invention relates to a kind of low cost on single-phase or three phase network electric energy acquisition, high-precision pulse output intent of being applied in, and is applicable to electric energy metrical field.
Background technology
Along with the fast development of modern integrated circuits, also there is initiatively being gone out by computation chip the chip of electric pulse in metering field, particularly in high-precision electric energy meter application.But because its relatively high cost, cheaply 1 grade show even 0.5S level table in application be not very extensive.The table of these types goes out the mode of pulse or is controlled by table meter MCU.
Along with the reform and development of power domain, also more and more higher to the accuracy requirement of electric energy meter.General electric energy meter should possess LED pulse and the electric pulse output function being directly proportional to measured electric energy, pulse width 80ms ± 16ms.Verification stage body provides detection error according to the signal of electric pulse output port.According to infinitesimal analysis principle P=∫ wdt, dt is less for electric energy meter integral unit, integrated value just and the error of actual value just less.But in ammeter actual design, very little because the process that also will process other, as communication, demonstration etc., can not be made dt value, 500us has been smaller value.But even the jumping of error is poor in theory still very large like this, according to the principle of the limit, that the burst length postpones maximum may be exactly 500us, and this is apparent.With fundamental voltage 220V, fundamental current 10A, maximum current 60A, meter constant is that the three-phase and four-line electric energy meter of 800imp/kwh is example, when at fundamental voltage 220V, when three-phase current is all maximum current 60A, every 0.1136s goes out a pulse in theory, the error causing because interrupt latency goes out pulse is so exactly 500/113600=0.44%, and this is larger error.Add the error of voltage and current signal fluctuation, this life of verification stage body, for 1 grade of table, probably just there will be overproof, the poor value that probably exceeds standard regulation of the jumping that causes, does not more meet the requirement to error of table that precision is higher, does not therefore meet designing requirement.
Summary of the invention
The present invention designs and is a kind ofly applied in low cost on three-phase kilowatt-hour meter, high-precisionly goes out pulse method, and the interrupt function of the main MCU of flexible utilization table meter, calculates according to the power meter of upper one second the moment that the next one goes out pulse, thereby increases substantially table meter error.And the main MCU of table meter do not need because processing out electrical energy pulse turnover very continually to interrupt, thereby can have other events such as more time processing communication, the real-time of his-and-hers watches meter is also greatly improved.
Ammeter of the present invention, comprises signal sampling end, for gathering the simulating signal of grid alternating current stream and voltage and being converted to digital pulse signal I and U; Metering portion, receive these digital pulse signals and calculated electrical power signal w, by the primary processor (MCU) in three-phase kilowatt-hour meter, read, it further comprises: with the monopulse timer of described MCU coupling, for generation of a new pulse signal t2 who is different from described electrical power signal w; And be arranged at an integration generator in described MCU, set and export a recurrence interval t1 to MCU.
As preferably, in described MCU Sino-Israel relations formula: P=∫ wdt
Calculate energy value P, wherein dt is set as to dt1 by described integration generator, described MCU is set as periodically electrical power signal w being added up according to this dt1.
As preferably, in the interruption of a described dt1, continue the power w of metering portion that more cumulative energy value P and the difference △ ω between pulse equivalency and described MCU read at this dt1 the energy value ∑ ω in the cycle, the moment of judging actual power pulse output when △ ω is less than ∑ ω occurs in before next dt1 interrupts.
As preferably, the power w of metering portion reading according to the difference between △ ω and ∑ ω and described MCU calculates the moment △ t of next pulse output, now in current dt1 interrupts, opens described monopulse timer and produces new pulse signal t2.
As preferably, described moment △ t is less than dt1.
The low error pulse output intent that is applied to described three-phase kilowatt-hour meter, comprises step: by metering portion, calculate electrical network electrical power signal w, by MCU, read; By a recurrence interval t1 of integration generator output, to MCU, according to this recurrence interval unit dt1, electrical power signal w is carried out to the cumulative to calculate energy value P of n cycle; In the interruption of described dt1, continue the power w of metering portion that difference △ ω between more cumulative energy value P and a pulse equivalency and described MCU read at this dt1 the energy value ∑ ω in the cycle, before the moment of judging actual power pulse output when △ ω is less than ∑ ω occurs in n+1 dt1 interruption; The power w of metering portion reading according to the difference between △ ω and ∑ ω and described MCU calculates the moment △ t of next pulse output, now: in current dt1 interrupts, open described monopulse timer, with in time delay after described new pulse signal t2, produce a new pulse signal and exported.
Set described new pulse signal t2 and equal △ t.
According to pulse equivalency be added to the difference that obtains electric energy after n dt1 and obtain △ t divided by the energy value in a dt1.
Compared with prior art, the output pulse method that the present invention proposes according to pulse equivalency and the difference that is added to the electric weight obtaining after n dt1 divided by the electric weight w(figure Oxford gray part in 1 dt1) obtain △ t, in n dt1, the opening timing time is the monopulse timer of △ t, after arriving, sends the △ t time pulse of t2=80ms, thereby obtain the moment that more approaches actual pulse output, increased substantially the accuracy requirement of electric energy meter.
Accompanying drawing explanation
Fig. 1 is the principle schematic of the specific embodiment of the invention.
Embodiment
Preferred embodiment of the present invention has related to three-phase kilowatt-hour meter, comprises signal sampling end, for gathering the simulating signal of grid alternating current stream and voltage and being converted to digital pulse signal I and U; Metering portion, receive these digital pulse signals and calculated electrical power signal w, by the primary processor (MCU) in three-phase kilowatt-hour meter, read, further comprise: with the monopulse timer of described MCU coupling, for generation of a new pulse signal t2 who is different from described electrical power signal w; And be arranged at an integration generator in described MCU, set and export a recurrence interval t1 to MCU.
In one embodiment, in described MCU Sino-Israel relations formula: P=∫ wdt
Calculate energy value P, wherein dt is set as to dt1 by described integration generator, described MCU is set as periodically electrical power signal w being added up according to this dt1.
In one embodiment, in the interruption of a described dt1, continue the power w of metering portion that more cumulative energy value P and the difference △ ω between pulse equivalency and described MCU read at this dt1 the energy value ∑ ω in the cycle, the moment of judging actual power pulse output when △ ω is less than ∑ ω occurs in before next dt1 interrupts.
In one embodiment, the power w of metering portion reading according to the difference between △ ω and ∑ ω and described MCU calculates the moment △ t of next pulse output, now in current dt1 interrupts, opens described monopulse timer and produces new pulse signal t2.
In one embodiment, described moment △ t is less than dt1.
The low error pulse output intent that is applied to described three-phase kilowatt-hour meter, comprises step: by metering portion, calculate electrical network electrical power signal w, by MCU, read; By a recurrence interval t1 of integration generator output, to MCU, according to this recurrence interval unit dt1, electrical power signal w is carried out to the cumulative to calculate energy value P of n cycle; In the interruption of described dt1, continue the power w of metering portion that difference △ ω between more cumulative energy value P and a pulse equivalency and described MCU read at this dt1 the energy value ∑ ω in the cycle, before the moment of judging actual power pulse output when △ ω is less than ∑ ω occurs in n+1 dt1 interruption; The power w of metering portion reading according to the difference between △ ω and ∑ ω and described MCU calculates the moment △ t of next pulse output, now: in current dt1 interrupts, open described monopulse timer, with in time delay after described new pulse signal t2, produce a new pulse signal and exported.
Set described new pulse signal t2 and equal △ t.
According to pulse equivalency be added to the difference that obtains electric energy after n dt1 and obtain △ t divided by the energy value in a dt1.
With reference to Fig. 1, wherein A place goes out pulse constantly for actual, and B goes out pulse constantly in prior art, and electric energy meter integral unit dt1 is set as 5ms, the power of w for reading from metering portion.Although the value of dt1 is larger than conventional way, analytical error should be poorer in theory.It is that pulse is not output in this 5ms interrupts that but the method is different from other traditional ways.In the process of once checking meter, every 5ms accumulates once power, as the electric energy in this 5ms.More cumulative energy and the difference of a pulse equivalency and the size of the energy of the computation chip power of reading in 5ms always in the interruption of 5ms simultaneously, when the former is less than moment that the latter illustrates actual output electrical energy pulse, occur in before next 5ms interrupts, if wait until next 5ms interrupt output electric pulse, certainly postpone.So calculate the moment (this time is less than 5ms) of next output pulse according to both differences and the metering portion power meter of reading, now in interrupting, current this open monopulse timer, timing is the time that calculates pulse output, then the electrical energy pulse of monopulse timer oneself transmission 80ms thus.Guaranteed that like this rising edge of electric pulse and rising edge and the negative edge of negative edge and actual power pulse are more identical, no matter correction platform health check-up survey is rising edge or the negative edge of signal, error is all less, more meets designing requirement.
In Fig. 1: dt1 is integral unit, be generally set as 5ms, oblique line is partly the equivalent of a pulse.When electric weight is added to the electric weight obtaining after n dt1, be light grey oblique line part, obviously it does not reach a pulse equivalency, and both differences are Dark grey oblique line part.It is than the electric weight w(figure Oxford gray part in 1 dt1 as can see from Figure 1) little.And the moment of actual output pulse is the place that vertical line marks in the drawings.In the mode of tradition output pulse, be to wait until that n+1 dt1 just starts to export pulse, there have been the time delay of (dt1-△ t) it and actual time of exporting pulse.The output pulse method proposing in the present embodiment according to pulse equivalency and the difference (Dark grey oblique line part in figure) that is added to the electric weight obtaining after n dt1 divided by the electric weight w(figure Oxford gray part in 1 dt1) obtain △ t, in n dt1, the opening timing time is the monopulse timer of △ t, after arriving, sends the △ t time pulse of t2=80ms, thereby obtain the moment that more approaches actual pulse output, increased substantially the accuracy requirement of electric energy meter.
Except above preferred embodiment, the present invention also has other embodiment, and those skilled in the art can make according to the present invention various changes and distortion, only otherwise depart from spirit of the present invention, all should belong to the defined scope of claims of the present invention.