- Department of Electronics, Xinzhou Normal University, Xinzhou, Shanxi, China
To reduce the interference of other gases and improve the detection accuracy in CH4 concentration detection, a CH4 concentration detection system is proposed, and a ratio differential algorithm is designed. The difference value of the absorbed light intensity between chamber 1 and chamber 2 used to suppress the calculation of CH4 concentration by other component gases. The high concentration of CH4 gas in chamber 3 used to obtain the accurate position of the characteristic absorption peak, and it is applied as a boundary condition for data extraction in chamber 1. Two sets of gases chamber differential calculations were used, one set was used to calculate the differential value of laser energy at the characteristic position of CH4 absorption, and the other set was used to calculate the differential value of laser energy for the other gases. Then, calculate the proportion coefficients of the two sets of difference values to obtain the CH4 concentration inversion function using this structure. The interfering gases include C2H6, SO2 and CO2. A total of 1,000 sets for sample data were collected for the mixed gas, with 400 sets as the sample data and the rest as the test samples. The results show that the accuracy of CH4 concentration inversion by this algorithm is about 3 times that of traditional algorithm. The algorithm modeling time is approximately 1/4 of that of traditional methods. It has certain advantages in detecting CH4 concentration in environments with interfering gases.
1 Introduction
Methane (CH4) [1–3] gas is a common combustible gas in underground coal mining. Real time monitoring of gas concentration is crucial. The research can quickly identify methane gas in a mixture of gases, which is of great significance to ensure the life safety of underground personnel and the development of coal industry. Methane is often mixed with other gases, which can affect the detection accuracy of methane gas concentration. Therefore, the design and improvement of methane gas concentration detection systems are of great significance.
In 1985, K. Chan [4] used InGaAs material LEDs as light sources to align the absorption peak of methane gas at 1665.4 nm. It was also combined with narrowband interference filters, which doubled the sensitivity of the system. In 1992, H. Tai [5] reported on the use of two DFB lasers with central wavelengths of 1.66 and 1.53 μm to form a composite light source, and used harmonic detection technology to achieve simultaneous detection of methane and acetylene concentrations. V. Weldon [6] reported in 1993 an experimental study on the simultaneous measurement of methane and carbon dioxide with a tunable DFB laser with a wavelength of 1.64 μm. In 1998, B. Culshaw [7] from Strathclyde University in the UK reported on a multipoint fiber optic gas sensing network operating by space division multiplexing. In 2000, Miha Zavrsnik [8] reported on a series fiber gas sensing network based on coherent multiplexing. In 2003, G. Stewart [9] reported on a gas concentration detection system for landfills, and used the fiber optic sensing network with 45 sensors and a coverage area of 5 square kilometers. In 2004, the Institute of Physics of the Russian Academy of Sciences reported an experiment with a single frequency laser to measure the absorption of methane gas at 1,654 nm. In 2006, Crawford Massie [10] reported on a portable gas optical sensor with an absorption wavelength of 1660 nm. In 2018, Zang Yipeng, et al. [11] designed CH4 detection system by the 1,850 nm laser, and its accuracy is 1.14 ppm. In 2021, Chen Wenwen, et al. [12] had an accuracy of 1.0 ppm for detecting CH4 concentration, and its accuracy is 0.13 ppm. In 2022, Dong Mao [13] achieved modulation of the laser using birefringence managed normal dissection fiber laser, resulting in a significant increase in phase matching during the birefringence process and a modulation energy enhancement of about 10 times. It can achieve a stronger signal-to-noise ratio when selecting methane characteristic wavelengths. In 2023, Yanjun Chen [14] used a high-power diode laser to detect trace methane gas concentration. The center wavelength of the light source was 1650.96 nm, with an optical power of up to 38 mW. The sensor was implemented by 3D printing, with a minimum detection limit of 14.93 ppm. In 2023, Kazuki Hashimoto [15] used a combination of broadband mid infrared spectroscopy and ultrafast Fourier transform to obtain high-resolution broadband TSIR. Its maximum wavenumber resolution is 0.017 cm−1. In 2023, Yufei Ma [16] completed ammonia concentration detection by thermoelastic spectroscopy technology, and its minimum detection accuracy is 80 ppm. In 2023, Chu Zhang [17] used photoacoustic technology to detect the concentration of acetylene gas, and improved the signal-to-noise ratio through time accumulation detection. It increased the detection accuracy by 1.65 times compared to traditional methods.
In summary, most researchers use more advanced hardware devices or optimized data processing algorithms to improve the detection accuracy of methane gas concentration [18]. The article mainly focuses on proposing a novel detection method that improves detection accuracy and stability. It proposes a method of first differentiating laser energy, and calculates the ratio to calculate the proportional coefficient. Based on the analysis of characteristic absorption spectra of CH4, a ratio differential algorithm by adaptive SVM (Support Vector Machine [19]) is designed. It provides a new approach for methane gas concentration detection, and this method can coexist with traditional optimization methods.
2 System design
In Figure 1 chamber 1 and chamber 2 are filled with tested gas, and it can be discharged through the “Output” channel; Chamber 3 is filled methane with a concentration of 80%. In order to obtain more accurate information on the special absorption band, methane with a concentration of 80% used in addition to methane. Gas entering two chambers requires a filter. In the filter, it is filled with molecular sieves. It can adsorb water vapor, dust, coal dust, etc., thereby reducing the impact of other pollutants in the test gas on the calculation of CH4 concentration. Chamber 3 is filled with high concentration of CH4, and it used to over-absorb the characteristic absorption of CH4.
The signal modulation module is controlled to output modulation waves by CPU. The modulated signal controls the driver to emit laser signals from the infrared laser. According to the basic principle of characteristic spectral absorption, the absorption energy of CH4 molecule is just equal to the photon of the difference between the energies of two energy levels. The other gases in the well absorb photons of different frequencies due to different atomic structures and chemical bond, so different characteristic absorption peaks inhibit the impact of other gases concentration. The main characteristic wavelength of CH4 is 1650.8 nm, Analyzing the spectral distribution can determine the concentration of CH4 gas.
3 Design of adaptive SVM algorithm
3.1 SVM algorithm
There are many methods for processing spectral data, such as least squares, artificial neural networks, etc. The core idea of the SVM algorithm is to map data into a high-dimensional space, making it easier for data to be separated in that space. In the spectral calculation process, due to the large amount of spectral data and high dimensionality, this algorithm is more suitable. Meanwhile, the SVM algorithm has strong generalization ability, making it more applicable when the type and concentration of mixed gases are unknown. After comprehensive comparison, it is believed that the SVM algorithm is the most suitable method in this system.
SVM is often applied to solve classification and regression problems, and it is suitable for the separation of multi-component gas. It has high applicability and robustness, and is suitable for multi-component separation situations. Assuming the training data (xi, yi), i = 1, 2, 3, …, n (n represents the number of samples), xi and yi belong to R, xi is the sample input, yi is the expected output, and its fitting function is
Among them, ω is the space hyperplane, and b offset.
According to the minimum structural risk criterion [20], it can be optimized as
And its parameters comply with:
Among them, C represents the penalty factor, which is used to adjust the degree of punishment for sample error exceeding the limit; ξ represents the relaxation factor; Å represents an insensitive parameter used to reflect the system’s tolerance for errors.
According to the test condition, the output can be calculated as follows:
3.2 Adaptive SVM
The formula for finding the optimal solution through information exchange between sample individuals is
Among them, i∈N (N represents the total number of particles), j represents the dimension, and σ represents the inertia weight; D represents the dimension; k. k + 1 represents the current and next iteration algebra, respectively; Vij represents particle velocity; Xij represents the particle position; Pij and Pgj represent the extreme values of individuals and groups, respectively, while c1 and c2 represent the acceleration factor.
By setting constraints on the spectral characteristics of measured gas, the corresponding particles are mutated, thereby guiding the population to achieve the optimal convergence effect; The second is to improve SVM by setting a dynamic change insensitive region ε (yi) in support vector regression calculation, which is to replace ε (yi) in the original algorithm. On the basis of this improvement idea, Eq. 4 is replaced and simplified to obtain
The introduction of ε (yi) can suppress the effect of over-learning model.The specific process for completing the optimization is shown in Figure 2.
3.3 CH4 concentration
When the incident light intensity I0 (λ) and transmitted light intensity It (λ), as well as the absorption coefficient and effective length L of the gas chamber, are known or can be calculated [21], the concentration of the measured gas cCH4 can be expressed as
In the formula, v represents the wavenumber, and it is the reciprocal of the wavelength. α (v) represents the absorption coefficient of light intensity. The light intensity between chamber 1 and 2 is I12. The light intensity between chamber 2 and 3 is I23. The light intensity between chamber 1 and 3 is I13.
With T13, Eq. 8 is substituted into:
When T13 > T0, it indicates that the absorption intensity of methane gas at this wavelength is positively correlated with methane concentration, and it is considered as a characteristic absorption wavelength with high contribution rate. When T13 < T0, it indicates that the absorption capacity of methane gas at this wavelength is relatively weak. There is the characteristic absorption, and it is susceptible to interference from other gases. Therefore, this wavelength is not selected during the testing and calculation processing, and zero value will be set for its concentration. The difference in light intensity within this range is calculated, and it can significantly suppress the interference of stray signals on the system.
3 Algorithm design
The improved Adaptive SVM algorithm completes classification calculations after setting mutation particles and dynamic insensitivity regions. Take one-third of the total spectral test data as training samples, and the rest as test samples; Initialize C and ξ to construct an SVM model; Set the particle swarm dimension to 2, select 20 particles for each dimension, set the iteration number to 200 generations, optimize Vij and Xij according to the set range, and calculate the mean square error of the fitness function; Set the direction of convergence for mutation particle constraints and improve learning efficiency by setting ε (yi); Compare the fitness of each particle, and calculate the local and global optimal values of each particle; Adjust Vij Xij based on the first two steps; If the ending conditions are not met, re learn until the requirements are met.
To improve the sensitivity of system and achieve narrowband filtering effect, a high concentration CH4 gas filtering window was designed. T0 is determined by the calibration method. Firstly, match the standard concentration of methane gas, and find the position of the methane characteristic absorption peaks. Then, iteratively select different bands for methane concentration inversion, and sort the positions of the bands that affect methane concentration inversion; Take the position of the band with a contribution rate exceeding 80% and set the corresponding T value of this band position to T0.
The process shows in Figure 2.
4 Experiments
The source is 1,650 nm infrared laser, and its half width is 10 nm. The length of chamber is 40.0 cm. The test gas is simultaneously input into chamber 1 and chamber 2. A gas analyzer was used, and the detection accuracy of methane concentration is ±1 ppm. During the testing process, two methods are used: individual gas testing and mixed gas testing. For mixed gases, the basis for selecting mixed gases is from the perspective of practical applications. In coal mining environments, methane gas is often mixed with C2H6, SO2, and CO2, so the above three gases are used as interference gases. The specific mixing ratio is completed in the form of multiple proportion combination experiments, with a focus on discussing situations similar to coal mine gas mixtures.
4.1 Errors comparison
The underground gas contains a large amount of coal dust, dust, and water vapor. So the measured gases are introduced into a filter for dust and moisture removal treatment, and they introduce into the gas chamber for detection. The testing mainly focuses on CH4 (0%–10%), C2H6 (0%–1%), SO2 (0%–1%), and CO2 (0%–1%). A total of 800 sets of sample data were collected for the mixed gas, with 400 sets as the sample data and the rest as the test samples. Perform baseline correction, noise reduction, and normalization on the samples to complete the preprocessing of spectral data. It shows in Figure 3.
In Figure 3, the blue curve represents the relationship between the average relative error and the iteration number when traditional algorithms calculate methane concentration. The red curve represents the relationship between the average relative error and the iteration number when calculating methane concentration using this algorithm. In the first 20 iterations, the error of this algorithm decreased from 3.2 × 10−7 to 2.4 × 10−7, while the traditional algorithm remained almost unchanged during this stage. When the number of iterations exceeds 50, the error of this algorithm almost reaches a stationary state, with a value of 4.6 × 10−8. However, traditional algorithms achieve a stationary state through 100 iterations, with a value of 2.1 × 10−7. Thus, this algorithm has advantages in Rate of convergence and error.
In order to provide the model with fast and efficient prediction capabilities, independent modeling was conducted for different gas components. For the main detection gas CH4, the particle swarm dimension was set to 2, with 20 particles per dimension. The optimization iteration was 200 generations, with an inertia weight of 0.9 and a termination value of 0.4, completing the generation by generation calculation. The particle swarm optimization error curve is obtained after optimization according to the above model. As shown in Figure 3, the improved particle swarm optimization algorithm only needs 43 steps to reach the global optimal solution, which has high convergence. The optimization time of the 200 generation is about 4,012 s, c = 58.46, σ = 4.67. By incorporating the optimization results into SVM, the predicted mean square error of the test sample is 4.8 × 10−8. At the same time, the same set of spectral data was separated and the concentrations of each component were inverted using a back propagation network (due to space limitations, only three typical values within the testing range were selected).
4.2 Detection results analysis
In experiments, the response voltage is tested with CH4 concentration, and the test curve is shown in Figure 4A. The algorithm is used for proportional calculation, and the function curve between proportional value and CH4 concentration is shown in Figure 4B.
FIGURE 4. CH4 concentration calculation based on harmonic ratio. (A) Response voltage by two harmonics and (B) CH4 concentration by harmonic ratio.
In Figure 4A, when the response voltage increases, the concentration of CH4 increases, too. There is a linear relationship between them. Its slope value is −0.0215, with good linearity. The sensor response and concentration change trend are consistent with the analysis results, and the curve is linear. Throughout the entire testing process, the maximum response voltage was 3775.217 mV and the minimum was 3551.060 mV. The fitted linearity is 0.9994, with relative errors less than 5.0%. It can be seen that the system linearity meets the design requirements.
In Figure 4B, it can be seen that the CH4 concentration is linear with respect to the ratio of first harmonic to second harmonic, and the slope of the fitted polynomial is 8.752, with a linearity of 0.997. The linearity is relatively in the 0%–10.0% range, and it meets requirements. The maximum response voltage in the first harmonic is 4938.25 mV, and the minimum value is 4442.89 mV; The maximum response voltage in the second harmonic is 2694.24 mV, and the minimum value is 226.58 mV. It can be seen that there is a significant difference in the voltage ratio between the first and second harmonics, resulting in a significant improvement in their signal-to-noise ratio. Their relative errors are all less than 1.0%, and the testing stability has been improved.
When there is no methane gas, the second harmonic is not zero, which is caused by factors such as circuit and optical path noise, as well as nonlinearity of wavelength modulation. When calculating the ratio of second harmonic to first harmonic, the second harmonic amplitude value at each non-zero concentration should be subtracted from the second harmonic amplitude value in the absence of methane, and then divided by the first harmonic amplitude at that concentration to obtain a result that is closer to the actual concentration value. From the table, it can be seen that when the concentration of methane gas is 1%, the measurement error is the largest.
5 Conclusion
A spectral data processing algorithm for quantitative analysis of multi-component games has proposed. Prediction accuracy Improved and the convergence period decreased with mutation particle constraint method. Compared with traditional SVM algorithm, the absorption ratio differential algorithm has faster optimization time, higher model prediction accuracy, and significantly improved modeling efficiency. The model verified to meet practical testing requirements and has certain practical application value in improving the accuracy of methane concentration detection.
Data availability statement
The original contributions presented in the study are included in the article/Supplementary Material, further inquiries can be directed to the corresponding author.
Author contributions
FL proposed the design and wrote this article. YX completed the theoretical analysis of the paper. WW completed the experimental testing. JF completed the test data. All authors contributed to the article and approved the submitted version.
Funding
This work was supported in part by the Shanxi Teaching Reform Research Project “Research on the Construction of practical Teaching System of Applied Electronic Information Specialty under the background of new engineering” (No. J2021572).
Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
References
1. Bai Z, Zhao C, Gao J, Chen Y, Li S, Li Y, et al. Optical parametric oscillator with adjustable pulse width based on KTiOAsO4. Opt Mater (2023) 136(1):113506. doi:10.1016/j.optmat.2023.113506
2. Farooq A, Alquaity ABS, Raza M, Nasir EF, Yao S, Ren W. Laser sensors for energy systems and process industries: Perspectives and directions. Prog Energ Combustion Sci (2022) 91(1):100997. doi:10.1016/j.pecs.2022.100997
3. Liu C, Xu L. Laser absorption spectroscopy for combustion diagnosis in reactive flows: A review. Appl Spectrosc Rev (2019) 54(1):1–44. doi:10.1080/05704928.2018.1448854
4. Chan K, Inaba H, Ito H, Furuya T. 10 km-long fibre-optic remote sensing of CH4 gas by near infrared absorption. Appl Phys B (1985) 38(1):11–5. doi:10.1007/bf00691764
5. Tai H, Yamamoto K, Uchida M, Osawa S, Uehara K. Long distance simultaneous detection of methane and acetylene by using diode lasers coupled with optical fibers. IEEE Photon Technol (1992) 4(7):804–7. doi:10.1109/68.145278
6. Weldon V, Phelan P, Hegarty J. Methane and carbon dioxide sensing using a DFB laser diode operating at 1.64 μm. Electron Lett (1993) 29(6):560–1. doi:10.1049/el:19930374
7. Culshaw B, Stewart G, Dong F, Tandy C, Moodie D. Fibre optic techniques for remote spectroscopic methane detection—From concept to system realisation. Sensors and Actuators B (1998) 51(1):25–37. doi:10.1016/s0925-4005(98)00184-1
8. Zavrsnik M, Stewart G. Coherence addressing of quasi-distributed absorption sensors by the FMCW method. J Light-wave Technol (2000) 18(1):57–65. doi:10.1109/50.818907
9. Stewart G, Culshaw B, Johnstone W, Whitenett G, Atherton K, McLean A. Optical fibre sensors and networks for environmental monitoring. Manage Environ Qual (2003) 14(2):181–90. doi:10.1108/14777830310470413
10. Crawford M, Stewart G. Design of a portable optical sensor for methane gas detection. Sensors and Actuators B (2006) 113(1):830–6. doi:10.1016/j.snb.2005.03.105
11. Zang Y, Nie W, Xu Z, et al. Measurement of trace water vapor based on tunable diode laser absorption spectroscopy. Acta Optica Sinica (2018) 38(11):393–8. doi:10.3788/AOS201838.1130004
12. Chen W, Zheng K, Cao Y, et al. Sensing system of dissolved methane in water based on cavity-enhanced laser spectroscopy. Acta Photonica Sinica (2021) 50(9):168–76. doi:10.3788/gzxb20215009.0930002
13. Dong M, He Z, Gao Q, et al. Birefringence-managed normal-dispersion fiber laser delivering energy-tunable chirp-free solitons. Ultrafast Sci (2022) 9760631(1):1–12. doi:10.34133/2022/9760631
14. Chen Y, Liang T, Qiao S, Ma Y. A miniaturized 3D-printed quartz-enhanced photoacoustic spectroscopy sensor for methane detection with a high-power diode laser. Sensors (2023) 23(1):4034–41. doi:10.3390/s23084034
15. Hashimoto K, Nakamura T, Kageyama T, Badarla VR, Shimada H, Horisaki R, et al. Upconversion time-stretch infrared spectroscopy. Light: Sci Appl (2023) 12(48):48–10. doi:10.1038/s41377-023-01096-4
16. Ma Y, Liang T, Qiao S, Liu X, Lang Z. Highly sensitive and fast hydrogen detection based on light-induced thermoelastic spectroscopy. Ultrafast Sci (2023) 3(1):0024. doi:10.34133/ultrafastscience.0024
17. Zhang C, Qiao S, He Y, Zhou S, Qi L, Ma Y. Differential quartz-enhanced photoacoustic spectroscopy. Appl Phys Lett (2023) 122(1):241103. doi:10.1063/5.0157161
18. Lu W, Zhu X, Li Y, Yao Shunchun 姚, Lu Zhimin 卢, Qu Yi 曲艺, et al. Comparison of direct absorption and wavelength modulation methods for online measurement of CO2 by TDLAS. Infrared Laser Eng (2018) 47(7):0717002. doi:10.3788/irla201847.0717002
19. Jin D, Bai Z, Li M, Yang X, Wang Y, Mildren RP, et al. Modeling and characterization of high-power single frequency free-space Brillouin lasers. Opt Express (2023) 31(2):2942–55. doi:10.1364/oe.476759
20. Chen B, Bai Z, Hun X, Wang J, Cui C, Qi Y, et al. Gain characteristics of stimulated Brillouin scattering in fused silica. Opt Express (2023) 31(4):5699–707. doi:10.1364/oe.480391
Keywords: CH4, ratio differential algorithm, infrared laser, characteristic absorption peak, interfering gas
Citation: Liang F, Xun Y, Wu W and Fu J (2023) Based on laser energy absorption ratio differential algorithm methane concentration detection system. Front. Phys. 11:1223755. doi: 10.3389/fphy.2023.1223755
Received: 16 May 2023; Accepted: 10 July 2023;
Published: 04 August 2023.
Edited by:
Shuo Liu, Hebei University of Technology, ChinaReviewed by:
Zhaohong Liu, Hebei University of Technology, ChinaYing He, Harbin Institute of Technology, China
Copyright © 2023 Liang, Xun, Wu and Fu. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Fang Liang, bGlhbmdmYW5nNDIzQDE2My5jb20=