# Composite Fire Detection System Using Sparse Representation Method

Authors: Na Qu; Jianhui Wang; Jinhai Liu; Zhonghai Li
Journal: Mathematical Problems in Engineering
 (2017)

---

## Abstract

This paper proposes that fire parameter data of smoke, temperature, and CO is fused by sparse representation algorithm. It designs a kind of overcomplete dictionary and obtains the sparse solution of fire recognition throughL1 norm, L3/4 norm, L1/2 norm, and L1/4 norm, respectively, in order to select more suitable norm type. A comprehensive classification method is proposed for fire identification. The simulation results show that L1 norm and L3/4 norm are used to obtain the solution with remarkable sparsity and high accuracy. The comprehensive classification method is more effective than minimum residual method and sum of weight coefficients method. This paper uses DSP TMS320F28022 as the core chip, TC72 as the temperature sensor, MQ-7 as the CO gas sensor, and MQ-9 as the smoke sensor to design the hardware of fire detection system. Code Composer Studio (CCS) software is used to compile and debug the program. Proteus software is used to load the program into the hardware circuit for joint simulation. The simulation results show that system design is feasible.


---

## Body

## 1. Introduction

The fire detection system is used to identify early fire through all kinds of fire phenomena (such as smoke, temperature, and combustible gas). The losses caused by fire are becoming more and more serious, with the continuous development of social economy and increasing high-buildings. If fire detection system detects fire and takes measures as early as possible, the losses can be reduced more than 80% [1]. Traditional single fire detection system is not accurate enough for fire detection and often causes problems of false alarm and missing alarm. Fire detection system of multiple parameters has strong comprehensiveness and good intelligence. It can shorten the time of fire detection and improve the accuracy [2]. Multiparameter fire detection has become a research hotspot in fire-fighting field.Tang et al. [3] presented a kind of discrimination rule based on the CO2 and CO density and rise-rate by analyzing the character of different kinds of fire and nonfire signals. Zhang et al. [4] proposed information fusion technology combining and fusing PCA, RS, and SVM and utilized the online and offline data of fire detection system. The fire information fusion was eventually achieved from data level, the characteristic level, and the decision-making level. Aiming at the drawbacks of traditional single-sensor fire detection system, Xu et al. [5] designed a multisensor wireless network system based on Zigbee and applied it in fire early-warning of smart home. Hu and Zhao [6] designed an intelligence distributed wireless fire detection alarm system, which is based mainly on the STM32 control chip. The system can collect the concentration of CO, smoke density, and temperature of three fire parameters simultaneously. Yu [7] fused the information of temperature, smoke, and CO three kinds of fire parameters based on fuzzy neural network method. Yan et al. [8] used extension neural network as data fusion algorithm. The input values are temperature, smog concentration, and CO concentration, and output values are three kinds of fire warning level. In order to improve the precision of fire fusion data, Jin et al. [9] introduced the Gauss model. According to the entropy from fusing similar information between nodes, they utilized the fusion outcome to express uncertainty. Verstockt et al. [10] proposed two novel time-of-flight based fire detection methods for indoor and outdoor fire detection. The indoor detector was based on the depth and amplitude image of a time-of-flight camera. The outdoor detector used a visual flame detector instead of the fast changing depth detection. da Penha and Nakamura [11] proposed and evaluated two algorithms based on information fusion methods, for fire detection in rainforests when the fire detection system had only light and temperature sensors. The first method is based on the moving average filter and thresholds (Threshold method), while the second uses the moving average filter and the Dempster-Shafer theory.Sparse representation is one of the research focuses in the field of signal processing in recent years. It has made great achievements in the field of image processing, pattern recognition, and so on. Yang et al. [12] proposed a method of rice variety identification based on sparse representation. The rice images of six varieties such as long glutinous rice, round glutinous rice, nonglutinous rice, Thailand aromatic rice, red aromatic rice, and black rice were taken as the research objects. Chen et al. [13] proposed two dictionary learning methods based on Fisher discrimination dictionary learning (FDDL). They demonstrated the effectiveness of the FDKDL and KFDKDL dictionary learning methods through experiments of sparse representation-based classification on several public image databases. Wang et al. [14] established a bidirectional cooperative sparse representation tracking model. UsingL2-norm constraint item, the forward and reverse sparse correlation matrix coefficients could be uniformly convergent. Lian et al. [15] introduced the fundamental models and the algorithms of dictionary learning in detail in terms of the synthesis dictionary, the analysis dictionary, the blind dictionary, and the dictionary learning based on information complexity. In addition, the typical applications of dictionary learning methods were illustrated. Qi et al. [16] proposed a new SAR target recognition method based on the multi-information dictionary learning and sparse representation on the basis of the discriminative dictionary learning and joint dynamic sparse representation model. Hoyer [17] showed how explicitly incorporating the notion of “sparseness” improves the found decomposition. Jiang et al. [18] presented a label consistent K-SVD (LC-KSVD) algorithm to learn a discriminative dictionary for sparse coding. In addition to using class labels of training data, they also associate label information with each dictionary item to enforce discriminability in sparse codes during the dictionary learning process.In view of the advantage of sparse representation in pattern classification, this paper applies it to the fire detection. The data fusion of typical parameters such as temperature, smoke, and CO is carried out through the sparse solution of the norm regularization. In order to improve the performance of fire detection, we choose the norm type which is suitable for fire detection. This paper designs the hardware and software of the fire detection system and uses the Proteus to carry out the hardware and software joint simulation.


