A Novel Mechanism for Fire Detection in Subway Transportation Systems Based on Wireless Sensor Networks

Fire is a common and disastrous phenomenon in subway transportation systems because of closed environment and large passenger flow. Traditional methods detect and forecast fire incidents by fusing the data collected by wireless sensor networks and compare the fusion result with a threshold. However, this approach has a significant shortcoming. Fusion of data decreases the amount of useful information since the distribution of data is not considered. In this paper, a novel mechanism based on wireless sensor networks is proposed and we can use the mechanism to detect fire in subway transportation systems. The core algorithm in this mechanism is an alternative of data fusion in wireless sensor networks. The mechanism uses the quantity information acquired from the data and also considers the distribution information of the data in order to predict the occurrence of fire incidents. The simulation results show that fire incidents can be detected fast and efficiently.


Introduction
Wireless sensor networks (WSNs) have extensively been used due to their excellent capability of monitoring real physical environments and collecting data [1]. For example, WSNs have been used in military, medical, and environmental monitoring applications, among others. Surely, the fields in which they are applied will continue to expand.
With the rapid process of urbanization, more and more people live and work in big cities. As a result, public transportation systems are under great pressure, and subway transportation systems are good choices to help relieve this pressure. However, fire is a common and disastrous phenomenon in subway transportation systems, and great attention must be paid to guarantee the safety of the public in such systems. Thus, the research on fire detection in subway transportation systems is very important.
In this paper, WSNs are used in subway transportation systems to monitor fire. The sensors deployed can collect data about temperature, and then we store the data in the database. Fire incidents can be predicted by comparing the distribution of the data collected and the normal distribution of the data on the condition when there is no fire. There are two rules that will be followed when comparing the distributionsthe rule of the best consistency comparison and the rule of the best squared comparison. In this paper, these two rules are the core of the mechanism for fire detection. The best consistency comparison is a good method for fire locating, but it cannot provide any indication of the situation of the fire. Conversely, the best squared comparison cannot locate a fire, but it is a perfect method for estimating the severity of the situation, because this method has accumulated all the differences of these two functions rather than just the large differences. Therefore, the two methods have their own advantages and shortcomings and fire can be detected more accurately and efficiently by making use of the strengths of these two methods.
The mechanism proposed in this paper is an alternative of the mechanisms based on data fusion. Compared with other mechanisms, our mechanism can detect fire incidents all around and the result is more accurate. Fire incidents can be sensed, located, and monitored and the situation of the fire incidents can be estimated. Therefore, the mechanism proposed in this paper is more valuable.
The rest of the paper is organized as follows. Section 2 introduces the related work of this paper, and Section 3 introduces the preliminary techniques. The fire detection system is discussed in detail in Section 4, and its performance is evaluated in Section 5. The conclusions are presented in Section 6.

Related Work
Studies on smart home [3][4][5][6] such as fire monitoring and detection have been researched for many years. Most monitoring and detection approaches make use of temperature and humidity sensors, smoke detectors, cameras and so on. In [7], a fire-detection system is proposed based on multisensory technology and neural networks. However, this method requires a large number of training samples due to the multivariate classification that applies to a neutral network. Moreover, it is assumed that possible events of fire detection have to be well studied for its priori information by the neural network. Hence, for an unseen event to be learned, the entire neural structure must be reformed. In [8,9], the authors presented a system that was based on various types of sensors and that used probabilistic neural networks. However, such systems require the use of a training set, and most of them are evaluated in indoor environments, where the environmental conditions are absolutely controllable and, of course, completely different from the outdoor environment. A method for fire detection based on multisensory data fusion was presented in [10]. There are three types of sensors, that is, temperature sensors, humidity sensors, and cameras, and the authors combined the three types of data by D-S evidence theory (Dempster-Shafer evidence theory) to detect a fire [2,11]. In [12], the authors proposed adaptive fusion algorithms, which are improvements over data fusion algorithms. Neubauer [13] applies genetic algorithms to an automatic fire detection system. The online identification of stochastic signal models for measured fire signals was presented. A system for monitoring fires using a WSN that collects temperature, humidity, and barometric pressure is described in [14].
Our approach is a novel mechanism for monitoring fires, and it is based mainly on statistical data and the process is different from the approaches used in previous methods. In order to illustrate the mechanism easily, we assume that there are only temperature sensors present. The occurrence of fire is judged by combining the distribution of the data collected and the normal distribution of the ordinary data when there is no fire. If the data show significant differences, it is very likely that there is a fire.

