Lightweight Hybrid SVM-LSTM Edge AI for Real-Time Smart Greenhouse Anomaly Detection

Authors

  • Irfan Fahmi Ahmadi Telkom University, Indonesia
  • Seno Adi Putra Telkom University, Indonesia
  • Atam Rifa'i Sujiwanto PLN UP3 Tolitoli, Indonesia

DOI:

https://doi.org/10.30983/knowbase.v6i1.11389

Keywords:

smart greenhouse, edge AI, lightweight machine learning, Hybrid SVM-LSTM, real-time detection

Abstract

Smart greenhouse systems require an artificial intelligence model that can transform sensor records into real-time abnormal-condition decisions while remaining practical for edge computing devices. This paper proposes a lightweight Hybrid SVM-LSTM Edge AI model for real-time smart greenhouse anomaly detection. The model integrates packet validation, deterministic feature fusion, SVM-based discriminative scoring, and LSTM temporal sequence learning to classify greenhouse states as normal or abnormal. The feature representation combines current sensor values, short-term sensor changes, sampling-gap information, and daily periodic patterns so that the model can capture both instantaneous conditions and recent environmental transitions. Using the IoT Agriculture 2024 smart greenhouse dataset, the evaluation compares several Hybrid SVM-LSTM and LSTM-only configurations under proxy labels for actuator-relevant abnormal states. The refined water-related proxy achieved 0.979 accuracy, 0.763 precision, 0.690 recall, and a 0.725 F1-score with 1.142 ms P95 inference time. The broader NPK-gap proxy achieved 0.983 accuracy, 0.886 precision, 0.549 recall, and a 0.678 F1-score with 1.448 ms P95 inference time. These results indicate that the proposed Hybrid SVM-LSTM model is sufficiently compact and accurate for real-time anomaly detection at the edge, especially when proxy-label design and threshold selection are aligned with the target greenhouse condition.

References

[1] M. S. Farooq, S. Riaz, A. Abid, K. Abid, and M. A. Naeem, “A Survey on the Role of IoT in Agriculture for the Implementation of Smart Farming,” 2019, Institute of Electrical and Electronics Engineers Inc. doi: 10.1109/ACCESS.2019.2949703.

[2] C. Bersani, C. Ruggiero, R. Sacile, A. Soussi, and E. Zero, “Internet of Things Approaches for Monitoring and Control of Smart Greenhouses in Industry 4.0,” Energies (Basel)., vol. 15, no. 10, p. 3834, May 2022, doi: 10.3390/en15103834.

[3] C. Maraveas, D. Piromalis, K. G. Arvanitis, T. Bartzanas, and D. Loukatos, “Applications of IoT for optimized greenhouse environment and resources management,” Comput. Electron. Agric., vol. 198, p. 106993, Jul. 2022, doi: 10.1016/j.compag.2022.106993.

[4] M. A. Zamora-Izquierdo, J. Santa, J. A. Martínez, V. Martínez, and A. F. Skarmeta, “Smart farming IoT platform based on edge and cloud computing,” Biosyst. Eng., vol. 177, pp. 4–17, Jan. 2019, doi: 10.1016/j.biosystemseng.2018.10.014.

[5] W. Shi, J. Cao, Q. Zhang, Y. Li, and L. Xu, “Edge Computing: Vision and Challenges,” IEEE Internet Things J., vol. 3, no. 5, pp. 637–646, Oct. 2016, doi: 10.1109/JIOT.2016.2579198.

[6] Sapna, H. Gauttam, V. Chauhan, K. K. Pattanaik, A. Trivedi, and H. Ghosh, “A comprehensive review of Edge Computing empowered smart agriculture: Trends, Opportunities and Future directions,” Comput. Electron. Agric., vol. 241, p. 111252, Feb. 2026, doi: 10.1016/j.compag.2025.111252.

[7] P. Yu, F. Teng, W. Zhu, C. Shen, Z. Chen, and J. Song, “Cloud–edge–device collaborative computing in smart agriculture: architectures, applications, and future perspectives,” Front. Plant Sci., vol. 16, Oct. 2025, doi: 10.3389/fpls.2025.1668545.

