Home Energy Management System Concepts, Configurations, and Technologies for the Smart Grid

Home energy management systems (HEMSs) help manage electricity demand to optimize energy consumption and distributed renewable energy generation without compromising consumers’ comfort. HEMSs operate according to multiple criteria, including energy cost, weather conditions, load profiles, and consumer comfort. They play an increasingly ubiquitous role in energy efficiency through the reduction of electricity consumption within residential and commercial smart grids. This paper presents a comprehensive review of the HEMS literature with reference to main concepts, configurations, and enabling technologies. In doing so, it also provides a summary of HEMS computing trends and popular communication technologies for demand response applications. The ensuing survey offers the reader with an overall overview of current and future trends in HEMS solutions and technologies.


I. INTRODUCTION
Smart homes have become essential components of the smart grid in many countries due to their considerable environmental and socioeconomic benefits. By enabling the scheduling of home appliances according to demand response programs enacted by energy providers, smart homes help users optimize energy consumption to reduce costs and enhance the reliability and effectiveness of the power grid. Smart homes also play an essential role in reducing the generation, transmission and distribution investments needed to meet future electricity demands by promoting distributed energy generation [1].
Smart homes have emerged as the convergence of cuttingedge information and communication technologies, such as smart sensors, advanced metering infrastructures, intelligent home appliances, and the Internet-of-Things (IoT) devices. This growing trend has enabled the deployment of Home Energy Management Systems (HEMSs) to pave the way towards the smart grids of the future.
Over the past few years, HEMSs have gained global acceptance and become essential in managing electricity demand The associate editor coordinating the review of this manuscript and approving it for publication was Miltiadis Lytras . effectively within the smart grid. A growing body of HEMS research worldwide aims at improving energy efficiency and security and reducing electricity cost in residential and commercial power systems. These studies indicate that HEMSs still face many challenges relative to control and communication technologies, which are crucial components of HEMSs. Some of the more persisting issues concern the integration of power electronic converters, renewable energy, and energy storage into HEMSs. Current HEMS research focuses more on theoretical design and less on implementation and operational issues. This is an imbalance that needs to be addressed as the real-world application of HEMSs is critical in validating HEMS design and addressing deployment issues.
The successful deployment of HEMSs relies on the convergence of sensing, communication, and control technologies, which enable access to energy demand data and dispatch of control strategies through the network in a timely fashion. Communication networks in smart grid applications can be classified according to scale of coverage: Home Area Networks (HANs), Neighborhood Area Networks (NANs), and Wide Area Networks (WANs) [2]. A typical HAN includes a smart electricity meter that interconnects several home devices, sensors, displays, gas and water meters, renewable energy sources, and electric vehicles. All these components VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ are managed by a HEMS that monitors and controls the consumption, storage, and generation of power [3], [4]. The HAN's central controller is connected to the utility grid through the its smart meter. Information from multiple HANs is aggregated and stored in a database, which in turn forms the NAN or WAN depending of coverage scope. The aggregated data from multiple NANs/WANs are delivered to the utility administrator to help him/her decide on several system parameters, including price, expected load, etc. The communication technologies suitable for HANs are divided into two categories according to the medium of communication [5]. Wired media such as Ethernet and Power Line Communication (PLC) constitute the first category of technologies, and the second includes wireless media such as Wi-Fi, wireless cellular networks, and low-rate wireless personal area networks operated according to IEEE 802.15.4 standard. PLC has generated added interest because of its lower costs and easier deployment. For example, the Home Plug Alliance has been supporting and extending the use of PLC through the provision of standards to make PLC viable for smart grid applications. The use of PLC has also been proposed for indoor power networks [6], and as the communication backbone in energy management systems [7], [8].
All HAN communication technologies have relative advantages and disadvantages. For example, PLC provides a level of security that is as high as that delivered by the Ethernet [2] in connecting users with utility companies, at costs that are as low as those of wireless solutions. However, it offers lower transmission rates when compared to other solutions due to the use of AC electric power lines to relay information between the HAN's devices and energy management controller. The best PLC data transmission rate is between 4 and 10 Mbps, while at comparable deployment costs, wireless solutions offer higher connectivity. Another drawback of PLC is data transmission quality due to noise issues. Ethernet provides the best solution in terms of security, robustness, and connectivity. However, it has significantly higher costs and it presents logistic challenges when new cables need to be installed.
In addition to communication technologies, the integration of energy storage systems (ESSs), hybrid renewables, and power electronic devices into smart homes is crucial for the operational deployment of HEMSs. ESSs play a significant role in managing renewable energy sources. In combination with power electronics, ESSs ensure the stabilization of intermittent power generation to offer improved power quality and efficient energy use through demand response. ESS technologies currently in use include flow and leadacid batteries, chemical energy storages, and ultra-capacitors [9], [10]. Since renewable energy sources (RESs) such as wind and solar energy are subject to variability due to weather conditions, it is necessary to find ways to reconcile energy supply and demand whenever imbalances arise. RES volatility can be balanced through smart battery charging and discharging schemes that ensure power stability and reliability.
At peak-load times, RESs would be in full swing to power smart homes, while ESSs can be engaged at any time to redress demand-supply imbalances and enhance the resilience of the power grid [11], [12].
Since the variability of different RESs often derives from complementary weather conditions, a stable and reliable power supply cannot be provided by a single RES [13]. One solution is to use hybrid RES systems that help deliver continuous power supply and mitigate the undesirable effects of RES variability through the integration of diverse RESs [11]. Hybrid RES systems for smart homes can be developed through the integration of various RESs, such as photovoltaic (PV), wind, biomass, hydropower, etc. [14].
The generation of electrical power from RES is carried out through energy conversion systems that use power electronic devices to enable the conversion process, and help establish the optimal dispatch of the energy produced (e.g., immediate use or storage) [15]. In residential energy generation systems, electronic power converters have been widely adopted to manage rooftop solar and small wind power systems, which can be combined to maximize power extraction under all conditions (i.e., maximum power point tracking) [16]. These power converters need to be calibrated with reference to their intended use context (e.g., building type, RES, and ESS integration) to achieve an optimal configuration [17], [18].
The development of hybrid RES systems and their integration with ESSs requires the reconciliation of different power supply systems and voltage levels. For example, the output of PV systems is in DC voltage and is usually converted into single-or three-phase AC voltage, whereas the output of wind turbines is in AC voltage with variable magnitude and frequency. A typical battery ESS goes through an initial DC/DC conversion step to deliver a given voltage level from several cells in series to the DC-link from where the final AC output voltage is generated through a DC/AC conversion step [19].
The energy-mix used to produce electricity can differ greatly and involve diverse sources in varying quantities from country to country. For example, Germany generates approximately 30% of its energy from renewables. In the U.S, according to the EIA [20], about 60% of the electricity is produced using fossil fuels. While efforts are being made to increase the share of green technologies in power generation, it is understood that fossil fuels will still play a significant role in the short to medium term. In order to minimize the use of fossil fuel for energy generation, it is therefore essential to manage the existing energy resources efficiently to reduce energy demand. The increasing use of electric vehicles and demand-side management solutions in the areas of demand response and HEMSs all contribute to more efficient use of energy.
In the last few years, traditional power grids have progressively moved towards a more intelligent and reliable mode of operation. The new ''smart'' grid paradigm enables a two-way communication between utilities and consumers through advanced metering infrastructures in neighborhood and wide area networks. This new mode of operation supports the monitoring and control of distributed generation and energy storage systems across the power grid ecosystem.
The smart grid capitalizes on power monitoring and control technologies such as HEMSs to improve its productivity in quality and capacity. In enabling the automated optimization of home appliance use, HEMSs offer significant energy savings without compromising end-user comfort. HEMs perform this enablement through communication protocols that operate across devices and between the home and the grid. These communication protocols facilitate the information exchange of energy needs and availability to help HEMSs schedule appliances intelligently, using optimization techniques that balance user comfort level against expected energy supply and demand.
This paper provides a survey of the technologies that enable the deployment of HEMSs in the smart grid. After an overview of HEMSs and their role in the smart grid, an analysis is presented of how different computing paradigms have influenced the development of HEMSs. Then, HEM components are examined with reference to their interconnection within the smart home, and the communication technologies and key protocols that allow them to operate are reviewed. Finally, a description of demand response programs is given, and the optimization techniques that HEMs use for scheduling devices in order to achieve energy efficiency are discussed. Figure 1 shows the overall structure of a HEMS. The core component of the HEMS is the smart controller. It provides system management functionalities that include logging, monitoring and control. The smart controller collects real-time electricity consumption data from schedulable and non-schedulable appliances to implement optimal demand management strategies. The communication infrastructure that enables the flow of demand-side data, whether wired or wireless, is therefore, a critical component of the HEMS, as is the interconnection with the smart meter that records the energy consumption and production of specific users. Smart meters also enable smart billing solutions based on alternative electricity pricing schemes such as Time-of-Use, (peak) Demand, Real-Time pricing, Seasonal, or Weekend/Holiday rates.

