Real-Time Gas Identification by Analyzing the Transient Response of Capillary-Attached Conductive Gas Sensor

In this study, the ability of the Capillary-attached conductive gas sensor (CGS) in real-time gas identification was investigated. The structure of the prototype fabricated CGS is presented. Portions were selected from the beginning of the CGS transient response including the first 11 samples to the first 100 samples. Different feature extraction and classification methods were applied on the selected portions. Validation of methods was evaluated to study the ability of an early portion of the CGS transient response in target gas (TG) identification. Experimental results proved that applying extracted features from an early part of the CGS transient response along with a classifier can distinguish short-chain alcohols from each other perfectly. Decreasing time of exposition in the interaction between target gas and sensing element improved the reliability of the sensor. Classification rate was also improved and time of identification was decreased. Moreover, the results indicated the optimum interval of the early transient response of the CGS for selecting portions to achieve the best classification rates.


Introduction
Among different types of chemical gas sensors, metal oxide semiconductor (MOS) gas sensors are widely available and used in fabrication of gas monitoring and artificial olfactory systems [1,2]. As with other chemical gas sensors, the MOS group generally generates the output response based on trace of target gas (TG) in reaction to their sensing element, which, in turn, generates the output in terms of electrical conductivity variation. This trace generally depends on nature and concentration of the TG in a complicated way, which makes fabrication of a simple selective gas sensor difficult [3][4][5]. Most of the reported efforts to fabricate a selective MOS gas sensor have generally focused on material modification and optimization. Applying a catalyst on the effective surface of MOS [6][7][8][9][10], additive material [11][12][13][14][15][16][17][18][19], or a combination of these methods [20] can affect the sensitivity and partially optimize the selectivity of the sensor. Variation of thickness of sensitive film can also enhance partial selectivity of sensors [21,22].
Besides mentioned studies on MOS gas sensors, so many other researches on different types of chemical gas sensors have been reported to achieve a perfect selective gas sensor. A major achievement of those efforts was to improve sensitivity and partial selectivity of chemical gas sensors. Fabrication of a single selective gas sensor, for use in a wide range of applications and detecting different TGs, is still difficult and most of the prototype products have been applied for hazard detection or monitoring level of contaminations.
Since sensitivity of MOS gas sensor to particular TG is directly related to the operating temperature of the sensor [23], modulated-temperature methods along with some analyzing approaches have also been applied to enhance the selectivity. Studies on a single gas sensor with temperature modulation have indicated the value of this selectivity even in complex gas mixtures [24][25][26][27][28][29][30]. Employing an array of chemical gas sensors with improved sensitivity and partial selectivity, such as above presented MOS gas sensors, in electronic nose (e-nose) technology has solved the selectivity problem in different applications. However, these methods (temperature modulation and e-nose) make the classification algorithm more complicated and some common problems occur similar to other methods.
These gas monitoring and identification systems have generally applied steady state response of chemical gas sensors, which results in long time exposition. Long time exposition of a sensor in the presence of a target gas can cause irreversible interactions between the TG molecules and the surface of sensing element. Therefore, recovery time can be increased, baseline value varies in time, repeatability and reliability of sensor are reduced, as are some effects present in the output of sensor such as drift [2]. Decreasing sensitivity of the sensor and increasing difficulties of classification methods can be mentioned as other effects. These problems may be accrued in either a single sensor or an array of sensors. An electronic nose system is also more complicated and costly than a single gas sensor which can be more suitable to employ in some simple processes. In other investigations, application of transient response for enhancing recognition abilities of the electronic nose have been presented [30][31][32]. Presented results have indicated improved classification. Although the transient response of gas sensors has been applied in these approaches, response of sensors has been recorded up to steady state level and long time exposition problems have remained unsolved. The complicacy of classification algorithms has also increased in mentioned studies. Some other investigations have been carried out to minimize exposure of the sensor to the TG molecules and to assist extraction of original attributes of signal by keeping the sensor abilities. Researchers have attempted to focus more attention on the transient part of the sensor array output to capture effective features from this portion. Faster signal acquisition and slower aging process of sensors are other advantages of this method. This method has presented improved classification rates by applying part of transient response along with multilevel signal decomposition [33,34].
All above reviewed methods have investigated the improvement of the selectivity based on enhancement of sensor technology or signal processing techniques, but the trace of TG on sensing element of the gas sensor has been the only factor applied to generate output features. Some other approaches have employed new sensor structures that not only use the above mentioned factor, but also increase the selectivity by applying other identifying factors.
The analysis and useful gas sensing properties of a novel single gas sensor structure which was called capillary-attached gas sensor (CGS) have recently been investigated. Definition of transient response in the CGS is the physical process of a TG diffusion through a capillary tube [35]. Quantitative evaluations have stated that transient response of the CGS is robust against aging and environmental poisoning. Independence of the CGS normalized transient response to gas concentration has also been indicated analytically. It has also been stated that the information regarding the nature of a TG can easily be extracted from the corresponding transient response of the CGS and any specifically defined point on the transient responses can be applied to compare and detect different gases along with temporal analysis [35][36][37]. However, all previous studies on the CGS have also been investigated by temporal analysis of the normalized response of the CGS generated after recording the response of the CGS to different TGs up to steady state level. According to the CGS structure, transient time is longer than a simple MOS gas sensor which can intensify the long time exposition effects.
CGS transient response contains valuable detecting data related to diffusion of TGs. Therefore, the aim of this study is the assessment of real-time gas identification by applying selected portion from the beginning of the CGS transient response to achieve optimum classification and decrease the time of exposition as much as possible. Different selected portions of the CGS transient response are analyzed including the first 11 samples to the first 100 samples in order to study the effects of portion length and find the optimum length for portion selection. This approach not only decreases the time of exposition but also applies the diffusion parameter of a TG as an extra factor for identification. These advantages can result in improved sensor reproducibility by decreasing the interaction time of a TG and sensing element and decelerating the aging process. Therefore, high classification performance can be obtained by applying a simple classifier.
In this paper, results of the experimental work on detecting short-chain alcohols by a prototype CGS are reported. Diverse features were extracted from certain portions of the CGS transient responses. Principal component analysis (PCA) and linear discriminant analysis (LDA) were employed to extract features, as the most applied method for dimension reduction in the machine olfaction [38]. Quadratic classifier, multi layer perceptron (MLP) artificial neural network, k-nearest neighbors (k-NN), and support vector machine (SVM) classification methods are applied to complete the identification process. Finally, K-fold cross validation is used to evaluate classification results.

