ARTIFICIAL NEURAL NETWORK AND WAVELET DECOMPOSITION IN THE FORECAST OF GLOBAL HORIZONTAL SOLAR RADIATION

This paper proposes a method (denoted by WD-ANN) that combines the Artificial Neural Networks (ANN) and the Wavelet Decomposition (WD) to generate short-term global horizontal solar radiation forecasting, which is an essential information for evaluating the electrical power generated from the conversion of solar energy into electrical energy. The WD-ANN method consists of two basic steps: firstly, it is performed the decomposition of level p of the time series of interest, generating p + 1 wavelet orthonormal components; secondly, the p + 1 wavelet orthonormal components (generated in the step 1) are inserted simultaneously into an ANN in order to generate short-term forecasting. The results showed that the proposed method (WD-ANN) improved substantially the performance over the (traditional) ANN method.


INTRODUCTION
The conversion of solar energy into electrical energy is one of the most promising alternatives to generate electricity from clean and renewable way. It can be done through large generating plants connected to the transmission system or by small generation units for the isolated systems.
The Sun provides the Earth's atmosphere annually, approximately, 1.5 × 10 18 kWh of energy, but only a fraction of this energy reaches the Earth's surface, due to the reflection and absorption of sunlight by the atmosphere. One problem of renewable energy, for instance, wind and solar energies is the fact that the production of these sources is dependent on meteorological factors. In the case of solar energy particularly, the alternation of day and night, the seasons, the passage of clouds and rainy periods cause great variability and discontinuities in the production of electricity. Also in this case, there is the necessity to have capable devices of storing energy during the day in order to make it available during the night such as battery banks or salt tanks (Wittmann et al., 2008). Thus, the safe economic integration of alternative sources in the operation of the electric system depends on accurate predictions of energy production, so that operators can make decisions about the maintenance and dispatch of generating units that feed the system. Wavelets have been used in the time series literature combined with other types of predictive models and resulting in significant gains in terms of modeling. In this context, the wavelet theory consists in an auxiliary pre-processing procedure of the series in question, which can be accomplished generally in two ways: by decomposition or by noise shrinkage of the time series to be modeled. There are several studies that highlighted the gains from the combinations of decomposition and/or wavelet shrinkage and neural networks, among which it is possible to mention: Krishna et al. In this article, it is proposed a method (denoted by WD-ANN) to generate short-term forecasts of global horizontal solar radiation, which is an essential information for evaluating the electrical power generated from the conversion of solar energy into electrical energy. In summary, the forecasts of WD-ANN method are obtained from the combined use of an ANN and a wavelet decomposition of p level. More specifically, it starts with the wavelet decomposition level p

75
Cuiabá, Florianópolis, Joinville, Natal, Palmas, Petrolina and São Martinho. Only for Cuiabá the analysis is reported with minor details. All time series cover exactly a period of one year, but a different year in each location.
The paper is organized into six sections. In Sections 2 and 3, there are introduced theoretical aspects of Wavelet Theory and Neural Networks, respectively. The WD-ANN method is detailed in Section 4. The computational experiments and its main results are presented in Section 5. In Section 6, there are the conclusions of the research.

