A Cognitive-Driven Building Renovation for Improving Energy E ﬃ ciency: The Experience of the ELISIR Project

: In the last few years, the technology re-evolution has deeply transformed several aspects of everyday life. For sure, one technology with a strong impact is the so-called Internet of Things (IoT). The Italy. The accuracy of this algorithm to classify the users’ behaviour and preferences was found to be around 90%, considering an observation interval of two months. L.C.T., T.P., and software, supervision, S.R. and T.P.;


Introduction
Over the last decade, technology has been driving a revolution in several application domains. In particular, one technology with a strong impact is Internet of Things (IoT) paradigm. This paradigm made it possible to break down the data barrier between the vertical domains on which the traditional information and communication technology (ICT) world was organized. Thanks to the IoT paradigm, such a situation is no longer valid. Now it is possible to exchange information between different application domains thanks to the definition of common data model and the use of web-based protocols to transfer these data and to identify available services. The first sector able to fully exploit this approach was that of industrial automation: the industrial IoT (IIoT) [1] is one pillar of the so-called Fourth Industrial Revolution, a revolution driven by data. The possibility to exchange data among different application domains is of particular interest in the Smart Cities context, where the optimal management of resources (electricity, water, heat, waste) depends on the integration of heterogeneous infrastructures. From this point of view, buildings represent the cells of a city and the interface of each citizen with their neighbourhood. Only recently has the construction sector begun to fully understand the benefits of digitalization. The first step in this process is the use of building information modelling (BIM) [2] during the entire life cycle of building, not only during the construction. Such an approach also completely transforms the way to use and consider buildings, e.g., suggesting a pay-to-service approach [3]. The digitalization of the construction, operation, and management phases of buildings is just the first step toward a data-oriented approach. The need of real time data from the buildings requires a massive deployment of sensors [4,5] that are able to collect information from the plants and infrastructure, as well as to integrate with the rest of the available data [6]. Such an amount of data about buildings opens the road for innovative approaches based on artificial intelligence (AI) [7] to identify the state of the building (i.e., predictive maintenance), their energy efficiency [8,9], the optimal usage of the renewable resources [10,11], and more. The integration of sensors and the use of AI to automatically infer information about the building and the users' needs is also known in the literature as cognitive building, a step over the traditional concept of building automation. The building itself is able to auto-define its behaviour to optimize the trade-off between energy efficiency and users' comfort, and it can do so without human intervention. Moreover, in the near future, buildings will interact each other to maximize the efficiency of entire communities.
Starting from these premises, the target of this research work was to present an integrated approach to be followed during the renovation of buildings. Several countries are funding renovation plans to improve the energy efficiency of existing buildings. Generally, these renovations focus on the replacement of existing window units with more efficient ones, the addition of external/internal thermal insulation coatings, and the improvement of existing electric and hydraulic plants. The ELISIR project, funded by Regione Lombardia, Italy, aims to digitalize the entire supply chain of the construction sector, from the producer of building elements, through the construction company, and to the final maintenance company. The thread that links each component of the supply chain is data from its generation to its interpretation. The idea behind the project is to integrate the "intelligence" into building elements that are frequently used during renovation: window units, hydraulic connections, electric components, and thermal and seismic coatings. Once installed, these elements start to monitor the renovated building through integrated sensors, and they can optimize the energy efficiency by actuating command. In this way, it is possible to reduce the costs of the installation of separated sensors and actuators. The data generated by the integrated sensors are processed by a cognitive layer, which automatically infers information about the state of the building and the users' habits and needs in order to optimize the behaviour of the entire building in terms of energy efficiency and comfort. In particular, this paper focuses on the integration of an instrumented window unit with the cognitive layer for the identification-through a machine learning algorithm-of users' behaviour.
This paper is structured as follows. In the next section, a brief introduction to cognitive building paradigm is introduced, focusing on its application during the renovation phase, the approach followed during the ELISIR project. Section 3 discusses the ICT systems that are fundamental infrastructures to support the cognitive-based renovation of buildings. Section 4 presents the application of this approach to a real test case, demonstrating its feasibility from the technical and the economical point of views. The obtained results are discussed in the final section.