## 2. Algorithm Design

This paper carries out fire detection by solving the sparse solution of the underdetermined linear system which is described byDx=y.


### 2.1. Basic Theory

There may be an infinite number of solutions to the underdetermined linear equations which is described byDx=y. In order to reduce the range of selection to a satisfactory solution, it is necessary to increase condition. A function J(x) is introduced to rationally evaluate the candidate solution of x, and its value is expected to be as small as possible [19, 20], usually in the form of Lp norm, as(1)minxpp,s.t.Dx=y.Whenp≤1, sparse solution can be obtained. The typical choice J(x) is L0 norm, L1/2 norm, L1 norm, and so on. The solution of L0 norm is a nondeterministic polynomial hard problem. The key problem in solving this problem is that L0 norm is a discontinuous function and the computation is very large. The L0 norm is usually converted into an equivalent L1 norm to solve the problem, when the RIP (restricted isometry property) condition is satisfied [21].In practical applications, formula (1) is usually written in the form of formula (2) due to the existence of errors.(2)x^=argminxxp,s.t.y-Dx22≤ε.x^ is the approximate solution of x, ε is the error threshold, and y=[y1,…,yn]T is a test vector.


### 2.2. Dictionary Design

This paper designs a kind of overcomplete dictionary. Let us assume that the number of samples categories isn and each category has P training samples. It uses Di to represent the category i of the training sample data and a space which is constituted by P column vectors to represent category i test result. The data dictionary matrix consisting of m categories of training samples is D=D1D2D3⋯Dn. The number of rows in the matrix D is the number describing the sample characteristics. This paper uses three kinds of fire characteristics, that is, smoke, temperature, and CO. Specific input values are standardized values of smoke, temperature, and CO. The values are between 0 and 1. The three categories of training samples are flaming fire, smoldering fire, and interference; that is, n=3. The number of columns is the total number of three categories of training samples; that is, D=D1D2D3. Therefore, there are three categories of test samples; that is, y=[y1,y2,y3]T.


### 2.3. Sparse Coefficient Solution

This paper identifies the fire by the method for finding sparse solutions byL1 norm, L3/4 norm, L1/2 norm, and L1/4 norm, respectively. Thus, it can choose the norm type which is more suitable for fire identification [22–24].


#### 2.3.1.L1 Norm Solution

The sparse solution is obtained byL1 norm, as shown in formula (3) or (4).(3)x^L1=argminxx1,s.t.y-Dx22≤ε,(4)x^L1=argminx1n∑i=1nYi-Dix2+λ∑i=1pxi.Y
i  represents the category i of the test sample data; λ is the regularization parameter. p is the number of samples of each category. In the later application, p=20. xi is the ith sample data of each category.


