Home Energy Management Systems (HEMSs) with Optimal Energy Management of Home Appliances Using IoT

: Home appliances connected to Internet-of-Things (IoT) platforms have been extensively installed in smart homes. In this context, home energy management systems (HEMSs) have emerged as a viable solution for reducing energy costs. Although several studies have analyzed the implementation of HEMSs, a majority of these studies were based on the installation of numerous sensors. Owing to the complexity and costs associated with the installation of multiple sensors, implementation of HEMSs in smart homes is challenging. This paper presents an energy management scheme for an HEMS that minimizes the energy cost in a smart home with data obtained from IoT-based appliances typically used in a smart home. Case studies were conducted to demonstrate the effectiveness of the proposed method. Prototype software (version 11) based on the proposed method for a HEMS and a test house with IoT-based appliances were also implemented in the case studies.


Introduction
Driven by increasing fossil fuel costs, there has been a rising trend in electrification [1], which has significantly influenced the global energy transition.This transition is reflected in smart homes, where electrification is prevalent, contributing to increased electricity costs.In such a scenario, residential demand response (DR) programs [2], where customers in a smart home can earn additional profits by reducing their electrical consumption, have gained traction.This has increased the desire of smart home customers to reduce energy costs.With the implementation of home appliances connected to Internetof-Things (IoT) platforms in smart homes, home energy management systems (HEMSs) [3][4][5][6][7][8] can play an important role in saving energy costs.
Several studies have been conducted to analyze feasible energy management methods for HEMSs to optimize electricity use and reduce energy costs in smart homes.A method for forecasting electricity demands in small-scale buildings and smart homes was proposed by Wang et al. [9].Jo et al. [10] proposed an optimal scheduling method, based on the data obtained from multiple sensors, for energy management in a smart-home environment with photovoltaic (PV) systems, fuel cells, energy storage systems (ESSs), air conditioners, and electric vehicles (EVs).A method for utilizing EVs and ESSs in smart homes was also proposed by Hou et al. [11].A control technique for a PV system and an ESS employing a model-based predictive control framework in a smart home was proposed in [12].A method for determining EV charging schedules in a smart home with PV was proposed by Bot et al. [13].Sossan et al. [14] established a household refrigerator model for energy management.Shakeri et al. [15] utilized a refrigerator as an important controllable appliance in an HEMS.Other methods for scheduling and controlling appliances such as air conditioners [16,17] and electric water heaters [18] have also been studied.
Most of these studies assume that PV systems, ESSs, and EVs can be controlled by an HEMS in a smart home.However, in reality, an extremely small number of smart homes have such setups.Because controllable home appliances connected to IoT platforms are widely distributed in a smart home, focusing on controlling these appliances rather than PVs, ESSs, and EVs is a realistic approach.
Frequently modification of the set values of controllable appliances in a smart home by a customer is arduous owing to several factors such as customer convenience, electricity price, and DR service.In recent years, many IoT platforms have provided remote control functions to various appliances [19][20][21][22].Therefore, in this study, controllable appliances were assumed to have an automatic control system based on an IoT platform; the system could use the control signal obtained from the energy management scheme in the HEMS to adjust the appliances to the set values.
In addition, implementing the methods proposed in most studies on smart homes requires the installation of numerous sensors.However, installing multiple sensors incurs high investment costs; moreover, integrating an HEMS in a smart home is challenging owing to economic issues.This has facilitated the need for an energy management scheme for HEMSs to minimize the number of sensors in a smart home and reduce energy costs by controlling home appliances using data provided by the IoT platform.
This paper introduces an energy management scheme for an HEMS that minimizes the energy costs in a smart home by utilizing data obtained from the IoT-based appliances installed in that smart home.Generally, sensors are available for monitoring various data of IoT-based appliances; thus, the implementation of the proposed scheme may require installing only one IoT sensor as an electricity meter at the grid-connected point to monitor the power consumption of appliances that are not directly connected to the IoT platform.The proposed scheme, a modified version of the energy management schemes typically used in microgrids (MGs), can be segmented into parameter estimation, forecasting, and scheduling stages.In the parameter estimation stage, the parameters related to air conditioners and refrigerators, which are considered controllable appliances in a smart home in this study, were estimated.The equivalent thermal parameter (ETP) [23] and average electrical consumption models were adopted for air conditioners and refrigerators, respectively.In the forecasting stage, the electrical demand for noncontrollable appliances in a smart home was predicted using the moving average method [24].In the scheduling stage, the set values for controllable appliances were determined by solving the scheduling problem, which was formulated as a mixed-integer programming (MIP) problem.
Furthermore, Prototype software (version 11) based on the proposed energy management scheme for HEMS was developed.The proposed method can be integrated in an HEMS through four software modules: data management, forecasting, parameter estimation, and scheduling modules.To demonstrate the effectiveness of the proposed method, the software was applied to a test house using an IoT-based home appliance.
The remainder of this paper is organized as follows: Section 2 describes the smart-home environment for participation in energy service models.Section 3 elaborates on the HEMS with optimal scheduling of controllable home appliances using an IoT platform.Section 4 presents the test results to demonstrate the effectiveness of the proposed method, and Section 5 highlights the major conclusions drawn from the findings of this study.

