**Abstract**

Due to the low dispatchability of wind power, the massive integration of this energy source in electrical systems requires short-term and very short-term wind farm power output forecasting models to be as efficient and stable as possible. A study is conducted in the present paper of potential improvements to the performance of artificial neural network (ANN) models in terms of efficiency and stability. Generally, current ANN models have been developed by considering exclusively the meteorological information of the wind farm reference station, in addition to selecting a fixed number of time periods prior to the forecasting. In this respect, new ANN models are proposed in this paper, which are developed by: varying the number of prior 1-h periods (periods prior to the prediction hour) chosen for the input layer parameters; and/or incorporating in the input layers data from a second weather station in addition to the wind farm reference station. It has been found that the model performance is always improved when data from a second weather station are incorporated. The mean absolute relative error (MARE) of the new models is reduced by up to 7.5%. Furthermore, the longer the forecast horizon, the greater the degree of improvement.

**Keywords:** Artificial neural networks (ANN), wind power forecasting, model performance, wind farm power output

## **1. Introduction**

A major impediment to the large-scale integration of wind power in electrical systems is the low dispatchability of this energy source. The effects of variations in wind speed, and hence wind power, are not only observed on a year-to-year or season-to-season scale, but also on a within-day scale [1–5]. A strategy that can be employed to improve wind energy integration in electrical systems is to optimize the performance of short-term forecasting models of wind farm power production. This strategy is the focus of the present study.

The direct consequences of the low dispatchability of wind power on electrical systems can be both technical and economic. Supply and demand adjustments in electrical systems are made 24–36 hours in advance. Any mismatches that might arise between supply and demand forecasting are subsequently corrected on the day itself [6–9]. The mismatch correction as the result of imprecise forecasting entails additional costs for the electrical system [7, 10]. These extra costs are generally absorbed by the end user and/or electricity producer, with the latter thus burdened by an additional production cost.

Other strategies have been used to minimize the problem described above. One involves the direct estimation of the net energy demand of the electrical system, which can be understood as the difference between total demand and the energy generated by renewable sources. In [11–12], a model is proposed for direct forecasting of net energy demand which is validated with data from different electrical systems. Reference [13] compares a direct forecasting model of net energy demand with different indirect forecasting strategies.

In the electricity market, the matching of supply and demand is generally performed for 1 h periods. For this reason, in an analysis of model forecasting performance, it is very important to evaluate the error for 1 h periods, to study model performance for different forecast horizons, and to evaluate the stability of the error in the time horizon in which the forecasting is made.

Numerous studies can be found in the literature on the development of short-term forecasting models. Different techniques and approaches have been analyzed and proposed. In most cases, good performances for specific forecasting horizons have been obtained. The techniques that have been used range from simple heuristics [14–20] to systems which employ artificial intelligence [21–34]. The study developed in the present paper focuses on models which employ the technique of artificial neural networks (ANNs) to forecast wind farm power production [21, 22, 26], [27, 29–31, 33, 34].

In [34], the proposed forecasting model is developed on the basis of improvements made to the kriging interpolation method and empirical mode decomposition, using a new forecasting engine based on neural networks. To analyze the results, the mean absolute percentage error (MAPE), normalized mean absolute error (NMAE) and normalized root mean square error (NRMSE) metrics are used, calculated as the mean value in the forecasting horizons (24 h and 6 h). As in [34], models have been developed for different forecasting horizons [26, 27, 33]. However, an extensive analysis of the literature conducted by the authors of the present study has found that the models developed to date only consider a specific and fixed number of prior 1-*h* periods (periods prior to the prediction hour). It should also be noted that, in all the studies consulted, the meteorological data used as input layer parameters correspond exclusively to the reference weather station (WS) of the wind farm. In no case is the meteorological information used from additional WSs other than the reference WS of the wind farm. Finally, the metrics used to assess model performance in all these studies are obtained as the mean value of the forecasting time horizon. As previously stated, given that the matching of supply and demand in the electricity market is performed for 1 h periods, there is an additional interest in the study of the possible variation of the metrics within that time frame for each of the hourly periods.