#### 2.3.2.L3/4 Norm Solution

The sparse solution is obtained byL3/4 norm, as shown in formula (5) or (6).(5)x^L3/4=argminxx3/4,s.t.y-Dx22≤ε,(6)x^L3/4=argminx1n∑i=1nYi-Dix2+λ∑i=1pxi3/4.


#### 2.3.3.L1/2 Norm Solution

The sparse solution is obtained byL1/2 norm, as shown in formula (7) or (8).(7)x^L1/2=argminxx1/2,s.t.y-Dx22≤ε,(8)x^L1/2=argminx1n∑i=1nYi-Dix2+λ∑i=1pxi1/2.


#### 2.3.4.L1/4 Norm Solution

The sparse solution is obtained byL1/4 norm, as shown in formula (9) or (10).(9)x^L1/4=argminxx1/4,s.t.y-Dx22≤ε,(10)x^L1/4=argminx1n∑i=1nYi-Dix2+λ∑i=1pxi1/4.


### 2.4. Classification Criterion

This paper introduces the minimum residual method and the sum of weight coefficients method and puts forward a comprehensive classification method.


#### 2.4.1. Minimum Residual Method

x
^ is the projection coefficient of category i from y to the dictionary D. When y belongs to category i, y is approximated as y^i=Dx^. The smaller the distance between y^i and y is (i.e., the residual), the greater the likelihood belongs to category i, as shown in(11)riy=mini⁡y-Dx^2.The category of the test samples is determined by the minimum residual.


#### 2.4.2. Sum of Weight Coefficients Method

The maximum item of sparse representation coefficients corresponds to the category of test samples. However, due to the noise effect, the result may lead to the deviation. By comparing the sum of weight coefficients of each class, the error can be balanced and the result is satisfactory [25].Let us suppose that the sparse representation coefficients arex^=a11,…,a1n1,…,aC1,…,aCnCT and the coefficient of the test sample y on the j training sample of category i is aij. If the sum of weight coefficients of category i is larger than the other categories’, the test sample y belongs to category i, as shown in(12)ria=maxi⁡∑j=1niaij.


#### 2.4.3. Comprehensive Classification Method

In order to improve the accuracy of fire detection, this paper puts forward the comprehensive classification method. It determines whether the classification results through the minimum residual method and the sum of weight coefficients method are consistent. If the classification results are consistent, they are directly obtained. If not, then it uses formula (13) to obtain the relative difference of residual d1 and uses formula (14) to obtain relative difference of sum of weight coefficients d2. If d1>d2, the classification result is determined by the minimum residual method. If d2>d1, the classification result is determined by the sum of weight coefficients method, that is, to select a better classification result between the minimum residual method and the sum of weight coefficients method.(13)d1=rjy-riyrjy,where riy is the minimum residual and rjy is the second minimum residual.(14)d2=ria-rjaria,where ria is the maximum sum of weight coefficients and rja is the second maximum sum of weight coefficients.


## 2.1. Basic Theory

There may be an infinite number of solutions to the underdetermined linear equations which is described byDx=y. In order to reduce the range of selection to a satisfactory solution, it is necessary to increase condition. A function J(x) is introduced to rationally evaluate the candidate solution of x, and its value is expected to be as small as possible [19, 20], usually in the form of Lp norm, as(1)minxpp,s.t.Dx=y.Whenp≤1, sparse solution can be obtained. The typical choice J(x) is L0 norm, L1/2 norm, L1 norm, and so on. The solution of L0 norm is a nondeterministic polynomial hard problem. The key problem in solving this problem is that L0 norm is a discontinuous function and the computation is very large. The L0 norm is usually converted into an equivalent L1 norm to solve the problem, when the RIP (restricted isometry property) condition is satisfied [21].In practical applications, formula (1) is usually written in the form of formula (2) due to the existence of errors.(2)x^=argminxxp,s.t.y-Dx22≤ε.x^ is the approximate solution of x, ε is the error threshold, and y=[y1,…,yn]T is a test vector.


