Mathematical Problems in Engineering
Volume 2015 (2015), Article ID 854945, 6 pages
http://dx.doi.org/10.1155/2015/854945

Research Article

The Research of Temperature Compensation for Thermopile Sensor Based on Improved PSO-BP Algorithm

Yuanjiang Li,1,2 Yuehua Li,¹ Feng Li,² Bin Zhao,² and QingQing Li³

¹School of Electronic Engineering and Optoelectronic Technology, Nanjing University of Science and Technology, Nanjing 210094, China
²School of Electronics and Information, Jiangsu University of Science and Technology, Zhenjiang 212003, China
³Zhenjiang HJ Technology Co., Ltd., Zhenjiang 212003, China

Received 2 February 2015; Revised 27 May 2015; Accepted 30 May 2015

Academic Editor: Hakim Naceur

Copyright © 2015 Yuanjiang Li et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

When thermopile sensor is used for safety monitoring of equipment in industrial environments, particularly for measuring the thermal radiation information of device, the measured result of this kind of sensor is usually affected by ambient temperature due to its unique structure. An improved PSO-BP algorithm is proposed for temperature compensation of thermopile sensor and correcting the error in the condition of the system accuracy requirements reduced by temperature. The core of improved PSO-BP algorithm is to improve the certainty of initial weights and thresholds that belonged to BP neural network and then train the samples by using BP neural network for enhancing the generalization ability and stability of system. The experimental results show that the proposed PSO-BP network outperforms other similar algorithms with faster convergence speed, lower errors, and higher accuracy.

1. Introduction

Condition monitoring of man-made systems is an important task in terms of system maintenance and process automation. In order to keep the security operation of various systems, many scholars have been working on the area of fast identification of faulty components based on various types of sensor data and intelligent evolutionary algorithms, which provides a basis for the fault isolation.

In the numerous fault monitoring, temperature is an essential factor about health status of the equipment. For the majority of electrical devices, equipment failure usually leads to temperature increment on the surface of device, which is the omen of short circuit or overcurrent. In particular, the joint position is easy to heat. Instead of the point-to-point temperature-measuring device, we use a real-time device named thermopile sensor for monitoring electrical equipment. Thermopile sensor is equivalent to several point-type infrared sensors, which can provide the distribution of temperature about mini-type area around the target. It turned the thermal radiation information into temperature data based on the theory of black-body radiation. The accuracy of temperature measurement is affected by the radiation information of environment or ambient temperature, which is a typical nonlinear programming problem. Several methods or models are proposed for solving this kind of problems such as expert system [1], artificial neural network (ANN) [2], fuzzy theory [3], and optimization theory [4]. These methods still have some disadvantages. For example, the knowledge base of the expert system is difficult to obtain from the complex working conditions. And the accurate fuzzy rules and membership functions are harder to determine. In the framework of ANN-based method, numerous training samples are closely related to the accuracy of output data. But back propagation (BP) neural network is usually used to solve some application problems based on its unique advantages such as high accuracy and simple operation. So our emphasis is on reducing the uncertainty of initial weight value and threshold of BP neural network for improving its directional generalization ability, which is a typical optimization problem.

There are many intelligence algorithms with different performance for solving the optimization problem such as genetic algorithm (GA) [4] and particle swarm optimization (PSO) [5]. Compared with other algorithms, PSO has few parameters to adjust, which is easy to implement. So it is one of the most popular optimization algorithms. Lazzús [6] combined the advantage of BP and PSO for predicting thermal properties of the organic compounds, which can improve the convergence speed and prediction accuracy of the traditional BP network. Zhang et al. [7] and Li and Zhou [8] proposed two kinds of improved PSO algorithm for overcoming shortcoming of the traditional BP network, which can adjust the inertia weight coefficients and learning factors adaptively.

In this paper, we propose an improved PSO algorithm based on optimizing the initial weight value and threshold for increasing the generalization ability of BP network. Then the improved PSO-BP algorithm is used to solve the temperature compensation of thermopile sensor. In order to demonstrate the effectiveness of the proposed method, we compare the proposed one with traditional BP and two kinds of improved PSO-BP algorithm [7, 8].

