Next Article in Journal
Design of Groundwater Heat Pump Systems. Principles, Tools, and Strategies for Controlling Gas and Precipitation Problems
Previous Article in Journal
Applying International Power Quality Standards for Current Harmonic Distortion to Wave Energy Converters and Verified Device Emulators
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Embedded Platform for Testbed Implementation of Multi-Agent System in Building Energy Management System

Department of Electrical Engineering, National Institute of Technology (ITN), Malang 65145, Indonesia
*
Author to whom correspondence should be addressed.
Energies 2019, 12(19), 3655; https://doi.org/10.3390/en12193655
Submission received: 20 August 2019 / Revised: 15 September 2019 / Accepted: 20 September 2019 / Published: 25 September 2019

Abstract

:
This paper presents a hardware testbed for testing the building energy management system (BEMS) based-on the multi agent system (MAS). The objective of BEMS is to maximize user comfort while minimizing the energy extracted from the grid. The proposed system implements a multi-objective optimization technique using a genetic algorithm (GA) and the fuzzy logic controller (FLC) to control the room temperature and illumination setpoints. The agents are implemented on the low cost embedded systems equipped with the WiFi communication for communicating between the agents. The photovoltaic (PV)-battery system, the air conditioning system, the lighting system, and the electrical loads are modeled and simulated on the embedded hardware. The popular communication protocols such as Message Queuing Telemetry Transport (MQTT) and Modbus TCP/IP are adopted for integrating the proposed MAS with the existing infrastructures and devices. The experimental results show that the sampling time of the proposed system is 16.50 s. Therefore it is suitable for implementing the BEMS in a real-time where the data are updated in an hourly or minutely basis. Further, the proposed optimization technique shows better results in optimizing the comfort index and the energy extracted from the grid compared to the existing methods.

Graphical Abstract

1. Introduction

An energy management system is one of the popular and challenging topics in the electrical power system. In recent modern Smart Grid technology, the research topics in the energy management system field have increased significantly, especially in the areas of home energy management systems (HEMSs) and building energy management systems (BEMSs). The authors in [1] propose a method to reduce the energy consumption by switching on/off the air conditioning (AC) and adjusting the temperature setpoint. The objectives are to reduce the electricity consumption of the AC unit in a way that the users do not feel any changes in temperature comfort. In the experiments, they change the temperature setpoint of the AC during a certain time interval and observe whether the comfort changes are felt or not by the users. The temperature setpoints are changed remotely using a centralized server.
The fuzzy logic controller (FLC) is employed in [2] to adjust the temperature setpoint of the AC units for energy management in residential buildings. The temperature setpoint is adjusted by a fuzzy inference system that considers four parameter inputs, i.e., (a) initial temperature setpoint; (b) outdoor temperature; (c) home occupancy; (d) electricity price. The system consists of two optimization units for handling the hot temperature setpoint and the cold temperature setpoint.
An energy management system to control the AC unit and the electrical loads using control logic is proposed in [3]. The control logic covers six functions i.e., (a) comfort, (b) economy, (c) emergency, (d) energy, (e) power, (f) thermal storage. The comfort function is used to ensure that the AC units and the electrical loads can be supplied with maximum comfort. The economy function optimizes the configuration of the AC unit and the electrical loads to minimize the cost. The emergency function is used during grid failures and allows the priority loads to be supplied by a battery system. The energy function is used to allocate energy consumption at a predefined time. The power function is used to ensure that the active power consumption does not exceed a fixed threshold. The thermal storage function is used to change the temperature setpoint of AC unit when the generated PV energy is greater than the consumption.
The authors in [4] employed a fuzzy system in their BEMS as the control strategy and prediction tool. In the control strategy, the FLC is used to control the solar thermal air system and the window-related use such as controlling the indoor temperature and light. The fuzzy prediction system is used to predict the energy demand and solar energy. The prediction system improves the energy efficiency due to the ability to predict the behavior of building in advance. A system to predict the energy demand of the building using the Artificial Neural Network (ANN) is proposed in [5]. The ANN model is trained using the dataset of monthly historical energy consumption of the building.
Due to the distributed components (sensors, actuators, generators, loads) of the HEMS/BEMS, an intelligent multi-agent system (MAS) is widely adopted [6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]. The MAS is a distributed control system where each agent works autonomously and coordinates with each other to achieve the global goal. The implementation of MAS in the HEMS is proposed in [6,7,8]. The MAS in [6] consists of the permanent agent, the temporary agent and the coordinator agent. The permanent agent is used to control the permanent loads, i.e., the appliances which run in a whole-time such as the refrigerator the air conditioner, the water heater. The temporary agent controls the temporary loads, which are divided into two categories: (a) the must run loads such as the lighting, the television, the cooking appliances, etc.; (b) the shiftable loads such as the washing machine, the dishwasher, etc. The coordinator agent is used for the message coordination, controlling and the decision making among the agents. The fuzzy logic controller (FLC) is employed by each agent to manage energy consumption.
The agents in [7] are grouped into three main agents, i.e., management agents, electrical supply system agents, and home appliance agents. The management agents consist of a supply side management (SSM) agent, which manages the electrical flow from the generator system, a demand side management (DSM) agent, which manages the electrical flow to the appliances, and the HEMS agent, which manages both SSM and DSM agents. The electrical supply system agents consist of a solar panel and storage system agent, main grid agent, and electric vehicle agent. The electric vehicle agent controls the charging/discharging of the battery of electric vehicle. Under normal conditions, the battery of electric vehicles will be charged. However under power shortage conditions, the battery may be discharged to supply the energy. The home appliance agents consist of the standing fan agent, rice cooker agent, air condition agent, television agent, etc.
A different MAS architecture of the HEMS is proposed in [8], where the agents are divided into four categories: (a) control and monitoring agents (CMAs), which are used to control and monitor the actuators and sensors; (b) information agents (IAs), which is used to handle the data related to the home devices; (c) application agents (AAs), which are used for prediction, scheduling and feedback functions; (d) management and optimization agents (MOAs), which are used for the optimization tasks. To manage the energy, the HEMS adopts four optimization strategies consisting of the comfort for user satisfaction, the reduction costs, the green energy efficiency, and the smart demand response.
The agents of the MAS employed in the BEMS [9,10,11,12,13,14,15,16,17,18,19,20,21,22,23] can be classified into four main agents, i.e., load agents, generator agents, central agents, and other agents as given in Table 1. The load agent handles the electrical loads in the buildings. The generator agent controls the generation system which supplies the electrical energy to the building. The central agent controls or coordinates the load and the generator agents. The MASs in [9,10,20] do not have a control agent, thus in [9], the load agent and the storage agent coordinate with the generator agent directly. Similarly, the heating agent and the cooling agent are connected to the electricity agent directly [10], while in [20], each local agent such as the local temperature agent is controlled by a load agent, then the load agents were connected to an intelligent coordinator.
In [11], the load agents are classified into consumption agents and load shifting agents. The consumption agent is used to control the regular devices such as the lighting, while the load shifting agent is used to control the intelligent devices which could be shifted the start and stop time. Similar to [7], the storage agent is used to control the electricity storage such as the battery of electric vehicle. In [12], the load control agent is used to control the critical loads such as the lighting and air conditioning system, while the load agent is used to control the noncritical loads such as the fountain and swimming pool pumps. In [13], the local zone agent controls the loads such as the heating systems, the electrical systems on a local zone. The different local zone agents are aggregated by the zone agent. The load agent in [16] is divided into two categories, i.e., the local controller agent and the load agent. The local controller agent controls the loads that are related to the user comfort such as the lighting (visual comfort), the air conditioning (thermal comfort), the air quality. The load agent controls the loads that are not related to the comfort index.
The MAS in [14] is focused on measuring the environment variables, thus sensing agents are employed. The prediction agent predicts the environment conditions such as the occupancy and the weather information based-on the sensing agents. Meanwhile, the MAS in [15] is focused on detecting the presence of occupant in a room using personal and environment agents.
The architectures listed in Table 1 are the common approaches used in energy management systems. Meanwhile other approaches are proposed by [24,25,26,27]. The authors in [24] proposed an energy router called the Duindam-Stramigioli Energy Router System that manages the electrical energy from multiple sources. It works by controlling the direction and amplitude of the electrical flow in the multiports system using the power electronic devices. In [25], an energy hub is used to convert and store the various forms of energy resources such as electricity, natural gas, district heat, and wood chips. The hub contains the heat exchanger, the power electronic devices, the compressors, the transformers, the battery and the hot water storage. This approach may reduce the energy cost and air pollution.
The energy management system proposed by [26] allows the users (Smarthome or Smartbuilding) to exchange the local jointly renewable energy resources. This approach is based on the decentralized algorithm to optimize the energy from the renewable resource, i.e., to be exchanged with the neighbors, and to optimize the energy of the distribution network, i.e., to be delivered to the network or extracted from the network. The similar approach is proposed by [27], in which renewable energy is shared among the users. The users may lend/borrow the renewable energy to/from the neighbors.
The main objectives of the energy management systems [9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27] are usually to minimize the energy cost and/or maximize user comfort. In addition to these two optimization objectives, the objective function of maximizing the energy usage from the local renewable energy source is also employed [28,29]. Since our proposed system deals with the MAS-based BEMS and without loss of generality, we may classify the MAS implementation in BEMS as given in Table 2. The MAS-based BEMS could be classified into three groups, i.e., based-on: the number of criteria to be optimized, the optimization algorithm, and the implementation platform. In the first group, they are divided into single-objective optimization [10,11,12,13,14,15,16,17] and multi-objectives optimization [18,19,20,21,22,23]. Based on the optimization algorithm, they are divided into the conventional-based optimization techniques [10,11,13,15,17,21,23] and the artificial intelligent (AI)-based optimization techniques [12,14,16,18,19,20,22]. Based-on the implementation platform, they are divided into the simulation-based implementation and the hardware-based implementation.
Most of the BEMSs described previously are simulated by software. The BEMS implementation on the hardware testbed is developed in [14,15,23,33,34,35]. The Zigbee [36] networks are commonly employed as the communication protocol in the lower layer (field layer) such as the sensors and actuators [14,23,33,34,35]. While the upper layer (application layer) employs the TCP/IP protocol using the WiFi network [15,23,33,34,35]. The main algorithms (optimization techniques) are usually implemented on the computer server (web-server), equipped with web interfaces.
As discussed previously, the BEMS, especially MAS-based BEMSs, are still rarely implemented on a hardware platform (more specifically an embedded platform), especially when AI techniques are adopted for solving the optimization problems. In this paper, we propose a hardware testbed implementation of the MAS-based BEMS. The novelty of our proposed system is the implementation of a GA-based optimization technique on an embedded platform to optimize the energy cost and user comfort in the building using only a few optimized parameters. Our proposed hardware testbed is focused on the electronics and communication parts for the real-time implementation of the algorithm. Our proposed MAS consists of the central control agent which is implemented on a Raspberry Pi module [37], the generator agent and the load agents which are implemented on Wemos modules [38]. The main contributions of our hardware testbed system are fivefold: (a) It implements the genetic algorithm (GA) technique on the embedded hardware for real-time optimization of the BEMS; (b) It emulates the generator system and the loads on the embedded hardware; (c) It adjusts the room temperature and illumination setpoints according to the optimized power; (d) It implements the popular industrial communication protocol, i.e., Modbus protocol [39] for interfacing between the agents and the devices; (e) It implements the state of the art communication protocol in the Internet of Things (IoT) technology, i.e., the Message Queuing Telemetry Transport (MQTT) protocol [40] for communicating between the agents.
To the best of our knowledge, there are no prior works related to the first and second contributions or they are very rare. Furthermore, our proposed optimization technique, which is used to minimize the energy cost while maximizing the user comfort, utilizes a few parameters for calculating the objective function. Instead of using both the energy cost and the comfort parameters in the objective function explicitly [18,19,20,21,22,23,28,29], our method uses the energy cost parameter only, since the comfort parameters could be represented in the term of energy cost parameter as described in the following. The power consumption in each room, which is calculated by the load agent, reflects the user comfort (the thermal comfort and the illumination comfort) of the room, in the sense that high power consumption represents high comfort, and low power consumption represents low comfort. Then the total power consumptions of all rooms are considered as the energy cost that should be minimized. The advantage of using this approach is that only the power consumption data should be sent to the central control agent for the optimization calculation. The comfort data are handled by each load agent.
Related to the third contribution, compared to [2] where the method to adjust temperature setpoint is used to minimize the energy cost only, our method considers both the energy cost and user comfort. While the adoption of Modbus protocol provides a wide range implementation without replacing the existing sensor and actuator devices.
The selection of the MQTT protocol rather than the Lightweight Machine to Machine (LWM2M) protocol [41] is discussed as follows. Both the MQTT and the LWM2M protocols are lightweight protocols, which are suitable for the IoT applications. While the LWM2M protocol has a well-defined data and device management model, the communication data of the MQTT protocol must be developed from scratch. However, in the case of our testbed, we may have more flexibility to define the structure of communication data to fulfill the requirement of our proposed BEMS, when the MQTT protocol is employed.
The rest of the paper is organized as follows: Section 2 describes our proposed system. Section 3 presents the experimental results and discussion. Conclusions are covered in Section 4.