Energy Management System for an MG
An energy management system in an MG monitors the MG and controls the controllable devices in the MG to maximize the benefits of the MG while satisfying the technical requirements for stable operation.In general, a three-level energy management strategy [25] comprising load forecasting, optimal scheduling, and real-time control (Figure 1) is employed for MG operation.The energy management system uses set values that are scheduled according to the expected conditions as reference values for MG operation.The expected conditions are obtained using a forecasting algorithm.However, in real-time operation, the scheduled set points may not satisfy the system requirements for the MG owing to uncertainties in the forecasting values.This triggers real-time control as system constraints become more likely to be violated.The real-time control algorithm considers the current system conditions and derives new set points every second, which override the scheduled set points.
To integrate this energy management strategy in various MGs, the data from the MGs and their operational purposes have to be analyzed.Moreover, the type of data acquired and the frequency of data measurement have to be analyzed as these aspects may affect the type of algorithm used in the forecasting phase and operating cycle.The frequency of the data measurement may also affect the operation of a real-time control algorithm that requires data every second.Finally, the operating cycle of the algorithms in the prediction and scheduling phases depends on the purpose of MG operation.
A smart home is also a type of MG; hence, it is important to review the aforementioned points and establish an appropriate energy management strategy to introduce an appropriate energy management system in a smart home.

Smart-Home Environment with IoT Platforms
A smart-home environment is a system equipped with IoT platforms and devices that can automatically control and monitor home appliances.In this study, it is assumed that IoT-based appliances can monitor several sources of data required for energy management in a smart home.If a large number of appliances in a smart home are not connected to the IoT platform, then an electricity meter connected to the IoT platform may be required to measure the power consumption of these appliances.Table 1 presents the data obtained from the IoT-based appliances used in this study.In a smart-home environment, an HEMS can reduce the energy cost while satisfying the convenience of residents.Figure 2 presents an overview of the smart-home environment.An HEMS in a smart home can be implemented using an IoT platform.The IoT platform provides a monitoring function to obtain the necessary information for energy management, such as power consumption, operating mode, setting value, and indoor temperature.It also enables automatic control of the home appliances in a smart home.In this study, it was assumed that only air conditioners and refrigerators were automatically controlled by the HEMS.The HEMS derives the information required for energy management from the IoT platform through its application programming interface (API) and transmits the control settings required for each appliance through the IoT platform.
Stable data acquisition is critical for efficiently managing the energy costs of a smart home based on the three-level energy management strategy for MG operations.However, the data acquisition intervals may be irregular for some commercial IoT platforms.For example, power consumption data can be directly collected, albeit at irregular intervals, from home appliances using IoT platforms (Figure 3).Owing to data acquisition at such irregular intervals, application of general energy management strategies for MG operation in a smart home, particularly real-time algorithms that generate control signals every second, is challenging.Two additional factors must be considered when applying a scheduling algorithm in an HEMS to a smart home: (i) The operating cycle of the scheduling algorithm, whose extremely high operational frequency prevents changing of the set values (incorporating operating modes) of the appliances, can affect customer convenience in a smart home; (ii) the scheduling algorithm requires various parameters for home appliances and a smart home to determine the set values; however, it is difficult for customers to obtain the parameters necessary for the scheduling algorithm, such as the heat capacity of a smart home and the efficiency of home appliances.
Moreover, integrating general MG energy management algorithms in an HEMS is challenging owing to irregular data acquisition intervals and the limitations associated with the application of scheduling algorithms.Therefore, in this study, an energy management scheme for an HEMS was established to efficiently mitigate the drawbacks related to data acquisition and scheduling algorithms.

