Keywords

1 Introduction

Industrial processes are to be closely monitored for optimized production, safety, and less wastage. The temperature is one such parameter that is to be controlled in various critical process and manufacturing areas in industries. There are various types of sensors used to measure the temperature, and the most popular type of sensor is thermocouple due to its interchangeability and relatively low cost [1]. The thermocouple sensor could be characterized as cheap, more accurate, repeatable, rugged, and stable, which is used for various industrial processes including measurement of temperature of kilns, gas temperature measurement in monitoring and control of furnace, calibration, radiation detection, manufacturing of steel, and also it adapts to different environment conditions [2, 3]. Though it fulfills the ideal standard of accuracy, there is a problem of non-linearity which is a crucial parameter, and it is to be reduced. The literature describes the hardware methods for reducing the non-linearity with minimal cost signal conditioning circuit for type J thermocouple using negative temperature coefficient with a voltage-to-frequency converter for reference junction compensation (RJC), and for calculating the temperature, fraction algorithm is being used [4]. However, the circuit design becomes complicated and delicate to environmental condition. The new digital technique is developed to reduce the non-linearity of low-level output by adjusting the traditional dual-slope analog-to-digital converter (ADC). The different segments use different gains by adjusting the charging period. Thus, this method removes the shortcoming in linearization technique in which precision amplifier and demultiplexer are used to achieve variable gain. This method ensures better reduction of non-linearity by changing digitally different gains required for increasing the number of segments. Besides this, stability also gets improved, and cost gets reduced [5]. However, the hardware compensation circuit is sensitive to offset error, gain, and temperature drift [6]. Because of limitations mentioned above, few software techniques were developed.

Linearization technique unit (LTU) gives an understanding between input yield esteems for nonlinear model. In this method, measured variable corresponding to output signal is stored in memory. Following ADC and measurement, the outcome is gazed upward in the table and closest accurate estimation is calculated. LTU is fast for linearization, but it needs more memory space. For improvement in accuracy, it requires resolution of the ADC module and more memory space [7]. Some intelligent techniques are also reported in the literature, and the multilayered artificial neural network (ANN) is used and trained by the Levenberg–Marquardt algorithm. For initializing the weight and biases, back propagation algorithm is employed to reduce the deviation between target and true output. As the training data increases, the error decreases to greater extent. The mean square errors as well as gross error for all type of thermocouple are calculated, and the non-linearity is reduced to greater extent by using ANN [4]. In this paper, the performance comparison of two neural network approaches for the non-linearity compensation of thermocouple has been compared. The accuracy between trained and tested outputs of both the approaches is determined, and non-linearity compensation of both the techniques is also analyzed.

2 Proposed Work

Figure 1 illustrates the block diagram of the proposed methodology for the linearization of thermocouple. In the first stage, a thermocouple sensor is used to generate the voltage proportional to the measured temperature, which is then fed to the software approach for curve fitting. The linearized curve-fitted temperature–voltage characteristics of thermocouple are then fed to neural network for its training. To train the neural network for the given input data accurately, the weights are continuously adjusted until the errors are reduced to minimum possible value.

Fig. 1
figure 1

Block diagram of proposed technique for linearization of thermocouple

The general form of emf equation for thermocouple:

$$E = a_{0} + a_{1} t + a_{2} t^{2} + a_{3} t^{3} + a_{4} t^{4} + a_{5} t^{5} + a_{6} t^{6}$$
(1)

where E is output voltage in millivolt, t is temperature in degree Celsius, and a0, a1, an … are coefficients of thermocouple, which varies depending upon type of thermocouples. In this paper, type B thermocouple is used for performance analysis in the non-linearity compensation. The coefficient values used are a0 = 0.0000, a1 = −0.2465 * 10−3, a2 = 0.5904 * 10−5, a3 = −0.1325 * 10−8, a4 = 0.1566 * 10−11. According to the emf equation, the voltage–temperature characteristic of thermocouple is nonlinear. The temperature value of cold junction is to be maintained at 0 °C using an ice bath and considering it as reference junction. The hot junction serves as the junction where the process temperature is measured. The difference of estimated temperature between hot junction and the reference junction produces the thermocouple yield voltage or thermo-voltage. The thermo-voltage measured using Eq. (1) is not linearly related to the estimated temperature. For the values of temperature and voltage, a polynomial curve fitting is done to construct a curve that has best fit for the data points which are then fed to the two types of a neural network approaches such as back propagation neural network and CNN for its performance comparison.

2.1 Back Propagation Neural Network

