Evaluation of Piecewise Polynomial Equations for Two Types of Thermocouples

Thermocouples are the most frequently used sensors for temperature measurement because of their wide applicability, long-term stability and high reliability. However, one of the major utilization problems is the linearization of the transfer relation between temperature and output voltage of thermocouples. The linear calibration equation and its modules could be improved by using regression analysis to help solve this problem. In this study, two types of thermocouple and five temperature ranges were selected to evaluate the fitting agreement of different-order polynomial equations. Two quantitative criteria, the average of the absolute error values |e|ave and the standard deviation of calibration equation estd, were used to evaluate the accuracy and precision of these calibrations equations. The optimal order of polynomial equations differed with the temperature range. The accuracy and precision of the calibration equation could be improved significantly with an adequate higher degree polynomial equation. The technique could be applied with hardware modules to serve as an intelligent sensor for temperature measurement.


Introduction
Temperature measurement is basic and important work in a variety of industries. Electrical temperature sensors included resistive temperature detectors, thermistors and thermocouples [1,2]. Because of their multiple advantages of low cost, robustness and easily standardization, thermocouples are the most frequently used sensors for temperature measurement. They can measure a wide range of temperatures and have long-term stability and high reliability [3,4]. However, the major problems of this sensor for signals conditioning are the cold junction compensation and linearization of the transfer relationship between temperature and output voltage [2,3].
Output voltage tables for various types of thermocouples list the output voltage corresponding to different temperatures [5]. The reference junction is fixed at 0 °C . The relation between output voltage and temperature is established as a higher order polynomial equation for each type thermocouple [1,3].
For T-type thermocouples, the relation equation is an 8th order polynomial equation for the temperature range from 0-400 °C . For practical applications, this calibration equation is expressed as an inverse equation. Temperature is recognized as the dependent variable and the output voltage serves as the independent variable.
Because these calibration equations are higher order polynomial equations, Sarma and Boruan [6] suggested that the whole temperature range can be divided into smaller ranges, with lower degree polynomial calibrations being used for each range [4], but the literature contains no reports of any applications of this method.
Hardware modules have been designed to linearize the non-linear signals with hardware linearization [7]. The curve of nonlinear signals was divided into several pieces. The relationship between input and output was assumed to be a linear equation. The thermocouple input signal for each piece was filtered, isolated, amplified and converted to an analog voltage output by a linear equation [6].
The theory of the calibration with piecewise linear regression has been discussed [8]. Several self-compensation methods were proposed to build reconfigurable measurement systems for designing intelligent sensors [9]. The thermistor output from 0 °C to 100 °C was selected to compare errors of the measurement system. However, the piecewise linear interpolation method had the largest errors for these methods.
Some generalized software techniques for linearisation transducers had been used for thermocouples [10,11]. However, their performances have seldom been reported. An increase in table size of the thermocouple output voltage could improve the accuracy, but is impractical for an electrical thermometer. More electronic circuits for linearization could enhance the accuracy. However, these circuits are affected by ambient temperature, electromagnetic, and radiofrequency interference [10,11]. A log-amplifier based circuit for linearizing thermocouple signals was described [12]. Three types of thermocouples were selected to compare simulation results. The maximum percentage nonlinearity error before and after linearization were reduced significantly. To design a higher precision industrial temperature measurement system, Sarma et al. [13] linearized the amplified thermo-emf of a K-type thermocouple with the least squares polynomial fitting technique. Four temperature ranges were selected. The parameters for linear and polynomial equations were estimated for receiving signals gained by the amplifier and the accuracy was better with polynomial equations than linear fitting. Sarma and Boruan [6] developed a measurement system for a K-type thermocouple with analog-to-digital converter, amplifier reference junction and computer. The measurement temperature range was 0 °C to 200 °C . Two calibration equations, a 9th order polynomial and a linear model, were proposed by a least squares method. The accuracy was within ±0.08 °C at 100.2 °C standard temperature. The authors suggested that the precision could be improved with a higher order regression equation, but did not report their adequate regression model. Danisman et al. [14] designed a high precision temperature measurement system based on an artificial neural network for three types of thermocouples. A neural linearizer was used to compute the temperature from the output voltage of the thermocouples.
For determining the optimal order of polynomial equations for temperature measurement, data fitting ability and prediction performance are both important [15]. A higher order polynomial equation has higher values for the coefficient of determination (R 2 ). However, the standard values of estimation could be increased with the loss of data freedom. A higher degree polynomial equation may be over-fitted and the predicted ability thus decreased [16]. Resistance-temperature calibration equations for a negative temperature coefficient (NTC) thermistor have been evaluated with a modern regression technique to show the importance of an adequate calibration equation [16]. The division of the whole measurement range into smaller temperature ranges was proposed [6]. These calibration equations could be transformed with the use of software and incorporated into an intelligent sensor.
In the previous studies, the curves of the relationship of temperature and output voltage were divided into many pieces. Each piece of these curves was assumed as a linear relationship, however, the residual plots of each piece still indicated nonlinear results [4,7,13]. The linear equation should not be the only choice for establishing of calibration equations. Least squares-based parabolic regression had been reported to determine the parameters of the calibration equation [17]. As the piece relationship between temperature and output voltage of a thermistor was assessed with the 4th order polynomial equation, the accuracy and precision could be improved significantly [16].
In this study, the data of output voltage for two types of thermocouple were used from the US National Institute of Standards and Technology (NIST) standard. Five temperature ranges were selected to evaluate their calibration polynomial equations, called piecewise polynomial equations. The parameters for these equations were estimated by the least squares technique. The fitting performance of these equations was evaluated by several statistical methods.

