Wind Speed Prediction Using BiLSTM Deep Learning Model and Comparable Batch Sizes of Training Data: A Case of Singida Wind Farm Site, Tanzania

  • Isakwisa Gaddy Tende Dar es Salaam Institute of Technology
Keywords: Wind Speed Prediction, BiLSTM, Deep Learning, Batch Size, Singida, Tanzania
Share Article:

Abstract

Singida region, located in central Tanzania, has long been identified as a potential location for installing wind farms to generate electric power due to the steady annual wind speed. Apart from the huge potential of contributing to the national grid, wind power also helps to address carbon emissions and environmental problems associated with generating electric power using fossil fuels.  Failure to accurately predict wind speed can lead to poor harvest of wind power and low contribution to the national grid, and in the end, affect consumers. Bidirectional Long Short-Term Memory (BiLSTM) is one of the Deep Learning models which can be used to predict time series parameters such as wind speed. In a BiLSTM model, a batch size is an important hyperparameter as it is used to set the number of training data samples to be processed together before the weights of a Deep Learning model are updated. Despite its importance, there is still a research gap on the impact of batch size on the prediction performance of BiLSTM models, especially in the context of predicting wind speed at the Singida Wind Farm Site, located in the Singida region, Tanzania. The goal of the study was to fill this gap by developing a BiLSTM model and comparing the performance of three batch sizes (16, 32 and 64) in predicting wind speed at the Singida Wind Farm Site. The 14-year Singida Wind Farm Site daily wind speed dataset was first pre-processed by scaling (normalizing) it using Standard scaler and then split into training, validation and test sets before used to train and test the developed BiLSTM model which used previous 5 days wind speed values as input to predict the output (next day (6th day) wind speed). The trained BiLSTM model with the optimal (best performing) batch size was then saved in .h5 format and integrated with a Gradio-based web App to provide a user interface for officials in the Singida region to predict daily wind speed at the Singida Wind Farm Site. The evaluation findings revealed that batch size has an impact on the prediction performance of the developed BiLSTM model, showing that the lower the batch size, the better the prediction performance of the BiLSTM model. The findings also revealed that, 16 is the optimal (best performing) batch size with Mean Absolute Error (MAE) score of 0.58, Root Mean Squared Error (RMSE) score of 0.76 and R2 score of 0.79, followed with a batch size of 32 (MAE score of 0.62, RMSE score of 0.79 and R2 score of 0.75) and followed by a batch size of 64 (MAE score of 0.66, RMSE score of 0.81 and R2 score of 0.72). This study recommends that Artificial Intelligence (AI) software developers and researchers use a batch size of 16 in BiLSTM models when forecasting wind speed at the Singida Wind Farm Site, as well as in environments and climates which resemble that of the Singida Wind Farm Site in Tanzania.

Downloads

Download data is not yet available.

References

Abdulnabi, N. Z. T., & Altun, O. (2016). Batch size for training convolutional neural networks for sentence classification. Journal of Advances in Technology and Engineering Studies, 2(5), 156-163.

Bai, X., Zhang, L., Feng, Y., Yan, H., & Mi, Q. (2025). Multivariate temperature prediction model based on CNN-BiLSTM and RandomForest. The Journal of Supercomputing, 81(1), 162. DOI: https://doi.org/10.1007/s11227-024-06689-3

Bisong, E. (2019). Google Colaboratory. In Building machine learning and deep learning models on google cloud platform: a comprehensive guide for beginners. Berkeley, CA: Apress.

Doğan, E. (2021). LSTM training set analysis and clustering model development for short-term traffic flow prediction. Neural Computing and Applications, 33(17), 11175-11188. DOI: https://doi.org/10.1007/s00521-020-05564-5

Edalatifar, M., Ghalambaz, M., Tavakoli, M. B., & Setoudeh, F. (2022). New loss functions to improve deep learning estimation of heat transfer. Neural Computing and Applications, 34(18), 15889-15906. DOI: https://doi.org/10.1007/s00521-022-07233-1