The rest of this paper is organized as follows. In Section 2, we introduce the basic PSO and the improved PSO algorithm. The improved PSO-BP method is proposed in Section 3; then we regarded some temperature data in the different ambient temperature conditions as the test set. The result and analysis of experiments are shown in Section 4 and the important conclusions are drawn in Section 5.

2. Basic and Improved PSO Algorithm

2.1. Basic PSO Algorithm

The inspiration of PSO algorithm is derived from the phenomenon of birds’ cluster which solves the problem of continuous variable optimization as its background. In the theoretical framework of PSO, every potential feasible solution is represented as a particle existing in the search space. There are two important variables that belonged to each particle: the position vector and velocity vector . The velocity vector is used to control the speed in which the particle moves towards the optimal solution. Meanwhile, every position vector has correlation with the particle fitness value. In the process of iteration, the particle updates its velocity and positions based on the following equations:

where is the inertia weight, the larger is easy to result in global optimization, the smaller one is easy to generate local optimization, and . and are learning factors which represent two kinds of evolution ability such as self-learning and social learning, respectively. is the best solution and is the best known position existing in the entire swarm.

2.2. Improved PSO Algorithm

2.2.1. The Inertia Weight

In all kinds of improved algorithms, the inertia weight occupies an important role in the PSO, which is the balance point between the global and local search ability. For avoiding PSO algorithm into local optimum, different solutions are put forward for updating . Zhan et al. [9] proposed the following adjustment strategies and Zhang et al. [7] proved its effectiveness:

where and are the maximum and minimum distance between all particles and optimal particle and is Euclidean distance between the th particle and the optimal particle, which is defined as

where is the dimensions of each particle, and are the position value on the th dimension that belonged to the th particle and the optimal particle at the -iteration of PSO, respectively. is a constant. is the linear decreasing function for directed searching of . is the number of iterations where is the maximum value. The update rule based on Euclidean distance shown in (2) has more outstanding performance for enhancing the global search result to some extent. But the computational complexity of searching is more than which increases the burden of computer. Li and Zhou [8] proposed a simple method for updating based on the fitness function and proved the effectiveness of selection rules in the framework of PSO-BP algorithm. So we also use the fitness function to revise the formula shown in (2), which is written as follows:

where is the fitted value in the current position where and are the minimum and maximum values, respectively. In addition, .

2.2.2. Learning Factors and

The learning factors and , called acceleration constants, are responsible for controlling individual cognitive component and group cognitive component . Due to the lack of methods and formula, the learning factor is usually determined on a general scope. Li and Zhou [8] utilized formula (1) at the different number of iterations for building a special linear difference equation with constant coefficients and gave the value range of and . Let ; the range of and is shown as follows [8]:

We suppose an extreme case for narrowing the scope of . Let us assume that is equal to , so the ideal range of is , which can provide the basis of constant selection about the adjusted equation inspired by Gao and Liao [10]. Two learning factors are updated by using the following criterion [10]:

where is the average distance between each particle and the optimal particle at the th iteration, which is shown as

where denotes the number of the swarm. In addition, Gao and Liao [10] proved that the PSO algorithm ultimately tends to the optimal solution with the help of updating the two factors based on the rule mentioned above. In the proposed algorithm, we also use the rule mentioned above and limit the scope of , which affects the convergence speed and accuracy. In the subsequent trial, we set .

3. Improved PSO-BP Flow (IPSO-BP)

BP neural network [11] is a feed-forward network, which is composed of input layer, hidden layer, and output layer. It substantially turns an input/output problem into a nonlinear optimization problem. BP algorithm depends on learning and training a certain amount of samples for determining weights and threshold of the network. Traditional BP network not only requires a large number of iterations but easily falls into local minimum. So we use the improved PSO algorithm to optimize the initial weights and the thresholds of basic BP algorithm and then train the samples for enhancing the generalization ability and stability of BP network. When BP network is used for temperature compensation, the original input is the measured temperature based on the thermopile sensor and ambient temperature; meanwhile, the output of network is the actual temperature of targets. The algorithm flow chart is shown in Figure 1.

