Multi-Sensor Data Fusion Algorithm for Indoor Fire Early Warning Based on BP Neural Network

: Fire early warning is an important way to deal with the faster burning rate of modern home ﬁres and ensure the safety of the residents’ lives and property. To improve real-time ﬁre alarm performance, this paper proposes an indoor ﬁre early warning algorithm based on a back propagation neural network. The early warning algorithm fuses the data of temperature, smoke concentration and carbon monoxide, which are collected by sensors, and outputs the probability of ﬁre occurrence. In this study, non-uniform sampling and trend extraction were used to enhance the ability to distinguish ﬁre signals and environmental interference. Data from six sets of standard test ﬁre scenarios and six sets of no-ﬁre scenarios were used to test the algorithm proposed in this paper. The test results show that the proposed algorithm can correctly alarm six standard test ﬁres from these 12 scenarios, and the ﬁre detection time is shortened by 32%.


Introduction
Fire warning involves the judgement of situations that are full of randomness and uncertainty and are difficult to characterize due to statistical inference. The growth rate of fires in residential settings has increased significantly in the past four decades [1]. According to the research of Underwriters Laboratories (UL, Brooke, IL, USA), the available safe escape time for residential fires has dropped from 17 min in 1978 to three or four minutes today [2]. The reason is that more and more modern furniture made of synthetic fibers is used in modern homes. This material burns at a higher temperature and much faster than natural materials do. Although improving the sensitivity of smoke alarms currently in widespread use is one of the potential ways to deal with this problem, it would increase the false alarm rate. Statistics from the National Fire Protection Association (NFPA) show that about 2700 people die in residential fires in the United States each year, and many smoke alarms in their homes are turned off due to frequent false alarms. In the UK, false alarms caused by fire alarm systems cost businesses and fire and rescue services (FRSs) over £1 billion each year [3]. This is a result of smoke detectors being unable to discriminate between smoke particles from fires and particles from other events [4].
In addition to smoke, the combustion of fire also emits heat, flame, gas and so on. The characteristic parameters of fires include temperature, smoke concentration and carbon monoxide. Chemical sensors sometimes respond faster than smoke alarms [4,5], so a fire alarm system that combines multiple sensors would be faster and more accurate. Multi-sensor fusion with a wireless sensor network (WSN) [6] and an Internet of Things (IoT)-based approach is suitable for fire detection [7]. Multi-sensor data fusion [8] is used to combine data from multiple sensors and achieve higher accuracy than using a single sensor [9].
The past studies on fire warning using the multi-sensor data fusion method can be divided into two types of approaches. One type is based on conditional probability [10], statistics and inference. Chen et al. [11] built a fire alarm system based on a Bayesian network. The Kalman filter can fuse a variety of fire data and effectively remove noise [12]. Rachman et al. used fuzzy logic to cover complex fire scenes and reduce the complexity of computing [4,13,14]. The other type is the artificial intelligence method. A multilayer perceptron (MLP) as the decision layer of a fire detection system can improve warning accuracy [15]. A multi-sensor information fusion system for fire warning is proposed in Reference [16], which uses a back propagation (BP) neural network to fuse the data from temperature, smoke density and CO sensors. Results show that the system has better real-time performance while ensuring the accuracy of fire detection. In Reference [17], an additional infrared sensor was added to a similar system to that described above. Although the algorithms in the literature have different advantages for fire warning, there are two issues of these works. Firstly, when algorithms are used for data fusion, they handle the data of the entire process of the fire equally, ignoring that the data of the early stage of fires is key to fire detection. Secondly, they assess the accuracy of fire warning algorithms according to the results at each time instance rather than fire scenarios, which hardly reflects the true fire warning rate.
This study focused on the data characteristics of temperature, smoke and CO in the early stage of the fire, and a multi-sensor data fusion algorithm based on a BP neural network is proposed for fire early warning. Non-uniform sampling and improved trend extraction methods were used to enhance the ability of the warning algorithm to distinguish between fire signals and environmental interference. Test results show that the performance of the warning algorithm proposed in this paper is better than the traditional algorithms. The algorithm can correctly alarm six test fires according to the EN54 standards and reduce the fire detection time by 32%.

