Keywords

1 Introduction

Buildings are responsible for about 40% of energy consumption and more than 40% of greenhouse gas emissions [1]. Reducing energy consumption and subsequently, CO2 emissions are highly required since buildings frequently use more energy than anticipated or desired. This need for energy requires the integration of clean energy sources in order to reduce the consumption from TEG, which is generally based on polluted sources (e.g., coal plant, a nuclear plant). Usually, three major aspects could be considered for reducing energy consumption from TEG, (i) integrating RES with efficient energy control and management, (ii) reducing energy consumption by integrating programmable and less-energy-consuming equipment while keeping a good occupants’ comfort (e.g., HVAC, lighting), and (iii) reducing energy consumption by integrating innovative ICT concepts for efficient EM of buildings services. These aspects might contribute substantially to the improvement of winning and energy-saving toward smart and energy-efficient buildings [2].

However, buildings have become a producer of electricity due to the RES integration together with the possibility to store and consume locally the electricity without expansion needs for electricity transport and distribution. This integration of distributed generators requires efficient management of energy in order to bring additional benefits for reducing energy consumption and, consequently, CO2 emissions. In addition, buildings could be capable to control its own energy, from the sources to the end-services, by managing the installed RESs and energy storage systems together with the deployed active/passive equipment (e.g., HVAC, lighting) [3, 4]. Consequently, a platform for data gathering, monitoring, and processing should be installed together with the electrical system making the building “Smart.” This new smart building structure presents a main factor for smart grid development, as depicted in Fig. 1. In fact, the controls, automation, and ICTs combined together with the bidirectional communication way with the TEG could be able to make the building components capable to adapt and balance digitally the continuous D/R changes. Additionally, consumers should have the opportunity to anticipate the electricity market and control their electricity consumption accordingly [5, 6]. However, the decentralization of energy production makes the electrical system more complex and more difficult to control in order to keep a suitable electricity balance (i.e., D/R). Consequently, the transition from unidirectional to bidirectional interconnection and from centralized to decentralized energy production requires the use of smart equipment (e.g., smart metering, smart inverter, smart transformer) [7]. This equipment should be able to interact with different building’s services taking into consideration its surrounding environment. The aim is to minimize the usage of electricity while keeping suitable occupants’ comfort as well. In this context, an MG system is defined as an “intelligent building” that can produce, consume, and store locally the electrical energy. The MG, via a well-established ICT-based infrastructure, can interact with consumers, with neighboring MGs, and with the TEG.

Fig. 1
figure 1

Global architecture: From smart Grid to smart microgrid

The main objective of such systems is to connect efficiently the producers and consumers of electricity with a high level of security, stability, and continuity of energy supply (the increase of services quality). As a result, the MG can smoothen the electrical peaks demand in the electrical network, which represents a major challenge for the TEG. It also allows for managing the electricity flows by considering economic and environmental constraints. Accordingly, the electricity bill can be minimized by avoiding peak demands and, therefore, the consumption can be maximized from RESs while minimizing subsequently the carbon impact. Therefore, as state above, the interaction of different buildings’ components needs to integrate ICT-based infrastructures for data collection, analysis, and processing. This integration of ICT together with RES and storage has enabled the emergence of “Micro-Grid” (MG) systems [8]. As depicted in Fig. 1, MG systems remain important and necessary building blocks for the development of smart grid systems as well as smart city applications and services [9].

In this chapter, a new holistic architecture of smart buildings is presented by improving the main layers of MG systems. This architecture is proposed in order to integrate all buildings’ aspects with the main trade-off is to minimize energy consumption while maintaining a suitable occupants’ comfort. In fact, an MG system is structured into three layers following the proposed holistic architecture. More precisely, we shed more light on the MG system’s components by putting more emphasis on the integration of recent IoT/Big-Data technologies for data gathering, processing, and control. Several scenarios are presented to show the usefulness of this holistic architecture and its direct relationship with smart microgrids.

The remainder of this chapter is structured as follows. In Sect. 2, the MG system is presented as a part of the “Smart Grid.” The operational MG modes together with international standards are detailed in Sect. 3. In Sect. 4, the concept of smart buildings and its relationship with MG systems is introduced by focusing on EM, automation, and control systems. Moreover, an experimental MG system is presented in Sect. 5 by highlighting the main MG components (e.g., ICTs layer, energy layer) and presenting a set of deployed scenarios. In Sect. 6, conclusions and perspectives are presented.

2 Smart Microgrid Systems

