Quantitative Analysis of CO2 Infrared Absorption Spectrum Based on Improved Particle Swarm Optimization-Back Propagation Neural Network
Wu Xuyang,Guan Gangyun,Liu Zhiwei,Zhu Bingjie,Geng Zixun,Zheng Chuantao,Yan Guofeng,Zhang Yu,Wang Yiding
DOI: https://doi.org/10.3788/aos232020
2024-01-01
Acta Optica Sinica
Abstract:Objective In absorption spectroscopy for gas sensing, there are problems with low signal-to-noise ratio and low linearity caused by spectral distortion in measured spectra, which makes it difficult for traditional linear analysis methods to achieve high-precision gas concentration inversion. Artificial back propagation neural networks (BPNNs) are suitable for solving nonlinear problems. However, in the optimization problem of multiple local extrema, the final convergence value of the gradient descent algorithm which is usually employed as the training algorithm of artificial BPNNs is related to the initial value. Thus, traditional BPNNs may converge to the local optimal value due to the random initial connection weights and thresholds between neural nodes. Traditional particle swarm optimization (PSO) algorithms are prone to converge to local optima, thereby reducing the optimization effect. Therefore, we adopt an improved particle swarm optimization (IPSO) algorithm to optimize the initial connection weights and thresholds of the artificial BPNN and build an IPSO-BPNN gas concentration inversion model which has been proven to be high-precision and robust. Methods To enhance the local and global search capabilities of PSO algorithms, we conduct improvements on traditional PSO algorithms in terms of evolutionary strategy and parameter settings. Meanwhile, mutation operations are introduced into the PSO algorithm to increase the diversity of particles and enable them to jump out of local optima. In each iteration, each particle has a certain probability of mutation, and the position and velocity of the mutated particles will be randomly initialized again. To better balance the local and global search capabilities of PSO algorithms, we carry out dynamic adjustments to inertia weights, individual learning factors, group learning factors, and maximum speed. Then the IPSO algorithm is constructed. Additionally, we optimize the initial connection weights and thresholds of the BPNN using the IPSO algorithm to enhance the prediction accuracy of the BPNN. Then the IPSO-BPNN gas concentration inversion model is built. Results and Discussions A near-infrared CO2 gas sensing system is established based on direct absorption spectroscopy technology using a self-developed Er-doped fiber laser frequency comb. Meanwhile, this is combined with two tunable narrowband optical filters, an Er-Yb co-doped fiber amplifier, a multi-pass gas cell, and a grating spectral analyzer. This sensing system can be utilized for CO2 gas concentration detection in cellars, and can also be further adopted for the quantitative analysis of gases such as ammonia and acetylene by changing the optical filter wavelength. In the experiment, 70 sets of CO2 gas samples with concentrations of 2%, 4%, 6%, 8%, 10%, 12%, 14%, 16%, 18%, 20%, 22%, 24%, 26%, and 28% are prepared by employing a gas distributor as training and validation samples. Among them, CO2 gas samples with concentrations of 2%, 4%, 6%, 8%, 10%, 14%, 16%, 20%, 22%, 26%, and 28% are training set samples, and CO2 gas samples with concentrations of 12%, 18%, and 24% are validation set samples. Then, 14 sets of CO2 gas samples with different concentrations are prepared as testing set samples. Then we collect the background spectrum and the absorption spectrum of each gas sample with the wavelength range from 1572.23 to 1572.43 nm. After the spectrum collection, we calculate the absorbance spectrum of each gas sample based on the background spectrum and absorption spectrum of each collected gas sample. To eliminate the influence of baseline drift on spectral quantitative analysis, we adopt an iterative polynomial fitting baseline correction algorithm to perform baseline correction on the absorbance spectra. Additionally, we input the testing set data into the trained IPSO-BPNN gas concentration inversion model and predict the gas sample concentration of the testing set using a neural network. Meanwhile, five additional methods including PSO-BPNN, BPNN, extreme learning machine (ELM), support vector machine (SVM), and maximum absorbance extraction (MAE) are utilized for concentration inversion of the testing set data. The results are compared with the inversion results of the IPSO-BPNN model, and the mean square error, average absolute percentage error, determination coefficient, and program running time are evaluation indicators for algorithms. The IPSO-BPNN model obtains a minimum mean square error of 0.0195, a minimum average absolute percentage error of 0.0112, and a maximum determination coefficient of 0.9997 in concentration inversion. The results validate the sound robustness of the IPSO-BPNN model and its application potential in high-precision molecular absorption spectroscopy analysis. Conclusions We employ an IPSO algorithm to optimize the initial connection weights and thresholds of the BPNN, build an IPSO-BPNN gas concentration inversion model, and implement an optimized BPNN for precise gas concentration inversion from measured gas absorption spectra. A CO2 sensing system is established based on optical frequency comb direct absorption spectroscopy technology, with the CO2 absorbance spectra obtained. The training set, validation set, and testing set of the algorithm model are constructed, and the gas concentration inversion validation experiment of the model is carried out. The inversion performance of the IPSO-BPNN model is compared with that of five gas concentration inversion methods, including PSO-BPNN, BPNN, SVM, ELM, and MAE to verify the high accuracy of the IPSO-BPNN model in molecular absorption spectroscopy analysis and its application feasibility. In the future, we will further analyze the characteristic differences between the measured infrared absorption spectra and the standard infrared absorption spectra database. Meanwhile, the preprocessed standard infrared absorption spectra should be adopted as the training set and validation set to improve the efficiency of building the gas concentration inversion model. We will also apply this gas concentration inversion model to high-sensitivity gas sensing systems, and fully leverage the long optical path of the multipass cell/kilometer level resonant cavity and high-precision gas concentration inversion of the model to achieve lower detection limits and wider detection field applicability.