Requied Safe Escape Time
Time is a crucial factor in fire detection [18], and available safe escape time (ASET) is one of the most important indices in fire safety. According to the national standard of China GB/T 31593.9-2015, required safe escape time (RSET) [19] is defined as the sum of fire detection time, warning time, pre-travel activity time and travel time. The equation is as follows: The margin of safety for the evacuation design is the difference between t AEST minus t REST . Therefore, it is essential to reduce t REST given that t AEST has decreased sharply in the past four decades. Fire detection time t det and warning time t warn are determined by fire detection systems, and t warn is equal to zero when there is no stage warning. Pre-travel activity time t pre and travel time t trav are related to evacuation behavior and building features, so improving the fire detection time t det is particularly important for shortening t REST from the perspective of system design.
Fire detection time is relevant to the warning algorithm and the fire growth rate. The process of indoor fire development is divided into three stages: initial stage, developing stage and extinguished stage, as shown in Figure 1.
The key to fire early warning is to detect changes of fire characteristic parameters (like temperature, smoke concentration and CO) in the environment at the initial stage of the fire, then judge whether it is a fire. There are two technical challenges: First, the materials which caused the fire are so different that the data of fire parameters at the initial stage are hard to characterize. Second, fire early warning requires a warning within a short time after the fire, and the earlier the warning, the more beneficial this is for controlling the fire. However, shorter times mean more subtle changes of fire parameters, which makes it more difficult to distinguish between fire signals and environmental disturbances. Information 2021, 12, x FOR PEER REVIEW 3 of 13 The key to fire early warning is to detect changes of fire characteristic parameters (like temperature, smoke concentration and CO) in the environment at the initial stage of the fire, then judge whether it is a fire. There are two technical challenges: First, the materials which caused the fire are so different that the data of fire parameters at the initial stage are hard to characterize. Second, fire early warning requires a warning within a short time after the fire, and the earlier the warning, the more beneficial this is for controlling the fire. However, shorter times mean more subtle changes of fire parameters, which makes it more difficult to distinguish between fire signals and environmental disturbances.

Fire Parameters
In the early stage of fires, the phenomena and products produced by combustion of different materials are different, but there are also some similarities, like the release of heat and production of smoke. These common burning products (temperature, humidity, smoke, CO2, CO [20], etc.) are called fire characteristic parameters [21], also known as fire parameters. The fire early warning technology based on multi-sensor data fusion relies on the detection and processing of fire parameters. Thus, selecting suitable fire parameters is important for fire early warning algorithms. The following are the fire parameters used in this study: (1) Temperature When a fire occurs, heat is released and the temperature of surrounding environment increases. Temperature is the earliest and most versatile indicator in fire warning technology. However, the alarm threshold of temperature is usually greater than 60 °C to reduce the false alarm caused by weather changes. As a result, temperature is rarely used as a lone indicator. Nevertheless, it is a good balance metric for fire early warning algorithms based on multi-sensor data fusion model.

(2) Smoke concentration
Smoke is an important feature in the characterization of fire [22]. Smoke concentration is one of the most obvious indicators of fires. The current market share of smoke detectors is around 60% [15], though consumers are also affected by the failure or false alarms of smoke detectors. These problems can be effectively overcome when smoke is used as one of the indictors in a multi-sensor data fusion model.

(3) Carbon monoxide
Normally, the content of carbon monoxide (CO) in the air is low, and it increases rapidly in the event of a fire [17]. There are few events that generate enough CO to trigger a fire detector, unlike carbon dioxide (CO2). Therefore, carbon monoxide is an effective indicator for fire detection.