Ferreira, R., Canesche, M., Jamieson, P., Neto, O., & Nacif, J. A. (2024). Examples and tutorials on using Google Colab and Gradio to create online interactive student‐learning modules. Computer Applications in Engineering Education, 32(4), e22729. DOI: https://doi.org/10.1002/cae.22729

Filik, Ü. B., & Filik, T. (2017). Wind speed prediction using artificial neural networks based on multiple local measurements in Eskisehir. Energy Procedia, 107, 264-269. DOI: https://doi.org/10.1016/j.egypro.2016.12.147

García, F., Guijarro, F., Oliver, J., & Tamošiūnienė, R. (2024). Foreign Exchange Forecasting Models: LSTM and BiLSTM Comparison. Engineering Proceedings, 68(1), 19. DOI: https://doi.org/10.3390/engproc2024068019

Halpern-Wight, N., Konstantinou, M., Charalambides, A. G., & Reinders, A. (2020). Training and Testing of a Single-Layer LSTM Network for Near-Future Solar Forecasting. Applied Sciences, 10(17), 5873. DOI: https://doi.org/10.3390/app10175873

Hao, X., Liu, Y., Pei, L., Li, W., & Du, Y. (2022). Atmospheric Temperature Prediction Based on a BiLSTM-Attention Model. Symmetry, 14(11), 2470. DOI: https://doi.org/10.3390/sym14112470

Hochreiter, S. & Schmidhuber, J. (1997). Long short-term memory. Neural Comput.,9, 1735–1780

Huntington, J., Hegewisch, K., Daudert, B., Morton, C., Abatzoglou, J., McEvoy, D., & Erickson, T. (2017). Climate engine: Cloud computing and visualization of climate and remote sensing data for advanced natural resource monitoring and process understanding. Bulletin of the American Meteorological Society, 98(11), 2397-2410

Hwang, J.-S., Lee, S.-S., Gil, J.-W., & Lee, C.-K. (2024). Determination of Optimal Batch Size of Deep Learning Models with Time Series Data. Sustainability, 16(14), 5936. DOI: https://doi.org/10.3390/su16145936

Jiang, X., Wei, P., Luo, Y., & Li, Y. (2021). Air Pollutant Concentration Prediction Based on a CEEMDAN-FE-BiLSTM Model. Atmosphere, 12(11), 1452. DOI: https://doi.org/10.3390/atmos12111452

Jung, C. (2024). Recent Development and Future Perspective of Wind Power Generation. Energies, 17(21), 5391. DOI: https://doi.org/10.3390/en17215391

Kandel, I., & Castelli, M. (2020). The effect of batch size on the generalizability of the convolutional neural networks on a histopathology dataset. ICT Express, 6(4), 312-315. DOI: https://doi.org/10.1016/j.icte.2020.04.010

Kumwenda, M. J., & Mangara, R. J. (2024). Assessment of Wind Speed Characteristics and Available Wind Power Potential for Electricity Generation in Tanzania. Tanzania Journal of Engineering and Technology, 43(4), 66-76. DOI: https://doi.org/10.52339/tjet.v43i4.1047

Lin, R. (2022, February). Analysis on the selection of the appropriate batch size in CNN neural network. In 2022 International Conference on Machine Learning and Knowledge Engineering (MLKE) (pp. 106-109). IEEE. DOI: https://doi.org/10.1109/MLKE55170.2022.00026

Lu, W., Li, J., Wang, J., & Qin, L. (2021). A CNN-BiLSTM-AM method for stock price prediction. Neural Computing and Applications, 33(10), 4741-4753. DOI: https://doi.org/10.1007/s00521-020-05532-z

Mangara, R. J., & Kumwenda, M. J. (2023). Wind Speed Forecasting Using Wavelet Analysis and Recurrent Artificial Neural Networks Based on Local Measurements in Singida Region, Tanzania. Tanzania Journal of Science, 49(3), 754-763. DOI: https://dx.doi.org/10.4314/tjs.v49i3.17