II. HEMS OVERVIEW AND ITS ROLE IN SMART GRID
Distributed renewable generation is another critical HEM component. In the last decades, wind and PV power generation systems have become the most popular renewable energy sources. Sunlight and/or wind are abundant worldwide and relatively cost-effective to harness using PV and wind turbine technologies. However, the intermittent nature of wind and sunlight due to weather variation can negatively affect power stability, reliability, and quality. Home Energy Storage Systems (HESSs) offer an effective solution to the intermittent nature of solar and wind energy by providing immediate energy dispatch or storage when needed to ensure continuous and stable power supply.
With the increasing electrification of transportation, electric vehicles (EVs) are becoming an essential source of schedulable loads in residential areas. The main feature that distinguishes the EVs from other loads is that they can also be used as an energy storage device. More specifically, EVs can provide emergency power dispatch at peak consumption times, and storage on demand to absorb excess energy generation at low consumption times.
Over the past two decades, global electricity consumption has grown at a yearly average rate of 3.1% (https://yearbook.enerdata.net/), escalating the level of stress on electrical power systems. The ongoing electrification of transportation is likely to intensify this growth rate with added strain on power grids. Traditional grids cannot meet the onerous demands of this trend, which is exacerbated by the integration of large amounts of variable RESs. The typical response by decision-makers to the continued growth in electricity demand is to develop new power plants and extend the grid infrastructure. Such a solution is not sustainable in view of economic, safety, and environmental concerns. Utility grids need to undergo a radical transformation aimed at maximizing energy efficiency to prevent power plants and grid infrastructure development from spawning a situational crisis [21].
According to the U.S. Energy Information Administration, the expected gap between current supply (about 4 billion gigawatt-hours) and the increasing demand will reach 6 billion gigawatt-hours by 2030, with homes expected to consume approximately 30% of total electricity production [21]. To ensure continuity of the electrical service and minimize the imbalance between energy supply and demand, the smart grid paradigm must prevail to extend the reach of energy management solutions that include demand response, energy efficiency and distributed renewable energy integration, as shown in Figure 2 [21]. In facilitating the combined enactment of these three solutions, HEMSs play an important role in the modern smart grid, with ensuing benefits for customers and energy providers alike. HEMSs allow customers  The growing gap between electricity demand and current and planned electricity generation capacity [21].
to control their energy consumption in order to save energy and reduce costs while maintaining their comfort level at optimal levels. At the same time, HEMSs allow utility companies to analyze future energy demand in order to optimize the utilization of the electrical system and increase its reliability.

III. COMPUTING TRENDS IN HEMS
Early HEMSs were based on analog systems and had limited application [22]. In the 1970s, HEMSs were digitalized, running on high-speed general-purpose computers like the Xerox Sigma. With the introduction of personal computers in the 1980s, the HEMS underwent another evolution. Most vendors released energy management systems built on proprietary operating systems. Platforms based on the Linux and Windows operating systems became more popular at the turn of the 21 st century, with central computing support for coordination and visualization purposes. In modern HEMSs, components use microcontrollers and work together by using a distributed communication protocol with or without a central server [24]. This modular architecture allows the HEMS to function even when one of its components breaks down. References [22] and [23] present a comprehensive overview of computing trends in HEMSs. Some of the seminal literature on HEMS computing trends is listed in Table 1.
The requirements for a smart HEMS have become more demanding with the advent of advanced metering infrastructure [25] and increased consumer use. As mentioned in [26], the smart HEMS should include the following elements: • Sensors with microcontrollers for the monitoring of home conditions.
• Different databases to cater for low-latency ingestion of sensor data.
• Actuators with microcontrollers that take actions upon receiving commands.
• A server for data ingestion and visualization, which can also act as a gateway for connecting to other networks and protocols, and • Web applications for remote control of data and devices.
[26] presents a simple architecture that uses cloud computing for issuing control commands, running queries, executing algorithms, and storing data. Each actuator or sensor is capable of communicating with the cloud via gateways. The authors in [27] propose a novel scalable architecture with a uniform interface model that eases the effort of adding/removing devices to/from a smart home network. The architecture is structured into five layers: (1) a resource layer, which consists of sensors and actuators; (2) an interface layer, which serves as an abstraction; (3) an agent layer, where agents manage individual devices using RFID tags; (4) a kernel layer, which is responsible for managing agents, and (5) the user application layer. The authors in [28] put forward a cloud-based architecture (CloudThings) that offers infrastructure-as-a-service (IAAS), software-as-aservice (SAAS), and platform-as-a-service (PAAS) services for rapid application development, deployment, and operation of IoT devices. End-devices like sensors and actuators use the Constrained Application Protocol CoAP [29] for machine-to-machine communication. CoAP also easily interfaces with HTTP, thus enabling integration with the web.  Figure 3 shows a general cloud-based architecture for smart HEMSs. The gateway component represents a processor that interpret the underlying protocol for device communication and connects to the cloud to execute workloads that require high processing power. The internal network of the HEMS consists of actuators, sensors, and appliances connected through a communication bus. A set of industrial open standards ( [24], [30], [31]) forming a protocol stack enables communication within the network. Since Internet of Things (IoT) devices in smart homes can generate a lot of data, some amount of processing may have to be carried out at the gateway level to reduce operational costs by averting the transmission of large data volumes to the cloud. The gateway can process a sizeable amount of data and can also retain sensitive data that should not be transmitted over the internet [23].
Smart HEMSs can use public cloud platforms, such as AWS, Azure, and GCP ([32]- [34]), or private ones, such as OpenStack and VMware ( [35], [36]) for computing purposes. Cloud computing provides a reliable technology for big data storage and scalable infrastructure for data processing that has low latency. To solve privacy issues relative to the use of cloud computing [37] with big data transmission, Fog and Edge computing have recently been gaining momentum [38].
The primary objectives of Fog computing are to [39]: • Reduce the amount of data sent to the cloud for processing; • Improve response time and decrease latency, and • Protect privacy. Cisco was the first one to coin the term ''Fog Computing'' [40]. In Fog computing, data processing occurs between the source and the cloud. Gateways (see Figure 3) help achieve this task. Fog computing also results in faster response times by reducing network latency. The gateway may still forward data to the cloud when more intensive processing and storage tasks require it. Fog computing can suffer from specific latency and privacy issues, especially in applications where end-devices use compute-intensive Artificial Intelligence (AI) methods for real-time data analytics.
Edge computing [41] refers to machine processing that happens on the device/sensor. In combination with techniques such as federated learning [42], Edge computing enables the decentralized training of machine-learning models on devices/sensors that hold data samples without recourse to the cloud for storage and processing. Edge computing helps to solve critical issues in data privacy, security, and access rights and reduces or eliminates cloud-computing costs.

IV. COMPONENTS OF HEMS
As discussed in [50], the HEMSs provides five primary services: management, control, logging, monitoring, and fault detection. To enact these services, the HEMS needs to integrate sensors, measuring devices, smart controllers/actuators, a communication infrastructure, and a user interface system. Sensors can monitor occupancy, smoke, light, and temperature. Their purpose is to send feedback to the HEMS to make the required changes to the actuators for optimal comfort and energy efficiency. The various sensors used in HEMS are listed in Table 2. Measuring devices quantify the usage of resources such as gas, electricity, or water [23]. They also signal the current state of the system to the HEMS. Smart controllers are devices that can sense voltage and current and make direct local decisions without the need for global supervision.
Communication infrastructure includes networking media and the communication protocols used by HEMS devices. Different protocols have different requirements for physical media, transmission rates, and physical security. The HEM's management controller is an embedded computer or workstation with energy management software that can visualize the current state of the building/home monitored by the HEMS. It can also provide control functionalities and integrate various protocols [51].
Smart meters form an essential measuring component of HEMSs as they provide feedback to the utility and enable two-way communication between users and the utility. They also enable consumers to manage their energy use, taking into account other factors such as distributed energy resources [52]. Smart meters represent the latest trend in combining measurement techniques with modern computing technologies to promote intelligent energy systems. They gather data from all utility services, including electricity, gas, and water. The primary functions of the smart meter include the following [53]: • Measuring the multi-period and multi-mode power rates of active and reactive energy usage.
• Supporting two-way communication between users and the utility by sending consumption data and accepting pricing signals from the utility and responding to queries.
• Enabling response by looking at user preferences to influence smart-load shedding, and • Interacting with DER and other power infrastructures, along with HEMSs, to provide electricity when the primary power grid fails.
A HEMS that integrates a smart meter can display all relevant energy usage information to the end-user and provide automated demand-response taking into account user-preferences for comfort [54]. In such a setting, a smart HEMS management controller acts as the central integration point for distributed energy resources, energy storage devices, and electricity regulation for electric vehicles. The consumption patterns of individual appliances can also be observed by using sensors that measure reactive power and active power or by using non-intrusive load monitoring (NILM) [55]. NILM identifies individual appliance consumption by recognizing ''signatures'' of appliances in the total consumption data without the need for invasive interventions to home circuitry and devices. A review of NILM techniques is provided in [56].

A. HOME APPLIANCES
Demand-response programs allow end users to schedule appliances in their homes to achieve energy efficiency without compromising comfort. Home appliances can be divided into non-schedulable and schedulable loads. Non-schedulable loads are those that cannot be shifted in response to utility signals. These may be set by users and typically include refrigerators, printers, TVs, microwaves, computers, etc. Schedulable loads are those that can be switched on/off at any time. These include lights, air-conditioners, heaters, iron, EV chargers, etc. [57]. Schedulable loads can be further divided into interruptible or non-interruptible loads. Non-interruptible loads are constrained by a 'hold-time', i.e. a fixed period of operation before they can be turned off [58].

B. ELECTRIC VEHICLES
Electric vehicles (EV) will also play an essential role in future demand-response applications as EV adoption and the push for energy-efficiency grow. EVs act as a load and can also be used to transmit power to the grid. We can classify EV charging as unidirectional or bidirectional, as discussed in [59].

1) UNIDIRECTIONAL CHARGING
In unidirectional charging, the electricity flows from the grid to the electric vehicle, which acts like another load for the power system. This mode of operation is also known as gridto-vehicle (G2V) in literature.
Unidirectional charging can be classified into uncontrolled and controlled charging. In uncontrolled charging, the grid does not have a comprehensive view of the EV charging cycles. Thus, multiple simultaneous EV charging cycles can cause unrestrained demand peaks. Large-scale simultaneous charging can overload the infrastructure and cause voltage deviations and deterioration of power quality [60]- [62]. In controlled charging, EV charging is safely balanced with other loads, thus minimizing the occurrence of demand peaks. As discussed in [59] and [63], controlled EV charging can be either manual, where the EV owner can choose an off-peak time for charging to be a ''smart'' energy user, or automatic, to the central controller that integrated in the HEMS decides the best time for vehicle charging.