The Cognitive Building Paradigm
Cognitive buildings respond to changes imposed by external and internal variables such as climate or user behaviour, optimizing processes that influence the overall performance of the building, considering indoor comfort issues and outdoor environmental impacts. Recently, the cognitive building paradigm has been evolving toward cognitive infrastructures, which have become the new frontier for assets and users. The Fourth Industrial Revolution, better known as Industry 4.0 [12], is currently the subject of specific government actions in different countries, including Italy, following the conclusion of an important cognitive survey carried out by a parliamentary committee [13] after Germany had first coined its expression and content in 2011 and analyses [14,15], immediately followed by the United States [16] and other countries [17] (from Australia to the United Kingdom), with different names and meanings. The cognitive building paradigm is more than specifying the automation of a smart building and then delivering it. One of the biggest obstacles that is faced when trying to adopt a new technology, whether it is environmental or experiential, is the cost. Any designer can support that by packing a building with sensors (motion, light, temperature, humidity, and infrared), as one's workforce then becomes more productive and the benefits far outweigh the financial investment. However, only now is it possible to critically evaluate the benefits coming from the data analytics for the management of buildings [18].
Cognitive systems, like IBM's Watson [19], can ingest enormous amounts of data [20], as disparate in form and content as motion and thermal sensor readings, images, video, and weather forecasts, and they can then turn the data into insight about how people use buildings. A cognitive system uses machine learning and natural language processing to generate hypotheses and recommendations to help people make better decisions. A cognitive system can behave like doctors, financial advisors, call centre operators, or building owners and managers, depending on the processed data. By making these technologies available on the cloud through its Watson IoT platform, IBM has been building an ecosystem of partners and customers that is helping to transform the way people use, interact with, and think about buildings [21].
Beyond the many studies on the subject developed by government institutions and consulting firms, the precise essence of the phenomenon has not yet been definitively defined since the experiments are heterogeneous, although all of them have had a cyber-physical nature. Nevertheless, preliminary results have been extremely significant, sometimes even critical, and promise to have many new consequences concerning, among other things, the intensity and qualification of human capital; additionally, there is an expectation that AI can soon perform the decision-making processes that are currently entrusted to human resources, that are destined to disappear.
The construction sector does not seem to be at the centre of the Industry 4.0 revolution that, even if investing in the service sector, is still mainly linked to the manufacturing sector. On the contrary, the construction sector, as well as having a negative reputation as being highly unproductive, has been judged to be one of the most analogical in absolute terms [22]: In a certain sense, although it has a significant impact on the national economy, it is perceived by political and financial decision-makers as a ballasting element, since unproductiveness is combined with illegality to determine its negativity [23].
For construction, however, BIM has played the role of the treadmill of digitization [24],which, starting from 2011, has been the strategy of the British Government. Eventually, this function [25] will ideally be replaced by the Smart City [26]: BIM, in fact, through geospatial information, passes through the Internet of Things, more directly and precisely reconnecting everything to Industry 4.0. The integration of IoT sensors into BIM for the management of buildings has been demonstrated to be effective in several demo projects [27], in particular for the energy management [28]. However, such integration should be aware of the quality of the information generated by the sensors to avoid misinterpretation that could affect decision-making processes [29].
Of course, on these issues, alongside enthusiastic narratives, there are some strongly critical positions on the outcome of digitization and its consequences, as well as in the direction of its ineffectiveness. However, BIM was fully integrated into domestic government strategies with the Italian Legislative Decree 50/2016 [30] (similar normatives have been applied in other European countries) following its citation within an EU directive on public procurement [31], as well as an explicit reference to digitization is present in Italian ministerial planning related to infrastructure for mobility. Obviously, at an international level, there are plenty of examples of the application of Industry 4.0 principles to building production, thus establishing a direct and immediate parallelism with other more strictly manufacturing areas, especially in terms of the relationship between the different production sites involved in supply chains.
International research on the building side is now focusing on cognitive building and intelligent homes, as demonstrated by IBM and Innovate UK, that appeared, in the first instance, as elaborations of home automation or smart building but which could generate less predictable effects. In fact, in the construction research area, the memory of an unlucky season dedicated to "intelligent buildings," first identified with tertiary new buildings and later residential ones, is still vivid. Even in our times, however, smart living is mainly associated with the furniture and household appliance chain, with the addition of drywall systems, without any grasp of the essence of the topic of cognitivity. This happens because cognition represents the most sensitive point of the question, connected to the (artificial) intelligence fed by an extraordinary amount of big data that have, by now, become more and more "readable" and "relatable" and thus helping to understand, in real time, the phenomena that drive decisions.
As is further recalled, it is precisely the heterogeneity and total amount of the data, also unstructured, that allow solutions like IBM's Watson IoT to choose their own data sources and decide which patterns and relationships to pay attention to. Watson uses machine learning and advanced processing to organize data and generate insight [32]. KONE Corporation, a Finnish company leader in elevator production, uses IBM's Watson IoT to manage flows of people instead of controlling elevators [33]. On the other hand, building and infrastructure information modelling and management has been, until now, considered a device to be used with the dual purpose of strengthening the low reputation of the sector and increasing its productivity in order fix the negative reputation of the sector, but it did not seem able to go beyond this. On the contrary, cognitive buildings have a much more transformative value.
In terms of infrastructure, digitalization has enabled the industry, even more than for buildings, to radically rethink its meaning as systems (in terms of systems engineering) clearly conditioned by human artifacts and partly anthropized territory. The latter, in relation to the geo-spatialized information modelling (GIM) inherent to BIM supported by the geographic information system (GIS) has naturally led to the establishment of a close link between the construction sector and the so-called smart and living built assets; this is distinctively known in the strategy of the British Government as Digital Built Britain. Obviously, infrastructures are primarily concerned with roads, tunnels, bridges, canals, airport fingers, etc., i.e., relatively fixed structures whose tangibility is much more absolute than mobile entities such as cars, railway trains, boats, and airplanes. However, geo-spatial infrastructures refer to the paradigm of connection, e.g., between infrastructures for mobility and networks. This connectivity affects not only the more-or-less tangible artefacts (from the motorway to broadband) but also the relationship between assets and people, between works and users. From this point of view, on the one hand, there are now many studies and experiments on infrastructure information modelling linked to traditional approaches that can be attributed-especially on the (car) road and rail sides-to Finland, France, the Netherlands, Norway, Sweden, Spain, and Great Britain, and, on the hydraulic and hydrogeological side, in addition to the airport side, to the United States. The reflection of all this attention on manufactured products is clearly evident from the consultancy notice that the German Federal Ministry of Digital Infrastructure and Transport has recently published in order to realize the strategy to be implemented by 2020, of which the pilot project currently most cited by Deutsche Bahn is the Rastatt Railway Tunnel [34]. The emphasis of this project tends to be on the fixed object and, in particular, on individual works. On the other hand, however, there are examples, such as those offered by Andrew McNaughton regarding High Speed Two [35], the British high-speed railway, where the notions of connection and cognition emerge overwhelmingly through the so-called user-centric (or -centred) built assets.
The sensorized infrastructure icon, smart and green infrastructure, is not in itself unprecedented; it is condensed, as such, in Virtual Singapore [36]. In McNaughton's story, in fact, there are not only works of art, armaments, (digital) signage, and travelling material but also, and especially, passengers in dialogue with infrastructure (with its managers), as they find themselves trapped in London traffic when they arrive at their seat after leaving their place of arrival.
Digital Railway is therefore a parallel but similar theme to rail BIM. This approach, which is called operational, clearly requires the so-called active BIM client organization. The conventional version of BIM is, moreover, clearly impregnated with collaborative working and integrated contracting, which explains how, at an international level, the contractual formulas of design-build (or Public Private Partnerships-PPPs) are considered among the most suitable for the theme. Consequently, designers, builders, managers, and users are called together to contribute, from the preliminary stages to the design concept, in order to anticipate and optimize choices, thus mitigating the risk of failure in view of the whole life cycle and its implications on circularity. All this, however, does not account for a further passage that occurred in the 1930s, from the airship to the airplane as the prevailing aircraft through the transition from operational to behavioural-hence, the centrality of cognition. In fact, it is not a question of involving passenger panels in the participatory briefing process; it is one of ensuring that the customer/manager acts as the creator of the services to be provided. These services should be individually offered to tracked users/passengers, distinct within a moving crowd. For this purpose, a digital immersive ecosystem in which to perform user/passenger behaviour simulations is needed.
Transportation research in IBM's Dublin Labs [37], performed by the Smarter Urban Dynamics team focuses on developing analytics and tools to better understand and optimize urban dynamics. The team develops research around three areas.