The integration of RESs for large-scale production of electrical energy has recently accelerated because of evident climate change, insufficiency of fossil resources, and greenhouse gas emissions. RES are clean and eco-friendly sources and their abundance and renewable nature are among the most important factors for their integration into smart grid networks. However, these green energy sources come with new challenges, mainly their seamless integration with existing electrical networks. In addition, another important challenge for this new electricity infrastructure is real-time monitoring and data processing, which requires new ICT-based infrastructures. The main aim is to ensure sustainable and reliable renewable energy generation systems [10, 11]. Therefore, this integration of ICTs, energy distribution systems, as well as distributed energy generation systems (e.g., RESs), creates what is commonly named “Smart Grid” (SG). In fact, SG represents the new smart electrical network, since it brings the flexibility to integrate new electrical services, such as electrical vehicles, and enables consumers to be energy producers by integrating RESs using bidirectional communication network [12]. This depends mainly on the fast advances in ICT-based infrastructures covering then all aspects of the electricity grid and its associated services. In fact, due to the development of IoT infrastructures (Internet of Things) and their related intelligent services, the electricity grid has new capabilities to monitor, manage, and control its components and then takes advantage of sophisticated bidirectional interactions. Moreover, the ICTs integration enables various smart and automatic services, such as smart metering infrastructure, smart control, and management for D/R balance, advanced electricity marketing, and intelligent energy storage for electrical vehicles integration.

However, despite this progress, some research work stated that the SG is experiencing new issues. Mainly, it is able to manage only electrical energy neglecting other existing types of energy (e.g., thermal, chemical, and electrochemical). In addition, the SG is based on the actual infrastructures of power distribution grids, which are limited by the unidirectional exchange of the electricity [11, 13]. Therefore, face to these challenges, other concepts have been developed together with the revolution of SG, such as the internet of energy (IoE), the internet of things (IoT), and the internet of services (IoS), as mentioned in Fig. 2 [14]. Especially, the development and the emergence of smart MG (microgrid) systems could resolve some of the abovementioned SG challenges. MG could simplify the management of electrical energy, from centralized to distributed EM. In addition, in MG systems, different types of energy can be managed locally with the possibility to interconnect different MGs in a distributed manner.

Fig. 2
figure 2

Smart Grid and smart MG presented as a combination of IoE, IoT, and IoS

Depending on the scale of the system, numerous definitions for MG systems have been proposed. For two European projects, named “Microgrids” and “More Microgrids,” the MG system is considered as a basic feature of future active distribution networks and it is composed of more than one building [15]. For instance, in Greece, the “Kythnos Island Microgrid” is composed of 12 houses connected to solar PV plant and battery bank. The PV plant comprises10 kW of PVs for energy generation, a nominal 53-kWh for the battery bank, and a 5-kW diesel generation. A second PV plant of about 2 kW, mounted on the roof of the control system building, is connected to 32-kWh of the battery bank in order to provide power for monitoring and communication [16]. Another system in Germany for “More Microgrids” project, named “MVV Residential Demonstration,” is installed at Mannheim-Wallstadt. The project prepares about 20 families for a continuous long-term field test site that is considered as one MG. In fact, the first goal of the experiment is to involve customers in load management. For that, a total of 30 kW of PV are already installed. Based on PV power availability information from their neighborhood, the families shifted their consumption when it is possible to use directly solar energy. As a result, participating families shifted their consumption significantly from the typical residential evening peak toward hours with the higher solar insolation, and from cloudy days toward sunny days [16, 17].

In the United States, there are many projects in universities and military bases already developed with an estimated global market rise from about 3.2 GW in 2019 to 15.8 GW by 2027 (including all types of MG systems, as it is depicted in Fig. 3), where only the United States accounted for almost 35% of this market in 2018 [18]. The most well-known researches and development project, named “Consortium for Electric Reliability Technology Solutions” (CERTS), is developed for the power system reliability of emerging technology in MG systems. The project is provided for relatively small sites (~<2 MW at the peak) and it is delivered for a research platform, which is considered as an MG installed in a laboratory at the University of Wisconsin, Madison [19]. Another interesting international standard is Japan, which sets ambitious targets for increasing the contribution of RESs in MG systems. In fact, the research funding and management agencies of the Ministry of Economy, Trade, and Industry have started different MG projects. Mainly, a recent project named “Integrating renewables into the Japanese power grid by 2030” is involved. In this project, Japan’s Renewable Energy Institute (REI) and “Agora Energiewende” attempt to integrate renewables energy into Japan’s power grids without endangering grid stability, the study also promotes data transparency. International experience has shown, however, that several technical measures, not yet widespread in Japan, can be safely implemented to improve the grid stability [20].

Fig. 3
figure 3

MG system types and benefits

All these research projects consider large-scale buildings and RESs plants as MG systems. For instance, according to the MG operation mode, different types of MG systems are classified as depicted in Fig. 3.a. Similarly, by considering the applications and the objectives [21], another classification is presented in Fig. 3.b. Other academic researches present the MG system as a single building, which integrates ICTs infrastructure, RESs, and energy storage with the electrical power grids. For instance, in [22, 23], the MG systems are defined as smart power systems that are grouped within a limited geographic area. They include loads, distributed generation units, and energy storage systems (batteries, electric vehicles, hydraulic storage, etc.). The main advantage of MG is to enable customers to have both a bidirectional communication platform and control devices to manage their energy needs and excesses. In addition, with an adequate communication structure, it is possible to shape the users’ load demand curves by means of D/R strategies.