2) BIDIRECTIONAL CHARGING
In bidirectional charging, EV can run in G2V, vehicle-togrid (V2G), vehicle-to-home (V2H), and vehicle-to-building (V2B) modes [64]. In V2G, V2H and V2B, the EV can supply the grid with power. V2G, V2H, V2B can all be used for peak-shaving and the reduction of electricity bills [65]. The general structure of the V2G, V2H, and V2V concepts is illustrated in Figure 4. In cases where there is a demand spike, EV bidirectional charging can supply temporary power to reduce uncertainty in power supply and avoid power shortages. The deployment of EV bidirectional charging requires a significant upgrade of current communication and distribution systems [60].

C. INTEGRATING RENEWABLE ENERGY WITH HEMS
As residential adoption of renewable energy systems grows, the demands on power electronics become more complex [66]. With reference to power electronic converters, specific requirements include: 1) stable and reliable power supply; 2) high-performance operation; 3) low cost; 4) effective protection; 5) regulation of active and reactive power; 6) fault ride-through capabilities and, 7) secure communication.
An overview of HEMS usage for renewable energy resources is provided in [67]. As shown in Figure 5, 38.6% of renewable energy worldwide is used in utility-scale power plants, and 41.7% in residential, commercial, and public applications. Due to improvements in communication and control technologies, the energy mix in smart-homes has advanced to include various sources of renewable energy resources, including solar PV, wind power, biomass, and geothermal energy [68]. Residential renewable applications often integrate an energy storage system to improve their dispatchability. Leadacid, flow, lithium-ion, ultracapacitors, and chemical energy storage technologies have been widely used in Home Energy Storage Systems (HESSs) [69]. HESSs stabilize the supply electricity generated by variable RES such as wind and solar.
In the event of a grid outage, renewable energy generation in combination with HESSs can provide an independent source of electricity supply for critical loads [12].