## 2.2. Dictionary Design

This paper designs a kind of overcomplete dictionary. Let us assume that the number of samples categories isn and each category has P training samples. It uses Di to represent the category i of the training sample data and a space which is constituted by P column vectors to represent category i test result. The data dictionary matrix consisting of m categories of training samples is D=D1D2D3⋯Dn. The number of rows in the matrix D is the number describing the sample characteristics. This paper uses three kinds of fire characteristics, that is, smoke, temperature, and CO. Specific input values are standardized values of smoke, temperature, and CO. The values are between 0 and 1. The three categories of training samples are flaming fire, smoldering fire, and interference; that is, n=3. The number of columns is the total number of three categories of training samples; that is, D=D1D2D3. Therefore, there are three categories of test samples; that is, y=[y1,y2,y3]T.


## 2.3. Sparse Coefficient Solution

This paper identifies the fire by the method for finding sparse solutions byL1 norm, L3/4 norm, L1/2 norm, and L1/4 norm, respectively. Thus, it can choose the norm type which is more suitable for fire identification [22–24].


### 2.3.1.L1 Norm Solution

The sparse solution is obtained byL1 norm, as shown in formula (3) or (4).(3)x^L1=argminxx1,s.t.y-Dx22≤ε,(4)x^L1=argminx1n∑i=1nYi-Dix2+λ∑i=1pxi.Y
i  represents the category i of the test sample data; λ is the regularization parameter. p is the number of samples of each category. In the later application, p=20. xi is the ith sample data of each category.


### 2.3.2.L3/4 Norm Solution

The sparse solution is obtained byL3/4 norm, as shown in formula (5) or (6).(5)x^L3/4=argminxx3/4,s.t.y-Dx22≤ε,(6)x^L3/4=argminx1n∑i=1nYi-Dix2+λ∑i=1pxi3/4.


### 2.3.3.L1/2 Norm Solution

The sparse solution is obtained byL1/2 norm, as shown in formula (7) or (8).(7)x^L1/2=argminxx1/2,s.t.y-Dx22≤ε,(8)x^L1/2=argminx1n∑i=1nYi-Dix2+λ∑i=1pxi1/2.


### 2.3.4.L1/4 Norm Solution

The sparse solution is obtained byL1/4 norm, as shown in formula (9) or (10).(9)x^L1/4=argminxx1/4,s.t.y-Dx22≤ε,(10)x^L1/4=argminx1n∑i=1nYi-Dix2+λ∑i=1pxi1/4.


## 2.3.1.L1 Norm Solution

The sparse solution is obtained byL1 norm, as shown in formula (3) or (4).(3)x^L1=argminxx1,s.t.y-Dx22≤ε,(4)x^L1=argminx1n∑i=1nYi-Dix2+λ∑i=1pxi.Y
i  represents the category i of the test sample data; λ is the regularization parameter. p is the number of samples of each category. In the later application, p=20. xi is the ith sample data of each category.


## 2.3.2.L3/4 Norm Solution

The sparse solution is obtained byL3/4 norm, as shown in formula (5) or (6).(5)x^L3/4=argminxx3/4,s.t.y-Dx22≤ε,(6)x^L3/4=argminx1n∑i=1nYi-Dix2+λ∑i=1pxi3/4.


## 2.3.3.L1/2 Norm Solution

The sparse solution is obtained byL1/2 norm, as shown in formula (7) or (8).(7)x^L1/2=argminxx1/2,s.t.y-Dx22≤ε,(8)x^L1/2=argminx1n∑i=1nYi-Dix2+λ∑i=1pxi1/2.


## 2.3.4.L1/4 Norm Solution

The sparse solution is obtained byL1/4 norm, as shown in formula (9) or (10).(9)x^L1/4=argminxx1/4,s.t.y-Dx22≤ε,(10)x^L1/4=argminx1n∑i=1nYi-Dix2+λ∑i=1pxi1/4.


## 2.4. Classification Criterion

This paper introduces the minimum residual method and the sum of weight coefficients method and puts forward a comprehensive classification method.


### 2.4.1. Minimum Residual Method