CGS Prototype Structure
The schematic diagram of the fabricated prototype CGS is shown in Figure 1. The device included a MOS conductive gas sensor as a chemical gas sensor and a glass tube. The tube was attached to the sensor in an airtight manner; therefore, diffusion through the effective length of the tube (L in Figure 1a) was the only path for a TG to affect the gas sensor. In the prior experimental work, commercially resistive gas sensors and quartz tubes with internal diameters larger than 7mm had been employed to fabricate a CGS prototype [35]. In the present work, a tin oxide gas sensor for general purposes and pure-air-filled quartz tube were used to fabricate the sensor. Schematic diagram of tin oxide gas sensor is presented in Figure 1b. Sensor structure included thick film layer of tin oxide on one side of an Alumina substrate and a Ruthenium oxide heater fabricated on the other side of the substrate. A quartz tube of 3 mm diameter and 55 mm length was selected to fabricate the CGS with optimum dimensions. These dimensions were selected to optimized selectivity, response time and recovery time. Longer length and smaller diameter increase the selectivity but make the response time and recovery time longer. The negative effects of dimension on recovery time are more than the response time, such as the long-time recovery period in smaller diameters and longer lengths. Therefore, effects of long time exposition are increased. Sensitivity to low concentrations is also decreased by decreasing tube diameter [39].
For a simple MOS gas sensor, the output is the variation of sensing material conductivity in the presence of a TG (∆G) and it is described as below [40,41]: Where, C is the concentration of a TG and S and m are parameters related to characteristics of a sensor and nature of a TG. In the CGS structure, it is assumed that gas is equilibrated in the environment before measurement. A TG has to diffuse along the effective length of the diffusion tube (L in Figure 1a) before reaction with MOS gas sensor. This means concentration changes in time. Then, Equation (1) will be changed to the following format: Where C(t) is the concentration of a TG in the time t after beginning of diffusion at the close end of the CGS where the MOS sensor is located. The relation of C(t) to length and diffusion has been described previously, and it has been implied that TG with the higher diffusion coefficient generates the faster response [35].