Energy Management Scheme for an HEMS Based on IoT Platforms
The proposed energy management scheme for an HEMS adopts a three-level hierarchical structure that is modified from the general energy management strategy for MGs.The proposed scheme consists of a parameter estimation stage for home appliance scheduling, a load forecasting stage, and an optimal scheduling stage (Figure 4).The real-time control stage of the general energy management strategy is removed, and the parameter estimation stage is added to consider the characteristics of the controllable appliances in a smart-home environment using IoT platforms.Based on this energy management scheme, the HEMS does not transfer real-time control signals to appliances in a smart home; rather, it transfers only the set values obtained from the scheduling stage.Based on the set value, each appliance can be controlled in real time.
-Parameter estimation stage (D-1 day): This stage estimates the parameters required for optimal energy management in a smart home.The parameters were determined once a day before midnight and applied for 24 h the next day.In this study, the parameters of controllable appliances, such as air conditioners and refrigerators, were considered.-Load forecasting stage (/1 h): This stage forecasts the electrical requirements for noncontrollable appliances in a smart home.The load profile for the remaining time of the operation day was re-forecast every 1 h.The load-forecasting method used in this study is based on historical data that are acquired using an IoT platform.-Optimal scheduling stage (/1 h): In this stage, the optimal set points of the controllable appliances in the smart home are determined using a scheduling algorithm.An optimal scheduling algorithm based on the MIP formulation with constraints considering the characteristics of each appliance, customer convenience, and incentivebased DR services was executed every 1 h.The following subsections describe each stage of energy management in the HEMS in more detail, and the implementation of the prototype HEMS with the proposed scheme.

Parameter Estimation Stage in the Mathematical Model of Controllable Appliances (D-1 Day)
Mathematical models and parameter estimations are required to generate the set values obtained during the optimal scheduling stage.In this subsection, mathematical models for air conditioners and refrigerators, which are controllable devices in a smart-home environment, and a method for estimating the parameters necessary to integrate them in the scheduling stage are explained.
Air conditioners are controlled by setting the indoor temperature, which affects the convenience of the customer and power consumption of the air conditioner in a smart home.The operational characteristics of an air conditioner are typically described by the ETP model [23], which is expressed as follows: where   (t) is the indoor temperature at time t;   (t) is the power consumption of the air conditioner at time t;   (t) is the outdoor temperature at time t; α, β, γ are the parameters related to the indoor temperature, the power consumption of the air conditioner, and the outdoor temperature, respectively; δ is the error term of the first-order ETP model;    and    are the minimum and the maximum power consumption of the air conditioner, respectively; and "AC" in the subscript denotes air conditioner.
In a smart home, the methods of controlling the refrigerator are divided into methods of directly controlling the internal temperature of the refrigerator and setting the opera-tion mode.In this study, control of the refrigerator is mathematically modeled by assuming a refrigerator wherein the operation mode is changed for energy management in a smart home, which is formulated as follows: where   (t) is the electrical demand of the refrigerator,    and    are the average electrical demands of the refrigerator for the standard-cooling mode and weakcooling mode, respectively, and  / (t) denotes the binary variable for the operation mode of the refrigerator.
These mathematical models are considered ideal if applied to a scheduling problem without parameter corrections.To improve the applicability of the model, the values of the parameters used in the aforementioned models must be close to the actual values.Therefore, the following method was adopted to update the parameters with historical data: -A nonlinear regression model [26]  )), where  is the error between the historical actual indoor temperature and forecast indoor temperature from the ETP model based on the parameters obtained using a nonlinear regression model;    () is the historical indoor temperature at time t;    () is the historical electrical demand of the air conditioner at time t;    () is the historical outdoor temperature at time t; and f (•) is the function for the nonlinear regression model.- The moving average method [27] based on historical power consumption and operation mode data is applied to predict   / , as follows: where   /, () is the i-th historical electrical demand data of the refrigerator for the standard or weak-cooling mode, and N is the number of data used for the moving average method.