Preliminary Techniques
The proposed novel mechanism for fire detection mainly has three preliminary techniques (1) Interpolation is an alternative method of data fitting, and, in some conditions, it is an easier and more accurate method especially for the complicated functions; for some extreme cases, the performance of data fitting cannot be accepted. Because of the reasons we proposed before, in this paper, cubic spline interpolation is used rather than Gaussian data fitting or some other data fitting techniques to get the continuous function of the discrete data collected by the sensors. (2) The second preliminary technique is the best consistency comparison. It is a method that can identify the points at which the two distributions have obvious differences. The differences will be used to locate fire. (3) The third preliminary technique is the best squared comparison, which can be used to obtain the whole difference between two distributions that can be compared. It can accumulate all of the differences rather than just the main differences. Therefore, it is a good way to estimate the situation of the fire.
We will introduce the techniques in detail below.

Cubic Spline Interpolation.
Interpolation is an alternative method of data fitting whose characteristic is the continuous function across all the discrete data points. Cubic spline interpolation is a classic method because of its gliding property. The performance of interpolation is better than the performance of fitting when the function is not a simple function, for example, when the discrete data have two peaks. As shown in Figure 1, the continuous function obtained using the method of cubic spline interpolation crosses all the discrete points and is smooth. However, the continuous function obtained by polynomial fitting is not close to the actual data, even though the order of the polynomial is nine. Therefore, in this paper, cubic spline interpolation is used to process the discrete data. The peaks of Δ( , ) are recorded as ( , ), where is short for temperature and is short for probability. The differences between ( ) and ( ) can be determined through the records. Obviously, one piece of record is ignored if ≤ , where is a predefined set of thresholds, for example, = 0.005. If ≫ normal and ≥ , it is concluded that there is fire with temperature ; otherwise, there is no fire. is a probability threshold for judging if there is fire and often is set to be equal to 0.02. There is an example for the best consistency comparison shown in Figure 2.
As shown in Figure 2, the peaks of Δ( ( ), ( )) are recorded as (−0.2, 0.128) and (6.1, 0.116). We assume that the normal temperature is inferred around 0 ∘ C. Therefore, the peak (−0.2, 0.128) is normal and the peak (6.1, 0.116) attracts our attention. The sensors that detect a temperature around 6.1 ∘ C will be selected in the database and the sensor positions can be located by location system in WSNs.
The best consistency comparison is very sensitive to the big differences in a point and it is quite good for locating the fire. But the shortcoming is that this method cannot provide any information about the fire situation. To offset the shorting of the best consistency comparison, we propose another rule for comparison in Section 3.3. , we define the best squared comparison as follows:

The Best
where is a number between 0 and 1. In fact, the maximum of ∫ | ( ) − ( )| 2 is equal to 2 * ∫ ( ) 2 on the condition that there is a large fire that influenced all of the deployed sensors, and the continuous bar graph and the normal distribution staggered completely; the minimum of ∫ | ( ) − ( )| 2 equals 0 on the condition that the situation is as usual, and ( ) and ( ) are almost all the same everywhere. Figure 3 is an example of the best squared comparison rather than being an example of the condition that ( ) and ( ) are almost all the same everywhere.
We can define the severity of a fire by : no fire, 0 ≤ ≤ 0.05 not that severe, 0.05 < ≤ 0.3 the fire is severe, 0.3 < ≤ 0.6 the fire is very severe, 0.6 < ≤ 0.8 a large fire, 0.8 < ≤ 1 and it is obvious that there is a large fire if ≥ 0.8.