1.
Leveraging digital traces from mobile devices to gain an insight in why, how, and when we travel. Using this information, mobility demand can be predicted and transport resource capacity accordingly allocated, offline or in real-time.

2.
Leveraging transport infrastructure and associated applications in Intelligent Transportation Systems (ITS) analytics to ensure and maintain the desired level of quality of service to best accommodate mobility demand. both at a global level and down to individual travellers such that demand and supply are better matched.

3.
Providing travellers with an awareness of the transport infrastructure conditions so that each can individually and confidently decide on a best travel strategy that is also collectively sustainable. First of all, since infrastructure is a productive asset, it is necessary to optimize its flows and employment rates. It is clear, however, that the way we look at a station, a viaduct, or a tunnel may underline the rate of innovation of a structural nature; in the first case, we may look at innovation from an energetical point of view that emphasizes the environmental aspects but never directly evokes the passenger who benefits from mobility services. Moreover, it is very difficult for flows, more individual than collective, to concern the individuals when they are not inside but are far from the infrastructure and its assets. Secondly, beyond the sensors and actuators, the connection is translated into cognition when the data that also flow from social networks and apps are translated into information that allow for the realization of sentiment analysis within immersed environments, thus simulating reactions and perceptions. In some way, the customer/manager could "sketch" services that could be visualized as dynamic space flows that could be placed, finally, in the data sheets of a digitalized preliminary address document. Therefore, the original contracted party's information requirements (employer's information requirements in the UK, cahiers de charge BIM in France, auftraggeber-informations-anforderungen in Germany, and informative specifications in Italy) within a digital briefing process could be fed by a multisensory behavioural simulation implemented in immersive environments.
The definitive meaning of this mode puts a sequence of priorities, which it would even be anticipated in the simulation, in the foreground: 1.
The asset emphasizes its more dynamic, flexible, adaptive, physical-environmental, and functional-spatial components thanks to its ability to process gigantic amount of heterogeneous and unstructured data that allow one to understand the lifestyles of the occupant who, as a resident or passenger, becomes a client or who, as a worker, becomes a productive factor. 2.
The asset operates not as an individual entity but as an organism related to other entities with which it exchanges flows of different categories.
The idea of a cognitive neighbourhood goes one step beyond and envisions the combination of several cognitive buildings and assets into a network in which IoT technologies are mixed with AI agents to achieve a dialogue between buildings and end-users, as well as between one building and another. The key elements of a cognition process involve understanding, reasoning and learning. Computers are nowadays able to take large volumes of structured and unstructured data, analyse them, and generate outputs that are "conscious" of the evolutions of the problem [38].

