A Machine Learning Approach for Energy-Efficient IoT Systems
Mahmoud M. Ismail
Faculty of computers and Informatics, Zagazig University, Zagazig, 44519, Egypt
Email: mmsabe@zu.edu.eg
Abstract
The energy challenge in IoT refers to the significant energy consumption of IoT devices, which can lead to sustainability issues, shorter battery life, and increased operating costs. IoT devices are known for their high energy consumption, and optimizing their energy usage can have a significant impact on sustainability and cost. Machine learning (ML) can learn from data and patterns to predict and control energy consumption in IoT systems, making them more energy efficient. The main contribution of this paper is the establishment of a novel deep learning framework for enhanced predictive modeling of energy consumption in IoT networks to help realize Energyefficient IoT systems. our framework applies recurrent processing to capture long-term relations in the energy consumption of IoT appliances. Then, the self-attention mechanism is devised to help the model to focus on important predictive features. Simulation experiments against the competing ML baselines demonstrate the predictive capability of our framework. Keywords: Machine Learning; IoT; Energy Consumption, Sensors
carbon emissions. ML algorithms can be used to optimize the operation of IoT devices and systems by analyzing data collected from sensors, predicting future events, identifying patterns, and adapting to changes in the environment or user behavior. One of the primary benefits of using ML for IoT energy efficiency is that it allows for the development of energy-saving strategies that are tailored to specific devices and systems. For example, ML algorithms can analyze the energy consumption patterns of devices and determine the optimal times to activate or deactivate certain functions. By customizing energy-saving strategies for each device, ML algorithms can achieve greater energy savings than more general approaches [5-8]. However, there are several challenges associated with using ML for IoT energy efficiency. One of the biggest challenges is the need to balance the computational requirements of ML algorithms with the energy consumption of IoT devices [9]. To be effective, ML algorithms require significant computational resources, which can increase the energy consumption of IoT devices. Therefore, developing efficient ML algorithms that can run on low-power devices is critical for achieving energy savings without sacrificing performance. Additionally, ensuring the security and privacy of data collected by IoT devices is essential, as ML algorithms rely on access to large amounts of data to be effective [10-12]. Overall, the role of ML in improving the energy efficiency of IoT devices and systems is significant, but careful consideration of the challenges associated with its implementation is necessary for success [13-18]. To this end, this paper's contribution lies in developing a new deep-learning framework for improved predictive modeling of energy consumption in IoT networks. The prediction-generated framework is precise enough to guide the stockholders and decision maker about the future consummation of IoT appliances. Recurrent learning modules are applied to capture the historical dependencies in the IoT devices. attention mechanisms are also introduced to empower the predictive power of the model. The upcoming sections of this work are outlined as follows: The literature on real-world uses of ML methods for IoT energy management is reviewed in Section 2. The approach of the suggested framework is discussed in Section 3. The experiments from this paper and associated settings are covered in Section 4. The main conclusions of this research are briefed in Section 5.
3. Machine learning for IoT energy optimization.
This section provides an in-depth discussion of the methodology of the proposed framework for predictive modeling of energy consumption in complex IoT environments. The general architecture of energy management is shown in Figure 3. As visualized, our framework can be deployed to predict the energy consumption at either cloud or edge computing layer of the network. LSTM (Long Short-Term Memory) is a popular type of recurrent neural network (RNN) that is often used for time series forecasting, including energy consumption predictions. Thus, we propose an LSTM model for energy consumption predictions. We collected historical energy consumption data and preprocessed it by normalizing the data and selecting relevant features such as temperature, time of day, day of the week, and seasonality. We created an LSTM model with multiple LSTM layers. The LSTM process receives time-series information through the following gating computations:
The training process of our model needs to optimize some objective that maximizes the predictivity of our model. thus, the log-cosh loss is used in this work.
with 𝑌𝑖and𝑌̂𝑖 denote the actual data element and predicted value, respectively.
4. Experimental Results and Discussion
RH_4 19735 39.027 4.341 27.660 35.530 38.400 42.157 51.090 T5 19735 19.592 1.845 15.330 18.278 19.390 20.620 25.795 RH_5 19735 50.949 9.022 29.815 45.400 49.090 53.663 96.322 T6 19735 7.911 6.090 -6.065 3.627 7.300 11.256 28.290 RH_6 19735 54.609 31.150 1.000 30.025 55.290 83.227 99.900 T7 19735 20.267 2.110 15.390 18.700 20.033 21.600 26.000 RH_7 19735 35.388 5.114 23.200 31.500 34.863 39.000 51.400 T8 19735 22.029 1.956 16.307 20.790 22.100 23.390 27.230 RH_8 19735 42.936 5.224 29.600 39.067 42.375 46.536 58.780 T9 19735 19.486 2.015 14.890 18.000 19.390 20.600 24.500 RH_9 19735 41.552 4.151 29.167 38.500 40.900 44.338 53.327 T_OUT 19735 7.412 5.317 -5.000 3.667 6.917 10.408 26.100 PRESS_MM_HG 19735 755.523 7.399 729.300 750.933 756.100 760.933 772.300 RH_OUT 19735 79.750 14.901 24.000 70.333 83.667 91.667 100.000 WINDSPEED 19735 4.040 2.451 0.000 2.000 3.667 5.500 14.000 VISIBILITY 19735 38.331 11.795 1.000 29.000 40.000 40.000 66.000 TDEWPOINT 19735 3.761 4.195 -6.600 0.900 3.433 6.567 15.500 RV1 19735 24.988 14.497 0.005 12.498 24.898 37.584 49.997 RV2 19735 24.988 14.497 0.005 12.498 24.898 37.584 49.997 To improve the reproducibility of our work, the hyperparameters of our model are given in Table 2.
HYPER PARAMETERS VALUE BATCH SIZE 64 OPTIMIZER Adam INIT LEARNING RATE 0.001 EPOCHS 30 DEPTH 6 CALLBACKS Early stopping Correlation analysis is a useful tool in regressive ML for identifying relationships between variables. In regression problems, correlation analysis can be used to determine how strongly the independent variables are related to the dependent variable. The correlation coefficient is a measure of the strength of the linear relationship between two variables. It ranges from -1 to 1, with 0 indicating no correlation and -1 or 1 indicating a perfect negative or positive
MSE RMSE MAE MAPE LR 0.8780 0.9370 0.7246 0.8273 SVR 0.7885 0.8880 0.5289 0.7326 RF 0.4706 0.6860 0.4914 0.5937 LGBM 0.7430 0.8620 0.2583 0.4690 XGBR 0.7586 0.8710 0.2417 0.3685 PROPOSED 0.0520 0.2280 0.1640 0.2130 Figure 3 shows the training loss curves to enable diagnosing the stability of learning behavior. It could be noted that the proposed model can reach the low loss value after only a few numbers of epochs, which reflect the rapid convergence, and show smoothed learning behaviors.
5- Conclusion This work proposed a promising approach for predicting energy consumption in IoT devices. This model combines the power of LSTM networks to capture long-term dependencies in time series data with the attention mechanism to focus on the most important features and improve model performance. The use of IoT devices is rapidly growing, and accurate energy consumption prediction is crucial for optimizing their performance and minimizing energy waste. The LSTM-attention model has shown promising results in predicting energy consumption in various IoT applications, including smart homes and industrial IoT. Proven effectiveness and competitiveness in experimental validations against state-of-the-art methods support the suggested strategy. Our approach is a viable tool for implementation in an energy management system since it can precisely predict energy consumption in IoT network.
[9]. Wei, C., & Li, Y. (2011, September). Design of energy consumption monitoring and energy-saving
management system of intelligent building based on the Internet of things. In 2011 international conference on electronics, communications and control (ICECC) (pp. 3650-3652). IEEE. [10]. Luis M. Candanedo, Veronique Feldheim, Dominique Deramaix, Data driven prediction models of energy use of appliances in a low-energy house, Energy and Buildings, Volume 140, 1 April 2017, Pages 81-97, ISSN 0378-7788. [11]. Zuo, Y., Tao, F., & Nee, A. Y. (2018). An Internet of things and cloud-based approach for energy consumption evaluation and analysis for a product. International Journal of Computer Integrated Manufacturing, 31(4-5), 337-348. [12]. Kim, M., Jun, J., Kim, N., Song, Y., & Pyo, C. S. (2018, October). Sequence-to-Sequence model for building energy consumption prediction. In 2018 International Conference on Information and Communication Technology Convergence (ICTC) (pp. 1243-1245). IEEE. [13]. Ullah, I., Ahmad, R., & Kim, D. (2018). A prediction mechanism of energy consumption in residential buildings using hidden markov model. Energies, 11(2), 358. [14]. Khan, S., Paul, D., Momtahan, P., & Aloqaily, M. (2018, April). Artificial intelligence framework for smart city microgrids: State of the art, challenges, and opportunities. In 2018 third international conference on Fog and Mobile Edge Computing (FMEC) (pp. 283-288). IEEE. [15]. Ejaz, W., Naeem, M., Shahid, A., Anpalagan, A., & Jo, M. (2017). Efficient energy management for the internet of things in smart cities. IEEE Communications magazine, 55(1), 84-91. [16]. Ouyang, Z., Sun, X., Chen, J., Yue, D., & Zhang, T. (2018). Multi-view stacking ensemble for power consumption anomaly detection in the context of industrial internet of things. IEEE Access, 6, 9623-9631. [17]. Kim, J. (2015). Energy-efficient dynamic packet downloading for medical IoT platforms. IEEE Transactions on Industrial Informatics, 11(6), 1653-1659. [18]. Sahana, M. N., Anjana, S., Ankith, S., Natarajan, K., Shobha, K. R., & Paventhan, A. (2015, December). Home energy management leveraging open IoT protocol stack. In 2015 IEEE Recent Advances in Intelligent Computational Systems (RAICS) (pp. 370-375). IEEE. [19]. Sehati, A., & Ghaderi, M. (2018, April). Online energy management in IoT applications. In IEEE INFOCOM 2018-IEEE Conference on Computer Communications (pp. 1286-1294). IEEE.