Machine Learning for H₂S Exposure Detection with a Low-Cost MQ-136 Sensor: Signal-Stability Screening and Time-Blocked Validation

Authors

  • Mula Agung Barata Department of Informatics Engineering, Faculty of Science and Technology, University of Nahdlatul Ulama Sunan Giri, Bojonegoro, Indonesia
  • Dwi Irnawati Department of Retail Management, Faculty of Economics, University of Bojonegoro, Indonesia
  • Ifnu Wisma Dwi Prastya Department of Informatics Engineering, Faculty of Science and Technology, University of Nahdlatul Ulama Sunan Giri, Bojonegoro, Indonesia
  • Shukor Sanim Mohd Fauzi Faculty of Computer Science and Mathematics, Universiti Teknologi MARA, Perlis, Malaysia
  • Indra Dharma Wijaya Department of Business Information System, Information Technology, State Polytechnic of Malang. Indonesia

DOI:

https://doi.org/10.15408/jti.v18i2.54559

Keywords:

C4.5, electronic nose, hydrogen sulfide, MQ-136, signal-stability screening, time-blocked cross-validation

Abstract

Hydrogen sulfide (H₂S) is a toxic gas in oil and gas operations, and low-cost sensors could support continuous monitoring, but their reported accuracies can be inflated by transient responses and randomly shuffled validation. This study aimed to assess whether H₂S exposure can be distinguished from background air with a single MQ-136 sensor and how screening and validation design affect performance. The method recorded one background and one exposure session (10,000 readings, 100 windows), screened the windows by signal stability (standard deviation ≤ 0.05 ppm), leaving 66, extracted four statistical features, and compared C4.5 with a threshold baseline and five classical classifiers using time-blocked 5-fold cross-validation. The results showed that C4.5 achieved 87.8% accuracy and 96.7% H₂S recall with a single rule on the window maximum, and all classifiers except SVM performed comparably (83.3–89.4%). Without screening, C4.5 accuracy fell from 89.6% with random to 77.0% with time-blocked cross-validation. In conclusion, signal-stability screening and time-aware validation mattered more than classifier choice, although confirmation with repeated sessions is needed.

References

[1] J. E. S. Pakpahan, W. Hasan, and I. Chahaya, “Analisa Kadar H2S (Hidrogen Sulfida) Dan Keluhan Kesehatan Saluran Pernapasan Serta Keluhan Iritasi Mata Pada Masyarakat Di Kawasan Pt. Allegrindo Nusantara Desa Urung Panei Kecamatan Purba Kabupaten Simalungun Tahun 2013,” J. Kesehat. Lingkung. dan Keselam. Kerja, vol. 3, no. 2, pp. 1–9, 2014.

[2] A. W. Bande, “Analisis Penanganan Konsentrasi Hidrogen Sulfida Dalam Minyak Bumi Lapangan Tiaka Kabupaten Morowali Utara Provinsi Sulawesi Tengah,” J. Geomine, vol. 4, no. 2, 2016, doi: 10.33536/jg.v4i2.51.

[3] T. L. Guidotti, “Hydrogen sulfide: Advances in understanding human toxicity,” Int. J. Toxicol., vol. 29, no. 6, pp. 569–581, 2010, doi: 10.1177/1091581810384882.

[4] P. Migas, “PPSDM Migas Bekali ASN-nya tentang Penanganan Bahaya Gas H2S.” Accessed: Mar. 29, 2023. [Online]. Available: https://ppsdmmigas.esdm.go.id/id/Landing/lihat_berita/ZDOCitR0

[5] H. AR and R. A. Palini, “Analisis Alat Pendeteksi Gas Hidrogen Sulfida Menggunakan Hazard and Operability Study Di Perusahaan Minyak Dan Gas,” J. Tekno, vol. 19, no. 1, pp. 36–48, 2022, doi: 10.33557/jtekno.v19i1.1661.

[6] L. Capelli, S. Sironi, and R. Del Rosso, “Electronic noses for environmental monitoring applications,” Sensors, vol. 14, no. 11, pp. 19979–20007, 2014, doi: 10.3390/s141119979.