Figure 1: Flow chart for the improved PSO-BP algorithm.

The algorithm steps are shown as follows.

Step 1. Considering the process of initialization such as population size , particle dimension , the maximum number of iterations , the error precision of particles , the maximum speed , and the position .

Step 2. The initial weights and the thresholds of basic BP algorithm are become a column which are the initial population of PSO algorithm. Suppose the number of initial population is and the number of initial weights and thresholds is . is the initial position of one particle, .

Step 3. Initialize the velocity vector of particles. The forward network built by newff is regarded as the fitness function . The output of is , where is the data after normalized calibration [8].

Step 4. Compute the fitness value of every particle and find the best position along with updating particle based on formula (1) until training the best position of the whole particle swarm.

Step 5. Terminal condition: if the fitness value is less than the error precision of particles or is reached, the algorithm terminates; otherwise, go to Step 4.

4. Experiment and Analysis

4.1. Experimental Platform

The infrared temperature measurement system is shown in Figure 2, which consists of temperature sensor DS18B20, infrared thermopile sensor MLX90620, ultrasonic ranging module, and the core processor AT91SAM7S256. The role of components is displayed as follows.

Figure 2: Infrared temperature measurement system.

DS18B20 is a kind of contact-type chip for targets’ surface temperature measurement. After being demarcated by mercurial thermometer with the accuracy of 0.1°C, the accuracy of DS18B20 reaches ±0.2°C within the limits of [−10°C, +85°C], whose data is used to be the reference data.

MLX90620 is the thermopile chip of noncontact temperature measurement, whose data is the aim of compensation. The measuring distance affects the accuracy of MLX90620 seriously, and its maximum distance is 1 m.

The ultrasonic module HC-SR04 is used for keeping distance between the sensor and the target which has the accuracy of 0.5%.

4.2. Sample Data Acquisition

The experiment was carried out on eight different environmental temperatures, and we use MLX90620 sensor to measure the surface temperature of eight different targets at the same distance, respectively. The sample data is shown in Table 1, where AT denotes the ambient temperature based on black ball temperature method that reflected environmental thermal radiation information. Reference and measured data are obtained from DS18B20 and MLX90620, respectively. Restricted by experimental conditions and methods, the range of AT is set to [15°C, 50°C].

Table 1: Sample data table.

AT = 15.2°C
Reference data (°C)
20.5
23.9
26.1
28.7
32.4

Measured data (°C)
24.2
25.2
28.9
31.2
36.0

AT = 19.4°C
Reference data (°C)
21.4
22.6
25.2
29.2
30.2

Measured data (°C)
23.1
24.7
26.9
30.4
32.3

AT = 26.7°C
Reference data (°C)
22.2
23.6
24.8
30.4
33.8

Measured data (°C)
24.3
25.9
26.1
31.7
34.5

AT = 30.0°C
Reference data (°C)
20.2
21.6
24.2
25.3
32.8

Measured data (°C)
22.9
23.9
26.4
27.6
33.8

AT = 35.2°C
Reference data (°C)
25.4
27.5
28.3
31.2
33.5

Measured data (°C)
28.4
29.0
32.1
33.4
36.0

AT = 39.3°C
Reference data (°C)
24.4
28.5
30.6
31.5
34.6

Measured data (°C)
27.6
30.4
33.1
35.0
37.5

AT = 43.5°C
Reference data (°C)
23.2
26.5
32.7
35.8
37.7

Measured data (°C)
25.7
29.0
34.4
37.9
40.0

AT = 46.2°C
Reference data (°C)
24.5
26.7
28.3
33.4
36.7

Measured data (°C)
26.4
28.5
31.6
36.8
39.0