Load Forecasting Stage (/1 h)
To determine the optimal schedule of controllable home appliances using an HEMS, it is necessary to predict the electrical load demand of noncontrollable devices in a smart home.In this study, it was assumed that only the electrical load consumption data obtained from an IoT platform could be used as input data for load prediction in an HEMS.
The electrical load demand of noncontrollable devices in a smart home is predicted using the moving average method [27] with past accumulated load data over a certain period, as shown in Equation (8).Instead of assigning more weight to recent data, load forecasting was performed by assigning the same weight to all historical data.
where   () is the load of noncontrollable appliances in a smart home at time t, and    () is the historical load data of noncontrollable appliances.
The load forecasting method is executed every 1 h to generate load profiles in a smart home, not including a controllable appliance load, for the remainder of the operational day.

Optimal Scheduling Stage (/1 h)
This subsection describes an optimal scheduling algorithm for a smart home with controllable home appliances such as air conditioners and refrigerators.As mentioned in Section 2, it is assumed that smart home appliances such as air conditioners and refrigerators can be controlled using an IoT platform.
The optimal scheduling problem determines the optimal operating schedule of controllable appliances at each instant to maximize the profit of the consumer while satisfying the constraints for the characteristics of the model proposed in Sections 3.1 and 3.3.Scheduling was executed every 1 h to generate operation schedules for the controllable appliances for the remainder of the operational day.The temporal resolution of the scheduling problem was 1 h.
The objective function for the scheduling problem can be expressed as follows: (t) = max(CBL *   (t) −   (t), 0), (10) where   () is the cost of the power purchased from the external power grid at time t,   () is the power purchased from the power grid at time t,  , () is the price for the residential DR service at time t,   () is the amount of load reduction of customers participating in the residential DR service at time t, and CBL is the customer baseline load of the smart home and is the expected load when a customer does not participate in the DR service.This scheduling problem is solved subject to the following constraints.
-Power balance of the smart home: -Power limits purchased from external power grid: where    and    denote the minimum and maximum power purchased from an external power grid, respectively.-Indoor temperature limits.- The temperature in the home decided by scheduling may be extremely high or low such that the customer feels inconvenienced; hence, the indoor temperature should be limited to the preferred temperature established by the customer within the air conditioner's operating time.This requirement is expressed as follows: where    and    are the minimum and maximum values of the indoor temperature, respectively.-Operating time for the weak-cooling mode.
It is assumed that the refrigerator can operate in the weak-cooling mode only when participating in a DR service.To retain the freshness of foods in a refrigerator; the operating time in the weak-cooling mode is also limited depending on the characteristics of the foods stored in the refrigerator.This requirement is expressed as follows: where   (t) denotes a binary variable for participating in the DR service, and   is the maximum time that the refrigerator can operate in the weak-cooling mode during the day.
The aforementioned controllable home appliance model, expressed by Equations ( 1)-( 4), should also be considered as a set of constraints for the optimal scheduling problem in an HEMS.
The formulated optimization problem is a mixed-integer linear problem that is solved using the branch-and-bound algorithm [28].