Measurement System
Static method is used in the measurement processes, where volatiles have to be equilibrated in a sealed chamber before starting the measurement [32]. The schematic diagram of the measurement system which was applied in recording of the CGS responses is presented in Figure 2. The gas chamber had a volume of 20 liters and was made of glass. Prototype CGS was kept at operating conditions in clean air for at least 10 minutes before each measurement. Since interfering environment parameters such as temperature and relative humidity affect reproducibility of MOS gas sensor, humidity and temperature of the chamber were monitored continuously and kept at a constant level to eliminate interfering environmental factors and increase the reliability of the measurement system over time. CGS was attached to the gate of the chamber horizontally to eliminate gravity effects [35]. For each experiment, the automatic impermeable gate located at the open-end part of the prototype CGS was opened to the gas chamber at t = 0 and recording of the response was started synchronously.
According to properties of the applied MOS gas sensor, a voltage divider circuit with DC power supply was applied to drive the gas sensor. Change of voltage in the constant resistor was used to measure the change of conductivity of the sensor. The output voltage was transferred to PC by a data acquisition system to calculate the variation of sensor conductivity (G s (k)). Sampling time was selected as one second. Real-time software designed for monitoring, recording and processing data was used.
During the recovery period, remaining polluting gases were diffused out from the chamber and diffusion tube by a vacuum pump to decrease the recovery time and eliminate long time exposition effects.

Preprocessing
A flow diagram of the processing method is presented in Figure 3. Signal preprocessing must be applied to modify the sensor response and minimize the impact of disturbances, which is generated by unequal responses of sensor and variability due to environmental disturbances. Preprocessing methods can include any of these three major categories: baseline manipulation, compression, and normalization [31]. Baseline manipulation was applied to reduce the effect of sensor drift in this study. Sensor drift causes an unstable response over time with a slow and random variation of the baseline of the response generally. This manipulation based on the differential method was applied in subtracting each sampling by the initial baseline value of transient response [31,38,42]: is the initial baseline output of sensor.
is the adjusted output value of sensor. Manipulated transient response could be compressed by three different groups of methods: sub-sampling methods, parameter extraction methods and system identification methods, but according to intensive computation, sub-sampling and parameter extraction methods are generally more applied [43]. In accordance with the aim of this study, the sub-sampling method was employed and portions of raw samples of transient response after baseline manipulation were selected for assessment of classification performance based on original identification parameters of the signal. The optimum To remove the probable limitation caused by applying raw samples, the measurement system was modified and experiments were done in a controlled environment.

Odor Database
To evaluate classification performance, four short-chain alcohols (Methanol, Ethanol, 2-Propanol and 1-Butanol) were applied to generate the responses. 12 different concentrations (50, 100, 150, 200, 300, 400, 500, 600, 700, 800, 900, 1,000 ppm) were selected for each TG. The experiment was repeated 5 times in different time intervals for each concentration to assess the reproducibility of the measurement system. Transient responses of 240 experiments were applied to generate the main database of responses. Summary of odor database is presented in Table 1.

