Enhancing Time Series Prediction with Hybrid AFSA-TCN: A Unified Approach to Temporal Data and Optimization

Authors

Keywords:

temporal convolutional network, artificial fish swarm algorithm, time series, Remaining useful life, optimization, Hybrid optimization

Abstract

Time series data, with its sequential dependencies presents a unique challenge for traditional machine learning methods such as Random Forest (RF), Support Vector Machines (SVM), and Decision Trees (DT), which often struggle to capture temporal patterns effectively. In contrast, Temporal Convolutional Networks (TCNs) have proven to be highly accurate in addressing these challenges. This study focuses on forecasting the Remaining Useful Life (RUL) of batteries, a critical task for applications such as electric vehicles, renewable energy, and battery management. The dataset used in this study is a battery RUL dataset retrieved from an open-source platform Kaggle, which consists of more than 15,000 rows of time series data. The study introduces a hybrid model that integrates TCN with Artificial Fish Swarm Algorithm (AFSA), a bio-inspired optimization technique designed to fine-tune TCN parameters. The results show that AFSA-TCN achieves outstanding performance with an R-squared (R2) score of 0.9992, Mean Absolute Error (MAE) of 4.8200, Root Mean Squared Error (RMSE) of 9.0840 and Mean Absolute Percentage Error (MAPE) of 5.48%. Further comparisons with other AFSA-based hybrid models, including AFSA-SVM, AFSA-Gated Recurrent Unit (GRU), and AFSA-Artificial Neural Network (ANN), reveal that AFSA-TCN offers superior prediction accuracy, efficient tuning, and adaptability to the battery RUL dataset. The results highlight the robustness and effectiveness of the AFSA-TCN hybrid model in addressing complex challenges in time series forecasting and optimization, particularly for RUL estimation.

Author Biographies

Zuriani Mustaffa, Universiti Malaysia Pahang Al-Sultan Abdullah

Zuriani Mustaffa is a senior lecturer in the Faculty of Computer Systems & Software Engineering, Universiti Malaysia Pahang. She holds a PhD in Computer Science from Universiti Utara Malaysia. She also obtained MSc degree in Information Technology and Bachelor of Computer Science (Software Engineering) from Universiti Utara Malaysia and Universiti Teknologi Malaysia respectively. Her research interest include Computational Intelligence (CI) algorithm, specifically in Swarm Intelligence (SI) and machine learning techniques. Her research area focuses on hybrid algorithms which involves optimization and machine learning techniques with particular attention for time series predictive analysis. She has authored and co-authored various scientific articles in the field of interest.

Muhamad 'Arif Mohamad, Universiti Malaysia Pahang Al-Sultan Abdullah

Ts. Dr. Muhammad 'Arif Bin Mohamad Ts Dr. Muhammad 'Arif Bin Mohamad is a senior lecturer in Faculty of Computing, Universiti Malaysia Pahang Al-Sultan Abdullah.

References

[1] H. Bínová, O. Hykš, M. Hykšová, K. Neubergová, F. Kekula and J. Sadil, Perspective of clean mobility in road freight transport, Transportation Research Procedia, 53, 2021, 289-304.

[2] S. Chatterjee, R. Chaudhuri, D. Vrontis, and S. Bresciani, Exploring the effect of government incentives on electric vehicle purchase intention in smart cities, Journal of Cleaner Production, 2024, 143841.

[3] I. Sharma and M. K. Chande, Will electric vehicles (EVs) be less polluting than conventional automobiles under Indian city conditions?, Case Studies on Transport Policy, 8(4), 2020, 1489-1503.

[4] International Energy Agency, Global EV Outlook 2024, International Energy Agency (IEA), Paris, 2024.

[5] K. Liu, Y. Wang, and X. Lai, Introduction to battery full-lifespan management, In Data Science-Based Full-Lifespan Management of Lithium-Ion Battery (Green Energy and Technology), Springer, 2022, 1-25.

[6] C. Bi, S. Jin, S. Li and Y. Li, Can green advertising increase consumers’ purchase intention of electric vehicles? An experimental study from China, Journal of Cleaner Production, 419, 2023, 138260.

[7] E. Karden, Secondary batteries – Lead-acid systems: Automotive batteries, new developments, In Encyclopedia of Electrochemical Power Sources, J. Garche, Ed. Amsterdam: Elsevier, 2009, 851-858.

[8] A. Kirchev, Battery management and battery diagnostics, in Electrochemical Energy Storage for Renewable Sources and Grid Balancing, P. T. Moseley and J. Garche, Eds. Elsevier eBooks, 2012, 411-435.

[9] P. Lall, V. Soni, G. Sethi and K. Yiang, Effect of high and low storage temperatures, storage duration and varying depth of discharge on coin cell SOH degradation, 2022 21st IEEE Intersociety Conference on Thermal and Thermomechanical Phenomena in Electronic Systems (iTherm), San Diego, CA, USA, 2022, 1-8.