Implementation of Prototype Software for the Proposed HEMS
Prototype software (version 11) was developed using the proposed energy management scheme using C# and a MATLAB-based optimization tool.Each stage was implemented for the proposed energy management in a smart home.Figure 5 shows the configuration of the prototype software for the HEMS.The software consists of four modules-database management, parameter estimation, load forecasting, and scheduling.The test house was installed at the Gwangju branch of the Korea Electrotechnology Research Institute (KERI) to review the effectiveness of the proposed energy management scheme.The prototype HEMS shown in Figure 6 was applied to a test house and is currently under test operation.

Case Study
The case study was performed for one month between August and September in 2023 at the KERI in Gwangju, South Korea.A test house with 13 home appliances was installed at the KERI, as shown in Figure 7.The appliances in the test house were selected from the same manufacturer to facilitate connecting all appliances to a single IoT platform.The prototype HEMS was installed in the control room and communicated with the IoT platform connected to appliances in the test house.A detailed configuration of the test house is illustrated in Figure 8.In the test house, two lights, a washing machine, a dryer, a robot cleaner, a PC, a TV, and an air purifier were installed as noncontrollable devices.In addition, two refrigerators and air conditioners were installed as controllable appliances.The data required to manage the set values of the controllable devices were obtained from a connected IoT platform.Additional sensors were not installed at the test house to minimize the installation costs.Outdoor temperature data required to control the air conditioner were obtained from the Korea Meteorological Administration.
The price profile for the test house was based on the time of use (TOU) and system marginal price (SMP), as shown in Figure 9.It was also assumed that the test house participated in the DR incentive program.The DR program in this study is Korea's residential DR program, which compensates for SMP when the power received from the grid is reduced compared with the CBL when DR is issued by an independent system operator (ISO).However, there is no penalty even if there is no reduction.In this case study, because the test house does not actually participate in the DR service, the effect when the test house participates in the DR program is analyzed based on the virtual DR signal issued when the net benefit test price (NBTP) is greater than the SMP.The additional parameters that were assumed for the test are listed in Table 2.The actual daily operation results are shown in Figure 10.The appliances were controlled based on the proposed energy management scheme in the prototype HEMS.In the daily test, the amount of energy consumption was approximately 3.84 kWh, and the cost of energy consumption in the test house was approximately USD 0.52, which is 4.4% lower than the CBL case of USD 0.54.
In addition, Figure 10 demonstrates that the test house contributes 230.87 Wh to the DR service on the test day.The profit from the DR service is estimated to be approximately USD 0.03.The air conditioner was operated for 13 h for the test house to contribute in the DR service and satisfy the preferred temperature.The refrigerators were also changed from normal mode to weak-cooling mode at 14 h to maximize the profit from the DR service.
The profit from the actual operation of the test house differed from the scheduling results, as shown in Table 3.This difference may be attributed to an error in the power consumption model of the refrigerator based on the average power consumption and the forecasting error for the noncontrollable load.In particular, because the noncontrollable load in the test house was significantly small, the error caused by the refrigerator model was considered to be the main cause.The refrigerators used in the case study were controlled by changing their operating modes.The power consumption model based on the operation mode was used for refrigerator operation due to the weak correlation between the internal temperature data and power consumption data (Figure 11).The refrigerator data obtained from the IoT platform included internal temperature, current operation mode, and power consumption.The power consumption estimated from the model had an error of up to 13.25% of the actual power consumption of the refrigerator, which was determined to be a primary factor contributing to the difference between the scheduling and actual operation profit.The test results indicated that the indoor temperature in the test house was within the range of the preferred temperature to satisfy user convenience at most times.However, in some cases, the indoor temperature was out of range owing to errors in the parameter estimation results for the air conditioner model.The average error for the indoor temperature based on the parameter estimation results was approximately 0.47 °C during the test period, as shown in Figure 12.This result may elucidate the occasionally detected out-of-range indoor temperature in the actual operation, although the scheduling algorithm results were always within this range.To analyze the economic effectiveness and operational stability of the proposed method, the proposed energy management scheme was applied to the test house for 61 days using a prototype HEMS.During this period, no errors were identified in the prototype HEMS applied to the test house, and the proposed energy management scheme generated an average profit of approximately USD 0.042/day, as listed in Table 4.This profit can repay the electricity meter installation cost required for non-IoT appliances in 8.73 years, assuming that it is a home environment with an installed electricity meter.These results indicate that the proposed energy management scheme may be effectively used to ensure efficient operation of a smart home, even in an environment wherein the data required for the HEMS are limited to the IoT platform.