International Journal of Distributed Sensor Networks
SubProcess3: analyse the trend of f(t) to control the period of data collected and process it.
SubProcess4: compare f(t) with g(t) through the best square to estimate the situation, and if there is a fire, compare f(t) with g(t) through the best consistency to locate the fire.
SubProcess1: get f(t)-the distribution of the data collected by the sensors deployed in the urban railway transportation systems.
SubProcess2: get g(t)-the ordinary distribution of the data on the condition that there is no fire in the urban railway transportation systems.  The best squared comparison is a good measure for estimating the situation because this method accumulates all the differences between the two functions. On the contrary with the best consistency comparison, the shortcoming of the best squared comparison is that it cannot locate a fire, so these two comparisons will become complementary.

Fire Detection System
Applying the technologies introduced in Section 3, this paper proposes a new fire detection mechanism as shown in Figure 4 briefly to predict the fire perfectly. To be specific, the implementation details of each subprocess are expounded in Sections 4.1-4.5.
As shown in Figure 4, SubProcess4 is the core of our mechanism by which we can judge whether there is a fire. SubProcess1 and SubProcess2 are the basement of SubPro-cess4 through which we can get ( ) and ( ). The period we collect data in is important for real-time of our mechanism; the smaller the period is, the more real-time the data is. In the normal situation, we need not to collect the data very frequent, but if there are some indications of fire incident, we should collect the data more real-timely which means we should shorten the period. In SubProcess3, we described the method to control the period.

Predict the Normal Temperature in the Subway Transportation Systems.
To predict the normal temperature in the subway transportation system, the association rules between the climate of the city and the normal temperature in the system are to be determined. A weather report provides the climate of city in a discrete way, for example, every 30 minutes or 60 minutes, and through the association rule, we can predict the normal temperature in the subway transportation system.
To our knowledge, the association rule between the climate and temperature in the subway transportation system can be mined by the technique of data mining, and then we can get the normal temperature, but it is not the core algorithm in this paper. Therefore, normal temperature in Beijing subway transportation system is given and is a set of discrete data at different times on a day as shown in Figure 5.
To get the temperature at any time, continuous function to represent the discrete data based on cubic spline interpolation is developed, and the result is presented in Figure 5. We can find that the continuous function crossed all the discrete points and it is very smooth and it satisfied our feeling better than data fitting. This is the continuous function of temperature for a day obtained by cubic spline interpolation, and the actual temperature at any time of the day can be obtained using this function. Getting the accurate temperature is the basement of fire detection.

Reason the Normal Distribution ( ) of the Data We Collected by WSNs.
Because of the inherent features of sensors, accurate measurements of the temperature in the subway transportation system cannot be obtained. The observed value often follows a Gaussian distribution with a variance 2 of the real value, and has a relationship with the property of the sensors deployed. Obviously, 2 is an important parameter of the sensors, since smaller 2 means better quality and accuracy of the sensors. In Section 4.1, we obtain the normal temperature and the distribution of the temperature obtained from the sensors should be a Gaussian distribution with a mean of and a variance of 2 , namely, ( , 2 ).
For example, the sensors deployed in the subway transportation systems with a variance 2 = 2 and the temperature is 0 = 30 ∘ C. Then, the temperature provided by a sensor follows a Gaussian distribution, as shown in Figure 6. Figure 6 shows that, although the temperature is 30 ∘ C accurately, because of the property of sensors, we cannot obtain the temperature accurately using the sensors; often, the measuring result follows a Gaussian distribution. Therefore, if the distribution of the data obtained from the sensors is very similar to the distribution shown in Figure 6, we believe that the actual temperature is 30 ∘ C.

Get the Distribution ( ) of the Data Collected by WSNs.
After collecting the temperature data from the sensors deployed in the subway transportation system, we process the data to get their approximate distribution function, as described below.
First, the smallest and the largest number of data is found, recorded as and , respectively.
Second, the range [ , ] is divided into segments. Usually, is a number in 30-50. However, can be set somewhat larger to get a more accurate result at the expense of increasing the amount of calculations required.
Third, for each segment, the number of the data that fall into this segment is added up, and a bar graph of data is obtained that comprises of discrete points.
Fourth, we use cubic spline interpolation to get a continuous function, which is an approximation of the discrete data. The pseudocode of this algorithm is described as in Algorithm 1.

