Classroom Occupancy Monitoring System using IoT Device and the k-Nearest Neighbors Algorithm

Yarnish Dwi Sagita Fidarliyan(1), Agung Budi Prasetijo(2), Dania Eridani(3),


(1) Universitas Diponegoro
(2) Universitas Diponegoro
(3) Universitas Diponegoro

Abstract

The occupancy monitoring system is one of the substantial aspects of building management. Through monitoring the occupancy in the area in a building, the obtained information can be used for building management purposes such as controlling indoor area air quality and improving building security. Some technologies such as video surveillance cameras, Radio Frequency Identification (RFID), and motion sensors have been used in the occupancy monitoring system. However, those technologies pose several disadvantages including privacy concerns and limited information generated. A classroom occupancy monitoring system using an Internet of Things (IoT) device and the k-Nearest Neighbors (k-NN) algorithm was built to monitor classroom occupancy by classifying the number of occupants based on classroom environmental data into occupancy levels by using the k-NN classifier model. By utilizing IoT devices, CO2, temperature, and humidity data in a naturally ventilated classroom were recorded using the MQ-135 and BME280 sensors, as well as WiFi-based NodeMCU, was used to distribute data to the cloud. The collected data were trained and tested by the k-NN algorithm to produce a k-NN classifier model. From the tests conducted, the performance of the k-NN classifier model in classifying the number of occupants into occupancy levels resulted in an accuracy of 88%. In addition, the proposed system also produces a web-based classroom occupancy monitoring application that has been integrated with the k-NN classifier model so the classification can be done for real-time data and monitored directly.

Keywords

IoT; k-NN; occupancy levels; occupancy monitoring system

Full Text:

PDF

References

K. Rastogi and D. Lohani, “IoT-based Indoor Occupancy Estimation Using Edge Computing,” Procedia Comput. Sci., vol. 171, pp. 1943–1952, Jan. 2020, doi: 10.1016/j.procs.2020.04.208.

V. Chidurala and X. Li, “Occupancy Estimation Using Thermal Imaging Sensors and Machine Learning Algorithms,” IEEE Sens. J., vol. 21, no. 6, pp. 8627–8638, 2021, doi: 10.1109/JSEN.2021.3049311.

A. Vela, J. Alvarado-Uribe, M. Davila, N. Hernandez-Gress, and H. G. Ceballos, “Estimating Occupancy Levels in Enclosed Spaces Using Environmental Variables: A Fitness Gym and Living Room as Evaluation Scenarios,” Sensors (Switzerland), vol. 20, no. 22, pp. 1–21, 2020, doi: 10.3390/s20226579.

J. Wang, N. C. F. Tse, T. Y. Poon, and J. Y. C. Chan, “A Practical Multi-sensor Cooling Demand Estimation Approach Based on Visual, Indoor and Outdoor Information Sensing,” Sensors (Switzerland), vol. 18, no. 11, p. 3591, 2018, doi: 10.3390/s18113591.

K. Mjörnell, D. Johansson, and H. Bagge, “The Effect of High Occupancy Density on IAQ, Moisture Conditions and Energy Use in Apartments,” Energies, vol. 12, no. 23, pp. 1–11, 2019, doi: 10.3390/en12234454.

P. Anand, C. Deb, K. Yan, J. Yang, D. Cheong, and C. Sekhar, “Occupancy-based Energy Consumption Modelling Using Machine Learning Algorithms for Institutional Buildings,” Energy Build., vol. 252, no. 4, p. 111478, 2021, doi: https://doi.org/10.1016/j.enbuild.2021.111478.

S. Zemouri, Y. Gkoufas, and J. Murphy, “A Machine Learning Approach to Indoor Occupancy Detection Using Non-intrusive Environmental Sensor Data,” ACM Int. Conf. Proceeding Ser., pp. 70–74, 2019, doi: 10.1145/3361758.3361775.