Other works present the MG as a systematic and efficient approach for managing the power system by integrating all the distributed generating sources into a micro-power system [24, 25]. For example, in [24] authors defined the MG system as a low-voltage power network with distributed energy generation (e.g., PV arrays, micro-wind turbines, fuel cell, energy storage), which offers better control capability over network operation. It is considered as a solution to meet the local energy demand by connecting distributed power generation to distribution networks, such as local substations without further expansion of costly centralized utility grids. In addition, the United States Department of Energy (DOE) defines an MG as follows: “An MG is a group of interconnected loads and distributed energy sources within clearly defined electrical boundaries that acts as a single controllable entity with respect to the grid” [26].

3 MG System Architectures

3.1 Operational Modes

MG systems are designed to operate efficiently and resiliently since they are not only dedicated to a high penetration level of RESs and storage systems but also due to their capability to operate in isolated mode when RESs can satisfy the demand or during the faults, which occur in the main electrical network. Therefore, MG systems offer greater reliability and efficiency for the electrical network system, especially by locally controlling the generated power while improving the energy quality, as well as smoothing the power curve by the deployed storage devices. In addition, the losses of energy, which are caused by the transport and distribution system to the end-consumer, are reduced and, consequently, the blackouts of electricity, created by the peak demand, can be avoided.

However, MG systems are operated, as shown in Fig. 4, into two distinctive modes: grid-connected and islanded modes [21, 26]. Other literature works consider another mode, named self-consumption mode, by controlling buildings’ services, i.e., identifying those that can be connected to the main grid [27]. For isolated mode, named standalone mode, the RESs production and storage devices are dimensioned in order to satisfy totally the demand. Generally, another source is integrated, such as diesel motors, to satisfy the demand during the low or the absence of RESs generation. This mode is useful in critical applications, such as the isolated site that requires a high cost for electricity transport and distribution. For isolated sites, it is necessary and practical that the hybrid system has total autonomy requiring the use of storage systems not only to smooth the variable nature of RESs but also to ensure the power availability and the continuous supply of energy. However, energy storage represents a very significant part of the cost and maintenance of the MG installation, and the lifetime of storage devices is much lower than PV panels, the wind turbine, and the converters. For that, good strategies are required for sizing the storage devices and the RESs generation. Several works are presented in the literature to dimension the optimal configuration for isolated sites by studying the weather conditions including technical and economic characteristics of all specific MG components [28,29,30,31]. In addition, the island mode is studied in various research projects of MG systems [32, 33]. The specific standards IEEE Std 1547.4-2011 is the only international reference for MG systems, which are operating in island mode [34].

Fig. 4
figure 4

The MG system operating modes

Unlike isolated mode, the grid-connected mode is considered as the major key for RESs integration in buildings in order to develop the concept of “Smart Grid” and consequently the MG systems. A real MG system is connected to the electrical network to increase the reliability of the production system and to realize the main objective of such systems. This mode offers a high benefit for both energy and financial cost by reducing the size of the installation (e.g., battery capacity, number of PV panels) on the one hand, and by integrating the cost of energy in the management strategies on the other hand. In fact, the majority of hybrid systems, connected to the electrical grid, have a limited capacity of energy storage systems that are used to reinforce the power quality and to smooth the RESs generation. In this case, they are dimensioned to ensure the power during the failure of TEG or during the perturbed RESs production periods, and as results in minimizing the size of storage devices. However, the architecture of MG connected mode necessitates certainly the inclusion of inverters, both to convert, when necessary, from direct to alternating currents and to provide some level of frequency and voltage control as well. Principally, the inverter is the interface that provides the interconnection to the electrical network by respecting the norms of power quality (e.g., frequency, voltage) and by deploying the EM strategy. Moreover, the inverter supplies the power to the loads offering then the possibility to charge the storage systems, to extract or inject the electricity from/to the electrical network, and to serve potentially heterogeneous sources without loss of synchronization, propagation of harmonics, or loss of system stability. It is worth noting that we have considered the connected mode of MG systems as the main architecture of our deployed MG system. This mode is more adaptable for the actual structure of buildings by offering the possibility to develop the actual building as an MG system. This issue is studied by a set of research projects and several test sites are deployed by considering the connected mode of MG systems [18, 35,36,37].