Cognitive Building at Work: The ELISIR Project
The Energy, Life Styled and Seismic Innovation for Regenerated Buildings (ELISIR) project [39] started in 2017 and finished on the 22 November 2019 after 24 months of development. The project was financed by the Lombardy region under the smart living framework with the involvement of ten partners, from academia and the construction supply chain: the University of Brescia as lead partner; Politecnico di Milano, Schneider Electric, Valsir spa, and Italserramenti as industrial partners; Harley and Dikkinson as financial and business partners, Gexcel, a spin-off of the University of Brescia as the leader in TLS technologies; Assini Costruzioni and Deldossi (two local construction companies); and Delta Phoenix (a company leader in plaster innovation for seismic regeneration). The Building System Institute of Brescia (ESEB) plays the role of administrator of the project, and it is responsible for maintaining contact with the local construction supply chain.
The project concerned urban regeneration and, in particular, focused on building regeneration. The principles of the ELISIR project are graphically represented in the block diagram of Figure 1. ELISIR intended to implement a seismic and energy audit within a process of analysis and a definition of optimized intervention through procedures and integrated systems for monitoring, with particular attention to the pre-and post-intervention phases. The idea was to organize a supply chain related to the construction sector that defined the performance of the renovated building on service thresholds based on safety and well-being criteria, increasing housing quality while directly interacting with occupants. The proposed method incorporates the centrality of the user in the life cycle of the regenerated asset by presenting data produced by the construction in an information flow that enables one to identify informed and supported, data-driven decision-making processes based on AI during the entire life cycle of the building, from the regeneration to the operation and management phases. In this way, some choices can be semi-automated, while other decision-making nodes that are not directly computable can be screened against indicators extracted from the same analyses. The autonomy of the computational processes simplifies the operative and decisional phases, thus promoting an intelligent and cognitive environment with respect to the variables introduced by the users and by the specific project.
The pillars of the proposal are therefore security, efficiency, and customization, being supported by digitization, sensorization, and building monitoring. The approach focuses on users' needs without increasing the complexity in the interaction with the building management system (BMS). The proposed business model is based on building control via a virtual environment (Digital Twin) that enables data management on a computational basis, aiming at integrating phases, skills, and work/services in order to increase the reputation and also creditworthiness of the entire supply chain. The integration of sensors (and actuators) in the elements used during renovation (energy efficient windows, hydraulic connections, and seismic and thermal insulating coating) is a direct consequence of this process that is aimed to improve the overall value of the construction sector supply chain. The use of these smarter elements during renovation make it easier for the management of the building during its entire life. The target of the ELISIR project was to introduce the data driven revolution at different layer of the construction sector supply chain. The organization of the project is shown in Figure 2 [40]. The proposed method incorporates the centrality of the user in the life cycle of the regenerated asset by presenting data produced by the construction in an information flow that enables one to identify informed and supported, data-driven decision-making processes based on AI during the entire life cycle of the building, from the regeneration to the operation and management phases. In this way, some choices can be semi-automated, while other decision-making nodes that are not directly computable can be screened against indicators extracted from the same analyses. The autonomy of the computational processes simplifies the operative and decisional phases, thus promoting an intelligent and cognitive environment with respect to the variables introduced by the users and by the specific project.
The pillars of the proposal are therefore security, efficiency, and customization, being supported by digitization, sensorization, and building monitoring. The approach focuses on users' needs without increasing the complexity in the interaction with the building management system (BMS). The proposed business model is based on building control via a virtual environment (Digital Twin) that enables data management on a computational basis, aiming at integrating phases, skills, and work/services in order to increase the reputation and also creditworthiness of the entire supply chain. The integration of sensors (and actuators) in the elements used during renovation (energy efficient windows, hydraulic connections, and seismic and thermal insulating coating) is a direct consequence of this process that is aimed to improve the overall value of the construction sector supply chain. The use of these smarter elements during renovation make it easier for the management of the building during its entire life. The target of the ELISIR project was to introduce the data driven revolution at different layer of the construction sector supply chain. The organization of the project is shown in Figure 2 [40].

A Cognitive Renovation: Infrastructure Architecture
As discussed in the previous section, a cognitive-based approach for renovation requires a strong integration of ICT infrastructure with the existing structure of buildings in order to allow for a massive deployment of sensors or systems to acquire information about users' habits in an unobtrusive way. The approach followed during the ELISIR project was to integrate as many sensors and actuators as possible in the elements that are usually replaced or added during renovation phases to improve the energy efficiency and the management of the buildings, e.g., windows, thermal insulation coating, and hydraulic fittings. This approach allows one to monitor the state of the building and the users' habits, as wellas to take corrective action to improve overall efficiency, limiting the installation costs of a full home automation system because the deployment is performed during the renovation phase. The main drawback of this strategy is that the contractor responsible for the renovation must always take into account ICT technology during the initial design phase, as it is an integral part of the renovation process. Several solutions can be used to make smarter buildings; some of them very-well known to home automation system designers, and other are inherited from other application domains [41] based on the IoT architecture [42].
The main difference between these solutions depends on where the "intelligence" (and the data) are located. Figure 3 compares three different computation architectures. The first one, shown in Figure 3a, is a hierarchical approach followed by traditional home automation system vendors. A local controller is responsible for the data collection from the sensors. Based on the configuration of the user, the controller sends the commands to actuators. The user can interface the automation system through a dedicated user interface (UI), which is generally an app. In this architecture, the data and the "intelligence" are located inside the user' building. Nevertheless, the cognitive approach requires the integration of data coming from different sources to infer the users' habits. In addition, the local controller generally does not have the computational resources required to implement the