Fire Parameters
In the early stage of fires, the phenomena and products produced by combustion of different materials are different, but there are also some similarities, like the release of heat and production of smoke. These common burning products (temperature, humidity, smoke, CO 2 , CO [20], etc.) are called fire characteristic parameters [21], also known as fire parameters. The fire early warning technology based on multi-sensor data fusion relies on the detection and processing of fire parameters. Thus, selecting suitable fire parameters is important for fire early warning algorithms. The following are the fire parameters used in this study: (1) Temperature When a fire occurs, heat is released and the temperature of surrounding environment increases. Temperature is the earliest and most versatile indicator in fire warning technology. However, the alarm threshold of temperature is usually greater than 60 • C to reduce the false alarm caused by weather changes. As a result, temperature is rarely used as a lone indicator. Nevertheless, it is a good balance metric for fire early warning algorithms based on multi-sensor data fusion model.

(2) Smoke concentration
Smoke is an important feature in the characterization of fire [22]. Smoke concentration is one of the most obvious indicators of fires. The current market share of smoke detectors is around 60% [15], though consumers are also affected by the failure or false alarms of smoke detectors. These problems can be effectively overcome when smoke is used as one of the indictors in a multi-sensor data fusion model.

(3) Carbon monoxide
Normally, the content of carbon monoxide (CO) in the air is low, and it increases rapidly in the event of a fire [17]. There are few events that generate enough CO to trigger a fire detector, unlike carbon dioxide (CO 2 ). Therefore, carbon monoxide is an effective indicator for fire detection.
Although humidity and carbon dioxide are also common byproducts of combustion, they are closely related to the environment. Hence, temperature, smoke concentration and carbon monoxide were selected as indicators of fire detection in this study.
(4) Trend values of fire parameters Usually, fire parameters fluctuate randomly and irregularly due to disturbance in the normal environment. When a fire occurs, fire parameters have obvious and continuous positive or negative trend characteristics [23]. Hence, the trend values of fire parameters also can be used as effective indicators to distinguish fire signals from environmental interference.

Fusion Algorithm
The process of a fire is very complicated and extremely susceptible to interference from the surrounding environment [17]. The combustion of different materials leads to different data characteristics of fire parameters. There are different effects on fire parameters in various environments. The methods of signal threshold judgement (like smoke detectors) or probability reasoning hardly cover these complex situations. The fusion algorithm for fire parameters needs to have a great generalization ability. An artificial neural network (ANN), which has significant generalization ability and self-learning ability, is an effective way to solve such problems.
The back propagation neural network (BPNN) is currently the most widely used feedforward neural network with multiple inputs and outputs [24]. It refreshes the network's weights and biases through the back propagation algorithm such that it produces outputs with minimal error [25]. The BPNN is suitable for a data fusion model of distributed sensors due to its powerful nonlinear mapping and parallel processing capabilities. Therefore, a BP neural network was chosen for this study to fuse the values and trends of fire parameters and determine whether there is a fire.

The Architecture of Fire Detection
An architecture was created for fire early warning as shown in Figure 2. It determines whether there is a fire through fusing the data of temperature, smoke concentration, CO and their trend values. Firstly, the data collected by sensors is inevitably affected by environmental noise, so data preprocessing is necessary, such as filtering and sampling. Then, the improved kendall − τ algorithm is used to extract the trend values of preprocessed data. Finally, the data of temperature, smoke concentration, CO after filtering and the trend values are fed to the inputs of the BP neural network. The outputs of the BP neural network are the probability of flaming, smoldering and no fire in the current environment.
(4) Trend values of fire parameters Usually, fire parameters fluctuate randomly and irregularly due to disturbance in the normal environment. When a fire occurs, fire parameters have obvious and continuous positive or negative trend characteristics [23]. Hence, the trend values of fire parameters also can be used as effective indicators to distinguish fire signals from environmental interference.

Fusion Algorithm
The process of a fire is very complicated and extremely susceptible to interference from the surrounding environment [17]. The combustion of different materials leads to different data characteristics of fire parameters. There are different effects on fire parameters in various environments. The methods of signal threshold judgement (like smoke detectors) or probability reasoning hardly cover these complex situations. The fusion algorithm for fire parameters needs to have a great generalization ability. An artificial neural network (ANN), which has significant generalization ability and self-learning ability, is an effective way to solve such problems.
The back propagation neural network (BPNN) is currently the most widely used feedforward neural network with multiple inputs and outputs [24]. It refreshes the net-work′s weights and biases through the back propagation algorithm such that it produces outputs with minimal error [25]. The BPNN is suitable for a data fusion model of distributed sensors due to its powerful nonlinear mapping and parallel processing capabilities. Therefore, a BP neural network was chosen for this study to fuse the values and trends of fire parameters and determine whether there is a fire.