x
^ is the projection coefficient of category i from y to the dictionary D. When y belongs to category i, y is approximated as y^i=Dx^. The smaller the distance between y^i and y is (i.e., the residual), the greater the likelihood belongs to category i, as shown in(11)riy=mini⁡y-Dx^2.The category of the test samples is determined by the minimum residual.


### 2.4.2. Sum of Weight Coefficients Method

The maximum item of sparse representation coefficients corresponds to the category of test samples. However, due to the noise effect, the result may lead to the deviation. By comparing the sum of weight coefficients of each class, the error can be balanced and the result is satisfactory [25].Let us suppose that the sparse representation coefficients arex^=a11,…,a1n1,…,aC1,…,aCnCT and the coefficient of the test sample y on the j training sample of category i is aij. If the sum of weight coefficients of category i is larger than the other categories’, the test sample y belongs to category i, as shown in(12)ria=maxi⁡∑j=1niaij.


### 2.4.3. Comprehensive Classification Method

In order to improve the accuracy of fire detection, this paper puts forward the comprehensive classification method. It determines whether the classification results through the minimum residual method and the sum of weight coefficients method are consistent. If the classification results are consistent, they are directly obtained. If not, then it uses formula (13) to obtain the relative difference of residual d1 and uses formula (14) to obtain relative difference of sum of weight coefficients d2. If d1>d2, the classification result is determined by the minimum residual method. If d2>d1, the classification result is determined by the sum of weight coefficients method, that is, to select a better classification result between the minimum residual method and the sum of weight coefficients method.(13)d1=rjy-riyrjy,where riy is the minimum residual and rjy is the second minimum residual.(14)d2=ria-rjaria,where ria is the maximum sum of weight coefficients and rja is the second maximum sum of weight coefficients.


## 2.4.1. Minimum Residual Method

x
^ is the projection coefficient of category i from y to the dictionary D. When y belongs to category i, y is approximated as y^i=Dx^. The smaller the distance between y^i and y is (i.e., the residual), the greater the likelihood belongs to category i, as shown in(11)riy=mini⁡y-Dx^2.The category of the test samples is determined by the minimum residual.


## 2.4.2. Sum of Weight Coefficients Method

The maximum item of sparse representation coefficients corresponds to the category of test samples. However, due to the noise effect, the result may lead to the deviation. By comparing the sum of weight coefficients of each class, the error can be balanced and the result is satisfactory [25].Let us suppose that the sparse representation coefficients arex^=a11,…,a1n1,…,aC1,…,aCnCT and the coefficient of the test sample y on the j training sample of category i is aij. If the sum of weight coefficients of category i is larger than the other categories’, the test sample y belongs to category i, as shown in(12)ria=maxi⁡∑j=1niaij.


## 2.4.3. Comprehensive Classification Method

In order to improve the accuracy of fire detection, this paper puts forward the comprehensive classification method. It determines whether the classification results through the minimum residual method and the sum of weight coefficients method are consistent. If the classification results are consistent, they are directly obtained. If not, then it uses formula (13) to obtain the relative difference of residual d1 and uses formula (14) to obtain relative difference of sum of weight coefficients d2. If d1>d2, the classification result is determined by the minimum residual method. If d2>d1, the classification result is determined by the sum of weight coefficients method, that is, to select a better classification result between the minimum residual method and the sum of weight coefficients method.(13)d1=rjy-riyrjy,where riy is the minimum residual and rjy is the second minimum residual.(14)d2=ria-rjaria,where ria is the maximum sum of weight coefficients and rja is the second maximum sum of weight coefficients.


## 3. Application of Fire Detection

### 3.1. Training Sample

The values of smoke, temperature, and CO which are normalized in three cases of flaming fire, smoldering fire, and interference are used as samples [26, 27]. The number of training samples for each category is 20. The characteristic vectors are arranged to form the following training sample matrix:(15)D=f11⋯f201f12⋯f202f13⋯f203=D1D2D3.In formula (15), fji is the eigenvector of j training sample of category i, D1 represents the training sample matrix of flaming fire, D2 represents the training sample matrix of smoldering fire, D3 represents the training sample matrix of interference, and Matrix D has three kinds of characteristic data dictionary and its size is 3∗60.