A Cognitive Renovation: Infrastructure Architecture
As discussed in the previous section, a cognitive-based approach for renovation requires a strong integration of ICT infrastructure with the existing structure of buildings in order to allow for a massive deployment of sensors or systems to acquire information about users' habits in an unobtrusive way. The approach followed during the ELISIR project was to integrate as many sensors and actuators as possible in the elements that are usually replaced or added during renovation phases to improve the energy efficiency and the management of the buildings, e.g., windows, thermal insulation coating, and hydraulic fittings. This approach allows one to monitor the state of the building and the users' habits, as wellas to take corrective action to improve overall efficiency, limiting the installation costs of a full home automation system because the deployment is performed during the renovation phase. The main drawback of this strategy is that the contractor responsible for the renovation must always take into account ICT technology during the initial design phase, as it is an integral part of the renovation process. Several solutions can be used to make smarter buildings; some of them very-well known to home automation system designers, and other are inherited from other application domains [41] based on the IoT architecture [42].
The main difference between these solutions depends on where the "intelligence" (and the data) are located. Figure 3 compares three different computation architectures. The first one, shown in Figure 3a, is a hierarchical approach followed by traditional home automation system vendors. A local controller is responsible for the data collection from the sensors. Based on the configuration of the user, the controller sends the commands to actuators. The user can interface the automation system through a dedicated user interface (UI), which is generally an app. In this architecture, the data and the "intelligence" are located inside the user' building. Nevertheless, the cognitive approach requires the integration of data coming from different sources to infer the users' habits. In addition, the local controller generally does not have the computational resources required to implement the most advanced AI algorithms. The second architecture (shown in Figure 3b) exploits the use of cloud computing technology for building automation. This approach is the preferred road followed by the big tech companies, including solutions like HomeKit from Apple, Google Home by Google and Home Assistant from Amazon. Recently, an attempt to define common application program interfaces (APIs) for the automation of building was proposed by the project Connected Home over Internet Protocol (IP) [43], sponsored by big tech companies and Zigbee Alliance. In this architecture, all the data generated by the sensors are transmitted to remote cloud servers, where the data are stored in no-Structured Query Language (SQL) databases [44] and used by cognitive algorithms to infer information about users' habits and preferences, which is used to optimize the comfort (and the energy savings) of the monitored building. The strong point of a pure cloud-based approach, as well as its biggest weakness, is that the "intelligence" of the system is located on remote server. This solution is fully scalable: All the required computational power and storage for data are made available when required. Unfortunately, that means a permanent connection is required between the devices located in the home and the remote server where the intelligence is located. In case of network failure, the devices in the buildings are in an open loop without any control. The edge computing approach is able to properly respond to connection issues. In this approach, which is shown in Figure 3c, part of the intelligence is located locally in the building. The local controller is responsible for applying the rules inferred by the remote cognitive intelligence. As in the previous case, the data generated by the sensors and the actuators are transferred to remote cloud servers, where AI algorithms process them to define the control rules to be applied in each building. This architecture maintains large part of the benefits of cloud-based solutions while also allowing the system to properly operate off-line. Obviously, under these circumstances, the cognitive algorithms do not operate but the automation of the building is still able to work.
In the following section, the architecture of the system designed for the integration of data coming from the smart object of the ELISIR project is described in detail.

The ELISIR Architecture
The ELISIR project aimed to use a cognitive approach for the management of buildings during their entire life. This means the entire supply chain of the construction sector should be able to provide solutions able to generate "data." These building elements should be integrated with ICT infrastructures during the renovation phase in order to enable cognitive functionalities. The ICT infrastructure designed for the ELISIR project should satisfy the following requirements: having backward compatibility, scalability, easy deployment, low cost, and being future proof.
The architecture, able to satisfy the requirements described above, is shown in Figure 4. Such an architecture represents a hybrid approach between the traditional hierarchical structure and the edge one. In this architecture, the local controller is configured to play the role of the gateway between field devices and the remote cognitive intelligence. The local rules applied by the controller can be configured by the user through the proprietary cloud made available by the vendors of the local controller or by the cognitive intelligence. The commands sent by the users have a higher priority with the respect to the rules defined by the cognitive intelligence. In any case, the cognitive intelligence collects information from the sensors and the actuators in order to predict needs of the user and to progressively reduce the user's intervention. The field devices are connecting to the local controller through a traditional bus, typically KONNEX (KNX), the de-facto standard for home automation communication. The use of a specific fieldbus does not limit the generality of the proposed architecture and is only used because of market availability. Only a high-end controller, equipped with KNX connection, can be properly programmed to accept remote rules from cognitive intelligence. It should be noted that the cognitive intelligence makes the use of a dedicated cloud infrastructure (the cognitive cloud) that different from the cloud of the vendor of the local controller in order to be compatible with as many solutions as possible on the market. A dedicated interface should be implemented for each controller in order to adapt the different APIs.

