Experimental Comparison of Deployed DQN and Rule-Based Climate Controllers in Indoor Farming

Climate Performance and Electrical Energy Trade-offs

Authors

  • Raj Damanik Institut Teknologi Del
  • Samuel Abednego Sormin
  • Albert Sagala

DOI:

https://doi.org/10.54074/jicsa.v2i1.33

Keywords:

Deep Q-Network, reinforcement learning, indoor farming, climate control, electrical energy consumption

Abstract

Indoor farming requires coordinated environmental control while limiting electrical energy use. This experimental case study compares two deployed controller configurations on the same physical platform using separate 24-hour records: a fixed Deep Q-Network (DQN) policy and a hysteresis rule-based controller. The DQN used an 11-feature state, an 11-64-64-8 neural network, eight discrete actuator combinations, and operational action constraints. The deployed control intervals were 10 min for DQN and 5 min for rule-based control. Performance was evaluated using target-band compliance, midpoint mean absolute error (MAE), excursion magnitude, measured actuator electrical energy, and actuator-status telemetry. Temperature compliance was 79.86% for DQN and 77.37% for rule-based control, with midpoint MAE values of 1.10 and 1.28 °C. During lamp-on periods, CO2 compliance was 45.31% and 18.23%, with MAE values of 119.31 and 221.69 ppm, respectively. Relative-humidity regulation was limited by the absence of active dehumidification. Controller-dependent electrical energy was 4.508 kWh in the DQN window and 3.788 kWh in the rule-based window. CO2 gas consumption could not be quantified because no flow meter was installed. Because the deployments differed in date, outdoor conditions, update interval, and auxiliary operational constraints, the findings are interpreted as configuration-level field observations rather than isolated causal effects of the decision algorithms.

References

Vatistas, C., Avgoustaki, D. D., & Bartzanas, T. (2022). A systematic literature review on controlled-environment agriculture: How vertical farms and greenhouses can influence the sustainability and footprint of urban microclimate with local food production. Atmosphere, 13(8), 1258. https://doi.org/10.3390/atmos13081258

Shamshiri, R. R., Kalantari, F., Ting, K. C., Thorp, K. R., Hameed, I. A., Weltzien, C., Ahmad, D., & Shad, Z. M. (2018). Advances in greenhouse automation and controlled environment agriculture: A transition to plant factories and urban agriculture. International Journal of Agricultural and Biological Engineering, 11(1), 1-22. https://doi.org/10.25165/j.ijabe.20181101.3210

Wang, L., Xiao, M., Guo, X., Yang, Y., Zhang, Z., & Lee, C. (2024). Sensing technologies for outdoor/indoor farming. Biosensors, 14(12), 629. https://doi.org/10.3390/bios14120629

Graamans, L., Baeza, E., van den Dobbelsteen, A., Tsafaras, I., & Stanghellini, C. (2018). Plant factories versus greenhouses: Comparison of resource use efficiency. Agricultural Systems, 160, 31-43. https://doi.org/10.1016/j.agsy.2017.11.003

Cai, W., Bu, K., Zha, L., Zhang, J., Lai, D., & Bao, H. (2025). Energy consumption of plant factory with artificial light: Challenges and opportunities. Renewable and Sustainable Energy Reviews, 210, 115235. https://doi.org/10.1016/j.rser.2024.115235

Ghiasi, M., Wang, Z., Mehrandezh, M., & Paranjape, R. (2024). A systematic review of optimal and practical methods in design, construction, control, energy management and operation of smart greenhouses. IEEE Access, 12, 2830-2853. https://doi.org/10.1109/ACCESS.2023.3346436

Chen, S., Liu, A., Tang, F., Hou, P., Lu, Y., & Yuan, P. (2025). A review of environmental control strategies and models for modern agricultural greenhouses. Sensors, 25(5), 1388. https://doi.org/10.3390/s25051388

Ojo, M. O., & Zahid, A. (2022). Deep learning in controlled environment agriculture: A review of recent advancements, challenges and prospects. Sensors, 22(20), 7965. https://doi.org/10.3390/s22207965

