Application of artificial neural networks for wind speed prediction

Veselin H. Iliev

Sofia University ”St. Kliment Ohridski”, Faculty of Mathematics and Informatics
James Bourchier Blvd., 1164 Sofia, Bulgaria
vhiliev@uni-sofia.bg

Abstract. Wind speed prediction is a quickly developing area. The reason for
this fact is that numerous human activities (e.g., wind power production,
sailing, air travel, etc.) depend on reliable forecasts. There exist two principal
approaches—using physically-based models and using statistical methods. Both
have their advantages and disadvantages. Statistically-based models have been
shown to be more efficient for shorter time-horizons. In this article, we are
interested in the applications of artificial neural networks (ANNs), in particular.
The latter need big historical data collections for their effective training and
exploitation. There exists a substantial research on the subject in the literature.
In this article we make a comprehensive study on the application of artificial
neural networks using meteorological data from the Sofia airport and global
meteorological prognosis. We use different types of artificial neural networks
for wind speed predictions, discuss the accuracy of the results and comment on
the importance of individual parameters used by the neural networks as inputs.
We analyze the resulting predictions of three different timeframes.

Keywords: Artificial neural networks, Wind speed prediction, Big data,
Weather forecast, Wind speed.

1 Introduction

Accurate weather forecasts are essential to our lives as they save lives, prevent
economic losses and create considerable revenue in various sectors [1]. Wind speed
forecasting methods (as part of the weather forecasts) are particularly important as
wind power is one of the most rapidly growing renewable energy sources, and is
regarded as an appealing alternative to conventional power generated from fossil.
Based on power system operation requirements of the wind farms, the forecast can
be divided into four different horizons: very short-term (few seconds to 30 min),
short-term (30 min to 6 h), medium-term (6–24 h), and long-term (1–7 days or more)
[2].
The majority of the wind forecasting techniques can be clustered into two main
groups—physical methods and statistical methods. The first group takes into account
the physical considerations such as local terrain, wind farm layout and temperature to
reach the estimate and utilize the output from Numerical Weather Prediction (NWP)
models [3].
The statistical approach generally uses previous historical data to build the
statistical model. The models with this approach use NWP forecast for time t+k and
online measurement at time t to forecast the future for the next few hours. It is easier
to model and more inexpensive compared to the physical models.
In the majority of cases the statistical approaches provide good results in very
short-term and short-term horizon forecasting. However, in medium-term and long-
term, the influence of atmospheric dynamics becomes more important, and in these
cases the use of physical approaches becomes essential [4].
The purpose of this paper is to provide a clear example of the use of artificial
neural networks for wind speed prediction using weather data from the Sofia airport
and global weather forecasts, and to walk through all the technical details and stages
in the process of developing and testing artificial neural networks for wind speed
prediction.
There are various studies on the subject in the literature (see e.g. [5], [6], [7]).
In section 2, we describe the experimental data, used in our tests, and its
characteristics.

2 Experimental data

We have used weather data for Sofia airport from an online source [8]. The data
contains measurements for wind speed, pressure, humidity and temperature amongst
other indicators such as date and time of the taken measurements. The frequency of
the records is every 30 minutes, although some data gaps in the files were evident
(measurement data was provided for a time period of an hour at rare points). For the
purpose of the experiments we downloaded a file with data for a period of 5
years—from 2014 until 2018.
We also used a global meteorological prognosis data for a single grid point near the
city of Sofia with coordinates (42°45'N, 23°25'E) [9]. We could only download data
for a shorter period of time—from 08.07.2015 to 28.02.2019. The frequency of the
information was also different than the one at Sofia airport—6 hours.
We chose a period of two months—from 01.01.2019 to 28.02.2019, to test our
neural networks, after they were built. The rest of the information was used for
training.
Four main meteorological data variables were chosen for the experiments—wind
speed, pressure, humidity, and temperature. The representation of information for
wind direction was very difficult to combine with the numerical values of the chosen
variables in the Sofia airport data file since it was a string description, so we decided
to leave wind direction for the Sofia airport data file out of the experiments.
Furthermore, one could argue that since wind generators can rotate, following the
wind direction, it is not so important for predicting wind power production.
Let us note the following:

  • Data was loaded into the neural networks for the chosen parameters.
  • The global meteorological prognosis offered two values for wind speed—u and v-components. The u-axis signifies eastward and the v-axis—northward wind speed directions.
  • We use only the horizontal components of the wind speed, since they are important for wind power prediction.
  • The information loaded into the artificial neural networks was ordered ascendingly by the date and time value of the records.
  • The raw data files were not ready to use as they were downloaded and additional pre-processing was required, which we describe in section 3.1.