The ELISIR Architecture
The ELISIR project aimed to use a cognitive approach for the management of buildings during their entire life. This means the entire supply chain of the construction sector should be able to provide solutions able to generate "data." These building elements should be integrated with ICT infrastructures during the renovation phase in order to enable cognitive functionalities. The ICT infrastructure designed for the ELISIR project should satisfy the following requirements: having backward compatibility, scalability, easy deployment, low cost, and being future proof.  in order to be compatible with as many solutions as possible on the market. A dedicated interface should be implemented for each controller in order to adapt the different APIs.
In the following section, an example of the potentiality of the proposed approach is demonstrated. In particular, the example of the integration of a smart window prototype with the Heating Ventilation Air Conditioning (HVAC) system for optimizing the trade-off between users' comfort and energy efficiency through a cognitive application is discussed and validated through an extensive experimental campaign. In the following section, an example of the potentiality of the proposed approach is demonstrated. In particular, the example of the integration of a smart window prototype with the Heating Ventilation Air Conditioning (HVAC) system for optimizing the trade-off between users' comfort and energy efficiency through a cognitive application is discussed and validated through an extensive experimental campaign.

The Definition of the Energetic Use Case
During the ELISIR project, a prototype of a window unit, equipped with a shading system, which allowed for a straight-forward integration and implementation of the building component into a BMS was designed and implemented. The communication standard for the integration of the window unit with the local controller was KNX due to its wide availability on the market.
The operation mode of the aperture/closure of the window unit and movement of its shading system is influenced by the following factors: • The environmental context and its conditions (e.g., outdoor temperature, outdoor relative humidity, and outdoor illuminance).

•
The energetic performance of the building.

•
The window unit typology (aperture functional model) and its actual, or residual, performance.

•
Building occupancy type, perception of comfort condition, and behaviour.
The window unit designed during the ELISIR project works contemporarily as a sensor and an actuator. The activation modes and operational rules for shading/blinding the ELISIR window depend on the pre-defined profiles/modes of operation. Specifically, the window unit monitors: • The intensity of direct radiation and the superficial temperatures on the window frame (∆T ( • C)) with the scope of managing the hygrothermal comfort that demands energy use for winter and summer indoor conditioning.

•
The presence of direct radiation and illuminance coming from the sky vault in order to ensure visual comfort.

•
The concentration of CO 2 in the environment to guarantee air healthiness.

•
The occupancy of the space to provide both safety and privacy when required.

Window Unit Functioning
The scope of ELISIR is to improve users' awareness on energy efficiency and to make them conscious of the impact that their behaviour has on it; at the same time, it is intended to introduce smart devices during renovation in residential buildings without costly interventions for the implementation of separated home automation systems and sensors.
The window unit also becomes an actuator when it reacts to the environment variation monitored by the sensors by means of issuing a command for the aperture or for activating/de-activating the solar shading on the basis of the operation mode selected by the user.
In this system, the degree of interaction between the monitored parameters (cascading or parallel correlation), the definition of activation and de-activation thresholds, and the definition of the operation modes of the window unit are established based on the analysis of the context (indoor and outdoor).
Thus, the aperture of the window unit and the activation/de-activation of the solar shading rely on: • An upper threshold limit of CO 2 concentration readings, starting from CO 2 concentration limit indoors for category 2 in Ventilation Annex B of EN16798-1 [45] and later adjusted from occupant behaviour (governing window aperture/closure).

