HEMS are complex systems, and the decision maker must consider two fundamental issues when planning the system operation: firstly, the system modeling, and secondly, the techniques used to obtain a solution to the problem. The problems on which HEMS are based can generally be formulated as linear programming problems, non-linear programming, and its variants, mixed-integer linear programming (MILP), and non-linear integer programming problems. In general, the problem of planning the operation of systems such as a home is a non-linear problem with a significant number of constraints and variables. However, through function linearization techniques it is possible to obtain approximations that turn the problem into a linear problem. A significant number of techniques have been applied to HEMS in recent years. However, the technique chosen depends on the nature of the problem at hand. Generally, these techniques can be divided into the following categories, adopted in this work for further classification: traditional techniques, model predictive control, heuristics and metaheuristics, and other techniques, as shown in
Figure 3.
3.1. Traditional Techniques (Mathematical Optimization)
In this article, the traditional optimization techniques for HEMS applications refer to techniques that use mathematical optimization based on exact algorithms. Hence, in this category it is considered that the solution to the problem is obtained using commercial solvers.
3.1.1. Linear Programming
Linear programming is an optimization technique where the objective function is a linear function and constraints are given by linear functions. Variables assume continuous values. It is considered the simplest way to represent mathematical programming problems. However, it may not be the most efficient way to represent complex real-world problems, mostly based on non-linear processes.
A comprehensive description of the theory of linear and integer programming may be found in [
89].
Pure linear programming problems make it difficult and computationally costly to model more complex management systems such as HEMS, so it is not often used in the design of these systems, and this is one of the reasons why few authors in recent years adopted this approach. However, a sample of the employment of this method for HEMS may be found in [
19], where the authors propose a HEMS that considers a PV-battery system and thermostatically controlled loads using linear programming to optimize the energy consumption of the loads. The objective is the minimization of operational costs.
The findings of selected papers associated with linear programming are shown in
Table 6.
3.1.2. Mixed-Integer Linear Programming
Mixed-integer linear programming (MILP) refers to optimization techniques where the objective function is given by a linear function and subject to linear constraints but includes mixed variables, continuous and discrete variables. These problems allow for greater modeling power as it is possible to consider binary variables that help to represent real-world processes more effectively. The fact that it is based on a linear problem guarantees optimality conditions, i.e., it is guaranteed to obtain a global optimum. Many research works address the formulation of the HEMS problem using MILP. Most of the HEMS consider the load in a segmented matter (multiple appliances or thermal/electrical loads), as well as the energy price information.
A HEMS is proposed for a home with electric and thermal loads, and with the consideration of electric vehicles (EV) integration in [
20].
MILP was used in [
21] where a HEMS is presented to participate in the day-ahead electricity market through demand–response strategies. All loads, including thermal, are considered for demand response.
A price-sensitive HEMS is proposed by authors of [
22], having as components a PV system, energy storage, and controllable loads.
Some authors design HEMS with a particular interest in managing energy storage systems (ESS). This is the case of the authors of [
23].
Multiple sources of energy in the same residence are also object of study. For instance, the authors of [
24] propose a HEMS for a house incorporating multi-energy resources, namely, electricity, thermal energy, renewables, energy storage, and natural gas.
A new two-level optimization algorithm for the energy management of residential appliances within a smart home is proposed in [
25]. The system includes interruptible, uninterruptible, thermostatically controlled, and non-schedulable loads, as well as the charging/discharging strategies of EVs and ESS in the presence of distributed energy resources (DER).
Other studies considered more technical aspects of the residence energy management. An example may be found in [
26], where the trading with technical influences of utility requirements is considered: Volt-Watt and Volt-Var functions.
The findings of selected papers associated with mixed-integer linear programming are shown in
Table 7.
The number of selected papers associated with a given objective for mixed-integer linear programming is shown in
Figure 4.
3.1.3. Non-Linear Programming
Non-linear programming, different from linear programming and MILP, is an optimization technique where the objective function and/or the constraints are given by non-linear functions. It represents real-world problems in a more real manner, but its main disadvantage is that it does not guarantee an optimal solution; that is, instead of a global optimal, a local optimal can be obtained. Additionally, the computation time tends to increase. For a comprehensive description of the non-linear programming theory, please refer to [
90].
As is the case of linear programming, pure non-linear programming problems are not common in HEMS. However, the authors of [
27] propose an energy management system for a residence composed solely of renewable sources, wind and PV, and batteries. The objective is to minimize the use of energy from the grid and maximize the sale of energy to the grid from renewables.
The findings of selected papers associated with non-linear programming are shown in
Table 8.
3.1.4. Mixed-Integer Non-Linear Programming
Mixed-integer non-linear programming (MINLP) is an optimization technique where the objective function and/or the constraints are given by non-linear functions. Like MILP problems, they include mixed variables. Being non-linear does not guarantee obtaining a global optimum and they can be very difficult to be solved.
MINLP has been successfully applied to HEMS. For instance, the authors of [
28] propose a HEMS with integrated renewables and energy storage.
A HEMS model for a smart home is proposed in [
29] considering different capacities of energy storage and PV subsidy policies on the scheduling of household appliances.
The findings of selected papers associated with mixed-integer non-linear programming are shown in
Table 9.
The number of selected papers associated with a given objective for mixed-integer non-linear programming is shown in
Figure 5.
3.1.5. Dynamic Programming
In dynamic programming (DP), the problem as a whole is divided into several sub-problems, i.e., a solution to the original problem is obtained through simpler problems. The optimal solutions of the sub-problems are stored in time, which allows previous calculations to help in the next stages. Using this strategy, the complexity of the problem tends to decrease [
91]. For the fundamentals for the theory of DP, please consult [
92].
DP has been applied in HEMS. For instance, the authors of [
30] proposed a HEMS for homes consisting of PV systems, batteries, and controllable loads. To solve the problem, the Differential DP (DDP) technique is presented.
A novel state-space approximate DP (SS-ADP) approach to quickly solve a HEMS problem can be found in [
31].
The findings of selected papers associated with dynamic programming are shown in
Table 10.
The number of selected papers associated with a given objective for dynamic programming is shown in
Figure 6.
3.1.6. Stochastic Programming
Stochastic programming is an optimization technique where the objective function and constraints include uncertainty in parameters and variables. The optimal value of the objective function is given by the expected value of the objective function. Stochastic programming is considered when there is knowledge about the probability distribution function. Further, these problems can be based on two-state or multi-state problems, being called two-stage stochastic programming problems or multi-stage stochastic programming problems. A set of realizations for the parameters that involve uncertainty can be considered, being designated by scenarios. Usually, each scenario is associated with a probability. A detailed description of the fundamentals of stochastic programming may be found in [
93].
Due to its characteristics, stochastic programming has been applied in HEMS, not only as the single method used but also associated with other methods to evaluate and deal with the uncertainty. To deal with the uncertainty, two situations in particular are explored with more frequency: dealing with electricity market price, especially when the system also injects energy in the grid, and dealing with multiple sources of renewable energy, in which the generation depends on factors that could suffer considerable variation, such as wind speed and solar radiation.
For instance, stochastic programming is employed by the authors of [
32] for the optimal bidding strategy for autonomous residential energy management systems. This system allows the management of the production and consumption of the house and the participation in the local market environment through the technique of stochastic programming using intervals from the scenarios that represent the uncertainty of the market price of local electricity and PV production. The problem is formulated as a two-stage stochastic programming problem. The first stage is related to the day-ahead market and the second stage is related to real-time.
The approach of multiple-stage framework stochastic programming is explored by many authors. The optimal energy management and sizing of renewable energy for a home and a microgrid are proposed in [
33], in which the problem is formulated in a two-stage approach.
In [
34], a HEMS is presented for a house composed of the PV system and battery and loads. The problem is formulated as a two-stage stochastic programming problem as well. The first stage determines the optimal day-ahead energy procurement and the scheduling of shiftable appliances. The second stage is related to the real-time operation, namely the charging and discharging process of the battery.
In [
35], a HEMS with PV systems, EVs, ESS, and thermal and electric loads is presented. The problem is formulated as a two-stage stochastic programming problem. The first stage defines the quantities of energy to be sold and purchased from the grid, and the second stage defines the decisions about customer’s convenience and DER operation, namely temperature and charging and discharging rates of EVs and energy storage.
In the same fashion of multi-resource of energy as presented above, a HEMS is presented for a home that includes wind turbines, diesel generators, and EVs in [
36].
The authors of [
37] propose a HEMS with demand response, renewable resources, and battery storage.
In [
38], a HEMS is presented, considering electrical and thermal loads.
The optimization problem is also formulated as two-stage stochastic programming in [
39] for a HEMS including wind micro-turbine, battery, EV, and electric and thermal loads. The first stage is related to trading energy with the day-ahead local market, and the second stage is related to trading energy in real-time.
Another stochastic model of a HEM system is proposed by authors of [
40]. The model optimizes the customer’s cost in different demand response programs.
In [
41], a HEMS is developed for a house consisting of different electric appliances and with generation from PV systems and battery storage.
The findings of selected papers associated with stochastic programming are shown in
Table 11.
The number of selected papers associated with a given objective for stochastic programming is shown in
Figure 7.
3.1.7. Robust Programming
In robust programming, like stochastic programming, uncertainty is considered in the parameters and variables. There is no knowledge about the probability distribution function of parameters that involve uncertainty. Instead, intervals of values for the parameters are considered. This often leads to exaggerated assumptions about the parameters, i.e., it is considered the worst case. Consequently, it is not considered a consensual technique. Further details may be found in [
94,
95].
Despite the above disadvantages, robust programming has been applied to HEMS. For instance, the authors of [
42] propose a HEMS considering a hierarchical control, having a central controller and local controllers. The central controller optimizes the schedule of the non-thermal loads. The local controllers respond to the real-time variations to obtain thermal comfort. A data-driven distributional robust optimization is proposed to guarantee solution robustness against the worst probability distribution of multiple uncertainties.
A flexible-constrained energy management model is proposed for smart-home-equipped PV systems and energy storage in [
43].
In [
44], a risk-based robust decision-making framework for smart residential buildings, considering electric and thermal appliances and plug-in hybrid vehicles is proposed.
The findings of selected papers associated with robust programming are shown in
Table 12.
The number of selected papers associated with a given objective for robust programming is shown in
Figure 8.
3.2. Model Predictive Control
The model predictive control (MPC) is an advanced method of control based on a receding horizon principle, aimed at determining the best course of action while meeting the requirements. In [
96,
97], detailed information on the theory of the MPC may be found.
The application of MPC in HEMS has developed significantly in recent years. For instance, in [
45] a HEMS for a residential building with a PV system, ESS, thermal and electric loads, and EVs is proposed. The MPC problem considered a prediction horizon of four hours for every 5 min.
The authors of [
46] propose a HEMS for a smart home focusing on the energy balance between the three phases to control both active and reactive power. Several case studies are considered, assuming a prediction horizon of 24 h, a control horizon of 24 h, and a simulation horizon of 48 h.
A comprehensive approach of a mixed-integer quadratic-programming MPC scheme based on the thermal building model and the building energy management system is employed by authors of [
47].
A HEMS is developed by employing an MPC framework in [
48] and implemented using a Branch-and-Bound algorithm. The authors discuss the selection of different parameters, such as time-step to employ, predict, and control horizons and the effect of the weather on the system performance.
A predictive HEMS for a residential building with the integration of a plug-in EV (PEV), a PV array, and a heat pump is developed by [
49]. A stochastic MPC strategy is applied.
The findings of selected papers associated with model predictive control are shown in
Table 13.
The number of selected papers associated with a given objective for model predictive control is shown in
Figure 9.
Forecasting in HEMS
A smart household, as previously mentioned, is composed of a variety of energy systems. To allow the HEMS to make better decisions, knowing the future values—forecasting—of, for example, electric loads, electricity generation and storage state of charge, is an important asset for the improvement of HEMS efficiency.
The use of forecasting models is mandatory in model-based predictive control (MBPC). The reason is that MBPC uses predictive models, that should output the modelled variable’s forecasts for each step ahead within the Prediction Horizon (PH) considered, i.e., provide multi-step-ahead forecasting. This type of forecast can be achieved in a direct mode, by having several one-step-ahead forecasting models, each providing the prediction of each step ahead within the prediction horizon. An alternative is to use a recursive version. In this case, only one model is necessary, and for each step within the PH, the inputs change, eventually employing predictions obtained in previous steps.
In this sub-section, we describe some of the articles in which the forecasting is a considerable component in the HEMS system.
In [
51], a real-time forecasting is developed considering renewable generation, and the HEMS updates the inputs of scheduling system before each optimization calculation.
In [
34], forecasting is employed in an integrated HEMS framework where it is assessed together with monitoring, scheduling, and coordination, focusing on the renewable energy generation and storage of the residence.
The authors of [
98] develop power predictions using GA-ANN for a day-ahead forecast in a short-term fashion.
In [
99], the authors used a Muti-Objective Genetic Algorithm (MOGA) framework to design a multi-step ahead recursive forecast model (a Radial Basis Function ANN) for the power demand in a residential HEMS. In [
100], the same residence was used as case study to propose an ensemble forecasting approach. The ensemble of models is easily obtained by the MOGA approach and has been shown to obtain more accurate forecasts than the single solution. Although MOGA is a metaheuristic it is only used for model design, and not specifically for HEMS.
The authors of [
84] use ANN to forecast the renewable energy sources (wind and solar) of a net zero energy building. In [
101], the authors explore forecasting techniques in a HEMS from a prosumer perspective.
In [
102], using the MOGA formulation, the authors develop a short-term forecasting of the photovoltaic solar power, to be used in a HEMS.
Forecasting is also very important in residential energy communities. In [
103], the authors review a variety of forecasting methods to be employed in the energy communities control context. In [
104], forecasting is explored considering the load demand, wind power, and electricity price.
3.3. Heuristics and Metaheuristics
Heuristics stand for strategies using readily accessible information to control problem-solving processes in man and machine, to obtain good enough results in an admissible length of time. Detailed information about heuristic search strategies may be found in [
105,
106]. A metaheuristic guides a subordinate heuristic using concepts derived from artificial intelligence, biological, mathematical, natural, and physical sciences to improve their performance. Information about metaheuristics theory may be found in [
107,
108]. Consequently, one of the differences between heuristics and metaheuristics is that heuristics are problem dependent; on the contrary, metaheuristics are problem independent.
Currently, heuristics and metaheuristics are the most used techniques in HEMS, taking advantage of the computational efficiency they often provide. For instance, a domestic microgrid is presented and an energy management system developed in [
50]. The authors present four metaheuristics: grey wolf optimization (GWO), binary particle swarm optimization (PSO) (BPSWO), genetic algorithm (GA), and wind-driven optimization. Furthermore, they developed several combinations of these metaheuristics.
The authors of [
51] propose an energy management system based on real-time electricity scheduling for a house that includes renewable, wind energy, and PV and ESS. GA is applied to obtain the solution of the problem.
A HEMS is presented in [
52] that must guarantee the house’s resilience, i.e., to be able to be self-sufficient when there is a failure in the network. To solve the problem, a new metaheuristic called Natural Aggregation Algorithm (NAA) is presented.
In [
53] a HEMS is proposed for the optimal management of appliances in a home. To find the solution to the problem, four heuristics are presented: bat algorithm, GWO, moth flam optimization, and Harris hawks optimization.
A HEMS is presented in [
54]. To obtain a solution to the problem, four metaheuristics are considered: integrated multi-objective antlion optimization, multi-objective PSO, the second version of the non-dominated sorting GA, and the basic antlion optimizer algorithm.
A HEMS for energy management at the level of electricity and heat is developed in [
55]. To solve the problem, a fusion between the Harmony Search Algorithm technique and the PSO is presented.
The optimal planning of various energy sources, namely, fuel cell-based micro-combined heat and power (CHP), batteries, and EVs is proposed in [
56]. For this, the real coded GA technique is presented.
A HEMS for a consumer in the presence of an energy storage and PV generation is developed by authors of [
57]. To solve the problem, a hybrid technique between GWO and GA is presented, named Hybrid Grey Wolf GA (HGWGA).
In [
58], a HEMS is proposed for a home with demand-responsive applications, PV systems, and ESS. The Polar Bear Optimization (PBO) technique is presented.
A scheduling algorithm for the energy management of a house consisting of PV and wind systems, batteries, diesel generators, and responsive loads is proposed in [
59]. To solve the problem the PSO is used.
In [
60], a HEMS is proposed for a smart home. To solve the problem, GWO is proposed.
The authors of [
61] propose a HEMS for a household considering DER and EVs. To solve the problem, a version of the GA, the improved GA, is presented.
A HEMS is proposed in [
62], for a home with renewables, wind and PV, ESS, and electric and thermal loads. To solve the problem, GA is used.
In [
63], a smart grid scenario is developed with a novel restricted and multi-restricted scheduling method for the residential customers. The optimization problem is developed under the time-of-use (TOU) pricing scheme. To optimize the formulated problem, GWO is utilized.
The problem of optimal scheduling of home appliances in HEM systems is formulated as a constrained, multi-objective optimization problem with integer decision variables and a powerful variant of PSO, named as enhanced leader (EL) PSO in [
64]. In the proposed multi-objective formulation, the effect of weight factor on optimal electricity bill of the home and optimal comfort of the consumers is meticulously investigated.
In [
65], an optimization problem for HEMS using a hybrid approach based on cuckoo search algorithm and earthworm algorithm is developed. However, there is a problem in such HEMS, that is, an uncertain behavior of the user that can lead to forced start or stop of an appliance, deteriorating the purpose of scheduling of appliances. To solve this issue, coordination among appliances for rescheduling is incorporated in HEMS using game theory.
The min-conflict local search algorithm (MCA) is hybridized with the GWO for the power scheduling problem in smart home in [
66]. The proposed method is called GWO-MCA. MCA is utilized as a new operator of GWO to improve its exploitation capability in addressing constraint satisfaction problems, particularly scheduling problems.
The authors of [
67] propose a computational intelligence model for the Internet of Things applications by applying the concept of swarm intelligence into connected devices. The bee colony approach is used.
The HEMS performance improvement by using a dragonfly algorithm and GA heuristic-based approach is evaluated in [
68].
In [
69], a new optimal method is developed for HEMS based on the Internet of Things. The problem is solved using an improved version of the butterfly optimization algorithm (BOA).
The findings of selected papers associated with heuristics and metaheuristics excluding reinforcement learning are shown in
Table 14.
The number of selected papers associated with a given objective for heuristics and metaheuristics excluding reinforcement learning is shown in
Figure 10.
Reinforcement Learning (RL)
RL is one of the techniques in the heuristics and metaheuristics category that has grown the most in recent years. In this sense, a specific section on this technique is created.
A HEMS is developed in [
70] using the reinforcement learning (RL) technique. Through the Q-learning algorithm, it is possible to obtain an appliance operation planning.
The authors of [
71] propose a HEMS focusing on demand response. To solve the problem the RL technique is presented.
The energy management for a residential building is presented in [
72]. The building has PV panels, EVs, and micro-CHP. To solve the problem, the RL technique is used.
The authors of [
73] developed a HEMS for a home with electric and thermal loads, PV systems, energy storage, and EVs. To solve the problem, the RL is employed, more precisely deep Q-learning and double deep Q-learning.
The authors of [
74] provide a steady price prediction model based on artificial neural networks. In cooperation with forecasted future prices, multi-agent RL is adopted to make optimal decisions for different home appliances in a decentralized manner.
In [
75], based on the living habits of the residents, dependency modes for house energy resources are proposed and are integrated into the RL algorithms. Through the case studies, it is verified that the proposed method can schedule the appliances properly to satisfy the established dependency modes.
In [
76], a data-driven approach that leverages RL to manage the optimal energy consumption of a smart home with a rooftop solar photovoltaic system, ESS, and smart home appliances is developed. The same authors propose a hierarchical deep RL (DRL) method for the scheduling of energy consumption of smart home appliances and DER including an ESS and an EV [
109].
The findings of selected papers associated with reinforcement learning are shown in
Table 15.
The number of selected papers associated with a given objective for reinforcement learning is shown in
Figure 11.
3.4. Other Techniques
This category includes all other techniques that do not fit into the categories presented or that have hybrid versions of the techniques described above.
Scheduling and optimal planning of appliances are approached by different authors. In [
77], a HEMS for the optimal planning of appliances, energy resources, and electro-thermal storage is presented. For this, the combination between the Modified Flower Pollination Algorithm and the MILP is presented.
The authors of [
78] provide a new residential energy management system based on the convolution neural network (CNN) including a PV array environment. The CNN is used in the estimation of the non-linear relationship between the residence PV array power and meteorological datasets. The residential energy management system has three main stages for the energy management such as forecasting, scheduling, and real functioning. A short-term forecasting strategy has been performed in the forecasting stage based on the PV power and the residential load. A coordinated scheduling has been utilized for minimizing the cost function.
A novel framework for HEMS based on RL and employing neural networks in achieving efficient home-based demand response is addressed in [
79].
A HEMS for a smart home having a PV system and battery storage is proposed in [
80]. To solve the problem, a hybrid technique between stochastic programming and robust optimization is presented.
The authors of [
81] propose a HEMS with a focus on demand response. To solve the problem, a hybrid technique between the PSO and the two-point estimate method is used. The technique is shown to guarantee shorter computation times without reducing the accuracy of the results.
The energy management for a house consisting of ESS, fuel cell and electrical and thermal loads is proposed in [
82]. To solve the problem, a hybrid technique between PSO and sequential quadratic programming is presented.
A multi-objective optimization of offline strategies for HEMS is addressed in [
83]. Two approaches are compared, namely the common timetable-based and the proposed approach based on decision trees. The timetable-based strategy is optimized using multi-objective GA and the tree-based using multi-objective genetic programming. The results of the latter show a reduction in costs of up to 17%.
A novel technique for managing the energy in a zero-energy building using a combination of neural networks and MPC is proposed in [
84].
A combination of RL and fuzzy reasoning is employed in [
85] for an effective energy management system with demand response. RL is considered as a model-free control strategy which learns from the interaction with its environment by performing actions and evaluating the results.
The authors of [
86] propose the design and implementation of a fuzzy control system that processes environmental data to recommend minimum energy consumption values for a residential building. This system follows the forward chaining Mamdani approach and uses decision tree linearization for rule generation.
In [
87], the implementation of a HEMS based on a fuzzy logic controller is addressed. The proposed HEMS manages the energy from the PV to supply home appliances in the grid-connected PV-battery system. Similarly, a new power management strategy based on fuzzy logical combined state machine control is developed in [
88]. Its effectiveness is compared with various strategies such as DP, state machine control, and fuzzy logical control with simulation.
The findings of selected papers associated with other techniques are shown in
Table 16.
The number of selected papers associated with a given objective for other techniques is shown in
Figure 12.