3 Approach

3.1 Pre-processing of data

As the raw data files were downloaded in csv format there were some
modifications necessary before loading them into the artificial neural networks. The
software tool we have chosen for this task is Matlab because we further use it for the
experiments with the artificial neural networks as well. Matlab’s main advantage is its
useful and well-designed neural network toolbox.
During the processing of the Sofia airport weather data file, several programming
tasks were defined for the creation of input and output data files for training and
testing the artificial neural networks.

  • The values for wind speed, temperature, humidity and pressure had to be arranged according to the number of inputs and outputs defined in the artificial neural network.
  • The data in the raw file was ordered descendingly by the date and time record values, so we had to reverse the order of the records or to read them from the end towards the beginning of the file.
  • The next pre-processing phase came with the adding of files with global meteorological prognosis data to the existing records of the Sofia airport weather data file. The files with global prognosis have only one download option—a file for a single value of a single weather parameter. This means that we had a lot of files for five different weather parameters (as described in section 2, the values for wind speed were separated into u and v-components). Therefore, a unification task emerged as we had to group separate files into one big file for each parameter (temperature, pressure, humidity, u and v-components of wind speed), after which another combining task had to merge the data from these five files with the data file for Sofia airport. The merging was done based on the date and time values of the records.
  • Since the information regarding the parameters in the global prognosis was with different frequency than the one in Sofia airport (as described in section 2), we decided to use linear interpolation to add the missing data between the 30 minute gaps. Another reason to do this was the poor results the artificial neural networks produced when trained and tested with full Sofia airport data but with global meteorological data for every six hours. Apparently the absence of data for the global parameters led to inconsistencies and miscalculations.
After all these tasks were solved, we needed to define the artificial neural networks
for the experiments, which we describe in section 3.2.

3.2 Artificial neural networks

The application of artificial neural networks (ANNs) is one of the widely used
statistical approaches for wind speed and power forecasts, as they can learn from past
data, recognize hidden patterns or relationships in historical observations and use
them to forecast future values. The neurons of an artificial neural network are
organized into layers. The network uses a connectionist approach in order to link the
neurons from a previous layer to the neurons of the next one. This approach is able to
model the complex non-linear relationship between the inputs of the network,
considered as a separate layer, and the output layer through a training and learning
process. An artificial neural network has the ability of self-learning, self-organizing
and self-adapting [10].
The artificial neural networks used for the experiments consisted of two layers of
neurons—hidden and output layers. The hidden layers were selected with 3 different
numbers of neurons for most of the experiments—12, 24 and 36. The reason for this
choice was the number of inputs given to the networks. These inputs indicate the
number of values for a past period of time, necessary to load in the artificial neural
networks to produce the outputs, which signify the wind speed prognosis ahead for a
defined future period.
The experiments were focused on 2 timeframes for the wind speed forecasts—the
very short-term (1-30 min) and short-term horizons (30 min to 6 h), described in
section 1. The number of values used for inputs are as follows:
- for 1 hour—2 values for each parameter, since the overall data frequency is a
value in every 30 minutes;
- for 3 hours—6 values for each parameter;
- for 6 hours—12 values for each parameter;
The outputs were chosen to be a combination of the same time lengths (and,
respectively, of the same value numbers, but only for the wind speed variable) as the
inputs with an exception of the 6 hour one. An example of the architecture of an
artificial neural network, used in our experiments, is shown in Figure 1.



