Summary of the invention
The object of the invention is: in order to solve the not high problem of conventional digital temperature-compensated system precision, the invention provides a kind of digital temperature compensation system and method.
Technical scheme of the present invention is: a kind of digital temperature compensation system, described temperature-compensated system is comprised of constant current source 1, pressure sensing module 3, pressure signal amplifier 5, temperature signal amplifier 8, multiplexer switch 9, A/D modular converter 6 and processor 7, pressure sensing module 3 is comprised of pressure transducer 2 and thermo-compensator 4, and described thermo-compensator 4 is connected in the excitation end of pressure transducer 2; Constant current source 1 two ends load on the excitation end of pressure sensing module 3, described temperature signal amplifier 8 is connected in the excitation end of pressure sensing module 3, pressure signal amplifier 5 is connected in the signal output part of pressure sensing module 3, described pressure signal amplifier 5 and temperature signal amplifier 8 are connected in A/D modular converter 6 through multiplexer switch 9, and A/D modular converter 6 is connected in processor 7;
Constant current source 1 provides exciting current for pressure transducer 2,2 pairs of pressure transducers of thermo-compensator 2 carry out temperature compensation, pressure sensing module 3 detected pressures and temperature signal are also converted into voltage signal, pressure signal amplifier 5 and temperature signal amplifier 8 amplify pressure, temperature signal, A/D modular converter 6 is converted into digital signal by simulating signal and sends in processor 7, and 7 pairs of signals of processor are processed.
Described constant current source 1 is comprised of reference voltage source 10, OP400 chip 11.
A digital temperature compensating method, uses above-mentioned a kind of digital temperature compensation system, comprises the following steps:
Step 1: the demarcation of system: set up calibration value tables of data simultaneously and demarcate binary value tables of data:
Set up calibration value tables of data:
(1) determine the scope T that demarcates temperature
0~T
n, T
nfor demarcating temperature spot, temperature interval Δ T, T
n=T
0+ Δ T* (n-1), determining of temperature range need to be in conjunction with temperature tolerance and the environment for use of digital temperature compensation system, and preferably-20~60 ℃, temperature interval Δ T is definite according to the resolution of system and accuracy requirement, preferably 1 ℃≤Δ T≤10 ℃;
(2) determine nominal pressure scope P
0~P
m, P
mfor nominal pressure point, pressure intervals Δ P, P
m=P
0+ Δ P* (n-1), pressure limit really normal root is definite according to the range of selected pressure transducer, and pressure intervals Δ P requires to determine according to system accuracy;
(3) set up calibration value tables of data:
T
0 |
T
1 |
T
2 |
T
3 |
T
i |
T
n |
P
0 |
P
0 |
P
0 |
P
0 |
P
0 |
P
0 |
P
1 |
P
1 |
P
1 |
P
1 |
P
1 |
P
1 |
P
2 |
P
2 |
P
2 |
P
2 |
P
2 |
P
2 |
P
j |
…… |
…… |
…… |
P
j |
…… |
P
m |
P
m |
P
m |
P
m |
P
m |
P
m |
Set up and demarcate binary value tables of data:
The demarcation binary value TC of the temperature obtaining according to actual acquisition
nand the demarcation binary value PC of pressure
nmset up and demarcate binary value tables of data
TC
0 |
TC
1 |
TC
2 |
TC
3 |
TC
i |
TC
n |
PC
0·0 |
PC
1·0 |
PC
2·0 |
PC
3·0 |
…… |
PC
n·0 |
PC
0·1 |
PC
1·1 |
PC
2·1 |
PC
3·1 |
…… |
PC
n·1 |
PC
0·2 |
PC
1·2 |
PC
2·2 |
PC
3·2 |
…… |
PC
n·2 |
PC
0·j |
…… |
…… |
…… |
PC
i·j |
…… |
PC
0·m |
PC
1·m |
PC
2·m |
PC
3·m |
…… |
PCn·m |
Wherein, TC
nto demarcate temperature spot T
ncorresponding temperature binary value, PC
nmfor demarcating temperature spot T
nunder nominal pressure point P
mcorresponding pressure binary value;
Step 2: the storage of system temperature calibration result:
By calibration value tables of data and demarcate binary value data table stores in the inner FLASH storer of the processor [7] of digital temperature compensation system;
Step 3: the compensation of measuring temperature:
Systematic survey obtains measuring temperature binary value TC and gaging pressure binary value PC, and corresponding measurement temperature and gaging pressure are respectively T, P;
(1) when TC, while demarcating temperature spot, also exists TC in demarcating binary value tables of data
ipoint equals TC, T
ibe T, look into and demarcate binary value tables of data:
If demarcate in binary value tables of data and have PC
ijequal PC, P is the P in calibration value tables of data
j;
If demarcate in binary value tables of data and there is no PC
ijequal PC, search and immediate two values of PC numerical value, PC
ikand PC
i (k+1), and PC
ik≤ PC≤PC
i (k+1), PC
ikand PC
i (k+1)the corresponding nominal pressure point in calibration value tables of data is respectively P
kand P
(k+1), utilize formula (1) to calculate P:
If exceeding, PC numerical value demarcates binary value tables of data, if PC is less than the minimum value of demarcating in binary value tables of data, the force value of this minimum value correspondence in calibration value tables of data is P, if PC is greater than the maximal value of demarcating in binary value tables of data, the force value of this maximal value correspondence in calibration value tables of data is P;
(2) when TC, while demarcating temperature spot, does not exist TC in demarcating binary value tables of data yet
ipoint equals TC; Search and immediate two values of TC numerical value, TC
kand TC
(k+1), and TC
k≤ TC≤TC
(k+1)
According to formula (1), calculate PC at TC
kp at temperature
lwith PC at TC
(k+1)p at temperature
(l+1),
(3) when exceeding, TC numerical value demarcates binary value tables of data, if TC is less than the minimum value of demarcating in binary value tables of data, the temperature value of this minimum value correspondence in calibration value tables of data is T, if TC is greater than the maximal value of demarcating in binary value tables of data, the force value of this maximal value correspondence in calibration value tables of data is T, utilizes formula (1) to calculate P.
Advantage of the present invention is: a kind of digital temperature compensation system of the present invention is by the design of pressure sensing module, pressure transducer is increased to thermo-compensator amplifies its temperature characterisitic, realized auto thermal compensation, both be convenient to installation and maintenance, realizing is not only the function of pressure transducer but also temperature sensor.A kind of digital temperature compensating method of the present invention, utilized the temperature transition effect of pressure sensing module to do as temperature compensation basis, realize the auto thermal compensation under arbitrary temp, pressure condition, make it have higher measuring accuracy, having improved pressure measurement accuracy, full scale error is less than ± and 0.02%.
Embodiment
Below in conjunction with accompanying drawing and by embodiment, the present invention is described in further detail, refers to Fig. 1 and Fig. 2.
Refer to Fig. 1, a kind of digital temperature compensation system, described temperature-compensated system is comprised of constant current source 1, pressure sensing module 3, pressure signal amplifier 5, temperature signal amplifier 8, multiplexer switch 9, A/D modular converter 6 and processor 7, it is characterized in that, pressure sensing module 3 is comprised of pressure transducer 2 and thermo-compensator 4, and described thermo-compensator 2 is connected in the excitation end of pressure transducer 2; Constant current source 1 two ends load on the excitation end of pressure sensing module 3, described temperature signal amplifier 8 is connected in the excitation end of pressure sensing module 3, pressure signal amplifier 5 is connected in the signal output part of pressure sensing module 3, described pressure signal amplifier 5 and temperature signal amplifier 8 are connected in A/D modular converter 6 through multiplexer switch 9, and A/D modular converter 6 is connected in processor 7;
Constant current source 1 provides exciting current for pressure transducer 2,2 pairs of pressure transducers of thermo-compensator 2 carry out temperature compensation, pressure sensing module 3 detected pressures and temperature signal are also converted into voltage signal, pressure signal amplifier 5 and temperature signal amplifier 8 pressure, temperature signal amplify, A/D modular converter 6 is converted into digital signal by simulating signal and sends in processor 7, and 7 pairs of signals of processor are processed.
Preferably, described constant current source 1 is comprised of reference voltage source 10, OP400 chip 11.
A kind of digital temperature compensation system of the present invention has utilized the temperature transition characteristic of pressure transducer 2 in hardware design, at the excitation end of sensor, adds thermo-compensator 4.Add after thermo-compensator 4, although the bridge resistor of pressure transducer 2 inside does not have too large variation, the impedance of whole excitation end varies with temperature and has obvious variation.Due to voltage=electric current * resistance, so now driving voltage changes with regard to varying with temperature, now just driving voltage can be processed as temperature correlation parameter, saved traditional thermistor temperature detecting degree.2 pairs of temperature of pressure sensor module 3 specific pressure sensor are now more responsive, make pressure sensor module 3 not only as pressure transducer but also as temperature sensor, and the temperature value of measuring is like this more accurate compared with classic method as temperature compensation value.Adopt temperature calibration to realize wider precision again and improve, the method need not be built temperature acquisition system in addition simultaneously, so hardware is simpler.
Example:
A digital temperature compensation system, pressure transducer 2 selection ± 30kPa range pressure sensors, the required exciting current of selected pressure transducer 2 is 1.5mA.Native system constant current source 1 is comprised of reference voltage source 10, OP400 chip 11, and wherein, reference voltage source 10 adopts MAX6225AESA chip, is connected, for OP400 chip 11 provides 2.5V reference voltage with OP400 chip 11; OP400 chip 11 is connected with pressure sensor module 3 again, and reference voltage is converted to reference current provides 1.5mA exciting current for pressure sensor module 3.Current conversion resistance R is 1.6667K Ω.The difference output that pressure signal amplifier 5 adopts AD620 to realize 1: 100.The difference output that temperature signal amplifier 8 adopts AD620 to realize 1: 1.Multiplexer switch 9 adopts MAX307 to realize the channel selecting of temperature value and force value.A/D modular converter 6 adopts MAX1132 chip that simulating signal is converted to digital signal.Processor 7 adopts EM9160 processor, realizes the intelligent management of collection, storage and the system of data.The selection outbalance of thermo-compensator 4, specifically as shown in stating:
Choosing of resistance, the excitation end output voltage of pressure sensor module 3 (, temperature signal voltage) can not surpass and produce the supply voltage 15V of exciting current OP400 and the slew rate 12V of MAX1132 chip, and the enlargement factor of temperature signal amplifier 8 is 1, considering above-mentioned condition has:
(R
S+R
t)·1.5mV<12V
Wherein, R
sfor pressure transducer 2 excitation end internal resistances, resistance is 3.6K Ω left and right.
, R
t< 4.4K Ω
In addition, select temperature to float for 100ppm resistance (that is, 1 degree Celsius of the every variation of temperature, change in resistance parts per million (ppm)).
Temperature is floated coefficients R
t=Δ TR
t
ΔV=R
T·I
Wherein, Δ T is temperature variation, R
tfor the resistance size of selected thermo-compensator 4, the variable quantity of voltage on Δ V resistance, I is ohmically current value, is excitation electric flow valuve I=1.5mA.
Because MAX1132 chip in system is 16 chips, and output voltage range is-12V~+ 12V that it is 24V/65536=0.366mV that the minimum of MAX1132 chip is differentiated voltage.The enlargement factor of considering again temperature signal amplifier 8 is 1, if require temperature variation Δ T=1 ℃, output voltage variation delta V can be resolved, and requires this voltage variety Δ V at least will be not less than 0.366mV, has
Δ V1 times=Δ TR
ti1 doubly>=0.366mV,
, R
t>=2.4K Ω
If require temperature variation Δ T=10 ℃, in like manner can calculate R
t>=0.24K Ω.
If require temperature variation Δ T=0.5 ℃, in like manner can calculate R
t>=4.8K Ω.
Can find out, the resolution of the wider temperature of scope of resistance value is lower.
In reality, be difficult to environment temperature to be stabilized in 1 ℃, desired temperature bucking-out system has higher temperature resolution again, the above analysis, and native system adopts R
t=2.4K Ω.
Use the digital temperature compensating method that above-mentioned digital temperature compensation system is realized:
Step 1: the demarcation of system: set up calibration value tables of data simultaneously and demarcate binary value tables of data:
Set up calibration value tables of data:
(1) determine the scope T that demarcates temperature
0~T
n, n=0,1,2,3......, T
nfor demarcating temperature spot, temperature interval Δ T, T
n=T
0+ Δ T* (n-1), because determining of temperature range need be environment for use in conjunction with the temperature tolerance of digital temperature compensation system.Digital temperature compensation system in example all adopts technical grade chip temperature resistant range to be generally-40~85 ℃, and the environment for use temperature of this digital temperature compensation system is generally 0~50 ℃, comprehensive these 2 considerations, we stay a part of temperature surplus again, so temperature range is selected-20~60 ℃, temperature interval Δ T determines according to the resolution of system and accuracy requirement.For example, thermo-compensator employing 100ppm resistance is 2.4K Ω, has:
Δ T >=1 ℃
In example, the output of pressure sensing module 3 in whole temperature range is nonlinear, and Δ T less the count precision of more temperature curves matching of temperature of demarcating in temperature interval is higher, but demarcation temperature is counted, calibration process and detection algorithm are more complicated, and the processor needing has larger data space and processing power, the performance of processor EM9160 and its FLASH storer are 16M.Therefore, preferably temperature interval Δ T is 5 ℃.
(2) determine nominal pressure scope P
0~P
m, P
mfor nominal pressure point, pressure intervals Δ P, P
n=P
0+ Δ P* (n-1), pressure limit really normal root is determined according to the range of selected pressure transducer.Pressure transducer 2 selection ± 30kPa range pressure sensors, so the pressure limit of the method is-30kPa~+ 30kPa.Pressure intervals Δ P determines according to accuracy requirement.The output of pressure transducer 2 in whole range ability is nonlinear, and pressure intervals Δ P less be that the count precision of more multiple pressure force curve matching of nominal pressure is higher, but nominal pressure is counted, calibration process and detection algorithm are more complicated, and the processor needing has larger data space and processing power, performance and its FLASH storer of considering processor EM9160 are 16M, therefore, preferred pressure is spaced apart 5kPa.
(3) set up calibration value tables of data as follows: (following table is the partial content of calibration value tables of data)
T0=0 |
T
1=5
|
T
2=10
|
T
3=15
|
…… |
T
9=45
|
T
10=50
|
P
0=-30
|
P
0=-30
|
P
0=-30
|
P
0=-30
|
…… |
P
0=-30
|
P
0=-30
|
P
1=-25
|
P
1=-25
|
P
1=-25
|
P
1=-25
|
…… |
P
1=-25
|
P
1=-25
|
…… |
…… |
…… |
…… |
…… |
…… |
…… |
P
6=0
|
P
6=0
|
P
6=0
|
P
6=0
|
…… |
P
6=0
|
P
6=0
|
P
7=5
|
P
7=5
|
P
7=5
|
P
7=5
|
…… |
P
7=5
|
P
7=5
|
…… |
…… |
…… |
…… |
…… |
…… |
…… |
P
11=25
|
P
11=25
|
P
11=25
|
P
11=25
|
…… |
P
11=25
|
P
11=25
|
P
12=30
|
P
12=30
|
P
12=30
|
P
12=30
|
…… |
P
12=30
|
P
12=30
|
Wherein the unit of temperature is ℃, and pressure unit of force is kPa.
Set up and demarcate binary value tables of data:
The demarcation binary value TC of the temperature obtaining according to actual acquisition
nand the demarcation binary value PC of pressure
nmset up demarcation binary value tables of data as follows: (following table is for demarcating the partial content of binary value tables of data)
TC
0=26134
|
TC
1=26288
|
TC
2=26461
|
TC
3=26633
|
…… |
TC
9=27717
|
TC
10=27906
|
PC
0·0=-24311
|
PC
1·0=-24337
|
PC
2·0=-24371
|
PC
3·0=-24383
|
…… |
PC
9·0=-24442
|
PC
10·0=-24435
|
PC
0·1=-20261
|
PC
1·1=-20290
|
PC
2·1=--20327
|
PC
3·1=-20339
|
…… |
PC
9·1=-20394
|
PC
10·1=-20385
|
…… |
…… |
…… |
…… |
…… |
…… |
…… |
PC
0·6=-51
|
PC
1·6=-93
|
PC
2·6=-140
|
PC
3·6=-169
|
…… |
PC
9·6=-210
|
PC
10·6=-195
|
PC
0·7=3985
|
PC
1·7=3939
|
PC
2·7=3889
|
PC
3·7=3857
|
…… |
PC
9·7=3814
|
PC
10·7=3832
|
…… |
…… |
…… |
…… |
…… |
…… |
…… |
PC
0·11=19995
|
PC
1·11=19929
|
PC
2·11=19863
|
PC
3·11=19823
|
…… |
PC
9·11=19766
|
PC
10·11=19787
|
PC
0·12=23960
|
PC
1·12=23892
|
PC
2·12=23822
|
PC
3·12=23779
|
…… |
PC
9·12=23717
|
PC
10·12=23738
|
TC wherein
10to demarcate temperature spot T
10corresponding temperature binary value, PC
1012for demarcating temperature spot T
10under nominal pressure point P
12corresponding pressure binary value, other data the like.
Step 2: the storage of system temperature calibration result;
By the calibration value tables of data of setting up in step 1 and demarcate binary value data table stores in the FLASH storer of the EM9160 processor inside of digital temperature compensation system;
Step 3: the compensation of measuring temperature:
The measurement temperature binary value TC that systematic survey obtains and gaging pressure binary value PC, corresponding measurement temperature and gaging pressure are respectively T, P;
(1) when TC, while demarcating temperature spot, establishes TC=TC
3=26633, look into and demarcate binary value tables of data:
If pressure binary value PC is nominal pressure point binary value, establish PC=PC
37=3857, correspond in calibration value tables of data gaging pressure P=5kPa.
If pressure binary value PC is not nominal pressure point binary value, establish PC=3600, find immediate two value PC with PC
36=-169 and PC
37=3857, and PC
36≤ PC≤PC
37, PC
36and PC
37the corresponding nominal pressure point P demarcating numerical tabular
6=0kPa and P
7=5kPa, calculates P:
If pressure binary value PC exceeds, demarcate binary value tables of data, if PC is less than the minimum value of the pressure binary value at the TC temperature in binary value tables of data, establishing PC=-25000 is PC≤PC
30=-24383, P=P
0=-30kPa; If PC is greater than the maximal value of the pressure binary value at the TC temperature in binary value tables of data, establishing PC=24000 is PC>=PC
312=23779, P=P
12=30kPa.
(2) when TC, while demarcating temperature spot, establishes TC=26500, PC=21000; Search and immediate two the value TC of TC numerical value
2=26461 and TC
3=26633, and TC
2≤ TC≤TC
3.
Look into and demarcate the known PC of binary value tables of data at TC
2at temperature, there is PC
211≤ PC≤PC
212, PC wherein
211=19863, PC
212=23822.PC
211and PC
212the corresponding nominal pressure point P demarcating numerical tabular
11=25kPa and P
12=30kPa. calculates PC at TC according to formula (1)
2pressure measuring value P at temperature
l:
In like manner, look into and demarcate the known PC of binary value tables of data at TC
3at temperature, there is PC
311≤ PC≤PC
312, PC wherein
311=19823, PC
312=23779.PC
211and PC
212the corresponding nominal pressure point P demarcating numerical tabular
11=25kPa and P
12=30kPa. calculates PC at TC according to formula (1)
3pressure measuring value P at temperature
(l+1):
According to formula (1), have
(3) degree binary value TC exceeds demarcation binary value tables of data, if TC is less than the minimum value TC of the temperature binary value in binary value tables of data
0=26134, establishing TC=25000 is TC≤TC
0, assert TC=TC
0=25000, T=T
0=0 ℃; If TC be greater than temperature binary value in binary value tables of data maximum of T C
10=27906, establishing TC=28000 is TC>=TC
10, assert TC=TC
0=27906, T=T
0=50 ℃.
The implementation result of the method:
Give normal pressure input value of system, after temperature-compensated system auto thermal compensation, can obtain a corresponding measured value, this two class values comparing result is as shown in the table:
Standard value (kPa) |
Measured value (kPa) |
Error |
-30 |
30.001 |
-0.002% |
-27 |
-27 |
0 |
20 |
--20.001 |
-0.002% |
Standard value (kPa) |
Measured value (kPa) |
Error |
-12 |
-12.007 |
-0.012% |
-10 |
-10.002 |
-0.003% |
-3 |
-3.008 |
-0.013% |
0 |
0.001 |
0.002% |
3 |
2.993 |
-0.012% |
10 |
10 |
0.000% |
12.001 |
12 |
0.002% |
20 |
20 |
0% |
27.008 |
27 |
0.013% |
30.002 |
30 |
0.003% |
Wherein, standard value refers to normal pressure input value exactly.Error is the full scale error of systematic survey pressure, and error
The present invention has utilized the temperature transition effect of pressure sensing module 3 to do as temperature compensation basis in sum; Pressure transducer 2 being increased to thermo-compensators 4 its temperature characterisitic is amplified, realized auto thermal compensation, improved pressure measurement accuracy, full scale error is less than ± and 0.02%.