Journal of Intelligent Systems and Internet of Things

A Machine Learning Approach for Energy-Efficient IoT Systems

Mahmoud M. Ismail
Volume 1, Issue 1, pp. 61-69 (2020)
DOI: https://doi.org/10.54216/JISIoT.010105
Online: https://www.americaspg.com/journal/18/article/1615

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 Energy-efficient 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

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

Figure
Figure

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.

Figure
Figure
Figure 1. General illustration of energy consumption in IoT environment.
Figure 1. General illustration of energy consumption in IoT environment.

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:

input gate → 𝑖𝑡= 𝜎(𝑊𝑖([𝑥𝑡, 𝑦𝑡−1])) (1) forget  gate →𝑓𝑡= 𝜎(𝑊𝑓([𝑥𝑡, 𝑦𝑡−1])) (2) output gate →𝑜𝑡= 𝜎(𝑊𝑜([𝑥𝑡, 𝑦𝑡−1])) (3) 𝑔𝑡= 𝑡𝑎𝑛ℎ(𝑊𝑔([𝑥𝑡, 𝑦𝑡−1])) (4) input modulation gate →𝑐𝑡= 𝑓⊙𝑐𝑡−1 + 𝑖⊙𝑔 (5) 𝑦𝑡= 𝑜⊙𝑡𝑎𝑛ℎ(𝑐𝑡) (6)
Figure
𝐴𝑡𝑡𝑒𝑛𝑡𝑖𝑜𝑛(𝑄, 𝐾, 𝑉) = 𝑠𝑜𝑓𝑡𝑚𝑎𝑥(𝑄𝐾𝑇 ) 𝑉 (7) √𝑑𝑘

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.

𝑛 Logcosh: 𝑙= 1 𝑛∑𝑙𝑜𝑔(cosh(𝑌𝑖−𝑌̂𝑖))2 𝑖=1

with 𝑌𝑖and𝑌̂𝑖 denote the actual data element and predicted value, respectively.

4. Experimental Results and Discussion

Figure
Figure

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.

Figure 2. illustration of the correlation maps for the variable of IoT energy consumption dataset.
Figure 2. illustration of the correlation maps for the variable of IoT energy consumption dataset.
Table 2. summary of the hyper-parameters of our model

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

Figure
𝑛 𝑀𝑒𝑎𝑛 𝑆𝑞𝑢𝑎𝑟𝑒 𝐸𝑟𝑟𝑜(𝑀𝑆𝐸) = 1 2 (10) 𝑛∑ (𝑌𝑖−𝑌̂𝑖) 𝑖=1 𝑛
𝑛 𝑅𝑜𝑜𝑡 𝑀𝑆𝐸(𝑅𝑀𝑆𝐸) = √1 2 (11) 𝑛∑ (𝑌𝑖−𝑌̂𝑖) 𝑖=1 𝑛 𝑀𝑒𝑎𝑛 𝐴𝑏𝑠𝑜𝑙𝑢𝑡𝑒 𝐸𝑟𝑟𝑜𝑟 (𝑀𝐴𝐸) = 1 |𝑌𝑖−𝑌̂𝑖| (12) 𝑛∑ 𝑖=1
24 𝑀𝐴𝑃𝐸= 1 𝑛(∑|𝑌𝑖−𝑌̂𝑖| ) × 100% (13) 𝑌𝑖 𝑖=1
Figure

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.

Figure 3. loss curves of the proposed method.
Figure 3. loss curves of the proposed method.

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.

Figure

[9]. Wei, C., & Li, Y. (2011, September). Design of energy consumption monitoring and energy-saving

Figure

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.

References

[1].  Javed,  A.,  Larijani,  H.,  &  Wixted,  A.  (2018).  Improving  energy  consumption  of  a  commercial  building with IoT and machine learning. IT Professional, 20(5), 30-38.

[2].  Ventura, D., Casado-Mansilla, D., López-de-Armentia, J., Garaizar, P., López-de-Ipina, D., & Catania, V. (2014).  ARIIMA:  a  real  IoT  implementation  of  a  machine-learning  architecture  for  reducing  energy consumption.  In Ubiquitous  Computing  and  Ambient  Intelligence.  Personalisation  and  User  Adapted Services:  8th  International  Conference,  UCAmI  2014,  Belfast,  UK,  December  2-5,  2014.  Proceedings 8 (pp. 444-451). Springer International Publishing.

[3].  Chafii, M., Bader, F., & Palicot, J. (2018, April). Enhancing coverage in narrow band -IoT using machine learning. In 2018 IEEE Wireless Communications and Networking Conference (WCNC) (pp. 1-6). IEEE.

[4].  Mahdavinejad, M. S., Rezvan, M., Barekatain, M., Adibi, P., Barnaghi, P., & Sheth, A. P. (2018). Machine learning for Internet of Things data analysis: A survey.  Digital Communications and Networks, 4(3), 161-175.

[5].  Azmoodeh, A., Dehghantanha, A., Conti, M., & Choo, K. K. R. (2018). Detecting crypto-ransomware in IoT  networks  based  on  energy  consumption  footprint. Journal  of  Ambient  Intelligence  and  Humanized Computing, 9, 1141-1152.

[6].  Shafique, M., Theocharides, T., Bouganis, C. S., Hanif, M. A., Khalid, F., Hafız, R., & Rehman, S. (2018, March). An overview of next-generation architectures for machine learning: Roadmap, opportunities and challenges  in  the  IoT  era.  In 2018  Design,  Automation  &  Test  in  Europe  Conference  &  Exhibition (DATE) (pp. 827-832). IEEE.

[7].  Georgiou,  K.,  Xavier-de-Souza,  S.,  &  Eder,  K.  (2017).  The  IoT  energy  challenge:  A  software perspective. IEEE Embedded Systems Letters, 10(3), 53-56.

[8].  Serra,  J.,  Pubill,  D.,  Antonopoulos,  A.,  &  Verikoukis,  C.  (2014).  Smart  HVAC  control  in  IoT:  Energy consumption minimization with user comfort constraints. The Scientific World Journal, 2014.

[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 man agement 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.