### 3.2. Fire Detection Based onLp Norm Solution

Sparse solution which is based on fire samples dictionary is obtained by using theL1 norm, L3/4 norm, L1/2 norm, and L1/4 norm. The minimum residual method, the sum of weight coefficients method, and the comprehensive classification method are used to identify the fire.


#### 3.2.1. Solution and Classification

In Figure1, the test sample data comes from flaming fire data y=[0.92;0.06;0.571]. The type number of flaming fire, smoldering fire, and interference of training samples is 0~20, 21~40, and 41~60, respectively. The horizontal axis represents the training sample number of three fire categories. The vertical axis represents projection coefficient x from y to the training sample. We can see that the projection coefficient is the largest where y belongs to the category of flaming fire, no matter what kind of norm is used. The correct classification results can be obtained by the minimum residual method, the sum of weight coefficients method, and the comprehensive classification method according to formulas (11), (12), (13), and (14). Among them, sparse solution can be obtained by L1 norm and L3/4 norm.Figure 1
Sparse coefficients (flaming fire).
(a)
L
1 norm
(b)
L
3
/
4 norm
(c)
L
1
/
2 norm
(d)
L
1
/
4 normIn Figure2, the test sample data comes from smoldering fire data y=[0.3692;0.6868;0.4609]. We can see that the projection coefficient is the largest where y belongs to the category of smoldering fire through L1 norm and L3/4 norm. The correct classification results can be obtained by the minimum residual method, the sum of weight coefficients method, and the comprehensive classification method.Figure 2
Sparse coefficients (smoldering fire).
(a)
L
1 norm
(b)
L
3
/
4 norm
(c)
L
1
/
2 norm
(d)
L
1
/
4 normBut the projection coefficient is the largest wherey belongs to the category of interference through L1/2 norm and L1/4 norm and it is an error. The classification result obtained by the minimum residual method is interference and the judgment is wrong. The classification result obtained by the sum of weight coefficients method and comprehensive classification method is smoldering fire and the classification result is right.In Figure3, the test sample data comes from interference data; y=[0.4615;0.3585;0.2609]. We can see that the projection coefficient is the largest where y belongs to the category of interference, no matter what kind of norm is used. The correct classification results can be obtained by the minimum residual method, the sum of weight coefficients method, and the comprehensive classification method. Among them, sparse solution can be obtained by L1 norm, L3/4 norm, and L1/2 norm. The effect is best by L3/4 norm.Figure 3
Sparse coefficients (interference).
(a)
L
1 norm
(b)
L
3
/
4 norm
(c)
L
1
/
2 norm
(d)
L
1
/
4 norm


### 3.3. Fire Detection Results

This paper selects 20 groups of data of every fire type; that is, test samples have 60 groups of data in total. The correct group number and correct rate of fire recognition by using different types of norm and classification are shown in Table1. The comprehensive classification method which is based on the L3/4 norm has the highest accuracy. The classification results which are obtained by the minimum residual method, the sum of weight coefficients method, and the comprehensive classification method of the L1 norm are consistent. The classification effect is the worst by L1/4 norm. As for the classification method, the comprehensive classification method is the best and the sum of weight coefficients method takes second place.Table 1
Recognition rate.
Classification method
L
1 norm
L
3
/
4 norm
L
1
/
2 norm
L
1
/
4 norm
Minimum residual method
59, 98.33%
57, 95%
43, 71.67%
34, 56.67%
Sum of weight coefficients method
59, 98.33%
59, 98.33%
48, 80%
39, 65%
Comprehensive classification method
59, 98.33%
60, 100%
49, 81.67%
41, 68.33%


## 3.1. Training Sample