Calibration Equations
The inverse calibration equation was used to describe the relationship between temperature (T) and output voltage of thermocouples (mv). Because the output voltage at 0 °C for thermocouples is zero, the intercept is excluded in a polynomial equation: where c 1 , c 2 to c k are constants.

Temperature-Voltage Data of Thermocouples
Table data for thermocouples [5] were selected to evaluate the fitting ability of the calibration in this study.

Type of Thermocouples: T-Type and J-Type
Two-types of thermocouples were selected in this study for their popularity in industry. The method developed in this study could be used for other thermocouples. The J-type thermocouple is commonly used for higher temperature ranges. In this study, the type of thermocouple was selected to evaluate the improved performance by piecewise polynomial equation.

Data Analysis
Microsoft Excel 2003 was used to estimate the parameters of the different order polynomial equations. The t value of the highest order parameter was used to evaluate the optimal order of polynomial equations. If the order of polynomial equation is underestimated, the estimated parameters and variance will have a fixed bias. If the order of polynomial equation is overestimated, the variance increases and the bias of the prediction ability will inflate [6,15]. Residual plots were used as the qualitative criterion to evaluate the adequateness of models [15]. If the model is adequate for expressing the relationship between independent and dependent variables, the error distribution in residual plots is represented as horizontal bands. If the model is not adequate, the residual plots show a clear systematic pattern. The error was defined as follows: where e i is the error of calibration equation, y i is the dependent variable and i y is the predicted values of the calibration equation. Three statistics, e max , e min and |e| ave were used as quantitative criteria. The e max is the maximum e i value, e min is the minimum e i value and |e| ave is the average of the absolute errors: where i e is the absolute value of e i and n is the number of data. The smaller of the |e| ave , the better the accuracy of the calibration equation.
The other criterion for uncertainty comparing of calibration equations is precision. The precision performance could be calculated from the standard deviation of the calibration equation [18]:

T-Type Thermocouple
The estimated parameters of calibration equations for five temperature ranges are listed in Table 1. The quantitative criteria for these calibration equations are listed in Tables 2 and 3. The 2nd order polynomial equation produced a clear systematic pattern of residual plots (Figure 3a). The 3rd and 4th order polynomial equations produced a random distribution on residual plots (Figure 3b and c). Thus, the 2nd polynomial equation was not adequate because of systematic errors were found over the temperature ranges.   The |e| ave value represents the accuracy of the calibration equation. From Table 2, the 2nd order polynomial equation had the largest value for e max , e min and |e| ave . The |e| ave values for the 3rd and 4th order polynomial equations did not differ substantially: 0.00681306 and 0.00676768, respectively.
The e std value represents precision of the calibration equation. The e std values for the 2nd, 3rd and 4th order polynomial equations were 0.05325660, 0.00840050 and 0.00824098, respectively ( Table 3).
The reduction in e std values between 2nd and 3rd order polynomial equation was about 1/6.5 but that between 3rd and 4th order polynomial equations was not substantial. The increase in the 4th order (c 4 x 4 ) of the calibration equation had only a marginal effect on improving performance. The adequate calibration equation for the T-type thermocouple for temperature 0 to 100 °C is as follows: T = 25.86464325 mv -0.69457635 mv 2 + 0.026133029 mv 3 (5) The 2nd and 3rd order polynomial equations produced a systematic residual pattern and 4th and 5th order polynomial equations revealed a uniform distribution. All residual figures were showed in Supplement Figures A.
The e std values for the above four equations were 0.41512994, 0.04580101, 0.00940073 and 0.00860020, respectively (Table 3). Comparing 3rd degree equation with 4th degree equation, the reduction in e std value between 3rd and 4th order equation was approximately 1/5. Comparing with the 4th order equation, the contribution of the 5th order equation was substantial. The reduction in precision was limited. Therefore, the adequate equation for the T-type thermocouple for temperature 0 to 200 °C is as follows:

