1. Introduction
The use of traditional energy resources such as natural gas, petroleum, and coal results in a huge amount of greenhouse gas emission (GHE) such as carbon dioxide—CO
2 [
1]. GHE contributes considerably to the global warming phenomenon, which has lately started to tangibly harm the environment and impact every living creature on earth. Across the different fields of science, researchers worldwide are making great efforts to minimize the usage of these traditional energy sources. These efforts involve various research topics related to energy generation, energy transmission, smart distribution, energy consumption, and energy storage. To minimize energy consumption, computer scientists are developing intelligent systems for energy management in Smart Grids (SG) [
2]. In particular, there is a need to promote renewable energy and optimize energy consumption at endpoints [
3].
In SGs, and contrast to regular electrical grids, electricity and data flows are bidirectional. Thus, electricity/energy production and distribution are strongly-coupled, involving advanced control aspects [
4]. As data and electricity can flow from the utility to the customer and from the customer to the utility, we have to keep track in real-time of who is producing what? Moreover, who is consuming what? [
5] SGs leverages various technologies for operation and control such as smart meters/sensors and actuators, smart appliances, renewable energy resources, energy storage, control theory, big data processing, big data analytics. While an SG can cover a whole city, the Micro-Grid (MG) [
6] is a “small SG” that groups multiple distributed generation points at the level of a neighborhood, e.g., university campus, village, and private residential or industrial areas. Still, an MG connects to the main grid via the Utility Interconnection Switch. Moreover, a typical feature of MGs is the ability to operate in islanded mode when the locally generated power is enough to power all loads in the MG. In such a situation, there is no need to get the power from the utility grid. Consequently, and to promote the island mode operation, an MG ought to effectively integrate various sources of distributed generation (DG), especially Renewable Energy Sources (RES), to supply needed emergency power when switching between islanded and connected modes. Most important, control and protection are becoming significant challenges.
In the SG paradigm, an MG is a key element in the distributed generation of electricity. This MG needs that interoperability capability to communicate with the SG. Among the main challenges for implementing Smart MG is the integration of intermittent generation sources (renewable energies). This distributed generation also contains storage devices, loads, and Smart Buildings [
7]. Buildings under the same entity in an MG participate in energy management either by optimizing their consumption and/or cooperating in the distributed generation using rooftop solar panels as an example. By adding a system that handles these two functionalities, energy consumption optimization, and energy production, we can start talking about a Smart Building that can host an energy management system.
Technological advancement in the last decade has enabled objects around us to adopt a dynamic aspect, that is, sending data and taking actions based on the received commands from users. This is thanks to the processing of the intelligence layer that can be added to every object in the Internet of Things (IoT).
The Smart MG relies on information and communication technologies (ICTs) [
8] to enable real-time, two-way communication between utility and consumers, thus allowing more dynamic interaction on energy flow. These ICTs elements, including sensing devices, monitoring technologies, and digital communications infrastructure, are needed to ensure adequate information exchange between the Smart MG, the consumers, and the Smart Buildings. This interaction is achieved through the Smart Information sub-system which includes the AMI (Advanced Metering Infrastructure) [
9]. AMI uses smart meters to gather billing data, track grid status, monitor and control appliances. This system can be classified into smart metering and smart monitoring and measurement system. In which, WSN (Wireless Sensor Networks) provides a communication platform for remote monitoring and system control [
9].
Worldwide, buildings consume about 40% of global energy [
10]. Therefore, energy-efficient buildings are becoming a must to optimize energy consumption. There are three ways to retrofit a traditional building and make it a Smart Energy-Efficient Building (SEEB): use highly efficient insulation material, energy-efficient appliances, and energy management system (EMS) [
11]. EMSs control appliances and integrate renewable energy sources based on an energy policy that is mandated by the energy department of the MG. ICT is used to execute the energy policy rules and automate the control process in SEEB [
12]. The benefits of controlling smart building’s loads and Generation Units (GU) are not only reducing energy consumption but also redirecting the energy flow to where it is needed.
The outcomes of this project are as follows: First, an intelligent framework that monitors and control loads (heaters) of the building is presented. Second, a database to archive user behavior and environmental data is developed. Third, a software tool to control Heating Ventilation Air Conditioning (HVAC) appliances is implemented [
13].
4. Proposed EMS for SEEB
The proposed EMS that controls the heaters and implements the efficient energy policy via ICT has three components (
Figure 1). First, sensor and actuator modules which are used for environmental sampling and appliance control. Second, a Wireless Sensor Network (WSN) that transmits data and control commands. Third, the software or application which monitors and controls the building appliances, loads, and generators.
4.6. Context Recognition Using the Context-Based Reasoning Model
In SEEB, the execution of energy policy rules depends on context recognition. The context is the knowledge about the undergoing situation/scenario of a given location at a specific moment of the building (
Figure 10). In this case, we used the Context-Based Reasoning (CBR) model to model the university campus’s buildings for better context recognition.
The context recognition is based on the declared knowledge about the building using two types of parameters. One type of parameter is dynamic parameters generated by the WSN data acquisition, namely temperature, motion, humidity, and occupancy. The other parameters are static parameters that describe the building type, room type, season, current day, and part of the day. These parameters are fetched from the database of the EMS. The context identification results are input parameters to the appropriate control decision, which is implemented using Finite State Machines (FSM) [
20] that basically enables or disables the heater. The control algorithm and its structure are guided by the energy policy set by the building manager.
When designing services for a building, the HVAC system, for example, we need to identify the set of contexts, transition rules, dependencies, and the relationship between contexts. We can also describe contexts as adjustable filters that generate different types of knowledge. This concept of context can provide a model to decompose a complex system into interconnected “scenarios”, where knowledge that can be inferred using static and dynamic parameters is of the following types:
Action knowledge: This knowledge represents the operational intelligence for a specific situation. It can be coded with logic rules or learned using machine learning, evolutionary algorithms, etc. In our case, the system needs to switch the heaters of the building ON or OFF.
Transitional knowledge: It states when a transition to another context is needed. This transition can be expressed as “IF-Then” transition rules or any other type of triggering mechanism.
Declarative knowledge: This knowledge describes some aspects of the context to include some of the pre-acquired experience for the context—for example, the number of inhabitants, room size, or room usage schedule.
The Context-Based Reasoning Model partitions knowledge into a multi-level hierarchy representing a vertical relationship between groups in a set G = {G1, …, Gn}, where a given group Gi ∈ G contains a set of mutually exclusive contexts Ci = {, …, }. An active context in Gi is active within the context of its parents; which makes it inherently functional, transitional, and declarative knowledge from the hierarchy above Gi−1.
Based on the CBR model, we developed a set of groups. Each group contains one type of entity, for example, building types, room types, seasons, etc. This information represents the static type of knowledge needed to infer the context. This static knowledge can be drawn by selecting an element from each group following the order from
G1 to
G5 (
Figure 11).
The values obtained from both the database and the WSN data acquisition deem as input parameters to the controller to decide whether to enable the heating process.
First, the declared knowledge, which can be drawn by selecting an element from each group, is obtained. Hence, the number of contexts varies based on building types, room type, etc. For instance, in the administrative building, there are three active contexts (depending on the room type) at each moment among the 144 possible ones in all-time (1 × 3 × 4 × 4 × 3 = 144). In the educational building, there are four possible contexts (depending on the room type) at each moment among the 192 possible scenarios in all-time (1 × 4 × 4 × 4 × 3 = 192). In the residential building, there are four possible contexts (depending on the room type) at each moment among the 192 possible ones in all-time (1 × 4 × 4 × 4 × 3 = 192).
Second, the EMS builds knowledge about air quality, temperature, lighting, door/window status, and occupancy based on data sent by different sensor modules. The next table presents the various sensor modules that could be used to build the knowledge. Each sensor node presents specific data, which deem as the building block of the knowledge (
Table 9).
Author Contributions
Conceptualization, M.R.A. and D.B.; Methodology, M.R.A. and D.B.; Software, N.N.; Validation, M.R.A., D.B. and N.K.; Formal Analysis, M.R.A. and D.B.; Investigation, N.N., M.R.A. and D.B.; Resources, M.R.A. and D.B.; Data Curation, N.N.; Writing—Original Draft Preparation, N.N.; Writing—Review and Editing, M.R.A., D.B. and N.K.; Visualization, M.R.A., D.B. and N.K.; Supervision, M.R.A., D.B. and N.K.; Project Administration, M.R.A.; Funding Acquisition, M.R.A. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by by CASANET (Context-Aware Sensor-Actuator Networks for Energy-Efficient Buildings) project, funded by “le Ministere de l’Enseignement Superieur, de la Recherche Scientifique et de la Formation des Cadres (MESRSFC)” and “le Centre National pour la Recherche Scientifique et Technique (CNRST)” in Morocco, as well as, the US-NAS/USAID under the PEER Cycle5 project grant number #5-398 entitled “Towards Smart MG: Renewable Energy Integration into Smart Buildings.”
Conflicts of Interest
The authors declare no conflict of interest.
References
- Olivier, J.G.; Schure, K.M.; Peters, J.A.H.W. Trends in global CO2 and total greenhouse gas emissions. PBL Neth. Environ. Assess. Agency 2017, 5. [Google Scholar]
- Fang, X.; Misra, S.; Xue, G.; Yang, D. Smart Grid—The New and Improved Power Grid: A Survey. IEEE Commun. Surv. Tutor. 2011, 14, 944–980. [Google Scholar] [CrossRef]
- Hossain, M.S.; Madlool, N.A.; Rahim, N.A.; Selvaraj, J.; Pandey, A.K.; Khan, A.F. Role of smart grid in renewable energy: An overview. Renew. Sustain. Energy Rev. 2016, 60, 1168–1184. [Google Scholar] [CrossRef]
- Farhangi, H. The path of the smart grid. IEEE Power Energy Mag. 2009, 8, 18–28. [Google Scholar] [CrossRef]
- Werner, S.; Lunden, J. Smart Load Tracking and Reporting for Real-Time Metering in Electric Power Grids. IEEE Trans. Smart Grid 2015, 7, 1723–1731. [Google Scholar] [CrossRef]
- Lasseter, R.H.; Piagi, P. MG: A conceptual solution. In Proceedings of the 2004 IEEE 35th Annual Power Electronics Specialists Conference (IEEE Cat. No. 04CH37551), Aachen, Germany, 20–25 June 2004. [Google Scholar]
- Hanif, S.; Massier, T.; Gooi, H.B.; Hamacher, T.; Reindl, T. Cost Optimal Integration of Flexible Buildings in Congested Distribution Grids. IEEE Trans. Power Syst. 2016, 32, 2254–2266. [Google Scholar] [CrossRef]
- Abid, M.R.; Lghoul, R.; Benhaddou, D. ICT for renewable energy integration into smart buildings: IoT and big data approach. In Proceedings of the IEEE AFRICON 2017, Cape Town, South Africa, 18–20 September 2017. [Google Scholar]
- Greer, C.; Wollman, D.A.; Prochaska, D.E.; Boynton, P.A.; Mazer, J.A.; Nguyen, C.T.; Fitzpatrick, G.J.; Nelson, T.L.; Koepke, G.H.; Allen, R.H., Jr.; et al. Nist Framework and Roadmap for Smart Grid Interoperability Standards, Release 3.0; No. Special Publication (NIST SP)-1108r3); NIST: Gaithersburg, MD, USA, 2014.
- Yang, L.; Yan, H.; Lam, J.C. Thermal comfort and building energy consumption implications—A review. Appl. Energy 2014, 115, 164–173. [Google Scholar] [CrossRef]
- Han, D.-M.; Lim, J.-H. Smart home energy management system using IEEE 802.15.4 and zigbee. IEEE Trans. Consum. Electron. 2010, 56, 1403–1410. [Google Scholar] [CrossRef]
- Sciuto, D.; Nacci, A.A. On How to Design Smart Energy-Efficient Buildings. In Proceedings of the 2014 12th IEEE International Conference on Embedded and Ubiquitous Computing, Milan, Italy, 26–28 August 2014; pp. 205–208. [Google Scholar]
- Vakiloroaya, V.; Samali, B.; Fakhar, A.; Pishghadam, K. A review of different strategies for HVAC energy saving. Energy Convers. Manag. 2014, 77, 738–754. [Google Scholar] [CrossRef]
- Berkeley Laboratory and Energy Efficiency. What is Energy Efficiency? Available online: http://eetd.lbl.gov/ee/ee-1.html (accessed on 17 July 2016).
- Stensrud, B.S.; Barrett, G.C.; Trinh, V.C.; Gonzalez, A.J. Context-Based Reasoning: A Revised Specification. In Proceedings of the FLAIRS Conference 2004, Miami Beach, FL, USA, 12–14 May 2004. [Google Scholar]
- ISO 50001—Energy Management. Available online: https://www.iso.org/iso-50001-energy-management.html (accessed on 2 September 2020).
- Robey, D.; Welke, R.; Turk, D. Traditional, iterative, and component-based development: A social analysis of software development paradigms. Inf. Technol. Manag. 2001, 2, 53–70. [Google Scholar] [CrossRef]
- Perkins, C.; Belding-Royer, E.; Das, S. RFC3561: Ad Hoc On-Demand Distance Vector (AODV) Routing; Internet Society: Reston, VA, USA, 2003. [Google Scholar]
- Shang, F.; Su, W.; Wang, Q.; Gao, H.; Fu, Q. A Location Estimation Algorithm Based on RSSI Vector Similarity Degree. Int. J. Distrib. Sens. Networks 2014, 10, 371350. [Google Scholar] [CrossRef] [Green Version]
- Bellala, G.; Marwah, M.; Shah, A.; Arlitt, M.; Bash, C. A finite state machine-based characterization of building entities for monitoring and control. In Proceedings of the Fourth ACM Workshop on Embedded Sensing Systems for Energy-Efficiency in Buildings, Toronto, ON, Canada, 6 November 2012; pp. 153–160. [Google Scholar]
- Naji, N.; Abid, M.R.; Krami, N.; Benhaddou, D. An Energy-Aware Wireless Sensor Network for Data Acquisition in Smart Energy Efficient Building. In Proceedings of the 2019 IEEE 5th World Forum on Internet of Things (WF-IoT), Limerick, Ireland, 15–18 April 2019. [Google Scholar]
- Naji, N.; Abid, M.R.; Krami, N.; Ben Haddou, D. CASANET Energy Management System: A Wireless Sensors based solution for Heaters Control. In Proceedings of the 2nd International Conference on Smart Digital Environment, Rabat, Morocco, 18–20 October 2018. [Google Scholar]
- Abid, M.R. Link Quality Characterization in IEEE 802.11s Wireless Mesh Networks. Ph.D. Thesis, Auburn University, Auburn, AL, USA, 2010. [Google Scholar]
Figure 1.
General architecture (A) and communication process (B) of the proposed Energy Management Systems (EMS).
Figure 2.
Information and Communication Technology (ICT) components for data acquisition in Smart Energy-Efficient Buildings (SEEB).
Figure 3.
Components of the Wireless Sensor Network (WSN) nodes in the data acquisition (A) Arduino nano and its components, (B) the installed actuator with the electric heater, (C–E) gateway devices.
Figure 4.
WSN architecture deployment at the university campus building.
Figure 5.
(A) Energy consumption of different sensor nodes configurations, (B) Energy consumption of XBee RF module under different operating modes.
Figure 6.
Packet arrival rate using the different gateways under full mesh topology and cluster tree mesh topology.
Figure 7.
Link quality between WSN nodes.
Figure 8.
Local and remote Remote Signal Strength Indicator (RSSI) of WSN nodes.
Figure 9.
RSSI value between sensor nodes and gateway.
Figure 10.
Knowledge types used in enabling and disabling the heating process.
Figure 11.
Groups in the Context-Based Reasoning (CBR) model.
Figure 12.
Finite State Machine (FSM) State diagram that controls Linux Laboratory heater.
Figure 13.
Energy Aware Context Recognition Algorithm (EACRA) Client algorithm.
Table 1.
Electricity consumption of the university during the fall semester of 2017.
Month and Year | Energy Consumption (MAD) |
---|
September 2017 | 477,693.00 |
October 2017 | 620,662.00 |
November 2017 | 925,342.00 |
December 2017 | 1,248,436.00 |
Table 2.
The steps in each phase of the Plan-Do-Check-Act (PDCA) development cycle.
Plan | Do | Check | Act |
---|
In this first step, we went through:Energy planning Commitment of top management Energy review Energy baseline establishment Energy policy definition Defining objectives, tasks, and plansEnergy management establishment Energy management establishment Energy policy definition
| As a result of the previous plan step, we started the implementation:Implementation of the plans. Involving employees. Internal/external communication. Managing documents and records. Auditing the operations consuming energy. Energy efficient design and renewal of facilities.
| Here we check the previous implementations periodically in order to update and maintain the EMS:
| In the Act phase:
|
Table 3.
Different WSN node configuration used in the experiments.
| Arduino Nano | Humidity Temperature Module | Sound Module | Ambient Light Module | PIR Module | Door/Window Module |
---|
Configuration 1 | ✓ | ✓ | | | | |
Configuration 2 | ✓ | ✓ | ✓ | | | |
Configuration 3 | ✓ | ✓ | ✓ | ✓ | | |
Configuration 4 | ✓ | ✓ | ✓ | ✓ | ✓ | |
Configuration 5 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Table 4.
Gateways hardware configuration.
Gateway Device | CPU | RAM | Operating System | Ethernet | Wi-Fi | XBee |
---|
XBee | Freescale i.MX28 | 68 Mb | Embedded Linux | ✓ | ✓ | ✓ |
Raspberry-Pi | ARM | 2 Gb | Raspbian | ✓ | ✓ | ✓ |
Arduino | AVR | 2 Kb | On-chip Boot | ✓ | ✓ | ✓ |
Table 5.
Throughput test of sensor nodes in different topologies.
Node Location | Full Mesh Topology | Cluster Tree Topology |
---|
Room010 | 7.42 kbps | 8.39 kbps |
Room014 | 6.53 kbps | 7.67 kbps |
Room016 | 6.85 kbps | 7.9 kbps |
Room015 | 4.38 kbps | 5.38 kbps |
Room003 | 3.21 kbps | 4.35 kbps |
Room002 | 2.33 kbps | 3.51 kbps |
Table 6.
RSSI measurements between each pair of WSN nodes.
| Room 002 | Room 003 | Room 010 | Room 014 | Room 015 | Room 016 | Router 1 | Router 2 | Router 3 | Gateway |
---|
Room 002 | | −71 | −90 | −92 | −92 | −89 | −88 | −83 | −75 | −93 |
−71 | −90 | −92 | −92 | −89 | −88 | −83 | −75 | −93 |
Room 003 | | | −92 | −93 | −94 | −91 | −86 | −81 | −73 | −92 |
−92 | −93 | −94 | −91 | −86 | −81 | −73 | −92 |
Room 010 | | | | −78 | −83 | −81 | −75 | −59 | −67 | −55 |
−78 | −83 | −81 | −75 | −64 | −67 | −55 |
Room 014 | | | | | −69 | −71 | −66 | −73 | −85 | −75 |
−69 | −71 | −66 | −73 | −85 | −75 |
Room 015 | | | | | | −72 | −76 | −75 | −88 | −85 |
−72 | −76 | −75 | −88 | −85 |
Room 016 | | | | | | | −69 | −72 | −82 | −73 |
−69 | −72 | −82 | −73 |
Router 1 | | | | | | | | −53 | −57 | −70 |
−53 | −57 | −70 |
Router 2 | | | Remote RSSI | | | −55 | −60 |
| Local RSSI | −55 | −60 |
Router 3 | | | | | | | −76 |
| −76 |
Table 7.
The value of n in different scenarios.
Nodes Location | RSSI | A | Real Distance | Value of ni |
---|
Inside a room (n1) | −55 | 40 dbm | 5 m | 2.17 |
In the hall (n2) | −50 | 40 dbm | 5 m | 1.44 |
From room to another room (n3) | −63 | 40 dbm | 5 m | 3.33 |
From room to the hall (n4) | −60 | 40 dbm | 5 m | 2.80 |
Table 8.
Distance based on RSSI versus actual distance in meters.
| Room 002 | Room 003 | Room 010 | Room 014 | Room 015 | Room 016 | Router 1 | Router 2 | Router 3 | Gateway |
---|
Room 002 | | 8.50 | 31.73 | 36.43 | 36.43 | 29.61 | 27.63 | 19.30 | 17.87 | 39.04 |
3.20 | 28.85 | 27.9 | 30.63 | 23.10 | 35.63 | 29.13 | 12.76 | 30.99 |
Room 003 | | | 36.43 | 39.04 | 41.84 | 34.00 | 24.06 | 15.08 | 15.08 | 36.43 |
27.60 | 28.08 | 31.14 | 26.08 | 33.09 | 25.30 | 12.33 | 29.15 |
Room 010 | | | | 13.84 | 19.55 | 17.03 | 11.24 | 4.77 | 9.21 | 4.09 |
13.28 | 18.11 | 13.28 | 10.60 | 7.50 | 16.53 | 5.02 |
Room 014 | | | | | 7.42 | 8.50 | 6.03 | 15.08 | 22.45 | 11.24 |
3.60 | 4.08 | 3.30 | 17.20 | 20.91 | 12.30 |
Room 015 | | | | | | 9.14 | 12.05 | 17.78 | 27.63 | 22.45 |
6.00 | 6.90 | 21.06 | 22.59 | 17.60 |
Room 016 | | | | | | | 7.04 | 13.89 | 18.24 | 9.70 |
4.36 | 15.47 | 17.00 | 12.30 |
Router 1 | | | | | | | | 7.99 | 15.15 | 7.95 |
8.74 | 15.84 | 9.00 |
Router 2 | | | Distance based on RSSI (m) | | | 11.00 | 5.17 |
| Real distance (m) | 9.60 | 6.00 |
Router 3 | | | | | | | 19.30 |
| 19.43 |
Table 9.
Knowledge based on different sensor modules.
Knowledge | Data | Data Type | Sensor Module | Sampling Time Interval |
---|
Occupancy | Motion | Digital | PIR | Low |
Pressure | Analog | MPX4115A | High |
Sound | Analog | 2PCS | High |
Gas | Analog | MQ-4 | Medium |
Camera | Analog | OV2640 | High |
Air quality | Temperature | Digital | DHT11 | High |
Humidity | Digital | DHT22 | High |
Appliance status | Light | Digital | MSE004LSM | High |
Relay | Digital | SRD-05VDC-SL-C 5V | High |
Power consumption | Analog | YHDC 30A | High |
| Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).