D. MANUFACTURERS CREATING SMART HEMS
Several companies develop HEMS products, as shown in Table 3. One of the energy meter manufactured by Schneider Electric [70] uses the Modbus protocol [71] for communication. Schneider also makes energy meters that make use of the KNX communication protocol [72]. Meters based on open protocols, can be used with HEMS products by different vendors, such as GE and Siemens. Siemens's ''Synco'' platform [73] is a home and small building automation product line that uses standard industrial communication protocols. It also connects to the cloud to provides real-time data using visualizations. Large software companies such as Google, Apple, and Cisco now distribute HEMS products. This trend emphasizes the increasing role of software engineering for IoT devices. Google's Home, Apple's Siri, and Cisco's energy management service [74]- [76] are examples of home energy management services. Cisco's energy management service can integrate products and services that control HEMSs.
The GE digital power meter [77] is yet another device that is easily integrated with a Building Management System (BMS) using the Modbus protocol, and incorporates straightforwardly with the electrical distribution system. Traditional audiovisual vendors such as Control4 [78], AMX [79], and Crestron [80], [81] also manufacture products for home energy management and control. Crestron and Control4 run VOLUME 8, 2020 products on proprietary protocols. However, they provide interfaces to some of the most popular open protocols. Table 3 provides more information on the products available in the home energy management market.

