You are on page 1of 5

2011 International Conference on Computer Science and Network Technology

Study on NTC thermistor characteristic curve fitting


methods
Yu Cong, Zhou Wang-chao, Sun Bin, Zhou Hang-xia
College of Information Engineering, China Jiliang University, Hangzhou 310018, China

Abstract—Thermistor characteristic equation directly verify at laboratory conditions for ocean temperature
determines the temperature measurement accuracy. Three measurements of the actual calibration of the thermometer.
fitting equation of NTC thermistors and their corresponding
mathematic solutions are introduced. An adaptive algorithm II FITTING EQUATION AND FITTING METHODS.
based on cross-validation is proposed to determine the degree
of chebyshev polynomials equation. The experiment indicates A. Steinhart-Hart Equation
that the method of least squares for Steinhart-Hart equation Steinhart-Hart equation was deduced by oceanographer
and chebyshev polynomials equation has higher accuracy, and Steinhart and Hart, the equation is defined as:
the equation determined by adaptive algorithm for the
chebyshev polynomials method has better performance. 1
 A  B ln R  C (ln R ) 3 (1)
Keywords-NTC thermistors; fitting curve ; Steinhart-Hart
T
equation;chebyshev polynomials Where A , B , C is parameter of equation , T is
temperature,R is resistance of thermometer.
I INTRODUCTION
B. Three-point Method
Negative Temperature Coefficient (NTC) thermistor The method only needs three calibration data measured
thermometer is a ceramic oxide semiconductor, which can in temperature range. Here TL is minimum temperature, TH
meet the requirement of high-precision temperature is intermediate temperature and TM is maximum
measurement. Functional relationship between NTC temperature, respectively, corresponding thermistor
thermistor resistance and temperature obeys negative resistance is RL, RH and RM. Temperature unit is K
exponential function of R-T (resistance-temperature) (Kelvin), the resistance unit is Ω (ohms). The function of
equation. Individual differences of the thermistor, even exists Rx and Tx is:
in parallel NTC thermistor thermometer, can be induced by
the different production process and packaging materials 1
[1,2]. Moreover, different measurement environments and Tx 
temperature range will also result in changes in RT equation a  b ln( Rx )  c ln( Rx )3 (2)
parameters. In order to ensure that the temperature Formula (2) is NTC thermistor characteristic curve
measurement residual is in the required range, thermistor described by the Steinhart-Hart equation mode, according to
should be calibrated by a standard thermometer before using, the measured three temperature data, the coefficients a, b, c
obtaining the characteristic equation to describe its curve. is calculated by the following formula:
Theoretically the characteristics of NTC thermistor is a 1
negative exponential curve equation, but in practice the use a  C * ln 3 R L  b * ln 3 R L
of the theoretic equation would leads to significant nonlinear TL (3)
error[3]. Therefore, the equation is usually chosen with the 1 1
alternative characteristics of the resistance fitting curve[1,2].   c * (ln 3 RL  ln 3 RM )
A more general fitting equation is the Steinhart-Hart TL TM
b
equation, whose form is relatively simple, and the parameter ln RL  ln RM (4)
of equations can be calculated by three-point method or least
squares fitting, which can obtain higher accuracy. Using 1 1
(lnRL  ln RM ) *(  )
Chebyshev polynomials to fit can obtain high accuracy, but 1 1 TL TH
requires people to determine the fitting degree of equation c [   ]/
TL TM ln RL  ln RH
and avoid over-fitting phenomenon, its calculation is little
more complicated[3]. (lnRL lnRM)*(ln3 RL ln3 RH)
[ln3 RL ln3 RM  ]
This paper compared the three-point method, least lnRL lnRH (5)
squares polynomial fitting, and Chebyshev polynomial Three-point method is simple, but it has large error. The
fitting method for the NTC thermistor characteristic curve subsection solution approach can improve the precision, it is
parameters, and propose adaptive algorithm for the unnecessary to go into detail.
chebyshev polynomials method, the technique is presented to

978-1-4577-1587-7/11/$26.00 ©2011 IEEE 2209 December 24-26, 2011

Authorized licensed use limited to: Universidad Nacional Autonoma De Mexico (UNAM). Downloaded on February 04,2021 at 20:02:50 UTC from IEEE Xplore. Restrictions apply.
 
C. Least-squares Fitting a0 n