Range −100~0 °C
Only the 4th order polynomial equation had a uniform distribution on residual plots (data not shown) and the smallest value of |e| ave and e std (Tables 2 and 3). This following equation was considered adequate: 3.1.5. Range −100~100 °C The shape of the data distribution between temperature and thermocouple output voltage is a nonlinear curve. Only a higher order polynomial equation could produce a uniform distribution on residual plot (data not shown). The adequate calibration equation was a 6th order polynomial equation and showed as follows: The |e| ave value represents the accuracy and the e std value was used to assess the precision of these equations. By the selection of the adequate polynomial calibration equations, the |e| ave was < 0.009 °C and the e std value was < 0.012 °C for the T-type thermocouple.

J-Type Thermocouple
The estimated parameters for calibration equations for five temperature ranges are listed in Table 4 and the quantitative criteria are listed in Tables 5 and 6.    All datasets for different temperature ranges were evaluated by regression analysis. The residual plots were used to evaluate the adequateness of models. The |e| ave and e std values were used to assess accuracy and precision. The adequate equations for different temperature ranges are listed as follows: ( With the selection of the adequate polynomial calibration equations, the |e| ave was <0.005 °C and The e std value was <0.008 °C for the J-type thermocouple. The |e| ave value presented the accuracy and the e std value showed the precision of these equations. These numeric values indicated the performance improvement for this type thermocouple using in the special temperature range. Now, the development of microprocessor systems is rapid and the price is dwindling. The nonlinear characteristics of sensing element could be improved by software package techniques. The calculation of the higher order polynomial equation could be treated as rapidly and accurately as linear equations. In this study, the orders of their polynomial equations for adequate calibration equations were lower than that of the NIST Standards. The accuracy and precision of these equations were improved significantly compared to that of a linear equation. They could be adapted to microprocessor systems to enhance the measurement performance of different types of thermocouples. The suggestion of the application of these polynomial calibration equations are as follows: a. The analog mv output of the thermocouple is amplified to voltage. b. The voltage signal is digitized by A/D converter. c. The function of the A/D converter is controlled by a microcomputer. d. The software for these calibrations is embedded in the flash ROM of the microcomputer. e. The true temperature then is computed by its adequate polynomial calibration equation. f. The true temperature could be display in a LCD or send to a PC via RS232 for data display or send to temperature controller.

Conclusions
Thermocouples are the most frequently used sensors for temperature measurement. However, linearizing the transfer relationship between temperature and output voltage is one of their major problems. In this study, two types of thermocouple with five temperature ranges were selected to evaluate the fitting agreement of different order polynomial equations to help solve this problem. The estimated parameters were established by regression analysis techniques. Two quantitative criteria, |e| ave and e std were used to evaluate the accuracy and precision of these calibrations equations. Residual plots were applied to justify the adequateness of these models.
The adequate order of polynomial calibration equation was affected by the temperature range. The 3rd order polynomial equation was adequate for the 0 to 100 °C temperature range and the higher 6th order polynomial equation was adequate for the −100 °C to 100 °C range.
The |e| ave value represents the accuracy of these equations. The e std value was used to assess the precision of equations. With the adequate polynomial calibration equation, the |e| ave was <0.009 °C for the T-type thermocouple and <0.005 °C for the J-type thermocouple. The numeric value of e std was <0.012 °C for the T-type thermocouple and <0.008 °C for the J-type thermocouple.
These polynomial calibration equations are easy to be written as software and be incorporated into an IC circuit as calculated equations. The measured thermocouple output could be transformed into the temperature easily and accurately. The technique could be applied with hard modules to serve as intelligent sensors. The regression analysis technique and criteria for comparison used in this study could be applied to evaluate adequate calibration equations for other thermocouples with different temperature ranges. The piecewise polynomial equation could be established to meet the requirement temperature range for practical applications.