2. Proposed System

2.1. System Overview

The architecture of the proposed system is depicted in Figure 1. The proposed BEMS adopts the MAS to manage the energy and user comfort in a building, more specifically a university building. The testbed consists of the central control agent, the generator agent, and the load agents. In this work, the load agents consist of three load agents which are located in the classroom, the laboratory room, and the office room. Each load agent controls three kinds of loads, namely the lighting, the air conditioning (AC), and the electrical load such as the computer and the printer. The generator agent controls the utility grid, the photovoltaic (PV) and the battery systems. Meanwhile, the central control agent is used to control all the agents.
As described in [8], the MAS-based BEMS can participate in a demand response program, i.e., the user can change the power consumption to response the changes in the electrical price or the incentive tariff introduced by the utility grid, due to the availability of the smart metering and intelligent control system of the BEMS. As illustrated in Figure 1, the load agent, the generator agent, and the central control agent provide the functionality of smart metering and intelligent control. Further, the MAS-based BEMS could be extended to interact with the larger Smart Grid system [13]. In the case of our proposed system, the integration with the Smart Grid could be done easily by extended the functionality of the central control agent to exchange information with the Smart Grid system such as the environment and the weather data, the generator, the storage, the loads, and the electrical networks.
In a more complex system such as the smart city [42,43], there are five energy-related activities, i.e., the generation, the storage, the infrastructure, the facilities and the transport [42]. In this context, our proposed BEMS takes part in the facility activity that consumes the energy. The energy management of smart city as proposed in [43] employs the hierarchical decision control where each subsystem may have different control decision scheme. Due to the decentralized scheme of our proposed BEMS, it is suitable to be adopted in such hierarchical decision control architecture.
Since our proposed system divides a whole system into agents, it provides the flexibility to add the new agents to fit the requirements, for instance, to be extended to multi-commodity smart energy systems [44], where the hybrid energy systems (the heat and the electricity) are controlled. It is also possible to extend the agents to form the group of interconnected users/buildings with the shared generator agents as proposed in [45]. It is worthy to note that several MAS-based BEMS as illustrated in Figure 1 could be interconnected and coordinated in the energy district system as proposed in [46], where the several central control agents appoint a coalition coordinator to manage the energy in the district.
As shown in Figure 1, agents are implemented on the embedded systems in which the load agents and the generator agent are implemented on Wemos modules, while the central control agent is implemented on a Raspberry Pi module. A lighting simulator, AC simulator, and electrical load simulator are used to simulate the lighting, the AC, and the electrical load in the classroom, respectively. To provide a flexible implementation, a popular Modbus TCP/IP protocol is employed to communicate between the load agent and the devices. Fortunately, the Wemos is equipped with a built-in WiFi module, thus the Modbus TCP/IP protocol could be implemented easily via WiFi communication. A PV-battery simulator is developed to simulate the PV-battery system. Similar to the classroom, the simulator is implemented on Wemos modules and communicates with the generator agent using the Modbus TCP/IP protocol. The simulators in the laboratory room and the office room are developed in a rather different way. Instead of implementing the simulators on the separate modules, they are implemented in the same Wemos module with the load agent.
The objective of our proposed BEMS is to minimize the energy extracted from the grid while maximizing the user comforts. It deals with the multi-objective optimization problem. Instead of using the scheduling techniques [47,48], that manages the operation time of the controllable loads, our method controls the amount of power required by the loads. Thus it offers better control, in the sense that rather than switching-on/off the loads in a specific time interval (one-hour [47,48]), our method can adjust the power consumption of the loads in real-time, i.e., in one-minute intervals.
In this work, we propose a GA technique to solve the optimization problem and implement it on the control central agent. To provide a real-time implementation of the BEMS, the control central agent is implemented on a Raspberry Pi module. The Raspberry Pi communicates with the other agents (Wemos) via WiFi communication. Further, the MQTT protocol, a lightweight IoT protocol, is employed as the communication protocol. Compared to the method in [49] that combining the SCADA system and the Matlab software for implementing the optimization technique, our proposed method offers a simple and flexible approach due to the embedded hardware implementation. Thanks to the Raspberry Pi module that provides a small and powerful embedded computer. Further, our proposed testbed implements the Modbus protocol which is commonly used in the SCADA system.

2.2. Multi Agent Systen

To provide an easy explanation, the variables used in the proposed MAS-based BEMS are listed in Table 3.

2.2.1. Central Control Agent