•
∆T air ( • C): upper and lower threshold limits for indoor and outdoor T air ( • C) measurements (based on user's medium level expectations under sedentary activity listed in [45]) and estimated direct radiation from T surface ( • C) readings from the window frame (governing window aperture/closure).

•
Measured external illuminance and estimated direct radiation from measured window frame T surface ( • C) (governing solar shading position).

The Prototype of the Smart Window
The prototype designed and implemented during ELISIR project was a wooden frame window unit that was devised for single or double sash with a type of opening that could be either sash or tilt and turn. The window unit dimensions ranged (Length-L, Height-H) within: 920 mm < L < 1520 mm and 1030 mm < H < 2460 mm. The glazing was composed of a low-double-glazing equipped with a solar-influx control system located in the glazing cavity. This shading system was constructed from aluminium micro-slats that had a length, L, equal to 12.5 mm.
A detailed description of the window unit, in terms of dimensions, is presented in Figure 5. Table 1 lists the sensors embedded in the window unit, as well the monitored parameters (including those for the preliminary surveying and subsequent calibration/validation phase-Prototypes 1 and 2, respectively).
unit that was devised for single or double sash with a type of opening that could be either sash or tilt and turn. The window unit dimensions ranged (Length-L, Height-H) within: 920 mm < L < 1520 mm and 1030 mm < H < 2460 mm. The glazing was composed of a low-double-glazing equipped with a solar-influx control system located in the glazing cavity. This shading system was constructed from aluminium micro-slats that had a length, L, equal to 12.5 mm.
A detailed description of the window unit, in terms of dimensions, is presented in Figure 5.  Table 1 lists the sensors embedded in the window unit, as well the monitored parameters (including those for the preliminary surveying and subsequent calibration/validation phase-Prototypes 1 and 2, respectively). Figure 6 shows a demonstration of the cabling and positioning of embedded sensors within the window unit for Prototype 2. In particular, Figure 6 shows the installed sensors: Luxmeter ( Figure  6a), Passive InfraRed PIR (Figure 6b), temperature, relative humidity, and CO2 sensors (Figure 6c). The local controller used to acquire the data from the sensors is shown in Figure 6d. The local controller is able to acquire the data from any object able to generate data. The local controller is generally placed in the main electric panel of a building. An example of an electric panel containing the local controller is shown in Figure 6e. The final prototype of the ELISIR window unit is shown in Figure 6f.

Sensor allocated space for integration
View from the INTERIOR View from the EXTERIOR Figure 5. The details of the ELISIR window unit. All reported measurements are in mm.  Figure 6 shows a demonstration of the cabling and positioning of embedded sensors within the window unit for Prototype 2. In particular, Figure 6 shows the installed sensors: Luxmeter (Figure 6a), Passive InfraRed PIR (Figure 6b), temperature, relative humidity, and CO 2 sensors (Figure 6c). The local controller used to acquire the data from the sensors is shown in Figure 6d. The local controller is able to acquire the data from any object able to generate data. The local controller is generally placed in the main electric panel of a building. An example of an electric panel containing the local controller is shown in Figure 6e. The final prototype of the ELISIR window unit is shown in Figure 6f. Additional equipment (devices/accessories/sensors) ( Table 2) was also integrated, either into the window unit or in the surroundings of the monitored space, with the aim of: -Performing calibration and sensitivity analysis of the sensor capabilities (checking the variability in accordance with position and sensor type and its integration level). -Validating the recorded data (during the measurement activities for Prototypes 1 and 2).
-Reporting his/her discomfort conditions to the user.
-Actuating predefined activities. Additional equipment (devices/accessories/sensors) ( Table 2) was also integrated, either into the window unit or in the surroundings of the monitored space, with the aim of: -Performing calibration and sensitivity analysis of the sensor capabilities (checking the variability in accordance with position and sensor type and its integration level). -Validating the recorded data (during the measurement activities for Prototypes 1 and 2). -Reporting his/her discomfort conditions to the user. -Actuating predefined activities.  Figure 7 is a perspective of an ELISIR window unit that was mounted, installed, and functioning in the perimeter of the space used as the case study (office building in Milan, Italy).  Figure 7 is a perspective of an ELISIR window unit that was mounted, installed, and functioning in the perimeter of the space used as the case study (office building in Milan, Italy).

The Cognitive Algorithm
As mentioned in Section 3, the data generated by the sensorized building elements are processed by a cognitive algorithm to infer users' habits and then to define the optimal control rules of these elements. A proper dataset should be generated to train the cognitive algorithm. Thus, two prototypes of the designed window unit were installed in two different offices of Politecnico di Milano, Italy. Data collected by sensors of the two ELISIR windows, each with its own control system named C01 and C02 were grouped in two different datasets with 7,040,783 entries (C01) and 4,412,036 entries (C02). Table 3 shows the measurements and the respective number of collected samples for both C01 and C02 over a training period of two months. Note that contact-1 is the upper contact and contact-2 is the lower magnetic contact for monitoring the manual aperture of the window.

The Cognitive Algorithm
As mentioned in Section 3, the data generated by the sensorized building elements are processed by a cognitive algorithm to infer users' habits and then to define the optimal control rules of these elements. A proper dataset should be generated to train the cognitive algorithm. Thus, two prototypes of the designed window unit were installed in two different offices of Politecnico di Milano, Italy. Data collected by sensors of the two ELISIR windows, each with its own control system named C01 and C02 were grouped in two different datasets with 7,040,783 entries (C01) and 4,412,036 entries (C02). Table 3 shows the measurements and the respective number of collected samples for both C01 and C02 over a training period of two months. Note that contact-1 is the upper contact and contact-2 is the lower magnetic contact for monitoring the manual aperture of the window. The sampling frequency of each measurements is a trade-off between the physical phenomenon to be monitored and the need to optimize storage usage. A synchronous collection is needed to train a model. This means that no holes are allowed in the dataset. To fix this issue, the following filling strategies were implemented: • Forward filling strategy: This strategy applies to sensors with memory. It is applied for magnetic contacts that could be opened or closed, and they maintain their state until the next event. The same applies for presence detectors whose counters remain the same until a new event occurs.

•
Linear interpolation: This strategy applies to the rest of measurements like illuminance, temperature, and humidity but ignores some particular phenomena, such as clouds, fires that could quickly change the value. These chosen measurements could be reasonably linearly interpolated when the sampling time is short enough. Otherwise, more complex interpolation algorithms are required (e.g., polynomial interpolator).
As an example of the data pre-processing, raw temperature data, as collected from the sensor, are shown in Figure 8, while Figure 9 shows the data after linear fitting. It should be noted there were data missing around May 29th due to the system being out-of-service (this means no data of any dataset were available), so they were not fitted by the algorithm and not used by the following machine learning algorithm. The other missing values were correctly interpolated. The sampling frequency of each measurements is a trade-off between the physical phenomenon to be monitored and the need to optimize storage usage. A synchronous collection is needed to train a model. This means that no holes are allowed in the dataset. To fix this issue, the following filling strategies were implemented: • Forward filling strategy: This strategy applies to sensors with memory. It is applied for magnetic contacts that could be opened or closed, and they maintain their state until the next event. The same applies for presence detectors whose counters remain the same until a new event occurs. • Linear interpolation: This strategy applies to the rest of measurements like illuminance, temperature, and humidity but ignores some particular phenomena, such as clouds, fires that could quickly change the value. These chosen measurements could be reasonably linearly interpolated when the sampling time is short enough. Otherwise, more complex interpolation algorithms are required (e.g., polynomial interpolator). As an example of the data pre-processing, raw temperature data, as collected from the sensor, are shown in Figure 8, while Figure 9 shows the data after linear fitting. It should be noted there were data missing around May 29th due to the system being out-of-service (this means no data of any dataset were available), so they were not fitted by the algorithm and not used by the following machine learning algorithm. The other missing values were correctly interpolated.  The resulting usage model of the window unit was used to define the rules for the automation. Thus, datasets were analysed, starting from the simplest machine learning algorithms and further moving to more complex ones if needed. In practice, this should facilitate the subsequent application of the rules to the local controller. The first algorithm evaluated was the decision tree. In the end, this algorithm was simple and accurate enough for the considered use case. The scikit-learn python library was used to perform all the machine-learning operation. The cross-validation process was performed as such: • Generation of training and test subset: Using the train_test_split function, the dataset was randomly divided into a training set (80%) and a test set (20%). • Grid search for optimal algorithm parameters: Using the GridSearchCV function, an exhaustive search over specified parameter values was performed, with particular focus on the the max_depth and the max_leaf_nodes classifier's parameters' ranges [3,20]. The search was optimized for the best accuracy. To avoid polarization inside the dataset, a stratified K-fold strategy with five splits was used during the search within the training set. • The final model as trained on the whole training set using the best parameter identified during the gird search.

Time(days)
Temperature(°C) The resulting usage model of the window unit was used to define the rules for the automation. Thus, datasets were analysed, starting from the simplest machine learning algorithms and further moving to more complex ones if needed. In practice, this should facilitate the subsequent application of the rules to the local controller. The first algorithm evaluated was the decision tree. In the end, this algorithm was simple and accurate enough for the considered use case. The scikit-learn python library was used to perform all the machine-learning operation. The cross-validation process was performed as such: • Generation of training and test subset: Using the train_test_split function, the dataset was randomly divided into a training set (80%) and a test set (20%).
• Grid search for optimal algorithm parameters: Using the GridSearchCV function, an exhaustive search over specified parameter values was performed, with particular focus on the the max_depth and the max_leaf_nodes classifier's parameters' ranges [3,20]. The search was optimized for the best accuracy. To avoid polarization inside the dataset, a stratified K-fold strategy with five splits was used during the search within the training set. • The final model as trained on the whole training set using the best parameter identified during the gird search. • The trained model was tested for accuracy using the test set.

Validation of the Algorithm
In the following, the validation results for both windows installed in the Politecnico di Milano offices are reported. The two window units are called C01 and C02. The C01 window model was trained over 3 h 41 min with the following results: This model have the wrong results in 7% of cases, which is remarkable in respect to C01 model. C02 was installed after C01, and the data collection could have been affected by more stable hardware and more prepared personnel, thus producing more accurate data and explaining the difference in training.
Both models were retrained on the same dataset, adding day hours to the features with the following results: C01 (3 h 56 min-15 min more than before) Accuracy improved by 0.26%. Some sort of correlation with the window status and the hour of the day existed, but to get strong proofs it is probably necessary to enact a more intensive data collection campaign.

Conclusions
The success of the IoT paradigm is driving the so-called Fourth Industrial Revolution-a revolution of data. This revolution is affecting several fields, including the industrial, medical, and, more recently, construction sectors. The last one is just starting to experience the benefit from the massive availability of the data, and compared to the others, it is still in an early stage of development. Nevertheless, the interest in the application of modern IoT and AI technologies in the construction sector supply chain is increasing every day.
In this paper, the use of a cognitive-based approach during the renovation of buildings was investigated. Basically, the idea behind this approach is to make the building elements used during the renovation phase, e.g., window unit, thermal insulation coating, and hydraulic connections, smarter thanks to a massive adoption of sensors and actuators. The information generated by these smart objects is fundamental for the proper operation and management of buildings during their entire life cycle. The data themselves are useless if not coupled with an "intelligent" layer that is able to infer useful "information," such as the state of the energy efficiency, the plants of the building, and the users' habits. The ELISIR project proposed an integrated approach that able to make the entire supply chain of the construction sector cognitive at different levels in order to multiply the benefits of digitalization. The cognitive infrastructure to support the operation and management of buildings was described in detail. Such an infrastructure is able to integrate the data coming from IoT sensors and actuators, as well as from legacy building automation systems. As an example of the capability of the proposed approach, an intelligent window unit was designed and validated. The windows realized within the ELISIR project were equipped with sensors to monitoring the indoor and outdoor environment, as well as the users' habits. The windows are able to react to the environment changes through actuators that enables motorized opening and shading. Thanks to the cognitive layer, the window is able to automatically defines the best opening and shading rules by passing the local controller on the base of users' habits and energy efficiency targets. The cognitive layer is able to identify the proper rules for opening and shading using a decision tree algorithm applied to the data generated by the sensors monitoring the users' preferences. Two prototypes of the window units were installed in two offices of Politecnico di Milano, Italy. The accuracy of this algorithm to classify the users' behaviour and preferences was around 90%, considering an observation interval of two months.