Wind power prediction using a nonlinear autoregressive exogenous model network: the case of Santa Marta, Colombia

ABSTRACT


INTRODUCTION
Considering the negative impact produced using conventional energy sources, environmental problems such as pollution, and the accelerated expansion in global energy demand, wind energy is presented as an excellent renewable and sustainable alternative for electricity production. The notable increase in the use and exploitation of renewable energies as an alternative for the generation and storage of clean energy is considered worldwide as one of the main technological solutions to mitigate climate change [1]. Wind power is one of the fastest-growing technologies globally, due to the large-scale production of wind turbines, falling prices, and minimal impact on the environment. According to the International Renewable Energy Agency

4857
(IRENA), the global installed capacity for onshore and offshore wind generation has increased by a factor of 75 in the past two decades, jumping from a production of 7.5 GW in 1997 to 564 GW in 2018. In addition, global installed production in 2021 reached almost 825 GW, representing an increase of approximately 46% compared to 2018 production [2]. With this scenario of rapid growth for wind projects, the prediction of wind generation capacity, based on meteorological data from different regions, is of vital importance [3]. The process of measuring climatic variables is important to estimate the energy potential in areas where it is planned to install a wind farm [4], [5], or in general any energy transformation system [6]- [8], such as the case of hybrid systems [9], [10]. However, in some places, there are no monitoring stations that allow the acquisition of this type of variable, in some cases, the existing stations only record the behavior of a small point for an area of interest or have recurring faults. In the absence of such data, there is a need for tools that allow generalization and provide a better overview of the study variables.
A widely extended solution is the development of computational models, which allow us to understand the behavior of atmospheric phenomena, positively impacting decision-making in the face of an unforeseen event [11]; especially those related to wind behavior. For this, it should be considered that, in wind systems, the most important variables in terms of climatic behavior and energy potential are wind speed and direction [12], which usually have a stochastic behavior, since their flow is affected by various environmental factors. The support of computer simulations to field measurements allows obtaining a greater degree of certainty about the behavior of the variables; with which it is possible to build, among others, adequate wind maps, necessary to make an appropriate selection of the installation site for wind projects. Likewise, by having a model of a wind turbine or a wind farm, the performance characteristics of a wind installation can be compared with computer simulations, to diagnose failures promptly [13].
In this instance, many studies have proposed strategies and methods to forecast parameters in a wind system. The selected technique depends on different parameters and available data, which vary according to climatic conditions [14]. Numerous papers have been published in the scientific literature that predicts the output power generated by wind systems, implementing different techniques and methods. Neshat et al. [15] developed a deep learning-based method for power prediction at a wind farm in Sweden, using power, wind speed, and wind direction as input data. He et al. [16] developed a combined model for wind power forecasting, which was validated with data obtained from a wind farm in Northwest China. Jalali et al. [17], Deepa and Banerjee [18] implemented convolutional neural networks (CNN) for short-term wind power prediction, while in [19] wavelet neural networks were also implemented for short-term wind power prediction, demonstrating the usefulness of neural networks in this type of study. Research has also been conducted to predict short-term wind speed, using wind speed measurements from neighboring locations to improve the prediction results [20].
According to the previous context, in this work, a nonlinear autoregressive exogenous model (NARX) neural network, trained to estimate the potential of wind generation in the city of Santa Marta, Colombia from the meteorological time series reported in national entities was implemented. The proposed prediction methodology has a novelty in that the NARX network was trained with a dataset of a wind turbine located in a different country than the one of this research. Thus, the dataset available in the Kaggle repository of a wind farm located in Turkey was used [21], because it has a large amount of reliable data, unlike the information available for the city of Santa Marta.
It is important to highlight that the NARX architecture has shown enormous potential for forecasting complex problems with different input variables. With this type of architecture, computational costs can be reduced due to its ease of implementation using a combination of complex functions. In addition, with the NARX architecture, excellent convergence times are achieved in forecasting tasks since its function is focused on predicting the next output power based on the identification of the previous information [22]. This paper is organized as: section 2 presents an analysis and processing of the Turkey dataset, as well as the data from the city of Santa Marta, Colombia for a period of 3 years. The NARX architecture is also presented in detail. In section 3, the results of the network training and the prediction of the monthly output power are presented. Finally, in section 4 are the conclusions of the investigation.

METHOD 2.1. Dataset
For training the artificial neural networks (ANN) we use the dataset available in the Kaggle web repository of a wind farm in Turkey [21]. This dataset has five variables: date, active power, wind speed, theoretical power, and wind direction, which are described in Table 1. Each variable has 50,530 data, of which there are no null data, however, in the active power variable, there are 57 atypical values corresponding to negative powers, which may be due to failures in the data acquisition system. For this