The least squares polynomial regression method can be T   ai cos(i cos 1 x ) (12)
used for higher precision. Formula is as follows: 2 i 1
Where ai is the coefficient to be solved, the number i is
1 degree of polynomials, it usually does not exceed 11 and
Let y  , x  ln( R ) need to determine with observation. The input variables
T
should be normalized, the normalized resistance value
Then, formula (1) can be transform to: equation is x=A*lnR+B, which, A and B is normalization
constant:
y  A  B  x  Cx 3 (6) 2
To solve the equation coefficients, the measured data R, A
T are introduced into formula (6), we obtain the matrix: ln( Rmax )  ln( Rmin ) (12)
1 x1 x  3
1  y1  2 ln( Rmax )
 3  A   B 1
1 x 2 x    y2  (7) ln( Rmax )  ln( Rmin )
2
B  (13)
       
  C    Similarly, coefficients can be solved by least squares
1 x n x n3   yn  fit equation derived before.
When the number of data is greater than 3, the least E. Adaptive Algorithm for The Chebyshev Polynomials
squares method is required to solve the best coefficient For the Chebyshev polynomial fitting, in theory, the error
Let on the sample point converge to zero with increment of
degree of equation (the number of base polynomials).
Vx  V1 V2  Vn 
T
However, in practice, the increment may result in "over
Y  [ y1 y2  yi ]T fitting" phenomenon, that error of the curve fitted in the
given sample point is small, but the other interval points
M  A B C  appear larger error[5]. To avoid this phenomenon, degrees of
equation have to be determined artificially, which in use will
1 x1 x13  cause some inconvenience and bring inaccuracy. This paper
  presents an algorithm using cross-validation to obtain the
1 x2 x 23 
D degree of Chebyshev polynomial fitting method.
  
  Cross-validation is used to get reliable and stable model,
1 x n x n3  the algorithm is not only for the correctness of the model but
also improve predictive ability of the model, its basic idea is
Where Yx Is the fitting error,Y is vector of measured to separate the data set into sample set and validation set
temperture,M is vector of coefficient,D is corresponding which validate the model’s accuracy. Depending on the
polynomial matrix, deduced from formula (7): classification method, there is Holdout validation, k-fold
(8) cross-validation and leave-one-validation[5].
Vx  DM  Y
F. Algorithm Description
Formula of least-squares is
This paper puts forward a cross-validation algorithm to
D' DM  D' Y (9) determine the degree of Chebyshev polynomials. The
Matrix form is algorithm can avoid over-fitting and achieve higher fitting
accuracy. The algorithm implementation needs to compare
 n n
  n 2  the error on the validation set and choose the minimum
 n x x i
3
i   xi  (10)
n i1
n
i 1
n  A  ni1  validation set error to determine degree. Error includes
 x xi4 B   xi yi 
 x 
2
Maximum error and average error.
i 1
i
i 1
i
i 1    i1 
n 3 n n C  n 3  The maximum error is:
 xi x 4
i  6
xi   xi yi 
 i1 i 1 i 1   i1 
Solve the equation and coefficients can be obtained. E m  max( Ei ) (14)
D. Chebyshev Polynomial Fitting The average error is:
Fitting with polynomial family can achieve better n
accuracy and control the fitting precision, among them E i
Chebyshev polynomial is the best choice [4]. Chebyshev E avg  i 1
(15)
polynomial fitting formula is: n
Where, n is number of data, Ei is fitting residual on each
validation data set and prediction of training set.

2210
 

Authorized licensed use limited to: Universidad Nacional Autonoma De Mexico (UNAM). Downloaded on February 04,2021 at 20:02:50 UTC from IEEE Xplore. Restrictions apply.
 
