Edge-Based Real-Time Occupancy Detection System through a Non-Intrusive Sensing System
Abstract
:1. Introduction
- Introducing a novel approach for detecting occupancy in indoor spaces using non-intrusive ambient data and a deep learning model. Using an environmental sensing board to gather environmental data, including temperature, humidity, pressure, light level, motion, sound, and CO.
- Deploying the occupancy detection method on an edge device for low-cost processing and increased data security.
- Investigating the performance of one-dimensional CNN (1D-CNN) and two-dimensional CNN (2D-CNN) to find the best option for edge deployment.
- Demonstrating the superiority of the 2D-CNN technique in providing robust and reliable results with 99.75% real-time prediction accuracy.
2. Related Work
2.1. Intrusive Edge-Based Occupancy Detection Systems
2.2. Non-Intrusive Occupancy Detection Systems
2.2.1. Edge and ML-Based
2.2.2. ML-Based
3. Proposed Edge-Based Deep Occupancy Detection System
3.1. Environmental Factors Selection
3.2. Deployed Edge Device
3.3. Deep Learning Classifiers
- 1D-CNN: The model included three convolutional layers, one max-pooling layer with a 2 × 2 pixel window, and one fully connected layer. The three convolutional layers were padded to retain the input size. The learning rate was set at 0.001, and a Leaky Rectified Linear Unit (ReLU) was used as an activation layer on all the hidden layers. The SoftMax activation function was used on the output layer.
- 2D-CNN: We adopted a basic model for the 2D-CNN. The model comprised five convolutional layers, five max-pooling layers with a 2 × 2 pixel window, and one fully connected layer. The five convolutional layers were padded to preserve the input size. The learning rate was set at 0.0008, and a ReLU was used as an activation layer on all the hidden layers.
4. Data Collection Setup
4.1. Board Description, Placement, and Ground Truth Method
4.2. Data Flow
4.3. Data Pre-Processing
4.4. Correlation Study
5. Experimental Results and Discussion
5.1. Performance Assessment
5.2. Classifiers Performance
5.3. Real-Time Occupancy Detection
6. Conclusions
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
Abbreviations
ANN | Artificial Neural Networks |
CNN | Convolutional Neural Network |
CO | Carbon Dioxide |
DL | Deep Learning |
DT | Decision Trees |
FN | False Negative |
FNN | Feed-forward Neural Network |
FP | False Positive |
GRU | Gated Recurrent Unit |
HVAC | Heating Ventilation Air Conditioning |
IoT | Internet of Things |
kNN | k Nearest Neighbors |
LSTM | Long Short-Term Memory |
ML | Machine Learning |
PCB | Printed Circuit Board |
PIR | Passive Infrared |
ppm | Parts Per Million |
ReLU | Rectified Linear Unit |
SVM | Support Vector Machines |
TN | True Negative |
TP | True Positive |
References
- Wilberforce, T.; Olabi, A.; Sayed, E.T.; Elsaid, K.; Maghrabie, H.M.; Abdelkareem, M.A. A review on zero energy buildings—Pros and cons. Energy Built Environ. 2023, 4, 25–38. [Google Scholar] [CrossRef]
- Hong, Y.; Yoon, S.; Choi, S. Operational signature-based symbolic hierarchical clustering for building energy, operation, and efficiency towards carbon neutrality. Energy 2023, 265, 126276. [Google Scholar] [CrossRef]
- Ali, S.; Bouguila, N. Towards scalable deployment of hidden Markov models in occupancy estimation: A novel methodology applied to the study case of occupancy detection. Energy Build. 2022, 254, 111594. [Google Scholar] [CrossRef]
- Rueda, L.; Agbossou, K.; Cardenas, A.; Henao, N.; Kelouwani, S. A comprehensive review of approaches to building occupancy detection. Build. Environ. 2020, 180, 106966. [Google Scholar] [CrossRef]
- Sayed, A.N.; Hamila, R.; Himeur, Y.; Bensaali, F. Employing Information Theoretic Metrics with Data-Driven Occupancy Detection Approaches: A Comparative Analysis. In Proceedings of the 2022 5th International Conference on Signal Processing and Information Security (ICSPIS), Dubai, United Arab Emirates, 7–8 December 2022; pp. 50–54. [Google Scholar] [CrossRef]
- Tekler, Z.D.; Low, R.; Gunay, B.; Andersen, R.K.; Blessing, L. A scalable Bluetooth Low Energy approach to identify occupancy patterns and profiles in office spaces. Build. Environ. 2020, 171, 106681. [Google Scholar] [CrossRef]
- Abade, B.; Perez Abreu, D.; Curado, M. A non-intrusive approach for indoor occupancy detection in smart environments. Sensors 2018, 18, 3953. [Google Scholar] [CrossRef] [Green Version]
- 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]
- Colace, S.; Laurita, S.; Spezzano, G.; Vinci, A. Room Occupancy Prediction Leveraging LSTM: An Approach for Cognitive and Self-Adapting Buildings. In IoT Edge Solutions for Cognitive Buildings; Springer: Berlin/Heidelberg, Germany, 2023; pp. 197–219. [Google Scholar]
- He, Y.; Zhang, H.; Arens, E.; Merritt, A.; Huizenga, C.; Levinson, R.; Wang, A.; Ghahramani, A.; Alvarez-Suarez, A. Smart detection of indoor occupant thermal state via infrared thermography, computer vision, and machine learning. Build. Environ. 2023, 228, 109811. [Google Scholar] [CrossRef]
- Sayed, A.N.; Himeur, Y.; Bensaali, F. From Time-Series to 2D Images for Building Occupancy Prediction using Deep Transfer Learning. Eng. Appl. Artif. Intell. 2023, 119, 105786. [Google Scholar] [CrossRef]
- Demrozi, F.; Turetta, C.; Chiarani, F.; Kindt, P.H.; Pravadelli, G. Estimating indoor occupancy through low-cost BLE devices. IEEE Sens. J. 2021, 21, 17053–17063. [Google Scholar] [CrossRef]
- Wang, Z.; Hong, T.; Piette, M.A.; Pritoni, M. Inferring occupant counts from Wi-Fi data in buildings through machine learning. Build. Environ. 2019, 158, 281–294. [Google Scholar] [CrossRef] [Green Version]
- Natarajan, A.; Krishnasamy, V.; Singh, M. Occupancy detection and localization strategies for demand modulated appliance control in Internet of Things enabled home energy management system. Renew. Sustain. Energy Rev. 2022, 167, 112731. [Google Scholar] [CrossRef]
- Wainer, G.; Aloqaily, M. Machine learning-based indoor localization and occupancy estimation using 5G ultra-dense networks. Simul. Model. Pract. Theory 2022, 118, 102543. [Google Scholar]
- Tekler, Z.D.; Low, R.; Yuen, C.; Blessing, L. Plug-Mate: An IoT-based occupancy-driven plug load management system in smart buildings. Build. Environ. 2022, 223, 109472. [Google Scholar] [CrossRef]
- Hu, S.; Wang, P.; Hoare, C.; O’Donnell, J. Building Occupancy Detection and Localisation using CCTV Camera and Deep Learning. IEEE Internet Things J. 2022, 10, 597–608. [Google Scholar] [CrossRef]
- Wei, S.; Tien, P.W.; Chow, T.W.; Wu, Y.; Calautit, J.K. Deep learning and computer vision based occupancy CO2 level prediction for demand-controlled ventilation (DCV). J. Build. Eng. 2022, 56, 104715. [Google Scholar] [CrossRef]
- Yang, Y.; Yuan, Y.; Pan, T.; Zang, X.; Liu, G. A framework for occupancy prediction based on image information fusion and machine learning. Build. Environ. 2022, 207, 108524. [Google Scholar] [CrossRef]
- Feng, C.; Mehmani, A.; Zhang, J. Deep learning-based real-time building occupancy detection using ami data. IEEE Trans. Smart Grid 2020, 11, 4490–4501. [Google Scholar] [CrossRef]
- Wang, C.; Jiang, J.; Roth, T.; Nguyen, C.; Liu, Y.; Lee, H. Integrated sensor data processing for occupancy detection in residential buildings. Energy Build. 2021, 237, 110810. [Google Scholar] [CrossRef]
- Monti, L.; Tse, R.; Tang, S.K.; Mirri, S.; Delnevo, G.; Maniezzo, V.; Salomoni, P. Edge-Based Transfer Learning for Classroom Occupancy Detection in a Smart Campus Context. Sensors 2022, 22, 3692. [Google Scholar] [CrossRef]
- Kommey, B. Automatic Ceiling Fan Control Using Temperature and Room Occupancy. JITCE J. Inf. Technol. Comput. Eng. 2022, 6, 1–7. [Google Scholar] [CrossRef]
- Law Aszkowski, P.; Piechocki, M. Thermo Presence: The Low-resolution Thermal Image Dataset and Occupancy Detection Using Edge Devices. In Proceedings of the 3rd Polish Conference on Artificial Intelligence, Gdynia, Poland, 25–27 April 2022. [Google Scholar]
- Metwaly, A.; Queralta, J.P.; Sarker, V.K.; Gia, T.N.; Nasir, O.; Westerlund, T. Edge computing with embedded ai: Thermal image analysis for occupancy estimation in intelligent buildings. In Proceedings of the INTelligent Embedded Systems Architectures and Applications Workshop 2019, New York, NY, USA, 13–18 October 2019; pp. 1–6. [Google Scholar]
- Gomez, A.; Conti, F.; Benini, L. Thermal image-based CNN’s for ultra-low power people recognition. In Proceedings of the 15th ACM International Conference on Computing Frontiers, Ischia, Italy, 8–10 May 2018; pp. 326–331. [Google Scholar]
- Zemouri, S.; Gkoufas, Y.; Murphy, J. A machine learning approach to indoor occupancy detection using non-intrusive environmental sensor data. In Proceedings of the 3rd International Conference on Big Data and Internet of Things, Melbourn, Australia, 22–24 August 2019; pp. 70–74. [Google Scholar]
- Zemouri, S.; Magoni, D.; Zemouri, A.; Gkoufas, Y.; Katrinis, K.; Murphy, J. An edge computing approach to explore indoor environmental sensor data for occupancy measurement in office spaces. In Proceedings of the 2018 IEEE International Smart Cities Conference (ISC2), Kansas City, MO, USA, 16–19 September 2018; pp. 1–8. [Google Scholar]
- Rastogi, K.; Lohani, D. IoT-Based Indoor Occupancy Estimation Using Edge Computing. Procedia Comput. Sci. 2020, 171, 1943–1952. [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]
- Tan, S.Y.; Jacoby, M.; Saha, H.; Florita, A.; Henze, G.; Sarkar, S. Multimodal sensor fusion framework for residential building occupancy detection. Energy Build. 2022, 258, 111828. [Google Scholar] [CrossRef]
- Kleiminger, W.; Beckel, C.; Santini, S. Household occupancy monitoring using electricity meters. In Proceedings of the 2015 ACM International Joint Conference on Pervasive and Ubiquitous Computing, Osaka, Japan, 7–11 September 2015; pp. 975–986. [Google Scholar]
- Jacoby, M.; Tan, S.Y.; Henze, G.; Sarkar, S. A high-fidelity residential building occupancy detection dataset. Sci. Data 2021, 8, 280. [Google Scholar] [CrossRef]
- Dutta, J.; Roy, S. OccupancySense: Context-based indoor occupancy detection & prediction using CatBoost model. Appl. Soft Comput. 2022, 119, 108536. [Google Scholar]
- Drira, S.; Smith, I.F. A framework for occupancy detection and tracking using floor-vibration signals. Mech. Syst. Signal Process. 2022, 168, 108472. [Google Scholar] [CrossRef]
- Tekler, Z.D.; Chong, A. Occupancy prediction using deep learning approaches across multiple space types: A minimum sensing strategy. Build. Environ. 2022, 226, 109689. [Google Scholar] [CrossRef]
- Abdel-Razek, S.A.; Marie, H.S.; Alshehri, A.; Elzeki, O.M. Energy Efficiency through the Implementation of an AI Model to Predict Room Occupancy Based on Thermal Comfort Parameters. Sustainability 2022, 14, 7734. [Google Scholar] [CrossRef]
- 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. [Google Scholar] [CrossRef]
- Cao, K.; Liu, Y.; Meng, G.; Sun, Q. An overview on edge computing research. IEEE Access 2020, 8, 85714–85728. [Google Scholar] [CrossRef]
- Alsalemi, A.; Himeur, Y.; Bensaali, F.; Amira, A. An innovative edge-based Internet of Energy solution for promoting energy saving in buildings. Sustain. Cities Soc. 2022, 78, 103571. [Google Scholar] [CrossRef]
- Thinh, T.N.; Le, L.T.; Long, N.H.; Quyen, H.L.T.; Thu, N.Q.; La Thong, N.; Nghi, H.P. An Edge-AI Heterogeneous Solution for Real-time Parking Occupancy Detection. In Proceedings of the 2021 International Conference on Advanced Technologies for Communications (ATC), Ho Chi Minh City, Vietnam, 14–16 October 2021; pp. 51–56. [Google Scholar]
- Sayed, A.; Himeur, Y.; Alsalemi, A.; Bensaali, F.; Amira, A. Intelligent edge-based recommender system for internet of energy applications. IEEE Syst. J. 2021, 16, 5001–5010. [Google Scholar] [CrossRef]
- Rastogi, K.; Lohani, D. Edge computing-based internet of things framework for indoor occupancy estimation. In Research Anthology on Edge Computing Protocols, Applications, and Integration; IGI Global: Hershey, PA, USA, 2022; pp. 619–643. [Google Scholar]
- Alsalemi, A.; Himeur, Y.; Bensaali, F.; Amira, A. Smart Sensing and End-Users’ Behavioral Change in Residential Buildings: An Edge-Based Internet of Energy Perspective. IEEE Sens. J. 2021, 21, 27623–27631. [Google Scholar] [CrossRef]
- Azizi, S.; Rabiee, R.; Nair, G.; Olofsson, T. Effects of Positioning of Multi-Sensor Devices on Occupancy and Indoor Environmental Monitoring in Single-Occupant Offices. Energies 2021, 14, 6296. [Google Scholar] [CrossRef]
- Stekhoven, D.J.; Bühlmann, P. MissForest—Non-parametric missing value imputation for mixed-type data. Bioinformatics 2012, 28, 112–118. [Google Scholar] [CrossRef] [Green Version]
- Low, R.; Tekler, Z.D.; Cheah, L. Predicting commercial vehicle parking duration using generative adversarial multiple imputation networks. Transp. Res. Rec. 2020, 2674, 820–831. [Google Scholar] [CrossRef]
Reference | Sensors/Devices Used | Edge Device Used | Algorithm |
---|---|---|---|
[22] | Optical cameras | Raspberry Pi | CNN |
[23] | Optical camera and a temperature sensor | Raspberry Pi 3B+ | HOG, SVM |
[24] | Thermal array sensor | Raspberry Pi 4B with a Coral USB Accelerator | CNN |
[25] | Thermal array sensor | STM32F | FNN |
[26] | Thermal array sensor | ARM Cortex | CNN |
[27,28] | Temperature and humidity sensors | Raspberry Pi | kNN |
[29] | Temperature, humidity, motion, and CO sensors | Raspberry Pi | LR, QR |
[3] | Temperature, humidity, light, and CO | N/A | HMM |
[31] | Environmental sensors, audio data, and cameras | N/A | Depends on input source |
[34] | Air quality | N/A | CatBoost |
[35] | Floor vibration measurements | N/A | SVM |
[36] | CO and Wi-Fi devices | N/A | LSTM, GRU |
[37] | Light, CO, and humidity | N/A | kNN, DT, ANN |
[38] | CO, relative humidity, and temperature | N/A | CNN-XGBoost |
Variable and Unit | Sensor Type | Measurement Range |
---|---|---|
Temperature (C) | DHT22 | −40–80 C |
Humidity (%) | DHT22 | 0–100% |
Pressure (hPa) | BMP180 | 300–1100 hPa |
Light level (Lux) | VEML7700 | 0–120 kLux |
Motion (on/off) | AM312 | 3 m |
Sound level (dB) | KY-037 | 3–6 kHz |
eCO (ppm) | SGP30 | 400–60,000 ppm |
DL Approach | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Training Time (s) |
---|---|---|---|---|---|
1D-CNN | 99.72 | 99.33 | 99.78 | 99.55 | 52.37 |
2D-CNN | 99.76 | 99.35 | 99.93 | 99.64 | 69.62 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 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
Sayed, A.N.; Bensaali, F.; Himeur, Y.; Houchati, M. Edge-Based Real-Time Occupancy Detection System through a Non-Intrusive Sensing System. Energies 2023, 16, 2388. https://doi.org/10.3390/en16052388
Sayed AN, Bensaali F, Himeur Y, Houchati M. Edge-Based Real-Time Occupancy Detection System through a Non-Intrusive Sensing System. Energies. 2023; 16(5):2388. https://doi.org/10.3390/en16052388
Chicago/Turabian StyleSayed, Aya Nabil, Faycal Bensaali, Yassine Himeur, and Mahdi Houchati. 2023. "Edge-Based Real-Time Occupancy Detection System through a Non-Intrusive Sensing System" Energies 16, no. 5: 2388. https://doi.org/10.3390/en16052388