Skip to main content

Advertisement

Log in

An energy consumption prediction approach in smart cities by CNN-LSTM network improved with game theory and Namib Beetle Optimization (NBO) algorithm

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

One of the challenges of the Internet of Things and smart cities is energy consumption and energy theft. An accurate approach to predicting energy consumption and detecting energy theft in smart cities increases efficiency and energy efficiency. Forecasting energy consumption makes energy production based on the needs of consumers, and detecting energy theft makes energy consumption forecasting models more accurate. In this manuscript, in the first step, the data set is balanced using the generative adversarial network based on game theory and the synthetic minority oversampling based on sample density method. In the second step, the basic features of the samples are selected with the Namib beetle optimization (NBO) algorithm to reduce the input of the CNN-LSTM model. In the third step, the hyperparameters of the CNN-LSTM model are optimized to reduce the prediction and classification error rate with the NBO algorithm. In the Benin Electricity Company dataset, the proposed method has fewer errors in predicting energy consumption than the LSTM, GRU, ARIMA-LSTM, and ARIMA-GRU methods. On the Individual Household Electric-Power Consumption dataset, the proposed method provides lower energy consumption prediction errors than convolutional neural network (CNN), long short-term memory (LSTM), and CNN-LSTM. The NBO algorithm optimizer CNN-LSTM hyperparameters more accurately than Coati optimization algorithm, jellyfish search optimization, Harris hawks optimization (HHO), and African vultures optimization algorithm. Experiments on the State Grid Corporation of China dataset showed that the proposed method's accuracy, sensitivity, and precision in predicting energy theft are 98.93, 98.32, and 96.78%. The proposed method is more accurate than CNN, DeepCNN, CNN-LSTM, and the gated recurrent unit (GRU) method.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20

Similar content being viewed by others

Data availability

The datasets generated during and/or analyzed during the current study are available in: 1. https://www.mdpi.com/1996–1073/16/12/4739. 2.https://archive.ics.uci.edu/dataset/235/individual + household + electric + power + consumption. 3. 64. Çetiner, H., & Çetiner, İ. (2021). Analysis of different regression algorithms for the estimate of energy consumption. European Journal of Science and Technology, (31), 23–33. Code used The Code used generated during and/or analyzed during the current study are available in: 1.https://github.com/meysam14051365/NBO. 4. State Grid Corporation of China. Available online: https://www.sgcc.com.cn (accessed on 22 February 2020).

