1. Introduction
Home appliances are considered to account for a large portion of smart home energy usage because appliances have increased in number in recent years. This is due to the introduction of many new home appliances that help consumers enjoy a comfortable lifestyle [
1]. In fact, this comfort comes with the costs associated with home appliances used to support modern and ever-evolving technologies. Some of these IoT devices [
2] are dishwashers, refrigerators, microwaves, and smart cars [
3].
Due to the increase in appliances, energy efficiency has become a major challenge for many organizations. With an ever-growing population, increasing demand for energy, and the need to reduce energy consumption in smart homes, it is increasingly important to find ways to make energy consumption more efficient and sustainable. However, this can be challenging due to the complexity of the processes and systems involved. Using data to predict energy efficiency can be an effective solution to this problem. Data can be used to address many different types of inefficiencies.
The IoT [
4] in the energy field is rapidly expanding as it becomes more affordable and efficient. Recently, some startups have focused on developing small home-appliance monitors to assist users at home. These devices can monitor weather conditions, appliance conditions, and other environmental information and send the data to a monitoring server. This technology enables energy systems to monitor smart homes without having to make house calls. In the future, IoT devices will enable users to deliver the remote control of energy settings around the world. This will allow us to create an eco-friendly environment.
CPS systems [
5] are based on prediction, analysis, optimization, control, and scheduling, and are considered to be the solution to this domain [
6]. An exemplary CPS architecture shown in
Figure 1 is needed because of the diversity and variation involved in area and user-dependent energy data. In such systems, many smart home appliances could be monitored remotely using technologies such as wearables and smart-home devices. In addition, if intelligence is embedded into these movable devices/appliances [
7,
8], it is possible to enhance the performances of energy systems in many ways, e.g., energy optimization based on real-time monitoring. This could also help cut costs in smart homes by reducing the requirement for the user to stay at home for controlling the home appliances.
The CPS problems are divided into layers, such that there is a clear relationship between each entity of a layer. This enables an open design where dependency is removed by following and employing a service-oriented architecture. The main components involved in an energy-optimization system that are meant to solve complex problems are the predictor, optimizer, scheduler, and controller, which can be visualized in
Figure 1.
Monitoring [
9] of smart home and healthcare appliances could be done through the use of technologies such as wearables and smart devices [
10], as depicted in
Figure 1. It enables the energy systems to get more insights into the data patterns, which could help in planning the future efficiently. This could also help cut costs in smart homes by reducing the requirement for the user to stay at home by controlling the home appliances, thereby reducing the other complications associated with the optimization of smart home energy control systems. It could also help maintain a healthy environment with fewer errors and streamline administrative tasks. In this work, we have used the appliance energy data [
11,
12] and the information related to energy-system considerations [
13,
14].
Optimization is an important part of saving resources [
15]. Regarding energy, a variety of optimization methods can be performed by tweaking a few settings in the home, office, or hospital [
16]. Some of these settings are manually adjusted, such as controlling temperature and humidity by carefully switching appliances on and off at the correct times of the day. For this purpose, optimization techniques are used in machine learning techniques to train the model.
Current optimization techniques somewhat reduce energy usage but overlook user convenience, which is the main goal of introducing home appliances. Therefore, there is a need for an optimization method that effectively addresses the trade-off between energy saving and user convenience. In current optimization techniques, the inclusion of weather metrics other than temperature and humidity is also needed to effectively optimize the energy cost of controlling user-desired room settings. This research involves work for an optimization technique that addresses the trade-off between energy saving and user convenience and includes air pressure, dew point, and wind speed. To test the optimization, a hybrid approach utilizing GWO [
17] and PSO [
18] was modeled for this purpose. In addition, this work involves using appliance energy prediction [
19] to enable proactive energy optimization. The LSTM model was designed for energy prediction. Both prediction and optimized control allow the proactive and effective control of smart home appliances, and can be evaluated through the results provided.
The optimization layer shown in
Figure 1 refers to finding an optimal solution to the problem under consideration. This can be related to minimizing or maximizing the target variable. For this, an objective function was designed, implemented, and evaluated, which helps in making the decision of selecting the best candidate algorithm for optimization. It allows the system to make decisions about system scheduling and control so that the problem is solved accordingly. This layer, i.e., optimization, uses many algorithmic techniques, such as PSO, GWO, GA, Bayesian optimization.
Prediction is a way of knowing the future. From
Figure 1, provision of better control over energy systems can be realized in the domain of CPS. Making better use of data in this way can also help to improve the reliability and availability of the system, which can be an important benefit in environments where resources may be limited. Being able to predict [
20] and prevent many problems ahead of time can make it easier to implement changes and improvements as necessary, saving time and increasing productivity overall.
Many companies are already using predictive data analytics to improve their energy efficiency and reduce costs. IBM is an example of a company that is applying this approach in many areas, including energy management systems, supply-chain optimization, and urban infrastructure management. IBM has worked with a wide range of clients, including large government agencies and private companies, such as Walmart and FedEx. The company has also developed a number of its products that use predictive data analytics to improve energy efficiency and reduce costs.
The prediction layer is responsible for providing relevant predictions about the environmental metrics involved in system. For this, machine learning techniques are used, e.g., LSTM [
21,
22,
23]. For data patterns that change over time, RNN techniques are used. Similarly, many techniques can be applied according to data attributes.
Scheduling [
24] the appliances is very important, as it may affect the energy consumption and device performance. Thus, it must be carefully planned. The information being used in decisions for control devices has turned out to be very handy, as it provides knowledge and the state of the environment. This includes both operational data and information about existing systems, and data about current patterns of energy use and information about future requirements. When used effectively, data can be used to predict and prevent many of these problems. This can help to improve efficiency and reduce operating costs. It can also help reduce the environmental impact of operations by improving the sustainability of the system and reducing the use of energy resources in an optimized way. For example, data collected during the testing of new equipment can be used to create a system model that can be used to accurately predict the performance of new equipment when it is installed into an existing system.
Scheduling and controlling [
25,
26] are the next steps after finding the best solution to the identified complex problem and can be visualized in
Figure 1. These techniques give us the opportunity to apply the optimal appliance configurations and their settings to save the energy in smart homes. These steps allow the system to implement optimal solutions and control the environment, such that the systems; behavior can be analyzed before and after. To schedule tasks and control behavior, an IoT “app store” is used, in which tasks are mapped, assigned execution times, and deployed accordingly.
In addition, machine learning in smart applications [
27] can be used to process and analyze vast amounts of data and improve energy utilization by taking control of the appliances and optimizing smart homes’ energy use. The advancement in technology has also made it possible to deploy AI-powered robots [
28] in the operating room to perform control tasks while allowing the user to operate remotely using a control appliance attached to the robot. These movable devices can also assist with monitoring vital signs while functioning so that the time to change control parameters of the smart home can respond proactively to ensure the comfort of the user and optimization of energy at the same time.
This paper aims to provide a solution to the problem of maximizing the energy efficiency of a particular home through advanced machine learning algorithms. To attain this goal, we first discuss the various models that are used to build energy-optimization models for homes and the challenges that arise when implementing these models in the real world. We also introduce techniques that can be used to optimize energy usage based on machine learning. Thereafter, we compare the performances of these techniques and finally present our results. Following this, cost analyses are performed for identifying the monetary costs associated with achieving optimal energy efficiency from a particular home. Finally, we discuss these findings in the context of energy saving by providing energy management recommendations that will minimize energy costs and also improve the efficiency of these homes. This paper has a list of contributions to this domain of research.
Weather data analytics: We found the importance of each feature and estimated its impact on the target variable, i.e., appliance energy.
Energy-optimization model: We modeled the energy-optimization model not only based on temperature and humidity but several other weather factors too, i.e., air pressure, dew point, and wind speed. We integrated their weight factors, which were calculated based on the importance of each feature.
Energy-forecasting model: It was modeled to include the weight factors of each feature in LSTM. It was evaluated over different months, seasons, etc.
In
Section 2, insights about existing literature are provided. Current mechanisms’ shortages are highlighted, which the proposal tends to solve by a proactive approach. In
Section 3, details of the proposed system are provided, in which the prediction model and optimization algorithm are formulated. In
Section 4, details about the proposed system’s implementation, experimentation, and evaluation are provided. The dataset, i.e., AEP, is also explained. Finally, the conclusive remarks are made and highlighted in
Section 6.
2. Literature Review
Home appliances are thought to account for a large portion of the energy consumption of smart homes. This is due to the abundant use of IoT devices [
29]. Various home appliances, such as heaters, dishwashers, and vacuum cleaners, are used every day. It is believed that a significant amount of energy use can be reduced through proper control of such home appliances. For this purpose, optimization [
30] techniques focusing mainly on energy reduction are used. In addition, predictive techniques [
21,
22,
23] are also used for the proactive control in smart homes. This section highlights the shortcomings of existing studies and then briefs the reader on the challenges.
For the optimization of energy, several works [
30,
31,
32,
33] have been proposed. In these works, different energy saving mechanisms and techniques have been described, proposed, and evaluated through the provision of justifiable results.
One author proposed a PSO-based optimization technique [
31] such that it considers temperature and humidity metrics. This work also evaluates the proposed technique and tends to save a justifiable amount of energy. However, it does not consider other weather metrics such as air pressure, dew point, and wind speed. Considering these metrics is important because the cost of energy varies by season and refers to dependency on multiple factors, which could have an huge impact on the scope of optimization technique. Based on this understanding, we enhanced the optimization technique by utilizing a hybrid optimization technique, i.e., PSO-GWO.
Various optimization models [
30,
31] have been proposed, and the best model was proposed to improve the optimization performance. This includes the comfort factors in the optimization procedure. This involves the addition of user-desired temperature and humidity. By following this approach, the trade-off between user comfort and energy-cost saving could be made. However, this method also lacks the evaluation of optimization model without considering other weather metrics.
The authors from the articles [
30,
31] proposed a system consisting of an optimal technique to save energy of appliances in the smart-home environment. They utilized the PSO-based optimization technique to save in the energy use of appliances. This includes the use of two parameters for the overall house. However, there could be an enhancement in terms of bringing proactiveness to this process. This will not only enable before-hand optimal control of smart-home energy, but also enhance the monitoring systems of smart homes’ alarm notifications. The algorithms can be utilized by advanced energy systems [
34,
35] to manage the energy efficiently. Based on these studies, it has been found that the predictions enable proactiveness in controlling the room’s conditions according to the user-desired settings. The proposed solution enables this by providing energy optimization for the energy forecasts instead, which not only enables proactiveness, but allows the system to be prepared for alerting the consumer.
The authors of the article [
32] proposed a system comprising PSO-based ensembled models for the energy forecast. This includes the feature-selection approach for enhancing the forecast accuracy. However, the analysis could be improved by extending it to different seasons, months, areas, weekends, weekdays, and times of the day. To this end, our proposal tends to include this evaluation in the energy forecasts by considering the weight factor of each feature, rather than just selecting the features. This evaluation was required to enhance the prediction model’s diversity. We performed a thorough examination of the data comprising 29 features, of which a few were selected based on the co-variance with appliance energy consumption. By doing so, we utilized these weight factors in the optimization model as well. The predictions considering the weight factors allowed us to improve the RMSE score.
Energy optimization can be achieved in many ways [
36]. However, this paper focuses on analyzing the data and finding the importance of each feature for the optimization of energy use using machine learning techniques, and on minimizing the cost of energy consumption required for controlling the appliances. To achieve this, it is necessary to utilize certain machine learning techniques, such as PSO and GWO, that can be used for building the model to achieve optimal efficiency by altering the energy demand in a particular home. The model trained with these techniques was then validated using the data [
11,
12] in different cases to achieve the optimal level of energy conservation in a home. In addition, energy forecasting is also discussed to give an idea of the better control it provides, to save the energy in advance.
For the prediction of appliance energy, existing forecasting models [
21,
22,
23] take into account the latest techniques. In these works, time-series forecasting methodologies, mechanisms, and techniques are described, proposed, and evaluated through the provision of justifiable results.
In [
21], an LSTM ensemble network was trained to learn the adaptive weighting mechanism. Some techniques [
22] utilize deep learning to improve the performance, whereas some of them [
23] make short-term forecasts. However, the seasonal factor is missing in these works, which could be accounted for in the training process after the thorough analysis of seasonal data. Based on this analysis, they could be assigned weights varying over the season, month, weekdays, weekdays, etc. We tend to improve the accuracy of forecasting model [
37] in the proposed system by evaluating the RMSE score of our model applied over the given datasets described in
Section 4.2.
Overall, the proposed system tends to enhance the optimization for better control of energy use in smart homes. Firstly, for better control, a prediction model was designed. This was designed in such a way that it performs better in various weather conditions due to the consideration of weight factors of the selected features. This includes the addition of other weather metric weight factors for air pressure, dew point, and wind speed. Secondly, it enables proactiveness in the optimization problem of energy systems in smart homes. In addition, it includes evaluation factors that make the prediction/forecast model diverse in nature and applicable to many regions—the secondary objective of this work. Conclusively, according to the comparison of our results with the current literature [
30,
31,
33], the other above-mentioned weather factors play important roles in saving energy better, as they also impact energy consumption due to the fact that each season’s energy consumption is different, thereby highlighting the requirement of such an optimization technique to cater to them. The proposed system’s results regarding prediction and optimization together prove the it outperforms the existing energy-optimization systems and enables better control over smart-home energy use.
3. Proposed System
This section is categorized into three sections, i.e., preprocessing, prediction, and optimization. Details on preprocessing the data and extraction of feature weight factors is described are
Section 3.1. Description of appliance energy forecasting can be found in
Section 3.2. The technique for controlling the appliances to save on energy in an optimal way is explained in
Section 3.3.
3.1. Preprocessing
In this section, we describe the steps we followed to find the importance of features and to calculate the weights representing the impacts of features. This was required to enhance the performances of prediction and optimization models. In prediction, the weights were passed as an input during the training process, whereas the weights were applied while calculating the energy cost to control the appliances in the optimization simulations.
The preprocessing shown in
Section 4.2 included the removal of nulls, zeros, and unnecessary features, and evaluating the importance of each feature against the target variable, i.e., appliance energy. These actions are required for enhancing the performance of the the proposed time-series forecasting model.
Table 1 describes the variables used for scaling the dataset.
Firstly, the unnecessary features must be removed—those which do not have any impact or may have redundant data. For this purpose, we utilized the covariance matrix values. Based on this analysis, some of the temperature and humidity features were removed from the dataset. The column lights were also removed due to abundance of zeros. All the filters were applied after thorough analysis, from the findings of correlation, zeros, nulls, etc.
Secondly, scaling dataset features is a required step [
38] before training the model. This is because the existing models perform well over a smaller range of numbers. From the perspective of optimizers, the learning rate can easily be detected and enables a friendly environment for experimentation. Standard and min-max scalers are widely used for this purpose. Equation (
1) depicts scaling of the dataset, a pre-processing step required before training.
refers to the scaled dataset. It is retrieved after applying
to scale down data within a discrete set, i.e., between −1 and 1. The scalar value
x refers to a value from a feature vector
X;
and
refer to minimum and maximum scalar values from feature vector
X, respectively. With the use of Equation (
1), the dataset’s features are scaled as follows:
Thirdly, weight factors of each feature are calculated. This is accomplished by applying the scaled data to multiple models for the selection of the best model configurations and training settings.
To get the best hyper-parameter [
11] configurations for a model, we applied multiple models, e.g., MLP regressor, GBC, XTR, RF, SVR, Ridge, lasso, k-NN regressor, and XGB regressor. Among all these models, the extra tree regressor outputs the best results with the least RMSE score and maximum R2 score shown in
Figure 2. Based on these results, we applied Boruta algorithm and GSCV to get the weight coefficients which refer to the importance of each feature represented by a scalar value. Weight coefficients can be retrieved by using the command
. The importance values are then scaled within the range of 0 and 1, which are then used in the prediction and optimization problems.
The Boruta algorithm was used to identify the feature importance, i.e., weight coefficients. Based on all features’ importance values, the weight factor of each was calculated and assigned to each feature so that they could be applied in prediction and optimization mechanisms for better performance.
3.2. Prediction
Table 2 describes the variables used in the prediction problem.
The proposed appliance-energy-prediction model is shown
Figure 3. It shows an LSTM based model which comprises input, hidden, and output layers, along with its LSTM units. It can be visualized that the temperature, humidity, air pressure, dew point, wind speed, etc., are passed in, along with their calculated weights. The addition of weight factors refers to the importance of that feature. This weight factor shows the impact of that feature over the target variable, i.e., appliance energy.
For the prediction, we utilize an LSTM layer, and then a fully connected dense layer. Applying features and their calculated weight factors enhances the performance of prediction over the temporal variation. The configuration of proposed LSTM model also involves setting the numbers of layers, neurons, epochs (50), and learning-rate (0.01) for better training. The data features used as an input for prediction of appliance energy are temperature, humidity, air pressure, dew point, and wind speed, along with their weight factors. Formulation of the proposed time-series prediction model based on LSTM is explained in the following section.
3.3. Optimization
Table 3 describes the variables used in the optimization problem.
In this section, the optimization model is described, which includes the explanation of its internals and the formulation. In
Figure 4, it can be seen that the proposed optimization makes the use of PSO-GWO hybrid approach and involves the other weather metrics, which are temperature, humidity, air pressure, dew point, and wind speed. In contrast, the previous approach only makes the use of temperature and humidity. Along with this, the proposed approach also makes the use of weight factors calculated through feature importance, as described in
Section 3.1.
An optimization model is defined for the optimal control of the energy use of smart homes. The dataset [
11,
39] contains 29 features, from which only the most important features were selected, and the following formulation is be applied.
5. Discussion
In this section, the findings of the current work are discussed. Current energy systems have the limitation of performing with different levels of efficacy depending on the season or month. This is due to the fact that they do not account for the level of impact features related to the time of year have on the energy. Analysis and supporting results from
Section 4 showed that our energy-optimization scheme works rather well in all of the seasons and months.
The energy-saving results shown in
Table 10,
Table 11 and
Table 13 also support the idea of considering weight coefficients in existing optimization techniques to enhance their performances in certain seasons and months as well. The values that we used in this work for the dataset are shown in
Table 15.
The primary findings of this work are that the inclusion of properly analyzed weight coefficients could enhance optimization techniques and result in energy savings. They also play an important role in the prediction of appliance energy use.
The secondary focus of this work was to consider the level of impact of a specific feature on the energy consumption. For this purpose, the weight coefficients are included in both the energy prediction and optimization models.
From physical point of view, energy savings could be explained as such: if the appliances’ optimal control parameters are not frequently updated, then their energy efficiency is significantly reduced. This wasted energy could be saved for that specific dataset/area where the appliances were unnecessarily turned on.
It can also be deduced from the seasonal and month-wise comparison results that the weight factors play an important role in the optimization problem. In this work, we primarily focused on finding the best weight factors for the region used in this study. It can be confidently said that if the same technique used to estimate the weight factors is applied carefully for another dataset representing different regions with their own weather conditions, the optimization model will perform the same. This is due to the use of weight factors which reflect different regional weather conditions.