The present study considers possible improvements, in terms of efficiency and stability, to the performance of ANN-based models for wind power forecasting. For this purpose, an analysis is made on the improvement of model performance of: ① varying the number of prior 1-*h* periods (periods prior to the forecasting hour) chosen for the ANN input layer parameters; and/or ② incorporating in the input layer data from a second weather station in addition to the data from the wind farm reference station. The analysis is undertaken for a wide range of forecasting horizons. Based on the above, a total of up to 175 ANN models are generated, and the results are compared by applying the models to two actual wind farms located in the Canary Islands, Spain.

**85**

**Figure 1.**

*Methodology to obtain forecasting models.*

*Optimization of the ANNs Models Performance in the Short-Term Forecasting of the Wind…*

The aim of this paper is to make the following original contributions to the

1.A study of improvement in the efficiency and stability of ANN models of varying the number of 1-*h* prior periods (periods prior to the prediction hour and hereinafter referred to as *n*), chosen for incorporation of the input layer

2.A study of improvement in ANN model performance of the additional incorporation in the input layer of meteorological data from WSs other than the

**Figure 1** shows the methodology followed in the present study for the implementation of different ANN models generated. It shows the combination of parameters which are considered for the input and output layer neurons in the generation process of different ANN models. The various parameters are defined as follows: ti is the time instant on the basis of which the forecast is made, and Vti, Dti and Pti are the wind speed, wind direction and the wind farm power output, respectively, in the instant ti. The following data are used in all the models: historical wind speed and direction data obtained from the wind farm reference WS, and historical power production

Both effects are analyzed for different forecasting horizons.

*DOI: http://dx.doi.org/10.5772/intechopen.97190*

wind farm reference station.

scientific body of knowledge:

parameters.

**2. Methodology**

*Optimization of the ANNs Models Performance in the Short-Term Forecasting of the Wind… DOI: http://dx.doi.org/10.5772/intechopen.97190*

The aim of this paper is to make the following original contributions to the scientific body of knowledge:


Both effects are analyzed for different forecasting horizons.

## **2. Methodology**

*Theory of Complexity - Definitions, Models, and Applications*

by an additional production cost.

with different indirect forecasting strategies.

production [21, 22, 26], [27, 29–31, 33, 34].

time frame for each of the hourly periods.

the error in the time horizon in which the forecasting is made.

itself [6–9]. The mismatch correction as the result of imprecise forecasting entails additional costs for the electrical system [7, 10]. These extra costs are generally absorbed by the end user and/or electricity producer, with the latter thus burdened

Other strategies have been used to minimize the problem described above. One involves the direct estimation of the net energy demand of the electrical system, which can be understood as the difference between total demand and the energy generated by renewable sources. In [11–12], a model is proposed for direct forecasting of net energy demand which is validated with data from different electrical systems. Reference [13] compares a direct forecasting model of net energy demand

In the electricity market, the matching of supply and demand is generally performed for 1 h periods. For this reason, in an analysis of model forecasting performance, it is very important to evaluate the error for 1 h periods, to study model performance for different forecast horizons, and to evaluate the stability of

Numerous studies can be found in the literature on the development of short-term forecasting models. Different techniques and approaches have been analyzed and proposed. In most cases, good performances for specific forecasting horizons have been obtained. The techniques that have been used range from simple heuristics [14–20] to systems which employ artificial intelligence [21–34]. The study developed in the present paper focuses on models which employ the technique of artificial neural networks (ANNs) to forecast wind farm power

In [34], the proposed forecasting model is developed on the basis of improvements made to the kriging interpolation method and empirical mode decomposition, using a new forecasting engine based on neural networks. To analyze the results, the mean absolute percentage error (MAPE), normalized mean absolute error (NMAE) and normalized root mean square error (NRMSE) metrics are used, calculated as the mean value in the forecasting horizons (24 h and 6 h). As in [34], models have been developed for different forecasting horizons [26, 27, 33]. However, an extensive analysis of the literature conducted by the authors of the present study has found that the models developed to date only consider a specific and fixed number of prior 1-*h* periods (periods prior to the prediction hour). It should also be noted that, in all the studies consulted, the meteorological data used as input layer parameters correspond exclusively to the reference weather station (WS) of the wind farm. In no case is the meteorological information used from additional WSs other than the reference WS of the wind farm. Finally, the metrics used to assess model performance in all these studies are obtained as the mean value of the forecasting time horizon. As previously stated, given that the matching of supply and demand in the electricity market is performed for 1 h periods, there is an additional interest in the study of the possible variation of the metrics within that