[8] S. Iftikhar et al., “AI-based fog and edge computing: A systematic review, taxonomy and future directions,” Internet of Things, vol. 21, p. 100674, Apr. 2023, doi: 10.1016/j.iot.2022.100674.

[9] M. El Jarroudi et al., “Leveraging edge artificial intelligence for sustainable agriculture,” Nat. Sustain., vol. 7, no. 7, pp. 846–854, Jun. 2024, doi: 10.1038/s41893-024-01352-4.

[10] M. N. Akhtar, A. J. Shaikh, A. Khan, H. Awais, E. A. Bakar, and A. R. Othman, “Smart Sensing with Edge Computing in Precision Agriculture for Soil Assessment and Heavy Metal Monitoring: A Review,” Agriculture, vol. 11, no. 6, p. 475, May 2021, doi: 10.3390/agriculture11060475.

[11] J. Morales-García, D. Padilla-Quimbiulco, M. Cantabella, B. Ayuso, A. Muñoz, and J. M. Cecilia, “GreenhouseGuard: Enabling real-time warning prediction for smart greenhouse management,” J. Ambient Intell. Smart Environ., vol. 16, no. 3, pp. 389–405, Sep. 2024, doi: 10.3233/AIS-230359.

[12] B. Ravelo, M. Guerin, L. Rajaoarisoa, and W. Rahajandraibe, “Low-Pass NGD Digital Circuit Application for Real-Time Greenhouse Temperature Prediction,” IEEE Transactions on Circuits and Systems II: Express Briefs, vol. 70, no. 9, pp. 3709–3713, Sep. 2023, doi: 10.1109/TCSII.2023.3276389.

[13] L. Zeping, N. Abdullah, and M. K. Ishak, “Smart greenhouse climate control with real-time fault detection and energy-aware automation,” Smart Agricultural Technology, vol. 13, p. 101707, Mar. 2026, doi: 10.1016/j.atech.2025.101707.

[14] B. Toskov and A. Toskova, “AgroNova: An Autonomous IoT Platform for Greenhouse Climate Control,” Sensors, vol. 26, no. 6, p. 1861, Mar. 2026, doi: 10.3390/s26061861.

[15] M. Platero-Horcajadas, S. Pardo-Pina, J.-M. Cámara-Zapata, J.-A. Brenes-Carranza, and F.-J. Ferrández-Pastor, “Enhancing Greenhouse Efficiency: Integrating IoT and Reinforcement Learning for Optimized Climate Control,” Sensors, vol. 24, no. 24, p. 8109, Dec. 2024, doi: 10.3390/s24248109.

[16] U. Ristian, I. Ruslianto, H. Hasfani, and K. Sari, “Perancangan Arsitektur Node Nirkabel dalam Efisiensi Bandwidth Smart Greenhouse Berbasis Protokol MQTT,” Jurnal Edukasi dan Penelitian Informatika (JEPIN), vol. 9, no. 2, p. 218, Aug. 2023, doi: 10.26418/jp.v9i2.63885.

[17] A. Zaguia, “Smart greenhouse management system with cloud-based platform and IoT sensors,” Spatial Information Research, vol. 31, no. 5, pp. 559–571, Oct. 2023, doi: 10.1007/s41324-023-00523-3.

[18] G. Airlangga, J. Bata, O. I. Adi Nugroho, and B. H. P. Lim, “Hybrid CNN-LSTM Model with Custom Activation and Loss Functions for Predicting Fan Actuator States in Smart Greenhouses,” AgriEngineering, vol. 7, no. 4, p. 118, Apr. 2025, doi: 10.3390/agriengineering7040118.

[19] M. U. Tariq, S. M. Saqib, T. Mazhar, M. A. Khan, T. Shahzad, and H. Hamam, “Edge-enabled smart agriculture framework: Integrating IoT, lightweight deep learning, and agentic AI for context-aware farming,” Results in Engineering, vol. 28, p. 107342, Dec. 2025, doi: 10.1016/j.rineng.2025.107342.

[20] S. Heydari and Q. H. Mahmoud, “Tiny Machine Learning and On-Device Inference: A Survey of Applications, Challenges, and Future Directions,” Sensors, vol. 25, no. 10, p. 3191, May 2025, doi: 10.3390/s25103191.

