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.