Conclusions
This paper presents an energy management scheme that considers customer convenience and economic benefits in a smart-home environment with the aid of an IoT platform.In contrast to typical sensors used in general MG energy management systems, the IoT platform possesses the characteristic of irregular data acquisition cycles.Therefore, an energy management scheme that ensures long-term operation of each function in the energy management system is proposed.The case study of the test house operation confirmed the feasibility and effectiveness of the proposed energy management scheme.In the test house, the IoT appliances could replace most of the IoT sensors.Thus, the HEMS based on the proposed energy management scheme possesses considerable potential for maximizing the customer's profit while minimizing the inconveniences to the customer in a smart home.
To improve the effectiveness of the proposed energy management scheme, several challenges need to be mitigated.First, it should be analyzed whether the benefits of the case study may be continuously generated, because the case study results are over a short period of time.Second, the mathematical model for refrigerators must be improved.Third, air conditioners and refrigerators, as well as other resources such as lighting, need to be transformed into controllable resources.Lastly, it is necessary to obtain total electricity demand information from the utility to avoid installing an electricity meter for monitoring the electrical demand of noncontrollable appliances.

Figure 1 .
Figure 1.Three-level energy management strategy for MG operation.

Figure 2 .
Figure 2. Overview of a smart-home environment with an HEMS and IoT platform.

Figure 3 .
Figure 3. Irregular data acquisition intervals from IoT platform.

Figure 4 .
Figure 4. Proposed energy management scheme for HEMS.

Figure 5 .
Figure 5. Configuration of prototype software for HEMS.

Figure 7 .
Figure 7. Test house installed at the Gwangju branch of the KERI.

Figure 8 .
Figure 8. Detailed configuration of the test house in which the proposed HEMS was implemented.

Figure 9 .
Figure 9. Price profile for test house.

Figure 10 .
Figure 10.Actual daily operation results of test house.

Table 3 .
Comparison between cost of actual operation and scheduling stage result for test house.

Figure 11 .
Figure 11.Power consumption and internal temperature of refrigerators.

Figure 12 .
Figure 12.Indoor temperature on scheduling results and actual operation.
Author Contributions: H.-C.J. led the project and wrote the paper; H.-A.P. performed the parameter estimation; and S.-Y.K. and K.-H.C. performed the optimal scheduling and data analysis.All authors have read and agreed to the published version of the manuscript.Funding: This work was supported by the Korea Institute of Energy Technology Evaluation and Planning (KETEP), granted financial resource from the Ministry of Trade, Industry & Energy, Republic of Korea.

Table 1 .
Data from IoT-based appliances.
was applied to estimate the parameters of the ETP model, thus improving the accuracy of the model.The nonlinear regression model used in this study is expressed as follows: [, , , ] = (min(∑  2

Table 2 .
Parameters of the home appliances in the test house.

Table 4 .
Operation cost and profits for test house during test period.