Data processing and analysis
The dataset variables are numeric, except for the date variable, which is a character string containing the day, month, year, and time, in which the data has been acquired. When processing this variable, we obtained the name of the month, and to obtain relevant information, a number was arbitrarily assigned to each month, after which, these values were normalized in an interval of [-1, 1]. Table 2 shows the original name of the month, the assigned number, and its normalized equivalent.
By implementing normalization, the entire dataset has the same order of magnitude, which facilitates the implementation of machine learning and artificial intelligence techniques [23]. Following a procedure like that described for the month variable, the values of the angles that indicate the direction of the wind were normalized. Table 3 shows the cardinal points, direction in degrees, and acceptance interval of each cardinal point and its normalized value. Acceptance intervals were chosen every 22.5°.  When analyzing the behavior of the wind direction, it is observed that the highest incidence of this variable corresponds to the cardinal points ENE, NNE, and to a lesser extent to SSW, particularly at angles 30°, 60°, and 210°. This is illustrated in Figures 1(a) and 1(b). In addition, to explain the behavior of the wind speed, the Weibull and Rayleigh distributions were implemented [24]- [26]. The Weibull distribution function is represented in (1). where, V is wind speed, k is dimensionless shape factor (2), and c scale parameter (3).
where, Vavg is average wind speed, σ is standard deviation, and Ґ is gamma function. Similarly, the Rayleigh distribution function is expressed in terms of the mean value of the velocity in (4).
where, V is wind speed and Vavg is average wind speed.

NARX neural network
To predict active power, the NARX neural network described in Figure 2 was implemented, for which the neural network toolbox of the MATLAB software was used. The network is made up of two delays at the input as shown in (5), 10 neurons in the hidden layer with a hyperbolic tangent sigmoid activation function, and an output layer with one neuron and a linear activation function. The NARX architecture is characterized because it feedbacks the output to the input layer, likewise, it has delays in the input layer, thus, it considers the previous data to perform the processing. However, to perform the training, it can be considered as a feedforward neural network as shown in Figure 3.   Figure 3. Series-parallel architecture for NARX training In Figure 3 the notation y'(t) is used to indicate that it is a feedback variable. Additionally, to perform the training, (6) was used.
where, P represents the input data and T represents the target.

Study cases
The NARX network architecture was implemented for three case studies defined in Table 4. In case 1, the variables wind speed, normalized month and normalized wind direction were used to predict the active power. In case 2, the theoretical power, and the normalized month and wind direction were used to predict the wind speed. Finally, in case 3 the same input variables were used as in case 2 but to predict both active power and wind speed. Table 5 presents the distribution of the data that was implemented for training, validation, testing and prediction. Of the 50,473 data, the last 1,000 were used to perform the prediction. The remaining 49,473 data were distributed as: 70% for training (34,631), 15% for validation (7,421), and 15% for testing (7,421).

Active power prediction-Santa Marta
To perform the active power predictions, the time series of the city of Santa Marta, Colombia for the years 2018, 2019, and 2020 were presented to the NARX network previously trained with the Turkey dataset, The time series of Santa Marta were downloaded by month, and subsequently the following variables were extracted: wind speed, angle, and date. These last two variables were normalized as described in section 2.2. It should be noted that for Santa Marta, the most recent data published by IDEAM correspond to July 2020. Therefore, the average active power predictions were only implemented up to this period. In future works, depending on the availability of the data, the missing time periods can be considered. Table 6 shows the results of the statistical data of the wind speed vector and the distribution functions used for data analysis. The Weibull and Rayleigh distributions are presented in Figure 4, where the variations in wind speed are observed. Additionally, when analyzing the dataset, it is possible to determine which are the most relevant variables to model the behavior of interest, for which the correlation matrix of the dataset under study was implemented as shown in Figure 5. Where, WS is wind speed, TP is theoretical power, Wdi is wind direction, NM is normalized month, NW is normalized wind direction, and AP is active power.  The results of the correlation matrix show that the wind speed (WS), theoretical power (TP) and active power (AP) are the most relevant variables for the study. Figure 5 shows that active power has a correlation coefficient of 0.91 with wind speed and 0.95 with theoretical power, likewise, wind speed and theoretical power have a correlation coefficient of 0.94. The other variables in the dataset have a very low correlation coefficient with respect to the variable of interest. With the analysis performed, we were able to verify that the two most relevant variables for modeling active power are wind speed and theoretical power.