Control the Period of Data Collected and Process by Analyzing ( ).
At the beginning of fire, the distribution of ( ) tends to have two peaks because the temperature increases in the local area, and the discrete data of the temperature tends to be greater there. Therefore, if the function has two peaks that are not obvious, the period of data processing should be decreased to get more information about the fire.
To find the peaks, the algorithm proposed is described as follows.
First, the derivative of ( ) is acquired and find zero points, that is, 0 ≤ 1 ≤ ⋅ ⋅ ⋅ ≤ in order.
Second, get the normal temperature through Section 4.1.
In Figure 7(b), there are six zero points, that is, 23.4, 23.7, 29.8, 35.5, 36, and 36.7. However, there is no zero point that satisfies the conditions described in the third step; therefore, remains the same. In Figure 10, there is a zero point that satisfies the condition ( ) ≥ 0.05 and − ≥ 10; is decreased to observe the situation more carefully. In fact, there are some occasional cases in which data collected implies that there is fire and that would lead to erroneous . However, it may have less impact as data will be collected more often, and the influence of occasional cases will be smaller.
Conversely, if the fire alarm is removed, would be reset to normal value manually.
The pseudocode of this algorithm is described in Algorithm 2.

4.5.
Compare ( ) and ( ) to Find Whether There Is Fire. We have got ( ), ( ) and we will compare them through the two comparisons to predict whether there is a fire. If there is no fire in the subway transportation system, ( ) and ( ) are almost all the same; if there is a local fire, ( ) will be a little different from ( ), for example, ( ) has two peaks and ( ) has one peak and in this situation, the best consistency comparision is a good method; if the fire is occurring almost everywhere of the system, ( ) will be very different from ( ) and in this situation, we cannot only focus our attention on the places where the fire is the most severe but also on the overall conditions. The flow to judge whether there is a fire is shown in Figure 8.
Just as we described in the Introduction, the best consistency comparison and the best squared comparison have their own advantages and disadvantage. So, we will use both of them to get an all-sided result and for different results we should take different methods to process the fire appropriately.

Performance Evaluation
To examine the mechanism for fire detection in subway transportation systems, we set two different situations of fire incidents and they can check the mechanism in different aspects. The local fire incident is used mainly to examine Compare f(t) with g(t) through the best square to estimate the situation f(t) and g(t) Compare f(t) with g(t) through the best consistency to locate the fire Compare f(t) with g(t) through the best consistency to find the places where the fire is most severe The fire is not severe The fire is very severe Alarm and message the security department about the fire There is no fire Do nothing the best consistency comparison and the large fire incident is used mainly to check the best squared comparison. For different fire, our experimental parameters are set as in Table 1. Through our mechanism, the fire incidents will be predicted. If there are local fires in various places, we will locate them quickly and inform the security officers; if there is a large fire that is almost everywhere in the system, we will locate the places where the fire is very severe, and then we will inform the security officers.

Hypotheses of Simulation.
To simplify the simulation, there are some hypotheses.
(1) Difference of properties in sensor measurement between the sensors is not considered. We assume that all the sensors have the same properties, such as the same measuring range and the same measuring error. In this paper, we assume that each sensor used can measure temperature up to 1000 ∘ C and the errors in the measurements are presented in the distribution of the data measured by the sensors. (2) The temperature around a fire is all the same. In fact, the temperature decreases with the increase of the distance between the fire and the sensors. In this case, it is very difficult to simulate. Therefore, in this paper, we ignore the influence of this phenomenon.     (3) (3) The temperature of the subway transportation system is all the same. This hypothesis is reasonable because for a subway transportation system, the environment of a subway is almost all the same. If the subway transportation system is too big that the temperature is different between different parts, we can divide the subway transportation system into several parts and it is feasible that the environment of each part is almost all the same. We can use our mechanism in each part. (4) To guarantee a good result, we assume that the number of sensors is large enough and the sensors are deployed uniformly in the subway transportation system. In our experiment, we assume that for a local fire, there are 200 sensors that can defect the fire, and for a large fire, there are about 1500 sensors that can defect the fire.
Based on the three hypotheses, our experiment results are presented as follows.