The Architecture of Fire Detection
An architecture was created for fire early warning as shown in Figure 2. It determines whether there is a fire through fusing the data of temperature, smoke concentration, CO and their trend values. Firstly, the data collected by sensors is inevitably affected by environmental noise, so data preprocessing is necessary, such as filtering and sampling. Then, the improved kendall τ − algorithm is used to extract the trend values of preprocessed data. Finally, the data of temperature, smoke concentration, CO after filtering and the trend values are fed to the inputs of the BP neural network. The outputs of the BP neural network are the probability of flaming, smoldering and no fire in the current environment.

Fire Dataset
The weights and biases of BPNN nodes are obtained by training in terms of the training set, and the performance of the BPNN is influenced by the quality of training set. Unfortunately, to date there is no standard fire dataset for multi-sensor fusion model. The home smoke alarm test data of the National Institute of Standards and Technology (NIST) [26] were used in this study. The experiment recorded in detail the entire process data of various materials burning in the room from the initial, developing and extinguished stage, which provided rich and reliable data for fire research.
In this study, we chose the tests of SDC01, SDC02, SDC05, SDC12, SDC14 and SDC28, which include the data of different materials, different types of fire and the interference signal. The following two subsections outline the data processing of the training set.

Non-Uniform Sampling
The time interval from the ignition (zero) to the preset fire point is defined as the window period in this study. Referring to UL217, which is the standard for safety for smoke alarms, and considering the characteristics of the NIST home smoke alarm test data, the window period is defined as the smaller time interval from zero to when the photoelectric smoke concentration is 6.6%/m or carbon monoxide is 100 ppm.
The window period is a crucial period of transition from no fire to fire. The data of the window period has a greater impact on the performance of the fire early warning algorithm. In order to improve the performance of algorithms, the data of the window is densely sampled to make the output of the BPNN more closely fit these samples from the window period, as shown at 0 to 100 s in Figure 3. Sparse sampling was used to expand the range of the training set in other periods, including −100 to 0 and 100 to 180 s. In addition, the trend values of data were used as inputs of the BPNN, so the training set only involved the data of the rising phase of fire combustion to ensure the monotonicity of the data. The color segment in Figure 3 is the rising phase of the fire.
home smoke alarm test data of the National Institute of Standards and Technology (NIST) [26] were used in this study. The experiment recorded in detail the entire process data of various materials burning in the room from the initial, developing and extinguished stage, which provided rich and reliable data for fire research.
In this study, we chose the tests of SDC01, SDC02, SDC05, SDC12, SDC14 and SDC28, which include the data of different materials, different types of fire and the interference signal. The following two subsections outline the data processing of the training set.

Non-Uniform Sampling
The time interval from the ignition (zero) to the preset fire point is defined as the window period in this study. Referring to UL217, which is the standard for safety for smoke alarms, and considering the characteristics of the NIST home smoke alarm test data, the window period is defined as the smaller time interval from zero to when the photoelectric smoke concentration is 6.6%/m or carbon monoxide is 100 ppm.
The window period is a crucial period of transition from no fire to fire. The data of the window period has a greater impact on the performance of the fire early warning algorithm. In order to improve the performance of algorithms, the data of the window is densely sampled to make the output of the BPNN more closely fit these samples from the window period, as shown at 0 to 100 s in Figure 3. Sparse sampling was used to expand the range of the training set in other periods, including -100 to 0 and 100 to 180 s. In addition, the trend values of data were used as inputs of the BPNN, so the training set only involved the data of the rising phase of fire combustion to ensure the monotonicity of the data. The color segment in Figure 3 is the rising phase of the fire.