Morales-García, J., Bueno-Crespo, A., Terroso-Sáenz, F., Arcas-Túnez, F., Martínez-España, R., & Cecilia, J. M. (2023). Evaluation of synthetic data generation for intelligent climate control in greenhouses. Applied Intelligence, 53(21), 24765-24781. https://doi.org/10.1007/s10489-023-04783-2

Wang, Y., Chen, Z., Jiang, Y., & Liu, T. (2023). High-order neural-network-based multi-model nonlinear adaptive decoupling control for microclimate environment of plant factory. Sensors, 23(19), 8323. https://doi.org/10.3390/s23198323

Hu, G., & You, F. (2023). Energy management for plant factory with deep learning and predictive control. Chemical Engineering Transactions, 103, 91-96. https://doi.org/10.3303/CET23103016

Chen, W.-H., & You, F. (2024). Decarbonization through smart energy management: Climate control in building-integrated rooftop greenhouses for urban agriculture across various climate conditions. Journal of Cleaner Production, 458, 142544. https://doi.org/10.1016/j.jclepro.2024.142544

Jeon, Y.-J., Kim, J. Y., Hwang, K.-S., Cho, W.-J., Kim, H.-J., & Jung, D.-H. (2024). Machine learning-powered forecasting of climate conditions in smart greenhouse containing netted melons. Agronomy, 14(5), 1070. https://doi.org/10.3390/agronomy14051070

Watkins, C. J. C. H., & Dayan, P. (1992). Q-learning. Machine Learning, 8, 279-292. https://doi.org/10.1007/BF00992698

Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A. A., Veness, J., Bellemare, M. G., Graves, A., Riedmiller, M., Fidjeland, A. K., Ostrovski, G., Petersen, S., Beattie, C., Sadik, A., Antonoglou, I., King, H., Kumaran, D., Wierstra, D., Legg, S., & Hassabis, D. (2015). Human-level control through deep reinforcement learning. Nature, 518, 529-533. https://doi.org/10.1038/nature14236

Ajagekar, A., Mattson, N. S., & You, F. (2023). Energy-efficient AI-based control of semi-closed greenhouses leveraging robust optimization in deep reinforcement learning. Advances in Applied Energy, 9, 100119. https://doi.org/10.1016/j.adapen.2022.100119

Morcego, B., Yin, W., Boersma, S., van Henten, E., Puig, V., & Sun, C. (2023). Reinforcement learning versus model predictive control on greenhouse climate control. Computers and Electronics in Agriculture, 215, 108372. https://doi.org/10.1016/j.compag.2023.108372

Adesanya, M. A., Obasekore, H., Rabiu, A., Na, W.-H., Ogunlowo, Q. O., Akpenpuun, T. D., Kim, M.-H., Kim, H.-T., Kang, B.-Y., & Lee, H.-W. (2024). Deep reinforcement learning for PID parameter tuning in greenhouse HVAC system energy optimization: A TRNSYS-Python cosimulation approach. Expert Systems with Applications, 252, 124126. https://doi.org/10.1016/j.eswa.2024.124126

Platero-Horcajadas, M., Pardo-Pina, S., Cámara-Zapata, J.-M., Brenes-Carranza, J.-A., & Ferrández-Pastor, F.-J. (2024). Enhancing greenhouse efficiency: Integrating IoT and reinforcement learning for optimized climate control. Sensors, 24(24), 8109. https://doi.org/10.3390/s24248109

Mallick, S., Airaldi, F., Dabiri, A., Sun, C., & De Schutter, B. (2025). Reinforcement learning-based model predictive control for greenhouse climate control. Smart Agricultural Technology, 10, 100751. https://doi.org/10.1016/j.atech.2024.100751

Yu, J., Sun, C., Zhao, J., Ma, L., Zheng, W., Xie, Q., & Wei, X. (2025). Prediction and control of greenhouse temperature: Methods, applications, and future directions. Computers and Electronics in Agriculture, 237, 110603. https://doi.org/10.1016/j.compag.2025.110603

Xiao, M., Lan, J., Yu, J., Ma, W., Xie, Q., & Sun, C. (2026). Grower-in-the-loop interactive reinforcement learning for greenhouse climate control. Computers and Electronics in Agriculture, 242, 111312. https://doi.org/10.1016/j.compag.2025.111312

Downloads

Published

2026-09-30