The central control agent is the main agent that is responsible to manage the energy in the building by solving the multi-objective optimization problem as described in the following. The objective is to minimize power consumption, while maximizing the user comforts (temperature and lighting). Our multi-objective optimization problem is formulated using four objective functions and four constraints. The objective functions are expressed below
M i n i m i z e ( p 1 + p 2 + p 3 )
M a x i m i z e ( p 1 )
M a x i m i z e ( p 2 )
M a x i m i z e ( p 3 )
subject to
p 1 m i n p 1 p 1 m a x
p 2 m i n p 2 p 2 m a x
p 3 m i n p 3 p 3 m a x
p 1 + p 2 + p 3 ( p P V + p B a t ) p G r i d m a x
Equation (1) represents the objective for minimizing the total power consumed by the classroom, the office room and the laboratory room, while Equations (2)–(4) represents the objective for maximizing the user comfort in each room. It is noted here that instead of using the comfort index directly, we use the power consumption to represent user comfort. Therefore maximizing the user comfort could be defined by maximizing the power consumption of each room (Equations (2)–(4)). This approach could be realized due to the fact that when the temperature and the illumination comforts to be increased, the power consumption will increase. The lower user comfort requires lower power consumption. This approach will reduce the number of parameters to be optimized. The objective functions in Equations (1)–(4) only require three variables, i.e., p1, p2, p3 that should be provided in the central control agent. Thus it offers an efficient data exchange between the agents.
The constraints are formulated using the inequalities as expressed by Equations (5)–(8). The constraints in Equations (5)–(7) are the lower and upper bounds of the power consumptions which are used to ensure that the optimized parameters p1, p2, p3 fall in the allowable range of the user comfort. While the constraint in Equation (8) ensures that the power consumption of the building could be supplied by the generator systems (the renewable energy resources and/or the utility grid).
To solve the above multi-objectives optimization problem, we adopt the Multi-Objective Genetic Algorithm (MOGA), more specifically the NSGA-II as proposed by [50]. The MOGA is implemented on the central control agent to find the optimal power required by the building based on the current power consumptions and the generated power as illustrated in Figure 2. As shown in the figure, the inputs of the central control agent are the minimum and maximum power consumptions of the classroom, the office room, and the laboratory room, the power produced by the battery and the PV. Then these values are used by the MOGA to solve the multi-objective optimization as expressed in Equations (1)–(8). The outputs of the central control agent are the optimal values of power required by the classroom, the office room, and the laboratory room which are sent to the respective agents.
The power required by the classroom, the office room, and the laboratory room are the optimal values that should be consumed by the respective loads. Then the respective load agent control its loads to satisfy the power requirement using the strategy as described in the following section.

2.2.2. Load Agent

The load agents in the classroom, the office room and the laboratory room are similar, in the sense of the control function. However in our testbed they have the different device protocols, where the load agent in the classroom communicates with the load devices using the Modbus TCP/IP protocol via the WiFi communication, while the data exchange between the load agents and the devices in the office room and the laboratory room are performed directly in the Wemos module.
Figure 3 illustrates the input and output data of the load agent. As shown in the figure, the inputs are the required power, the outdoor temperature, and the outdoor illumination. These data are used by the fuzzy logic controllers (FLCs) to determine the optimal room temperature and illumination setpoints. There are two FLCs, one for controlling the room temperature setpoint (called as FLC-T), and another one for controlling the room illumination setpoint (called as FLC-I). The inputs of FLC-T are the required power and the outdoor temperature, while the output is the room temperature setpoint. The membership functions of the required power, the outdoor temperature, and the room temperature setpoint are shown in Figure 4, where each variable has three linguistic values, i.e., Low (LOW), Medium (MED), and High (HIGH). The values of the required power (658 W–1137 W), the outdoor temperature (26 °C–30 °C), and the room temperature setpoint (20 °C–25 °C) are normalized to 0–1.
The fuzzy rules of FLC-T are given in Table 4, where the rules are determined by considering the objectives as follows. It is worthy to note that the AC system discussed here is applicable for the hot season where the AC system is controlled to decrease the outdoor temperature (i.e., the cooling system) to the desired comfortable room temperature. Therefore the consumed power of the AC system will increase when the room temperature setpoint is decreased and vice versa.
-
When the required power is low (LOW), then it is better to set the room temperature setpoint follows to the level of the outdoor temperature to minimize the consumed power of the AC. Thus the fuzzy rules given in Table 4 show that when the required power is LOW, the room temperature setpoint is set to LOW when the outdoor temperature is LOW, it is set to MED when the outdoor temperature is MED, and it is set to HIGH when the outdoor temperature is HIGH.
-
When the required power is high (HIGH), it allows the AC to consume high power. Thus the room temperature setpoint could be set to LOW for all outdoor temperature conditions.
-
When the required power is medium (MED), it is better to set the room temperature setpoint to the medium (MED) regardless of the outdoor temperature conditions.
The inputs of FLC-I is the required power and the outdoor illumination, while the output is the room illumination setpoint. The membership functions of the required power, the outdoor illumination, and the room illumination setpoint are shown in Figure 5, where each variable has three linguistic values, i.e., Low (LOW), Medium (MED), and High (HIGH). The values of the required power (658 W–1137 W), the outdoor illumination (1000 lx–10,000 lx), and the room illumination setpoint (300 lx–500 lx) are normalized to 0–1.
The fuzzy rules of FLC-I are given in Table 5, where the rules are determined by considering the objectives as follows. It is noted that the property of the comfort value of the illumination is the opposite from the one of the temperature, in the sense that the temperature comfort increases when the room temperature setpoint is decreased, while the illumination comfort increases when the room illumination setpoint is increased. Therefore the fuzzy rules of the FLC-I are defined below:
-
When the required power is low (LOW), then it is better to set the room illumination setpoint follows to the level of the outdoor illumination to minimize the consumed power of the lighting. Thus the fuzzy rules given in Table 5 show that when the required power is LOW, the room illumination setpoint is set to LOW when the outdoor illumination is LOW, it is set to MED when the outdoor illumination is MED, and it is set to HIGH when the outdoor illumination is HIGH.
-
When the required power is high (HIGH), it allows the lighting to consume high power. It means that the room illumination setpoint could be set to the HIGH for all outdoor temperature conditions.
-
When the required power is medium (MED), it is better to set the room illumination setpoint to the medium (MED) regardless of the outdoor illumination condition.

2.2.3. Generator Agent

The generator agent is used to manage the battery charging/discharging according to the state of charge (SOC) of the battery as illustrated in Figure 6. Besides controlling the battery, the generator agent receives the generated power from the PV-battery system and sends the data to the central control agent as shown in Figure 1.
The battery charging/discharging is controlled using the simple strategy as expressed by Equations (9)–(11). Using these rules, the battery could be effectively operated to supply the load (discharging) and/or saving the PV power based-on the SOC of the battery. Equation (9) is used to prevent the over-discharge, while Equation (11) is used to prevent the over-charge. Equation (10) is used to operate the battery in both charging and discharging modes
IF SOC < 0.3 THEN Charging is ON and Discharging is OFF
IF 0.3 ≤ SOC ≤ 0.7 THEN Charging is ON and Discharging is ON
IF SOC > 0.7 THEN Charging is OFF and Discharging is ON

2.3. Load and Generator Simulators

2.3.1. AC Simulator

The model of an air conditioning (AC) system is a modified version of the model in [51]. Since the model in [51] is the heater system, we modify it to become the cooling system to fulfill with our proposed system. The important contribution of our work is that the model is simulated in the embedded system (Wemos module) for real-time implementation, especially for the electronic/communication aspects. The AC simulator consists of two models: the AC (cooling system) and the thermodynamic model of a room. The AC system is expressed by Equation (12), while the thermodynamic model of a room is expressed by Equation (13). The electrical power consumed by the room is simplified by a linear function of the difference between the outdoor temperature and the room temperature as expressed by Equation (14):
Q d o t ( k ) = ( R t e m p ( k ) T A C ) M d o t   c
R t e m p ( k + 1 ) = R t e m p ( k ) + Δ t M a i r c ( O u t t e m p ( k ) R t e m p ( k ) R e q Q d o t ( k ) )
P o w e r A C ( k ) = C p o w e r ( O u t t e m p ( k ) R t e m p ( k ) )
The block diagram of AC simulator is illustrated in Figure 7, where it has two inputs, i.e., the outdoor temperature which is predefined data stored in the Wemos module, and the room temperature setpoint which is received from the load agent (see Figure 1). The AC simulator sends the power consumption, the room temperature and the outdoor temperature to the load agent.
To provide real-time implementation, we adopt the Modbus TCP/IP protocol for interfacing between the AC simulator and the load agent, where the load agent acts as the master device and the AC simulator is the slave device. The Modbus data such as the register address and the command type are listed in Table 6. To show that the adopted devices are available commercially, the name of the manufacturer is given in the table. As shown in the table, the Modbus data for the AC power consumption is provided by the power meter [52], while Modbus data for the room temperature, the temperature setpoint and the outdoor temperature are provided by the Modbus thermostat device [53].

2.3.2. Lighting Simulator

The power consumption of the lighting in the room is calculated by dividing the luminous flux to the luminous efficacy as given in Equation (15):
P o w e r L i g h t = φ / η p o w e r
In the experiment, the LED lamp is used, where the luminous efficacy is 100 lm/W, while the daylight factor (DF) of the room is 2%, which means that the room illumination is 2% of the outdoor illumination.
The block diagram of lighting simulator is illustrated in Figure 8. It has two inputs: the outdoor illumination which is a predefined data stored in the Wemos module, and the room illumination setpoint which is received from the load agent. The lighting simulator sends the data of the power consumption, the room illumination and the outdoor illumination to the load agent.
The Modbus data of the simulator is given in Table 7. Similar to the AC simulator, the Modbus data for the lighting power consumption is provided by the power meter [52]. The Modbus data for the room illumination is provided by the daylight sensor [54]. The LED dimmer [55] provides the Modbus data for the room illumination setpoint. The outdoor light sensor [56] provides the Modbus data for outdoor illumination.

2.3.3. Electrical Load Simulator