References

  1. Dibal PY, Onwuka EN, Zubair S, Nwankwo EI, Okoh SA, Salihu BA, Mustaphab HB (2023) Processor power and energy consumption estimation techniques in IoT applications: a review. Internet Things 21:100655

    Article  Google Scholar 

  2. Ghorbani E, Fluechter T, Calvet L, Ammouriova M, Panadero J, Juan AA (2023) Optimizing energy consumption in smart cities’ mobility: electric vehicles, algorithms, and collaborative economy. Energies 16(3):1268

    Article  Google Scholar 

  3. Fotia L, Delicato F, Fortino G (2023) Trust in edge-based internet of things architectures: state of the art and research challenges. ACM Comput Surv 55(9):1–34

    Article  MATH  Google Scholar 

  4. Manoje BM, Tamilarasan V, Yusuf AM, Vishwa S, and Rengan PK (2023) IoT based military health service in battle field and GPS tracking. In: 2023 International Conference on Sustainable Computing and Data Communication Systems (ICSCDS), pp 1538–1542. IEEE

  5. Zhang X, Fu X, Xue Y, Chang X, Bai X (2023) A review on basic theory and technology of agricultural energy internet. IET Renew Power Gener 18:1318

    Article  MATH  Google Scholar 

  6. Mishra P, Singh G (2023) Energy management systems in sustainable smart cities based on the internet of energy: a technical review. Energies 16(19):6903

    Article  MATH  Google Scholar 

  7. Souri A, Hussien A, Hoseyninezhad M, Norouzi M (2022) A systematic review of IoT communication strategies for an efficient smart environment. Trans Emerg Telecommun Technol 33(3):e3736

    Article  Google Scholar 

  8. Benhamaid S, Bouabdallah A, Lakhlef H (2022) Recent advances in energy management for green-IoT: an up-to-date and comprehensive survey. J Netw Comput Appl 198:103257

    Article  Google Scholar 

  9. Gallego F, Martín C, Díaz M, Garrido D (2023) Maintaining flexibility in smart grid consumption through deep learning and deep reinforcement learning. Energy AI 13:100241

    Article  Google Scholar 

  10. Ali S, Yongzhi M, Ali W (2023) Prevention and detection of electricity theft of distribution network. Sustainability 15(6):4868

    Article  MATH  Google Scholar 

  11. Güçyetmez M, Farhan HS (2023) Enhancing smart grids with a new IOT and cloud-based smart meter to predict the energy consumption with time series. Alex Eng J 79:44–55

    Article  MATH  Google Scholar 

  12. Haq EU, Pei C, Zhang R, Jianjun H, Ahmad F (2023) Electricity-theft detection for smart grid security using smart meter data: a deep-CNN based approach. Energy Rep 9:634–643

    Article  MATH  Google Scholar 

  13. Williams DO, Li ZS, and Ghanavati A (2023) Mitigating electrical losses through a programmable smart energy advanced metering infrastructure system. In: 2023 IEEE International Conference on Prognostics and Health Management (ICPHM), pp 153–157. IEEE

  14. Ali A, Khan L, Javaid N, Aslam M, Aldegheishem A, Alrajeh N (2024) Exploiting machine learning to tackle peculiar consumption of electricity in power grids: a step towards building green smart cities. IET Gener Transm Distrib 18(3):413–445

    Article  Google Scholar 

  15. Jin W, Fu Q, Chen J, Wang Y, Liu L, Lu Y, Wu H (2023) A novel building energy consumption prediction method using deep reinforcement learning with consideration of fluctuation points. J Build Eng 63:105458

    Article  Google Scholar 

  16. Quasim MT, Nisa KU, Khan MZ, Husain MS, Alam S, Shuaib M, Abdullah M (2023) An internet of things enabled machine learning model for energy theft prevention system (ETPS) in smart cities. J Cloud Comput 12(1):158

    Article  Google Scholar 

  17. Khan N, Haq IU, Khan SU, Rho S, Lee MY, Baik SW (2021) DB-Net: a novel dilated CNN based multi-step forecasting model for power consumption in integrated local energy systems. Int J Electr Power Energy Syst 133:107023

    Article  MATH  Google Scholar 

  18. da Silva DG, Geller MTB, dos Santos Moura MS, de Moura Meneses AA (2022) Performance evaluation of LSTM neural networks for consumption prediction. e-Prime-Adv Electric Eng Electron Energy 2:100030

    Article  MATH  Google Scholar 

  19. Shachee SB, Latha HN, and Hegde Veena N (2022) Electrical energy consumption prediction using lstm-rnn. In: Evolutionary Computing and Mobile Sustainable Networks: Proceedings of ICECMSN 2021, pp 365–384. Singapore: Springer Singapore

  20. Mohapatra SK, Mishra S, and Tripathy HK (2022) Energy consumption prediction in electrical appliances of commercial buildings using LSTM-GRU model. In: 2022 International Conference on Advancements in Smart, Secure and Intelligent Computing (ASSIC), pp 1–5. IEEE

  21. Rick R, Berton L (2022) Energy forecasting model based on CNN-LSTM-AE for many time series with unequal lengths. Eng Appl Artif Intell 113:104998

    Article  MATH  Google Scholar 

  22. Duarte Soares L, de Souza Queiroz A, López GP, Carreño-Franco EM, López-Lezama JM, Muñoz-Galeano N (2022) BiGRU-CNN neural network applied to electric energy theft detection. Electronics 11(5):693

    Article  Google Scholar 

  23. Liang Q, Zhao S, Zhang J, Deng H (2024) Unsupervised BLSTM-based electricity theft detection with training data contaminated. ACM Trans Cyber Phys Syst 8(1):1–20

    Article  MATH  Google Scholar 

  24. Mehdary A, Chehri A, Jakimi A, Saadane R (2024) Hyperparameter optimization with genetic algorithms and XGBoost: a step forward in smart grid fraud detection. Sensors 24(4):1230

    Article  Google Scholar 

  25. Roy C, Das DK (2021) A hybrid genetic algorithm (GA)–particle swarm optimization (PSO) algorithm for demand side management in smart grid considering wind power for cost optimization. Sādhanā 46(2):101

    Article  MathSciNet  MATH  Google Scholar 

  26. Mafarja M, Mirjalili S (2018) Whale optimization approaches for wrapper feature selection. Appl Soft Comput 62:441–453

    Article  MATH  Google Scholar 

  27. Zhang Y, Liu R, Wang X, Chen H, Li C (2021) Boosted binary Harris Hawks optimizer and feature selection. Eng Comput 37:3741–3770

    Article  MATH  Google Scholar 

  28. Al-Tashi Q, Kadir SJA, Rais HM, Mirjalili S, Alhussian H (2019) Binary optimization using hybrid grey wolf optimization for feature selection. IEEE Access 7:39496–39508

    Article  Google Scholar 

  29. Nadeem Z, Aslam Z, Jaber M, Qayyum A, and Qadir J (2023) Energy-aware theft detection based on IoT energy consumption data. In: 2023 IEEE 97th Vehicular Technology Conference (VTC2023-Spring), pp 1–6. IEEE

  30. Chahardoli M, Eraghi NO, Nazari S (2022) Namib beetle optimization algorithm: a new meta-heuristic method for feature selection and dimension reduction. Concurr Comput Pract Exp 34(1):e6524

    Article  Google Scholar 

  31. Ren Z, Zhu Y, Liu Z, Feng K (2023) Few-shot GAN: improving the performance of intelligent fault diagnosis in severe data imbalance. IEEE Trans Instrum Meas 72:14

    Article  MATH  Google Scholar 

  32. Jia L, Wang Z, Sun P, Xu Z, Yang S (2023) TDMO: dynamic multi-dimensional oversampling for exploring data distribution based on extreme gradient boosting learning. Inf Sci 649:119621

    Article  Google Scholar 

  33. Ullah I, Ahmad R, Kim D (2018) A prediction mechanism of energy consumption in residential buildings using hidden markov model. Energies 11(2):358

    Article  MATH  Google Scholar 

  34. Goudarzi S, Anisi MH, Soleymani SA, Ayob M, Zeadally S (2021) An IoT-based prediction technique for efficient energy consumption in buildings. IEEE Trans Green Commun Netw 5(4):2076–2088

    Article  Google Scholar 

  35. Jafarzadeh P, Farahnakian F, Paalassalo JP, Eerola O (2021) IOT-based household energy consumption prediction using machine learning. Advances in industrial internet of things, engineering and management. Springer International Publishing, Cham, pp 137–152

    Chapter  MATH  Google Scholar 

  36. Farooq U, Shabir MW, Javed MA, Imran M (2021) Intelligent energy prediction techniques for fog computing networks. Appl Soft Comput 111:107682

    Article  MATH  Google Scholar 

  37. Fard RH, Hosseini S (2022) Machine learning algorithms for prediction of energy consumption and IoT modeling in complex networks. Microprocess Microsyst 89:104423

    Article  MATH  Google Scholar 

  38. Khan SU, Khan N, Ullah FUM, Kim MJ, Lee MY, Baik SW (2023) Towards intelligent building energy management: AI-based framework for power consumption and generation forecasting. Energy Build 279:112705

    Article  MATH  Google Scholar 

  39. Afzal S, Ziapour BM, Shokri A, Shakibi H, Sobhani B (2023) Building energy consumption prediction using multilayer perceptron neural network-assisted models; comparison of different optimization algorithms. Energy 282:128446

    Article  Google Scholar 

  40. Xiong S, Li Y, Li Q, Ye Z, Pouramini S (2024) Energy consumption prediction by modified fish migration optimization algorithm: city single-family homes. Appl Energy 353:122065

    Article  Google Scholar 

  41. Lee TK, Kim JU (2024) A cost-effective and heuristic approach for building energy consumption prediction: BES model calibration and forecasting algorithm. Energy Build 303:113800

    Article  MATH  Google Scholar 

  42. El-Maraghy M, Metawie M, Safaan M, Eldin AS, Hamdy A, El Sharkawy M, Marzouk M (2024) Predicting energy consumption of mosque buildings during the operation stage using deep learning approach. Energy Build 303:113829

    Article  Google Scholar 

  43. Afzal S, Shokri A, Ziapour BM, Shakibi H, Sobhani B (2024) Building energy consumption prediction and optimization using different neural network-assisted models; comparison of different networks and optimization algorithms. Eng Appl Artif Intell 127:107356

    Article  Google Scholar 

  44. Nawaz A, Ali T, Mustafa G, Rehman SU, Rashid MR (2023) A novel technique for detecting electricity theft in secure smart grids using CNN and XG-boost. Intell Syst Appl 17:200168

    MATH  Google Scholar 

  45. Bai Y, Sun H, Zhang L, Wu H (2023) Hybrid CNN–transformer network for electricity theft detection in smart grids. Sensors 23(20):8405

    Article  MATH  Google Scholar 

  46. Huang Q, Tang Z, Weng X, He M, Liu F, Yang M, Jin T (2024) A novel electricity theft detection strategy based on dual-time feature fusion and deep learning methods. Energies 17(2):275

    Article  Google Scholar 

  47. Naeem A, Aslam Z, Al Shloul T, Naz A, Nadeem MI, Al-Adhaileh MH, Mohamed HG (2023) A novel combined DenseNet and gated recurrent unit approach to detect energy thefts in smart grids. IEEE Access 11:59496

    Article  Google Scholar 

  48. Zhu S, Xue Z, Li Y (2024) Electricity theft detection in smart grids based on omni-scale CNN and AutoXGB. IEEE Access 12:15477

    Article  MATH  Google Scholar 

  49. Kawoosa AI, Prashar D, Faheem M, Jha N, Khan AA (2023) Using machine learning ensemble method for detection of energy theft in smart meters. IET Gener Transm Distrib 17(21):4794–4809

    Article  MATH  Google Scholar 

  50. Wang S, Wang G, Fu Q, Song Y, Liu J (2023) IH-TCGAN: time-series conditional generative adversarial network with improved Hausdorff distance for synthesizing intention recognition data. Entropy 25(5):781

    Article  MATH  Google Scholar 

  51. Tian H, Fan H, Feng M, Cao R, Li D (2023) Fault diagnosis of rolling bearing based on hpso algorithm optimized cnn-lstm neural network. Sensors 23(14):6508

    Article  MATH  Google Scholar 

  52. Zhang C, Chen P, Jiang F, Xie J, Yu T (2023) Fault diagnosis of nuclear power plant based on sparrow search algorithm optimized CNN-LSTM neural network. Energies 16(6):2934

    Article  MATH  Google Scholar 

  53. Pierre AA, Akim SA, Semenyo AK, Babiga B (2023) Peak electrical energy consumption prediction by ARIMA, LSTM, GRU ARIMA-LSTM and ARIMA-GRU approaches. Energies 16(12):4739

    Article  Google Scholar 

  54. Hebrail G, Berard A (2023) Individual household electric power consumption data set, UC irvine machine learning repository. Available online: https://archive.ics.uci.edu/dataset/235/individual+household+electric+power+consumption. Accessed on 29 Aug 2023

  55. Ullah FUM, Ullah A, Haq IU, Rho S, Baik SW (2019) Short-term prediction of residential power energy consumption via CNN and multi-layer bi-directional LSTM networks. IEEE Access 8:123369–123380

    Article  MATH  Google Scholar 

  56. Kim TY, Cho SB (2019) Predicting residential energy consumption using CNN-LSTM neural networks. Energy 182:72–81

    Article  MATH  Google Scholar 

  57. Khan ZA, Ullah A, Ullah W, Rho S, Lee M, Baik SW (2020) Electrical energy prediction in residential buildings for short-term horizons using hybrid deep learning strategy. Appl Sci 10(23):8634

    Article  MATH  Google Scholar 

  58. Han T, Muhammad K, Hussain T, Lloret J, Baik SW (2020) An efficient deep learning framework for intelligent energy management in IoT networks. IEEE Internet Things J 8(5):3170–3179

    Article  Google Scholar 

  59. Khan ZA, Hussain T, Baik SW (2022) Boosting energy harvesting via deep learning-based renewable power generation prediction. J King Saud Univ Sci 34(3):101815

    Article  Google Scholar 

  60. Alsharekh MF, Habib S, Dewi DA, Albattah W, Islam M, Albahli S (2022) Improving the efficiency of multistep short-term electricity load forecasting via R-CNN with ML-LSTM. Sensors 22(18):6913

    Article  Google Scholar 

  61. Al-Ghamdi M, Al-Ghamdi AAM, Ragab M (2023) A hybrid DNN multilayered LSTM model for energy consumption prediction. Appl Sci 13(20):11408

    Article  MATH  Google Scholar 

  62. Chi D (2022) Research on electricity consumption forecasting model based on wavelet transform and multi-layer LSTM model. Energy Rep 8:220–228

    Article  MATH  Google Scholar 

  63. Çetiner H, Çetiner I (2021) Analysis of different regression algorithms for the estimate of energy consumption. Eur J Sci Technol 31:23–33

    MATH  Google Scholar 

  64. Singh T, Solanki A, Sharma SK, Jhanjhi NZ, Ghoniem RM (2023) Grey Wolf optimization based CNN-LSTM network for the prediction of energy consumption in smart home environment. IEEE Access 11:114917

    Article  Google Scholar 

  65. Dehghani M, Montazeri Z, Trojovská E, Trojovský P (2023) Coati optimization algorithm: a new bio-inspired metaheuristic algorithm for solving optimization problems. Knowl Based Syst 259:110011

    Article  MATH  Google Scholar 

  66. Guenoupkati A, Salami AA, Kodjo MK, and Napo K (2019) Statistical characterization of electric power production and importation: case study of Benin electricity community (CEB). In: 2019 II International Conference on High Technology for Sustainable Development (HiTech), pp 1–6. IEEE

  67. Olu-Ajayi R, Alaka H, Sulaimon I, Balogun H, Wusu G, Yusuf W, Adegoke M (2023) Building energy performance prediction: a reliability analysis and evaluation of feature selection methods. Expert Syst Appl 225:120109

    Article  Google Scholar 

  68. Cao Q and Wang S (2011) Applying over-sampling technique based on data density and cost-sensitive SVM to imbalanced learning. In: 2011 International Conference on Information Management, Innovation Management and Industrial Engineering, Vol. 2, pp 543–548. IEEE

  69. Xie H, Zhang L, Lim CP (2020) Evolving CNN-LSTM models for time series prediction using enhanced grey wolf optimizer. IEEE Access 8:161519–161541

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Contributions

The authors confirm contribution to the paper as follows: study conception and design: first author; data collection: second author; analysis and interpretation of results: third author, first author; draft manuscript preparation: first author. All authors reviewed the results and approved the final version of the manuscript. The author confirms sole responsibility for the following: study conception and design, data collection, analysis and interpretation of results, and manuscript preparation.

Corresponding author

Correspondence to Nafiseh Osati Eraghi.

Ethics declarations

Conflict of interest

The authors declare no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Chahardoli, M., Osati Eraghi, N. & Nazari, S. An energy consumption prediction approach in smart cities by CNN-LSTM network improved with game theory and Namib Beetle Optimization (NBO) algorithm. J Supercomput 81, 403 (2025). https://doi.org/10.1007/s11227-024-06811-5

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11227-024-06811-5

Keywords

Navigation