Acta Optica Sinica, Volume. 43, Issue 12, 1206001(2023)

Application of Support Vector Machine in Quantitative Analysis of Mixed Gas

Jifang Shan1,2, Kun Liu1,2、*, Junfeng Jiang1,2, Tiegen Liu1,2, and Hui Yin1,2
Author Affiliations
  • 1School of Precision Instrument and Opto-Electronics Engineering, Tianjin University, Tianjin 300072, China
  • 2Key Laboratory of Opto-Electronics Information Technology, Ministry of Education, Tianjin University, Tianjin 300072, China
  • show less

    Objective

    Vehicle exhaust contains gases such as NH3 and CO2 and is becoming an essential source of air pollution and greenhouse effect. The intracavity absorption gas sensing technology based on fiber ring laser has many advantages, which are very suitable for real-time detection of toxic and harmful gases in environmental protection. However, when the gas sensing system based on a thulium-doped fiber laser is applied for quantitative analysis of mixed gas, the gas detection accuracy is often affected by cross interference caused by overlapping spectral absorption lines between component gases, and a nonlinear shift led to by changes in temperature and pressure at the experimental sites. As a small sample machine learning method, support vector machine (SVM) based on statistical theory has high accuracy and good generalization ability. It can be combined with infrared spectrum analysis to build a mixed gas volume fraction regression prediction model and correct nonlinear interference, thus greatly improving the accuracy and reliability of the gas quantitative analysis.

    Methods

    In this paper, an active intracavity gas sensing system based on a thulium-doped fiber laser is built to collect the absorption spectrum data of NH3 and CO2 gases. The system is mainly divided into an adjustable light source (part A), a sensing part (part B), a data acquisition and processing part (part C), and a gas distribution part (part D). Before collecting the gas spectrum, sufficient nitrogen is introduced into the gas chamber to eliminate the interference of water vapor and CO2 in the gas distribution instrument. The experimental environment is 0.1 MPa under normal pressure, and the sampling rate of the acquisition card is 20 kHz, with 20 groups of data being collected and 12 samples for each group of data. Before building the model, spectral data should be preprocessed to reduce the impact of background noise and improve the signal-to-noise ratio. However, it is inappropriate to do too much preprocessing to avoid losing some important spectral information. We also preprocess the spectral data through the methods of denoising, baseline correction, and smoothing. With an aim to improve the modeling speed, principal component analysis (PCA) is employed to project the multi-dimensional linear transformation of the original gas absorption spectrum data into a high-dimensional space to obtain the principal components corresponding to the maximum variance. The principal components at this time are leveraged to replace the eigenvalues in the original data, reduce the data dimension, and prevent the correlation between variables from affecting the extraction of these components and the prediction accuracy of the regression model. The standard particle swarm optimization (PSO) algorithm has fast convergence and short optimization time, whereas it features premature convergence of the model, low accuracy of optimal solution search, and low efficiency of later iteration. Therefore, we propose an improved algorithm, which is adaptive mutation particle swarm optimization (AMPSO). By introducing an adaptive mutation operator, the updated particle positions are randomly mutated so that particles can enter other regions of the solution space to continue searching, thereby improving the ability of particle swarm optimization to jump out of the local optimal solution and avoid premature convergence of the algorithm model. The optimal combination of parameters obtained from the NH3-SVM model and the CO2-SVM model optimized by the AMPSO algorithm is input into the support vector machine to obtain the corresponding volume fraction regression model. The prediction results of training set samples and test set samples of the NH3-SVM model and the CO2-SVM model can be obtained (Fig. 8). The determination coefficient R2 is adopted to evaluate the fit between the predicted volume fraction and set volume fraction.

    Results and Discussions

    Although the optimization time of the standard PSO algorithm is the shortest, due to premature convergence, the mean square error is large, and the regression prediction of the model is not good. The mean square error of the grid search method is close to that of the AMPSO algorithm and both errors are small. However, since the grid search method is a non-heuristic algorithm, each optimization needs to traverse all points in the grid, resulting in long optimization time. Compared with the two algorithms, the AMPSO algorithm can obtain the best mean square error at a more appropriate optimization time, with higher efficiency. When regression predictions on the volume fraction of the training set samples are conducted, the mean square errors of the volume fraction set point and the volume fraction prediction value of the NH3-SVM model and CO2-SVM model are 0.000087 and 0.000128 respectively, and the determination coefficients R2 are 0.9997 and 0.9999 respectively. When volume fraction regression prediction for the test set samples is carried out, the mean square errors of the volume fraction set point and the volume fraction prediction value of the NH3-SVM model and CO2-SVM model test set are 0.000088 and 0.000170 respectively, and R2 is 0.9998.

    Conclusions

    An active intracavity gas sensing system based on a thulium-doped fiber laser is built to collect the absorption spectrum data of NH3 and CO2 gases. The predicted volume fraction of the regression prediction model of NH3 and CO2 gas volume fraction is in good agreement with the actual volume fraction, with sound prediction ability and effect, and small error. The built AMPSO gas volume fraction regression model has high prediction accuracy and strong accuracy and can be applied for mixed gas volume fraction regression prediction.

    Tools

    Get Citation

    Copy Citation Text

    Jifang Shan, Kun Liu, Junfeng Jiang, Tiegen Liu, Hui Yin. Application of Support Vector Machine in Quantitative Analysis of Mixed Gas[J]. Acta Optica Sinica, 2023, 43(12): 1206001

    Download Citation

    EndNote(RIS)BibTexPlain Text
    Save article for my favorites
    Paper Information

    Category: Fiber Optics and Optical Communications

    Received: Sep. 6, 2022

    Accepted: Oct. 27, 2022

    Published Online: Jun. 20, 2023

    The Author Email: Liu Kun (beiyangkl@tju.edu.cn)

    DOI:10.3788/AOS221681

    Topics