Trend Extraction
The trend of fire parameters is an effective indicator for fire detection. The trend of the data contains the amount of change and the direction of change. The burning of different materials leads to the different change in fire parameters, but the direction of change is similar in the initial stage of the fire. Trending algorithms were used to extract the change direction of fire parameters as the trend values in this study.
The data of fire parameters were obtained by sampling the continuous time signals.
The kendall τ − trending algorithm was used to extract the trend values of fire parameters in this study. The kendall τ − trending algorithm is the most common and easy to

Trend Extraction
The trend of fire parameters is an effective indicator for fire detection. The trend of the data contains the amount of change and the direction of change. The burning of different materials leads to the different change in fire parameters, but the direction of change is similar in the initial stage of the fire. Trending algorithms were used to extract the change direction of fire parameters as the trend values in this study.
The data of fire parameters were obtained by sampling the continuous time signals. The kendall − τ trending algorithm was used to extract the trend values of fire parameters in this study. The kendall − τ trending algorithm is the most common and easy to implement of the trending algorithms [23]. Adding 0 or 1 is the only computation required, while the amount of calculation can be reduced by recursive algorithms. This makes it suitable for terminal devices with limited resources. It is worth noting that the correlation between changes of different fire parameters was not considered in this study. The trend values of temperature, smoke concentration and CO were separately extracted by the kendall − τ trending algorithm.
The formula of kendall − τ trending algorithm: where n is the discrete time variable, N is the window length of observation data and u(x) is the unit step function. N is an important parameter that directly affects the results of the trend calculation. Trend values are very sensitive to the change of signals if it is too small. However, this leads to the trend values becoming too smooth when the change is too large. The sampling interval in this study was 5 s, which is justified for the fire detection time when N is equal to 4. In addition, it was assumed in this study that x(n) is zero when n < 0. In order to better detect the rising and falling trends of fire signals, the kendall − τ algorithm was modified in this study using the signum function sgn(x) to replace the unit step function u(x) and omitting the term of u(x(n) − x(n)). The term omitted is zero all the time, discarding it reduces the amount of calculation. The improved algorithm: where the window length is N, and y(x) is the sum of sgn(x), which contains the N(N − 1)/2 terms. This can be normalized to [−1, 1]: The recursive formula after modification is, The data obtained through non-uniform sampling and the trend value extracted by modified kendall − τ algorithm composed the fire dataset in this study. Temperature, smoke concentration, CO, trend T, trend S, trend C were considered the sample of data for training, and T, S, C are abbreviations for temperature, smoke concentration and CO, respectively. The fire dataset contained 3540 samples, the data of which came from six different experiments.

Parameters of the BPNN
According to the theorem of Kolmogorov, a three-layer BP neural network can approximate almost any nonlinear function [27]. A BP neural network with smaller errors after training is more easily achieved by adjusting the number of hidden layer nodes rather than the number of hidden layers. Therefore, a fire early warning model with a three-layer BP neural network was built in this study, and the number of hidden layer nodes was adjusted to achieve the best performance of fire detection.
One of the difficulties in using a BP neural network is that there is no theoretical formula for determining the number of hidden layer nodes. Usually, researchers derive an interval for the number of nodes in the hidden layer based on some empirical formulas and then select the appropriate nodes within the interval. Here are several commonly used empirical formulas.

1.
According to the theorem of Kolrnogorov, the number of hidden layer nodes is equivalently related to the number of nodes in the input layer: 2.
Daqi Gao [28] proposed a simplified formula based on least squares method,

