Ammeter and low error pulse output intent thereof
Technical field
The general general survey of the present invention relates to a kind of low one-tenth applied on single-phase or three phase network electric energy acquisition
Originally, high-precision pulse output intent, it is adaptable to electric energy metrical field.
Background technology
Along with the fast development of modern integrated circuits, metering field also occurs in that and is actively gone out electricity arteries and veins by computation chip
The chip of punching, particularly on high-precision electric energy meter is applied.But it is because its of a relatively high cost, low
In 1 grade of table even 0.5S level table of cost, application is not the most extensive.The table of these types goes out the mode of pulse
Or controlled by table meter MCU.
Along with the reform and development of power domain, the required precision to electric energy meter is more and more higher.General electricity
Can should possess the LED pulse and electric pulse output function, pulse width 80ms being directly proportional to the electric energy measured by table
±16ms.Verification stage body provides detection error according to the signal of electric pulse output port.Former according to calculus
Reason P=∫ wdt, integral unit dt is the least for electric energy meter, and integrated value is just and the error of actual value is the least.But
In ammeter actual design, because also to process other process such as communication, display etc., it is impossible to dt is taken
Value is made the least, and 500us has been smaller value.Even but the jumping difference of such error is in theory
The biggest, according to the principle of the limit, that pulse time delay is maximum may be exactly 500us, and this is aobvious
And be clear to.With fundamental voltage 220V, fundamental current 10A, maximum current 60A, meter constant is
As a example by the three-phase and four-line electric energy meter of 800imp/kwh, when at fundamental voltage 220V, three-phase current is all maximum electricity
During stream 60A, every 0.1136s goes out a pulse in theory, then cause because interrupt latency goes out pulse
Error is exactly 500/113600=0.44%, and this is bigger error.Add voltage and current signal fluctuation,
The error of verification this life of stage body, is likely to arise that overproof for 1 grade of table, and the jumping difference caused has very much can
The value that can specify beyond standard, does not more meet the requirement to error of the precision higher table, does not therefore meet design
Requirement.
Summary of the invention
The present invention design a kind of apply on three-phase kilowatt-hour meter low cost, high-precision go out pulse method, flexibly
Utilize the interrupt function of the main MCU of table meter, calculate the next one according to the energy meter of upper one second and go out the moment of pulse,
Thus increase substantially table meter error.And the main MCU of table meter need not because process out electrical energy pulse and very frequency
Pass in and out interruption, such that it is able to have other events such as more time-triggered protocol communication, the real-time to table meter numerously
There has also been the biggest raising.
Ammeter of the present invention, including signal sampling end, for gathering the analogue signal of electrical network alternating current and voltage
And be converted to digital pulse signal I and U;Measurement unit, receives these digital pulse signals and is calculated
Drawing electrical power signal w, read by a primary processor (MCU) in three-phase kilowatt-hour meter, it is further
Including: the pulse intervalometer coupled with described MCU, it is different from described electrical power signal w for producing one
New pulse signal t2;And the integration generator being arranged in described MCU, set and export one
Pulse period, t1 was to MCU.
As preferably, in described MCU Sino-Israel relations formula: P=∫ wdt
Calculate energy value P, wherein by described integration generator, dt is set as that dt1, described MCU set
It is set to and periodically electrical power signal w is added up according to this dt1.
As preferably, in the interruption of one dt1, persistently compare cumulative energy value P and pulse equivalency
Between the measurement unit power w that reads of difference △ ω and described MCU energy value ∑ ω within this dt1 cycle,
Then judge that when △ ω is less than ∑ ω the moment that actual power pulse exports occurred before next dt1 interrupts.
As preferably, according to the measurement unit power w read-out by the difference between △ ω and ∑ ω and described MCU
Calculate the moment △ t of next pulse output, in current dt1 interrupts, now open the timing of described pulse
Device produces new pulse signal t2.
As preferably, described moment △ t is less than dt1.
It is applied to the low error pulse output intent of described three-phase kilowatt-hour meter, including step: calculated by measurement unit
Go out electrical network electrical power signal w, read by MCU;A pulse period t1 is exported by integration generator
To MCU, according to this pulse period unit dt1 electrical power signal w carried out n cycle and add up to calculate
Energy value P;Between energy value P and a pulse equivalency persistently the most cumulative in the interruption of described dt1
The measurement unit power w that difference △ ω and described MCU reads energy value ∑ ω within this dt1 cycle, works as △
Then judge when ω is less than ∑ ω that the moment that actual power pulse exports occurred before (n+1)th dt1 interrupts;
Next arteries and veins is calculated according to the measurement unit power w read-out by the difference between △ ω and ∑ ω and described MCU
The moment △ t of punching output, now: in current dt1 interrupts, open described pulse intervalometer, with in time delay
Produce a new pulse signal after new pulse signal t2 described in be exported.
Set described new pulse signal t2 equal to △ t.
The difference of electric energy is obtained divided by the electric energy in a dt1 after being added to n dt1 according to pulse equivalency
It is worth to △ t.
Compared with prior art, the output pulse method that the present invention proposes is according to pulse equivalency and is added to n
The difference of the electricity obtained after dt1 obtains △ t divided by the electricity w (figure Oxford gray part) in 1 dt1,
In the n-th dt1, the opening timing time is the pulse intervalometer of △ t, sends after the △ t time arrives
The pulse of t2=80ms, thus obtain the moment closer to actual pulse output, electric energy meter is greatly improved
Required precision.
Accompanying drawing explanation
Fig. 1 is the principle schematic of the specific embodiment of the invention.
Detailed description of the invention
Present pre-ferred embodiments relate to three-phase kilowatt-hour meter, including signal sampling end, is used for gathering electrical network exchange
Electric current and the analogue signal of voltage are also converted to digital pulse signal I and U;Measurement unit, receives these numbers
Word pulse signal is also calculated electrical power signal w, by a primary processor (MCU) in three-phase kilowatt-hour meter
Read, farther included: the pulse intervalometer coupled with described MCU, for producing a difference
New pulse signal t2 in described electrical power signal w;And the integration being arranged in described MCU produces
Device, sets and exports a pulse period t1 to MCU.
In one embodiment, in described MCU Sino-Israel relations formula: P=∫ wdt
Calculate energy value P, wherein by described integration generator, dt is set as that dt1, described MCU set
It is set to and periodically electrical power signal w is added up according to this dt1.
In one embodiment, persistently the most cumulative in the interruption of one dt1 energy value P and arteries and veins
Rush measurement unit power w that difference △ ω between equivalent and described MCU the reads energy within this dt1 cycle
Value ∑ ω, then judges that when △ ω is less than ∑ ω the moment that actual power pulse exports occurs at next dt1
Before interruption.
In one embodiment, according to the measurement unit read-out by the difference between △ ω and ∑ ω and described MCU
Power w calculates the moment △ t of next pulse output, now opens described simple venation in current dt1 interrupts
Rush intervalometer and produce new pulse signal t2.
In one embodiment, described moment △ t is less than dt1.
It is applied to the low error pulse output intent of described three-phase kilowatt-hour meter, including step: calculated by measurement unit
Go out electrical network electrical power signal w, read by MCU;A pulse period t1 is exported by integration generator
To MCU, according to this pulse period unit dt1 electrical power signal w carried out n cycle and add up to calculate
Energy value P;Between energy value P and a pulse equivalency persistently the most cumulative in the interruption of described dt1
The measurement unit power w that difference △ ω and described MCU reads energy value ∑ ω within this dt1 cycle, works as △
Then judge when ω is less than ∑ ω that the moment that actual power pulse exports occurred before (n+1)th dt1 interrupts;
Next arteries and veins is calculated according to the measurement unit power w read-out by the difference between △ ω and ∑ ω and described MCU
The moment △ t of punching output, now: in current dt1 interrupts, open described pulse intervalometer, with in time delay
Produce a new pulse signal after new pulse signal t2 described in be exported.
Set described new pulse signal t2 equal to △ t.
The difference of electric energy is obtained divided by the electric energy in a dt1 after being added to n dt1 according to pulse equivalency
It is worth to △ t.
With reference to Fig. 1, A at be wherein actual go out pulse time, B is to go out pulse time in prior art, electric energy
Table integral unit dt1 is set as that 5ms, w are the power read from measurement unit.Although the value of dt1 is than routine
Way want big, analytical error should be worse in theory.But the method is different from the way that other are traditional
Be pulse be not this 5ms interrupt in export.In process of once checking meter, power is added up by every 5ms
Once, as the electric energy in this 5ms.Simultaneously always the most cumulative in the interruption of 5ms energy and one
The size of the computation chip power of the difference of pulse equivalency and reading energy in 5ms, after the former is less than
Person illustrates that the moment of actual output electrical energy pulse occurred before next 5ms interrupts, if waiting until the next one
5ms interrupt output electric pulse postpones the most certainly.So according to both difference and the measurement unit power of reading
Calculate the moment (this time is less than 5ms) of next output pulse, now open in current this interrupts
Opening pulse intervalometer, timing is the time calculating pulse output, the most thus pulse intervalometer
Oneself send the electrical energy pulse of 80ms.This ensure that the rising edge of electric pulse and trailing edge and actual power arteries and veins
Rising edge and the trailing edge of punching are more identical, no matter what correction platform health check-up surveyed is rising edge or the decline of signal
Edge, error is the least, more conforms to design requirement.
In FIG: dt1 is integral unit, typically sets it to 5ms, oblique line portion is a pulse
Equivalent.The electricity obtained after electricity is added to n dt1 is light grey oblique line portion, it is clear that it is not up to
One pulse equivalency, both differences are Dark grey oblique line portion.It is than 1 dt1 as can see from Figure 1
In electricity w (figure Oxford gray part) little.And the moment of reality output pulse is that vertical line marks in the drawings
Place.The mode of tradition output pulse is to wait until that (n+1)th dt1 just starts to export pulse,
There have been the time delay of (dt1 △ t) it and the actual time exporting pulse.The output arteries and veins proposed in the present embodiment
(figure invading the interior Dark grey is oblique according to pulse equivalency and the difference of electricity that obtains after being added to n dt1 for punching method
Line part) obtain △ t, at the n-th dt1 divided by the electricity w (figure Oxford gray part) in 1 dt1
The middle opening timing time is the pulse intervalometer of △ t, sends the arteries and veins of t2=80ms after the △ t time arrives
Punching, thus obtain the moment closer to actual pulse output, the required precision of electric energy meter is greatly improved.
In addition to above preferred embodiment, the present invention also has other embodiment, and those skilled in the art are permissible
It is variously modified according to the present invention and deforms, without departing from the spirit of the present invention, the present invention all should be belonged to
Scope defined in claims.