[10] A. Nielsen, Practical Time Series Analysis: Prediction with Statistics and Machine Learning, 1st ed. United States: O’Reilly Media, 2019.

[11] H. Feng and A. Xu, A data compensation model for predicting SOH and RUL of Lithium–Ion battery, Journal of Electrical Engineering and Technology, 19, 2024, 395-406.

[12] L. Hu, W. Wang, and G. Ding, RUL prediction for lithium-ion batteries based on variational mode decomposition and hybrid network model, Signal Image and Video Processing, 17, 2023, 3109-3117.

[13] M. Kaur, A. K. Shukla and S. Kaur, An Introduction to Machine Learning in a Nutshell, 2021 10th International Conference on System Modelling & Advancement in Research Trends (SMART), India, 2021, 17-22.

[14] W. Rand, Theory-interpretable, data-driven agent-based modeling, In Social-Behavioral Modeling for Complex Systems, P. K. Davis, A. O’Mahony and J. Pfautz, Eds. Hoboken, New Jersey: John Wiley & Sons, 2019, 337-357.

[15] C. Lea, M. D. Flynn, R. Vidal, A. Reiter and G. D. Hager, Temporal convolutional networks for action segmentation and detection, 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 2017.

[16] N. Zainal, A. M. Zain and S. Sharif, Overview of artificial fish swarm algorithm and its applications in industrial problems, Applied Mechanics and Materials, 815, 2015, 253-257.

[17] K. Gajamannage, Y. Park, and D. I. Jayathilake, Real-time forecasting of time series in financial markets using sequentially trained dual-LSTMs, Expert Systems with Applications, 223, 2023, 119879.

[18] A. Y. Barrera-Animas, L. O. Oyedele, M. Bilal, T. D. Akinosho, J. M. D. Delgado and L. A. Akanbi, Rainfall prediction: A comparative analysis of modern machine learning algorithms for time-series forecasting, Machine Learning with Applications, 7, 2022.

[19] P. Areekul, T. Senjyu, N. Urasaki and A. Yona, Next day price forecasting in deregulated market by combination of artificial neural network and ARIMA time series models, 2010 5th IEEE Conference on Industrial Electronics and Applications, Taichung, Taiwan, 2010, 1451-1456.

[20] B. Seong, Smoothing and forecasting mixed-frequency time series with vector exponential smoothing models, Economic Modelling, 91, 2020, 463-468.

[21] F. Fichtner, N. Mandery, M. Wieland, S. Growth, S. Martinis and T. Riedlinger, Time-series analysis of sentinel-1/2 data for flood detection using a discrete global grid system and seasonal decomposition, International Journal of Applied Earth Observation and Geoinformation, 119, 2023, 103329.

[22] G. E. P. Box, G. M. Jenkins, G. C. Reinsel and G.M. Ljung, Time Series Analysis: Forecasting and Control, 5th ed. Hoboken, New Jersey: John Wiley and Sons, Inc., 2015.

[23] A. A. Alsuwaylimi, Comparison of ARIMA, ANN and hybrid ARIMA-ANN models for time series forecasting, Information Sciences Letters, 12(2), 2022, 1003-1016.

[24] V. N. Vapnik, The Nature of Statistical Learning Theory, 2nd ed. New York: Springer, 2013.

[25] L. Breiman, Random forests, Machine Learning, 45, 2021, 5-32.

[26] Y. Michael, D. Helman, O. Glickman, D. Gabay, S. Brenner and I. M. Lensky, Forecasting fire risk with machine learning and dynamic information derived from satellite vegetation index time-series, Science of the Total Environment, 764, 2021, 142844.

[27] V. Chandran, C. K. Patil, A. M. Manoharan, A. Ghosh, M. G. Sumithra, A. Karthick, R. Rahim and K. Arun, Wind power forecasting based on time series model using deep machine learning algorithms, Materials Today Proceedings, 47, 2021, 115-126.

[28] M. M. Ali, B. K. Paul, K. Ahmed, F. M. Bui, J. M. W. Quinn and M. A. Moni, Heart disease prediction using supervised machine learning algorithms: Performance analysis and comparison, Computers in Biology and Medicine, 136, 2021, 104672.

[29] A. R. Ismail, D. Sodoyer and F. Elbahhar, Drowsiness detection in humans based on ECG analysis using temporal convolutional network, 2023 International Conference on Automation, Control and Electronics Engineering (CACEE), Chongqing, China, 2023, 62-66.

[30] A. Mohan, M. Venkatesan P. Prabhavathy and A. Jayakrishnan, Temporal convolutional network based rice crop yield prediction using multispectral satellite data, Infrared Physics & Technology, 135, 2023, 104960.

[31] M. Claesen and B. D. Moor, Hyperparameter search in machine learning, MIC 2015: The XI Metaheuristic International Conference, Agadir, Morocco, 2015, 14.