The block diagram of electrical load simulator is illustrated in Figure 9. The electrical load is modeled with the load profile stored in the Wemos module. The simulator sends the data of power consumption to the load agent using the Modbus data as given in Table 8, where it only contains the power consumption data provided by the power meter [52].

2.3.4. PV-Battery Simulator

The relationship between current and voltage (I-V) of the PV is expressed by Equations (16)–(18) [57], where NS = 4, NP = 65 and VPV = 48 V. The battery is modeled by its SOC as expressed by Equation (19) [58]:
I S C = i r r a d   N P / 1000
i d = N P e 9 ( e ( ( v P V / ( 36 N S ) + 0.05 i o u t / N P ) / 26 e 3 ) 1 ) )
i o u t = I S C i d v P V ( 1 / ( 432 N S ) )
SOC ( k ) = SOC ( k 1 ) + I c h g C B a t
The block diagram of the PV-battery simulator is illustrated in Figure 10. The PV-battery simulator receives the battery charging/discharging control signal from the generator agent. The predefined data of the solar irradiation is stored in the Wemos module which used to produce the PV power as defined by Equations (16)–(18). Then the PV power, the battery power, and the battery SOC are sent to the generator agent using the Modbus data as given in Table 9. The Modbus data of the PV power is provided by the Gridtie inverter device [59]. The battery power, the battery SOC and the battery charging/discharging control are provided by the battery charger controller [60].

2.4. Communication Protocol

As described in the previous section, the MQTT protocol is adopted as the communication protocol between the central control agent and the other agents (the load agents and the generator agent). MQTT is lightweight messaging protocol that runs on the Transmission Control Protocol/Internet Protocol (TCP/IP). It works based on the publish-subscribe mechanism, where the MQTT broker is required to establish a connection between the publisher and the subscriber.
The configuration of MQTT protocol is illustrated in Figure 11. In the system, the MQTT broker and the central control agent are installed on same Raspberry Pi module. Thus the central control agent communicates with the broker via a localhost connection. As shown in the figure, each agent publishes and subscribes the specific topics as described in the following.
In Figure 11, an arrow with “Publish-C2CC” means that the load agent in the classroom publishes the “C2CC” topics, while an arrow with “Subscribe-CC2C” means the load agent subscribes the “CC2C” topics. The list of the topics is given in Table 10. As shown in the table, all topics that are published by the load agents and the generator agent are subscribed by the central control agent, thus all data sent by the load agents and the generator agent will be received by the central control agent. Meanwhile, the topics that are subscribed by load agents and the generator agent are published by the central control agent, thus the data that is required by the load agents and the generator agent will be provided by the central control agent.

3. Experimental Results and Discussion

3.1. Model Validation

To verify our proposed model, we evaluate the functionality of the proposed embedded simulators and conduct the sensitivity analysis of the FLC model. To evaluate the AC simulator in the classroom, we record the data of room temperature setpoint, the outdoor temperature, the room temperature, and the power consumption during the simulation into the Wemos memory. The recorded data is illustrated in Figure 12. The time sampling of the simulator is one second, and the hourly data is simulated in one-minute interval. It is noted here that from 0 to 59 seconds and from 300 to 359 seconds, the classroom is not occupied and the AC is switched off. Therefore during these time intervals, the power consumptions are zero and the room temperature is the same as the outdoor temperature. As shown in the figure, the AC simulator works properly, in the sense that the room temperature follows the temperature setpoint, and the power consumption changes proportionally to the difference between the outdoor temperature and the temperature setpoint. The power consumption increases when the difference between the outdoor temperature and the temperature is increased.
The profile of illumination and power consumption of the lighting simulator is illustrated in Figure 13. Similarly to the AC simulator, the lighting system is switched-off during 0 to 59 seconds and 300 to 359 seconds. In the figure, the natural illumination is the room illumination which is caused by the outdoor lighting (sunshine). As shown in the figure, the room illumination is able to follow the illumination setpoint, except at the time during the previous periods. Further, the power consumption shows the proper behavior, i.e., it increases when the difference between the illumination setpoint and the natural illumination is increased.
To assess the sensitivity of the parameters of our proposed FLC, we conduct the sensitivity analysis as described in the following. Two sensitivity analysis methods, i.e., the elementary effect (EE) method [61], and the Fourier Amplitude Sensitivity Testing (FAST) method [62] are employed. The EE method is used to find the influential parameters of the model, while the FAST method is used to find the sensitivity indices of the parameters. The EE and FAST methods are calculated using the SAFE, a Matlab Toolbox for global sensitivity analysis provided by [63].
The mean and standard deviation of EEs of the FLC inputs of the FLC-T and the FLC-I are illustrated in Figure 14a,b respectively. In Figure 14a, the red dot and the blue dot represent the normalized required power and the normalized outdoor temperature respectively. As shown in the figure, the mean and the standard deviation of the required power are higher than the outdoor temperature. Thus it could be concluded that the required power input is more influential than the outdoor temperature input. This result could be understood from the observation of the fuzzy rules of FLC-T shown in Table 4, where the changes of linguistic values (LOW, MED, HIGH) of the outdoor temperature do not change the output when the linguistic values of required power is MED or HIGH. The changes of the outdoor temperature affect the output, only when the value of required power is LOW. Therefore it is clearly shown that the influential effect of the required power is higher than the outdoor illumination. In Figure 14b, the red dot and the blue dot represent the normalized required power and the normalized outdoor illumination respectively. As shown in the figure, the mean and the standard deviation of the required power are higher than the illumination. Thus the required power input is more influential than the outdoor illumination input. Similar to the FLC-T discussed previously, the result could understood from the examination of fuzzy rules of FLC-I shown in Table 5.
The sensitivity indices calculated using the FAST method are shown in Figure 15, where Figure 15a shows the sensitivity indices of the FLC-T inputs, i.e., the normalized required power and the normalized outdoor temperature, while Figure 15b shows the sensitivity indices of the FLC-I inputs, i.e., the normalized required power and the normalized outdoor illumination.
Both figures show that the sensitivity index of the required power input is higher than the outdoor temperature input and the outdoor illumination input. These results conform to the previous EE analysis. The sensitivity analysis results show that it is reasonable to select the required power, the outdoor temperature, and the outdoor illumination as the inputs of the proposed FLCs, even though the last two inputs have a less influential effect compared to the required power input.

3.2. Performance of Real-Time Implementation

Since the objective of the proposed testbed is for testing the real-time implementation of the building energy management system, we conduct several experiments to verify our method in the term of the real-time implementation such as the execution time of the algorithm, the sampling time of the agents, and the efficiency of the optimization technique.
The execution times of FLCs which are implemented on the Wemos modules are given in Table 11. As shown in the table, the execution time of FLC is about 10 to 12 ms. Thus to execute both FLC-T and FLC-I on a Wemos module, it requires about 22 ms. The results verify that the proposed embedded agent using Wemos is suitable for a real-time implementation of the FLC algorithm. Since the sampling time of an agent is determined by the execution time of the algorithm and the transmission time of the communication protocol employed, we examine the sampling time of each agent as given in Table 11. Since the data communication between the load agents in the office room and the laboratory room with the simulators are performed directly, the sampling times of these load agents are quite fast, i.e., about 1.25 ms. Meanwhile, the sampling times of the agents with the Modbus protocol, i.e., the load agent in the classroom and the generator agent are 6.59 s and 2.63 s respectively. These results indicate that the sampling time is very affected by the transmission time of the Modbus protocol. Further, since the number of the Modbus slave devices in the classroom is higher than the generator agent, the sampling time is longer due to the fact that the master must poll the slaves.
The sampling times of the load agent in the classroom and the load agent in the office room are illustrated in Figure 16 and Figure 17, respectively. In the figures, the profiles of room temperature setpoints against time are shown, where the updated data are indicated with the marks on the graphs. Figure 16 shows that the room temperature setpoints in the classroom are updated in an average time of 6 s, while Figure 17 shows that the room temperature setpoints in the office room are updated in an average time of 1 s.
The main contribution of our proposed system in the real-time implementation of the optimization technique using GA is shown in Table 11, where the execution time of GA on the Raspberry Pi module is 14.25 s (the number of population is 100 and the number of iteration is 30). While the sampling time of the central control agent is 16.60 s. The result implies that the communication task performed by the MQTT protocol only contributes a small portion of the time. Most of the time is consumed by the GA. It also suggests that the lightweight protocols such as the MQTT and the LWM2M protocols are the effective communication protocols between the agents in the MAS. Relying on the sampling time of the central control agent which is lower than one minute, we may conclude that our proposed testbed is suitable for implementing the BEMS, where the updating process is done in hourly basis even every minute.

3.3. Effectiveness of Optimization Technique