The present study considers possible improvements, in terms of efficiency and stability, to the performance of ANN-based models for wind power forecasting. For this purpose, an analysis is made on the improvement of model performance of: ① varying the number of prior 1-*h* periods (periods prior to the forecasting hour) chosen for the ANN input layer parameters; and/or ② incorporating in the input layer data from a second weather station in addition to the data from the wind farm reference station. The analysis is undertaken for a wide range of forecasting horizons. Based on the above, a total of up to 175 ANN models are generated, and the results are compared by applying the models to two actual wind farms located in

**84**

the Canary Islands, Spain.

**Figure 1** shows the methodology followed in the present study for the implementation of different ANN models generated. It shows the combination of parameters which are considered for the input and output layer neurons in the generation process of different ANN models. The various parameters are defined as follows: ti is the time instant on the basis of which the forecast is made, and Vti, Dti and Pti are the wind speed, wind direction and the wind farm power output, respectively, in the instant ti.

The following data are used in all the models: historical wind speed and direction data obtained from the wind farm reference WS, and historical power production

**Figure 1.**

*Methodology to obtain forecasting models.*

data of the wind farm. In some models, as will subsequently be explained, the historical wind speed and direction data of a second WS are used in addition to the data of the wind farm reference station.

The output layer is comprised of the power output values for different forecasting horizons.

The number of hours prior to the prediction hour, *n*, and the length of the forecasting horizon that is being forecasted, *m*, are variable.

#### **2.1 Architecture of ANN employed**

The ANNs used to generate the models are comprised of three layers with feedforward connections. For this purpose, multi-layer perceptron (MLP) topologies have been used [35, 36]. In order not to increase the length of the training period excessively, a single layer of hidden neurons is used. This architecture has been shown to have the capacity to satisfactorily approximate any continuous transformation [35, 36]. Various prior tests have been carried out to choose the number of hidden neurons, varying the number of input signals. It is found that using more than 20 neurons merely increases the time required for model training and validation without improving the results. It is therefore decided to use a total of 20 neurons in the hidden layer.

The architectures are trained using the backpropagation algorithm with sigmoidal activation function [31, 32]. The Levenberg–Marquardt algorithm is used to minimize the mean square error committed in the learning process [35, 37].

To carry out the training and validation stages used to generate the model and the test stage of the network, the available annual data series for each parameter are divided into random and different subsets (**Figure 1**). The proportion of data selected for each of the stages is 75%, 15% and 10%, respectively.

As can be seen in **Figure 1**, the training and validation data subsets are used to generate the model. The test data subset is used to evaluate the performance of the model generated.

The 10-fold cross-validation technique is used for the process of model generation and evaluation. The test stage data subset is used in each of the iterations. The error assigned to each model is the arithmetic mean of those obtained in the test stage for each of the iterations.

The various studies are performed using neural network tools available in the MATLAB software package.

#### **2.2 Study cases**

1.*Case A: Comparison of efficiency and stability of different ANN models obtained when varying the number of periods prior to the prediction hour (n) chosen for incorporation of different parameters in the input layer*

The number of prior periods, *n*, and the number of forecast horizon periods, *m*, are study variables. The different combinations of *n* and *m* generate different models whose performances will be analyzed. For Case A, both *n* and *m* are permitted to take the values 3, 6, 12, 24 and 36. That is to say, five different models are generated for each forecasting horizon, and thus the total number of generated models is 25. This methodology is applied to the two wind farms of the study.

To study the models in terms of the stability of forecasting, the results obtained for each of the periods within the forecasting horizon, *m*, are compared.

**Figure 2** shows the structure of the neural network for this study case. The number of neurons of the output layer depends on the forecasting horizon, and will thus

**87**

**Figure 3.**

*Optimization of the ANNs Models Performance in the Short-Term Forecasting of the Wind…*

fluctuate between 3 and 36 neurons. For the input layer, the number of neurons will also vary depending on the value of *n*, from 9 (*n* = 3) to 108 (*n* = 36) neurons.