The values of smoke, temperature, and CO which are normalized in three cases of flaming fire, smoldering fire, and interference are used as samples [26, 27]. The number of training samples for each category is 20. The characteristic vectors are arranged to form the following training sample matrix:(15)D=f11⋯f201f12⋯f202f13⋯f203=D1D2D3.In formula (15), fji is the eigenvector of j training sample of category i, D1 represents the training sample matrix of flaming fire, D2 represents the training sample matrix of smoldering fire, D3 represents the training sample matrix of interference, and Matrix D has three kinds of characteristic data dictionary and its size is 3∗60.


## 3.2. Fire Detection Based onLp Norm Solution

Sparse solution which is based on fire samples dictionary is obtained by using theL1 norm, L3/4 norm, L1/2 norm, and L1/4 norm. The minimum residual method, the sum of weight coefficients method, and the comprehensive classification method are used to identify the fire.


### 3.2.1. Solution and Classification

In Figure1, the test sample data comes from flaming fire data y=[0.92;0.06;0.571]. The type number of flaming fire, smoldering fire, and interference of training samples is 0~20, 21~40, and 41~60, respectively. The horizontal axis represents the training sample number of three fire categories. The vertical axis represents projection coefficient x from y to the training sample. We can see that the projection coefficient is the largest where y belongs to the category of flaming fire, no matter what kind of norm is used. The correct classification results can be obtained by the minimum residual method, the sum of weight coefficients method, and the comprehensive classification method according to formulas (11), (12), (13), and (14). Among them, sparse solution can be obtained by L1 norm and L3/4 norm.Figure 1
Sparse coefficients (flaming fire).
(a)
L
1 norm
(b)
L
3
/
4 norm
(c)
L
1
/
2 norm
(d)
L
1
/
4 normIn Figure2, the test sample data comes from smoldering fire data y=[0.3692;0.6868;0.4609]. We can see that the projection coefficient is the largest where y belongs to the category of smoldering fire through L1 norm and L3/4 norm. The correct classification results can be obtained by the minimum residual method, the sum of weight coefficients method, and the comprehensive classification method.Figure 2
Sparse coefficients (smoldering fire).
(a)
L
1 norm
(b)
L
3
/
4 norm
(c)
L
1
/
2 norm
(d)
L
1
/
4 normBut the projection coefficient is the largest wherey belongs to the category of interference through L1/2 norm and L1/4 norm and it is an error. The classification result obtained by the minimum residual method is interference and the judgment is wrong. The classification result obtained by the sum of weight coefficients method and comprehensive classification method is smoldering fire and the classification result is right.In Figure3, the test sample data comes from interference data; y=[0.4615;0.3585;0.2609]. We can see that the projection coefficient is the largest where y belongs to the category of interference, no matter what kind of norm is used. The correct classification results can be obtained by the minimum residual method, the sum of weight coefficients method, and the comprehensive classification method. Among them, sparse solution can be obtained by L1 norm, L3/4 norm, and L1/2 norm. The effect is best by L3/4 norm.Figure 3
Sparse coefficients (interference).
(a)
L
1 norm
(b)
L
3
/
4 norm
(c)
L
1
/
2 norm
(d)
L
1
/
4 norm


## 3.2.1. Solution and Classification

