MICROSERVICE-BASED ADAPTIVE INDOOR MICROCLIMATE CONTROL SYSTEM USING LSTM FORECASTING
DOI:
https://doi.org/10.32782/mathematical-modelling/2025-8-2-32Keywords:
microservice architecture, monitoring, neural network, distributed systems, machine learning, IoTAbstract
Maintaining stable indoor microclimate conditions is a critical challenge in smart buildings, precision agriculture, and industrial environments, where traditional centralized control systems often fail to provide sufficient flexibility, scalability, and resilience under dynamically changing conditions. This study proposes a microservice-based adaptive microclimate control system that integrates real-time IoT sensing, distributed service orchestration, and machine- learning-driven forecasting to enable proactive environmental management. The research methodology combines system-level domain analysis, architectural decomposition into autonomous microservices, implementation of lightweight communication mechanisms based on REST and MQTT protocols, containerized deployment using Docker technologies, and empirical evaluation of a functional prototype. The proposed system architecture separates data acquisition, storage, analytics, decision-making, actuator control, and monitoring into independent services, ensuring loose coupling, fault isolation, and independent horizontal scaling. Such decomposition enables continuous system evolution and flexible adaptation to varying operational scenarios without service interruption. A central contribution of the work is the integration of an analytical microservice utilizing Long Short-Term Memory (LSTM) neural networks for forecasting temperature and humidity parameters. Sensor streams undergo preprocessing, normalization, and aggregation before being used for predictive modeling, allowing the control subsystem to anticipate future environmental changes and execute preventive actions rather than reactive responses. Experimental evaluation demonstrated stable system performance with end-to-end response latency below two seconds under realistic workloads. The forecasting module achieved strong predictive accuracy, with determination coefficients of approximately R² = 0.90 for temperature and R² = 0.94 for humidity, while maintaining low prediction errors (MAE of 0.21 °C and 0.56 %, respectively). These results confirm that integrating predictive analytics into a microservice architecture significantly improves environmental stability and energy efficiency. The proposed approach demonstrates the feasibility and practical effectiveness of combining microservice- based software engineering principles with intelligent data-driven control strategies. The developed solution is suitable for deployment in smart buildings, indoor farms, and industrial facilities requiring scalable, resilient, and adaptive microclimate management systems.
References
Hadj Abdelkader O., Bouzebiba H., Pena D., Aguiar A. P. Energy-Efficient IoT-Based Light Control System in Smart Indoor Agriculture. Sensors. 2023. Т. 23, № 18. С. 7670. DOI: 10.3390/s23187670. PMID: 37765728; PMCID: PMC10534542
Lork C., Cubillas M., Ng B. K. K., Yuen C., Tan M. Minimizing electricity cost through intelligent lighting control for indoor plant factories. IECON 2020 – The 46th Annual Conference of the IEEE Industrial Electronics Society, Singapore, 18–21 October 2020. С. 297–302. DOI: 10.1109/IECON43393.2020.9255061
Аксак Н., Кушнарьов М., Шеліхов Ю. Інтелектуальне керування мікрокліматом сіті- ферми на основі алгоритму Q-learning. Advanced Information Technology. 2024. Т. 1, № 3. С. 12–24. DOI: 10.17721/AIT.2024.1.02
Шеліхов Ю. О., Аксак Н. Г. Архітектура системи контролю мікроклімату у замкнутому приміщенні. Grail of Science. 2023. № 24 С. 296–301. DOI: https://doi.org/10.36074/grail-of-science.17.02.2023.055
Afzali S., Bao Y., Van Iersel M. W., Velni J. M. Optimal lighting control in greenhouses using Bayesian neural networks for sunlight prediction. 2022 European Control Conference (ECC), London, 12–15 July 2022. С. 1140–1145. DOI: https://doi.org/10.48550/arXiv.2205.03733
Afzali S., Mosharafian S., Van Iersel M. W., Velni J. M. Optimal lighting control in greenhouses equipped with high-intensity discharge lamps using reinforcement learning. 2021 American Control Conference (ACC), New Orleans, 25–28 May 2021. С. 1414–1419. DOI: 10.23919/ACC50511.2021.9482964
Mosharafian S., Afzali S., Weaver G. M., Van Iersel M., Velni J. M. Optimal lighting control in greenhouse by incorporating sunlight prediction. Computers and Electronics in Agriculture. 2021. Т. 188. С. 106300. DOI: https://doi.org/10.1016/j.compag.2021.106300
Ajagekar A., Mattson N. S., You F. Energy-efficient AI-based control of semi-closed greenhouses leveraging robust optimization in deep reinforcement learning. Advances in Applied Energy. 2023. Т. 9. С. 100119. DOI: https://doi.org/10.1016/j.adapen.2022.100119
Van Laatum B., Van Henten E. J., Boersma S. GreenLight-Gym: A reinforcement learning benchmark environment for greenhouse crop production control. arXiv preprint. 2024. arXiv:2410.05336. DOI: https://doi.org/10.48550/arXiv.2410.05336
Hati A. J., Singh R. R. Smart indoor farms: Leveraging technological advancements to power a sustainable agricultural revolution. AgriEngineering. 2021. Т. 3, № 4. С. 728–767. DOI: https://doi.org/10.3390/agriengineering3040047
Lozano-Castellanos, L. F., Navas-Gracia, L. M., Lozano-Castellanos, I. C., Correa-Guimaraes, A. Technologies Applied to Artificial Lighting in Indoor Agriculture: A Review. Sustainability. 2025. Т. 17, № 7. С. 3196. DOI: https://doi.org/10.3390/su17073196







