SENSOR-BASED ROOM OCCUPANCY ESTIMATION FOR SMART BUILDINGS
DOI:
https://doi.org/10.69980/ax758279Keywords:
smart buildings, occupancy estimation, environmental sensors, machine learning, Logistic RegressionAbstract
Reliable room occupancy is crucial to energy efficiency, comfort of its inhabitants, and automated operation in smart buildings. In this study, a sensor-based machine learning system framework for binary room occupancy classification based on the measurements of the environment and human activities was developed. Data from temperature, light, sound, carbon dioxide, carbon dioxide slope, and passive infrared motion sensors were recorded on a time-stamped basis every ~30 seconds for a total of 10,129 observations. First, the original occupancy count was split into occupied classes and unoccupied classes, and then the data were split chronologically into 80% training and 20% testing. Five supervised classification algorithms (Logistic Regression, Decision Tree, Random Forest, Support Vector Machine, K-Nearest Neighbors) were trained and evaluated using accuracy, precision, recall, F1-score and confusion matrix statistics. All sensor variables were significantly different for the occupied and unoccupied conditions, with light intensity, temperature, sound and carbon dioxide-related variables exhibiting the greatest discrimination. The logistic regression model has the highest accuracy of 99.85%, precision of 99.28%, recall of 99.64% and the F1 score of 99.46%. It correctly identified 274 occupied observations and 1,749 unoccupied observations with just two false positives and one false negative. The results show that by integrating several environmental sensors with an interpretable machine learning model, highly accurate, practical and computationally efficient occupancy estimation of smart building energy management and automation systems is achieved.
References
1.Abade, Bruno, David Perez Abreu, and Marilia Curado. 2018. “A Non-Intrusive Approach for Indoor Occupancy Detection in Smart Environments.” Sensors 18(11):3953.
2.Abedi, Milad, and Farrokh Jazizadeh. 2019. “Deep-Learning for Occupancy Detection Using Doppler Radar and Infrared Thermal Array Sensors.” in Proceedings of the International Symposium on Automation and Robotics in Construction (IAARC).
3.Adarsh Pal Singh, Sachin Chaudhari. 2018. “Room Occupancy Estimation.” UCI Machine Learning Repository. doi:10.24432/C5P605.
4.Aliero, Muhammad Saidu, Muhammad Asif, Imran Ghani, Muhammad Fermi Pasha, and Seung Ryul Jeong. 2022. “Systematic Review Analysis on Smart Building: Challenges and Opportunities.” Sustainability 14(5):3009.
5.Bouyakhsaine, Khadija, Abderrahim Brakez, and Mohcine Draou. 2024. “Prediction of Residential Building Occupancy Using Machine Learning with Integrated Sensor and Survey Data: Insights from a Living Lab in Morocco.” Energy and Buildings 319:114519.
6.Caballero-Peña, Juan, German Osma-Pinto, Juan M. Rey, Shaival Nagarsheth, Nilson Henao, and Kodjo Agbossou. 2024. “Analysis of the Building Occupancy Estimation and Prediction Process: A Systematic Review.” Energy and Buildings 313:114230.
7.Chen, Zhenghua, Chaoyang Jiang, and Lihua Xie. 2018. “Building Occupancy Estimation and Detection: A Review.” Energy and Buildings 169:260–70.
8.Daissaoui, Abdellah, Azedine Boulmakoul, Lamia Karim, and Ahmed Lbath. 2020. “IoT and Big Data Analytics for Smart Buildings: A Survey.” Procedia Computer Science 170:161–68.
9.Elkhoukhi, H., M. Bakhouya, A. Elmouatamid, D. El Ouadghiri, and J. Gaber. 2025. “A Review of Occupancy Sensing Technologies and Approaches in Smart Buildings.” International Journal of RF Technologies: Research and Applications 15(1):19–48. doi:10.3233/RFT-240006.
10.Elkhoukhi, Hamza, Y. NaitMalek, Anass Berouine, Mohamed Bakhouya, D. Elouadghiri, and Mohammed Essaaidi. 2018. “Towards a Real-Time Occupancy Detection Approach for Smart Buildings.” Procedia Computer Science 134:114–20.
11.Kao, Yu-Wei, Hooman Samani, Shu-Chiao Tasi, Brian Jalaian, Niranjan Suri, and Mike Lee. 2019. “Intelligent Search, Rescue, and Disaster Recovery via Internet of Things.” Pp. 1–7 in 2019 Global IoT Summit (GIoTS). IEEE.
12.Li, Jiaxuan, Zhen Yang, Xu Zhao, Yu Li, Xiaowen Huang, Yihan Chen, and Fangzhou Shi. 2024. “Study of the Correlation between the Urban Wind–Heat Environment and Urban Development Elements in High-Density Urban Areas: A Case Study of Central Shanghai.” Buildings 14(2):315.
13.Lu, Chujie. 2024. “Enhancing Real-Time Nonintrusive Occupancy Estimation in Buildings via Knowledge Fusion Network.” Energy and Buildings 303:113812.
14.Pratama, Azkario Rizky, Widyawan Widyawan, Alexander Lazovik, and Marco Aiello. 2018. “Multi-User Low Intrusive Occupancy Detection.” Sensors 18(3):796.
15.Rejeb, Abderahman, Karim Rejeb, Steve Simske, Horst Treiblmaier, and Suhaiza Zailani. 2022. “The Big Picture on the Internet of Things and the Smart City: A Review of What We Know and What We Need to Know.” Internet of Things 19:100565.
16.Shokrollahi, Azad, Fredrik Karlsson, Reza Malekian, Jan A. Persson, and Arezoo Sarkheyli-Hägele. 2025. “Non-Invasive Occupancy Estimation and Space Utilization in Smart Buildings: Leveraging Machine Learning with PIR Sensors and Booking Data.” Internet of Things 101777.
17.Shokrollahi, Azad, Jan A. Persson, Reza Malekian, Arezoo Sarkheyli-Hägele, and Fredrik Karlsson. 2024. “Passive Infrared Sensor-Based Occupancy Monitoring in Smart Buildings: A Review of Methodologies and Machine Learning Approaches.” Sensors 24(5):1533.
18.Tanko, Bruno Lot, Emmanuel A. Essah, Olakunle Elijah, Wyom Paul Zakka, and Mustafa Klufallah. 2023. “Bibliometric Analysis, Scientometrics and Metasynthesis of Internet of Things (IoT) in Smart Buildings.” Built Environment Project and Asset Management 13(5):646–65.
19.Telaga, Abdi Suryadinata, Salmaa Rihhadatul ’Aisy, and Sekar Putri Arumi. 2024. “Occupancy Detection through Machine Learning and Environmental Data.” P. 020120 in AIP Conference Proceedings. Vol. 2926. AIP Publishing LLC.
20.Toutiaee, Mohammadhossein. 2021. “Occupancy Detection in Room Using Sensor Data.”
21.Zeleny, Ondrej, Tomas Fryza, Tomas Bravenec, Shoaib Azizi, and Gireesh Nair. 2024. “Detection of Room Occupancy in Smart Buildings.” Radioengineering 33(3):432.
22.Zhang, Ruiqi, Jing Hou, Florian Walter, Shangding Gu, Jiayi Guan, Florian Röhrbein, Yali Du, Panpan Cai, Guang Chen, and Alois Knoll. 2024. “Multi-Agent Reinforcement Learning for Autonomous Driving: A Survey.”
23.Zhao, Hengyang, Qi Hua, Hai-Bao Chen, Yaoyao Ye, Hai Wang, Sheldon X. D. Tan, and Esteban Tlelo-Cuautle. 2018. “Thermal-Sensor-Based Occupancy Detection for Smart Buildings Using Machine-Learning Methods.” ACM Transactions on Design Automation of Electronic Systems 23(4):1–21. doi:10.1145/3200904.
24.Zong, Haiyi, Wen Yi, Albert P. C. Chan, Hanyue Yang, Peng Wu, and Bo Xiao. 2025. “Developing a Fatigue Model for Construction Workers: An Interpretable Machine Learning Approach.” Journal of Management in Engineering 41(4):04025025. doi:10.1061/JMENEA.MEENG-6662.