In Figure1, the test sample data comes from flaming fire data y=[0.92;0.06;0.571]. The type number of flaming fire, smoldering fire, and interference of training samples is 0~20, 21~40, and 41~60, respectively. The horizontal axis represents the training sample number of three fire categories. The vertical axis represents projection coefficient x from y to the training sample. We can see that the projection coefficient is the largest where y belongs to the category of flaming fire, no matter what kind of norm is used. The correct classification results can be obtained by the minimum residual method, the sum of weight coefficients method, and the comprehensive classification method according to formulas (11), (12), (13), and (14). Among them, sparse solution can be obtained by L1 norm and L3/4 norm.Figure 1
Sparse coefficients (flaming fire).
(a)
L
1 norm
(b)
L
3
/
4 norm
(c)
L
1
/
2 norm
(d)
L
1
/
4 normIn Figure2, the test sample data comes from smoldering fire data y=[0.3692;0.6868;0.4609]. We can see that the projection coefficient is the largest where y belongs to the category of smoldering fire through L1 norm and L3/4 norm. The correct classification results can be obtained by the minimum residual method, the sum of weight coefficients method, and the comprehensive classification method.Figure 2
Sparse coefficients (smoldering fire).
(a)
L
1 norm
(b)
L
3
/
4 norm
(c)
L
1
/
2 norm
(d)
L
1
/
4 normBut the projection coefficient is the largest wherey belongs to the category of interference through L1/2 norm and L1/4 norm and it is an error. The classification result obtained by the minimum residual method is interference and the judgment is wrong. The classification result obtained by the sum of weight coefficients method and comprehensive classification method is smoldering fire and the classification result is right.In Figure3, the test sample data comes from interference data; y=[0.4615;0.3585;0.2609]. We can see that the projection coefficient is the largest where y belongs to the category of interference, no matter what kind of norm is used. The correct classification results can be obtained by the minimum residual method, the sum of weight coefficients method, and the comprehensive classification method. Among them, sparse solution can be obtained by L1 norm, L3/4 norm, and L1/2 norm. The effect is best by L3/4 norm.Figure 3
Sparse coefficients (interference).
(a)
L
1 norm
(b)
L
3
/
4 norm
(c)
L
1
/
2 norm
(d)
L
1
/
4 norm


## 3.3. Fire Detection Results

This paper selects 20 groups of data of every fire type; that is, test samples have 60 groups of data in total. The correct group number and correct rate of fire recognition by using different types of norm and classification are shown in Table1. The comprehensive classification method which is based on the L3/4 norm has the highest accuracy. The classification results which are obtained by the minimum residual method, the sum of weight coefficients method, and the comprehensive classification method of the L1 norm are consistent. The classification effect is the worst by L1/4 norm. As for the classification method, the comprehensive classification method is the best and the sum of weight coefficients method takes second place.Table 1
Recognition rate.
Classification method
L
1 norm
L
3
/
4 norm
L
1
/
2 norm
L
1
/
4 norm
Minimum residual method
59, 98.33%
57, 95%
43, 71.67%
34, 56.67%
Sum of weight coefficients method
59, 98.33%
59, 98.33%
48, 80%
39, 65%
Comprehensive classification method
59, 98.33%
60, 100%
49, 81.67%
41, 68.33%


## 4. Hardware Design

This paper uses DSP TMS320F28022 as the core chip, TC72 as the temperature sensor, MQ-7 as the CO gas sensor, and MQ-9 as the smoke sensor to design the hardware. It uses Proteus software to draw the principle diagram, as shown in Figure4.Figure 4
Hardware principle diagram of fire detection system.


## 5. Software Implementation

This paper uses the comprehensive classification method which is based on theL3/4 norm to identify fire. Code Composer Studio (CCS) is an integrated development environment of DSP and it is used to input program. After debugging, the program is loaded into the Proteus hardware circuit for the hardware and software joint simulation. It displays “dangerous” when flaming fire occurs, as shown in Figure 5. It displays “caution” when smoldering fire occurs, as shown in Figure 6. It displays “system operation normal” when interference occurs, as shown in Figure 7.Figure 5
Virtual terminal display of flaming fire.Figure 6
Virtual terminal display of smoldering fire.Figure 7
Virtual terminal display of interference.


## 6. Conclusions

In this paper, the fire detection algorithm model which is based on sparse representation is built for improving fire detection system performance. The hardware and software of fire detection system are designed and the joint simulation is carried out. The following conclusions are obtained.(
1
) The L1 norm and L3/4 norm are used to obtain the solution of the equation with remarkable sparsity and high accuracy, when it is applied to overcomplete dictionary of fire detection sample. The sparsity of solution which is obtained by L1/2 norm and L1/4 norm is weak and the accuracy is not high.(
2
) As for the classification method, the comprehensive classification method is the best and the sum of weight coefficients method takes second place.(
3
) The comprehensive classification method which is based on the L3/4 norm has the highest accuracy and it is suitable for fire detection.(
4
) The fire detection algorithm which is based on sparse representation is simple and feasible. It is suitable for fire detection system and can obtain accurate detection results.



---

*Source: 6784764-2017-12-11.xml*