3.
According to the nodes of the input layer and output layer [29], the number of nodes in the hidden layer is as follows: In this study, the number of input layer nodes was six, and the number of output layer nodes was three. According to the above three formulas, the interval of the number of hidden layer nodes was determined as [4,13]. Then the fire training dataset was used to train these models established by each node in the interval, and the results are shown as below: From Table 1, it can be seen that BP neural network has the lowest mean squared error when the number of hidden layer nodes is six. Thus, the number of neurons in each layer of the BP neural network is six, six and three respectively. The transfer function between the input layer and hidden layer is tansig, and the function between the hidden layer and output layer is purelin.
The model of the BP neural network is shown in Figure 4; the inputs are values and trends of temperature, smoke concentration and CO, and the outputs are the probability of flaming, smoldering and no fire. The first three fire parameter data at the input of the BPNN are the values at the current moment, and the last three trend values are related to the values at the previous moment. The time window for trend extraction is 20 s, so BP neural network estimates the output based on the fire parameters within 20 s of the input.  The weights and biases between the layers of the BP neural network were obtained by training in terms of the training set. The 3540 samples of the fire dataset were randomly divided into three subsets: training, validation and test sets. The training set was used to train the model. The validation set was used for cross-validation and detection of overfit- The weights and biases between the layers of the BP neural network were obtained by training in terms of the training set. The 3540 samples of the fire dataset were randomly divided into three subsets: training, validation and test sets. The training set was used to train the model. The validation set was used for cross-validation and detection of overfitting during the training stage. The test set was used to evaluate the final performance of the model. The ratios of the training, validation and testing sets were 0.7, 0.15 and 0.15. The detailed parameters for BPNN training are given in Table 2.

Training Results
In terms of training parameters in Table 2, the model of the BP neural network was built and trained in MATLAB 2020a, and the performance of the BP neural network model after training is shown as Figure 5. From Figure 5, we can see that the mean square error of training, validation and testing is less than 1%. The best validation performance was at the 50th iteration. All samples of the fire dataset were fed to the input of the trained BP neural network for testing, and the output results match the labels with 99.67% accuracy. This shows that the training for BP neural network was successful.

Performance Improvement
In order to verify the effectiveness of the fire early warning algorithm proposed in this paper, we tested the performance of the algorithm before and after adding the trend factor to assess whether there was a performance improvement. From Figure 5, we can see that the mean square error of training, validation and testing is less than 1%. The best validation performance was at the 50th iteration. All samples of the fire dataset were fed to the input of the trained BP neural network for testing, and the output results match the labels with 99.67% accuracy. This shows that the training for BP neural network was successful.

Performance Improvement
In order to verify the effectiveness of the fire early warning algorithm proposed in this paper, we tested the performance of the algorithm before and after adding the trend factor to assess whether there was a performance improvement.
To evaluate the performance of the proposed algorithm, some algorithm performance metrics were used in this study. Algorithm performance metrics include accuracy, precision and so on [30]. Mean square error (MSE) and mean absolute error (MAE) are were used to determine accuracy based on the metrics described in this paper. Standard deviation and mean absolute deviation (MAD) were chosen for precision based on metrics. Table 3 shows the performance metrics of the BP neural network and the Trend_BPNN with the addition of trend factors using the NIST dataset. As can be seen from Table 3, the mean square error was reduced from 0.433% to 0.216% after adding trend factors, while the number of iterations was reduced from 155 to 56. The standard deviation of the error of two algorithms is similar, which means that the degree of dispersion of errors is close. The reason for the reduction of the mean square error is that the addition of trend factors enhances the ability of the BPNN to distinguish between fire signals and environmental disturbances. The reduction of mean square error is beneficial to the improvement of the performance of fire detection. Figure 6a,b shows the training results of SDC05 based on the algorithms of the BPNN and Trend_BPNN, respectively. In Figure 6, the blue dashed line is the value of outputs, and the solid yellow line is the expected value. By comparing the two plots, it can be seen that the transition from no fire to fire can be accelerated by adding trend factors. The fit errors between the values of outputs and expected values are smaller when the Trend_BPNN is used. The key to the fire early warning is to determine if there is a fire when fire parameters change during the transition from no fire to fire. Therefore, when the values of outputs are better fitted to the expected values in the transition stage, the fire detection time can be effectively reduced while ensuring the accuracy of fire warning.

Test
Most of the past studies [16,22,31] used the fusion results of multiple sensor data at discrete time points to determine the accuracy of fire warning algorithms. In this study, it was considered more reasonable that the accuracy of fire warning algorithms was based The key to the fire early warning is to determine if there is a fire when fire parameters change during the transition from no fire to fire. Therefore, when the values of outputs are better fitted to the expected values in the transition stage, the fire detection time can be effectively reduced while ensuring the accuracy of fire warning.

