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.




















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
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
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
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
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
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
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
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
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
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
Ali S, Yongzhi M, Ali W (2023) Prevention and detection of electricity theft of distribution network. Sustainability 15(6):4868
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Mafarja M, Mirjalili S (2018) Whale optimization approaches for wrapper feature selection. Appl Soft Comput 62:441–453
Zhang Y, Liu R, Wang X, Chen H, Li C (2021) Boosted binary Harris Hawks optimizer and feature selection. Eng Comput 37:3741–3770
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
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
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
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
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
Ullah I, Ahmad R, Kim D (2018) A prediction mechanism of energy consumption in residential buildings using hidden markov model. Energies 11(2):358
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
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
Farooq U, Shabir MW, Javed MA, Imran M (2021) Intelligent energy prediction techniques for fog computing networks. Appl Soft Comput 111:107682
Fard RH, Hosseini S (2022) Machine learning algorithms for prediction of energy consumption and IoT modeling in complex networks. Microprocess Microsyst 89:104423
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
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
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
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
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
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
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
Bai Y, Sun H, Zhang L, Wu H (2023) Hybrid CNN–transformer network for electricity theft detection in smart grids. Sensors 23(20):8405
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
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
Zhu S, Xue Z, Li Y (2024) Electricity theft detection in smart grids based on omni-scale CNN and AutoXGB. IEEE Access 12:15477
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
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
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
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
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
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
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
Kim TY, Cho SB (2019) Predicting residential energy consumption using CNN-LSTM neural networks. Energy 182:72–81
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
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
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
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
Al-Ghamdi M, Al-Ghamdi AAM, Ragab M (2023) A hybrid DNN multilayered LSTM model for energy consumption prediction. Appl Sci 13(20):11408
Chi D (2022) Research on electricity consumption forecasting model based on wavelet transform and multi-layer LSTM model. Energy Rep 8:220–228
Çetiner H, Çetiner I (2021) Analysis of different regression algorithms for the estimate of energy consumption. Eur J Sci Technol 31:23–33
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
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
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
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
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
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
Author information
Authors and Affiliations
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
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.
About this article
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
Accepted:
Published:
DOI: https://doi.org/10.1007/s11227-024-06811-5