Hilbert Space, Orthonormal Basis and Fourier Series
According to Kubrusly (2001), a Hilbert space H is any linear space equipped with an inner product and complete. The collection l 2 of all infinite sequences of complex numbers quadratically summable (in other words,

Wavelet Transform
Wavelet transform on (l 2 , <; >), is the inner product <; >: l 2 → C between a function f (.) ∈ l 2 and a wavelet function ω m,n (.) ∈ W m (ω) or a scaling function φ m,n (. According to Mallat (1998), the wavelets transforms can be classified and grouped into two distinct sets: detail coefficients, denoted by {d m,n } (m,n)∈Z×Z , and approximation coefficients, denoted by {a m,n } (m,n)∈Z×Z . For each ordered pair (m, n) ∈ Z × Z, it has that the wavelet transforms d m,n and a m,n are defined, respectively, by

Wavelet Expansion
According to Levan & Kubrusly (2003), a chain of approximation subspaces {V m (φ)} m→Z of (l 2 , <; >) is called wavelet multirresolution analysis (or, simply, wavelet MRA), with scaling function φ(.) ∈ l 2 , if the following conditions are hold: In Kubrusly & Levan (2002), it is shown that a l 2 space can be orthogonally expanded such as (2003), it is shown, using the axioms of a  (2002) that the l 2 space can be orthogonally expanded as in (5).
As a result, it follows that f (.) has (a single) orthogonal decomposition on the Hilbert space (l 2 , <; >), as in (6).

ARTIFICIAL NEURAL NETWORKS
According to Haykin (2001), Artificial Neural Networks (ANN) are distributed parallel systems composed of simple processing units called artificial neurons. They are arranged in one or more layers interconnected by a large number of connections (synapses), which are generally unidirectional, and they have weights to balance the inputs received by each neuron. The most common architecture of an ANN is the multilayer perceptron with three layers (input, hidden, and output), as shown in Figure 1(a).
Analogously to the human brain's processing (where synapses are reinforced or weakened) the weights on connections between layers are adjusted during the process of learning of an ANN.
The first layer of the ANN is the input layer, the only one who is exposed to input variables. This layer transmits the values of the input variables to neurons of the hidden layer so that they can extract the relevant features (or patterns) of the input signals and transmit the results to the output layer. The definition of the number of neurons in each layer is performed empirically. The ANN's training consists of an iterative process to obtain the weights of connections between processing units.
The main training algorithm is named backpropagation, whose weights' fit occurs through an optimization process of two phases: forward and backward, as shown in Figure 1(b). In the forward phase, it is calculated a response provided by the network for a given input pattern. In the backward phase, the deviation (error) between the desired response (target) and the response provided by the ANN is used to adjust the weights of the connections.  During the neural network training, the various input patterns and their corresponding desired outputs are presented to the ANN, such that the weights of synapses are corrected iteratively by gradient descent algorithm in order to minimize the sum of squared errors (Haykin, 2001).
The time series forecasting through ANN starts by the assembly of the training patterns (input/output pairs) that depends on the setting of the window size L of time (to the past values of the series and to the explanatory variables) and the forecast horizon h. In an autoregressive process (linear or nonlinear), for example, the input pattern is formed only by past values of the series itself.
In turn, the pattern of desired output is the value of the observed time series forecasting horizon.
In Figure 2, it is illustrated how is generally constructed the training set for the forecast based on the past four values passed. Note that the training patterns' construction of the network consists of moving the input and output windows along the entire time series. Thereby, each pair of windows (input/output) serves as a training pattern and must be presented repeatedly until the learning algorithm converges.

COMBINATION OF ARTIFICIAL NEURAL NETWORKS AND WAVELET DECOMPOSITION
The combination of an ANN and wavelet decomposition (WD) may be performed in many different ways. For instance, it can be applied the wavelet decomposition in the time series. Then, each resultant series have to be modeled by the traditional ANN, and finally, it should add the series' forecasts in order to obtain the forecast of the original time series. Another option is to use wavelet functions (normalized in the range [0, 1]) as activation functions of neurons of a traditional ANN and to utilize the input of decomposed patterns through WD.
In this article, however, it was chosen a combining method (denoted by WD-ANN), in which the wavelet components of the time series are the input patterns of a feedfoward MLP ANN whose output provides a time series forecast (according to the diagram of Fig. 3). Basically, the proposed approach can be divided into steps (1)
where m is an integer inside the interval m 0 ≤ m ≤ m 0 + ( p − 1), being p the level of wavelet decomposition.

Submission of the wavelet components to the ANN
Take a feedforward MLP ANN. The set of temporal signals 4.1] are such that constitute the set of input patterns to a feedforward MLP ANN to the training process.
Whereas a window size equal to L past values, the time series forecast (the output of ANN) for each t time (in training, validation and test samples) is obtained from the set of input patterns described in (10).

COMPUTATIONAL EXPERIMENT
In the computational experiments, it was considered the hourly time series of global horizontal solar radiation during the period from January to December. The representation of the daily profiles of solar radiation at ten different locations for different years is showed in Figure 4.
The sample used in ANN's training contain 7008 observations of solar radiation, while the following 876 observations belong to the validation and the last 876 to test samples. The training of ANN was performed in MATLAB software. In all simulations, the input patterns were normalized by the premnmx transformation and the training algorithm used was Levenberg & Marquardt.
It was chosen the ANN (feedforward MLP) with the best fit to the series of global horizontal solar radiation. The yearly average and standard deviation of the ten series are presented in Table 1.
The standard deviation provides a measure of the yearly variability of the global horizontal solar radiation.
In this paper, it is reported the detailed results from Cuiabá whose radiance time series in each month is illustrated in Figure 5.
For the time series from Cuiabá, the best identified ANN [Section 5.1] presents the following topological structure: input window size equal to 10; one hidden layer composed of 19 artificial neurons with activation function hyperbolic tangent; and one neuron in the output layer with linear activation function (Haykin, 2001).
Then, the Cuiabá's series of global horizontal solar radiation has undergone a wavelet decomposition of level two (i.e., three wavelet components). For this, it was considered the orthonormal basis Daubechies wavelet with time equals 38 (or, simply, db38) (Daubechies, 1988). After pre-processing of this time series, the best ANN with input wavelet [Section 5.2] presents the following topological structure: input window size equal to 10; one hidden layer composed of 12 artificial neurons with activation function hyperbolic tangent; and one neuron in the output layer with linear activation function (Haykin, 2001).

Results of traditional ANN for Cuiabá's time series
In Figure 6, there are the scatter plots between the time series of global horizontal solar radiation and their forecasts, for validation and test samples, by using a traditional MLP network. It can be noted that the higher the vicinity of the points with respect to the 45 • inclination line, the greater will be the correlation between the time series of solar radiation and its respective forecasts one step ahead, for the validation and test samples, and consequently, the forecasts will be better.

Results of ANN with wavelet entrance for Cuiabá's time series
In Figure 7 are presented the wavelet db38 components resulting from the wavelet decomposition of level two for the time series of global horizontal solar radiation.
It is noteworthy that the wavelet decomposition of signals in the samples of training, validation and testing were done individually. In Figure 8, it is showed the scatter plots of the observations of global horizontal solar radiation and their forecasts by ANN (with input wavelet), for the validation and test samples.

Modeling for the 10 time series
The results for the 10 time series modeled are showed in Table 2. It is possible to see the best wavelet family chosen for each WD-ANN model, and the best window length and number of

CONCLUSIONS
In this paper, it was proposed a method (denoted by WD-ANN) that proposes an alternative approach to combine a feedforward MLP ANN with wavelet decomposition to generate shortterm forecasts of global horizontal solar radiation. It could be seen that the forecasts derived from the WD-ANN method had a significantly higher correlation with the time series observations of global horizontal solar radiation when compared with the forecasts arising from the traditional ANN (i.e., without considering the wavelet signals as input patterns). It also showed the lower values of RMSE for almost all periods of interest.
Finally, it should be noted that to achieve a proper and efficient modeling, it is important to consider how a time series of interest is presented to the predictive method (for instance, an ANN). In other words, the choice of predictor's preprocessing of input data (e.g., wavelet decomposition) is as important as the choice of the predictor. In this perspective, it has that the WD-ANN method includes both aspects, making it more generic and sophisticated in any time series modeling.