V. COMMUNICATION TECHNOLOGIES IN HEMS
Smart homes consist of connected devices that communicate with each other to exchange data and implement actions. To make the right decision, it is important for the HEMS to have a complete view of the system. HEMSs, therefore, need multiple sensors to collect various types of information from home devices. These sensors need to communicate with appliance actuators to perform required actions when specific criteria are met. Communication protocols determine how actuators and sensors communicate and connect with each other. Smart homes use wireless sensor networks and machine-to-machine protocols. These communication protocols can be wired, wireless, or hybrid. For wired networks, a tree or star bus topology is preferred since it provides higher flexibility in-home wiring. For wireless networks, the mesh topology is preferable as it can bypass obstacles inside a home. The following criteria help determine the choice of communication protocol [23]: • Range of Coverage: Length of physical media (for wired network), or distance between receiver and transmitter (for wireless networks) that allows devices to communicate properly.
• Level of security: Should communication between devices be encrypted? Is access control required to send/receive messages on the communication bus?
• Network size: Number of devices that can be attached to the network without compromising the quality of communication. This varies from protocol to protocol and can range from a few devices to 1000's of devices.
• Latency: Some protocols allow for faster communication, while others rely on slower communication.
• Availability of functionality: Different protocols and standards tend to specialize in specific features, and so it is essential to know which protocol and device would serve the purpose of the installation.
Control and automation protocols generally cover different functionalities including management, control and field functionalities. Management functionalities revolve around reporting, high-level control, and facility visualization. Control functionalities include programmable logic, internet/protocol gateways, and specialized control tasks. Field functionalities usually comprise the simple operation of sensors and actuators. A detailed explanation of control and automation concepts is presented in [82].
Price is another factor in the selection of a protocol. Open protocols allow multiple vendors to compete for a product and consequently tend to offer lower rates. Proprietary protocols suffer from vendor lock-in and can result in premium prices. In [82], a price comparison is given for smart home automation systems built on various protocols including open protocols (e.g., KNX) and proprietary protocols (e.g., Crestron). Similarly, for wireless networks, the cost of devices based on the open ZigBee protocol is lower than that of devices based on the proprietary Z-Wave protocol [83]. Zig-Bee tends to be used more for research purposes due to its lower barrier to entry, while Z-Wave is preferred for commercial applications because it has a longer range and fewer congestion issues.
The standard practice in protocol design has been to leverage distributed protocols to enable HEMS resilience. This means that each device can respond to events on its own without the need for a single computing processor, as had been the case in a centralized setting. The use of distributed protocols prevents a single point of failure and makes HEMS more resilient. The three most prominent open protocols for wired networks are BACnet, KNX, and LonWorks. Each allows different manufacturers to create different products that are compatible with one another. In addition to these open protocols, there are a number of proprietary protocols. Table 4 provides an overview of wired and wireless protocols for smart home technologies. Figure 6 shows the available functionalities in different protocols [83].