Another mode, named self-consumption, depends strongly on the concept of “internet of services” in buildings by coupling the two other operating modes. It requires a high integration of ICTs and IoT/Big-Data technologies to predict and control efficiently the different components and services of the system. In fact, by deploying machine-learning algorithms, the internal and external parameters can be forecasted to control and manage powerfully the power system (i.e., production, consumption) while keeping a high comfort for building’s occupants. Mainly, in MG systems, the services can be decomposed into three main categories: (i) permanent end-user services, its energetic assignment plan covers the whole time range; generally, these services produce directly comfort to occupants; (ii) temporary end-user services, the time range of this services can be modified by the EM system deployed in MG system (e.g., modification of the starting time of a washing machine service, cooking service); (iii) intermediate services, which produce electrical power to the whole end-users by managing the previous end-user services with the energy production services (e.g., RES, storage devices, grid).

Therefore, the self-consumption mode modifies the starting time of temporary end-user services (e.g., electrical vehicle charge/discharge, washing machine service, cooking service) and the buildings can be supplied by electricity from both RESs and electrical network at the same time. In addition, in a given situation, the control strategy can switch some services that consume a high level of energy to the electrical network while keeping the RESs connected only to defined building’s loads. This operating mode is more useful to ensure a continuous supply of electricity to some principal services that are not designed to support the cut of electricity (e.g., data-center, networking equipment, IoT/Big-Data platforms). Data centers are considered to be one of the best examples of an industry with relatively established plans for the blackouts of electricity. For example, the Great East Japan Earthquake on March 11, 2011 killed more than 15 000 people, destroyed 4 nuclear generation plants, and left several million people without electricity and no critical damage to data centers was reported [38]. Furthermore, by coupling the IoT, IoE, and IoS concepts, the household equipment can interact with EM strategies in order to minimize the cost of energy while avoiding the cut of electricity during the failure of the energy sources. For example, by considering the electrical vehicle as a service in the building, the control strategy can use its battery as a source of energy during the night by considering that the electrical vehicle is a smart service, which can communicate its SoC and its targets to the communicated system [39]. Different literature works are realized to develop this new concept of service control in buildings [10, 14, 40, 41].

3.2 International MG Standards

The MG concept is relatively new and the regulatory framework is still under development. It should be standardized for being integrated into the existing electrical grid network. In this way, several research groups within the International Electro-technical Commission (CEI) are working on the question of standardizing systems that use renewable energies. The standards consider the power quality (e.g., frequency, voltage, harmonic noise), the components (e.g., inverters, converters), the architecture and design of MG, and the size of the integrated renewable sources (e.g., generated power, low-voltage, medium-voltage). In addition, the MG systems should respect the existing electrical norms and their deployments. Especially, for MG that are connected to the electrical network, the inverter should ensure the electricity quality avoiding then the injection of noise in the utility grid.

However, realizing specific technical standards is difficult and the standards concerning RESs integration have some differences in different worldwide locations due to the different operational methods, the EM strategies, and the different penetration levels and types of RESs and storage devices. For instance, in the United States, the IEEE 1547 series of standards covers all aspects related to the interconnection of distributed energy resources with the electrical grid. These standards impose requirements on the quality of the energy produced in terms of voltage, frequency, and harmonics. It provides requirements relevant to the interconnection and interoperability performance, operation, testing, safety, maintenance, and security considerations. The first revision of 1547 assembles several participants whose investor affiliations, manufacturers and integrators, test labs, research groups, and academia. The Full revision of 1547 issues, concerns, and updates are being coordinated with corresponding standards and codes, such as the Nippon Denki (NEC) and Underwriters Laboratories (UL) safety standards. This full revision included participants from various states, covering all United States regions and some other regions, such as the United Kingdom, Canada, and Japan [42,43,44]. Therefore, depending on the MG topologies, buses, and electricity architectures, different standards are considered, as presented in [45, 46] (Table 1).

Table 1 Voltage-level standards in DC and AC bus of MG

Alike United States, several works in European Renewable Energy Council (EREC) are urged to improve new integration standards of distributed energy resources. The standardization of the system helps the power system operators to share experiences with manufacturers and developers in order to internationalize their items and consequently normalize the system for future deployment while avoiding the alteration between electricity participants. The main European standards applicable to MG systems are EN 50160 and IEC 61000.

These standards describe and specify the main characteristics of the voltage supplied by a low-voltage, medium-voltage, and high-voltage AC public network under normal operating conditions. They describe the limits and levels of the voltage characteristics that can be expected at each delivery point of the public network [47,48,49]. Table 2 summarizes the United States and European standards that are appropriate to the deployment of MG systems.

Table 2 International standards for distributed energy integration in MG systems

However, despite this progress in deploying MG systems and advancing standards, still their integration into existing and smart buildings requires efficient and holistic management platforms. Especially, the integration of recent IoT/Big-data technologies for real-time monitoring and data processing in order to develop new predictive control approaches, which allow ensuring the sustainability and the reliability of these new energy generation systems.

4 Smart Buildings as MicroGrid Systems

