Controlling active and passive systems in buildings with the aim of optimizing energy efficiency and maintaining occupants’ comfort is the major task of building management systems. However, most of these systems use a predefined configuration, which usually do not match the occupants’ preferences. Therefore, occupancy detection is imperative for energy use management mainly in residential and industrial buildings. Most works related to data-driven-based occupancy detection have used batch learning techniques, which need to store first and then train the data. It is not appropriate for a non-stationary environment. Therefore, this work sheds more light on the use of non-stationary machine learning techniques. To this end, three machine learning algorithms for stream data processing are presented, tested, and evaluated in term of accuracy and resources performance (i.e., RAM, CPU), with the aim of predicting the number of occupants in smart buildings. A platform architecture that integrates IoT technologies with stream machine learning is implemented and deployed. The experimental results show the effectiveness of this approach and illustrate that the number of occupants can be predicted with an accuracy of more than 83% and without resource wasting (i.e., time of CPU use varied between 0.04s and 3.85 ⋅ 10−11 GB of RAM could be exploited per hour).
In this work, a Hardware-In-the-Loop (HIL) framework is introduced for the implementation and the assessment of predictive control approaches in smart buildings. The framework combines recent Internet of Things (IoT) and big data platforms together with machine-learning algorithms and MATLAB-based Model Predictive Control (MPC) programs in order to enable HIL simulations. As a case study, the MPC algorithm was deployed for control of a standalone ventilation system (VS). The objective is to maintain the indoor Carbon Dioxide (CO2) concentration at the standard comfort range while enhancing energy efficiency in the building. The proposed framework has been tested and deployed in a real-case scenario of the EEBLab test site. The MPC controller has been implemented on MATLAB/Simulink and deployed in a Raspberry Pi (RPi) hardware. Contextual data are collected using the deployed IoT/big data platform and injected into the MPC and LSTM machine learning models. Occupants’ numbers were first forecasted and then sent to the MPC to predict the optimal ventilation flow rates. The performance of the MPC control over the HIL framework has been assessed and compared to an ON/OFF strategy. Results show the usefulness of the proposed approach and its effectiveness in reducing energy consumption by approximately 16%, while maintaining good indoor air quality.