Feature Extraction and Classification
Since the aim of this research was detecting target gases based on a selected portion of the early transient response, data sets were generated including the first 11 samples to the first 100 samples extracted from each baseline manipulated transient response. Each dataset contains extracted features of 240 experiments for all odors. Finally, 90 generated data sets were evaluated to find an optimum portion for classification. The kth data set can be defined as follows: Where; k = 11, 12, 13, … 100; indicates the number of samples in the selected portion of transient response. Diverse extracted features from the steady state and transient response of the sensors have been applied in gas identification such as relative, log parameter, difference, fractional, derivative, Fourier coefficient, integration, and wavelet coefficient [42,44,45]. In this study the main features were extracted from transient responses after baseline manipulation. Gradient of selected features and fast Fourier transform (FFT) coefficients of selected data sets were also employed to compare different feature data sets in detection performance.
Feature reduction methods are widely used to eliminate the curse of dimensionality in classification and improve efficiency, classification performance and ease of interpretation and modeling [46,47]. Among different types of feature reduction methods, principal component analysis (PCA) and linear discriminant analysis (LDA) are widely used in gas identification system and machine olfaction [38,43]. PCA is a kind of signal representation method that chooses maximum variance directions to make the projection. These directions are defined by the first eigenvectors corresponding to the largest eigenvalues of the covariance matrix of input data; where covariance of input data is: LDA is a signal classification method to minimize class separability in a direct way and make samples from compact bunches and the different bunches far from each other. First eigenvectors of the multiplication result within class covariance inverse matrix and between class covariance matrices are applied to make projections. It can also define as a linear projection (W) that makes following objective function maximum [31,38,48,49]: Where; Σ B is between class covariance matrix, and Σ W is within class covariance matrix. Generally, PCA and LDA are applied widely along with different classifiers to assess the ability of the gas identification system. Extracted features by PCA are also projected to present the separability of different classes. Projections of extracted features by LDA are also applied to study the compactness of features from the same class and variance of the features from different classes [38,43]. In this study, both PCA and LDA methods were applied to extract features for all 90 data sets. Extracted features by PCA and LDA were applied for gas classification by employing different classifiers to investigate the abilities of early portions of transient response in fast gas identification.
Quadratic classifier, multi layer perceptron (MLP) classifier and k-nearest neighbor (k-NN) classifier are the most well-known methods in the area of gas classification [38,43]. SVM classifier has also been reported to have a high classification rate in gas identification [50][51][52]. The quadratic classifier is the simplest approach to approximate the largest posterior probability by assuming that for each class likelihood function is unimodal Gaussian density, and generate quadratic hyper surfaces as decision boundaries between classes [38,48]. MLP is the feed-forward neural network which includes simple processing elements or neurons, and results in complex nonlinear regression. This regression can be trained by adjusting weights of elements of the network, using a gradient descent method, which is called back propagation (BP) of errors [38,47,53]. K-NN selects the nearest k samples in the database to the unlabeled data and chooses the class with maximum members between its k-nearest selected neighbors [31,48,49]. Support vector machines (SVMs) are a kind of related supervised learning technique employed for classification. If every member of a given set of training examples belongs to one of two classes, an SVM training algorithm generates a model that predicts whether a new testing example categorized to one class or the other [50,52]. Extracted features by PCA were classified with the quadratic, MLP, k-NN, and SVM classifiers were selected as favored classifiers in this study.
A feed forward neural network was used as MLP classifier to evaluate the classification of the extracted features [47][48][49]53]. 3-7-4 layer structure (3 inputs, 7 neurons in one hidden layer and 4 outputs) was selected for neural network with the Levenberg-Marquardt (LM) optimization algorithm [42]. The number of nearest neighbors (k) for the k-NN classifier was selected by trial and error, which provided the highest classification rate. Distances were calculated based on Euclidean distance for this classifier. The presented structure in Figure 4 was applied as an extended SVM classifier in this study [54]. Finally, K-fold cross validation was used to calculate the classification rates as a well-known estimation of prediction error [38,49,55]. This method divides data set into K subsets. K-1 subsets are used as the training data set. The remaining subset is used as the testing data set. Average value across K trials of the testing data sets, indicates classification rate. Five-fold cross validation (k = 5) was used in this study to calculate the classification rates of each approach.