To verify the effectiveness of the proposed optimization technique, we evaluate the comfort index and the energy extracted from the grid. The objective is to maximize the comfort index while minimizing the energy extracted from the grid. The temperature comfort index (CIT) and the illumination comfort index (CII) are defined based on [64] as follows:
CIT = 1 ( T e m p o p t T e m p m i n T e m p m a x T e m p m i n ) 2
CII = 1 ( I l l u m m a x I l l u m o p t I l l u m m a x I l l u m m i n ) 2
where Tempopt, Tempmin, Tempmax is the optimized room temperature, the allowed minimum and maximum room temperatures respectively, Illumopt, Illummin, Illummax is the optimized room illumination, the allowed minimum and maximum room illuminations respectively. From Equations (20) and (21), the maximum comfort is achieved when the value of CIT or CII is 1, and the minimum comfort is achieved when the value is 0.
In the experiments, we compare our proposed method that adjusts the temperature and the illumination setpoints to the existing method proposed by [2] (called as EXT), the fixed setpoint methods, i.e., the setpoint is set to the minimum comfort (called as Min-comfort), the setpoint is set to the middle comfort (called as Mid-comfort), and the setpoint is set to the maximum comfort (called as Max-comfort). The EXT [2] employs the FLC to adjust the temperature. The difference with our approach is described briefly in the following. Instead of using the required power and the outdoor temperature as the fuzzy inputs, the EXT uses the electricity price and the outdoor temperature. In this case, the electricity price has two linguistic values (PEAK, MD), whose membership functions are shown in Figure 18. As shown in the figure, the electricity price is expressed in respect to the time of use, which is adopted from [2]. While the membership function of the outdoor temperature and the temperature setpoint are the same with our proposed method. The fuzzy rules are given in Table 12.
The room temperature setpoints for Min-comfort, Mid-comfort, and Max-comfort are set to 25 °C, 22.5 °C, and 20 °C respectively. The room illumination setpoints for Min-comfort, Mid-comfort, and Max-comfort are set to 300, 400 and 500 lx, respectively. The data of solar irradiation, the outdoor temperature, the outdoor illumination, and the electrical load from 7 h to 17 h given in Table 13 are used during comparisons.
The results of the comfort index and the energy extracted from the grid for five methods (Min-comfort, Mid-comfort, Max-comfort, Proposed, EXT) are given in Table 14. It is clearly shown that the Max-comfort achieves the highest comfort index, however the energy extracted from the grid is also highest. The lowest energy extracted from the grid is achieved by the Min-comfort, however the comfort index is also lowest. The energy extracted from the grid of the EXT is the second lowest, but the comfort index is also the second lowest. Our proposed method optimizes both comfort index and energy extracted from the grid, where it achieves the comfort index of 0.7866, while the energy extracted from the grid is 21,773.06 Wh. These optimized values are better than the ones obtained by setting the setpoint to the middle value (Mid-comfort).
By comparing our proposed method with the EXT, we may examine that the since the EXT adjusts the temperature setpoint according to the time of use (the electricity price) and the outdoor temperature, and due to the fact that the electricity price only changes twice, i.e., in the morning and the afternoon (see Figure 18), the EXT fails to adjust the temperature setpoint, where the outdoor temperature fluctuates hourly. Furthermore, the FLC in the EXT tends to optimize the energy cost only as shown with the lower energy extracted from the grid. Contrary, our proposed method considers the required power to adjust the temperature setpoint. The required power is the power that should be consumed to achieve the optimal values of the energy cost and the user comfort. Thus the resulted temperature setpoint accommodates both parameters. Therefore the energy extracted from the grid and the comfort index of our proposed method is the optimal values.
Figure 19, Figure 20 and Figure 21 illustrate the comparison of temperature comfort index, the illumination comfort index in the office room, and the energy extracted from the grid of five methods. Figure 19 shows that during 8 h to 17 h, the temperature comfort indices of Min-comfort, Mid-comfort, and EXT oscillate. The oscillation is caused by the thermostat control used for controlling the AC. Meanwhile, the temperature comfort index of our proposed method varies to find the optimal value and at the same time reduces the oscillation effect of the thermostat control. The figure also shows that the comfort index of the EXT is in the middle between Mid-comfort and the Min-Comfort.
In Figure 20, the profiles of the illumination comfort index do not show the dynamic behavior compared to Figure 19 due to fact the illumination model is simple. Since the EXT does not consider the illumination comfort index, it is not shown in Figure 20. By observing Figure 19 and Figure 20, the profile of temperature comfort index of our proposed method is similar to the illumination comfort index of or proposed method. This result could be understood from the fact that both FLC controller (FLC-T and FLC-I) have similar membership functions and the fuzzy rules.
Figure 21 shows that the energy extracted from the grid of Min-comfort is always the lowest one, however since its comfort indices as shown in Figure 19 and Figure 20 are also the lowest ones, we could not adopt this method. The same results are also achieved by the EXT, where as shown in the Figure 21, the energy extracted from the grid is lower than our proposed method, however the comfort index is also lower.
It is worth noting that compared to Max-comfort and Mid-comfort, the energy profile extracted from the grid of our proposed method is lower than both methods. Therefore the effectiveness of our proposed in optimizing the comfort index and energy extracted from the grid is verified.

4. Conclusions

An embedded platform for implementing the multi agent system (MAS) in the building energy management is proposed. The proposed MAS consists of the load agent, the generator agent, and the central control agent. The genetic algorithm (GA) is implemented on the central control agent to find the optimal power required by the load agents based on the availability of the PV-battery power and the requirement of the user comforts. The proposed objective functions require a few parameters, thus the data exchange between the agents could be performed efficiently. To provide a flexible implementation in the existing building infrastructure and to integrate with the state of the art IoT technology, our testbed employs the industrial Modbus protocol and the MQTT protocol, which are implemented on the low cost embedded platform. In the experiments, the execution time, the communication protocols and the sampling time of the embedded testbed are evaluated. The experiments results show that our proposed testbed is able to maximize the temperature and illumination comforts while minimizing the energy in a real-time manner. Further, the effectiveness of the optimization technique to optimize the energy cost and the user comfort of the building is verified.
In future, the testbed system will be extended to cope with the complex building energy management by employing the complex models and advanced optimization algorithms. Further, the electrical system will be considered in the tested.

Author Contributions

A.S. proposed and implemented the whole system and wrote the paper; Y.I.N. shared the idea about the electrical system; C.S. shared the idea about the energy management.

Funding