*Schematic representation of neural network for generation of forecasting models in case A.*

*Schematic representation of neural network for generation of forecasting models in case B.*

2.*Case B: Comparison of performance of ANN models when additionally incorporating in the input layer the data from a second WS other than the reference station* 

For Case B, both *n* and *m* could take the same values as indicated for Case A. **Figure 3** shows the structure of the neural network for the generation of models

In Case B, the input layer of the ANN incorporates the data from a second WS in addition to that of the reference WS of the wind farm. To generate different models,

*DOI: http://dx.doi.org/10.5772/intechopen.97190*

*of wind farm.*

in Case B.

**Figure 2.**

*Optimization of the ANNs Models Performance in the Short-Term Forecasting of the Wind… DOI: http://dx.doi.org/10.5772/intechopen.97190*

#### **Figure 2.**

*Theory of Complexity - Definitions, Models, and Applications*

forecasting horizon that is being forecasted, *m*, are variable.

data of the wind farm reference station.

**2.1 Architecture of ANN employed**

20 neurons in the hidden layer.

stage for each of the iterations.

MATLAB software package.

model generated.

**2.2 Study cases**

horizons.

data of the wind farm. In some models, as will subsequently be explained, the historical wind speed and direction data of a second WS are used in addition to the

The output layer is comprised of the power output values for different forecasting

The number of hours prior to the prediction hour, *n*, and the length of the

The ANNs used to generate the models are comprised of three layers with feedforward connections. For this purpose, multi-layer perceptron (MLP) topologies have been used [35, 36]. In order not to increase the length of the training period excessively, a single layer of hidden neurons is used. This architecture has been shown to have the capacity to satisfactorily approximate any continuous transformation [35, 36]. Various prior tests have been carried out to choose the number of hidden neurons, varying the number of input signals. It is found that using more than 20 neurons merely increases the time required for model training and validation without improving the results. It is therefore decided to use a total of

The architectures are trained using the backpropagation algorithm with sigmoidal activation function [31, 32]. The Levenberg–Marquardt algorithm is used to minimize the mean square error committed in the learning process [35, 37].

To carry out the training and validation stages used to generate the model and the test stage of the network, the available annual data series for each parameter are divided into random and different subsets (**Figure 1**). The proportion of data

As can be seen in **Figure 1**, the training and validation data subsets are used to generate the model. The test data subset is used to evaluate the performance of the

The 10-fold cross-validation technique is used for the process of model generation and evaluation. The test stage data subset is used in each of the iterations. The error assigned to each model is the arithmetic mean of those obtained in the test

The various studies are performed using neural network tools available in the

1.*Case A: Comparison of efficiency and stability of different ANN models obtained when varying the number of periods prior to the prediction hour (n) chosen for* 

The number of prior periods, *n*, and the number of forecast horizon periods, *m*, are study variables. The different combinations of *n* and *m* generate different models whose performances will be analyzed. For Case A, both *n* and *m* are permitted to take the values 3, 6, 12, 24 and 36. That is to say, five different models are generated for each forecasting horizon, and thus the total number of generated models is 25.

To study the models in terms of the stability of forecasting, the results obtained

**Figure 2** shows the structure of the neural network for this study case. The number of neurons of the output layer depends on the forecasting horizon, and will thus

selected for each of the stages is 75%, 15% and 10%, respectively.

*incorporation of different parameters in the input layer*

This methodology is applied to the two wind farms of the study.

for each of the periods within the forecasting horizon, *m*, are compared.

**86**

*Schematic representation of neural network for generation of forecasting models in case A.*

fluctuate between 3 and 36 neurons. For the input layer, the number of neurons will also vary depending on the value of *n*, from 9 (*n* = 3) to 108 (*n* = 36) neurons.

2.*Case B: Comparison of performance of ANN models when additionally incorporating in the input layer the data from a second WS other than the reference station of wind farm.*

For Case B, both *n* and *m* could take the same values as indicated for Case A. **Figure 3** shows the structure of the neural network for the generation of models in Case B.

In Case B, the input layer of the ANN incorporates the data from a second WS in addition to that of the reference WS of the wind farm. To generate different models,

#### *Theory of Complexity - Definitions, Models, and Applications*