We select 15.2°C, 19.4°C, 26.7°C, 35.2°C, 39.3°C as the training sample set, and 30.0°C, 43.5°C, 46.2°C is regarded as the test sample set. In order to make the collected data unified, we present a normalization to deal with these data according to formula (8) shown as follows. All the data are normalized to as

where is the ambient temperature, and are the maximum and minimum of ambient temperature, respectively. is the normalized data. Similarly, we can obtain the target’s normalized data of measured temperature value.

4.3. Experimental Results

In this section, we adopt three algorithms such as basic BP, improved PSO-BP [7], and improved PSO-BP [8] for illustrating the effectiveness of the proposed approach. Kinds of basic parameter are set as follows:

 PSO: , , , , , , , , , .

BP: we adopted three-layer topology for building the network. The numbers of input, hidden, and output layer neurons are 2, 19, and 1, respectively. The training maximum number is 8000 and expects error to be 0.001; the hidden layer transfer function adopts S type tangent function “tansig,” the output layer transfer function uses linear function “purelin,” and the training function is “trainlm.”

In order to analyze the compensation effect quantitatively, we contrast the effect by the absolute value of error , which is written as

where is the absolute error and is the reference value. Temperature compensation results are shown in Tables 2, 3, and 4.

Table 2: Temperature compensation result (ambient temperature 30°C and training 30 times).

Reference data
Measured data
BP
IPSO-BP [7]
IPSO-BP [8]
Proposed PSO-BP
of BP
of IPSO-BP [7]
of IPSO-BP [8]
of proposed PSO-BP

20.2
22.9
19.21
19.78
20.18
20.13
4.90%
2.1%
0.1%
0.35%

21.6
23.9
22.33
22.4
21.93
21.51
3.38%
3.7%
1.5%
0.42%

24.2
26.4
22.16
24.73
24.67
24.50
8.43%
2.2%
1.9%
1.24%

25.3
27.6
22.54
26.1
25.77
25.13
10.91%
3.2%
1.8%
0.67%

32.8
33.8
33.65
31.26
32.49
32.64
2.59%
4.7%
0.9%
0.49%

Table 3: Temperature compensation result (ambient temperature 43.5°C and training 60 times).

Reference data
Measured data
BP
IPSO-BP [7]
IPSO-BP [8]
Proposed PSO-BP
of BP
of IPSO-BP [7]
of IPSO-BP [8]
of proposed PSO-BP

23.2
25.7
22.15
23.14
23.07
23.1
4.5%
0.27%
0.6%
0.4%

26.5
29.0
25.81
25.78
26.77
26.41
2.6%
2.7%
1.1%
0.34%

32.7
34.4
30.9
32.36
32.78
32.55
5.5%
1.0%
0.24%
0.45%

35.8
37.9
33.97
35.4
35.23
35.65
5.1%
1.1%
1.6%
0.41%

37.7
40.0
36.9
37.21
37.92
38.0
2.1%
1.3%
0.58%
0.81%

Table 4: Temperature compensation result (ambient temperature 46.2°C and training 90 times).

Reference data
Measured data
BP
IPSO-BP [7]
IPSO-BP [8]
Proposed PSO-BP
of BP
of IPSO-BP [7]
of IPSO-BP [8]
of proposed PSO-BP

24.5
26.4
21.3
24.03
24.87
24.2
13.1%
1.92%
1.5%
1.2%

26.7
28.5
24.17
26.18
26.51
26.4
9.4%
1.94%
0.71%
1.1%

28.3
31.6
27.23
29.06
29.73
28.35
3.7%
2.67%
0.51%
0.17%

33.4
36.8
31.48
34.14
33.65
33.51
5.7%
2.2%
0.74%
0.32%

36.7
39.0
35.97
36.49
36.81
36.89
2.0%
0.57%
0.31%
0.52%

