Scaled conjugate gradient ANN for industrial sensors calibration

ABSTRACT


INTRODUCTION
Nearly all types of measurement systems which include industrial sensors suffer from measurement errors, i.e., offset, gain, and linearization errors [1,2]. Sensors' calibration is an important issue in industry. It provides precise measurements that increase productivity, less harm to environment, and increase safety precautions. The calibration process is a method to reduce the difference between the actual value of the physical variable and the value that has been measured by the sensor. The calibration process becomes inaccurate in the case that the sensor has nonlinear characteristic between its input physical variable and its output variable which is in most cases are voltage or current. There are many methods to overcome this problem such as look-up tables , polygonal interpolation, polynomial approximation, curve fitting and cubic spline interpolation, and inverse sensor model using artificial neural networks (ANNs).
The look-up table is easy to implement. A microprocessor uses stored data pairs of input and output for the evaluation of measured value [3]. However, many pairs of data points have to be used to achieve satisfied accuracy. Therefore, memory size is necessary for storage of a look-up table. Polygonal interpolation needs fewer data points to calibrate sensor characteristics. Spaces between each pair of adjacent points are interpolated with straight lines. When the characteristic has a high degree of nonlinearity, more points are needed to achieve higher accuracy. Polynomial approximation calibrates sensor characteristics using polynomials. Mostly used polynomials are third-order polynomials [4,5]. Using spline interpolation, a parabola curve is used between every two adjacent measured data points [6]. ANNs have been used in many engineering applications among them is system modeling and inverse modeling. If one can view sensor calibration as a method to find the inverse model of that sensor, then ANNs become promising solution to  [7][8][9]. Environmental effect on sensor response as temperature was eliminated using ANN [10][11][12]. ANN is also applied to calibrate a quantum photonic sensor [13]. Forced sensors in robot tools of teleoperation surgeray was enhanced by ANN calibration [14]. Furthermore, ANN, in deep learning approach was also proposed for blindly calibrate sensor measurements named projection-recovery network (PRNet) [15,16]. In this work, ANN trained by scaled conjugate gradient (SCG) algorithm is proposed as a general structure and learning approach to calibrate most widely used industrial sensors.

PROBLEM DEFINITION
Sensors are vastly used in industry to measure physical quantities (force, pressure, temperature, speed, position, humidity, and concentration) by usually converting them to equivalent electrical signals. The mathematical models for those sensors are usually nonlinear in either exponentiail form: or in polynomial form: Where y is the required measured physical parameter, x is the equivalent electrical signal, a, b, c, are constants, and D(x) is other effective parameter from the industrial process or from the environment. However, in the monitoring side, it is required to have the inverse relationship of (1) and (2). This is what is called sensors calibration.

ARTIFICAIL NEURAL NETWORK IN SENSOR CALIBRATION
The ANN comprises of input layer, hidden layers, and output layer as shown in Figure 1 [17,18]. Each layer contains number of nodes with nonlinear input-output function (usually sigmoidal function). The layers are connected with lines assigned by weight which are numbers multiplied with every node of a particular layer to form the next layer. These weights are updated during the learning process to satisfy particular cost function. There are many types of ANN structures such as feed-forward, and Elman NN. The most famous supervised training algorithm is the backpropagation which is based on the gradient search method. The proposed procedure in this work is based on inverse model of the sensor model (1) or (2). The sensor and ANN are connected in cascade in which the sensor output response is applied to the inputs of ANN as shown in Figure 2. Output of the ANN is the estimation of the measured value. To achieve this, the ANN has to be trained with sufficient training input data in order to minimize error between the actual and the estimated sensed values. The SCG is adopted to train the ANN [19].

