|
|
|
|
|
|
Research on a Mixed Gas Detection Method Based on KNN-SVM |
SUN Chao1, HU Run-ze1, WU Zhong-xu2, LIU Nian-song2, DING Jian-jun1* |
1. College of Intelligent Manufacturing, Jianghan University,Wuhan 430056, China
2. State Key Laboratory of Precision Blasting, Jianghan University,Wuhan 430056, China
|
|
|
Abstract In the current research on mixed gas detection, various mathematical algorithms for classifying and predicting data of multiple gas components have emerged. Rapid and accurate gas composition and concentration detection has gradually become a hot topic. However, in some studies, the features of gas data are difficult to capture and judge, and the classification and prediction of gas data exhibit poor accuracy and efficiency due to data bias and unbounded generalization errors. In response to challenges like data bias and unbounded generalization errors, this paper proposes a KNN-SVM algorithm. This algorithm performs secondary classification on ambiguous gas data that is challenging to classify. It combines K-nearest neighbors and Support Vector Machine algorithms to make more comprehensive data feature assessments. The algorithm determines the weights of each algorithm based on experiments, thereby improving the accuracy of discriminating gas categories. The integration of the two algorithms also enhances the efficiency of the overall algorithm, providing stable adaptability to different types of gases. The experimental gas composition consists of cylinders containing C2H2, NO2,and SF6 at concentrations of 12 mg·L-1, NO2, SF6 at 10 mg·L-1, and C2H2 at 5 mg·L-1(all diluted with N2 as a background gas), as well as two bottles of pure N2. The experiment involves mixing these gases and adjusting their ratios to set the required gas concentrations for detection. By detecting individual gases,60 sets of training data are obtained for each of the three gases. Linear fitting of these 60 data sets yields fitted lines for each gas, establishing the relationship between gas concentration and absorption peak. The accuracy of gas detection is confirmed through the adjusted R-squared values for the fitted lines: 0.991 for C2H2,0.981 for NO2, and 0.987 for SF6. Subsequently, 40 sets of training data are obtained by detecting mixed gases. The KNN-SVM algorithm is then applied to classify and predict mixed gases, and the concentrations of each gas in the mixed gas are inferred from the fitted lines. Comparisons with traditional SVM algorithms using various classification metrics demonstrate the effectiveness and superiority of the proposed algorithm. Experimental results indicate that the KNN-SVM algorithm exhibits outstanding performance in gas classification and prediction,achieving an accuracy of 99.167% and an Area Under the Curve index of 99.375%. This algorithm enhances the accuracy of gas detection and improves generalization capabilities to adapt to diverse gas compositions,providing robust support for real-time gas detection systems.
|
Received: 2023-10-16
Accepted: 2024-04-23
|
|
Corresponding Authors:
DING Jian-jun
E-mail: 10107093@jhun.edu.cn
|
|
[1] Bayrakli I. Applied Optics, 2018, 57(15): 4039.
[2] Suchánek J, Janda P, Dostál M, et al. Microchemical Journal, 2019, 144: 203.
[3] SHAO Xiao-peng, ZHANG Le, LIU Li-xian, et al(邵晓鹏, 张 乐, 刘丽娴,等). Journal of Data Acquisition & Processing(数据采集与处理), 2021, 36(5): 850.
[4] Liu Y H, Qiao S D, Fang C, et al. Opto-Electronic Advances,2024,7:230230.
[5] Fang C, Liang T T, Qiao S D, et al. Optics Letters, 2024,49:770.
[6] Elefante A, Giglio M, Sampaolo A, et al. Analytical Chemistry, 2019, 91(20): 12866.
[7] Weigl S, Wittmann E, Rück T, et al. Sensors and Actuators B: Chemical, 2021, 328: 129001.
[8] Ma Y F, Liang T T, Qiao S D, et al. Ultrafast Science, 2023,3: 0024.
[9] DU Hong-fei, XIE Guang-zhong(杜鸿飞, 谢光忠). Electronic Components & Materials(电子元件与材料), 2019, 38(12): 69.
[10] QIAN Xin-ming, HUANG Jie, YUAN Meng-qi(钱新明, 黄 捷, 袁梦琦). Journal of Safety and Environment(安全与环境学报), 2020, 20(4): 1241.
[11] LI Peng, CHANG Si-jie, YANG Jia-kang(李 鹏, 常思婕, 杨佳康). Modern Electronics Technique(现代电子技术), 2022, 45(13): 104.
[12] DUAN Xiao-li, WANG Ming-quan(段小丽, 王明泉). Spectroscopy and Spectral Analysis(光谱学与光谱分析), 2019, 39(9): 2883.
[13] YANG Chao, ZHANG Ping-ping, WANG Guo-qiang, et al(杨 朝, 张平平, 汪国强,等). Journal of Natural Science of Heilongjiang University(黑龙江大学自然科学学报), 2022, 39(3): 345.
[14] Xia W, Song T, Yan Z, et al. A Method for Recognition of Mixed Gas Composition Based on PCA and KNN. 2021 19th International Conference on Optical Communications and Networks (ICOCN), Qufu, China, 2021, doi: 10.1109/ICOCN53177.2021.9563663.
[15] QIAO Feng-juan, GUO Hong-li, LI Wei, et al(乔风娟, 郭红利, 李 伟,等). Journal of Qilu University of Technology(齐鲁工业大学学报), 2018, 32(5): 39.
[16] LIU Yu-kang, ZHANG Zheng-yang, CHEN Lin-lin, et al(刘雨康, 张正阳, 陈琳琳,等). Computer Engineering and Applications(计算机工程与应用), 2015, 51(24): 126.
[17] LIU Shao-yu, ZHOU Jie, LI Bi-cheng, et al(刘绍毓, 周 杰, 李弼程,等). Journal of Data Acquisition & Processing(数据采集与处理), 2015, 30(1): 202.
|
[1] |
PENG Jie1, 2, WANG Rui-feng1, CAO Yuan1*, MEI Jiao-xu1, WANG Gui-shi1, LIU Kun1, GAO Xiao-ming1, 2, CHENG Gang3. Development of a Homemade Chopper and Its Application to
Photoacoustic Spectroscopy for CO2 Measurement[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2024, 44(12): 3364-3370. |
[2] |
LI De-hao1, WANG Dan1*, LI Zhi-yan1, CHEN Hao2. Application of Kalman Filter in Gas Detection by Cavity Ring-Down Spectroscopy[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2024, 44(10): 2727-2732. |
[3] |
KAN Ling-ling, ZHU Fu-hai, LIANG Hong-wei*. Detection of Trace Methane Gas Concentration Based on 1D-WCWKCNN[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2024, 44(03): 829-835. |
[4] |
LIU Zhao-hai1, AN Xin-chen1, 3, TAO Zhi1, 2, LIU Xiang1, 2*. Multicomponent Trace Gas Detecting and Identifying System Based on MEMS-FPI on-Chip Spectral Device[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2024, 44(02): 359-366. |
[5] |
ZHENG Hong-quan, DAI Jing-min*. Research Development of the Application of Photoacoustic Spectroscopy in Measurement of Trace Gas Concentration[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2024, 44(01): 1-14. |
[6] |
XU Qiu-yi1, 3, 4, ZHU Wen-yue3, 4, CHEN Jie2, 3, 4, LIU Qiang3, 4 *, ZHENG Jian-jie3, 4, YANG Tao2, 3, 4, YANG Teng-fei2, 3, 4. Calibration Method of Aerosol Absorption Coefficient Based on
Photoacoustic Spectroscopy[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2024, 44(01): 88-94. |
[7] |
FU Wen-xiang, DONG Li-qiang, YANG Liu*. Research Progress on Detection of Chemical Warfare Agent Simulants and Toxic Gases by Photoacoustic Spectroscopy[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(12): 3653-3658. |
[8] |
CHENG Gang1, CAO Ya-nan1, TIAN Xing1, CAO Yuan2, LIU Kun2. Simulation of Airflow Performance and Parameter Optimization of
Photoacoustic Cell Based on Orthogonal Test[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(12): 3899-3905. |
[9] |
CHEN Tu-nan1, 2, LI Kang1, QIU Zong-jia1, HAN Dong1, 2, ZHANG Guo-qiang1, 2*. Simulation Analysis and Experiment Verification of Insulating Material-Based Photoacoustic Cell[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(09): 2922-2927. |
[10] |
JIN Hua-wei1, 2, 3, WANG Hao-wei1, 2, LUO Ping1, 2, FANG Lei1, 2. Simulation Design and Performance Analysis of Two-Stage Buffer
Photoacoustic Cell[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(08): 2375-2380. |
[11] |
LIU Ting-ting1, SHEN Xu-ling1, REN Xin-yi1, WEN Zhao-yang1, YAN Ming1, 2, ZENG He-ping1, 2*. Decomposition Products Detection of Sulfur Hexafluoride Based on
Frequency Comb Spectroscopy[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(03): 927-932. |
[12] |
LI Zhen-gang1, 2, SI Gan-shang1, 2, NING Zhi-qiang1, 2, LIU Jia-xiang1, FANG Yong-hua1, 2*, CHENG Zhen1, 2, SI Bei-bei1, 2, YANG Chang-ping1, 2. Research on Long Optical Path and Resonant Carbon Dioxide Gas
Photoacoustic Sensor[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2023, 43(01): 43-49. |
[13] |
YANG Jin-chuan1, 2, AN Jing-long1, 2, LI Cong3, ZHU Wen-chao3*, HUANG Bang-dou4*, ZHANG Cheng4, 5, SHAO Tao4, 5. Study on Detecting Method of Toxic Agent Containing Phosphorus
(Simulation Agent) by Optical Emission Spectroscopy of
Atmospheric Pressure Low-Temperature Plasma[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2022, 42(06): 1728-1734. |
[14] |
WANG Qi, WANG Shi-chao, LIU Tai-yu, CHEN Zi-qiang. Research Progress of Multi-Component Gas Detection by Photoacoustic Spectroscopy[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2022, 42(01): 1-8. |
[15] |
CHEN Yang, DAI Jing-min*, WANG Zhen-tao, YANG Zong-ju. A Near-Infrared TDLAS Online Detection Device for Dissolved Gas in Transformer Oil[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2021, 41(12): 3712-3716. |
|
|
|
|