From Tables 2 to 4, we can see that temperature compensation algorithm based on BP network is fit for improving the accuracy of measurement. However, BP network has great volatility and contingency in continuous operation with the larger error precision. The maximum error of BP optimization actually reached 13.1%. Compared with traditional BP network, kinds of improved algorithm based on PSO have superiority in the area of reliability and stability with the help of optimizing the weights and threshold of BP network. They reduce the opportunity of falling into local minimum to a large extent, which is very meaningful for enhancing the effectiveness of temperature compensation. From the whole analysis, the proposed IPSO-BP algorithm has lower absolute error than other improved IPSO-BP. Meanwhile, the proposed method gives a higher precision with less training times due to the constraint condition about learning factor and inertia weight which improves the generalization ability. The compensation effect of the proposed method is obviously better than other algorithms, which greatly reduces the influence of ambient temperature on the thermopile sensor. In practical application, we could increase the number of samples based on the requirement of system.

5. Conclusions

An improved PSO-BP network is proposed in this paper, which is superior to the traditional BP neural network in several aspects such as low study efficiency, slow convergence speed, and being easily jumped out of local optimal. The core of the proposed algorithm is to reduce the uncertainty of selecting the initial values and weights of BP network for improving the ability of generalization. Compared with the traditional BP and two kinds of improved PSO-BP [7, 8], we demonstrate the effectiveness of the proposed approach. The compensation results show that the network optimized by the improved PSO algorithm has better performance with faster convergence speed, lower errors, higher accuracy, and learning ability.

The proposed algorithm is used for the condition monitoring of electrical equipment which reflects long-term variation trend. So we use upper computer to optimize temperature data and meet the demand of status forecast.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

This work is supported by The Postdoctoral Fund in Jiangsu Province under Grant 1302027C. Thanks are due to the support of Image Processing Lab of Jiang Su University of Science and Technology.

References

C. A. Protopapas, K. P. Psaltiras, and A. V. Machias, “An expert system for substation fault diagnosis and alarm processing,” IEEE Transactions on Power Delivery, vol. 6, no. 2, pp. 648–655, 1991.

M. A. P. Rodrigues, J. C. S. Souza, and M. T. Schilling, “Fault diagnosis in electrical power systems using artificial neural networks,” in Proceedings of the International Conference on Electric Power Engineering (PowerTech '99), p. 130, Budapest, Hungary, 1999.

J. Sun, S.-Y. Qin, and Y.-H. Song, “Fault diagnosis of electric power systems based on fuzzy Petri nets,” IEEE Transactions on Power Systems, vol. 19, no. 4, pp. 2053–2059, 2004.

F. Wen and Z. Han, “Fault section estimation in power system using genetic algorithm and simulated annealing,” Proceedings of the CSEE, vol. 14, no. 3, pp. 29–36, 1994 (Chinese).

J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Proceedings of the IEEE International Conference on Neural Networks, pp. 1942–1948, December 1995.

J. A. Lazzús, “Neural network-particle swarm modeling to predict thermal properties,” Mathematical and Computer Modelling, vol. 57, no. 9-10, pp. 2408–2418, 2013.

L. Zhang, J.-Q. Zhao, X.-N. Zhang, and S.-L. Zhang, “Study of a new improved PSO–BP neural network algorithm,” Journal of Harbin Institute of Technology (New Series), vol. 20, no. 5, pp. 106–112, 2013.

Q. Li and K.-X. Zhou, “The research of the pressure sensor temperature compensation based on PSO-BP algorithm,” Acta Electronica Sinica, vol. 43, no. 2, pp. 413–416, 2015.

Z.-H. Zhan, J. Zhang, Y. Li, and H. S.-H. Chung, “Adaptive particle swarm optimization,” IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernetics, vol. 39, no. 6, pp. 1362–1381, 2009.

Z. Gao and X.-Z. Liao, “Hybrid adaptive particle swarm optimization based on average velocity,” Control and Decision, vol. 27, no. 1, pp. 152–160, 2012.

Z. J. Zhao, “The network traffic prediction and research based on PSO-BP neural network,” Computer Applications and Software, vol. 26, pp. 219–220, 2009.