THE SCALED CONJUCATE GRADIENT ALGORITHM
The SCG, pioneered by Moller [20,21], was proposed to avoid the time-consuming line search. The basic idea is to combine the Levenberg-Marquardt algorithm with the conjugate gradient approach. The SCG is completely automated, no critical user-dependent parameters, and overcome the problem of determining an appropriate step size. Moller indicated that the SCG is noticeably faster than the standard back-propagation training algorithm.
SCG is a supervised learning algorithm in the feed-forward neural networks. In spite of using member of the class of conjugate gradient methods, the SCG utilizes theories of the general optimization strategy. However, it selects the search line and step size efficiently depending on information from the second order approximation represented by: In SCG, each iteration computes optimal distance. The line search is then performed to determine the optimal distance to move along the current search direction as: Then the next search direction is calculated so that, it is conjugated to previous search line directions. Actually, is a function of both the error function of the Hessian matrix and the matrix of the second derivatives. In SCG, is used to sharpen and to smooth the indefiniteness of the Hessian matrix. The SCG algorithim is summarized in the following steps [19]. 1. Choose weight vector w1 and scalars σ > 0, λ1>0 and λ 1 ̅ =0. Set p1=r1=-E (w1), k=1 and success=true. 2. If success=true then calculate second order information: 3. Scale : 4. If ≤ 0 then make the Hessian matrix positive definite: 5. Calculate step size: 7. If ≥ 0 then a successful reduction in error can be made: 8a. If k mod N=0 then restart algorithm: +1 = +1 else create new conjugate direction: 8b. If ≥ 0.75 then reduce the scale parameter 10. If the steepest descent direction ≠ 0 then set k=k+1 and go to 2 else terminate and return +1 as the desired minimum.

RESULTS AND DISCUSSION
The proposed sensor calibration procedure is applied to three industrial sensors which are the force sensor, the humidity sensor, and the gas concentration sensor [22]. The following error equation is used to indicate the accuracy of obtained inverse model using the proposed ANN [17].

The calibration of the force sensor
A force sensor type FSR402 is calibrated in this section. In which RM is the sensor's sensitivity resistance. The original sensor data are listed in Table 1 and shown in Figure 3 [23]. In order to obtain the inverse model of this sensor, the SCG algorithm is used to train ANN with two inputs (the output voltages at RM=3K and RM=100K), one hidden layer with 15 nodes, and the output is the sensed force in (g). The training of ANN is accomplished with minimum error as indicated in Table 2. The trained ANN is then tested for RM=10K, 30K, 47K. In Figure 4, the input to the trained ANN is the voltage data for RM=30K and 47K while in Figure 5 the input to the trained ANN is the voltage data for RM=10K and 47K. The obtained graphs indicate that the trained ANN is faithfully represented the inverse force sensor model under different sensitivity resistance as indicated by the minimum error shown in Table 3.

The calibration of the humidity sensor
The characteristics of humidity sensing elements type T010 (850) depend on the environmental temperature. Temperature change causes changing in the ceramic elements resistance. Table 4 shows the characteristics of a sensing element in the range from 20 to 50°C and shown in Figure 6 [24]. The ANN that represents the inverse model of this sensor has two inputs (the sensor output voltages measured at 20 and 50°C), one hidden layer with 3 nodes, and the output is the sensed relative humidity. The training of ANN is accomplished with minimum error as indicated in Table 5. Then the trained ANN is tested with two input voltages, the first one is the measured sensor voltage and the second is the stored voltage of either 20°C or 50°C. The resultant relative humidity obtained from the trained ANN is so close to the actual humidity as represented by calculated error of Table 6 and coincided characteristics shown in Figure 7.

The calibration of the gas concentration sensor
Gas sensor calibration is the process of converting the output voltage generated by the gas sensor into a concentration value that coincides with the actual concentration value. In this section, a solid-state CO gas concentration sensor is used to be calibrated. The original data for this sensor is shown in Table 7 and clearly illustrated Figure 8 [25]. The ANN that represents the inverse model of the gas sensor has one input (the sensor output voltage), one hidden layer with two nodes, and the output is the sensed gas concentration in (ppm). The trained ANN is faithfully represented the inverse gas concentration sensor model as indicated by the minimum error shown in Table 8 and clearly illustrated in Figure 9.   Figure. 8. The original gas sensor characteristics Figure 9. Tested ANN for gas sensor

CONCLUSION
The proposed ANN procedure based on inverse model of sensor can eliminate the effect of nonlinearity in many industrial sensors. Moreover, the environmental effects on some sensors, as the case of ambient temperature on measurement of relative humidity sensors, can also be encountered by ANN calibration procedure. In the case of force sensor, it is found that using ANN in calibration process can handle the change in the value of the sensitivity resistor without changing the sensor itself. Future work in this area can be done to calibrate more than one sensor in one ANN taking into consideration all the effective environmental factors. Moreover, one can implement the trained ANN that represents the sensor inverse model using micro controller for real time applications.