Anomaly Detection Based on Reconstruction Error in High-Frequency Hydroponic Sensor Data
In vertical farming and hydroponics, the simultaneous and rapid changes in environmental parameters such as temperature, humidity, light, pH, and electrical conductivity in controlled environment systems raise the question of how to reliably separate deviations that risk production from normal operation. While previous studies have enhanced monitoring with IoT and machine learning, most approaches rely on static thresholds and struggle to address multivariate interactions in high-frequency data and explainable field-related outputs under the same framework. This study proposes an end-to-end framework that combines real-time environmental monitoring with unsupervised anomaly detection in hydroponic vertical farming. Data was collected from multiple sensors deployed within the facility using an ESP32-based IoT network at a sampling frequency of 0.2 Hz in 5-second cycles, transferred to an end server via Wi-Fi/HTTP, and stored as timestamped CSV records. For anomaly detection, the LSTM-Autoencoder was used to encode and reconstruct multivariate sequences derived from 30-step sliding windows. Sample-based reconstruction error (MSE) outputs were evaluated, and normal/anomaly labeling was performed using a statistical threshold derived from the error distribution (μ+2σ; a sample threshold is 0.079 MSE). Subsequently, the five-dimensional sensor space was reduced to three principal components using PCA, and the spatial separation of normal and anomaly samples was visualized. The findings show that the MSE generally follows a stable band, but short-term peak values indicate episodic deviations. Sensor contribution and correlation analyses reveal that anomalies are particularly concentrated along the light and humidity axes, and measurable shifts in sensor relationships occur during anomaly moments. In conclusion, the proposed approach demonstrates that it offers a monitoring layer that can support alarm prioritization and maintenance/operation decisions, going beyond generating early warnings.
Authors
- Burak AĞGÜL (ORCID: https://orcid.org/0000-0002-9183-1568)
- Kaan ARIK (ORCID: https://orcid.org/0000-0002-0930-8955)
Institutions
- Istanbul Topkapi University (TR)
- Sakarya Uygulamalı Bilimler Üniversitesi
Publication Details
- Journal
- Sakarya University Journal of Computer and Information Sciences
- Published
- 2026-09-30
- DOI
- https://doi.org/10.35377/saucis...1858708
- Primary Topic
- Water Quality Monitoring Technologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00