Test
Most of the past studies [16,22,31] used the fusion results of multiple sensor data at discrete time points to determine the accuracy of fire warning algorithms. In this study, it was considered more reasonable that the accuracy of fire warning algorithms was based on the test results of different fire experiment scenarios. In order to verify the performance of the algorithm proposed in this paper, the data from six fire scenarios and six no-fire scenarios under different experimental conditions were selected as the test dataset. It is worth noting that this study used the data of the entire fire process as a test unit, and the test data were entered into the model in chronological order of fire occurrence.
The test dataset includes the data of six fire scenarios, TF1 to TF6, under the European Norm 54 standard [32] and the data of six normal environments. The test results are shown in Table 4. The test scenarios 1 to 6 are the data of the fire experiments from test fires 1 to 6. The data contain the values of temperature, smoke concentration and CO collected by sensors during the rising stage of fire. Scenarios 7 to 12 are the data of six normal environments.
The outputs of the BP neural network are the probabilities of flaming, smoldering and no fire. The maximum of these three probabilities is used as the final fusion result. When the fusion results indicate flaming and smoldering, this means that there is a fire, and the model outputs "Y"; the model outputs "N" when the fusion result is no fire. As can be seen from the simulation results column in Table 4, the Trend_BPNN algorithm is able to correctly warn when there is a fire in 12 test scenarios. The data of 12 scenarios were sequentially delivered to the inputs of Trend_BPNN in the time series. Hence, it is easy to obtain the point in time when the algorithm detected the fire for the first time. The time interval from zero to that time point is the fire detection time. The test results are shown in the Trend_BPNN column in Table 4.
The reference values in Table 4 are the alarm points with the highest sensitivity from Jackson's [32] article. The classification criteria for sensitivity in that paper are the same as the Chinese national standards. Hence, it is reasonable to use these values for comparison with the results of the algorithm proposed in this paper. In Table 4, the fire detection times of Trend_BPNN from scenario 1 to scenario 6 are below reference values. The total fire detection time of the Trend_BPNN algorithm was 32% shorter than the sum of six reference values. The rightmost column of Table 4 shows the results of radical basis function (RBF) neural network using the training and test sets of this study. It can be clearly seen that the fire detection time of TF1, TF4 and TF6 is lower than Trend_BPNN s. The results of TF2, TF3 and TF5 are similar. The accuracy of fire warning is the decision result of the algorithm based on the data of fire parameters at discrete time points after the first detection of fire.
Results show that the improved BP neural network (Trend_BPNN) is able to achieve 99.4% warning accuracy, which is better than the 96.2% of RBF neural network.

Conclusions
In order to realize the early warning of fire, the characteristics of temperature, smoke concentration and carbon monoxide sensor data in the initial stage of fire were analyzed in this study, and a back propagation neural network was chosen to achieve the fusion of the three kinds of fire data. In addition, this study adopted the methods of non-uniform sampling and trend extraction to improve the performance of fire warning algorithm in the early stage of fire. The training results show that the addition of the trend factor can reduce the mean square error (MSE) after training by half, and the accuracy of training reached 99.67%. The test results show that the algorithm proposed in this paper can correctly alarm six standard test fires (TF1 to TF6) according to EN54 standards, and the fire detection time is reduced by 32%.
The fire warning algorithm proposed in this paper is designed for indoor fire scenarios. To build robust and reliable fire warning systems, multi-sensor systems need to be exposed to more types of fires and nuisances [4]. Hence, the next step is to expand the fire dataset for the multi-sensor fusion model so that is able to cover flammable materials commonly found in home. Moreover, it is also our goal to build a wireless sensor network (WSN) to test the algorithm in a realistic fire scenario and apply it to the Internet of Things (IoT).

Data Availability Statement:
Publicly available datasets were analyzed in this study. This data can be found here: [https://www.nist.gov/el/nist-report-test-fr-4016].