Indoor Occupancy Detection Based on Environmental Data Using CNN-XGboost Model: Experimental Validation in a Residential Building
Abstract
:1. Introduction
1.1. Related Works
1.2. Research Gap and Contribution
- We experimentally evaluate an ML method to accurately detect occupancy in several rooms with different occupancy patterns in a residential household equipped with a balanced mechanical ventilation system, while, with the least privacy invasion, we impose no limitation on the occupants in using the HVAC system, doors, and windows.
- We propose a novel ML model for occupancy prediction in residential buildings that is fast and sufficiently accurate. The model fills the lack of feature extraction in previous models used in residential buildings with a mechanical ventilation system.
2. Materials and Methods
2.1. CNN-XGBoost Algorithm Description
2.2. Studied Rooms in a Residential Building
2.3. Sensors
2.4. Data Collection
2.4.1. Bedroom 1
2.4.2. Small Office
2.4.3. Big Office
3. Result and Discussion
4. Conclusions and Recommendations for Future Research
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Nomenclature
LR | Logistic regression |
DT | Decision tree |
RF | Random forest |
GB | Gradient boosting |
KMC | K-means clustering |
KNN | K-nearest neighbors |
SV | Support vector |
CNN | Convolutional neural network |
XGBoost | Extreme gradient boosting |
CNN-XGBoost | Convolutional neural network extreme gradient boosting |
TP | True positive: number of conditions correctly identified as unoccupied |
TN | True negative: number of conditions correctly identified as occupied |
FP | False positive: number of conditions incorrectly identified as unoccupied |
FN | False negative: number of conditions incorrectly identified as occupied |
ppm | Parts per million |
RH | Relative humidity |
p | Probability |
MAE | Mean absolute error |
References
- Final Energy Consumption by Sector, EU. 2020. Available online: https://ec.europa.eu/eurostat/statistics-explained/index.php?title=Energy_statistics_-_an_overview#Final_energy_consumption (accessed on 10 January 2021).
- Final Energy Consumption in the Residential Sector by Use, EU. 2020. Available online: https://ec.europa.eu/eurostat/statistics-explained/index.php?title=File:Final_energy_consumption_in_the_residential_sector_by_use,_EU,_2020_v5.png (accessed on 10 January 2021).
- Delzendeh, E.; Wu, S.; Lee, A.; Zhou, Y. The impact of occupants’ behaviours on building energy analysis: A research review. Renew. Sustain. Energy Rev. 2017, 80, 1061–1071. [Google Scholar] [CrossRef]
- He, Z.; Hong, T.; Chou, S.K. A framework for estimating the energy-saving potential of occupant behaviour improvement. Appl. Energy 2021, 287, 116591. [Google Scholar] [CrossRef]
- Pan, S.; Wang, X.; Wei, S.; Xu, C.; Zhang, X.; Xie, J.; Tindall, J.; de Wilde, P. Energy waste in buildings due to occupant behaviour. Energy Procedia 2017, 105, 2233–2238. [Google Scholar] [CrossRef]
- Candanedo, L.M.; Feldheim, V. Accurate occupancy detection of an office room from light, temperature, humidity and CO2 measurements using statistical learning models. Energy Build. 2016, 112, 28–39. [Google Scholar] [CrossRef]
- Yang, Z.; Becerik-Gerber, B. How does building occupancy influence energy efficiency of HVAC systems? Energy Procedia 2016, 88, 775–780. [Google Scholar] [CrossRef] [Green Version]
- Yang, Z.; Becerik-Gerber, B. Modeling personalized occupancy profiles for representing long term patterns by using ambient context. Build. Environ. 2014, 78, 23–35. [Google Scholar] [CrossRef]
- Kwok, S.S.; Yuen, R.K.; Lee, E.W. An intelligent approach to assessing the effect of building occupancy on building cooling load prediction. Build. Environ. 2011, 46, 1681–1690. [Google Scholar] [CrossRef]
- da Silva, P.C.; Leal, V.; Andersen, M. Occupants interaction with electric lighting and shading systems in real single-occupied offices: Results from a monitoring campaign. Build. Environ. 2013, 64, 152–168. [Google Scholar] [CrossRef]
- Labeodan, T.; De Bakker, C.; Rosemann, A.; Zeiler, W. On the application of wireless sensors and actuators network in existing buildings for occupancy detection and occupancy-driven lighting control. Energy Build. 2016, 127, 75–83. [Google Scholar] [CrossRef] [Green Version]
- Peruffo, A.; Pandharipande, A.; Caicedo, D.; Schenato, L. Lighting control with distributed wireless sensing and actuation for daylight and occupancy adaptation. Energy Build. 2015, 97, 13–20. [Google Scholar] [CrossRef]
- Agarwal, Y.; Balaji, B.; Dutta, S.; Gupta, R.K.; Weng, T. Duty-cycling buildings aggressively: The next frontier in HVAC control. In Proceedings of the 10th ACM/IEEE International Conference on Information Processing in Sensor Networks, Chicago, IL, USA, 12–14 April 2011; pp. 246–257. [Google Scholar]
- Wang, F.; Feng, Q.; Chen, Z.; Zhao, Q.; Cheng, Z.; Zou, J.; Zhang, Y.; Mai, J.; Li, Y.; Reeve, H. Predictive control of indoor environment using occupant number detected by video data and CO2 concentration. Energy Build. 2017, 145, 155–162. [Google Scholar] [CrossRef]
- Purdon, S.; Kusy, B.; Jurdak, R.; Challen, G. Model-free HVAC control using occupant feedback. In Proceedings of the 38th Annual IEEE Conference on Local Computer Networks-Workshops, Sydney, Australia, 21–24 October 2013; pp. 84–92. [Google Scholar]
- Jin, Y.; Yan, D.; Chong, A.; Dong, B.; An, J. Building occupancy forecasting: A systematical and critical review. Energy Build. 2021, 251, 111345. [Google Scholar] [CrossRef]
- Salimi, S.; Liu, Z.; Hammad, A. Occupancy prediction model for open-plan offices using real-time location system and inhomogeneous Markov chain. Build. Environ. 2019, 152, 1–6. [Google Scholar] [CrossRef]
- Erickson, V.L.; Carreira-Perpiñán, M.Á.; Cerpa, A.E. OBSERVE: Occupancy-based system for efficient reduction of HVAC energy. In Proceedings of the 10th ACM/IEEE International Conference on Information Processing in Sensor Networks, Chicago, IL, USA, 12–14 April 2011; pp. 258–269. [Google Scholar]
- Li, Z.; Dong, B. Short term predictions of occupancy in commercial buildings—Performance analysis for stochastic models and machine learning approaches. Energy Build. 2018, 158, 268–281. [Google Scholar] [CrossRef]
- Huang, W.; Lin, Y.; Lin, B.; Zhao, L. Modeling and predicting the occupancy in a China hub airport terminal using Wi-Fi data. Energy Build. 2019, 203, 109439. [Google Scholar] [CrossRef]
- Pedersen, T.H.; Nielsen, K.U.; Petersen, S. Method for room occupancy detection based on trajectory of indoor climate sensor data. Build. Environ. 2017, 115, 147–156. [Google Scholar] [CrossRef]
- Dai, X.; Liu, J.; Zhang, X. A review of studies applying machine learning models to predict occupancy and window-opening behaviours in smart buildings. Energy Build. 2020, 223, 110159. [Google Scholar] [CrossRef]
- Killian, M.; Kozek, M. Short-term occupancy prediction and occupancy based constraints for MPC of smart homes. IFAC-PapersOnLine 2019, 52, 377–382. [Google Scholar] [CrossRef]
- Chatterjee, A. An introduction to the proper orthogonal decomposition. Curr. Sci. 2000, 10, 808–817. [Google Scholar]
- Li, N.; Calis, G.; Becerik-Gerber, B. Measuring and monitoring occupancy with an RFID based system for demand-driven HVAC operations. Autom. Constr. 2012, 24, 89–99. [Google Scholar] [CrossRef]
- Peng, Y.; Rysanek, A.; Nagy, Z.; Schlüter, A. Using machine learning techniques for occupancy-prediction-based cooling control in office buildings. Appl. Energy 2018, 211, 1343–1358. [Google Scholar] [CrossRef]
- Aftab, M.; Chen, C.; Chau, C.K.; Rahwan, T. Automatic HVAC control with real-time occupancy recognition and simulation-guided model predictive control in low-cost embedded system. Energy Build. 2017, 154, 141–156. [Google Scholar] [CrossRef] [Green Version]
- Razavi, R.; Gharipour, A.; Fleury, M.; Akpan, I.J. Occupancy detection of residential buildings using smart meter data: A large-scale study. Energy Build. 2019, 183, 195–208. [Google Scholar] [CrossRef]
- Mamidi, S.K.; Chang, Y.H.; Maheswaran, R. Adaptive Learning Agents for Sustainable Building Energy Management. In 2012 Accociation for the Advanced of Artificial Intelligence (AAAI) Spring Symposium Series; Association for the Advancement of Artificial Intelligence (AAAI): Los Angeles, CA, USA, 2012. [Google Scholar]
- Sangogboye, F.C.; Arendt, K.; Singh, A.; Veje, C.T.; Kjærgaard, M.B.; Jørgensen, B.N. Performance comparison of occupancy count estimation and prediction with common versus dedicated sensors for building model predictive control. In Building Simulation; Tsinghua University Press: Beijing, China, 2017; Volume 10, pp. 829–843. [Google Scholar]
- Kampezidou, S.I.; Ray, A.T.; Duncan, S.; Balchanos, M.G.; Mavris, D.N. Real-time occupancy detection with physics-informed pattern-recognition machines based on limited CO2 and temperature sensors. Energy Build. 2021, 242, 110863. [Google Scholar] [CrossRef]
- Kim, S.; Kang, S.; Ryu, K.R.; Song, G. Real-time occupancy prediction in a large exhibition hall using deep learning approach. Energy Build. 2019, 199, 216–222. [Google Scholar] [CrossRef]
- Leeraksakiat, P.; Pora, W. Occupancy forecasting using lstm neural network and transfer learning. In Proceedings of the 2020 17th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON), Virtual, 24–27 June 2020; pp. 470–473. [Google Scholar]
- Sama, S.K.; Rahnamay-Naeini, M. A study on compression-based sequential prediction methods for occupancy prediction in smart homes. In Proceedings of the 2016 IEEE 7th Annual Ubiquitous Computing, Electronics & Mobile Communication Conference (UEMCON), New York, NY, USA, 20–22 October 2016; pp. 1–8. [Google Scholar]
- Liang, X.; Hong, T.; Shen, G.Q. Occupancy data analytics and prediction: A case study. Build. Environ. 2016, 102, 179–192. [Google Scholar] [CrossRef] [Green Version]
- Nacer, A.; Marhic, B.; Delahoche, L.; Masson, J.B. ALOS: Automatic learning of an occupancy schedule based on a new prediction model for a smart heating management system. Build. Environ. 2018, 142, 484–501. [Google Scholar] [CrossRef]
- Ding, Y.; Han, S.; Tian, Z.; Yao, J.; Chen, W.; Zhang, Q. Review on occupancy detection and prediction in building simulation. In Building Simulation; Tsinghua University Press: Beijing, China, 2021; pp. 1–24. [Google Scholar]
- Chen, Z.; Jiang, C.; Xie, L. Building occupancy estimation and detection: A review. Energy Build. 2018, 169, 260–270. [Google Scholar] [CrossRef]
- Trivedi, D.; Badarla, V. Occupancy detection systems for indoor environments: A survey of approaches and methods. Indoor Built Environ. 2020, 29, 1053–1069. [Google Scholar] [CrossRef]
- Zhang, W.; Wu, Y.; Calautit, J.K. A review on occupancy prediction through machine learning for enhancing energy efficiency, air quality and thermal comfort in the built environment. Renew. Sustain. Energy Rev. 2022, 167, 112704. [Google Scholar] [CrossRef]
- Sayed, A.N.; Himeur, Y.; Bensaali, F. Deep and transfer learning for building occupancy detection: A review and comparative analysis. Eng. Appl. Artif. Intell. 2022, 115, 105254. [Google Scholar] [CrossRef]
- Candanedo, L.M.; Feldheim, V.; Deramaix, D. A methodology based on Hidden Markov Models for occupancy detection and a case study in a low energy residential building. Energy Build. 2017, 148, 327–341. [Google Scholar] [CrossRef]
- Chen, T.; Guestrin, C. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd Acm Sigkdd International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
- LeCun, Y.; Boser, B.; Denker, J.; Henderson, D.; Howard, R.; Hubbard, W.; Jackel, L. Handwritten digit recognition with a back-propagation network. Adv. Neural Inf. Processing Syst. 1989, 2, 41–46. [Google Scholar]
- Chauvin, Y.; Rumelhart, D.E. Backpropagation: Theory, Architectures, and Applications; Taylor & Francis Group, Taylor & Francis Group: Los Angeles, CA, USA, 2013. [Google Scholar]
- Ren, X.; Guo, H.; Li, S.; Wang, S.; Li, J. A novel image classification method with CNN-XGBoost model. In International Workshop on Digital Watermarking; Springer: Cham, Switzerland, 2017; pp. 378–390. [Google Scholar]
- Thongsuwan, S.; Jaiyen, S.; Padcharoen, A.; Agarwal, P. ConvXGB: A new deep learning model for classification problems based on CNN and XGBoost. Nucl. Eng. Technol. 2021, 53, 522–531. [Google Scholar] [CrossRef]
- Gholamy, A.; Kreinovich, V.; Kosheleva, O. Why 70/30 or 80/20 Relation between Training and Testing Sets: A Pedagogical Explanation; Departmental Technical Reports (CS). 1209; University of Texas at El Paso: El Paso, TX, USA, 2018; Available online: https://scholarworks.utep.edu/cs_techrep/1209 (accessed on 10 January 2021).
- Chinchor, N.; Sundheim, B.M. MUC-5 evaluation metrics. In Proceedings of the Fifth Message Understanding Conference (MUC-5), Baltimore, Maryland, 25–27 August 1993. [Google Scholar]
- Dey, N.; Borah, S.; Babo, R.; Ashour, A.S. Social Network Analytics: Computational Research Methods and Techniques; Academic Press: Cambridge, MA, USA, 2018. [Google Scholar]
Big Office | Small Office | Bedroom 1 | |
---|---|---|---|
Volume | 97 m3 | 24 m3 | 48 m3 |
Number of windows | 3 | 0 | 1 |
Number of doors | 2 | 3 | 1 |
Max number of occupants | 1 | 1 | 2 |
Type | Measuring Range | Typical Inaccuracy |
---|---|---|
Temperature | −40 °C to +85 °C | ±0.2 °C at +5 °C to +60 °C ± 0.5 °C at −20 °C to +85 °C |
Relative humidity | 0–100% RH | ±2% RH at 20–80% RH ±3% RH at 10–90% RH ±3.5% RH at 0–100% RH |
CO2 | 0–5000 ppm | ±(50 ppm + 3%) |
Classifier | MAE | TP | FN | FP | TN | F1 Score | Execution Time (s) |
---|---|---|---|---|---|---|---|
LR | 0.019 | 423 | 4 | 10 | 285 | 0.976 | 0.146 |
DT | 0.024 | 420 | 4 | 13 | 285 | 0.971 | 0.004 |
RF | 0.029 | 424 | 12 | 9 | 277 | 0.963 | 0.228 |
GB | 0.022 | 423 | 6 | 10 | 283 | 0.973 | 0.153 |
KMC | 0.026 | 422 | 8 | 11 | 281 | 0.967 | 0.254 |
KNN | 0.028 | 424 | 11 | 9 | 278 | 0.965 | 0.090 |
SV | 0.028 | 423 | 10 | 10 | 279 | 0.965 | 0.079 |
CNN | 0.033 | 419 | 10 | 14 | 279 | 0.959 | 20.831 |
XBGoost | 0.014 | 428 | 5 | 5 | 284 | 0.983 | 0.511 |
CNN-XGBoost | 0.011 | 427 | 2 | 6 | 287 | 0.986 | 18.013 |
Classifier | MAE | TP | FN | FP | TN | F1 Score | Execution Time (s) |
---|---|---|---|---|---|---|---|
CNN-XGBoost | 0.037 | 419 | 13 | 14 | 276 | 0.953 | 18.059 |
Classifier | MAE | TP | FN | FP | TN | F1 Score | Execution Time (s) |
---|---|---|---|---|---|---|---|
LR | 0.072 | 621 | 36 | 16 | 49 | 0.653 | 0.045 |
DT | 0.040 | 619 | 11 | 18 | 74 | 0.836 | 0.009 |
RF | 0.035 | 628 | 16 | 9 | 69 | 0.847 | 0.446 |
GB | 0.048 | 619 | 17 | 18 | 68 | 0.795 | 0.357 |
KMC | 0.447 | 336 | 22 | 301 | 63 | 0.281 | 0.075 |
KNN | 0.116 | 617 | 64 | 20 | 21 | 0.333 | 0.086 |
SV | 0.118 | 637 | 85 | 0 | 0 | 0.000 | 0.263 |
CNN | 0.116 | 567 | 14 | 70 | 71 | 0.628 | 20.389 |
XBGoost | 0.036 | 625 | 14 | 12 | 71 | 0.845 | 0.304 |
CNN-XGBoost | 0.029 | 627 | 11 | 10 | 74 | 0.876 | 23.117 |
Classifier | MAE | TP | FN | FP | TN | F1 Score | Execution Time (s) |
---|---|---|---|---|---|---|---|
CNN-XGBoost | 0.071 | 617 | 31 | 20 | 54 | 0.679 | 13.674 |
Classifier | MAE | TP | FN | FP | TN | F1 Score | Execution Time (s) |
---|---|---|---|---|---|---|---|
LR | 0.124 | 584 | 58 | 32 | 49 | 0.521 | 0.043 |
DT | 0.093 | 575 | 26 | 41 | 81 | 0.707 | 0.009 |
RF | 0.082 | 589 | 32 | 27 | 75 | 0.718 | 0.383 |
GB | 0.094 | 594 | 46 | 22 | 61 | 0.642 | 0.316 |
KMC | 0.237 | 465 | 20 | 151 | 87 | 0.504 | 0.075 |
KNN | 0.137 | 572 | 55 | 44 | 52 | 0.512 | 0.082 |
SV | 0.141 | 611 | 97 | 5 | 10 | 0.164 | 0.250 |
CNN | 0.133 | 604 | 84 | 12 | 23 | 0.324 | 20.808 |
XBGoost | 0.077 | 590 | 30 | 26 | 77 | 0.733 | 0.307 |
CNN-XGBoost | 0.073 | 590 | 27 | 26 | 80 | 0.751 | 24.250 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Mohammadabadi, A.; Rahnama, S.; Afshari, A. Indoor Occupancy Detection Based on Environmental Data Using CNN-XGboost Model: Experimental Validation in a Residential Building. Sustainability 2022, 14, 14644. https://doi.org/10.3390/su142114644
Mohammadabadi A, Rahnama S, Afshari A. Indoor Occupancy Detection Based on Environmental Data Using CNN-XGboost Model: Experimental Validation in a Residential Building. Sustainability. 2022; 14(21):14644. https://doi.org/10.3390/su142114644
Chicago/Turabian StyleMohammadabadi, Abolfazl, Samira Rahnama, and Alireza Afshari. 2022. "Indoor Occupancy Detection Based on Environmental Data Using CNN-XGboost Model: Experimental Validation in a Residential Building" Sustainability 14, no. 21: 14644. https://doi.org/10.3390/su142114644