Figure 1. Artificial neural network with 12 neurons in the hidden layer

The input parameters for the experiments were three types:
- wind speed values from the Sofia airport weather data file;
- wind speed, pressure, temperature and humidity values from the Sofia airport
weather data file;
- wind speed, pressure, temperature, humidity values from the Sofia airport
weather data file and u-component of wind, v-component of wind, relative
humidity, temperature (all four at a vertical level of isobaric surface 1000
mbar) and pressure at maximum wind level from the summary global
prognosis data file;
The experiments conducted with values from both Sofia airport weather data and
global prognosis data had less training datasets compared to those with values only
from Sofia airport weather data because of the different time period of the global
prognosis, described in section 2.
The artificial neural networks used for the experiments, were trained with the
Levenberg-Marquardt algorithm, which is more powerful than the conventional
gradient descent techniques [11].
All artificial neural networks were designed to use 70% of the data samples for
training, 15% for validation or indication when the training stops and 15% for testing.
We tested the networks with values from a dataset for a period of two
months—from 01.01.2019 to 28.02.2019, as described in section 2.
The results from our experiments are described in section 4.

4 Numerical results

We have conducted numerical experiments for various combinations of input
parameters and number of historical measurements. We have implemented the
artificial neural networks, described in section 3.2, in Matlab, using the Neural
Network Fitting tool [12]. The numerical results of the experiments are summarized
in Tables 1 and 2. The last record of Table 2 is written in bold because it was done
with training, validation and testing data for a 3.5 year period, instead of a 5 year one
as the rest of the experiments (as mentioned in the previous section).
Both tables describe five columns:
- input parameters: data for which weather parameters were used for the training
and testing of the artificial neural network—wind speed (ws), pressure (p),
temperature (t), humidity (h) from the Sofia airport data file and the representative
values from the global meteorological data file (as described in sections 2 and 3.2);
- input timeframe—the number of consecutive records used as inputs for the
artificial neural network;
- ANN (hidden neurons)—the number of neurons in the hidden layer of the
artificial neural network;
- output timeframe—the number of output values for wind speed, produced from
the artificial neural network (each record represents a predicted wind speed value for
30 minutes ahead of the previous one);
- MAE (m/s)—mean average error in m/s over the entire test set;

Table 1. Summarized results for the experiment with a single output and input parameter of wind speed, very short-term horizon

Table 2. Summarized results for the experiments with 6 outputs, using variable input parameters


Experiment 1. Using only information for wind speed from the Sofia airport
weather data file as input, we have conducted several tests for very short-term
forecasts (i.e. 30 min ahead), represented in Table 1. We can conclude that there is
not a big difference between result outputs. Therefore, adding additional historical
data is not required.
Experiment 2. The tests represented in Table 2 were conducted for short-term
forecasts (i.e. 3 hours ahead), using only historical data. When comparing the results
with the previous experiments, it is evident that there is not much of a difference
between the predicted values for 30 min to 1 hour ahead forecasts. I.e., wind speed
data suffices to give reasonable results for very-short term predictions (30 min, even
up to 1 hour). The accuracy however deteriorates for longer time horizons. We can
conclude that the added input weather parameters (pressure, temperature and
humidity) contribute to the result improvements for longer-term wind speed prognosis
(records 3 and 4 show better MAE values than the first two records in Table 2
predictions for 1 hour and above). For shorter-term predictions, input values for wind
speed give similar results as input values for wind speed and other weather
parameters.
Experiment 3. Finally, we conducted an experiment with information from both
Sofia airport and global prognosis data. It produces better results for longer-term
predictions. The mean average error for 1 hour results improve with 1.53%
(comparing the second values of last and middle records in MAE column, Table 2),
3.66% for 1.5 hour (third values, same column and records), 5.10% for 2 hour (fourth
values), 6.60% for 2.5 hour (fifth values) and 8.38% for 3 hour prognosis (sixth
values).
We can conclude that global meteorological data plays an important role in longer-
term wind speed predictions. This is also in agreement with the established belief that
for mid- and long-term forecasts the influence of atmospheric dynamics becomes
more important, and the application of global meteorological prognosis produces
better results than just the use of historical data. However, this approach seems to be
beneficial for short-term forecasts as well.