MG systems for smart buildings can be seen as socio-technical systems that integrate different heterogeneous entities (e.g., sensors, actuators, lighting, HVAC, occupants, RES, storages), which could interact dynamically and in a collective manner to balance between energy efficiency, occupants’ comfort, sustainability, and the adaptability. More precisely, making buildings more energy-efficient while ensuring occupants’ comfort require incorporating mechanisms and techniques, which allow entities interacting in order to perform suitable actions (e.g., turning On/Off HVAC and lighting, balancing the fluctuation between power production and consumption) as shown in Fig. 5. As stated in [51,52,53], systems operating in dynamic environments with these capabilities are qualified as socio-technical Collective Adaptive Systems (CAS). These systems should learn and evolve by performing distributed decisions at different temporal and spatial scales while self-organize when entities join or leave the collective (e.g., occupants’ number and presence). For instance, platforms for buildings’ EM could react to the dynamic changes (e.g., buildings occupants’ preference, number, presence) for lowering energy consumption while making occupants’ life more comfortable and consequently, increasing the energy efficiency in buildings.

Fig. 5
figure 5

Energy efficiency and occupants’ comfort metrics [51]

Mainly, one of the most important factors that define the “Smart Buildings” is the adaptability. It is defined as the characteristic of buildings to use information gathered from a range of sources to prepare the building for a particular event before that event has happened (e.g., predictive control, occupants forecasting) [54]. The adaptability allows the differentiation between previous generations of buildings and Smart Buildings. In fact, using IoT/Big-Data technologies, the buildings gather data externally (e.g., weather conditions, RES production) and internally (e.g., occupancy, loads consumption) to adapt its operations depending on the context-awareness principles. The collected data is used to develop machine-learning algorithms that are used to forecast the actions, which are required to perform and operate different buildings’ services. For example, the forecast of weather conditions can be used to predict the RESs production, which allows flexible management of energy D/R. In addition, by measuring the energy production/consumption and by forecasting the occupant’s activities, the adaptive buildings modify the starting time of temporary end-user services (e.g., washing machine service, cooking service).

However, these abovementioned aspects represent the main factors to develop the concept of “Micro-Grid” systems. It is due to the capabilities of recent ICTs techniques (e.g., machine learning) to forecast future events, which are required to develop efficient EM approaches. The next section introduces our MG system’s architecture. In this way, we have designed and deployed an MG system for conducting experiments in real-sitting scenarios. In particular, we highlighted the necessity of integrating recent IoT/Big-Data technologies for gathering external and internal data, which have been used to generate predictive actions (e.g., regulating the room temperature by forecasting building’s occupancy, ventilation speed variation according to the forecasted CO2, intelligent and predictive control of energy flows management using forecasted power production, consumption and battery state of charge).

5 The Experimental Platform of MG Systems

As shown in Fig. 6, our MG system is structured into three horizontal layers: passive building layer (e.g., building envelope and insulation, architecture design), active building systems layer (e.g., HVAC system, Lighting), and RESs system layer (e.g., PV, wind, storage). These layers are monitored by one vertical layer for communication and ICTs integration. This layer integrates mainly an IoT/Big-Data platform in order to measure, analyze, predict, and forecast actions depending on the actual and predicted context.

Fig. 6
figure 6

The main MG system’s layers for smart and energy-efficient buildings

In particular, our MG system is a smart and active building that combines ICTs/Big-data infrastructure, RESs/storage systems, EM/control strategies, and electrical power grids. This new concept of a building is more interactive for both consumers and energy producers. In fact, consumers will reduce the cost of their energy consumption based on the used control approaches, which take into account the real-time cost of the power and the predictive power generation, for efficient D/R management [55]. In addition, the household equipment (e.g., refrigerators, washing machines, microwaves, lighting) are becoming intelligent devices, which may be actively controlled using IoT devices, as well as adjusted and controlled by interacting with the other systems (e.g., power generation, EM system). Moreover, this MG structure offers the possibility to integrate new buildings’ services, such as electrical vehicles, which can be used as a storage device to compensate for the energy in the building by integrating the “Grid-to-Vehicle & Vehicle-to-Grid” techniques.

The rest of this section is dedicated to the description of the deployed MG systems together with the deployed scenarios. The aim was to develop a research test site integrating the different components of an MG system, which is used to test and integrate control strategies for predicting, estimating, and controlling the interaction between power production, storage, and building’s demands. As shown in Fig. 7, the system integrates PV panels, wind turbines, batteries, and the TEG connected together in order to supply electricity to the building’s services according to actual contexts. The system is monitored by an IoT/Big-Data platform, which is used to collect, analyze, and store the data for EM and control strategies development. Moreover, several scenarios are deployed in order to develop a research platform that considers the concept of MG systems with the different components of the different layers.

Fig. 7
figure 7

The holistic model of the deployed MG system