VI. RESIDENTIAL DEMAND RESPONSE PROGRAMS
An overview of Demand Response (DR) programs is provided in [22], [84], [85]. Traditionally, electric utilities have focused on making power generation, transmission, and distribution more efficient. With advancements in HEMSs, utilities have directed new efforts to demand-side management. HEMSs have also become attractive for end-users since they promote reductions in electricity usage that result in lower electricity bills. The United States Department of Energy [86] characterizes DR programs as either price-based or incentivebased, as shown in Figure 7. End users can follow three strategies in response to price-or incentives-based DR programs. One strategy consists of reducing consumption during peak hours. This strategy can decrease customer comfort levels. Another strategy is to shift loads from peak to off-peak hours. An example of this strategy is to operate the washing machine and dishwasher loads during off-peak hours, rather than during peak hours. Customers can also use on-site generation through renewable sources to decrease reliance on the conventional power grid during peak consumption periods. This third strategy results in a decrease of the average load on distribution and transmission grids.
In a price-based DR scheme, customers are offered varying electricity tariff rates at different times. Typically, these tariff rates are priced to encourage customers to reduce loads at peak times. Pricing can be dynamic or predefined [87]. Critical peak, real-time, and time-of-use (TOU) pricing are some examples of price-based DR schemes [88], [89]. One adversity that customers might face with price-based DR schemes is to keep abreast of tariff changes. This adversity can be resolved through scheduling algorithms that automatically manage loads as per predefined or dynamic tariff changes [90].
With TOU pricing, the cost of electricity is set for off-peak and peak times. Time of usage is divided into off-peak (less costly) and peak (more expensive) intervals [102]. In dynamic pricing, the cost of electricity is established in ''real-time'' at regular intervals, e.g., every hour [103]. Critical peak pricing involves identifying peak times throughout the year, and then notifying consumers of increased prices when peak demand is likely to occur [104].
Demand response systems have evolved to make use of distributed energy generation and energy storage. Although home energy management is overall an excellent initiative, local energy use decisions can have an adverse effect on the main grid. For example, phenomena such as ''rebound peak'' where too many appliances are shifted to times with low prices can cause new and unexpected demand peaks [105]. Thus, from the utility's perspective, it is preferable to manage DR at the neighborhood level. This gives rise to the need for HEMS coordination across households. The entities involved in smart HEMS coordination include: • The utility operator, who is responsible for the reliable transmission of electricity to the end-customer. Utilities benefit from DR by managing demand and promoting energy efficiency.
• The aggregator, who can provide DR services to the utility, and ancillary services to end-users on behalf of the utility, and can become the focal point for energy trading [106].
• End users, who can take the role of energy ''prosumer'' by operating distributed energy and energy storage devices.
Energy-management coordination across households can be centralized or decentralized. In a centralized setting, one entity is responsible for managing energy demand in a group of households. The managing body (e.g., the utility) has access to the required information using Advanced Metering Infrastructure [25]. In decentralized coordination, the end-users exert more control overload scheduling choices. To manage such degree of distributed control, households must communicate with each other so that the neighborhood aggregator can have a comprehensive view of the status quo to relay safe DR measures to end-users and/or utilities. Energy-management coordination approaches can be classified into three categories: • Entirely dependent structure: Smart homes receive information about the neighborhood energy-demand profile through a central entity such as an aggregator or the utility. No peer-to-peer communication occurs.
• Fully independent: Smart homes communicate with each other to achieve awareness about the neighborhood energy-demand profile.
• Partially independent: Smart homes can communicate with each other and interact with a central entity to receive neighborhood load profile information. An overview of neighborhood coordinated and uncoordinated demand response is provided in [107].

