TY - JOUR T1 - Anomaly Detection Based on Reconstruction Error in High-Frequency Hydroponic Sensor Data AU - Arık, Kaan AU - Ağgül, Burak PY - 2026 DA - September Y2 - 2026 DO - 10.35377/saucis...1858708 JF - Sakarya University Journal of Computer and Information Sciences JO - SAUCIS PB - Sakarya University WT - DergiPark SN - 2636-8129 SP - 1092 EP - 1107 VL - 9 IS - 4 LA - en AB - In vertical farming and hydroponics, rapid changes in temperature, humidity, light, pH, and electrical conductivity raise the question of how to separate production-relevant deviations from normal operation. While previous studies have enhanced monitoring with IoT and machine learning, many approaches still rely on static thresholds and provide limited support for multivariate, high-frequency, and interpretable field monitoring. This study proposes an end-to-end framework that combines ESP32-based IoT monitoring with unsupervised anomaly detection for hydroponic vertical farming. The analyzed dataset contains seven consecutive days of synchronized 5-second measurements, corresponding to 120,960 raw records and 120,930 windowed sequences after 30-step sliding-window construction. The LSTM-Autoencoder learns normal multivariate temporal patterns and assigns each window a unified reconstruction-error score using mean squared error (MSE). Anomalies are flagged with a validation-derived statistical threshold (μ +2σ), resulting in a threshold of 0.0862 MSE and 3,454 detected anomalous windows (2.86%). To address interpretability, feature-wise reconstruction errors, event-level anomaly grouping, correlation comparison, and PCA of the LSTM latent representation are reported. The detected anomalies are short-lived and episodic rather than a sustained regime shift; 556 event-level groups were obtained, with a median duration of 25 s. Sensor contributions are broadly balanced, with humidity (20.22%), pH (20.18%), light (20.11%), EC (19.95%), and temperature (19.54%) showing no single dominant source. Additional threshold-sensitivity and controlled anomaly-injection baseline analyses clarify the robustness and limitations of the proposed pipeline. Overall, the framework is positioned as an explainable screening layer for anomaly prioritization rather than a fully validated root-cause decision system. KW - Anomaly detection KW - Hydroponic systems KW - IoT sensor networks KW - LSTM-autoencoder KW - PCA KW - Vertical farming CR - O. B. Akintuyi, “Vertical farming in urban environments: A review of architectural integration and food security,” Open Access Res. J. Biol. Pharm., vol. 10, no. 2, pp. 114–126, 2024. CR - M. S. Mir et al., “Vertical farming: The future of agriculture: A review,” Pharma Innov. J., vol. 11, no. 2S, pp. 1175–1195, 2022. CR - S. Oh and C. Lu, “Vertical farming—Smart urban agriculture for enhancing resilience and sustainability in food security,” J. Hortic. Sci. Biotechnol., vol. 98, no. 2, pp. 133–140, 2023. CR - P. Mahesh and R. Soundrapandiyan, “Yield prediction for crops by gradient-based algorithms,” PLOS ONE, vol. 19, no. 8, Art. no. e0291928, 2024. CR - F. Vizcaíno, F. Cañizares, and E. Jalón, “Internet of Things based predictive crop yield analysis: A distributed approach,” Fusion: Pract. Appl., pp. 106–113, 2023. CR - M. Hasan et al., “Ensemble machine learning-based recommendation system for effective prediction of suitable agricultural crop cultivation,” Front. Plant Sci., vol. 14, Art. no. 1234555, 2023. CR - C. Catalano et al., “Anomaly detection in smart agriculture systems,” Comput. Ind., vol. 143, Art. no. 103750, 2022. CR - A. R. de Araujo Zanella, E. da Silva, and L. C. P. Albini, “CEIFA: A multi-level anomaly detector for smart farming,” Comput. Electron. Agric., vol. 202, Art. no. 107279, 2022. CR - W. Cheng, T. Ma, X. Wang, and G. Wang, “Anomaly detection for Internet of Things time series data using generative adversarial networks with attention mechanism in smart agriculture,” Front. Plant Sci., vol. 13, Art. no. 890563, 2022. CR - A. Chatterjee and B. S. Ahmed, “IoT anomaly detection methods and applications: A survey,” Internet Things, vol. 19, Art. no. 100568, 2022. CR - N. Sirimorok, R. M. Paweroi, A. A. Arsyad, and M. Köppen, “Smart farm security by combining IoT sensor network and virtualized mycelium network,” Sensors, vol. 23, no. 21, Art. no. 8689, 2023. CR - P. S. S. de Souza et al., “Detecting abnormal sensors via machine learning: An IoT farming WSN-based architecture case study,” Measurement, vol. 164, Art. no. 108042, 2020. CR - R. Ferreira et al., “Farm-flow dataset: Intrusion detection in smart agriculture based on network flows,” Comput. Electr. Eng., vol. 121, Art. no. 109892, 2025. CR - A. Chlingaryan, S. Sukkarieh, and B. Whelan, “Machine learning approaches for crop yield prediction and nitrogen status estimation in precision agriculture: A review,” Comput. Electron. Agric., vol. 151, pp. 61–69, 2018. CR - R. Sulaiman et al., “Hybrid ensemble-based machine learning model for predicting phosphorus concentrations in hydroponic solution,” Spectrochim. Acta A, Mol. Biomol. Spectrosc., vol. 304, Art. no. 123327, 2024, doi: 10.1016/j.saa.2023.123327. [Online]. Available: https://doi.org/10.1016/j.saa.2023.123327 CR - K. Tatas et al., “Reliable IoT-based monitoring and control of hydroponic systems,” Technologies, vol. 10, no. 1, Art. no. 26, 2022. CR - S. B. Dhal et al., “An IoT-based data-driven real-time monitoring system for control of heavy metals to ensure optimal lettuce growth in hydroponic set-ups,” Sensors, vol. 23, no. 1, Art. no. 451, 2023. CR - D. I. Săcăleanu et al., “IoT-enhanced decision support system for real-time greenhouse microclimate monitoring and control,” Technologies, vol. 12, no. 11, Art. no. 230, 2024. CR - P. Christakakis et al., “Smartphone-based citizen science tool for plant disease and insect pest detection using artificial intelligence,” Technologies, vol. 12, no. 7, Art. no. 101, 2024. CR - A. Shrivastava et al., “Automatic robotic system design and development for vertical hydroponic farming using IoT and big data analysis,” Mater. Today: Proc., vol. 80, pp. 3546–3553, 2023. CR - F. Zito, N. I. Giannoccaro, R. Serio, and S. Strazzella, “Analysis and development of an IoT system for an agrivoltaics plant,” Technologies, vol. 12, no. 7, Art. no. 106, 2024. CR - K. Bakirov et al., “Application of a hybrid model for data analysis in hydroponic systems,” Technologies, vol. 13, no. 5, Art. no. 166, 2025. CR - K. Bakirov, “Datasets from IoT devices,” figshare, 2025, doi: 10.6084/m9.figshare.28667981.v1. [Online]. Available: https://doi.org/10.6084/m9.figshare.28667981.v1 CR - M. Kisten, A. E. S. Ezugwu, and M. O. Olusanya, “Explainable artificial intelligence model for predictive maintenance in smart agricultural facilities,” IEEE Access, vol. 12, pp. 24348–24367, 2024. CR - Y. Aitamar et al., “Intelligent fault detection in IoT-based WSNs for precision agriculture using machine learning,” in Proc. Int. Conf. Circuit, Syst. Commun. (ICCSC), Jun. 2025, pp. 1–5. CR - F. Rezaiezadeh Roukerd and M. M. Rajabi, “Anomaly detection in groundwater monitoring data using LSTM-autoencoder neural networks,” Environ. Monit. Assess., vol. 196, no. 8, Art. no. 692, 2024. CR - K. Singh, K. A. Momin, M. Nishal, C. Sultania, and M. Rao, “Agri-Guard: IoT-based network for agricultural health monitoring with fault detection,” in Proc. 10th Int. Conf. Internet Things, Big Data Secur. (IoTBDS), 2025, pp. 223–230, doi: 10.5220/0013209500003944. [Online]. Available: https://doi.org/10.5220/0013209500003944 CR - C. Wei, Y. Shan, and M. Zhen, “Deep learning-based anomaly detection for precision field crop protection,” Front. Plant Sci., vol. 16, Art. no. 1576756, 2025. UR - https://doi.org/10.35377/saucis...1858708 L1 - https://dergipark.org.tr/en/download/article-file/5581329 ER -