Submitted:
07 April 2024
Posted:
08 April 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
1.1. Overview
1.2. Literature Review
1.3. Research Highlights and Contributions
- Comparison of wind speed prediction using ANN and CNN models across Napier, Noupoort, and Upington stations.
- Identification of non-stationarity in wind speed at Napier and Noupoort stations, contrasting with stationary behaviour at Upington.
- Utilisation of hyperparameter tuning via gradient ascent to optimise model performance.
- Consistent superiority of the CNN model over ANN in predicting wind speeds across diverse weather conditions, with CNN’s Mean Absolute Scaled Error (MASE) consistently below 1, indicating superior performance to the baseline model.
2. Methods
2.1. Study Area

2.2. Models
2.2.1. Artificial Neural Networks
Forward Propagation
Backward Propagation
Traning ANNs using Backward Propagation algorithm:
- We first configured our neural network’s weights and biases.
- Next, we calculate the loss by calculating the difference between the expected and actual output.
- Next, we traverse back through the network to compute the gradients of the loss concerning the weights and biases of each layer.
- Gradients are utilised to update the weights and biases in a manner that reduces the loss through an optimisation algorithm like stochastic gradient descent.
- We perform this procedure for several epochs until our network reaches a satisfactory solution.

2.2.2. Convolutional neural network
3. Variable Selection
4. Metrics for Evaluating Forecasts
5. Empirical Results and Discussion
6. Exploratory Data Analysis
6.1. Data source
6.2. Locations
6.3. Data Characteristics
6.4. Summary Statistics
| Variables | Min | Q1 | Median | Mean | Q3 | Max | Kurtosis | Skewness |
|---|---|---|---|---|---|---|---|---|
| WS 62 mean | 0.2075 | 5.3707 | 8.0980 | 8.1546 | 10.7587 | 18.1209 | 2.2579 | 0.120 |
| lag1 | -3,672 | -0.3843 | -0,006 | 0.0013 | 10.3471 | 4.5360 | 3,2753 | 0.4164 |
| lag2 | -5.9052 | -0.5083 | -0.0124 | 0.0024 | 0.5018 | 5.080 | 0.3050 | 2.8335 |
| noltrend | 0.4194 | 5.4067 | 8.1558 | 8.0186 | 10.6570 | 15.6493 | -0.8405 | 0.1334 |
| WS 62 min | 0.2075 | 3.9265 | 5.9410 | 6.0726 | 8.2654 | 13.8439 | 2.2359 | 0.1209 |
| WS 62 max | 0.2075 | 6.7158 | 9.8150 | 9.9529 | 12.6043 | 21.2820 | 2.3448 | 0.1505 |
| WS 62 stdv | 0.0000 | 0.4208 | 0.7302 | 0.7565 | 1.0407 | 2.1862 | 2.4622 | 0.396 |
| Tair mean | 0.05 | 12.67 | 14.14 | 14.29 | 15.66 | 27.54 | 6.5815 | -0.250 |
| Tair min | -0.96 | 12.55 | 14.00 | 14.12 | 15.44 | 26.32 | 6.8373 | -0.364 |
| Tair max | 0.33 | 12.80 | 14.35 | 14.49 | 15.84 | 28.52 | 6.4376 | -0.156 |
| Tair stdv | 0.0080 | 0.0352 | 0.0544 | 0.0859 | 0.1056 | 6.2100 | 1070.9 | 25.404 |
| Tgrad mean | -1.7170 | -0.9450 | -0.3370 | -0.3394 | 0.0822 | 5.3090 | 8.0381 | 1.464 |
| Tgrad min | -2.3590 | -1.1870 | -0.4390 | -0.5158 | -0.0100 | 4.5340 | 5.2743 | 0.747 |
| Tgrad max | -1.4360 | -0.7240 | -0.2960 | -0.1777 | 0.2050 | 6.3590 | 11.9340 | 2.209 |
| Tgrad stdv | 0 | 0.0310 | 0.0680 | 0.0869 | 0.1230 | 1.6610 | 40.6393 | 3.292 |
| Pbaro mean | 975.5 | 981.9 | 984.3 | 984.3 | 986.8 | 992.5 | 2.5188 | -0.1719 |
| Pbaro min | 975.4 | 981.7 | 984.0 | 984.1 | 986.6 | 992.3 | 2.5067 | -0.160 |
| Pbaro max | 975.6 | 982.1 | 984.5 | 984.4 | 987.0 | 994.1 | 2.5307 | -0.175 |
| Pbaro stdv | 0.0345 | 0.0517 | 0.0615 | 0.0688 | 0.0768 | 0.4847 | 40.7974 | 4.465 |
| RH mean | 0.3731 | 67.1750 | 80.00 | 76.0780 | 90.600 | 100.0 | 6.5481 | -1.697 |
| RH min | 0 | 64.34 | 78.03 | 72.65 | 89.70 | 100.00 | 5.2239 | -1.568 |
| RH max | 0.4761 | 69.7800 | 82.6000 | 78.9211 | 92.8000 | 100.00 | 7.8746 | -1.934 |
| RH stdv | 0.0073 | 0.1532 | 0.4781 | 2.0726 | 0.9190 | 49.8000 | 29.5516 | 5.234 |
| Variables | Min | Q1 | Median | Mean | Q3 | Max | Kurtosis | Skewness |
|---|---|---|---|---|---|---|---|---|
| WS 62 mean | 0.7426 | 5.4502 | 7.5723 | 7.6568 | 9.5766 | 17.3895 | 2.8084 | 0.343 |
| lag1 | -6,7801 | -0,4461 | -0.0210 | 0.0007 | 0.4089 | 8.8909 | 8.3133 | 0.6035 |
| lag2 | -6.7107 | -0.6059 | -0.0434 | 0.0012 | 0.5449 | 10.2386 | 6.2678 | 0.5044 |
| noltrend | 2.3325 | 5.5389 | 7.5344 | 7.6575 | 9.4338 | 15.3806 | -0.2665 | 0.3920 |
| WS 62 min | 0.2148 | 3.9322 | 5.4812 | 5.6039 | 7.0301 | 14.1553 | 2.9473 | 0.129 |
| WS 62 max | 1.454 | 6.720 | 9.199 | 9.672 | 11.987 | 23.139 | 2.9325 | 0.521 |
| WS 62 stdv | 0.1252 | 0.4461 | 0.7215 | 0.8142 | 1.0776 | 4.1196 | 4.9796 | 1.140 |
| Tair mean | 4.46 | :13.25 | 16.36 | 16.42 | 19.91 | 27.44 | 2.5718 | -0.221 |
| Tair min | 4.37 | 13.00 | 16.14 | 16.21 | 19.66 | 27.27 | 2.5529 | -0.207 |
| Tair max | 4.57 | 13.53 | 16.61 | 16.67 | 20.12 | 27.74 | 2.5877 | -0.231 |
| Tair stdv | 0.01190 | 0.0526 | 0.0859 | 0.1169 | 0.1384 | 2.7570 | 107.6253 | 7.994 |
| Tgrad mean | -1.5090 | -0.8410 | -0.3015 | -0.0134 | 0.5712 | 8.6500 | 10.5456 | 2.000 |
| Tgrad min | -2.0680 | -1.0760 | -0.4370 | -0.2633 | 0.3460 | 7.5830 | 8.5134 | 1.535 |
| Tgrad max | -1.2180 | -0.6500 | -0.1530 | 0.2275 | 0.8460 | 9.2700 | 12.3579 | 2.321 |
| Tgrad stdv | 0.0000 | 0.0690 | :0.1130 | 0.1334 | 0.1650 | 2.4420 | 99.0035 | 7.333 |
| Pbaro mean | 815.8 | 821.4 | 822.9 | 822.8 | 824.6 | 828.2 | 2.8536 | -0.400 |
| Pbaro min | 815.3 | 821.2 | 822.7 | 822.7 | 824.4 | 828.1 | 2.8750 | -0.401 |
| Pbaro max | 816.1 | 821.6 | 823.1 | 823.1 | 824.9 | 834.6 | 3.0576 | -0.334 |
| Pbaro stdv | 0.0386 | 0.0572 | 0.0660 | 0.0748 | 0.0819 | 0.7640 | 113.7876 | 8.054 |
| RH mean | 4.63 | 26.11 | 48.02 | 50.97 | 73.38 | 100.00 | 1.8856 | 0.210 |
| RH min | 4.337 | 24.625 | 45.320 | 49.124 | 70.748 | 100.00 | 1.9561 | 0.286 |
| RH max | 4.88 | 27.92 | 50.30 | 52.73 | 75.86 | 100.00 | 1.8278 | 0.144 |
| RH stdv | 0.0137 | 0.2652 | 0.5501 | 0.8811 | 1.0413 | 18.6200 | 49.4307 | 5.359 |
| Variables | Min | Q1 | Median | Mean | Q3 | Max | Kurtosis | Skewness |
|---|---|---|---|---|---|---|---|---|
| WS 62 mean | 0.3693 | 3.9306 | 5.6373 | 5.7308 | 7.3684 | 16.8912 | 3.002 | 0.393 |
| lag1 | -4.1385 | -0.4724 | -0.0062 | -0.0000 | 0.4537 | 7.7245 | 4.3099 | 0.2771 |
| lag2 mean | -6.8561 | -0.6306 | 0 | 0.0000 | 0.6216 | 10.2096 | 5.1082 | 0.2813 |
| noltrend | 1.2370 | 4.2517 | 5.6724 | 5.7299 | 7.1200 | 12.2634 | -0.2640 | 0.2997 |
| WS 62 min | 0.1891 | 2.0538 | 3.9186 | 3.9350 | 5.4726 | 11.9993 | 2.411 | 0.252 |
| WS 62 max | 0.8106 | 5.4726 | 7.3373 | 7.5899 | 9.2021 | 24.1203 | 4.428 | 0.796 |
| WS 62 stdv | 0.1193 | 0.3996 | 0.6645 | 0.7589 | 1.0276 | 4.7676 | 6.229 | 1.264 |
| Tair mean | 11.20 | 22.72 | 26.93 | 26.55 | 30.72 | 37.29 | 2.475 | -0.289 |
| Tair min | 11.01 | 22.36 | 26.59 | 26.24 | 30.39 | 36.98 | 2.455 | -0.271 |
| Tair max | 11.55 | 23.33 | 27.56 | 27.16 | 31.36 | 38.05 | 2.491 | -0.299 |
| Tair stdv | 0.0731 | 0.1069 | 0.1373 | 0.1704 | 0.1939 | 2.117 | 40.824 | 4.423 |
| Tgrad mean | -1.5270 | -0.8290 | 0.0760 | 0.8828 | 2.0688 | 11.2300 | 4.317 | 1.313 |
| Tgrad min | -2.375 | -1.107 | -0.066 | 0.576 | 1.712 | 10.960 | 4.241 | 1.249 |
| Tgrad max | -1.183 | -0.571 | 0.236 | 1.169 | 2.391 | 11.440 | 4.321 | 1.333 |
| Tgrad stdv | 0.0090 | 0.0750 | 0.1280 | 0.1588 | 0.1930 | 1.9500 | 21.063 | 3.091 |
| Pbaro mean | 907.8 | 913.8 | 915.2 | 915.2 | 916.9 | 921.4 | 3.035 | -0.243 |
| Pbaro min | 907.8 | 913.5 | 915.1 | 915.0 | 916.6 | 921.2 | 3.041 | -0.239 |
| Pbaro max | 908.2 | 914.0 | 915.4 | 915.4 | 917.1 | 921.7 | 3.063 | -0.233 |
| Pbaro stdv | 0.0559 | 0.0818 | 0.0895 | 0.0932 | 0.0991 | 0.3305 | 20.372 | 2.981 |
| RH mean | 3.85 | 9.94 | 17.18 | 22.40 | 31.01 | 93.00 | 4.696 | 1.342 |
| RH min | 3.599 | 9.527 | 16.510 | 21.691 | 30.225 | 92.300 | 4.745 | 1.352 |
| RH max | 4.019 | 10.370 | 17.740 | 23.130 | 32.072 | 93.300 | 4.667 | 1.340 |
| RH stdv | 0.0314 | 0.1117 | 0.2061 | 0.3546 | 0.3995 | 7.0850 | 43.169 | 5.119 |
7. Data Visualisation
8. Variable Selection