S. Taheri and A. Razban, “Learning-based CO2 Concentration Prediction: Application to Indoor Air Quality Control Using Demand-Controlled Ventilation,” Build. Environ., vol. 205, no. 2, p. 108164, 2021, doi: 10.1016/j.buildenv.2021.108164.

C. Jiang, Z. Chen, R. Su, M. K. Masood, and Y. C. Soh, “Bayesian Filtering For Building Occupancy Estimation From Carbon Dioxide Concentration,” Energy Build., vol. 206, p. 109566, 2020, doi: 10.1016/j.enbuild.2019.109566.

Y. Zhou et al., “A Novel Model Based on Multi-Grained Cascade Forests with Wavelet Denoising for Indoor Occupancy Estimation,” Build. Environ., vol. 167, no. 10, p. 106461, 2020, doi: 10.1016/j.buildenv.2019.106461.

S. Kumar, J. Singh, and O. Singh, “Ensemble-based Extreme Learning Machine Model For Occupancy Detection with Ambient Attributes,” Int. J. Syst. Assur. Eng. Manag., vol. 11, no. 2, pp. 173–183, 2020, doi: 10.1007/s13198-019-00935-1.

Y. R. Carrillo-Amado, M. A. Califa-Urquiza, and J. A. Ramón-Valencia, “Calibration and Standardization of Air Quality Measurements Using MQ Sensors,” Respuestas, vol. 25, no. 1, pp. 70–77, 2020, doi: 10.22463/0122820x.2408.

M. Sebayang, “Stasiun Pemantau Kualitas Udara Berbasis Web,” J. INFORMATICS Telecommun. Eng., vol. 1, no. 1, pp. 24–33, Sep. 2017, doi: 10.31289/jite.v1i1.571.

L. Schibuola and C. Tambani, “Indoor Environmental Quality Classification of School Environments by Monitoring PM and CO2 Concentration Levels,” Atmos. Pollut. Res., vol. 11, no. 2, pp. 332–342, 2020, doi: 10.1016/j.apr.2019.11.006.

S. Jayakumar and M. G. Apte, “Estimation and Analysis of Ventilation Rates in Schools in Indian Context: IAQ and Indoor Environmental Quality,” IOP Conf. Ser. Mater. Sci. Eng., vol. 609, no. 3, p. 032046, 2019, doi: 10.1088/1757-899X/609/3/032046.

B. Talarosha, “Konsentrasi CO2 pada Ruang Kelas dengan Sistem Ventilasi Alami sebuah Penelitian Awal,” J. Lingkung. Binaan Indones., vol. 6, no. 1, pp. 22–27, Apr. 2017, doi: 10.32315/jlbi.6.1.22.

D. Stjelja, J. Jokisalo, and R. Kosonen, “Scalable Room Occupancy Prediction with Deep Transfer Learning Using Indoor Climate Sensor,” Energies, vol. 15, no. 6, pp. 1–21, 2022, doi: 10.3390/en15062078.

A. Pandey and A. Jain, “Comparative Analysis of KNN Algorithm using Various Normalization Techniques,” Int. J. Comput. Netw. Inf. Secur., vol. 9, no. 11, pp. 36–42, 2017, doi: 10.5815/ijcnis.2017.11.04.

Y. Jung, “Multiple predicting K-fold cross-validation for model selection,” J. Nonparametr. Stat., vol. 30, no. 1, pp. 197–215, 2018, doi: 10.1080/10485252.2017.1404598.

B. G. Marcot and A. M. Hanea, “What is an optimal value of k in k-fold cross-validation in discrete Bayesian network analysis?,” Comput. Stat., vol. 36, no. 3, pp. 2009–2031, 2021, doi: 10.1007/s00180-020-00999-9.

S. H. Kim and H. J. Moon, “Case Study of An Advanced Integrated Comfort Control Algorithm with Cooling, Ventilation, and Humidification Systems Based on Occupancy Status,” Build. Environ., vol. 133, pp. 246–264, 2018, doi: 10.1016/j.buildenv.2017.12.010.

Refbacks

  • There are currently no refbacks.