NARX network training with the dataset
Case 1. In this case, wind speed, normalized month and normalized wind direction were used as input variables, while the target is active power. After training the NARX network, the correlation coefficient (R) was calculated for each of the processes mentioned in Table 5. Table 7 shows an excellent performance of the NARX network for each of the processes, which is evidenced by the high values obtained for the correlation coefficient. Figure 6 shows the output of the network versus the target, in which the satisfactory performance of the NARX architecture for the prediction of active power can be seen, from the 1,000 data used in this task.  Figure 6. Prediction of active power for case 1 Case 2. For this case, the theoretical power, normalized month, and normalized wind direction were used as inputs, and the target of the network is the wind speed. The results can be seen in Table 8. As in case 1, excellent values for the correlation coefficient in the training, validation, testing, and prediction processes were obtained. In the case of wind speed prediction, an R of 0.9589 was obtained, which shows a similar performance to the R obtained in case 1 for the active power prediction (R=0.9450). In addition, Figure 7 shows the output of the network compared to the target, which in this case is the wind speed. With these results, the satisfactory performance of the network in the prediction from the 1,000 samples used continues to be evidenced. Case 3. In the previous cases, the ANN only had one output, which corresponds to the variable to be predicted. However, in this case, the ANN has two outputs: one to predict the active power and the other to predict the wind speed. Theoretical power, normalized month and normalized wind direction were used as inputs to the neural network. Table 9 shows that for active power an R of 0.9443 was obtained, which is like the result obtained in case 1 with a value of 0.9450. However, for wind speed, R is 0.9174, lower than the value of 0.9589 obtained in case 2. Figure 8(a) shows a comparison for the prediction of active power in cases 1 and 3, where a similar behavior that is consistent with the correlation coefficients obtained in both cases (R=0.9443 case 3, R=0.9450 case 1) is observed. Figure 8(b) illustrates the performance of the network for wind speed prediction in cases 2 and 3, where a better behavior can be seen in case 2, which is consistent with the values . It is evident that the theoretical power input variable affects the behavior of the network, especially in the output corresponding to the wind speed. This is corroborated by comparing the network output (case 3- Figure 8(b)), with the behavior of the theoretical power as shown Figure 8(c), where it is observed that the response of the NARX network follows the theoretical power. Figure 7. Prediction of wind speed for case 2

Prediction of active power for Santa Marta
This section presents the results for the prediction of active power in Santa Marta for the years 2018, 2019 and 2020. For each year, the box-and-whisker plots were performed. In addition, the monthly average active power predictions and the correlation coefficient are presented, with which the performance of the NARX network can be analyzed for the years under study. The results for each year are presented independently in the following three subsections.

Prediction for 2018
With the NARX network successfully trained with the dataset, we proceeded to predict the active power in the city of Santa Marta for the 3 years under study. Table 10 shows the month, average wind speed, predicted average active power and the correlation coefficient (R) for each of the months of the year. In general, the wind speed data are symmetrical with many outliers in most months of the year, which affects the performance of the NARX network in the task of predict active power. This situation is evidenced in the values of R obtained that range between 0.3701 (February) for the worst case and 0.8520 for the best case in March as shown in Table 10. Despite the amount of atypical data, in 8 of the 12 months analyzed for 2018, acceptable correlation coefficients greater than 0.75 were obtained. In relation to the predicted active power, the highest value obtained was 45.3599 kW for the month of December, while the lowest value was obtained in January, 11.6430 kW, with a monthly average of 27.5754 kW for 2018. These data show that the area where the measurements were made has a low wind potential [27], considering that the energy mining planning unit (UPME) establishes that the average monthly consumption of a Colombian household is 157 kWh.

Prediction for 2019
For the year 2019, results were also obtained for the predicted active power and the correlation coefficient, as can be seen in Table 11. Many atypical data in wind speed continue to be observed for most of the months, which affects the performance of the network in the prediction of active power. In this case, correlation coefficients ranging between 0.5243 and 0.8537 were obtained, with 8 of the 12 months with R values greater than 0.75 as shown in Table 11. In relation to the predicted active power, a monthly average value of 27.4767 kW was obtained, which is like the value of 27.5754 obtained for 2018.

Prediction for 2020
The IDEAM only has reported data up to July 2020, for this reason the prediction of active power and the calculation of R were made up to this period as shown in Table 12. The results for the 7 months of 2020 reflect R values between 0.6001 and 0.7902 as shown in Table 12, which shows an acceptable performance of the NARX network in the active power prediction tasks, considering the amount of outlier data. In addition, the monthly average value of the predicted active power is 24.8493, which does not differ from the values obtained for the previous two years.

CONCLUSION
From the results obtained with the NARX network, it can be concluded that this architecture is a good machine learning tool to perform active power and wind speed prediction processes. The use of a reliable dataset allowed the training of the neural network efficiently, which was demonstrated with the values obtained for the correlation coefficient. The normalization process of some variables, such as the month and the wind direction, facilitated the learning of the neural network. Furthermore, data preprocessing was essential for the successful training and implementation of the neural network. It was possible to demonstrate that the methodology proposed in this research is a viable alternative for the predictions of active wind power in a place that does not have available or unreliable data on meteorological variables such as wind speed and direction. For most cases, acceptable correlation coefficients were obtained in the training, validation, testing and prediction processes of active power and wind speed for the city of Santa Marta; implementing a NARX network previously trained with a dataset from a wind farm in Turkey.