Martin-Donas, J. M., Gomez, A. M., Gonzalez, J. A., & Peinado, A. M. (2018). A deep learning loss function based on the perceptual evaluation of the speech quality. IEEE Signal Processing Letters, 25(11), 1680-1684. DOI: https://doi.org/ 10.1109/LSP.2018.2871419

Méndez, M., Merayo, M. G., & Núñez, M. (2023). Long-term traffic flow forecasting using a hybrid CNN-BiLSTM model. Engineering Applications of Artificial Intelligence, 121, 106041. DOI: https://doi.org/10.1016/j.engappai.2023.106041

Meng, X., Liu, X., Duan, H., Hu, Z., & Wang, M. (2025). Optimization of Oil Well Production Prediction Model Based on Inter-Attention and BiLSTM. Electronics, 14(5), 1004. DOI: https://doi.org/10.3390/electronics14051004

Michael, N. E., Bansal, R. C., Ismail, A. A. A., Elnady, A., & Hasan, S. (2024). A cohesive structure of Bi-directional long-short-term memory (BiLSTM)-GRU for predicting hourly solar radiation. Renewable Energy, 222, 119943. DOI: https://doi.org/10.1016/j.renene.2024.119943

Oyedotun, O. K., Papadopoulos, K., & Aouada, D. (2023). A new perspective for understanding generalization gap of deep neural networks trained with large batch sizes. Applied Intelligence, 53(12), 15621-15637. DOI: https://doi.org/10.1007/s10489-022-04230-8

Radiuk, P. (2017). Impact of training set batch size on the performance of convolutional neural networks for diverse datasets. Information Technology and Management Science, 20(1), 20-24.

Skibko, Z., Hołdyński, G., & Borusiewicz, A. (2022). Impact of Wind Power Plant Operation on Voltage Quality Parameters—Example from Poland. Energies, 15(15), 5573. DOI: https://doi.org/10.3390/en15155573 Tamiminia, H., Salehi, B., Mahdianpari, M., Quackenbush, L., Adeli, S., & Brisco, B. (2020). Google Earth Engine for geo-big data applications: A meta-analysis and systematic review. ISPRS Journal of Photogrammetry and Remote Sensing, 164, 152-170

Turi, J. A., Rosak-Szyrocka, J., Mansoor, M., Asif, H., Nazir, A., & Balsalobre-Lorente, D. (2022). Assessing Wind Energy Projects Potential in Pakistan: Challenges and Way Forward. Energies, 15(23), 9014. DOI: https://doi.org/10.3390/en15239014

Wang, L., Li, T., Wang, P., Liu, Z., & Zhang, Q. (2023). BiLSTM for Predicting Post-Construction Subsoil Settlement under Embankment: Advancing Sustainable Infrastructure. Sustainability, 15(20), 14708. DOI: https://doi.org/10.3390/su152014708

Zhang, J., Yin, M., Wang, P., & Gao, Z. (2024). A Method Based on Deep Learning for Severe Convective Weather Forecast: CNN-BiLSTM-AM (Version 1.0). Atmosphere, 15(10), 1229. DOI: https://doi.org/10.3390/atmos15101229

Zhang, Y., Zhang, T., & Hu, J. (2025). Forecasting Stock Market Volatility Using CNN-BiLSTM-Attention Model with Mixed-Frequency Data. Mathematics, 13(11), 1889. DOI: https://doi.org/10.3390/math13111889

Zhao, C., Huang, X., Li, Y., & Yousaf Iqbal, M. (2020). A Double-Channel Hybrid Deep Neural Network Based on CNN and BiLSTM for Remaining Useful Life Prediction. Sensors, 20(24), 7109. DOI: https://doi.org/10.3390/s20247109

Published
6 August, 2025
How to Cite
Tende, I. (2025). Wind Speed Prediction Using BiLSTM Deep Learning Model and Comparable Batch Sizes of Training Data: A Case of Singida Wind Farm Site, Tanzania. East African Journal of Engineering, 8(1), 255-271. https://doi.org/10.37284/eaje.8.1.3441