[7] Y. Xie, C. Guo, S. Devahastin, L. Jiang, M. Du, and J. Yi, “Non-destructive determination of volatile compounds and prediction of amino acid nitrogen during sufu fermentation via electronic nose in combination with machine learning approaches,” LWT, vol. 207, p. 116648, 2024, doi: 10.1016/j.lwt.2024.116648.

[8] M. A. Barata, Edi Noersasongko, Purwanto, and Moch Arief Soeleman, “Improving the Accuracy of C4.5 Algorithm with Chi-Square Method on Pure Tea Classification Using Electronic Nose,” J. RESTI (Rekayasa Sist. dan Teknol. Informasi), vol. 7, no. 2, pp. 226–235, 2023, doi: 10.29207/resti.v7i2.4687.

[9] A. Purnomo, M. A. Barata, M. A. Soeleman, and F. Alzami, “Adding feature selection on Naïve Bayes to increase accuracy on classification heart attack disease,” J. Phys. Conf. Ser., vol. 1511, no. 1, 2020, doi: 10.1088/1742-6596/1511/1/012001.

[10] F. I. Silfana and M. A. Barata, “Using K-NN Algorithm for Evaluating Feature Selection on High Dimensional Datasets,” J. Tek. Inform., vol. 17, no. 2, pp. 190–202, 2024, doi: 10.15408/jti.v17i2.40866.

[11] M. Ilmiyah, M. A. Barata, and P. E. Yuwita, “Implementation of ANN Optimization with SMOTE and Backward Elimination for PCOS Prediction,” Sci. J. Informatics, vol. 12, no. 1, pp. 133–144, 2025, doi: 10.15294/sji.v12i1.22886.

[12] P. Gite, K. Chouhan, K. Murali Krishna, C. Kumar Nayak, M. Soni, and A. Shrivastava, “ML Based Intrusion Detection Scheme for various types of attacks in a WSN using C4.5 and CART classifiers,” Mater. Today Proc., 2021, doi: 10.1016/j.matpr.2021.07.378.

[13] B. F. Tanyu, A. Abbaspour, Y. Alimohammadlou, and G. Tecuci, “Landslide susceptibility analyses using Random Forest, C4.5, and C5.0 with balanced and unbalanced datasets,” Catena, vol. 203, Aug. 2021, doi: 10.1016/j.catena.2021.105355.

[14] X. Meng, P. Zhang, Y. Xu, and H. Xie, “Construction of decision tree based on C4.5 algorithm for online voltage stability assessment,” Int. J. Electr. Power Energy Syst., vol. 118, Jun. 2020, doi: 10.1016/j.ijepes.2019.105793.

[15] S. Sundaramurthy and P. Jayavel, “A hybrid Grey Wolf Optimization and Particle Swarm Optimization with C4.5 approach for prediction of Rheumatoid Arthritis,” Appl. Soft Comput. J., vol. 94, 2020, doi: 10.1016/j.asoc.2020.106500.

[16] J. Yan et al., “Electronic nose feature extraction methods: A review,” Sensors, vol. 15, no. 11, pp. 27804–27831, 2015, doi: 10.3390/s151127804.

[17] Z. Ye, Y. Liu, and Q. Li, “Recent progress in smart electronic nose technologies enabled with machine learning methods,” Sensors, vol. 21, no. 22, p. 7620, 2021, doi: 10.3390/s21227620.

[18] L. Feng, H. Dai, X. Song, J. Liu, and X. Mei, “Gas identification with drift counteraction for electronic noses using augmented convolutional neural network,” Sensors Actuators B Chem., vol. 351, p. 130986, 2022, doi: 10.1016/j.snb.2021.130986.

[19] A. Vergara, S. Vembu, T. Ayhan, M. A. Ryan, M. L. Homer, and R. Huerta, “Chemical gas sensor drift compensation using classifier ensembles,” Sensors Actuators B Chem., vol. 166–167, pp. 320–329, 2012, doi: 10.1016/j.snb.2012.01.074.

[20] D. R. Roberts et al., “Cross-validation strategies for data with temporal, spatial, hierarchical, or phylogenetic structure,” Ecography (Cop.)., vol. 40, no. 8, pp. 913–929, 2017, doi: 10.1111/ecog.02881.

[21] C. Bergmeir and J. M. Benítez, “On the use of cross-validation for time series predictor evaluation,” Inf. Sci., vol. 191, pp. 192–213, 2012, doi: 10.1016/j.ins.2011.12.028.