Algorithm pseudo-code is as follows: Ei  y i  y i (14)
Input: data set D, which includes resistance R and where Ei is the fitting residual of temperature of the
temperature T, which are respectively represented for calibration equation ; yi is the measured temperature; yi' is
the D.R and D.T, the highest training degree is M. fitted temperature. The ideal temperature fitted curve
Output: Polynomial square times K residual of calibration equation should be distributed in a
for i= 2 to M certain bandwidth range.
for j= 1 to length(D) (2)The maximum and minimum absolute fitting residual
obtain a data set collection Dp without the j th data
fit Dp with training data set, obtain fitting function f (x) Emax is maximum absolute fitting residual of
Error(i,j)=f(Dj.R)-Dj.T temperature, Emin is minimum absolute fitting residual of
end temperature, The relatively smaller residual indicates that
end the choice of fitting equation is reasonable.
Compare the maximum error or average error of (2) The absolute value of the average fitting residual
different degree, output best degree K. The average absolute value of residuals is calculated by
the following equation:
III METHODS OF ASSESSMENT AND CALCULATION
EXAMPLE
E ave  E i
(17)
G. Regression analysis and evaluation standard n
To assess the accuracy of different methods, the standard Where: Ei is the calibration equation fitted residuals with i th
used to evaluate the calibration equations includes the data. Smaller the absolute value of the average fitting
following aspects [2]: residual is, indicates the higher accuracy of the calibration
(1) Fitting residual of temperature equation.

Fitting residual of temperature is defined as follows:

TABLE 1 R-T DATA OF NTC THERMISTOR ON THE LABORATORY CONDITION AND THE ERROR OF DIFFERENT METHODS

Standard fixed number 1 2 3 4 5 6 7


Bath temperatures T(℃)
-0.09 0.991 2.073 3.00 4.08 4.95 6.05

Sensor resistance R( K ) 95.43 90.45 85.77 81.98 77.78 74.59 70.76


Three-point method 1.81 3.77 3.83 0 0.87 1.61 0.37
Fitting
residual Polynomial -2.64 0.48 1.58 -1.46 0.21 1.49 0.83
(mK)
Chebyshev polynomial 1.10 -1.19 -1.66 1.78 0.41 -0.73 -0.01
8 9 10 11 12 13 14 15
7.038 8.024 9.002 9.975 15.028 19.977 25.000 30.093

67.489 64.406 61.493 58.752 46.512 37.239 29.890 24.063

0.32 -1.54 0 -2.67 0.19 0 7.96 19.7

1.19 -0.36 1.38 -1.19 0.61 -3.1 -1.15 2.11


-0.41 1.03 -0.88 1.48 -1.74 1.08 -0.25 1.1

(4) Measurement Uncertainty deviation characterization, the following equation is:


In accordance with a "Guide to the Expression of n
Uncertainty in Measurement - 1993 (E)" of ISO,
measurement uncertainty assessment has A, B two types of
(E i  Ei ) 2
methods, including Class A is a series of measurements E std  i 1
(18)
n 1
using the statistical distribution of assessment to test standard

2211
 

Authorized licensed use limited to: Universidad Nacional Autonoma De Mexico (UNAM). Downloaded on February 04,2021 at 20:02:50 UTC from IEEE Xplore. Restrictions apply.
 
Where: is the average fitting residual of the calibration J. Result Of Adaptive Algorithm for Chebyshev Polynomial
Ei
Using the data validation algorithm, we calculate the
equation, the smaller value
Estd is, the more ideal choice maximum error and average error of the different degree of
polynomial with the Chebyshev polynomial fitting, the
of fitting equation.
fitting residuals are shown in Table 4:
H. Experimental Data
TABLE 3 PARAMETERS FOR EVALUATION OF DIFFERENT METHODS
Data is acquired from the National Oceanic metering
station in Tianjin, China, and laboratory equipment is U.S. Evaluation Three- least Chebyshev
company's electronic Brown Mark Ⅲ CTD. Temperature polynomial
part of CTD is NTC temperature sensor, the data is obtained parameter point squares
in standard temperature laboratory(temperature 22.0 ℃, E min (mK) -2.67 -3.1 -1.74
relative humidity 35%) . The CTD with a temperature sensor
and a standard temperature measuring instruments are placed E max (mK) 19.7 2.11 1.78
in the large water tank below ground, calibration temperature
is set from high to law, including 15 temperature calibration Ei 2.98 1.31 0.99
ave (mK)
points. The constant temperature time of each measurement
point range from 10 to 15 minutes long. Temperature range E std 5.09 0.81 0.54
is 0 ℃ -31 ℃. Experimental results collected data is shown According to calculation result of adaptive algorithm for
in Table 1. Chebyshev polynomial, the maximum error and average
I. Experimental Result error is minimum when the degree is 3 times, which can
ensures better fitting precision and avoids over-fitting
phenomenon. The table 4 indicates that higher fitting degree
Respectively using the three fitting methods mentioned
above to fit RT data obtained under laboratory conditions, may not significantly improve fitting accuracy on the
which is listed in Table 1.The points chosen for three-point training set, but may increase the error on the validation set.
method is the 2nd, 11th and 14th point, respective data is The choice of algorithm makes the Chebyshev polynomial
0.991 ℃, 9.975 ℃ and 25.000 ℃. According to the fitting method function better for the unknown data and its
experience, let degree of Chebyshev polynomial be 5 times. predictive ability is also improved.
The result of coefficients of three different methods is shown
in Table 2.

