An IoT framework for the assessment of indoor conditions and estimation of occupancy rates: results from a real case study ACTA IMEKO ISSN: 2221-870X June 2019, Volume 8, Number 2, 70 - 79 ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 70 An IoT framework for the assessment of indoor conditions and estimation of occupancy rates: results from a real case study Stefano Rinaldi1, Alessandra Flammini1, Lavinia C. Tagliabue2, Angelo L. C. Ciribini2 1 Department of Information Engineering - University of Brescia, Via Branze 38, 25123, Brescia, Italy 2 Department of Civil, Environmental, Architectural Engineering and Mathematics - University of Brescia, Via Branze 43, 25123, Brescia, Italy Section: RESEARCH PAPER Keywords: smart city; cognitive building; Internet of Things; indoor comfort; energy saving; indoor air quality; sensor network; occupancy rate model Citation: Stefano Rinaldi, Alessandra Flammini, Lavinia C. Tagliabue, Angelo L. C. Ciribini, An IoT framework for the assessment of indoor conditions and estimation of occupancy rates: results from a real case study, Acta IMEKO, vol. 8, no. 2, article 10, June 2019, identifier: IMEKO-ACTA-08 (2019)-02-10 Section Editor: Emiliano Sisinni, University of Brescia, Italy Received July 30, 2018; In final form June 06, 2019; Published June 2019 Copyright: This is an open-access article distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Funding: This work was partially supported by University of Brescia as part of the research activities of the laboratory ‘energy laboratory as University eXpo – eLUX and by research grant SIN00665 ‘Virtual-eGateway’, funded by the Italian Ministry of University, Research, and Education (MIUR). Corresponding author: Stefano Rinaldi, e-mail: stefano.rinaldi@unibs.it 1. INTRODUCTION An indoor space is a place in which lives are spent and activities developed. A building can be considered as a passive container of activities where requirements of safety and security could be improved compared with external or partially covered spaces. The most important criteria related to comfort should be considered in building spaces to support health, wellbeing, and productivity. In addition, the building is actively involved in the delivery of services, such as air conditioning, ventilation, illumination, connectivity, communication, video support, and exchange of information in the connected building towards fruitful interaction of devices and functions. The optimisation of flows (i.e. people, data, energy, materials) leads to a better and easier way of developing our lives, and the evolutionary level is not the smart building in the smart city, but the cognitive building [1] in the cognitive city [2]. The cognitive building approach is an evolution of traditional home automation: A cognitive building can understand a user’s needs directly based on their habits. This new paradigm implements interactions between the building and the user, and it is based on a behavioural design [3] that can lead to the improved use of spaces and to a bi-directional relationship in an adaptive environment that is able to support users’ choices and preferences according to wider objectives of wellbeing and energy saving. The first step towards such a scenario is a building that is able to identify and estimate its state autonomously and to share such information with other buildings. ABSTRACT In recent years, energy-savings policies have affected many aspects of everyday life. Considering a typical building, the heating, ventilation, and air conditioning (HVAC) system is the most energy-consuming system. This consideration is especially true for large public-access buildings, such as schools, and public administrations. In these cases, the energy saving of buildings depends on the capability to optimise the behaviour of the HVAC. Typically, the HVAC control system is based on static models of the building, which consider the average occupancy rate of each of the rooms. On the contrary, in this research work, a cognitive system based on an occupancy rate model that is able to take into consideration user habits and indoor air quality (IAQ) provided by IoT sensors is considered for the control of HVAC systems. This approach has been applied to the eLUX lab building of the University of Brescia, Italy. Data provided by IoT IAQ sensors (temperature, relative humidity, CO2) is used to refine the results of the occupancy rates for the models of the rooms of this building. The experimental results show, as in 22.15 % of the samples, the CO2 concentration exceeded the 1,000 ppm threshold of the perception of fresh air and good conditions. mailto:stefano.rinaldi@unibs.it ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 71 In the past, the problems related to indoor air quality (IAQ) have been labelled as sick building syndrome, affecting 30 % of new buildings, as the World Health Organization alerted in 1984. The problems related to ventilation and materials were overcome in the 1990s; nevertheless, many existing buildings have outdated heating, ventilation, and air conditioning (HVAC) systems, and the use and intensity of occupancy has challenged the systems and equipment. Indoor environmental quality (IEQ) is affected by IAQ as well as other physical and psychological aspects of indoor conditions (e.g. lighting, visual quality, acoustics, and thermal comfort) [4], [5]. In addition, IAQ has a strong impact on health and concentration in educational institutions. Research has demonstrated that IAQ significantly impacts the learning performance of the students. The parameter of carbon dioxide (CO2) is used to assess the IAQ [6] and is easily calculated [7] and measured [8]. Specific dedicated sensors network can be used to monitor and extract information by the data collection [9]. This research aims to investigate the possibility of integrating IAQ data generated by IoT sensors installed into the learning spaces of an educational building adopted as a case study to estimate the number of people and occupancy rate, which is crucial for modulating and customising the operational range of the HVAC systems. The implementation of IoT architecture to connect the sensors to the building management system has been described in previous research work [10], while the current research aims to improve the evaluation of the occupancy rate of traditional probabilistic models adopted for energy simulations. The proposed methodology has been applied to the educational laboratories and lecture classrooms of the ‘Modulo Didattico’ building located at the University of Brescia’s Smart Campus, headquarters of eLUX lab. In the preliminary phase of analysis of the case study building and considering the behavioural factor as a crucial element to develop comfort models and diagnostics, interviews were conducted and discomfort was often been noted during the whole year (with a changing level in the different seasons nonetheless widely recurrent). The learning spaces are frequently too warm and humid, furthermore intensive occupancy causes an increase of CO2 concentration during the day and a perception of the air as stuffy and malodorous. For that reason, users in spring and summer open windows and doors to increase ventilation and promote additional air changes coupled with mechanical ventilation. In order to assess the degree of user satisfaction, considering, as reported by ASHRAE [11], that ‘an acceptable air quality is one for which a substantial majority of people (less than 80 %) do not express dissatisfaction’ a further aim is to promote compliance checking of the indoor conditions related to users’ request for IAQ for improved learning performance. The critical indoor conditions reported for educational buildings have also increased interest in the development of the interactive bi-directional app [1] where formal and informal feedback is collected in order to understand the level of comfort (i.e. thermal, visual, acoustic, olfactory), and customised comfort conditions could be provided according to energy-saving measurements. 2. METHODOLOGY The IoT framework HVACs in large buildings, such as schools, universities, and public administrations, are equipped with sensors for monitoring the status of rooms and thus for controlling the quality of the comfort of the user. Generally, the data generated by these sensors is not available from third-party applications. The IoT paradigm allows us to overcome this situation thanks to the proper definition of a data model that can be exchanged over an ICT infrastructure. The ICT infrastructure for supporting IoT sensors is shown in Figure 1. Such an infrastructure is based on five layers: the device; the device abstraction; the data; and the cognitive and the visualisation layers. The device layer includes sensors and actuators placed on the systems in the building. The device layer includes also the feedback provided by the user of the building, explicit or implicit, on the quality of comfort. Each of the devices is characterised by a data model, which is used to exchange information with the upper layers using a proper communication protocol. The system is protocol agnostic i.e. it supports any communication protocol through the device abstraction layer, which provides the capability to support different devices to the upper layer. Among the communication protocols supported, message queue telemetry transport (MQTT), WebService REST, advanced message queueing protocol (AMQP), and Modbus should be mentioned. The data layer includes the information system used to store real-time data from sensors (Device Data DB); the model and information regarding the building and its components as well as the position of IoT sensors (BIM DB); and the information about the installed IoT devices (including metrological characteristics) (Asset Mgt DB). The information stored in BIM DB and in Asset Mgt DB are fundamental for extracting the correct information from the Device Data DB and for sharing such information between different buildings. The Data Layer has been structured using different databases because of the different characteristics of data that is to be stored; for example, real-time data requires a database that is able to store a huge amount of data from hundreds of sensors in parallel, while information about the building is quite static. The data stored in the Device Data DB can be used by the cognitive layer to infer additional information from the raw data coming from the sensors. For example, the number of people in a room and the flow of people in a building can be inferred from CO2 concentration. Information inferred by the raw data is uploaded in Device Data DB as a virtual sensor. The information stored in the data layer can be processed by the cognitive layer and visualised by the visualisation layer. The visualisation layer takes the benefit of Grafana, an open framework for data analytics and monitoring. The cognitive layer is able to analyse the data and to operate and control the systems of the building to close the Figure 1. The reference ICT architecture used for the integration of IoT devices and the estimation of building parameters. ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 72 control loop (in the case, control feature is enabled). The interactions among the upper layers (device abstraction layer, data layer, visualisation layer, and cognitive layer) are provided by WebService REST. Thanks to the modular and service-oriented architecture of the informative system, each of the components could be located on different physical or virtual machines, promoting the scalability of this approach. Indoor air quality indices In the pilot building, the installation of the CO2, temperature (Ti), and relative humidity (RH) indoor sensors allowed for the possibility to check IAQ conditions. The standard UNI 10339 [12] establishes air flow rates; the crowding index; indoor and outdoor temperatures; indoor and outdoor RH; and air velocity in the conventional occupied volume. The IAQ significantly deteriorates as the temperature and RH increase [13]. The surveys for air quality checks could be carried out by traditional methods (questionnaires) or by checking the quantitative values of the parameters, including ventilation air flow rate, intake air temperature, quantity of CO2, air temperature, and RH, as well as a check on the pattern of flow distribution in the environment. In Table 1, the CO2 concentration has been correlated to indoor conditions and IAQ. ‘Perfect’ fresh air is not free of CO2. The CO2 concentration of fresh air is low, around 350-400 ppm; acceptable conditions have a CO2 concentration of 600 ppm, while the upper limit is 1,000 ppm. A concentration of 1,500 ppm is considered as unacceptable since air becomes stuffy from this level. Problems for users are reported at 2,000 ppm, and 10,000 ppm is the concentration at which bad air conditions occur and breath and headaches increase. Nausea issues could be detected, with repercussions on intellectual performance and attention. The HVAC parameters and values provided by international normative for university classrooms are shown in Table 2 and Table 3. 3. CASE STUDY: MODULO DIDATTICO BUILDING Building configuration and use The adopted case study is an educational building located in the smart campus of the University of Brescia used for lectures and educational activities, included in the didactic programme and independently by the students. The building can be classified in the national regulation framework as E.7 – an educational facility [16]. The spaces used for the indoor activities are distributed in three levels: the underground floor, where computer labs (MLAB1, MLAB2) are equipped with pc. The ground floor is where two lecture rooms (MTA, MTB) are used every day for the didactic programme. They are connected to the exterior through a south-east oriented totally glazed atrium, which is used for the students’ shared learning activities. The first floor is where the ‘aula magna’ (M1) is located and used both for daily educational activities and for graduation day ceremonies. The atrium has also a first floor for independent study and social activities, and it is equipped with desks and electrical outlets. Moreover, on the underground floor, the interdepartmental lab eLUX – energy laboratory as University eXpo – is installed and used as hot spot of research and community activities. The pilot building that is used as a case study shows the photovoltaic system installed on the rooftop during the previous experimental project Smart Campus as Urban Open Labs S.C.U.O.L.A (Figure 2). The total useful surface is 1,786 m2. In Table 4, the spaces, that are officially designated for student’s use, are listed with the names, the actual number of users hosted in the educational spaces, the area of the spaces, the people density, and the capacity of the air handling units (AHUs) to provide air to the spaces. Table 1. Correlation between CO2 concentration and IAQ conditions in the indoor space. CO2 conc. in ppm IAQ description and detected issue IAQ conditions 350 - 400 Fresh air Perfect conditions < 600 Almost fresh air Acceptable conditions < 1000 Upper limit of fresh air Limit of CO2 concentration < 1500 Stuffy and not fresh air Not acceptable < 2000 Weak people can faint and cough Bad air condition < 10000 Increase of breath rates, respiratory problems, headaches, nausea Very bad air condition Table 2. Parameters for educational building IAQ conditions. Parameter Unit Value Minimum air flow rate vmin m3 / (h · p) 25.2 Crowding index p / m2 0.6 Correction factor for ventilation - 0.51 Average daily presence factor - 8/24 Internal gains sensitble heat W / m2 4 Volumetric perc. of CO2 conc. % 0.1 Acceptable noise levels dBA 30-40 System noise levels dBA 25-30 / 30-35 Table 3. Parameters for thermo-hygrometric wellbeing during the winter and summer periods. Parameter Unit Winter Summer Dry bulb external temp. Tbse °C -7 32 External RH URe % 60 48 Dry bulb indoor temperature Tbsa °C 20 26 Indoor relative humidity RHa % 35 < RHa < 45 50 < RHa < 60 Metabolic activity Mr W / m2 ≥ 70 ≤ 116 Thermal res. of clothing Icl m2°C / W ≥ 0.14 ≤ 0.09 Air velocity v m / s 0.05 < v < 0.15 0.05 < v < 0.15 Figure 2. University of Brescia Smart Campus. The pilot building is located on the left-hand side. ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 73 The atrium has not been designed for the allocation of desks; nevertheless, the two levels are intensively occupied by the users. The list of spaces follows the order from the underground floor to the first floor. Digital twin A BIM model of the building has been realised for multiple purposes. As first, the model was realised (Figure 3) by means of terrestrial laser scanner technology in order to acquire the geometrical information of the spaces. The model has been compared to the data available in the technical office of the university through paper-based traditional documentation. Additionally, the model has been used to calculate energy performances and compare refurbishment scenarios during the S.C.U.O.L.A. project – Smart Campus as Urban Open Lab (National funding 2014-2016). The same model has been also used to locate the installed sensors into the building and propose a methodology to visualise and communicate the data promoting indoor data-mapping to track comfort conditions [17]. A dynamic structure for the communication of data to the BIM model by means of the IFC standard has been proposed [18], and the test and verification phase is still in progress. The BIM model can be implemented to translate the data gathered by the sensors into useful information for building operation and management. IoT and BIM-based building management enable the cognitive building [2], [19] vision in which the asset would learn from the analysed data and would setup the indoor conditions in the different spaces according to optimised schemes and protocols for energy saving [20] and improved user experience [1]. The case study building dates back to the 1980s, and the documentation lacks details about performance, the actual situation of the systems, and recent distribution of spaces. The envelope performance information was not present in the main documentation, and assumptions have been made to define the envelope based on visual inspections (Figure 4). AHUs are installed (n. 8 units) to provide fresh air to the indoor spaces, and fan coils are the emission terminals installed (in the bathrooms, and some additional spaces are equipped with radiators). Systems and issues The air conditioning and ventilation system in the underground floor was refurbished in 2012, and two AHUs have been positioned in additional service spaces in the northern part of the pilot building (Figure 5). The other two floors have autonomous AHUs, n. 4 in the ground floor, n. 1 for the first- floor ‘aula magna’ and n. 1 for the atrium with n. 7 fan coils as terminals. Every unit has a thermostat in the extract air and electric water shut-off valves. The hydraulic power supply is derived from the building's general network. A main list of interventions for the HVAC system is proposed to improve the actual IAQ situation and comfort conditions in the spaces: 1) verifying the operational phase of the systems related to the users’ profile; 2) verifying the control system setting aimed at optimising the comfort conditions; 3) verifying the sensing system to monitor and maintain an adequate IAQ level; and 4) verifying the possible integration of the HVAC system with natural ventilation. Table 4. Functional spaces of the ‘Modulo Didattico’ building. Name Places Users Dimension People density AHU n. n. in m2 in p/m2 in m3/h MLAB 1 56 76 151.79 0.5 5000 MLAB2 82 104 207.94 0.5 2000 MTA 168 89 178.27 0.5 2000 MTB 168 89 177.48 0.5 2000 Atrium 0 56 180.78 0.3 5500 0 56 144.61 0.4 M1 169 262 337.46 0.8 5500 Figure 3. BIM model of the ‘Modulo Didattico’ building at the UNIBS Smart Campus. The three floors are shown together with the rooftop level. Figure 4. Visual inspection and survey on the building to gather information about envelope performance. Figure 5. AHUs for MLAB1 and MLAB2 (functional scheme) as an example of the system configuration for air exchange and IAQ. ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 74 Sensing system The abovementioned issues could be addressed by a dynamic and responsive building that monitors user presence; collects data about temperature and humidity levels; correlates the CO2 concentration with the users’ attendance at the lectures; and activates an integrated natural and mechanical ventilation to reduce the energy and environmental impacts of the building, thereby increasing the comfort level [21]. The pilot building [22] has thus been equipped with sensors to monitor the parameters that are useful for implementing the abovementioned concepts. The monitoring system installed in the building has n. 96 nodes of measurement controlling the main systems of the building, such as lighting, ventilation, heating, and cooling systems (Figure 6). The systems are monitored as listed below: • Lighting system control through presence: n. 24; and daylighting control through illuminance: n. 4; • Ventilation system control sensing the inlet air temperature: n. 15; the air temperature n. 8; the RH n. 9 (in each zone, and the ‘aula magna’ has two sensors of humidity); and • Control of heating and cooling systems with sensors of presence, CO2 concentration, ventilation, and a conditioning damper n. 18 for each service. The sensors have been installed and adopted to verify previous occupancy models, to define discomfort conditions reported by the users, and to enable strategies to increase the building IEQ and user satisfaction. IAQ in the educational spaces The specific problem with IAQ has demonstrated a strong correlation with the comfort of the users. and the parameter of the CO2 concentration is widely accepted as a way of assessing user presence and occupancy in the indoor spaces [21]. In the first phase of the analysis of the model of CO2 concentration in different educational spaces, the calculation model has been developed by considering a standard level of occupancy and then by comparing the results of the model with the actual one. In addition, the real schedule of the educational programme in the building for a didactic week has been applied to understand the intensity of use of the spaces. Nevertheless, the real attendance at the lectures has not been measured, and thus, only a theoretical result is achievable. The use of the building and the spaces is actually intense, and the average number of occupations of the spaces during the week is 7.3 h per day, with a peak on Tuesday (8.5 h) and Wednesday (7.6 h). The atrium is considered constantly occupied, and the most occupied spaces are the PC laboratory and the aula magna (MLAB1 and M1), which have an average daily occupancy hours of 8.1 and 7.2 respectively (Figure 7). Theoretical model The IAQ of the building spaces has been studied assuming deterministic and probabilistic occupancy levels. The building is intensively exploited for the lectures and laboratories, which are occupied by students studying for their courses with the tutors, performing their individual learning path, or working with study groups. The occupancy scenarios have been developed starting from a survey on the maximum availability of seats in the different spaces given at the beginning of the research; however, specific people monitoring has not been conducted. The probabilistic scenarios of occupancy have been generated on the maximum number of people, assuming a triangular probability distribution function, which is: min = 0,3 no,max; mode = 0.6 no,max; max = 1.0 no,max. The calculation model assumed the air changes and the following data: • Air change vmin in the deterministic scenario is equal to 21.6 m3 / (h · p) as required by the national standard, while in the probabilistic scenario, it is assumed to be equal to 25.5 m3 / (h · p). • People density in the deterministic scenario is equal to 0.5 p / m2 as required by the national standard for educational buildings, while in the probabilistic scenario, it is assumed as described above, starting with the maximum value of possible users. Since the typology of users and the activity of learning in the considered spaces, the CO2 per occupant qp is assumed as 0.05 m3/h, and the CO2 at the starting time (t=0) is assumed to be 350 ppm, with no CO2 supplied by the inlet air from the ventilation system. c1 and clim is 1,000 ppm—the threshold for the acceptance of the CO2 in the learning spaces to promote a healthy and productive indoor environment. The calculation model could estimate the IAQ conditions for the different spaces, showing highly critical conditions in the non-refurbished spaces, such as MTA and MTB, which reach 3,000 ppm on a standard Wednesday in a learning week at the campus (Figure 8). The aula magna has also critical conditions reaching 2,500 ppm, while the maximum values for the computer laboratories MLAB1 and MLAB2 are both around 1,500 ppm, which exceeds the 1,000 pm acceptable situation for an optimal IAQ in learning spaces (Figure 9). Figure 6. Examples of the installed sensors in the building spaces: sensor of presence and sensor of temperature and humidity. Figure 7. Daily occupied hours per day during the learning week at the ‘Modulo Didattico’ building in the University of Brescia’s Smart Campus. ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 75 Monitored results The CO2 concentration in the indoor spaces for learning is the main parameter that is used in this research to assess the presence of people in the spaces, and a data mining procedure was applied to the data collected, allowing us to discover how the different rooms were occupied during the monitoring campaign (from July 2017 to May 2018). The data gathered did not have the same continuity and precision for each classroom, and we had to start with a data cleaning process that excluded some spaces due to a lack of reliability in the data or a serious lack of information. The Atrium and MLAB1 have been excluded from the following analyses because of the lack of significance of the amount of data monitored, while MTB was subjected to strong data cleaning so as to avoid data ghosts with no actual relevance. The other learning spaces, MLAB2, MTA, and M1, showed reliable data. The data collection and the necessary cleaning process enabled the analysis of a large amount of data about the learning spaces, structured as follows: • Analysis of the cumulative distribution function (CDF) of the data in the different spaces to understand how many times the registered values are below or above the comfort level and IAQ threshold; the analysis includes CO2 concentration, indoor air temperature, and indoor RH; • Analysis of the minimum, maximum, and average values of CO2 concentration in the different occupied hours during the day in the analysed period; and • Definition of the number of people in the learning spaces based on the registered CO2 concentration. The adopted methodology allows us to evaluate the IAQ and is related to yet more significant parameters, such as temperature and RH. Moreover, the calculation permits us to monitor the actual number of people in the spaces by providing information for setting up, checking, and adapting the ventilation system and the window openings related to the use of the spaces (Figure 10). AI applications could be implemented based on the self- learning of the system by targeting the data collection at the development of predictive control settings. 4. RESULTS AND DISCUSSION The data collected has been analysed in order to verify the critical discomfort conditions that could be experienced by the users and to understand which parameters are clearly beyond the comfort range conditions and how frequently these conditions are experienced by the users. Cumulative distribution function The data analysis has been extended to the indoor comfort parameters, and thus, a cumulative distribution of the following parameters has been plotted: • CO2 concentration in ppm; • Indoor temperature Ti in °C; • RH in %. The CDF demonstrates the probability that the considered variable assumes a value that is lower than a comfort threshold or between a range of values defining the comfort range during the year. For the variables listed above, we set the first threshold as 600 ppm for the CO2 concentration, which is an acceptable condition with almost fresh air perception. We set the second threshold at 1,000 ppm, which is the upper limit of fresh air and the limit for CO2 concentration before an unacceptable IAQ and user perception of stuffiness is reached [22], [23]. In MLAB2, 60 % of the data showed an indoor CO2 concentration above 600 ppm, and in about 20 % of cases, it is above 1,000 ppm. The MTA lecture room has values above 600 ppm in 50 % of the records and above 1000 ppm in 10 %. 80 % of the data concerning M1 is between 600 and 1,000 ppm, never exceeding the second threshold. Nevertheless, it is noteworthy that the monitoring period does not include the graduation days, and for that reason, the M1 (the aula magna used on those days) does not present such critical conditions as experienced and reported by the students in the University of Brescia Smart Campus. The Figure 9. Concentration of CO2 in the MLAB2 during the learning week. Figure 10. Analytical methodology and workflow of the research. Figure 8. Concentration of CO2 in the ‘Modulo Didattico’ building in the different classrooms on a standard Wednesday of the learning week. ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 76 most critical conditions have been registered concerning the MTB lecture classroom, where the data reached 5,299 ppm as a maximum value and an average value of 2,226 ppm. 80 % of the CO2 concentration values in MTB were above 1,000 ppm (Figure 1). For indoor temperature, the two standard values for internal comfort in the winter (20 °C) and summer (26 °C) periods have been considered; however, in the learning spaces, a temperature of around 20 ± 2 °C is considered as preferable based on studies on learning ability and concentration (Figure 12). The CDF for the indoor temperature in the learning spaces shows that 60 % of the indoor temperature values in MLAB2 and MTA were above 20 °C, and 5 % above 26 °C, with a similar distribution for the MTA lecture room. 50 % of the data concerning M1 was above 20 °C and 10 % above 26 °C. 40 % of the values for MTB were above 20 °C, and less than 5 % were above 26 °C. The RH parameter has a similar distribution in the different spaces in the ‘Modulo Didattico’ building: the 60 % of the data shows a CO2 concentration lower than 35 % (an indoor environment that is too dry) and in the 20-30 % of the data, the CO2 concentration was higher than 45 % (too humid). These values refer to the winter period, while in summer period, a range between 50 % and 60 % is required. In the diagram in Figure 13, the comfort bands are defined by the four values assumed as lower and upper thresholds in the winter and summer periods, as clearly defined in Table 2. The distribution shows that a great part of the data referring to the learning spaces is located outside of the bands; however, a detailed in-depth analysis of the two periods should be performed, with a focus on hygro-thermal comfort. Moreover, the RH reaches values that are higher than 60 % in 10 % of the cases of use of the learning space, with a significant and critical level of discomfort. It is noteworthy that this first analysis on big data is able to estimate the percentage of discomfort hours during the use of the learning space of the educational building; however, detail on the moment of the day when the conditions are most critical and strategies that should be applied to improve the IAQ condition are crucial for understanding the daily trends of the comfort parameters. For that reason, an analysis of the hourly distribution of the CO2 concentration is performed and discussed in Section 4.2. Hourly distribution of the data of CO2 concentration An analysis of the CO2 concentration data in the different classrooms has been conducted to outline when the values exceed the stated thresholds and how the data is distributed during the day. In Figure 14, the computer lab (MLAB2) and the lecture rooms (MTA, MTB) along with the aula magna (M1) are analysed. Maximum, minimum, and average values of CO2 concentration obtained from the sensors are plotted. The trend of the distribution is mostly the same in the four classrooms, and at 10:00 am, a peak CO2 concentration is registered, with an average value of around 1,000 ppm and with maximum values reaching 1,500-1,600 ppm in MLAB2, MTA, and M1. It is also noteworthy that 1,500 ppm is reported as stuffy and not considered fresh air, since it is an unacceptable level (Table 1). During lunchtime (1:00 pm), a lower value is registered in each classroom on average, and restarting with the lectures in the afternoon, we can see at 4:00 pm a second peak point. The maximum values are 1,500 ppm from 9.00 am to 6:00 pm for MLAB2 and MTA and to 4:00 pm in M1. The most critical situation is reported in MTB. The average values are similar to the other classrooms; however, the maximum value monitored in MTB is 5,299 ppm at 11:00 am, and in the case that there is no additional ventilation and intense occupancy, after three hours of lectures, it is possible to detect such a high level of CO2 concentration that is associated with very bad air conditions and problems with headaches; nausea; and reduced attention and concentration. Figure 11. CDF of CO2 concentration for the different spaces and curve calculated on the whole amount of data (TOT). Figure 12. CDF of the indoor temperature for the different spaces, calculated on the whole amount of data (TOT). Figure 13. CDF of the RH for the different spaces, calculated on the whole amount of data (TOT). ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 77 Definition of occupancy rate based on CO2 concentration The use of sensors to record the CO2 concentration supports and verifies the presence of people in the indoor spaces, where other monitoring systems are unavailable or mainly used to validate data from different sensors (e.g. people-counting solutions). In many cases, these devices present some problems in the recognition of user presence due to positioning and background noise issues. The accuracy of the recognition abilities of these sensors can be limited due to illuminance (i.e. in the case of optic sensors) and the cost can be very high (i.e. especially where there are multiple entrances to/exits from the classroom). The use of the CO2 concentration parameter as a reference for occupancy has been demonstrated and verified in many studies [24]-[26], and it represents an effective method of evaluating the presence of people in indoor spaces. The CO2 sensors could thus be adopted as informative IoT devices and correlated to actuators in order to improve ventilation (i.e. natural ventilation through windows opening or mechanical ventilation by increasing fan power). Information about user presence can also be used to estimate and customise indoor comfort conditions without the installation of additional detection systems. The importance of accuracy of data in the performance of relevant analyses is crucial so as to avoid the garbage-in-garbage-out effect. In the present research, the CO2 concentration monitored in the classrooms has been used to calculate the presence of people in accordance with the methodology described in prior research [27]. The comfort parameters of temperature and RH, obtained from the sensors, have been correlated to the occupancy range estimated based on CO2 data. A lecture room has been adopted as an example (i.e. MTA) checking the two sample days in spring and autumn (Figure 15 and Figure 16). It is important to note that with a 46 % occupancy rate, the threshold of 1,000 ppm is exceeded, and with a 62 % occupancy rate, the level can reach 1,500 ppm. These results refer to MTA, which has not been refurbished and uses a ventilation system that is outdated and is inadequate for such intensive use. Nevertheless, the spaces are not designed to provide further natural ventilation through the windows, and if in MLAB2 it is possible to open the below grade basement windows, in MTA, MTB, and M1, the building does not provide opening surfaces for natural ventilation. This situation means that only with mechanical ventilation is it possible to respond (or try to respond) to the required level of air changes related to the students’ presence. 5. CONCLUSION This article demonstrates the capability of IoT architecture to exploit the use of sensor data for different application domains adopting the CO2 concentration parameters in combination with temperature and RH as the main indicator for IAQ using sensors to monitor the variation of the parameters in the indoor spaces Figure 14. Minimum, maximum, and average hourly values of CO2 concentration (in ppm) in the learning spaces based on the monitored data. ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 78 of an educational cognitive experimental building at the smart campus of the University of Brescia. The data gathered by the sensors is used to enhance the accuracy of estimation of the occupancy range in the learning spaces, at the same time providing information about environmental quality and thus potentially preventing discomfort and conditions that are not optimal for students’ attention and learning performance. CO2 concentration is adopted internationally as a factor for verifying and calculating indoor presence and for use as a basis for improving comfort conditions for users. In a user-centred design and strategies, it is relevant to have reliable information about the presence of users that could be integrated by customised requests in future. It could also be possible to deliver a tailored service to the users in the indoor space, which is the target of an increasing number of advanced studies on energy saving and operation and management optimisation. ACKNOWLEDGMENTS The authors would like to mention and acknowledge the Smart Campus School Project Team, including Eng. Marco Pasetti, Eng. Paolo Bellagente, and Eng. Federico Bonafini. Special thanks go to Prof. Fulvio Re Cecconi for his valuable collaboration in developing the data analysis models. REFERENCES [1] F.Bittenbinder, C.Liu, S.Rinaldi, P.Bellagente, A.L.C.Ciribini, L.C.Tagliabue, ‘Bi-directional interactions between users and cognitive buildings by means of a smartphone app’, Proc. of the IEEE Second International Smart Cities Conference (ISC2 2016), Improving the Citizens Quality of Life, 12-15 Sept., 2016, Trento, Italy. [2] L.C.Tagliabue, A.Pasquinelli, G.M.Di Giuda, V.Villa, A.L.C.Ciribini, E.De Angelis, ‘Cognitive adaptive urban systems for the living built environment’, Proc. of the 2nd Annual International Conference on Urban Planning and Property Development (UPPD 2016), 10-11 Oct., 2016, Singapore. doi: 10.5176/0000-0000_UPPD.43. [3] P.J.Cash, C.Gram Hartlev, C.Boysen Durazo, Behavioural design: A process for integrating behaviour change and design, Design Studies, 48 (2017) pp. 96-128. [4] M.C.Lee, K.W.Mui, L.T.Wong, W.Y.Chan, E.W.M.Lee, C.T.Cheung, Student learning performance and indoor environmental quality (IEQ) in air-conditioned university teaching rooms, Building and Environment 49 (2012) pp. 238-244. [5] J.D.Spengler, IAQ Handbook, New York: McGraw-Hill Co., 2001, I SBN: 9780074455494. [6] A.Szczurek, et al. ‘CO2 and volatile organic compounds as indicators of IAQ’, Proc. of the 6th AIVC Conference, 5th TightVent Conference, 3rd Venticool Conference, 23-24 Sept., 2015, Madrid. [7] D.S.Dougan, L.Damiano, CO2-based demand control ventilation do risks outweigh potential rewards? ASHRAE Journal, 46 (2004), pp 47-53. [8] N.Mahyuddin, et al. A review of CO2 measurement procedures in ventilation research, International J. of Ventilation, 10 (2012) pp. 353-370. [9] W.Torresani, N.Battisti, A.Maglione, D.Brunelli, D.Macii, ‘A multi-sensor wireless solution for indoor thermal comfort monitoring’, in Proc. of IEEE EESMS, 11-12 Sept., 2013, Trento, Italy, pp. 25-30. [10] P. Bellagente, P. Ferrari, A. Flammini, S. Rinaldi, "Adopting IoT framework for Energy Management of Smart Building: A real test- case", in Proc. of IEEE RTSI, Turin, Italy, Sept. 16-18, 2015, pp. 138-143. [11] ASHRAE 62/89, Ventilation for Acceptable IAQ. [12] UNI 10339:1995 Impianti aeraulici a fini di benessere – Generalità, classificazione e requisiti – Regole per la richiesta dell’offerta, l’offerta, l’ordine e la fornitura. [13] F.Cumo, G.Caruso, L.Ferroni, E.Paladino, ‘L’indice di valutazione dell’Indoor Air Quality come indicatore di sicurezza in ambienti lavorativi confinati, con particolare riferimento al terziario avanzato’, Conferenza VGR 2006 Valutazione e Gestione del Rischio negli Insediamenti Civili e Industriali, 17-19 Ott., 2006, Pisa, Italy. [14] UNI/TS 11300-1:2014, Prestazioni energetiche degli edifici – Parte 1: Determinazione del fabbisogno di energia termica per la climatizzazione estiva ed invernale. [15] UNI 10349:1994, Riscaldamento e raffrescamento degli edifici – Dati climatici. [16] D.P.R. 26 Agosto 1993, n. 412. Regolamento recante norme per la progettazione, l'installazione, l'esercizio e la manutenzione degli impianti termici degli edifici ai fini del contenimento dei consumi di energia, in attuazione dell'art. 4, comma 4, della L. 9 gennaio 1991, n. 10, Gazz. Uff. 14 ottobre 1993, n. 242, S.O. [17] D.Pasini, S.Mastrolembo, S.Rinaldi, P.Bellagente, A.Flammini, A.L.C.Ciribini, ‘Exploiting Internet of Things and building information modeling framework for management of cognitive buildings’, Proc. of the IEEE International Smart Cities Conference (ISC2 2016), 12-15 Sept. 2016, Trento, Italy. [18] M.Scheffer, M.Konig, T.Engelmann, L.C.Tagliabue, A.L.C.Ciribini, S.Rinaldi, M.Pasetti, ‘Evaluation of open data models for the exchange of sensor data in cognitive building – Dynamic linkage sensors – BIM model for the eLUX Lab’, Proc. of the IEEE International Workshop on Metrology for Industry 4.0 and IoT, 16-18 Apr. 2018, Brescia, Italy. [19] S.Rinaldi, A.Flammini, L.C.Tagliabue, A.L.C.Ciribini, M.Pasetti, S.Zanoni ‘Metrological issues in the integration of heterogeneous Figure 16. Number of people related to CO2 in MTA (12 September 2017). Figure 15. Number of people related to CO2 in MTA (20 March 2018). ACTA IMEKO | www.imeko.org June 2019 | Volume 8 | Number 2 | 79 IoT devices for energy efficiency in cognitive buildings’, Proc. of the I2MTC – 2018 IEEE International Instrumentation & Measurement Technology Conference, 14-16 May, 2018, Houston, Texas, USA. [20] F.Bittenbinder, C.Liu, N.Moretti, F.Re Cecconi, L.C.Tagliabue, A.L.C.Ciribini, I.Kovacic, ‘A vision for a cognitive campus network of universities: the learnscapes of Poveglia Island’, Proc. of the 3rd SDEWES Conference, 30 Jun.-3 Jul., 2018, Novi Sad, Serbia. [21] S.Rinaldi, A.Flammini, L.C.Tagliabue, A.L.C.Ciribini ‘On the use of IoT sensors for indoor conditions assessment and tuning of occupancy rates models’, Proc. of the IEEE International Workshop on Metrology for Industry 4.0 and IoT, 16-18 Apr. 2018, Brescia, Italy. [22] E.De Angelis, A.L.C.Ciribini, L.C.Tagliabue, M.Paneroni, The Brescia smart campus demonstrator: renovation towards a zero energy classroom building, Procedia Engineering, 28 (2015) pp. 735-743. [23] A.Szczurek, et al. ‘CO2 and volatile organic compounds as indicators of IAQ’, Proc. of the 6th AIVC Conference, 5th TightVent Conference, 3rd Venticool Conference, 23-24 Sept., 2015, Madrid, Spain. [24] D.Calì, P.Matthes, K.Huchtemann, R.Streblow, D.Müller, CO2 based occupancy detection algorithm: experimental analysis and validation for office and residential buildings, Building and Environment 86 (2015) pp. 39-49. [25] D.Chen, S.Backer. A.Subbaswamy, D.Irwim, P.Shenoy, ‘Non- intrusive occupancy monitoring using smart meters’, Proc. of the 5th ACM Workshop on Embedded Systems for Energy-Efficient Buildings, 11-15 Nov., 2013, Roma, Italy, pp.1-8. [26] K.Akkaya, I.Guvenc, R.Aygun, N.Pala, A.Kadri, ‘IoT-based occupancy monitoring techniques for energy-efficient smart buildings’, Proc. of the 2015 IEEE Wireless Communications and Networking Conference (WCNC) Workshop, Energy Efficiency in the Internet of Things, and Internet of Things for Energy Efficiency, 9-12 Mar. 2015. [27] L.C.Tagliabue, M.Manfren, A.L.C.Ciribini, E.De Angelis, Probabilistic behavioural modelling in building performance simulation: the Brescia eLUX lab, Energy and Building, 128 (2016) pp. 119-131.