Result and Discussion
Two-dimensional projections of extracted features from baseline manipulated transient responses by PCA for selected portions including the first 25, 50, 75 and 100 samples of transient response are presented in Figure 5. According to presented results, extracted features by PCA indicated acceptable separability. Overlaps between classes decreased by increasing number of samples in selected portions. Then, better classification performance should be achieved.
Two-dimensional projections of extracted features by LDA including the same selected portions are shown in Figure 6. For the selected portion including 25 samples, overlap between some classes was presented, and classification performance could be affected. Other illustrated portions presented high separability between classes. Projected features also indicated high compaction within classes.
Compactness for selected portions including more than 50 samples was perfect. Presented results based on extracted features by LDA predict low error classification performance for selected portions of the transient response. According to selected feature reduction and classification methods, eight different approaches were evaluated including classification of extracted features by PCA and LDA based on four classifiers. Testing samples of each data set were projected to three dimensions by applying projection vectors, which were generated by PCA and LDA from training samples. Then, they were applied to classifiers either including data of training samples or trained by training samples.
Averages of evaluated classification rates based on extracted features by PCA and LDA from baseline manipulated transient responses have been summarized in Figure 7 and 8, respectively. Details of classification rates are also presented in Table 2. Each bar in presented figures indicates the average of evaluated classification rates for every 5 continuous selected portions of the CGS transient response. For example, the first bar presents the average of evaluated classification rates for selected portions including the first 11, 12, 13, 14 and 15 samples of recorded transient responses. Evaluated results for PCA-quadratics are presented in Figure 7a. Results indicated about 60% classification rate based on early part of the CGS transient response, especially for selected portions including the first 46 samples and above. The PCA-kNN approach presented similar results in comparison with the previous method in shape (Figure 7b), but classification rates increased about 20% for every selected portion. However, the second half of the selected portions, including more than the first 50 samples of transient responses, indicated a better classification of around 80%.   Comparing details of classification performances in four approaches implied that the least number of samples for perfect classification was presented by the quadratic classifier results. SVM illustrated better classification rates for early selected portions with less than 25 samples. However, it was the latest approach in achieving over 90% in classification accuracy.
The evaluation of classification performance of extracted features based on the gradient of transient responses and FFT coefficients of transient responses is illustrated in Table 3 and 4, respectively. The evaluation results based on gradient method presented closed results to baseline manipulation. However, baseline manipulation had a general advantage. The results based on FFT technique presented the lowest classification rates in comparison with above methods. It indicated the relation of the CGS response to the temporal characteristics of the CGS response.
A general overview to all applied methods, confirms that the classification performance was related directly to the nature of transient response of the CGS. Therefore, generated features from original signals after the preprocessing step are the most suitable features for gas identification. All evaluated classification techniques have approximately generated a similar shape over the complete selected interval for study. Variation of classification rates was basically due to applying different feature extraction methods. LDA as a supervised method generated better features than PCA as an unsupervised method.  The presented results proved that an early selected portion of the CGS transient response included identification data for perfect classification. The optimum portions for classification must be included in about the first 45 samples of the beginning of the CGS transient response. Therefore, early selected portion of the CGS transient response can be applied for achieving high classification rate in real-time gas identification as a single sensor system or a sensor array. It can also minimize problems of long time exposition of sensing material in MOS gas sensors.

Conclusion
The fabrication of a selective gas sensor with distinct transient responses to TGs of different natures was described. The device had a simple structure including MOS conductive gas sensor attached to the glass tube. An experimental evaluation of the device indicated that the process of TG diffusion through the capillary tube, in comparison with the process of detection by the sensor element, configured its transient response to a prevailing TG. Ability of the Capillary-attached conductive gas sensor in real-time gas identification was investigated. Selected portions of the CGS transient response were applied to generate diverse features for gas classification. Combination of PCA and LDA feature extraction methods with the quadratic, k-NN, MLP and SVM classification were applied as classifier systems.
The algorithm was practically implemented and the ability of the designed system to distinguish between four different combustible target gases was demonstrated. Reported results in this paper indicate high classification rates based on extracted features from the early part of the CGS transient response for real-time gas identification. Reported ability of the CGS structure can apply to fabricate a real-time single sensor or a sensor array for fast gas identification and reduce the problems due to long time exposition of sensing material in chemical gas sensors.