Temperature Compensation of Laser Methane Sensor Based on a Large-Scale Dataset and the ISSA-BP Neural Network
Abstract
:1. Introduction
2. Establishment of Large-Scale Dataset
2.1. Data Acquisition and Segmentation
2.2. Data Preprocessing with Improved Isolation Forest Outlier Detection Algorithm
3. ISSA-BP Temperature Compensation Methods
3.1. ISSA-BP Temperature Compensation Models
3.2. Improved Sparrow Search Algorithm
3.2.1. Quasi-Reflective-Based Learning Strategies Initialize Populations
3.2.2. Explorer Location Update Strategy Improvements
3.2.3. Anti-Predator Location Update Strategy Improvements
3.2.4. Artificial Rabbit Optimization Perturbation Strategy
3.2.5. ISSA Performance Evaluation
4. Model Validation and Discussion
4.1. Realization Details
4.1.1. Temperature Compensation Model Prediction Details
4.1.2. Model Performance Evaluation Index
4.2. Comparison Experiment
4.3. Ablation Experiments
4.3.1. Experimental Results before and after Data Preprocessing
4.3.2. ISSA-BP Ablation Experiments
4.4. Algorithm Utility Analysis
- Number of operational parameters. According to the analysis in Section 3.1, the ISSA-BP neural network temperature compensation model contains two input layer neurons, five hidden layer neurons, and one output layer neuron. Every two connected neurons have operational parameters for weights, and neurons in the remote and output layers contain operational threshold parameters. A smaller number of parameters means lower model complexity and faster training speed, which helps reduce the risk of model overfitting and facilitates deployment in environments with limited hardware computing resources.
- Number of model operations. In the neural network model structure, each connected neuron node performs a multiplication operation with the neural network weights and an addition operation with the threshold value. Therefore, our proposed temperature compensation model requires 15 multiplication operations, six addition operations, and six operations of the activation function during forward propagation. This indicates that the model can enhance its nonlinear fitting ability by activating the function in the operation and showing high computational efficiency, which is suitable for scenarios requiring fast response.
- Inference speed and practical application. The hardware temperature compensation based on the ISSA-BP model structure takes only about 40 milliseconds to compute the prediction process on an MCU chip running at 8 MHz. This short prediction inference time is suitable for real-time application environments, and different hardware devices will also exhibit different inference speeds.
- Hardware compatibility. The model’s simplicity implies lower hardware requirements, making it easier to deploy on various devices, including in environments such as embedded systems.
5. Discussion and Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Wang, S.; Xiao, G.; Mi, H.; Feng, Y.; Chen, J. Experimental and numerical study on flame fusion behavior of premixed hydrogen/methane explosion with two-channel obstacles. Fuel 2023, 333, 126530. [Google Scholar] [CrossRef]
- Zhang, Z.; Pang, T.; Yang, Y.; Xia, H.; Cui, X.; Sun, P.; Bian, W.; Yu, W.; Markus, W.S.; Dong, F. Development of a tunable diode laser absorption sensor for online monitoring of industrial gas total emissions based on optical scintillation cross-correlation technique. Opt. Express 2016, 24, A943–A955. [Google Scholar] [CrossRef]
- Ma, C.; Wang, Z.; Xu, J.; Tan, G.; Lv, Z.; Zhu, Q. Development and Application of Gas Production Measurement System of Coal-Rock under Temperature–Pressure Coupling. Sensors 2022, 22, 6776. [Google Scholar] [CrossRef]
- Wittstock, V.; Scholz, L.; Bierer, B.; Perez, A.O.; Wöllenstein, J.; Palzer, S. Design of a LED-based sensor for monitoring the lower explosion limit of methane. Sens. Actuators B Chem. 2017, 247, 930–939. [Google Scholar] [CrossRef]
- Huang, L.; Li, Z.; Wang, Y.; Zhang, L.; Su, Y.; Zhang, Z.; Ren, S. Experimental assessment on the explosion pressure of CH4-Air mixtures at flammability limits under high pressure and temperature conditions. Fuel 2021, 299, 120868. [Google Scholar] [CrossRef]
- Wang, G.; Mei, J.; Tian, X.; Liu, K.; Tan, T.; Chen, W.; Gao, X. Laser frequency locking and intensity normalization in wavelength modulation spectroscopy for sensitive gas sensing. Opt. Express 2019, 27, 4878–4885. [Google Scholar] [CrossRef]
- Dang, J.; Kong, L.; Zheng, C.; Wang, Y.; Sun, Y.; Yu, H. An open-path sensor for simultaneous atmospheric pressure detection of CO and CH4 around 2.33 μm. Opt. Lasers Eng. 2019, 123, 1–7. [Google Scholar] [CrossRef]
- Cui, X.; Dong, F.; Zhang, Z.; Sun, P.; Xia, H.; Fertein, E.; Chen, W. Simultaneous detection of ambient methane, nitrous oxide, and water vapor using an external-cavity quantum cascade laser. Atmos. Environ. 2018, 189, 125–132. [Google Scholar] [CrossRef]
- Zhao, L.; Du, Y.; Wang, W.; Shang, C.; Naren, Q. Progress on Monitoring Methods of Atmospheric Greenhouse Gases. Meteorol. Environ. Res. 2022, 13, 14–24. [Google Scholar]
- Seymour, S.P.; Festa-Bianchet, S.A.; Tyner, D.R.; Johnson, M.R. Reduction of Signal Drift in a Wavelength Modulation Spectroscopy-Based Methane Flux Sensor. Sensors 2022, 22, 6139. [Google Scholar] [CrossRef]
- Shemshad, J.; Aminossadati, S.M.; Kizil, M.S. A review of developments in near infrared methane detection based on tunable diode laser. Sens. Actuators B Chem. 2012, 171, 77–92. [Google Scholar] [CrossRef]
- Zhao, P.; Ho, H.L.; Jin, W.; Fan, S.; Gao, S.; Wang, Y. Hollow-core fiber photothermal methane sensor with temperature compensation. Opt. Lett. 2021, 46, 2762–2765. [Google Scholar] [CrossRef]
- Kazemi, N.; Abdolrazzaghi, M.; Musilek, P.; Daneshmand, M. A temperature-compensated high-resolution microwave sensor using artificial neural network. IEEE Microw. Wirel. Compon. Lett. 2020, 30, 919–922. [Google Scholar] [CrossRef]
- Zhang, G.; Liu, J.; Xu, Z.; He, Y.; Kan, R. Characterization of temperature non-uniformity over a premixed CH4–air flame based on line-of-sight TDLAS. Appl. Phys. B 2016, 122, 3. [Google Scholar] [CrossRef]
- Xu, L.; Zhirong, Z.; Pengshuai, S.; Lewen, Z.; Tao, P.; Hua, X.; Bian, W.; Zhifeng, S.; Chimin, S. Design of high precision temperature and pressure closed-loop control system for methane carbon isotope ratio measurement by laser absorption spectroscopy. Pol. J. Environ. Stud. 2022, 31, 969. [Google Scholar] [CrossRef]
- Aldhafeeri, T.; Tran, M.K.; Vrolyk, R.; Pope, M.; Fowler, M. A review of methane gas detection sensors: Recent developments and future perspectives. Inventions 2020, 5, 28. [Google Scholar] [CrossRef]
- Liu, X.; Qiao, S.; Han, G.; Liang, J.; Ma, Y. Highly sensitive HF detection based on absorption enhanced light-induced thermoelastic spectroscopy with a quartz tuning fork of receive and shallow neural network fitting. Photoacoustics 2022, 28, 100422. [Google Scholar] [CrossRef] [PubMed]
- Zhang, L.; Wang, R.L.; Liu, K.K. Study on errors correction of infrared methane sensor based on Support Vector Machines. In Proceedings of the 2009 Second International Conference on Intelligent Computation Technology and Automation, Changsha, China, 10–11 October 2009; Volume 2, pp. 471–475. [Google Scholar]
- Xu, P.; Song, K.; Xia, X.; Chen, Y.; Wang, Q.; Wei, G. Temperature and humidity compensation for MOS gas sensor based on random forests. In Intelligent Computing, Networked Control, and Their Engineering Applications; Springer: Berlin/Heidelberg, Germany, 2017; pp. 135–145. [Google Scholar]
- Wang, H.; Zhang, W.; You, L.; Yuan, G.; Zhao, Y.; Jiang, Z. Back propagation neural network model for temperature and humidity compensation of a non dispersive infrared methane sensor. Instrum. Sci. Technol. 2013, 41, 608–618. [Google Scholar] [CrossRef]
- Li, M.; Xin, F.; Shuo, Z.; Wei, W.; Gao, M. Research on CH4 gas detection and temperature correction based on TDLAS technology. Spectrosc. Spectr. Anal. 2021, 41, 3625–3631. [Google Scholar]
- Ding, Z.; Fei, M. An anomaly detection approach based on isolation forest algorithm for streaming data using sliding window. IFAC Proc. Vol. 2013, 46, 12–17. [Google Scholar] [CrossRef]
- Xue, J.; Shen, B. A novel swarm intelligence optimization approach: Sparrow search algorithm. Syst. Sci. Control Eng. 2020, 8, 22–34. [Google Scholar] [CrossRef]
- Zhang, C.; He, Y.; Qiao, S.; Ma, Y. Differential integrating sphere-based photoacoustic spectroscopy gas sensing. Opt. Lett. 2023, 48, 5089–5092. [Google Scholar] [CrossRef] [PubMed]
- Yoder, J.; Priebe, C.E. Semi-supervised k-means++. J. Stat. Comput. Simul. 2017, 87, 2597–2608. [Google Scholar] [CrossRef]
- Yang, H.; Bu, X.; Song, Y.; Shen, Y. Methane concentration measurement method in rain and fog coexisting weather based on TDLAS. Measurement 2022, 204, 112091. [Google Scholar] [CrossRef]
- Azimirad, E.; Movahhed Ghodsinya, S.R. Design of an electronic system for laser methane gas detectors using the tunable diode laser absorption spectroscopy method. J. Laser Appl. 2022, 34, 022020. [Google Scholar] [CrossRef]
- Wang, Y.; Wang, X. Temperature Compensation Algorithm of Air Quality Monitoring Equipment Based on TDLAS. Mathematics 2023, 11, 2656. [Google Scholar] [CrossRef]
- Zhang, R.; Duan, Y.; Zhao, Y.; He, X. Temperature compensation of elasto-magneto-electric (EME) sensors in cable force monitoring using BP neural network. Sensors 2018, 18, 2176. [Google Scholar] [CrossRef] [PubMed]
- Fan, Q.; Chen, Z.; Xia, Z. A novel quasi-reflected Harris hawks optimization algorithm for global optimization problems. Soft Comput. 2020, 24, 14825–14843. [Google Scholar] [CrossRef]
- Braik, M.S. Chameleon Swarm Algorithm: A bio-inspired optimizer for solving engineering design problems. Expert Syst. Appl. 2021, 174, 114685. [Google Scholar] [CrossRef]
- Bhullar, A.K.; Kaur, R.; Sondhi, S. Optimization of fractional order controllers for AVR system using distance and levy-flight based crow search algorithm. IETE J. Res. 2022, 68, 3900–3917. [Google Scholar] [CrossRef]
- Bojnordi, E.; Mousavirad, S.J.; Pedram, M.; Schaefer, G.; Oliva, D. Improving the Generalisation Ability of Neural Networks Using a Lévy Flight Distribution Algorithm for Classification Problems. N. Gener. Comput. 2023, 41, 225–242. [Google Scholar] [CrossRef]
- Wang, L.; Cao, Q.; Zhang, Z.; Mirjalili, S.; Zhao, W. Artificial rabbits optimization: A new bio-inspired meta-heuristic algorithm for solving engineering optimization problems. Eng. Appl. Artif. Intell. 2022, 114, 105082. [Google Scholar] [CrossRef]
- Yi, D.; Ahn, J.; Ji, S. An effective optimization method for machine learning based on ADAM. Appl. Sci. 2020, 10, 1073. [Google Scholar] [CrossRef]
Datasets | Temperature | Concentration/% | Samples |
---|---|---|---|
Training samples | −20~−10 °C | Measured values of 2% and 8.0% CH4 concentration | 2800 |
15~30 °C | 2800 | ||
55~65 °C | 2800 | ||
Test samples | −20~0 °C | Measured values of 0.5%, 2.0% and 8.0% CH4 concentration | 2470 |
10~30 °C | 2470 | ||
40~65 °C | 2470 |
Datasets | Temperature | Concentration/% | Samples |
---|---|---|---|
Training samples | −20~−10 °C | Measured values of 2% and 8.0% CH4 concentration | 2653 |
15~30 °C | 2694 | ||
55~65 °C | 2660 |
Nodes | 3 | 4 | 5 | 6 | 7 |
---|---|---|---|---|---|
MSE | 2.95 × 10−3 | 2.32 × 10−4 | 3.23 × 10−5 | 9.61 × 10−5 | 4.33 × 10−4 |
CH4 Concentration | Algorithm | Predicted Value of CH4 Concentration/% | ||
---|---|---|---|---|
−20~0 °C | 10~30 °C | 40~65 °C | ||
0.5% | SVM | 0.5178~0.5465 | 0.4911~0.5089 | 0.4568~0.5141 |
BP | 0.5147~0.5411 | 0.4863~0.5081 | 0.4632~0.5125 | |
Random Forest | 0.5102~0.5251 | 0.4931~0.5076 | 0.4687~0.5098 | |
PSO-BP | 0.5067~0.5113 | 0.4972~0.5041 | 0.4887~0.5052 | |
ISSA-BP | 0.4991~0.5049 | 0.4996~0.5034 | 0.4955~0.5025 | |
2.0% | SVM | 2.0623~2.1601 | 1.9963~2.0110 | 1.8633~2.0953 |
BP | 2.0798~2.1493 | 1.9981~2.0094 | 1.8895~2.0866 | |
Random Forest | 2.0312~2.1022 | 1.9961~2.0112 | 1.9411~2.0791 | |
PSO-BP | 2.0192~2.0511 | 1.9933~2.0098 | 1.9883~2.0252 | |
ISSA-BP | 1.9921~2.0182 | 1.9992~2.0105 | 1.9803~2.0098 | |
8.0% | SVM | 8.1088~8.5262 | 7.9813~8.0166 | 7.5351~8.1211 |
BP | 8.0994~8.4983 | 7.9877~8.0160 | 7.6043~8.1088 | |
Random Forest | 8.0692~8.3688 | 7.9828~8.0158 | 7.7102~8.0868 | |
PSO-BP | 8.0594~8.2003 | 7.9891~8.0136 | 7.8866~8.0534 | |
ISSA-BP | 7.9893~8.0764 | 7.9916~8.0123 | 7.9228~8.0398 |
Model | MAE (ppm) | MAPE (%) | RMSE (ppm) | R2 (%) | ||||
---|---|---|---|---|---|---|---|---|
Training | Testing | Training | Testing | Training | Testing | Training | Testing | |
SVM | 15.3743 | 22.9878 | 3.4584 | 7.0947 | 19.0161 | 28.2363 | 0.9789 | 0.9669 |
BP | 15.1560 | 21.6888 | 3.2768 | 6.6253 | 18.6892 | 24.1691 | 0.9841 | 0.9722 |
Random Forest | 13.7743 | 17.1658 | 2.9276 | 5.4241 | 15.6816 | 19.2636 | 0.9875 | 0.9788 |
PSO-BP | 6.7234 | 9.0197 | 2.4041 | 4.4661 | 9.4515 | 11.3161 | 0.9891 | 0.9872 |
ISSA-BP | 1.2813 | 1.4525 | 0.2721 | 0.2961 | 2.3101 | 2.5415 | 0.9997 | 0.9996 |
Experiment | MAE (ppm) | MAPE (%) | RMSE | R2 (%) | ||||
---|---|---|---|---|---|---|---|---|
Training | Testing | Training | Testing | Training | Testing | Training | Testing | |
Before preprocessing | 2.6793 | 2.7655 | 0.8611 | 0.9121 | 3.9123 | 4.1211 | 0.9995 | 0.9993 |
After preprocessing | 1.2813 | 1.4525 | 0.2721 | 0.2961 | 2.3101 | 2.5415 | 0.9997 | 0.9996 |
CH4 Concentration | Algorithm | Predicted Value of CH4 Concentration/% | ||
---|---|---|---|---|
−20~0 °C | 10~30 °C | 40~65 °C | ||
0.5% | BP | 0.5138~0.5356 | 0.4913~0.5077 | 0.4682~0.4965 |
Adam-BP | 0.5061~0.5198 | 0.4975~0.5052 | 0.4839~0.5093 | |
SSA-BP | 0.5022~0.5093 | 0.4991~0.5058 | 0.4916~0.4985 | |
ISSA-BP | 0.4991~0.5049 | 0.4996~0.5031 | 0.4955~0.5025 | |
2.0% | BP | 2.0541~2.1215 | 1.9896~2.0104 | 1.9033~2.0621 |
Adam-BP | 1.9872~2.0813 | 1.9965~2.0096 | 1.9104~2.0224 | |
SSA-BP | 1.9951~2.0563 | 1.9988~2.0084 | 1.9462~2.0156 | |
ISSA-BP | 1.9921~2.0182 | 1.9992~2.0081 | 1.9803~2.0098 | |
8.0% | BP | 8.0681~8.4056 | 7.9877~8.0143 | 7.6043~8.0988 |
Adam-BP | 8.0264~8.2603 | 7.9869~8.0126 | 7.7565~8.0401 | |
SSA-BP | 8.0212~8.1452 | 7.9901~8.0124 | 7.8688~8.0416 | |
ISSA-BP | 7.9893~8.0764 | 7.9916~8.0123 | 7.9228~8.0398 |
Model | MAE (ppm) | MAPE (%) | RMSE | R2 (%) | ||||
---|---|---|---|---|---|---|---|---|
Training | Testing | Training | Testing | Training | Testing | Training | Testing | |
Original | 53.3457 | 53.4697 | 15.4184 | 15.8496 | 63.9074 | 65.1288 | 0.8733 | 0.8769 |
BP | 10.0317 | 13.7018 | 3.8455 | 4.7069 | 18.9156 | 19.9067 | 0.9891 | 0.9876 |
Adam-BP | 6.3808 | 7.7659 | 2.4442 | 3.5784 | 10.4963 | 11.6771 | 0.9913 | 0.9890 |
SSA-BP | 3.3656 | 3.538 | 1.1638 | 1.2093 | 5.9081 | 6.5166 | 0.9983 | 0.9952 |
ISSA-BP | 1.2813 | 1.4525 | 0.2721 | 0.2961 | 2.3101 | 2.5415 | 0.9997 | 0.9996 |
Practicality Analysis | Descriptions | Value |
Number of parameters | Total number of weights and bias values in the model | 21 |
Additive and multiplicative operations | Total number of multiplication and addition operations during forward propagation | 21 |
Activation function operation | Number of operations using the activation function | 6 |
Forecasted time | Time taken to complete one temperature compensation prediction | 40 ms |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Yin, S.; Zou, X.; Cheng, Y.; Liu, Y. Temperature Compensation of Laser Methane Sensor Based on a Large-Scale Dataset and the ISSA-BP Neural Network. Sensors 2024, 24, 493. https://doi.org/10.3390/s24020493
Yin S, Zou X, Cheng Y, Liu Y. Temperature Compensation of Laser Methane Sensor Based on a Large-Scale Dataset and the ISSA-BP Neural Network. Sensors. 2024; 24(2):493. https://doi.org/10.3390/s24020493
Chicago/Turabian StyleYin, Songfeng, Xiang Zou, Yue Cheng, and Yunlong Liu. 2024. "Temperature Compensation of Laser Methane Sensor Based on a Large-Scale Dataset and the ISSA-BP Neural Network" Sensors 24, no. 2: 493. https://doi.org/10.3390/s24020493
APA StyleYin, S., Zou, X., Cheng, Y., & Liu, Y. (2024). Temperature Compensation of Laser Methane Sensor Based on a Large-Scale Dataset and the ISSA-BP Neural Network. Sensors, 24(2), 493. https://doi.org/10.3390/s24020493