Invention content
An embodiment of the present invention provides a kind of power meter temperatures to influence error compensating method and device, can realize electric energy meter
Error compensation within the scope of total temperature, error change caused by being affected by temperature to electric energy meter have effective inhibiting effect.
According to an aspect of the present invention, a kind of power meter temperature influence error compensating method is provided, including:
The measurement error cubic curve that electric energy meter component is influenced by temperature change is generated according to the curve coefficients got,
The electric energy meter component includes computation chip crystal oscillator and resistance;
It obtains current environment and detects temperature, judging the current environment detection temperature and upper primary environment measuring temperature
Between difference be more than the preset temperature difference after, input the difference to the measurement error cubic curve and obtain the current meter of electric energy meter
Measure error;
Compensating gain is calculated according to the current measurement error.
Preferably, a kind of power meter temperature influence error compensating method provided by the invention further includes:
The measurement error cubic curve model that is influenced by temperature change according to the computation chip crystal oscillator, the resistance are by temperature
Curve model of measurement error that degree variation influences is overlapped to obtain the total amount error cubic curve model of electric energy meter.
Preferably, a kind of power meter temperature influence error compensating method provided by the invention further includes:
Based on Pre-set reference temperature, it is bent that the total amount error is calculated according to measurement error of the electric energy meter under test temperature
The curve coefficients of line model.
Preferably, the test temperature is respectively -30 DEG C, -5 DEG C, 23 DEG C and 60 DEG C.
Preferably, the acquisition current environment detection temperature is specially:
Environment temperature is obtained by the second by temperature sensor, using the average value of nearest 5 temperature got as current
Environment measuring temperature.
Preferably, the current measurement error calculating compensating gain of the basis is specially:
Compensating gain is calculated according to current measurement error by preset formula;
Wherein, the preset formula is:
Δ GAIN=- Δs Err/ (1+ Δ Err) * K
In formula, Δ Err is current measurement error, and K is the preset proportion coefficient of computation chip crystal oscillator.
Preferably, the Pre-set reference temperature is 23 DEG C.
According to another aspect of the present invention, a kind of power meter temperature influence error-compensating apparatus is provided, including:
Generation module, for generating the metering that electric energy meter component is influenced by temperature change according to the curve coefficients got
Error cubic curve, the electric energy meter component include computation chip crystal oscillator and resistance;
First computing module detects temperature for obtaining current environment, judge the current environment detect temperature with it is upper
Difference between primary environment measuring temperature inputs the difference more than after the preset temperature difference to the measurement error cubic curve
Obtain the current measurement error of electric energy meter;
Second computing module, for calculating compensating gain according to the current measurement error.
According to another aspect of the present invention, a kind of power meter temperature influence error-compensating apparatus is provided, including:Memory,
And it is coupled to the processor of the memory;
The processor is configured as, based on the instruction being stored in the memory devices, executing electricity as described above
It can table temperature influence error compensating method.
According to another aspect of the present invention, a kind of computer-readable medium is provided, computer program is stored thereon with, the journey
Realize that above-described power meter temperature influences error compensating method when sequence is executed by processor.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
Error compensating method is influenced the present invention provides a kind of power meter temperature and device, this method include:According to acquisition
To curve coefficients generate the measurement error cubic curve that is influenced by temperature change of electric energy meter component, electric energy meter component includes
Computation chip crystal oscillator and resistance;It obtains current environment and detects temperature, judging current environment detection temperature and upper primary environment
The difference between temperature is detected more than after the preset temperature difference, the current meter of electric energy meter is obtained to measurement error cubic curve input difference
Measure error;Compensating gain is calculated according to current measurement error.The present invention provides a kind of metering that electric energy meter is affected by temperature mistakes
Poor compensation method, has the characteristics that simple, practical and reliable, improves measuring accuracy of electric energy meter under the influence of temperature.
Specific implementation mode
An embodiment of the present invention provides a kind of power meter temperatures to influence error compensating method and device, can realize electric energy meter
Error compensation within the scope of total temperature, error change caused by being affected by temperature to electric energy meter have effective inhibiting effect.
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention
Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below
Embodiment be only a part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field
All other embodiment that those of ordinary skill is obtained without making creative work, belongs to protection of the present invention
Range.
Referring to Fig. 1, a kind of power meter temperature provided by the invention influences one embodiment of error compensating method, packet
It includes:
101, the measurement error that the curve coefficients generation electric energy meter component that basis is got is influenced by temperature change is three times
Curve, electric energy meter component include computation chip crystal oscillator and resistance;
102, it obtains current environment and detects temperature, judging current environment detection temperature and upper primary environment measuring temperature
Between difference be more than the preset temperature difference after, to measurement error cubic curve input difference obtain the current measurement error of electric energy meter;
103, compensating gain is calculated according to current measurement error.
The embodiment of the present invention mainly considers that computation chip crystal oscillator and resistance are influenced by temperature drift, generate electric energy meter component by
Then the measurement error cubic curve that temperature change influences judges the difference between current environment detection temperature and Pre-set reference temperature
More than the current measurement error of the electric energy meter under the difference after the preset temperature difference, is calculated by the curve, last basis is current to be counted value
Measure error calculation compensating gain.
It is one embodiment that a kind of power meter temperature influences error compensating method above, to carry out more specific description,
A kind of another embodiment of power meter temperature influence error compensating method is provided below, referring to Fig. 2, provided by the invention one
Kind power meter temperature influences another embodiment of error compensating method, including:
201, measurement error cubic curve model, the resistance influenced by temperature change according to computation chip crystal oscillator is become by temperature
Curve model of measurement error that changing influences is overlapped to obtain the total amount error cubic curve model of electric energy meter;
In the present embodiment, electric energy meter measurement error is influenced by ambient temperature, mainly due to computation chip crystal oscillator
It is influenced by temperature drift with resistance.The measurement error that the crystal oscillator of electric energy meter is influenced by temperature drift is Δ Err1, the meter that resistance is influenced by temperature drift
Amount error is Δ Err2, therefore the total amount error that electric energy meter is influenced by temperature change is:Δ Err=Δ Err1+ Δs Err2.
HC-49S series type crystal oscillators may be used in the computation chip of electric energy meter in the present embodiment, using AT cut types, due to crystalline substance
Vibration frequency temperature drift curve is cubic curve, is in " S " type curve of recumbency, and with the variation of temperature, temperature drift becomes in " S " type track
Change, therefore the measurement error cubic curve model that computation chip crystal oscillator is influenced by temperature change is represented by:
Δ Err1=a Δs T3+bΔT2+c1ΔT+d
Wherein, Δ T is the variation of environment temperature, is represented by:
Δ T=T-T0
Wherein, T is that current environment detects temperature;T0 is Pre-set reference temperature, can be 23 DEG C.
The temperature drift curve of resistance is generally linear, and with the variation of environment temperature, resistance value scales up or reduces,
Therefore curve model of measurement error that resistance is influenced by temperature change is represented by:
Δ Err2=c2 Δs T
Therefore the total amount error of electric energy meter is represented by:
Δ Err=Δ Err1+ Δs Err2
=a Δs T3+bΔT2+c1ΔT+d+c2ΔT
=a Δs T3+bΔT2+(c1+c2)ΔT+d
=a Δs T3+bΔT2+cΔT+d
A, b, c, d are respectively every curve coefficients of above-mentioned cubic curve model.
202, it is based on Pre-set reference temperature, it is bent to calculate total amount error according to measurement error of the electric energy meter under test temperature
The curve coefficients of line model;
In the present embodiment, to determine the concrete numerical value of curve coefficients, it is true in turn that electric energy meter can be carried out to preset experiment
Determine coefficient.Before being tested, can its measurement error be arranged in 23 DEG C of room temperature in electric energy meter is zero, then -30 DEG C, -5
DEG C, 60 DEG C of three testing sites, respectively obtain measurement error be Δ err1, Δ err2, Δ err3.Due in 23 DEG C of room temperature, temperature
The variable quantity and electric energy meter measurement error of degree are all 0, therefore can pass through -30 degree, -5 degree, 23 degree, 60 degree of four test temperature points
Data, calculate tetra- coefficients of a, b, c, d.
Δ T=[- 53, -28,0,37]
Δ Err=[Δ err1, Δ err2,0, Δ err3]
After obtaining above-mentioned error change amount data, it can be obtained three times by MATLAB engineering software iunction for curve
Curve model coefficient a, b, c, d.Iunction for curve is:
K=polyfit (Δ T, Δ Err, 3)
Wherein, k=[a, b, c, d] is the curve coefficients of required cubic curve model.
203, the measurement error that the curve coefficients generation electric energy meter component that basis is got is influenced by temperature change is three times
Curve, electric energy meter component include computation chip crystal oscillator and resistance;
After determining curve coefficients, coefficient substitution following formula can be generated into the metering that electric energy meter component is influenced by temperature change
Error cubic curve, i.e.,:
Δ Err=Δ Err1+ Δs Err2
=a Δs T3+bΔT2+c1ΔT+d+c2ΔT
=a Δs T3+bΔT2+(c1+c2)ΔT+d
=a Δs T3+bΔT2+cΔT+d
204, by temperature sensor by the second obtain environment temperature, using the average value of nearest 5 temperature got as
Current environment detects temperature;
The present invention can obtain environment temperature by temperature sensor by the second, in order to obtain more acurrate more stable temperature, this
Embodiment is in such a way that slippage is averaged, and by the way of being averaged read recently 5 temperature, is examined as current environment
Testing temperature T, therefore Δ T is also referred to as:
Δ T=T-T0
=(T1+T2+T3+T4+T5)/5-T0
Wherein, nearest 5 times ambient temperature datas read by temperature sensor of T1, T2, T3, T4, T5.Such as it is with T1
When the previous temperature for detecting and obtaining, the then temperature that four detections obtain before T2, T3, T4, T5 are T1.
205, judge whether the difference between current environment detection temperature and the environment measuring temperature of last time is more than preset
The temperature difference thens follow the steps 206 if being more than, if being no more than, re-executes step 204;
To avoid electric energy meter from frequently doing the measurement error compensation of temperature influence, when judging current environment detection temperature and upper one
When difference between secondary environment measuring temperature is more than the preset temperature difference (such as 1 DEG C), then carry out electric energy meter measurement error calculating and
Compensation reacquires current environment detection temperature if being no more than.
206, the current measurement error of electric energy meter is obtained to measurement error cubic curve input difference;
207, compensating gain is calculated according to current measurement error.
In the present embodiment, compensating gain is calculated according to current measurement error by preset formula;
Wherein, preset formula is:
Δ GAIN=- Δs Err/ (1+ Δ Err) * K
In formula, Δ Err is current measurement error, and K is the preset proportion coefficient of computation chip crystal oscillator, which can pass through meter
Amount chip technology handbook is searched to obtain.
The compensating gain Δ GAIN will finally be adjusted, the original gain GAIN with electric energy meter when room temperature0It is superimposed, counts
It calculates in new gain G AIN write-in computation chips, completing temperature influences error compensation.
Error compensating method will be influenced on power meter temperature provided by the invention with a specific example below to carry out specifically
Explanation:
Randomly select an electric energy meter, be put into temperature test chamber do temperature influence error test, -30 degree, -5 degree, 60 degree
The error information obtained respectively is -0.00214, -0.00523,0.00728, is to obtain test data:
Δ T=[- 53, -28,0,37]
Δ Err=[- 0.00254, -0.00523,0,0.00728]
Obtaining coefficient by MATLAB engineering software iunction for curve is respectively:
A=-6.001163*10-8
B=4.834308*10-6
C=1.261133*10-4
D=-4.727793*10-3
Three ordered coefficients of acquisition are written in all electric energy meter internal storages of same batch, and are therefrom taken out at random again
3 electric energy meters are taken, is put into temperature test chamber and surveys its error change amount, verify the temperature shadow
Ring the validity of compensation method.From -30 degree to 60 degree at interval of 10 degree of reading power meters errors, test result is as follows
It is shown:
Err1=[- 0.00027,0.00018, -0.00012, -0.0001,0.00005,0.00004, -0.0006, -
0.00011,-0.00009,0.00013]
Err2=[0.00025, -0.00017,0.00009, -0.00014,0.00008, -0.00003,0.00006, -
0.00007,0.00012,0.00018]
Err3=[- 0.00017,0.00022,0.00016, -0.00013, -0.00005,0.00002, -0.00005,
0.00013,0.00015,-0.00014]
Test result shows:Error Compensation Algorithm is influenced by above-mentioned temperature, electric energy meter error variation is obviously reduced.
By acquiring ambient temperature value, be applied to temperature influences in Error Compensation Algorithm the present invention, adjusts metering core immediately
The gain of piece achievees the purpose that correct error.The present invention does not increase any hardware cost, simple and convenient, and feasibility is high.
Referring to Fig. 3, a kind of power meter temperature provided by the invention influences one embodiment of error-compensating apparatus, packet
It includes:
Generation module 301, for generating what electric energy meter component was influenced by temperature change according to the curve coefficients got
Measurement error cubic curve, electric energy meter component include computation chip crystal oscillator and resistance;
First computing module 302 detects temperature for obtaining current environment, is judging current environment detection temperature and upper one
Difference between secondary environment measuring temperature obtains electric energy meter more than after the preset temperature difference to measurement error cubic curve input difference
Current measurement error;
Second computing module 303, for calculating compensating gain according to current measurement error.
Further, power meter temperature influence error-compensating apparatus provided by the invention further includes:
Laminating module, measurement error cubic curve model, electricity for being influenced by temperature change according to computation chip crystal oscillator
Curve model of measurement error that hindering is influenced by temperature change is overlapped to obtain the total amount error cubic curve of electric energy meter
Model.
Further, a kind of power meter temperature influence error-compensating apparatus provided by the invention further includes:
Third computing module, for being based on Pre-set reference temperature, according to measurement error meter of the electric energy meter under test temperature
Calculate the curve coefficients of total amount error curve model.
Further, test temperature is respectively -30 DEG C, -5 DEG C, 23 DEG C and 60 DEG C.
Further, the first computing module 302 specifically includes:
Acquiring unit detects temperature for obtaining current environment;
Computing unit, for judging that the difference between current environment detection temperature and upper primary environment measuring temperature is super
After crossing the preset temperature difference, the current measurement error of electric energy meter is obtained to measurement error cubic curve input difference;
Acquiring unit is additionally operable to obtain environment temperature by the second by temperature sensor, by nearest 5 temperature got
Average value detects temperature as current environment.
Further, the second computing module 303 is additionally operable to be calculated according to current measurement error by preset formula and compensate
Gain;
Wherein, preset formula is:
Δ GAIN=- Δs Err/ (1+ Δ Err) * K
In formula, Δ Err is current measurement error, and K is the preset proportion coefficient of computation chip crystal oscillator.
Further, Pre-set reference temperature is 23 DEG C.
A kind of power meter temperature provided by the invention influences another embodiment of error-compensating apparatus, including:Memory,
And it is coupled to the processor of memory;
Processor is configured as based on the instruction being stored in memory devices, and executing above power meter temperature such as influences
Error compensating method.
The invention further relates to a kind of computer-readable mediums, are stored thereon with computer program, which is held by processor
Power meter temperature more than being realized when row influences error compensating method.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit
It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list
The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can be stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention
Portion or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey
The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before
Stating embodiment, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding
The technical solution recorded in each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
Modification or replacement, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.