5.1 IoT and Big-Data Platform for Data Monitoring/Processing

Real-time and context-awareness information could be exploited for developing predictive and adaptive context-driven control approaches using recent IoT and Big-data technologies together with real-time and machine-learning algorithms [56, 57]. A platform that uses context-driven technologies, as well as complex-event processing technologies, is deployed for data monitoring and processing in order to develop intelligent and predictive control strategies for EM in MG systems. The platform is composed of four main layers, sensors/actuators layer, data acquisition, data processing, and data visualization/storage together with further services and applications for context-driven control (Fig. 8).

Fig. 8
figure 8

IoT/Big-Data platform architecture [58]

The MG is mainly equipped with a component for measuring the different necessary parameters (e.g., current, voltage, temperature, wind speed), for interacting with the passive and the active equipment, for regulating the comfort for the occupancy, and for managing the power production and consumption. In fact, a set of sensors is installed depending on the desired scenarios. In addition, the first layer includes the actuators that are used to receive and to execute different commands, which are generated by the control strategies for EM or equipment and services control. Regarding the data acquisition layer, a Kaa application is developed (i.e., IoT technique) [59], which is used to receive data from deployed sensors. We have also used MQTT (Message Queue Telemetry Transport), which is a publish-subscribe-based protocol for IoT applications. For data processing and storage, Storm [60] services are used. Mainly a topology composed of Spouts and Bolts was designed and developed to allow receiving and processing streaming data from sensors. The spouts receive the data from the Kaa application, and then transmit it to the Bolts for processing and storage into the database (e.g., MongoDB) for further in-depth analysis. The services layer includes real-time visualization and storage together with the control of active equipment and RESs power production and consumption monitoring and management.

The platform was used for data gathering and processing of internal and external building’s context. For instance, it was used to build occupant information (e.g., number, presence, behavior, activities), since is a major input for control approaches in energy-efficient buildings (e.g., active systems control). In fact, comprehensive fine-grained occupancy information could be integrated to improve the performance of occupancy-driven control of HVAC, lighting, and ventilation systems. A platform for real-time detection of occupants’ is deployed (Fig. 9). The platform was adopted by including real-time machine-learning component with the main aim is to analyze, explore, and predict the occupancy information in buildings [54]. However, these predicted values are then used for efficient control of active equipment and for predicting the electricity consumption behavior, which is used for EM.

Fig. 9
figure 9

The architecture for occupants’ presence detection/prediction and experimental results [56]

Regarding the external context, we have deployed a weather station. In fact, for several scenarios, we need to gather internal and external context data. We have built a weather station near to the wind turbine and PVs in order to have as precisely as possible the data concerning wind speed, direction, irradiation, temperature, and humidity. The weather station was deployed and used to collect the data for real-time visualization and processing for further usage by other building’s services and applications. All these data are gathered and processed in real-time using our IoT and Big-data platform, as depicted in Fig. 10.

Fig. 10
figure 10

a Internal/external temperature, b Weather monitoring

Weather data are collected in order to validate the results obtained from simulations and experimentations by using the same input parameters. For example, radiance and temperature are measured together with the PV power during the same day. Radiance and temperature are used as input parameters to the mathematical PV model, which is developed for conducting simulations and validate experimentations’ results using similar contextual data.

5.2 Building Envelope

This part concerns the passive layer (Fig. 6), which allows reducing energy consumption by developing less-energy-consuming equipment and materials in buildings. Emerging devices, which use natural forces without using electricity, such as natural lighting, room relocation, natural ventilation, could be used to increase insulation (Fig. 11). In fact, the architecture design, buildings envelope, and orientations can influence energy reduction. Therefore, the passive design must be considered in the phase of construction in order to reduce the final energy use of the building.

Fig. 11
figure 11

Thermal treatment of the front wall and the temperature sensors positioning [61]

As part of our studies, a work is realized by focusing on the thermo-mechanical characterization of our EEBLab, which mainly consists of galvanized steel, of which expanded polyurethane is injected into the walls and the roof. As well as two types of internal insulation are adapted, namely chipboard for the floor and polyurethane for the roof. The main aim is to thermally study the behavior of the EEBLab, in order to propose good materiel for the insulation and consequently minimizing the use of the HVAC system for heating and cooling [61].

5.3 Active/Passive Equipment Control

This part concerns the MG system active layer (Fig. 6) that allows the deployment of context-driven control approaches in order to improve energy consumption. In this layer, the electrical energy can be minimized by optimizing the operation times of the active equipment (e.g., HVAC, ventilation systems), while maintaining occupants’ comfort within a good air quality and suitable thermal comfort [62, 63]. In fact, the ventilation systems are normally installed in buildings to improve the air quality by injecting fresher air from outside into inside buildings. These systems automatically act on behalf of occupants by ensuring good indoor air quality, especially in cold or hot periods, or when there are no windows. In fact, the ventilation controller performs this task by adjusting fresh air as much as needed based on actual indoor CO2 concentration. The aim is to improve the optimal balance between energy efficiency and indoor air quality. For that, a ventilation control system was deployed, as presented in Fig. 12, which maintains the indoor CO2 concentration at the comfort set-point with an efficient and minimal ventilation rate and energy consumption [64, 65].