[32] S. Bai, J. Z. Kolter and V. Koltun, An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. Machine Learning, arXiv:1803.01271, 2018.

[33] T. Hofmann, B. Schölkopf and A. J. Smola, Kernel methods in machine learning, The Annals of Statistics, 36(3), 2008, 1171-1220.

[34] M. A. Cauchy, Méthode générale pour la résolution des systèmes d’équations simultanées, Comptes Rendus de l'Académie des Sciences de Paris, 536-538.

[35] J. H. Holland, Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence, 1st ed. The MIT Press, 1992.

[36] J. Kennedy and R. Eberhart, Particle swarm optimization, Proceedings of the IEEE International Conference on Neural Networks, Perth, WA, Australia, 1995, 1942-1948.

[37] M. Dorigo and L. M. Gambardella, Ant colony system: A cooperative learning approach to the traveling salesman problem, IEEE Transactions on Evolutionary Computation, 1(1), 1997, 53-66.

[38] R. Storn and K. Price, Differential evolution - A simple and efficient heuristic for global optimization over continuous spaces, Journal of Global Optimization, 11(4), 1997, 341-359.

[39] M. P. Behera, A. Sarangi, D. Mishra and S. K. Sarangi, A hybrid machine learning algorithm for heart and liver disease prediction using modified particle swarm optimization with support vector machine, Procedia Computer Science, 218, 2023, 818-827.

[40] H. Han, Z. Wang, C. Li, Z. Ma, Z. Yang and X. Ma, Purity detection of goat milk based on electronic tongue and improved artificial fish swarm optimized extreme learning machine, 6th International Federation of Automatic Control (IFAC) Conference on Sensing, Control and Automation Technologies for Agriculture AGRICONTROL 2019, 52(30), 2019, 391-396.

[41] A. M. Hilal, A. H. A. Hashim, H. G. Mohamed, M. K. Nour, M. M. Asiri, A. M. Al-Sharafi, M. Othman and A. Motwakel, Malicious URL classification using artificial fish swarm optimization and deep learning, Computers, Materials & Continua, 74(1), 2023, 607-621.

[42] W. Jiang, X. Wang and S. Zhang, Integrating multi-modal data into AFSA-LSTM model for real-time oil production prediction, Energy, 279, 2023, 127935.

[43] Z. He, L. Liu, and H. Liu, Improved particle swarm optimization algorithms for aerodynamic shape optimization of high-speed train, Advances in Engineering Software, 173, 2022, 103242.

[44] F. Pourpanah, R.Wang, C. P. Lim, X. Z. Wang and D. Yazdani, A review of artificial fish swarm algorithms: recent advances and applications, Artificial Intelligence Review, 56, 2023, 1867-1903.

[45] X. L. Li, Z. J. Shao and J. X. Qian, An optimizing method based on autonomous animals: fish-swarm algorithm, Systems Engineering - Theory & Practice, 22(11), 2002, 32-38.

[46] M. Neshat, A. Adeli, G. Sepidnam, M. Sargolzaei and A, N. Toosi, A review of artificial fish swarm optimization methods and applications, International Journal on Smart Sensing and Intelligent Systems, 5(1), 2012, 107-148.

[47] A. Z. Khan, B. M. Rao, J. V. N. Ramesh, E. Muniyandy, E. Bhagyalakshmi, Y. A B. El-Ebiary, and D. N. P. Devadhas, Self-organizing neural networks integrated with artificial fish swarm algorithm for energy-efficient cloud resource management, International Journal of Advanced Computer Science and Applications (IJACSA), 16(2), 2025, 1060-1070.

[48] K. C. Lin, S. Y. Chen and J. C. Hung, Feature selection and parameter optimization of support vector machines based on modified artificial fish swarm algorithms, Mathematical Problems in Engineering, 20(1), 2015, 1-9.

[49] D. Jia, Z. Li and C. Zhang, A parametric optimization oriented, AFSA based random forest algorithm: Application to the detection of cervical epithelial cells, IEEE Access, 8, 2020, 64891-64905.

[50] A. H. Aboelkhair, RUL analysis & machine learning, https://www.kaggle.com/code/ahmedhatem404/rul-analysis-machine-learnig/notebook, 2024 (accessed 01.08.2024).

[51] I. Hussain, K. B. Ching, C. Uttraphan, K. G. Tay and A. Noor, Evaluating machine learning algorithms for energy consumption prediction in electric vehicles: A comparative study, Scientific Reports, 15, 2025, 16124.

Downloads

Published

12-09-2025

How to Cite

Mohd Zaidi, N. A. S., Mustaffa, Z., & Mohammad, M. ’Arif. (2025). Enhancing Time Series Prediction with Hybrid AFSA-TCN: A Unified Approach to Temporal Data and Optimization. Applications of Modelling and Simulation, 9, 324–337. Retrieved from https://www.ojs.arqiipubl.com/index.php/AMS_Journal/article/view/868

Issue

Section

Articles

Most read articles by the same author(s)