[21] M. J. C. S. Reis, “Lightweight Signal Processing and Edge AI for Real-Time Anomaly Detection in IoT Sensor Networks,” Sensors, vol. 25, no. 21, p. 6629, Oct. 2025, doi: 10.3390/s25216629.

[22] “Advanced IoT Agriculture 2024.” Accessed: Jun. 14, 2026. [Online]. Available: https://www.kaggle.com/datasets/wisam1985/advanced-iot-agriculture-2024/data

[23] X.-B. Jin et al., “Deep-Learning Temporal Predictor via Bidirectional Self-Attentive Encoder–Decoder Framework for IOT-Based Environmental Sensing in Intelligent Greenhouse,” Agriculture, vol. 11, no. 8, p. 802, Aug. 2021, doi: 10.3390/agriculture11080802.

[24] Z. Guo and L. Feng, “Multi-step prediction of greenhouse temperature and humidity based on temporal position attention LSTM,” Stochastic Environmental Research and Risk Assessment, vol. 38, no. 12, pp. 4907–4934, Dec. 2024, doi: 10.1007/s00477-024-02840-x.

[25] 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, Jun. 2022, doi: 10.3389/fpls.2022.890563.

[26] Y.-C. Tung, N. W. Syahputri, and I. G. N. A. S. Diputra, “Greenhouse Environment Sentinel with Hybrid LSTM-SVM for Proactive Climate Management,” AgriEngineering, vol. 7, no. 4, p. 96, Apr. 2025, doi: 10.3390/agriengineering7040096.

[27] T. Tanyıldızı Ağır, “Daily Global Solar Radiation Prediction with Hybrid LSTM-SVM:The Case of Nusaybin,” Arab. J. Sci. Eng., Mar. 2025, doi: 10.1007/s13369-025-10322-7.

[28] D. Fährmann, N. Damer, F. Kirchbuchner, and A. Kuijper, “Lightweight Long Short-Term Memory Variational Auto-Encoder for Multivariate Time Series Anomaly Detection in Industrial Control Systems,” Sensors, vol. 22, no. 8, p. 2886, Apr. 2022, doi: 10.3390/s22082886.

[29] A. de la Cruz Huayanay, J. L. Bazán, and C. M. Russo, “Performance of evaluation metrics for classification in imbalanced data,” Comput. Stat., Aug. 2024, doi: 10.1007/s00180-024-01539-5.

[30] J.-G. Gaudreault and P. Branco, “Empirical analysis of performance assessment for imbalanced classification,” Mach. Learn., vol. 113, no. 8, pp. 5533–5575, Aug. 2024, doi: 10.1007/s10994-023-06497-5.

[31] M. Adkisson, J. C. Kimmell, M. Gupta, and M. Abdelsalam, “Autoencoder-based Anomaly Detection in Smart Farming Ecosystem,” in 2021 IEEE International Conference on Big Data (Big Data), IEEE, Dec. 2021, pp. 3390–3399. doi: 10.1109/BigData52589.2021.9671613.

[32] R. Zhang, L. Zhou, A. Mei, and Y. He, “Sensor Monitoring Techniques in Edge Computing Using Spatio-Temporal Correlation Anomaly Detection Algorithms,” IEEE Access, vol. 12, pp. 116516–116529, 2024, doi: 10.1109/ACCESS.2024.3444046.

[33] R. Benameur, A. Dahane, B. Kechar, and A. E. H. Benyamina, “An Innovative Smart and Sustainable Low-Cost Irrigation System for Anomaly Detection Using Deep Learning,” Sensors, vol. 24, no. 4, p. 1162, Feb. 2024, doi: 10.3390/s24041162.

Published

2026-06-30

How to Cite

Fahmi Ahmadi, I., Seno Adi Putra, & Atam Rifa'i Sujiwanto. (2026). Lightweight Hybrid SVM-LSTM Edge AI for Real-Time Smart Greenhouse Anomaly Detection. Knowbase : International Journal of Knowledge in Database, 6(1). https://doi.org/10.30983/knowbase.v6i1.11389

Issue

Section

Articles

Citation Check