Fig. 12
figure 12

Context-driven control card and active equipment control [65]

Another study puts more emphasis on developing efficient control approaches in order to deliver acceptable occupants’ comfort while maintaining optimal energy consumption. Control approaches are investigated for controlling the deployed HVAC system in our EEBLab [66]. A control card is deployed as illustrated in Fig. 13 in order to interface between all HVAC components and the control device. It allows the regulation of temperature and ON/OFF control of the HVAC system by adjusting the inside ventilator and the compressor based on the desired schedules (heating, conditioning, or only ventilation). The deployed IoT/Big-Data platform is used to measure the hourly electricity consumption of the HVAC system, which is used in our study as a load to test the EM control strategies.

Fig. 13
figure 13

Geothermal installation in the EEBLab [67]

Generally, the HVAC is the most used system for thermal comfort regulation in buildings and is considered as the highest electricity consumer. For that, renewable sources of thermal energy are required to minimize the electricity mainly used for heating, cooling, and air conditioning. In this perspective, we have deployed a geothermal platform [67], an earth-to-air heat exchanger system that could be used for building cooling and heating. In fact, this clean and sustainable source can be deployed and used to minimize the usage of HVAC systems. As illustrated in Fig. 13, the system is installed to extract heat from the ground for either cooling or heating purposes. It is basically a buried pipe, deployed at a certain depth in the ground, where air exchanges heat with soil. This system is deployed in the side area of our EEBLab and the pipelines are installed inside a trench of 5 m in length, 2 m width, and 1.5 depth. Different sensors are installed as well in order to measure and control the temperature exchange in order to investigate the performance and the effectiveness of the system in terms of power consumption and comfort.

5.4 RES Integration and Storage Devices

The work focused on this layer (Fig. 6) concerns the deployment of control strategies for EM. After the deployment of the whole components of the MG system, this simple hybrid system, however, needs to be automatically controlled accordingly. In fact, D/R control approaches are therefore required for balancing the intermittent RES generation and the delay might occur between the power production and the actual building’s consumption. The main aim is to develop a control card to test the different studied control strategies for EM. Unlike existing systems, which are used as a black-box to collect and manage the energy in MG, the deployed control card allows us to measure, monitor, manage and deploy our algorithms [68, 69]. In fact, the developed card can be seen as an embedded EM system for optimal energy usage according to the actual context (Fig. 14). Therefore, different objective functions can be taken into account when optimizing and designing a control strategy, like the smoothing of the production, the continuity of the power generated to the consumer, the energy cost, and the charge/discharge cycle of the batteries [70]. For that, a control strategy should be deployed to satisfy the constraints designed by the optimization functions. The main communication infrastructure is employed for total energy measurement and management purposes. This infrastructure provides the autonomous operation with the required measurements, decisions, and controls by collecting data through the sensors and producing the commands for the Hw/Sw card, which is connected to the control switches used in the hybrid system [71].

Fig. 14
figure 14

a Schematic view of the control card, b the deployed Hw/Sw control card [71]

However, a set of current and voltage sensors is installed for power measurement, as shown in Fig. 14. The system contains actuators controlled by an Arduino, which allows collecting the data from different sensors. Furthermore, the system contains a micro-computer (Raspberry pi) for collecting data from different sensors. The sensors transmit analog signals to the microcontroller, which converts them into numerical data. For example, a voltage sensor is used to measure the output PV voltage with an accurate range, which varies from zero to 140 V. For that, a tension divider bridge is used to convert the values from zero to 5 V, which is the Arduino accurate range. In fact, the Arduino program converts obtained values to tension data. Moreover, the Arduino transmits these data to the Raspberry for activating the right action according to the deployed control algorithm. Data are then transmitted to the IoT/Big-data platform for visualization, storage, and further data analytics.

A case study is presented in which the developed control card and the IoT/Big-Data platform are used to measure and store the data collected by the deployed current and voltage sensors. As shown in Fig. 15, the green curve presents the power generated from a PV panel for 24 h. This power is calculated by measuring the PV current and voltage variability during the day, which depends on the weather conditions (e.g., temperature, irradiance) changeability. At the same time, the battery SoC is calculated using our battery characterization system installed in the MG system. Moreover, the power consumption is measured and stored for the same period. These parameters are the main input for the EM strategy.

Fig. 15
figure 15

Power measurement scenario in our deployed MG system platform

