LSTM-Based Soft Sensor for Anomaly Detection in AWS Temperature and Humidity Data

Authors

  • Muhamad Dzakwan Firdaus College of Meteorology, Climatology, and Geophysics (STMKG)
  • Muchammad Rizqy Nugraha College of Meteorology, Climatology, and Geophysics (STMKG)
  • Maulana Putra College of Meteorology, Climatology, and Geophysics (STMKG)
  • Marzuki Sinambela College of Meteorology, Climatology, and Geophysics (STMKG)
  • Dibyo Susanto College of Meteorology, Climatology, and Geophysics (STMKG)

DOI:

https://doi.org/10.29303/goescienceed.v7i4.3311

Keywords:

Anomaly Detection, Soft-Sensor, LSTM, CUSUM, Automatic Weather Station

Abstract

Temperature and relative humidity records from an Automatic Weather Station (AWS) may contain missing values, abrupt deviations, or gradual shifts that are difficult to judge from a single observation. This study develops an LSTM-based soft-sensor that estimates the next temperature and humidity values from recent AWS observations. The difference between the observed and estimated values is treated as a residual. A P95 threshold is used for spike detection, while Two-Sided CUSUM is evaluated separately for gradual drift. The model was deployed as TensorFlow Lite on a Raspberry Pi 5 and evaluated using operational data from BMKG Soekarno-Hatta. On the test set, R² reached 0.9944 for temperature and 0.9705 for humidity. During the 13-day operational evaluation with 1,842 stored records, P95-based detection produced an F1-score of 96.29% and FAR of 1.83% for temperature, and an F1-score of 92.29% and FAR of 4.79% for humidity. CUSUM detected drift in both evaluation windows, but its false-alarm rate and detection delay changed markedly between periods. The results support residual-based monitoring on edge hardware while showing that CUSUM still needs further calibration before use as a primary operational alarm.

References

Buelvas, J., Múnera, D., Tobón V, D. P., Aguirre, J., & Gaviria, N. (2023, April 1). Data Quality in IoT-Based Air Quality Monitoring Systems: a Systematic Mapping Study. Water, Air, and Soil Pollution, Vol. 234. Institute for Ionics. https://doi.org/10.1007/s11270-023-06127-9

D’Agostino, P., Violante, M., & MacArio, G. (2024). Optimizing Lstm-Based Temperature Prediction Algorithm for Embedded System Deployment. IEEE International Conference on Emerging Technologies and Factory Automation, ETFA. Institute of Electrical and Electronics Engineers Inc. https://doi.org/10.1109/ETFA61755.2024.10711142

Imran, Zuhairi, M. F. A., Ali, S. M., Shahid, Z., Alam, M. M., & Su’ud, M. M. (2023). Improving Reliability for Detecting Anomalies in the MQTT Network by Applying Correlation Analysis for Feature Selection Using Machine Learning Techniques. Applied Sciences (Switzerland), 13(11). https://doi.org/10.3390/app13116753

Javed, A., Ehtsham, A., Jawad, M., Awais, M. N., Qureshi, A. U. H., & Larijani, H. (2024). Implementation of Lightweight Machine Learning-Based Intrusion Detection System on IoT Devices of Smart Homes. Future Internet, 16(6). https://doi.org/10.3390/fi16060200

Komadina, A., Martinić, M., Groš, S., & Mihajlović, Ž. (2024). Comparing Threshold Selection Methods for Network Anomaly Detection. IEEE Access, 12, 124943–124973. https://doi.org/10.1109/ACCESS.2024.3452168

Liu, Y., Ni, D., & Wang, Z. (2024). A Fault-Tolerant Soft Sensor Algorithm Based on Long Short-Term Memory Network for Uneven Batch Process. Processes, 12(3). https://doi.org/10.3390/pr12030495

Lopes, J. F., Barbon Junior, S., & de Melo, L. F. (2025). Online Meta-Recommendation of CUSUM Hyperparameters for Enhanced Drift Detection. Sensors, 25(9). https://doi.org/10.3390/s25092787

Maleki, S., Maleki, S., & Jennings, N. R. (2021). Unsupervised anomaly detection with LSTM autoencoders using statistical data-filtering. Applied Soft Computing, 108. https://doi.org/10.1016/j.asoc.2021.107443

Muñoz-Molina, L. J., Cazorla-Piñar, I., Dominguez-Morales, J. P., Lafuente, L., & Perez-Peña, F. (2022). Real-time detection of uncalibrated sensors using neural networks. Neural Computing and Applications, 34(10), 8227–8239. https://doi.org/10.1007/s00521-021-06865-z

Noh, S. H., & Moon, H. J. (2023). Anomaly Detection Based on LSTM Learning in IoT-Based Dormitory for Indoor Environment Control. Buildings, 13(11). https://doi.org/10.3390/buildings13112886

Riaz, M., Alshammari, H., Abbas, N., & Mahmood, T. (2025). Navigating Process Drift: The Power of CUSUM in Monitoring Air Quality Processes and Maintenance Operations. Arabian Journal for Science and Engineering, 50(14), 11145–11166. https://doi.org/10.1007/s13369-024-09453-0

Santoso, B., Ryan, M., Subyantara Wicaksana, H., Ananda, N., Budiawan, I., Mukhlish, F., & Kurniadi, D. (2023). Predictive Maintenance: Automatic Weather Station Sensors Error Detection using Long Short-Term Memory. Ultima Computing : Jurnal Sistem Komputer, 15(2), 41.

Wicaksana, H. S., & Putra, M. (2021). Evaluasi Kinerja Automatic Weather Station Berdasarkan Pengamatan Paralel di Stasiun Meteorologi Kemayoran. Seminar Nasional Teknik Elektro, 6, 59–64. Retrieved from https://prosiding.pnj.ac.id/index.php/SNTE/article/view/910

Downloads

Published

2026-10-08

How to Cite

Firdaus, M. D., Nugraha, M. R., Putra, M., Sinambela, M., & Susanto, D. (2026). LSTM-Based Soft Sensor for Anomaly Detection in AWS Temperature and Humidity Data. Jurnal Pendidikan, Sains, Geologi, Dan Geofisika (GeoScienceEd Journal), 7(4), 6122–6128. https://doi.org/10.29303/goescienceed.v7i4.3311