Back propagation (BP) is a popular machine learning approach for training feed forward neural networks. The chain rule is used to compute the gradient of the loss function for each weight of one layer at a time and iterates backward from the last layer in the chain rule to avoid redundant measurement results of the intermediate terms in the chain rule. To train the neural network, the temperature–voltage characteristics of type B thermocouple are obtained from the ITS-90 data table. The input to the neural network is difference between hot and cold junction temperatures (°C), and target output is the corresponding voltage in mV. The back propagation algorithm is a supervised learning process with three layers: input, hidden, and output. The sum operation is performed after multiplying each input with its weight and then fed into the hidden layers. Activation function is applied to the hidden layer and output layer. Learning rate is considered as 0.5. The output obtained from the hidden layer is then fed into the output layer. The output obtained through the neural network is compared from desired output, for the calculation of the error which is used to adjust the weight. The entire process is repeated until the error reaches its least possible value (Fig. 2).

Fig. 2
figure 2

Structure of back propagation neural network

2.2 Convolutional Neural Network

The convolutional layer of convolutional neural network (CNN) is fed with an input which is the CNN’s primary building block of the network. Convolutional layer is followed by the pooling layer, and the last layer is output layer. The input data fed to the convolutional layer is then passed to the pooling layer where the weights are multiplied with convolutional layer output. Then, the output of the convolutional layer is passed into the output layer where the final output is compared with desired output for weight adjustment according to the cascaded feed forward back propagation algorithm (Fig. 3).

Fig. 3
figure 3

Basic structure of convolutional neural network

The convolutional neural network process is repeated till the trained output exactly matches with the desired output.

3 Results and Discussion

The type B thermocouple (platinum Rhodium 30%/platinum Rhodium 6%) is taken into consideration for linearization analysis. For the performance comparison of two neural network approaches in non-linearity compensation, the measured temperature ranges from 0 to 630 °C and has been taken as input, and the output voltage with respect to input temperature is obtained using the generic mathematical model of thermocouple. The obtained characteristic is illustrated in Fig. 4, where it is clearly seen that the temperature–voltage characteristics of thermocouple are nonlinear.

Fig. 4
figure 4

Temperature–voltage characteristics of type B thermocouple

The obtained nonlinear characteristic of thermocouple is given to software curve fitting approach where it is used for the curve linearization of temperature–voltage characteristics of type B thermocouple as illustrated in Fig. 5. The data points obtained from the best fit curve by this software approach are further fed to the neural network approach.

Fig. 5
figure 5

Curve fitting characteristics of type B thermocouple

The curve-fitted temperature–voltage data is first fed to train back propagation neural network. The weights are updated in every epoch until the error reaches its least possible value between the trained and the desired outputs. The input temperature ranges from 0 to 630 °C and is taken for consideration, and corresponding output voltage trained by the neural network on the desired output is illustrated in Fig. 6. From Fig. 6, the maximum error between trained and the desired outputs is calculated as 0.042%. The parameters considered for back propagation neural network approach are listed in Table 1.

Fig. 6
figure 6

Comparison of trained and desired temperature–voltage characteristics using BP neural network

Table 1 Parameter considered in back propagation neural network

Similarly, the input–output data from the curve-fitted temperature–voltage characteristics of type B thermocouple is fed to convolutional neural network and the parameters considered are listed in Table 2. The maximum error between trained and desired output voltages with convolutional neural network is found as 0.0397% as illustrated in Fig. 7. When comparing with the performance of BPNN, the better accuracy of 7.24% is obtained with convolutional neural network in the training of temperature–voltage characteristics of thermocouple. Furthermore, it is also found that the better linearity compensation is obtained by using CNN, which is 61.37% improvement in the linearity compared to the original nonlinear characteristics of thermocouple. The CNN can be used as a best linearization software approach along with the conventional thermocouple sensor with better accuracy and fast response time.

Table 2 Parameter considered in convolutional neural network
Fig. 7
figure 7

Non-linearity correction using convolutional neural network

4 Conclusion

In this study, the two neural network approaches such as back propagation network and convolutional neural network are discussed for the linearization of temperature–voltage characteristics of type B thermocouple. Both the approaches are having different weight updating methods to reduce the error between the trained output and the desired output, to the least possible value. With the comparison of two approaches, the CNN shows better accurate result with the improved accuracy by 7.24%. It is also found that the convolutional neural network along with software curve fitting approach improves the linearity of temperature–voltage characteristics of type B thermocouple. The non-linearity gets reduced by 61.37% compared to the original characteristics of the thermocouple with convolutional neural network. Thus, the combination of conventional thermocouple sensor along with CNN is well suited for temperature measuring applications with high accuracy and better linearity.