VII. LOAD SCHEDULING TECHNIQUES
The implementation of energy efficiency and demand response measures requires that consumer loads be either reduced or shifted. Load shifting involves scheduling to find the optimal operational timings at which to operate consumer appliances, considering both peak demand times and user preferences. The load scheduling optimization techniques discussed in the literature are summarized in Table 5. A discussion of these techniques follows below. For load shifting, several choices need to be taken into account to find an optimal schedule. This schedule will always be an approximation as future electricity demand and generation cannot be predicted with absolute certainty. In the literature, different mathematical optimization techniques are used to find an optimal load shifting schedule. Constrained-based mathematical optimization techniques have been used extensively for device scheduling. Linear, nonlinear, and convex programming are examples of constrained-based optimization techniques. Linear and nonlinear programming models compute the relationships across variables as a linear and nonlinear function, respectively, according to the distribution of the reference data. Nonlinear programming is computationally more expensive. Convex programming is a superset of linear programming and involves relations and objective functions that are convex in nature.
Reference [108] uses binary programming to optimize constraints that include consumer preferences. Reference [109] presents a mixed integer programming approach that optimizes device scheduling, taking into account renewable energy and energy storage resources. Reference [110] investigates the optimization of multiple objectives simultaneously by using the mixed-integer linear programming (MILP) approach. Reference [111] uses mixed integer nonlinear programming to model constraints via nonlinear functions. Reference [112] uses convex programming to optimize scheduling while taking into account real-time pricing. Reference [113] models uncertainties in forecasting along with deterministic optimization for scheduling.
Mathematical optimization problems are computationally expensive when they are a large number of constraints and variables involved. Often it is desirable to find an acceptable solution rather than a deeply optimized one. Heuristic approaches enable the reduction of computational complexity by using high-level criteria to select a subset of the search space that is likely to contain a satisfactory optimization solution. Reference [114] uses genetic programming to find a schedule for demand-response based control of inverter air-conditioners. Reference [115] presents a differential evolution algorithm for demand-response based scheduling. Particle swarm optimization (PSO) is yet another heuristic-based optimization technique that has been used in the literature. For example, [116] and [117] use particle swarm optimization for demand response.
Model Predictive Control (MPC) has also been used for optimizing scheduling, factoring in prediction uncertainty and dynamic modeling [118]- [123]. MPC requires a detailed plant model, constant monitoring, and continuous data acquisition -all processes that demand significant resources. Reference [120] highlights the limitations of the MPC approach.
Game theory is yet another approach that has been used in the literature for scheduling HEMS devices, in the form of cooperative and non-cooperative games. In cooperative games, agents communicate to reach a common goal. Reference [124] uses a cooperative game strategy for coordinating households to optimize demand. In non-cooperative games, agents focus on achieving local optimizing objectives without communicating with one another. References [125]- [128] highlight studies that use game theory to minimize overall consumption in a single household.
Various studies have used machine learning to optimize scheduling. Reference [129] presents an approach that uses a Neural Network model to determine appliance scheduling. Reference [130] describes a global neural network controller, which takes into account all inputs to switch off the required device. In [131], ANN is used with a genetic algorithm for weekly appliance scheduling. Reference [132] uses a neural network based on particle swarm optimization for improving appliance scheduling operations through hyperparameter optimization. Reference [133] proposes a lightning search ANN algorithm to predict when to turn on/off a device. Reference [134] uses a distributed algorithm for training a neural network.
Fuzzy logic controllers (FLC) have also been used in literature for scheduling HEMSs. A fuzzy control system is developed in four steps: 1) map discrete values into fuzzy one; 2) add a membership function for each variable; 3) define rules for the system, and 4) map fuzzy values back to discrete values. Reference [135] uses FLC for the day-ahead scheduling of the air-conditioning unit. In [136], the authors use FLC techniques to maximize comfort and minimize energy consumption. In [137], a solar plant is integrated with the DR system, and energy cost is reduced using fuzzy systems. Reference [138] present a real-time controller based on FLC, using various home appliances with PV and energy storage.
Neural-Fuzzy methods have also been used in literature. In a neural-fuzzy system, the output of neural networks is fed to a fuzzy system, which can then use rules derived from domain knowledge to produce the required output. The neural network adjusts weights by calculating the error from fuzzy outputs. Reference [139] presents a controller based on an adaptive network-based fuzzy inference system (ANFIS) that schedules and controls house loads to reduce power consumption. Reference [140] implements an ANFIS controller for smart homes. The controller schedules devices without minimizing energy consumption in response to dynamic pricing.
Reference [142] provides an overview of reinforcement learning-based algorithms for demand response. Reinforcement learning (RL) is an agent-based AI algorithm that has the capacity to learn scheduling parameters and preferences through trial and error interactions that are guided by a reward function. A reinforcement learning system involves an environment, control actions, transition probabilities, a reward function, a policy, and a performance metric. Further details about RL can be found in [141]. The first usage of reinforcement learning for home energy management is described in [143], where a neural network is used to control heating, ventilation, air conditioning (HVAC), and lighting to minimize user discomfort and reduce energy costs. References [144] and [57] use reinforcement learning to schedule devices in response to pricing signals. In [145], different functions measure user dissatisfaction when appliances fail to perform the required task in the required time. Reference [146] uses an RL algorithm in a demand response setting and compares it with a decentralized heuristic-based approach. Reference [147] uses RL to minimize cost by not exceeding a certain power threshold and without causing dissatisfaction by delaying the operation of devices. Reference [148] focused on shifting the cost of certain flexible loads. Reference [149] uses Q-learning to shave peak demand of appliances and electric vehicles with distributed generation by breaking down the main problem into sub-tasks that are then solved independently using RL. VOLUME 8, 2020