This work was supported by the Research Grant, Excellent Basic Research on Higher Institution scheme from the Directorate General of Higher Education, Ministry of Research and Technology and Higher Education, Republic of Indonesia (No.: 079/SP2H/LT/MONO/L7/2019).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Gubba, S.R.; Li, W.T.; Tushar, W.; Yuen, C.; Hassan, N.U.; Wood, K.; Wen, C.K.; Poor, H.V. Energy management by controlling air conditioning systems in residential settings. In Proceedings of the IEEE Workshop on Environmental, Energy, and Structural Monitoring Systems, Bari, Italy, 13–14 June 2016. [Google Scholar] [CrossRef]
  2. Javaid, S.; Javaid, N.; Iqbal, S.; Guizani, M.; Al-Mogren, A.; Alamri, A. Energy management with a world-wide adaptive thermostat using fuzzy inference system. IEEE Access 2018, 6, 33489–33502. [Google Scholar] [CrossRef]
  3. Graditi, G.; Ippolito, M.G.; Lamedica, R.; Piccolo, A.; Ruvio, A.; Santini, E.; Siano, P.; Zizzo, G. Innovative control logics for a rational utilization of electric loads and air-conditioning systems in a residential building. Energy Build. 2015, 102, 1–17. [Google Scholar] [CrossRef]
  4. Hernandez, J.L.; Sanz, R.; Corredera, A.; Palomar, R.; Lacave, I. A fuzzy-based building energy management system for energy efficiency. Buildings 2018, 8, 14. [Google Scholar] [CrossRef]
  5. Ferlito, S.; Atrigna, M.; Graditi, G.; De Vito, S.; Salvato, M.; Buonanno, A.; Di Francia, G. Predictive models for building’s energy consumption: An artificial neural network (ANN) approach. In Proceedings of the XVIII AISEM Annual Conference, Trento, Italy, 3–5 February 2015; pp. 1–4. [Google Scholar] [CrossRef]
  6. Garrab, A.; Bouallegue, A.; Bouallegue, R. An agent based fuzzy control for smart home energy management in smart grid environment. Int. J. Renew. Energy Res. 2017, 7, 599–612. [Google Scholar]
  7. Li, W.; Logenthiran, T.; Woo, W.L. Intelligent multi-agent system for smart home energy management. In Proceedings of the 2015 IEEE Innovative Smart Grid Technologies—Asia (ISGT ASIA), Bangkok, Thailand, 3–6 November 2015; pp. 1–6. [Google Scholar] [CrossRef]
  8. Asare-Bediako, B.; Kling, W.L.; Ribeiro, P.F. Multi-agent system architecture for smart home energy management and optimization. In Proceedings of the IEEE PES ISGT Europe 2013, Lyngby, Denmark, 6–9 October 2013; pp. 1–5. [Google Scholar] [CrossRef]
  9. Sharma, S.; Panigrahi, B.K.; Verma, A. A smarter method for self-sustainable buildings: Using multiagent systems as an effective alternative for managing energy operations. IEEE Trans. Consum. Electron. Mag. 2018, 7, 32–41. [Google Scholar] [CrossRef]
  10. Zhao, P.; Suryanarayanan, S.; Simoes, M.G. An energy management system for building structures using a multi-agent decision-making control methodology. IEEE Trans. Ind. Appl. 2013, 49, 322–330. [Google Scholar] [CrossRef]
  11. Mets, K.; Strobbe, M.; Verschueren, T.; Roelens, T.; De Turck, F.; Develder, C. Distributed multi-agent algorithm for residential energy management in smart grids. In Proceedings of the 2012 IEEE Network Operations and Management Symposium, Maui, HI, USA, 16–20 April 2012; pp. 435–443. [Google Scholar] [CrossRef]
  12. Smitha, S.D.; Chacko, F.M. Intelligent energy management in smart and sustainable buildings with multi-agent control system. In Proceedings of the 2013 International Mutli-Conference on Automation, Computing, Communication, Control and Compressed Sensing (iMac4s), Kottayam, India, 22–23 March 2013; pp. 190–195. [Google Scholar] [CrossRef]
  13. Hurtado, L.A.; Nguyen, P.H.; Kling, W.L.; Zeiler, W. Building energy management systems - optimization of comfort and energy use. In Proceedings of the 2013 48th International Universities’ Power Engineering Conference (UPEC), Dublin, Ireland, 2–5 September 2013; pp. 1–6. [Google Scholar] [CrossRef]
  14. Wang, Z.; Wang, L.; Dounis, A.I.; Yang, R. Multi-agent control system with information fusion based comfort model for smart buildings. Appl. Energy 2012, 99, 247–254. [Google Scholar] [CrossRef]
  15. Wang, S.; Zhang, G.; Shen, B.; Xie, X. An Integrated Scheme for cyber-physical building energy management system. Procedia Eng. 2011, 15, 3616–3620. [Google Scholar] [CrossRef]
  16. Wang, Z.; Yang, R.; Wang, L. Multi-agent intelligent controller design for smart and sustainable buildings. In Proceedings of the 2010 IEEE International Systems Conference, San Diego, CA, USA, 5–8 April 2010; pp. 277–282. [Google Scholar] [CrossRef]
  17. Shaikh, P.H.; Nor, N.B.M.; Nallagownden, P.; Elamvazuthi, I. Intelligent multi-objective optimization for building energy and comfort management. J. King Saud Univ. Eng. Sci. 2018, 30, 195–204. [Google Scholar] [CrossRef] [Green Version]
  18. Shaikh, P.H.; Nor, N.B.M.; Nallagownden, P.; Elamvazuthi, I. Optimized intelligent control system for indoor thermal comfort and energy management of buildings. In Proceedings of the 2014 5th International Conference on Intelligent and Advanced Systems (ICIAS), Kuala Lumpur, Malaysia, 3–5 June 2014; pp. 1–5. [Google Scholar] [CrossRef]
  19. Wang, N.; Fang, F.; Feng, M. Multi-objective optimal analysis of comfort and energy management for intelligent buildings. In Proceedings of the 26th Chinese Control and Decision Conference (2014 CCDC), Changsha, China, 31 May–2 June 2014; pp. 2783–2788. [Google Scholar] [CrossRef]
  20. Anvari-Moghaddam, A.; Rahimi-Kian, A.; Mirian, M.S.; Guerrero, J.M. A multi-agent based energy management solution for integrated buildings and microgrid system. Appl. Energy 2017, 203, 41–56. [Google Scholar] [CrossRef] [Green Version]
  21. Kan, E.M.; Kan, S.L.; Soh, Y.; Zi, D.; Yadanar, K. Multi-agent control system with intelligent optimisation for building energy and comfort management. Int. J. Autom. Logist. 2016, 2, 60–77. [Google Scholar] [CrossRef]
  22. Al-Daraiseh, A.; El-Qawasmeh, E.; Shah, N. Multi-agent system for energy consumption optimisation in higher education institutions. J. Comput. Syst. Sci. 2015, 81, 958–965. [Google Scholar] [CrossRef]
  23. Stavropoulos, T.G.; Rigas, E.S.; Kontopoulos, E.; Bassiliades, N.; Vlahavas, I. A Multi-agent coordination framework for smart building energy management. In Proceedings of the 25th International Workshop on Database and Expert Systems Applications, Munich, Germany, 1–5 September 2014; pp. 126–130. [Google Scholar] [CrossRef]
  24. Sanchez-Squella, A.; Ortega, R.; Grino, R.; Malo, S. Dynamic Energy Router. IEEE Control Syst. Mag. 2010, 30, 72–80. [Google Scholar] [CrossRef]
  25. Geidl, M.; Koeppel, G.; Favre-Perrod, P.; Klockl, B.; Andersson, G.; Frohlich, K. Energy hubs for the future. IEEE Power Energy Mag. 2007, 5, 24–30. [Google Scholar] [CrossRef]
  26. Carli, R.; Dotoli, M. Decentralized control for residential energy nanagement of a smart users’ microgrid with renewable energy exchange. IEEE/CAA J. Autom. Sin. 2019, 6, 641–656. [Google Scholar] [CrossRef]
  27. AlSkaif, T.; Zapata, M.G.; Bellalta, B.; Nilsson, A. A distributed power sharing framework among households in microgrids: A repeated game approach. Computing 2017, 99, 23–37. [Google Scholar] [CrossRef]
  28. Barbato, A.; Capone, A. Optimization models and methods for demand-side management of residential users: A survey. Energies 2014, 7, 5787–5824. [Google Scholar] [CrossRef]
  29. Esther, B.P.; Kumar, K.S. A survey on residential demand side management architecture, approaches, optimization models and methods. Renew. Sustain. Energy Rev. 2016, 59, 342–351. [Google Scholar] [CrossRef]
  30. EnergyPlus. Available online: https://energyplus.net/ (accessed on 22 July 2019).
  31. Fourer, R.; Gay, D.M.; Kernighan, B.W. AMPL—A Modeling Language for Mathematical Programming, 2nd ed.; Duxbury Press/Brooks/Cole Publishing Company: Pacific Grove, CA, USA, 2003. [Google Scholar]
  32. Mets, K.; Verschueren, T.; Develder, C.; Vandoorn, T.; Vandevelde, L. Integrated simulation of power and communication networks for smart grid applications. In Proceedings of the 2011 IEEE 16th International Workshop on Computer Aided Modeling and Design of Communication Links and Networks (CAMAD), Kyoto, Japan, 10–11 June 2011; pp. 61–65. [Google Scholar] [CrossRef]
  33. Tushar, W.; Yuen, C.; Chai, B.; Huang, S.; Wood, K.L.; Kerk, S.G.; Yang, Z. Smart grid testbed for demand focused energy management in end user environments. Wirel. Commun. 2016, 23, 70–80. [Google Scholar] [CrossRef]
  34. Rotger-Griful, S.; Welling, U.; Jacobsen, R.H. Implementation of a building energy management system for residential demand response. Microprocess. Microsyst. 2017, 55, 100–110. [Google Scholar] [CrossRef]
  35. Naito, K.; Mori, K.; Kobayashi, H. Testbed implementation of cloud based energy management system with ZigBee sensor networks. In Proceedings of the International Multi-Conference on Engineering and Technological Innovation, Orlando, FL, USA, 9–13 July 2013. [Google Scholar]
  36. Zigbee Alliance. Available online: https://zigbee.org/ (accessed on 3 August 2019).
  37. Raspberry Pi 3 Model B. Available online: https://www.raspberrypi.org/products/raspberry-pi-3-model-b/ (accessed on 27 July 2019).
  38. An Arduino UNO Compatible WIFI Board Based on ESP8266EX. Available online: https://wiki.wemos.cc/products:d1:d1 (accessed on 27 July 2019).
  39. Modbus Protocol. Available online: http://www.modbus.org/specs.php (accessed on 27 July 2019).
  40. MQTT. Available online: http://mqtt.org/ (accessed on 27 July 2019).
  41. Lightweight M2M (LWM2M). Available online: https://www.omaspecworks.org/what-is-oma-specworks/iot/lightweight-m2m-lwm2m/ (accessed on 3 August 2019).
  42. Calvillo, C.F.; Sánchez-Miralles, A.; Villar, J. Energy management and planning in smart cities. Renew. Sustain. Energy Rev. 2016, 55, 273–287. [Google Scholar] [CrossRef]
  43. Carli, R.; Dotoli, M.; Pellegrino, R. A hierarchical decision-making strategy for the energy management of smart cities. IEEE Trans. Autom. Sci. Eng. 2017, 14, 505–523. [Google Scholar] [CrossRef]
  44. Blaauwbroek, N.; Nguyen, P.H.; Konsman, M.J.; Shi, H.; Kamphuis, R.; Kling, W.K. Decentralized resource allocation and load scheduling for multicommodity smart energy systems. IEEE Trans. Sustain. Energy 2015, 6, 1506–1514. [Google Scholar] [CrossRef]
  45. Carli, R.; Dotoli, M. A decentralized resource allocation approach for sharing renewable energy among interconnected smart homes. In Proceedings of the 54th IEEE Conference on Decision and Control (CDC), Osaka, Japan, 15–18 December 2015; pp. 5903–5908. [Google Scholar] [CrossRef]
  46. Brusco, G.; Burgio, A.; Menniti, D.; Pinnarelli, A.; Sorrentino, N. Energy management system for an energy district with demand response availability. IEEE Trans. Smart Grid 2014, 5, 2385–2393. [Google Scholar] [CrossRef]
  47. Carli, R.; Dotoli, M. Cooperative distributed control for the energy scheduling of smart homes with shared energy storage and renewable energy source. IFAC-PapersOnLine 2017, 50, 8867–8872. [Google Scholar] [CrossRef]
  48. Carli, R.; Dotoli, M. Energy scheduling of a smart home under nonlinear pricing. In Proceedings of the 53rd IEEE Conference on Decision and Control, Los Angeles, CA, USA, 15–17 December 2014; pp. 5648–5653. [Google Scholar] [CrossRef]
  49. Figueiredo, J.; Costa, J.S.D. A SCADA system for energy management in intelligent buildings. Energy Build. 2012, 49, 85–98. [Google Scholar] [CrossRef] [Green Version]
  50. Deb, K.; Pratap, A.; Agarwal, S.; Meyarivan, T. A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Trans. Evol. Comput. 2002, 6, 182–197. [Google Scholar] [CrossRef] [Green Version]
  51. Thermal Model of a House. Available online: https://fr.mathworks.com/help/simulink/slref/ thermal-model-of-a-house.html (accessed on 27 July 2019).
  52. SPM91 Single Phase Din-Rail Energy Meter. Available online: http://en.pmac.com.cn/product.php?id=44 (accessed on 27 July 2019).
  53. Modbus LCD Thermostat. Available online: http://www.neptronic.com/Controls/PDF/STDL24.pdf (accessed on 27 July 2019).
  54. Modbus Occupancy & Daylight Sensor. Available online: http://www.irtec.com/en-irt/upload_files/ 058-51002-002_IM,MRB-510.pdf (accessed on 27 July 2019).
  55. OPTO 22 Network LED Dimmer User’s Guide. Available online: http://documents.opto22.com/ 2038_Opto_22_Network_LED_Dimmer_Users_Guide.pdf (accessed on 27 July 2019).
  56. Outdoor Multi-Sensor. Available online: https://sensormatica.ru/files/catalog/datchiki/thermokon/ datasheet-li65-plus-rs485-modbus-thermokon.pdf (accessed on 27 July 2019).
  57. PV Array Simulink Block. Available online: https://fr.mathworks.com/matlabcentral/fileexchange/ 30326-pv-array-simulink-block (accessed on 27 July 2019).
  58. Fleischer, C.; Waag, W.; Bai, Z.; Sauer, D.U. Adaptive on-line state of available power prediction of lithium-ion batteries. J. Power Electron. 2013, 13, 516–527. [Google Scholar] [CrossRef]
  59. Modbus Map: Grid Tie Device. Available online: http://solar.schneider-electric.com/wp-content/ uploads/2014/05/503-0250-01-01_RevA.1_Modbus_Map_GridTie_Device.pdf (accessed on 27 July 2019).
  60. ModBus Register Address List. Available online: http://www.solar-elektro.cz/data/dokumenty/ 1733_modbus_protocol.pdf (accessed on 27 July 2019).
  61. Morris, M. Factorial Sampling Plans for Preliminary Computational Experiments. Technometrics 1991, 33, 161–174. [Google Scholar] [CrossRef]
  62. Cukier, R.I.; Fortuin, C.M.; Shuler, K.E.; Petschek, A.G.; Schaibly, J.H. Study of the sensitivity of coupled reaction systems to uncertainties in rate coefficients. I Theory. J. Chem. Phys. 1973, 59, 3873–3878. [Google Scholar] [CrossRef]
  63. Pianosi, F.; Sarrazin, F.; Wagener, T. A Matlab toolbox for global sensitivity analysis. Environ. Model. Softw. 2015, 70, 80–85. [Google Scholar] [CrossRef]
  64. Ullah, I.; Kim, D. An Improved Optimization Function for Maximizing User Comfort with Minimum Energy Consumption in Smart Homes. Energies 2017, 10, 1818. [Google Scholar] [CrossRef]