Detect Local Fires.
In this part, local fire at about 100 ∘ C is simulated and the system consists of 200 sensors for temperature measurement.
The simulation results are shown in Figure 9.
As shown in Table 1, 2000 temperature measurements are obtained, and the interval is 0.5 ∘ C. Figure 9 shows that there are two peaks: one peak is at 30 ∘ C and the other peak at 100 ∘ C indicates a local fire.
A continuous function of the discrete bar graph is obtained by cubic spline interpolation, and this function could be easily compared with the normal distribution. Figure 10 shows the normal distribution and the continuous function obtained by cubic spline interpolation. It is evident that there are mainly two large differences between them. The first difference occurs at 30 ∘ C, and the second occurs at a temperature of 100 ∘ C. However, they are not equally important, because the first difference means that some sensors may have moved to a higher temperature, and our more important concern is the new location of the sensors. The second peak shows that the temperature of some places in the subway transportation systems has increased to 100 ∘ C. Because ( = 100) ≫ ( normal = 30) and ≥ , it is reasonable to conclude that there is a fire. Figure 11 shows the consistency difference and the square difference between the normal distribution and the continuous bar graph.
After determining the unusual points through the best consistency comparison and locating the fire, the situation can be estimated using the best squared comparison. By (2), we get = 0.11, and by (3), we can conclude that the fire is not very severe and it is most likely a local fire.

Detect Large Fires.
In this part, a large fire is simulated with a temperature of 200 ∘ C, and the fire is measured using 1500 sensors.
It is evident that there are two peaks of the data collected by the sensors in the subway transportation system. The first peak is at 30 ∘ C and the second one is at about 200 ∘ C. Obviously, it is unusual for the second peak which is much higher than the first peak, and this indicates that the fire is large.
In order to compare the distribution of the discrete data with the normal distribution through our two comparison rules, the discrete data are interpolated by cubic spline interpolation, and the results are shown in Figure 12. Figure 13 shows that there are two big differences between them: one is at 30 ∘ C and the other is at 200 ∘ C. Figure 14 shows   the consistency difference and the square difference between the normal distribution and the continuous bar graph.
Because ( = 200) ≫ ( normal = 30) and ≥ , as described in Section 3.2, it is reasonable to conclude that there is a fire. After finding the unusual points through the best consistency comparison and locating the fire, the best squared comparison is used to estimate the situation. By (2), we get = 0.82; and by (3), we can conclude that the fire is very severe and it is most likely a large fire.

Conclusion and Future Work
In this paper, we have proposed a novel mechanism based on WSNs for fire detection in subway transportation systems. For different types of fire incidents, it is obvious that we focus our attention on different aspects of them. For a local fire, it is important to locate the places where the fire happens quickly and efficiently because it is the best result to put out the fire when it is small, and for a large fire incident, it is important to estimate the situation as accurate as possible because it is impossible to extinguish a big fire immediately. For different order of severity we should take different measures. Through the two comparisons we proposed in our paper, we can get a satisfied result. The simulation shows that the performance of the mechanism described in this paper is satisfactory, and we can detect almost all the situations associated with a fire efficiently and quickly.
As our future work, to improve the reliability and safety of the mechanism, we will introduce some other important measures for a fire, such as the humidity of the environment and the concentration of smoke in the subway transportation system. In this way, there will be several results for the prediction of fire. However, it is not competent for our mechanism to fuse these several results. Therefore, we will use the technique of fuzzy set theory or D-S evidence theory to fuse the results on decision level.
Input: ( ) is the distribution, is the normal temperature, 1 and 2 are probability thresholds, 1 and 2 are the temperature thresholds, limite is the limit value of Output: the new period (1) Take the derivation of ( ) and get ( ).