[22] S. Wakhid, R. Sarno, S. I. Sabilla, and D. B. Maghfira, “Detection and classification of indonesian civet and non-civet coffee based on statistical analysis comparison using E-Nose,” Int. J. Intell. Eng. Syst., vol. 13, no. 4, pp. 56–65, 2020, doi: 10.22266/IJIES2020.0831.06.

[23] M. A. Barata et al., “Hydrogen Sulfide Leak Detection Using the C4.5 Algorithm: Optimizing Feature Extraction For Enhanced Accuracy,” AlGhazali Int. Conf., vol. 1, pp. 348–358, 2024.

[24] A. Shaposhnik, P. Moskalev, E. Sizask, S. Ryabtsev, and A. Vasiliev, “Selective detection of hydrogen sulfide and methane by a single MOX-sensor,” Sensors, vol. 19, no. 5, p. 1135, 2019, doi: 10.3390/s19051135.

[25] N. N. Viet, P. H. Phuoc, L. V. Thong, N. V. Chien, and N. V. Hieu, “A comparative study of machine learning models for identifying noxious gases through thermal fingerprint measurements and MOS sensors,” Sens. Actuators A Phys., vol. 375, p. 115510, 2024, doi: 10.1016/j.sna.2024.115510.

[26] G. Domènech-Gil and D. Puglisi, “A virtual electronic nose for the efficient classification and quantification of volatile organic compounds,” Sensors, vol. 22, no. 19, p. 7340, 2022, doi: 10.3390/s22197340.

[27] D. R. Wijaya, R. Sarno, and E. Zulaika, “DWTLSTM for electronic nose signal processing in beef quality monitoring,” Sensors Actuators, B Chem., vol. 326, no. September 2020, p. 128931, 2021, doi: 10.1016/j.snb.2020.128931.

[28] D. B. Magfira and R. Sarno, “Classification of Arabica and Robusta coffee using electronic nose,” 2018 Int. Conf. Inf. Commun. Technol. ICOIACT 2018, pp. 645–650, 2018, doi: 10.1109/ICOIACT.2018.8350725.

[29] A. I. F. Al Isyrofie et al., “Odor clustering using a gas sensor array system of chicken meat based on temperature variations and storage time,” Sens. Bio-Sensing Res., vol. 37, no. July, p. 100508, 2022, doi: 10.1016/j.sbsr.2022.100508.

[30] W. Harsono, R. Sarno, and S. I. Sabilla, “Recognition of original arabica civet coffee based on odor using electronic nose and machine learning,” Proc. - 2020 Int. Semin. Appl. Technol. Inf. Commun. IT Challenges Sustain. Scalability, Secur. Age Digit. Disruption, iSemantic 2020, pp. 333–339, 2020, doi: 10.1109/iSemantic50169.2020.9234234.

[31] J. R. Quinlan, C4.5: Programs for Machine Learning. San Mateo, CA, USA: Morgan Kaufmann, 1993.

[32] M. Hall, E. Frank, G. Holmes, B. Pfahringer, P. Reutemann, and I. H. Witten, “The WEKA data mining software: An update,” ACM SIGKDD Explor. Newsl., vol. 11, no. 1, pp. 10–18, 2009.

[33] F. Pedregosa et al., “Scikit-learn: Machine learning in Python,” J. Mach. Learn. Res., vol. 12, pp. 2825–2830, 2011.

[34] T. G. Dietterich, “Approximate Statistical Tests for Comparing Supervised Classification Learning Algorithms,” Neural Comput., vol. 10, no. 7, pp. 1895–1923, Oct. 1998, doi: 10.1162/089976698300017197.

[35] Zhengzhou Winsen Electronics Technology Co., Ltd., “Hydrogen Sulfide Gas Sensor (Model: MQ136) Manual,” Version 1.6, 2021.

Downloads

Published

2025-10-30

How to Cite

Machine Learning for H₂S Exposure Detection with a Low-Cost MQ-136 Sensor: Signal-Stability Screening and Time-Blocked Validation. (2025). JURNAL TEKNIK INFORMATIKA, 18(2), 361-373. https://doi.org/10.15408/jti.v18i2.54559