Furthermore, as described above, the use of storage devices in the MG system is motivated by the intermittent nature of RESs and the need to regulate the power quality (e.g., frequency, voltage) generated by these generators. The main aim is to store the surplus of the produced power during the peak production for possible usage when there is no production and keeping, at the same time, a maximum state of the health for the storage devices. Therefore, a set of batteries are installed in our deployed MG system due to their benefits (e.g., fast response, modularity, and good energy efficiency). For that, a platform to study, model, and experiment the batteries is required. This platform offers the possibility to monitor the used battery for better SoC estimation. These parameters are required to develop and deploy control strategies for EM in MG systems. In fact, a battery model is designed to estimate and predict the batteries’ performance and behavior because the SoC is used as a critical parameter for our control strategy.

Electrical-circuit models (e.g., the first-order RC model, the second-order RC model) are commonly used for batteries’ behavior estimation. These models are composed of a voltage source, resistors, and capacitors, which can simulate its dynamic behavior. They become more and more accurate when the model’s order increases (i.e., RC networks). Moreover, for the accurate SoC estimation of the battery, several methods and algorithms are reported in the literature, such as the direct measurement methods, the artificial intelligence methods, and the model-based methods. The direct measurement methods (e.g., Coulomb counting method, Electrochemical method, open-circuit voltage method) use the dynamic measurement of the battery characteristics in order to estimate the battery’s SoC. The artificial intelligence algorithms, such as the Neural Network and the Fuzzy logic, can also estimate the battery’s SoC with more precision but they are more complex and difficult to deploy for embedded and real-time MG control. Mainly, in our deployed MG system, the model-based methods (e.g., Coulomb counting method, Sliding mode observer, Kalman filter) have been used to estimate the SoC of the battery with more precision and accuracy (Fig. 16) [72, 73].

Fig. 16
figure 16

The deployed battery modeling

In order to determine the battery characteristics, an instrumentation platform is first developed using recent sensing/actuating equipment for gathering important battery’s parameters, which are then used for building a model for the battery deployed in our EEBLab (Fig. 17). It is composed of a Lead-acid battery and a set of sensors to extract the battery’s voltage and current. The sensors are connected to an acquisition board (e.g., Arduino) used to collect the data, and then send them to a cluster for processing and storage. The developed platform provides other information about the estimation of the battery’s SoC by the Coulomb Counting method.

Fig. 17
figure 17

Battery characterization system [72]

After validating the battery model, it is integrated into our MG for simulations and experiments. As shown in Fig. 18, the blue curve presents the battery SoC variability estimated using the measured battery voltage (orange curve). During this scenario, the battery charge/discharge current and voltage are measured and collected using our deployed IoT/Big-Data platform. The measured parameters are used to estimate the SoC variability. Therefore, the SoC is a key parameter for the EM strategies in the MG systems. In fact, as depicted in Fig. 18, from 11:00 AM to around 07:00 PM, the battery is charged by the surplus generated from the RESs. During the night, from 07:00 PM to around 04:00 AM, the battery generates the power to the load because the PV generation is unavailable. However, the battery is at rest from 04:00 AM to around 08:00 AM because the SoC reaches the regulated threshold value, which is fixed by the EM strategy, in order to avoid a deep-discharge of the battery.

Fig. 18
figure 18

The battery SoC estimation using the measured voltage by our deployed platform

Therefore, the proposed IoT/Big-Data platform could be used to measure different parameters in the MG system. Depending on the studied scenario, suitable sensors are selected and can be connected to this platform for data collection, monitoring, and processing.

6 Conclusions and Perspectives

The main aim of the work presented in this chapter is to shed more light on the usefulness of developing an integrated platform in order to enable the deployment of smart MG systems in energy-efficient buildings. The MG platform connects the building’s components using sensing/actuating, IoT, and Big Data technologies in order to leverage real-time gathering, data processing, and predictive control. The platform was deployed and several scenarios have been tested and evaluated and preliminary results showed the usefulness of the platform for efficient management of buildings components. The platform will be further enhanced by developing other ongoing scenarios. It will be used for validating the proposed models and results mainly by investigating, (i) the efficient connection, integration, and the management of different RES and storage devices, (ii) the suitable dimensions for energy production and storage devises, (iii) different possible demands/responses and predictive algorithms, (iv) charged and discharged operations on the state-of-health of deployed batteries as well as PV corrosions fault diagnosis, (v) context-aware driven control of deployed equipment, e.g., lighting and HVAC systems. Methods that allow smart management with predictive analytics are still need to be integrated into the platform prototype to handle this type of complex systems. This paves the way to approaches in which an antifragile platform learns and adapts which strategy/action to enact. We envision that future ambient control systems (ACS) will require more and more intelligence as well as the ability to monitor and learn from the experiences, thus realizing an antifragile ACS. Future work shall investigate how to practically realize such an ACS in energy-efficient buildings [51].