VIII. CONCLUSIONS
The increasing ubiquity of distributed renewable energy generation has promoted the development of microgrids as local power structures that integrate HEMSs. At the level of the individual household, HEMSs enable consumers to make energy-efficient choices without compromising comfort, through optimal management of appliance usage and EV charging in Home Area Networks. At the level of the electricity grid as a whole, utilities can monitor federated HEMSs through Wide Area Networks and acquire situation awareness about the dynamics of consumption to set dynamic parameters for the management of the power grid such as electricity prices, and enact protective measures when imbalances in supply and demand may lead to system vulnerability. Somewhere in between, the federated monitoring of HEMs in Neighborhood Area Networks enables local operators to manage microgrids for optimal power flow and transient stability to avoid overloading and voltage or frequency instabilities and optimize microgrid operations in changing weather scenarios.
HEMSs have come a long way since they first appeared in the 1970s, moving from a centralized solution running on proprietary operating systems to distributed architecture running on standard operating systems. Modern HEMSs are more resilient because their components run on microcontrollers and work together through distributed protocols so that the HEMS still works even when one of the parts fails. Distributed protocols allow each device to respond to events on its own without having to interact with a centralized workstation so that the HEMS does not have a single point of failure. The use of cloud computing provides a stable platform for data storage and processing. The integration of IoT devices ensures maximum access to the information relative to each HEMS component. The inclusion of Edge and Fog computing techniques allows data to be stored and processed locally to avoid excessive data transmission to the cloud, improve response time and decrease latency, and offer greater privacy.
The components of a HEMS include sensors, measuring devices, smart controllers/actuators, infrastructure for communication, and a management controller for supervision and control of data. These components address five primary functions: management, control, logging, and monitoring and fault detection for energy systems. The target application is to enable end-users to control and schedule appliances, including EV chargers, to consume more efficiently, following utility-sponsored demand-response programs based on incentives or price schemes (e.g., ToU).
A host of increasing studies shows that optimization methods, including game theory, machine learning, and other AI techniques, can help find the best demand-response configuration by determining the best time to shift or reduce loads taking into account user preferences. As HEMSs enter the mainstream home technology market, these techniques are likely to be integrated into commercial HEMSs to help the user manage home appliances and devices in a seamless way.
Looking forward, HEMSs can have a pivotal role in facilitating the growth of federated microgrids as the power system solution of the future. In enabling energy efficiency, HEMSs promote cost reduction, making microgrids more economically viable. At the same time, HEMSs provide detailed information about home energy use across Neighborhood and Wide Area Networks that operators can use to increase grid safety, resiliency, and effectiveness.
USMAN ZAFAR received the bachelor's degree in electronics engineering from NUST, Islamabad, in 2010, and the master's degree in computer science from LUMS, Pakistan, in 2016. He currently works as a Research Associate at the Qatar Environment and Energy Research Institute. His research experience has revolved around applying deep learning algorithms to various domains. More recently, his work concentrates on applying AI algorithms to advanced metering infrastructure networks and home energy management systems. VOLUME 8, 2020 SERTAC BAYHAN (Senior Member, IEEE) graduated from Gazi University, as a Valedictorian. He received the M.Sc. and Ph.D. degrees in electrical engineering from Gazi University, Ankara, Turkey, in 2008 and 2012, respectively.
In 2008, he joined the Electronics and Automation Department, Gazi University, as a Lecturer, where he was promoted to Associate Professor, in 2017. From 2014 to 2018, he also worked as an Associate Research Scientist at Texas A&M University at Qatar. He is currently a Senior Scientist at the Qatar Environment and Energy Research Institute (QEERI), where he leads several national and international projects. His research interests include the areas of advanced control of PV systems, microgrids, EV integration, and smart grid applications. He has authored more than 150 high-impact journal and conference papers. He is the coauthor of two books and four book chapters.