Figure 1. Architecture of the proposed system.
Figure 1. Architecture of the proposed system.
Energies 12 03655 g001
Figure 2. Input and output data of central control agent.
Figure 2. Input and output data of central control agent.
Energies 12 03655 g002
Figure 3. Input and output data of the load agent.
Figure 3. Input and output data of the load agent.
Energies 12 03655 g003
Figure 4. Membership functions of FLC-T: (a) Required power; (b) Outdoor temperature; (c) Room temperature setpoint.
Figure 4. Membership functions of FLC-T: (a) Required power; (b) Outdoor temperature; (c) Room temperature setpoint.
Energies 12 03655 g004
Figure 5. Membership functions of FLC-I: (a) Required power; (b) Outdoor illumination; (c) Room illumination setpoint.
Figure 5. Membership functions of FLC-I: (a) Required power; (b) Outdoor illumination; (c) Room illumination setpoint.
Energies 12 03655 g005aEnergies 12 03655 g005b
Figure 6. Input and output data of the generator agent.
Figure 6. Input and output data of the generator agent.
Energies 12 03655 g006
Figure 7. Block diagram of the AC simulator.
Figure 7. Block diagram of the AC simulator.
Energies 12 03655 g007
Figure 8. Block diagram of lighting simulator.
Figure 8. Block diagram of lighting simulator.
Energies 12 03655 g008
Figure 9. Block diagram of the electrical load simulator.
Figure 9. Block diagram of the electrical load simulator.
Energies 12 03655 g009
Figure 10. Block diagram of the PV-battery simulator.
Figure 10. Block diagram of the PV-battery simulator.
Energies 12 03655 g010
Figure 11. MQTT protocol configuration.
Figure 11. MQTT protocol configuration.
Energies 12 03655 g011
Figure 12. Profile of temperatures and power consumption of the AC simulator.
Figure 12. Profile of temperatures and power consumption of the AC simulator.
Energies 12 03655 g012
Figure 13. Profile of illumination and power consumption of the lighting simulator.
Figure 13. Profile of illumination and power consumption of the lighting simulator.
Energies 12 03655 g013
Figure 14. Mean and standard deviation of EEs of FLC inputs: (a) Normalized required power and outdoor temperature of FLC-T; (b) Normalized required power and outdoor illumination of FLC-I.
Figure 14. Mean and standard deviation of EEs of FLC inputs: (a) Normalized required power and outdoor temperature of FLC-T; (b) Normalized required power and outdoor illumination of FLC-I.
Energies 12 03655 g014
Figure 15. Sensitivity index of FLC inputs: (a) Normalized required power and outdoor temperature of FLC-T; (b) Normalized required power and outdoor illumination of FLC-I.
Figure 15. Sensitivity index of FLC inputs: (a) Normalized required power and outdoor temperature of FLC-T; (b) Normalized required power and outdoor illumination of FLC-I.
Energies 12 03655 g015
Figure 16. Sampling time of the load agent in the classroom.
Figure 16. Sampling time of the load agent in the classroom.
Energies 12 03655 g016
Figure 17. Sampling time of the load agent in the office room.
Figure 17. Sampling time of the load agent in the office room.
Energies 12 03655 g017
Figure 18. Membership function of electricity price in the EXT.
Figure 18. Membership function of electricity price in the EXT.
Energies 12 03655 g018
Figure 19. Temperature comfort index in the office room.
Figure 19. Temperature comfort index in the office room.
Energies 12 03655 g019
Figure 20. Illumination comfort index in the office room.
Figure 20. Illumination comfort index in the office room.
Energies 12 03655 g020
Figure 21. Energy extracted from the grid.
Figure 21. Energy extracted from the grid.
Energies 12 03655 g021
Table 1. Typical agents of MAS in BEMS.
Table 1. Typical agents of MAS in BEMS.
ReferenceLoad AgentGenerator AgentCentral AgentOther Agent
[9]Load agentGenerator agent-Storage agent
[10]Heating agent, Cooling agentElectricity agent--
[11]Consumption agent, Load shifting agent Production agentAggregation agentStorage agent
[12]Local control agent, Load agentSwitch agentCentral coordinator agent-
[13]Local zone agents, Zone agentOn-site generation agentBuilding agent-
[14]--Control agents, Data processing agentSensing agents, Prediction agent
[15]--Room agentPersonal agent, Environment agent
[16]Local controller-agent, Local agentSwitch agentCentral coordinator-agent-
[17]Load agent-Central agent-
[18]Peripheral coordinator agents-Master coordinator agent-
[19]Local agent-Central agent-
[20]Local agents, Load agents---
[21]-Renewable energy agentCentral coordinator agent, Building management agentBattery bank agent, Service agent
[22]Local controller agents-Central coordinator agent-
[23]Room agents-Coordinator agent-
Table 2. Classification of MAS implementation in BEMS.
Table 2. Classification of MAS implementation in BEMS.
ReferenceOptimization ObjectiveOptimization TechniqueImplementation Platform
Single ObjectiveMulti ObjectiveConventionalAISimulationHardware
[10]Energy cost-Sequential quadratic programming-EnergyPlus [30], AMPL [31]-
[11]Energy cost-ND *-Smart Grid Simulator [32]-
[12]Energy cost--Genetic algorithmMatlab
Simulink
-
[13]Energy cost-ND *-Matlab
Simulink
-
[14]Energy cost--Fuzzy logic-Hardware
[15]Energy cost-ND *--Hardware
[16]Comfort--Particle Swarm OptimizationND *-
[17]Comfort-Incremental function-Matlab
Simulink
-
[18]-Comfort and Energy cost-Genetic algorithmMatlab
Simulink
-
[19]-Comfort and Energy cost-Genetic algorithmND *-
[20]-Comfort and Energy cost-Genetic algorithmND *-
[21]-Comfort and Energy costMixed-integer programing-Java, Matlab, Gams-
[22]-Comfort and Energy cost-Evolutionary algorithmND *-
[23]-Comfort and Energy costDefeasible logics--Hardware
* ND = Not defined clearly in the paper.
Table 3. Description of variables in the proposed MAS-based BEMS.
Table 3. Description of variables in the proposed MAS-based BEMS.
Variable NameAbbreviationUnitType
Power consumption of the classroomp1WReal
Power consumption of the office roomp2WReal
Power consumption of the laboratory roomp3WReal
Minimum power consumptions of the classroomp1minWInteger
Minimum power consumption of the office roomp2minWInteger
Minimum power consumption of the laboratory roomp3minWInteger
Maximum power consumptions of the classroomp1maxWInteger
Maximum power consumption of the office roomp2maxWInteger
Maximum power consumption of the laboratory roomp3maxWInteger
PV powerpPVWInteger
Battery powerpBatWReal
Maximum power that could be supplied by the utility gridPGridmaxWInteger
Power required by the classroom WReal
Power required by the office room WReal
Power required by the laboratory room WReal
Power supplied by the utility grid WReal
Outdoor temperatureOutttemp°CReal
Room temperatureRtemp°CReal
Temperature setpoint °CReal
Cold air flow from the cooler into the roomQdotJ/hReal
Temperature of cold air from the coolerTAC°CReal
Air mass flow rate through the coolerMdotkg/hReal
Thermal capacity of air at constant pressurecJ/kg KReal
Mass of air inside the roomMairkgReal
Equivalent thermal resistance of the roomReqK/WReal
AC powerPowerACWReal
A power constantCpower Real
Sampling timeΔtsInteger
Outdoor illumination lxInteger
Room illumination lxInteger
Illumination setpoint %Integer
Lighting powerPowerLightWReal
Luminous fluxφlmReal
Luminous efficacyηlm/WReal
Load power WReal
Number of PV cell in seriesNS Integer
Number of PV cell in parallelNp Integer
Solar irradiationirradW/m2Integer
Output current of the PVioutAReal
PV voltageVPVVReal
State of the charge SOC%Real
Charging/discharging currentIchgAReal
Capacity of batteryCBatAhInteger
Table 4. Fuzzy rules of FLC-T.
Table 4. Fuzzy rules of FLC-T.
Outdoor Temperature
LOWMEDHIGH
Required PowerLOWLOWMEDHIGH
MEDMEDMEDMED
HIGHLOWLOWLOW
Table 5. Fuzzy rules of FLC-I.
Table 5. Fuzzy rules of FLC-I.
Outdoor Illumination
LOWMEDHIGH
Required PowerLOWLOWMEDHIGH
MEDMEDMEDMED
HIGHHIGHHIGHHIGH
Table 6. Modbus data of the AC simulator.
Table 6. Modbus data of the AC simulator.
IP AddressRegister AddressModbus CommandVariableFactor (Unit)Device (Manufacturer Name)
192.168.3.206H03HAC power (LOW)× 0.1 WPower meter (Pilot meter SPM91 [52])
07HAC power (HIGH)
04H03HRoom temperature× 0.01 °CThermostat (Neptronic Modbus Thermostat [53])
05H06HTemperature setpoint× 0.1 °C
0CH03HOutdoor temperature× 0.01 °C
Table 7. Modbus data of lighting simulator.
Table 7. Modbus data of lighting simulator.
IP AddressRegister AddressModbus CommandVariableFactor (Unit)Device (Manufacturer Name)
192.168.3.306H03HLighting power (LOW)× 0.1 WPower meter (Pilot meter SPM91 [52])
07HLighting power (HIGH)
08H03HRoom illumination× 1.0 lxDaylight sensor (TRANS-MRB-510 series [54])
10H06HRoom illumination setpoint× 1.0 (% LED brightness)LED Dimmer (OPTO 22 NETWORK LED DIMMER [55])
3CH03HOutdoor illumination (LOW)× 1.0 lxOutdoor light sensor (Li65 + RS485 Modbus Thermokon [56])
3DHOutdoor illumination (HIGH)
Table 8. Modbus data of the electrical load simulator.
Table 8. Modbus data of the electrical load simulator.
IP AddressRegister AddressModbus CommandVariableFactor (Unit)Device (Manufacturer Name)
192.168.3.406H03HElectrical load power (LOW)× 0.1 WPower meter (Pilot meter SPM91 [52])
07HElectrical load power (HIGH)
Table 9. Modbus data of the PV-battery simulator.
Table 9. Modbus data of the PV-battery simulator.
IP AddressRegister AddressModbus CommandVariableFactor (Unit)Device (Manufacturer Name)
192.168.5.2004CH03HPV power (LOW)× 1 WGridtie inverter (Schneider Gridtie device [59])
004DHPV power (HIGH)
310EH04HBattery power (LOW)× 0.01 WBattery charger controller (EPEVER Battery Charger [60])
310FHBattery power (HIGH)
311AH04HSOC× 0.01%
00H05HCharging on/off1 = on, 0 = off
02HDischarging on/off1 = on, 0 = off
Table 10. Published and subscribed topics by the agents.
Table 10. Published and subscribed topics by the agents.
Agent NameTopicRemark
PublishSubscribe
Load Agent (Classroom)1. Classroom-Power C2CC
2. Min-Classroom-Power
3. Max-Classroom-Power
1. Classroom-Required-PowerCC2C
Load Agent (Office room)1. Office-Power O2CC
2. Min-Office-Power
3. Max-Office -Power
1. Office-Required-PowerCC2O
Load Agent (Laboratory room)1. Laboratory-Power L2CC
2. Min-Laboratory-Power
3. Max-Laboratory-Power
1. Laboratory-Required-PowerCC2L
Generator Agent1. PV-Power G2CC
2. Battery-Power
1. Grid-Required-PowerCC2G
Central Control Agent1. Classroom-Required-Power CC2A
2. Office-Required-Power
3. Laboratory-Required-Power
4. Grid-Required-Power
1. Classroom-PowerA2CC
2. Min-Classroom-Power
3. Max-Classroom-Power
4. Office-Power
5. Min-Office-Power
6. Max-Office-Power
7. Laboratory-Power
8. Min- Laboratory -Power
9. Max- Laboratory -Power
10. PV-Power
11. Battery-Power
Table 11. Execution time and sampling time.
Table 11. Execution time and sampling time.
LocationParameterAverage Value
ClassroomExecution time of FLC-T12.13 ms
Execution time of FLC-I12.02 ms
Sampling time of Load Agent6.59 s
Office roomExecution time of FLC-T11.01 ms
Execution time of FLC-I10.99 ms
Sampling time of Load Agent1.25 s
Laboratory roomExecution time of FLC-T12.10 ms
Execution time of FLC-I12.01 ms
Sampling time of Load Agent1.25 s
Generator AgentSampling time of Generator Agent2.63 s
Central Control AgentExecution time of GA14.25 s
Sampling time of Central Control Agent16.60 s
Table 12. Fuzzy rules of EXT.
Table 12. Fuzzy rules of EXT.
Outdoor Illumination
LOWMEDHIGH
Electricity PricePEAKHIGHHIGHHIGH
MDLOWMEDHIGH
Table 13. Data inputs used in the experiments.
Table 13. Data inputs used in the experiments.
Time (Hour)Solar Irradiation (W/m2)Electrical Load Power (W)Outdoor Temperature (°C)Outdoor Illumination (lx)
ClassroomOffice RoomLaboratory
74000.00.00.025.55000
8500350.0400.02000.025.55000
9700350.0400.02000.025.55000
10900350.0400.02000.027.05000
111000350.0400.02000.027.010,000
128000.0400.02000.029.010,000
13500350.0400.02000.030.010,000
14300350.0400.02000.030.01000
150350.0400.02000.028.01000
160350.0400.02000.027.01000
1700.00.02000.027.00
Table 14. Comfort index and energy extracted from grid.
Table 14. Comfort index and energy extracted from grid.
ParameterMin-ComfortMid-ComfortMax-ComfortEXTProposed
ClassroomCIT0.09610.73250.74090.31440.7376
CII00.750010.77800.7780
Laboratory room CIT0.17200.72460.73400.37140.7279
CII00.750010.82400.8240
Office roomCIT0.16300.76380.94800.36140.8288
CII00.750010.82300.8230
Average CIT0.14370.74030.80760.34910.7648
Average CII00.750010.80830.8083
Average Comfort index0.07190.74520.90380.57870.7866
Energy extracted from grid (Wh)15,664.6022,988.0923,130.3419,964.8421,773.06

Share and Cite

MDPI and ACS Style

Soetedjo, A.; Nakhoda, Y.I.; Saleh, C. An Embedded Platform for Testbed Implementation of Multi-Agent System in Building Energy Management System. Energies 2019, 12, 3655. https://doi.org/10.3390/en12193655

AMA Style

Soetedjo A, Nakhoda YI, Saleh C. An Embedded Platform for Testbed Implementation of Multi-Agent System in Building Energy Management System. Energies. 2019; 12(19):3655. https://doi.org/10.3390/en12193655

Chicago/Turabian Style

Soetedjo, Aryuanto, Yusuf Ismail Nakhoda, and Choirul Saleh. 2019. "An Embedded Platform for Testbed Implementation of Multi-Agent System in Building Energy Management System" Energies 12, no. 19: 3655. https://doi.org/10.3390/en12193655

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop