1. Introduction
An electronic nose (E-nose) is a device composed of a gas sensor array and an artificial intelligence algorithm. It is effective in dealing with odor analysis problems [
1,
2,
3], and during the past decades, much work has been done to prove the efficiency of E-nose technology in many fields such as environmental monitoring [
4,
5], food engineering [
6,
7,
8], disease diagnosis [
9,
10,
11,
12], explosives detection [
13,
14,
15] and spaceflight applications [
16]. This paper is mainly about E-nose research in indoor pollutant gas detection.
With the modern improvement of life quality, people demand higher indoor air quality. Because most of the time during a person’s life is spent indoors, it is necessary for people’s health to be able to detect indoor pollutant gases, which mainly dfff4 include benzene (C
6H
6), toluene (C
7H
8), and so on. They are hard to detect, and will do the body harm after long-term intake, so a high recognition rate of gas detection equipment is vital. Consequently, there has been a resurgence of interest in developing measuring techniques for air quality monitoring. Our previous work has proved that E-noses are an effective way to classify indoor pollutant gases [
17,
18].
When an E-nose is applied to detect an indoor pollutant gas, in addition to some factors like the quality of samples, the parameter settings of the algorithm system also plays a significant role in the performance of the E-nose. In this paper, we employ support vector machine (SVM) to distinguish indoor pollutant gases and two of its parameters need to be optimized for this purpose. To make the performance of E-nose ideal, some optimization algorithms need be employed to set the value of its parameters.
Genetic algorithm (GA) is a robust and frequently-used stochastic meta-heuristic search method for global optimization in a large search space. The genetic information is encoded as a genome. The genome is implemented in an uncommon way that permits asexual reproduction which leads to offspring that are genetically the same as the parent. Meanwhile asexual reproduction can exchange and reorder chromosomes, giving birth to offspring containing a hybridization of genetic information from all parents. This operation is frequently called crossover because of the chromosomes’ crossover when swapping genetic information. To evade premature convergence, mutation emerges to increase the diversity of the population. Particle swarm optimization (PSO) is an evolutionary computation algorithm based on swarm intelligence theory. The algorithm comes from the simulation of the bird predation behavior, and its emphases lie in the cooperation and competition between individuals. Quantum-behaved particle swarm optimization (QPSO) is a new PSO algorithm and is inspired by the consideration of quantum mechanics with the PSO algorithms. It is superior to the traditional PSO algorithm not only in search ability, but also in its accuracy. Particles of this model based on a delta potential well can appear in any point of search space with a certain probability.
According to the research on optimization algorithms during the past twenty years, there are some optimization methods which have been introduced to E-nose research. They mainly include GA [
19,
20,
21], PSO [
22,
23] and QPSO [
24,
25]. A new integer-based GA approach [
19] was used to enhance the performance of E-noses by sensor selection. The PSO [
22] was posed to analyze signals of wound infection detection based on an E-nose. A new feature selection method based on QPSO was proposed to optimize the gas sensor array and reduce the dimensions of the feature matrix [
24]. Furthermore, an enhanced QPSO based on genetic algorithm (G-QPSO) [
25] was employed to improve the performance of the sensor array and the E-nose classifier. However, up to now, we haven’t seen anyone apply the krill algorithm (KH) to E-noses. Considering the good performance of KH in global optimization, we propose to apply it to the E-nose in indoor pollutant gas classification.
The KH [
26] algorithm was first proposed by Gandomi and Alavi in 2012. It has excellent local exploitation ability, while its global exploring ability is not strong, so it easily falls into local minima and has a slow convergence speed. To solve this issue, Wang et al. presented a new krill migration (KM) operator [
27] which updated the krill to deal with optimization problems more efficiently. In [
28] harmony search (HS) is applied to mutate between krill during the process of krill updating instead of using physical diffusion to improve the convergence speed of the algorithm and the ability to jump out of local extreme. In 2014, an improved KH [
29] was proposed with linear decreasing Ct which can adjust the balance between exploration and exploitation. To overcome the poor exploitation of the KH algorithm, Wang et al. presented a hybrid differential evolution KH (DEKH) [
30] method for function optimization. The IKH [
31] method using a new Lévy flight distribution and elitism scheme to update the KH motion calculation was proposed by Guo et al.
In this paper, a new algorithm approach for air quality detection with an E-nose is presented. For an E-nose, the algorithm parameter setting plays an important role in practical application performance. So far, most of the E-noses are optimized by PSO, QPSO and GA. In order to make a further contribution to E-nose research and explore different optimization algorithms in the application of E-noses, we decide to adopt the KH as the optimization method of an E-nose and apply it to detect indoor harmful gaseous pollution. For the better performance of the E-nose, based on KH with an updated crossover operator [
32] (defined as the standard KH in the paper), we propose a novel way of computing the decision weighting factor for KH to guarantee the krill are diversiform at the early stage of iterations, and have good local searching ability performance at the later stage of iteration. The added decision weighting factor updates the krill’s position according to the influence of other individuals and their foraging behavior under different iterations. The proposed EKH method is verified via the data obtained by our self-made E-nose.
The rest of the paper is structured as follows: materials and experiments are described clearly in
Section 2. An overview of the standard KH algorithm and the proposed EKH are discussed in
Section 3. Our method is compared with other optimization techniques (including CKH, KH, QPSO, PSO and GA) and the classification results presented, analyzed and compared in
Section 4. Finally, the conclusions of this paper are drawn in
Section 5.
4. Results and Discussion
To evaluate the effectiveness of the optimization algorithm we analyze the discrimination of four different gases with our self-made E-nose. We compare EKH with QPSO, PSO and GA which have been frequently used in E-noses. We also compare EKH with the standard KH and the chaotic KH (CKH) [
33]. In CKH, various one-dimensional chaotic maps are employed in place of the parameters used in the KH to accelerate the convergence speed of it. According to the results of [
33], we choose Singer map as the proper chaotic map to form the best CKH. It is shown in Equation (8).
The parameter setting in all experiments for each algorithm is shown in
Table 4.
The flow of data processing is as follows: firstly, a normalization processing is performed. Then the SVM [
34,
35] is employed as the classifier. Its two parameters are optimized by the six considered optimization algorithms. The flow diagram of the experiment is shown in
Figure 5. All of the optimization algorithms to optimize parameters of SVM are mainly based on the training data set. Finally SVM will distinguish the class label of each sample in test data set with the knowledge it has learned, and the ratio (the number of points distinguished directly to the number of all points in test data) will be used to evaluate the performance of the different optimization algorithms.
There are two parameters need to be set in SVM (the spread factor of the Gaussian RBF kernel function and the penalty factor), so krill group search in the two-dimensional space. Each kind of particle number optimization algorithm is set to 30, and in order to compare the differences between the algorithms, we set the number of iterations, to 50, 200 and 400, respectively. To make sure the accuracy of experimental results is correct, each program was repeated 10 times. Then we take the ten times’ classification accuracy (the training data set and test data set) in maximum, minimum and average value as a reference to evaluate the performance of the six kinds of optimization algorithms.
Table 5,
Table 6 and
Table 7 show the classification accuracy of the different optimization algorithms with the number of iterations set as 50, 200 and 400. The best classification accuracy of the four kinds of gases and all the classification accuracies with different optimization algorithms are shown in
Table 8,
Table 9,
Table 10,
Table 11 and
Table 12. To make our research more persuasive, we use the 10-fold cross validation method to train and test the data and the particle number is set to 50. All the results of algorithms after using 10-fold cross validation are shown in
Table 13,
Table 14 and
Table 15. It also reachs the same conclusion that the EKH has the best performance. When the particle number is set to 50, the results with the number of iterations set as 50, 200 and 400 are shown in
Table 16,
Table 17 and
Table 18. In
Table 18, the standard deviations (SD) of each kind of algorithm after running for 100 times are shown to evaluate the performance of the algorithm more precisely.
EKH and CKH are both the enhanced optimization algorithms based on the KH. and comparing the results of EKH, CKH and KH from
Table 5,
Table 6 and
Table 7, we can find that the best results are obtained by EKH. In the case of a higher number of iterations, the CKH performs a little better than KH, however, when it comes to the maximum, minimum or the average value of classification accuracy, the EKH significantly outperforms CKH and KH. This verifies that the EKH we proposed is more appropriate than CKH in the application of E-noses in gas identification. What’s more, it’s easy to see whatever the number of iterations given, the worst classification accuracy of EKH is higher than the best classification accuracy of CKH and KH. The results when the number of iterations is 200 and 400 are very close. All of these results prove that the global searching and convergence of EKH has been improved with the influence of the novel way of computing the decision weighting factor.
Comparing the EKH with different algorithms (QPSO, PSO and GA), it can be found from
Table 5,
Table 6 and
Table 7 that GA has the worst performance, while PSO and QPSO are better. In terms of the truth that the EKH has the highest classification accuracy in the same iterations, relative to the three other algorithms, once again it proves that the krill algorithm can be applied well in E-noses.
Table 8,
Table 9,
Table 10 and
Table 11, respectively, show the classification accuracy of four kinds of gases being measured under the condition that total classification accuracy is best. We can also draw a conclusion from the data that C
6H
6 is harder to distinguish compared with other gases. For EKH, except for the fact the recognition rate of C
6H
6 of the test set is a bit low, the other results are very reasonable, not only in terms of itself but also with other algorithms. According to the results in
Table 18, we can know that the SD of EKH is the smallest. It suggests that the EKH result is more stable. That is to say, the EKH is better in average performance than KH and other algorithms. In
Figure 6 and
Figure 7, through the colorful bar chart, we can clearly see the classification results of training set and test set based with different optimization algorithms and the discrepancies between each other.
5. Conclusions
There is no doubt that E-noses play an important role in the field of environmental monitoring and control of pollution emissions. In this experiment an E-nose is applied to distinguish four kinds of indoor pollutant gases. We all know that an E-nose device which has a high recognition rate for pollutant gases is significant to the improvement of the quality of people’s indoor life, so we have undertaken further research on the E-nose algorithm to improve its gas recognition rate.
An E-nose mainly consists of an array of sensors and an appropriate pattern-recognition system. The pattern-recognition system has a significant effect in helping E-noses make a correct decision via the algorithm. Furthermore, the value of parameters determines the performance of the pattern recognition system, so some algorithms must be employed to select the appropriate parameters. KH is a new optimization algorithm put forward in recent years, that has not been applied yet to the E-nose technology, so we have creatively applied the krill algorithm to the classification problem of E-noses for indoor pollutant gases. Considering the practical application we propose an EKH based on a novel way of computing the decision weighting factor.
The KH technique has a good performance in exploitation, but it cannot always converge rapidly to find the global optimum. In this paper, we present an effective EKH algorithm based on a novel way of computing decision weighting factors and apply it to optimize the parameters of our self-made E-nose which is employed to distinguish different indoor pollutant gases. Through comparing EKH with other optimization methods, we find that the performance of EKH is better than KH, CKH, QPSO, PSO and GA. We can draw the conclusion according to the results that EKH is an ideal optimization method for E-noses in distinguishing indoor pollutant gases. Of course, we will continue to further study the krill algorithm in the future, and we believe the performance of E-nose will be further improved.