8.1. Training Loss for ANN Model for All Stations

8.2. Forecast Accuracy for ANN Model
9. CNN Model Training and Results
Napier Station
Upington Station
Noupoort Station
9.1. Training Loss for CNN Model for All Stations
9.2. Forecast Accuracy for CNN Model
10. Discussion
11. Conclusion
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| ANN | Artificial Neural Network |
| CNN | Convolutional neural network |
| WASA | Wind atlas for South Africa |
| WWEA | World Wind Energy Association |
| ANFIS | Adaptive Neuro-Fuzzy Inference |
| ARMA | Autoregressive–moving-average |
| BP | Backpropagation |
| RBF | Radial Basis Function |
| WMO | World Meteorological Organization |
| KPSS | Kwiatkowski-Phillips-Schmidt-Shin |
| Lasso | Least Absolute Shrinkage and Selection Operator |
| LSTM | long short-term memory networks |
| MAE | Mean Absolute Error |
| RMAE | Relative Absolute Percentage Error |
| RMSE | Root Mean Squared Error |
| RRMSE | Relative Root Mean Square Error |
| MASE | Mean Absolute Scaled Error |
Appendix A
Appendix A.1. List of covariates used in the study
- lag1 - This variable represents the first lag of the wind speed, which is derived from historical wind speed data. It serves as one of the predictors or explanatory variables in the analysis, potentially indicating the effect of past wind speed on the current wind speed.
- lag2 - Similar to lag1, this variable represents the second lag of the wind speed, derived from historical data. It’s another predictor variable used to examine the influence of wind speed in the previous time period on the current wind speed.
- noltrend - The noltrend variable is derived from a cubic regression spline model. In this context, it likely captures the trend component of the data after removing any non-linear patterns through regression splines.
- WS_62_min - represents the minimum wind speed recorded at the stations. Wind speed measures how fast the air is moving at a particular location. In this case, it specifically refers to the wind speed measured at a height of 62 meters above the ground.
- WS_62_max -represents the maximum wind speed recorded at the stations.
- WS_62_stdv - refers to the standard deviation of wind speeds measured 62 meters above the ground at the stations.
- Tair_mean represents the stations’ mean (average) air temperature. Air temperature refers to the measure of the warmth or coldness of the air in a particular location
- Tair_min - represents the minimum air temperature at the stations.
- Tair_max - represents the highest air temperature ever recorded at the stations.
- Tair_stdv - represents the standard deviation of air temperature at the stations. The standard deviation is a statistical measure that quantifies the amount of variability or dispersion in a set of values
- Tgrad_mean -this represents the average temperature gradient at the stations. Temperature gradient reflects the speed of temperature alteration about distance or height.
- Tgrad_min - represents the minimum temperature gradient at the stations.
- Tgrad_max -represents the highest temperature gradient recorded at the stations.
- Tgrad_stdv - represents the standard deviation of the temperature gradient at the stations. The variable helps to understand how much the temperature gradients vary from the average value.
- Pbaro_mean - represents the average barometric pressure at the Napier station. Barometric pressure, also called atmospheric pressure, is the force exerted by the weight of the air above a specific area.
- Pbaro_min - represents the lowest barometric pressure recorded at the stations during the day.
- Pbaro_max - represents the highest barometric pressure recorded at the station during the day.
- Pbaro_stdv - represents the variation or dispersion in the barometric pressure values at the station.
- RH_mean represents the stations’ mean (average) relative humidity. Relative humidity measures the amount of moisture in the air relative to the maximum amount of moisture the air can hold at a given temperature.
- RH_min - represents the minimum relative humidity at the stations. Relative humidity is typically expressed as a percentage (%), with 100% indicating that the air is saturated with moisture and lower percentages indicating drier air
- RH_max - represents the highest relative humidity recorded at the stations during the day.
- RH_stdv - represents the variation or dispersion in the relative humidity values at the stations.
References
- Wiser, R.; Lantz, E; Mai, T.; Zayas, J.; DeMeo, E.; Eugeni, E.; Lin-Powers, J.; Tusing, R. Wind vision: A new era for wind power in the united states. The Electricity Journal 2015, 28(9), 120–132. [CrossRef]
- Klein, R.; Celik, T. The Wits Intelligent Teaching System: Detecting student engagement during lectures using Convolutional Neural Networks. In 2017 IEEE International Conference on Image Processing (ICIP) 2017, 2856–2860. [CrossRef]
- Li, G.; Shi, J. On comparing three artificial neural networks for wind speed forecasting. Applied Energy 2010, 87(7), 2313–2320. [CrossRef]
- Mathew, S. Wind energy: Fundamentals, resource analysis and economics 2006, volume 1, Springer Berlin, Heidelberg. [CrossRef]
- Antor, A.F.; Wollega, E.D. Comparison of machine learning algorithms for wind speed prediction. In Proceedings of the International Conference on Industrial Engineering and Operations Management 2020, 857–866. https://dx.doi.org/10.1088/1742-6596/1618/6/062060.
- Shen, Z.; Fan, X.; Zhang, L.; Yu, H. Wind speed prediction of unmanned sailboat based on CNN and LSTM hybrid neural network. Ocean Engineering 2022, 254, 111352. [CrossRef]
- Chen, Q.; Folly, K.A. Comparison of three methods for short-term wind power forecasting. In 2018 International Joint Conference on Neural Networks, IEEE 2018, 1–8. [CrossRef]
- Milligan, M.; Schwartz, M.; Wan, Y.-h. Statistical wind power forecasting models: Results for us wind farms. Technical report, National Renewable Energy Laboratory 2003. 1–11. https://www.nrel.gov/docs/fy04osti/35087.pdf.
- McCulloch, W.S., Pitts, W. A logical calculus of the ideas immanent in nervous activity. Bulletin of Mathematical Biophysics 1943, 5, 115–133. [CrossRef]
- Rosenblatt, F. (1958). The perceptron: A probabilistic model for information storage and organization in the brain. Psychological Review 1958, 65(6), 386–408. [CrossRef]
- Daniel, L.O.; Sigauke, C.; Chibaya, C.; Mbuvha, R. Short-term wind speed forecasting using statistical and machine learning methods. Algorithms 2020, 13(6), 132. [CrossRef]
- Schmidhuber, J. Deep learning in neural networks: An overview. Neural networks 2015, 61, 85–117. [CrossRef]
- Priddy, K.L.; Keller, P.E. Artificial neural networks: an introduction 2005, volume 68, SPIE press. [CrossRef]
- LeCun, Y.; Bottou, L.; Bengio, Y.; Haffner, P. Gradient-based learning applied to document recognition. Proceedings of the IEEE 1998, 86(11) 2278–2324. [CrossRef]
- Wang, Z.; Zhang, J.; Zhang, Y.; Huang, C.; Wang, L. Short-term wind speed forecasting based on information of neighboring wind farms. IEEE Access 2020, 8, 16760–16770. [CrossRef]
- Tibshirani, R. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society: Series B (Methodological) 1996, 58(1), 267–288. https://www.jstor.org/stable/2346178.









| Station | Longitude | Latitude | Elevation |
|---|---|---|---|
| Napier | 19.7 | -34.617 3 | 288m |
| Noupoort | 25.033 | -31.25 | 1806m |
| Upington | 20.567 | -27.733 | 848m |
| (b) Distance matrix. | |||
| Napier | Noupoort | Upington | |
| Napier | 0 | 832 | 1041 |
| Noupoort | 832 | 0 | 866 |
| Upington | 1041 | 866 | 0 |
| Locations | MAE | RMAE | RMSE | RRMSE | MASE |
| Napier station | 8,7974 | 2.966 | 9.343 | 10.889 | 1.0 |
| Noupoort station | 8.8844 | 2.980 | 9.21 | 9.928 | 1.0 |
| Upington station | 5.851 | 2.411 | 6.142 | 11.096 | 1.0 |
| Locations | MAE | RMAE | RMSE | RRMSE | MASE |
| Napier station | 0.635 | 0.079 | 0.805 | 0.100 | 0.150 |
| Noupoort station | 2.564 | 0.333 | 2.727 | 0.354 | 0.747 |
| Upington station | 0.7414 | 0.134 | 0.9810 | 0.1781 | 0.284 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).