TABLE 2 FITTING PARAMETER OF THREE CALIBRATION METHODS

equation Fitting method Coefficient value


Steinhart Three-point a 2.493×10-3
- method
Hart b 2.494×10-4
equation c 3.380×10-7
least A 2.496×10-3
squares B 2.482×10-4
C 3.624×10-7
a0 0.007
Chebysh a1 1.5409×10-4
ev least
polynomi a2 7.2106×10-7
squares
al a3 6.0756×10-9 Figure 1 Fitting residual of three fitting method
a4 -8.8471×10-10
TABLE 4 THE RESULT OF AUXILIARY ALGORITHM
OF THE CHEBYSHEV POLYNOMIALS METHODS
The residual distributions of 15 experimental points are
shown in Figure 1 and Table 1. It can be seen that part of the
residuals of three-point method data beyond the certain Degree Maximum Average Average
bandwidth. Error error residual
According to the residual data in Table 1, it were (mK) (mK)
calculated by different methods to get the maximum fitting
2 160.6 37.86 31.86
positive and negative errors, mean absolute residuals and
residual uncertainty, the results are shown in Table 3. From 3 2.9 1.18 0.98
the table, compared to three-point method, residuals of 4
least squares and Chebyshev polynomial fitting is way
3.5 1.49 0.98
better, the former reached 3mk, the latter reached 2mk. 5 23.3 3.18 0.98
6 22.8 3.03 0.79

2212
 

Authorized licensed use limited to: Universidad Nacional Autonoma De Mexico (UNAM). Downloaded on February 04,2021 at 20:02:50 UTC from IEEE Xplore. Restrictions apply.
 
7 585.4 46.17 0.78 REFERENCES
8 [1] White.D.R, Technical Guide 10-A Simple , Narrow-Band ,
854.9 62.98 0.50
Thermistors Themometer”[M], Measurement Standards Laboratory of
9 7262.9 528.01 0.52 New Zealand,2005.
[2] Lan Yuqi, Yang Sifeng etc, Preparation and properties of NTC
IV CONCLUSION thermistors with measuring very low temperature: Functional materials,
2010,3(41). (in Chinese)
Based on analysis of NTC thermistor fitting method and [3]Lan Yuqi, Zhu XiaoTong etc, Evaluation of resistance-temperature
experiment, conclusions are drawn: calibrations for NTC thermistors in cryogenic applications, CRYOGENICS:
2010,5 (in Chiese)
(1) For Steinhart-Hart equation, the three-point method is [4]Zheng Peng, Zhou Hangxia, Yu Keguang, Application of simulated
simple and can be used for less demanding calibration of annealing in solving the inverse problem of line heat sources [J], Journal of
precision measurement, least squares method's calculation is China University of Metrology,2010, 21(3):246-250
complex, but more precise. [5] Kohavi, Ron. A study of cross-validation and bootstrap for accuracy
(2) Least-squares Chebyshev polynomial fitting can estimation and model selection. Proceedings of the Fourteenth International
Joint Conference on Artificial Intelligence. 1995, 2 (12):
obtain higher accuracy, the proposed adaptive algorithm can 1137–1143.(Morgan Kaufmann, San Mateo)
effectively solve the uncertainty of degree. Chebyshev
polynomial can be used for high temperature measurement
requirements fields.
ACKNOWLEDGMENT
This paper is supported by the National high-tech researc
h development 863 plan(2008AA09Z303)and Scien-tific &
Technology Innovation Plan Project (XinMiao Project) of
college student of China Zhejiang Province (2011R409007).
Thanks a lot for the found they offer.

2213
 

Authorized licensed use limited to: Universidad Nacional Autonoma De Mexico (UNAM). Downloaded on February 04,2021 at 20:02:50 UTC from IEEE Xplore. Restrictions apply.

You might also like