In order to obtain a graphical intuition about what could be expected from the
forecast, acquired in the described way, in Figures 2 and 3 we depicted parts of the
prognosis from Experiment 3.











Figure 2. Wind speed prognosis, 1 hour ahead for a 7 days period (from 01.01.2019 to 07.01.2019)











Figure 3. Wind speed prognosis, 3 hours ahead for a 7 days period (from 01.01.2019 to 07.01.2019)

From the figures, it is evident that the forecast follows the general trends in the real
observations. However, one can note some misalignment between the graphs
(especially in Figure 3). This effect becomes more important, as could be expected, in
the longer forecasts.

5 Conclusions and discussion

We have conducted 3 experiments for wind speed prediction, using weather data
for Sofia airport and global prognosis. We have built and trained several artificial
neural networks, fed them with pre-processed information from both sources and
analyzed the output results. We walked through every technical detail of the process.
In a future study on the subject, some of the following points should be considered:

  • Using mesoscale models for obtaining NWP data
  • Experiment on longer timescales
  • Different software tools (for example, Tensorflow)

The present study will serve as a base for developing a software tool.


References
1. Peter Bauer, Alan Thorpe, Gilbert Brunet: The quiet revolution of numerical weather
prediction. Nature, Volume 525 (2015)
2. Jaesung Jung, Robert P. Broadwater: Current Status and Future Advances for Wind
Speed and Power Forecasting. Renewable and Sustainable Energy Reviews, Volume 31
(2014)
3. A. Tascikaraoglu, M. Uzunoglu: A review of combined approaches for prediction of
short-term wind speed and power. Renewable and Sustainable Energy Reviews, Volume
34 (2014)
4. Jaesung Jung, Robert P. Broadwater: Current Status and Future Advances for Wind
Speed and Power Forecasting. Renewable and Sustainable Energy Reviews, Volume 31
(2014)
5. Gong Li, Jing Shi: On comparing three artificial neural networks for wind speed
forecasting. Applied Energy, Volume 87 (2010)
6. Ummuhan Basaran Filik, Tansu Filik: Wind speed prediction using artificial neural
networks based on multiple local measurements in Eskisehir. 3 rd International Conference
on Energy and Environment Research, ICEER 2016, 7-11 September 2016, Barcelona,
Spain
7. A. R. Finamore, V. Galdi, V. Calderaro, A. Piccolo, G. Conio, S. Grasso: Artificial
neural network application in wind forecasting: An one-hour-ahead wind speed prediction.
5 th IET International Conference on Renewable Power Generation (RPG) 2016, London,
UK
8. Retrieved from rp5.ru, last visited on 31.05.2019
9. Retrieved from rda.ucar.edu, last visited on 31.05.2019
10. Jaesung Jung, Robert P. Broadwater: Current Status and Future Advances for Wind
Speed and Power Forecasting. Renewable and Sustainable Energy Reviews, Volume 31
(2014)
11. Gong Li, Jing Shi: On comparing three artificial neural networks for wind speed
forecasting. Applied Energy, Volume 87 (2010)
12. More information at https://www.mathworks.com/help/deeplearning/gs/fit-data-with-a-
neural-network.html

Коментари

Популярни публикации