Available online at www.sciencedirect.com
Energy Conversion and Management 49 (2008) 1396–1406 www.elsevier.com/locate/enconman
Study of hourly and daily solar irradiation forecast using diagonal recurrent wavelet neural networks Jiacong Cao *, Xingchun Lin College of Environmental Science and Engineering, Donghua University, Songjiang District, Shanghai 201620, PR China Received 12 May 2007; accepted 22 December 2007 Available online 13 February 2008
Abstract An accurate forecast of solar irradiation is required for various solar energy applications and environmental impact analyses in recent years. Comparatively, various irradiation forecast models based on artificial neural networks (ANN) perform much better in accuracy than many conventional prediction models. However, the forecast precision of most existing ANN based forecast models has not been satisfactory to researchers and engineers so far, and the generalization capability of these networks needs further improving. Combining the prominent dynamic properties of a recurrent neural network (RNN) with the enhanced ability of a wavelet neural network (WNN) in mapping nonlinear functions, a diagonal recurrent wavelet neural network (DRWNN) is newly established in this paper to perform fine forecasting of hourly and daily global solar irradiance. Some additional steps, e.g. applying historical information of cloud cover to sample data sets and the cloud cover from the weather forecast to network input, are adopted to help enhance the forecast precision. Besides, a specially scheduled two phase training algorithm is adopted. As examples, both hourly and daily irradiance forecasts are completed using sample data sets in Shanghai and Macau, and comparisons between irradiation models show that the DRWNN models are definitely more accurate. Ó 2008 Elsevier Ltd. All rights reserved. Keywords: Hourly global solar irradiation; Daily global solar irradiation; Forecast; Diagonal recurrent wavelet network; Fuzzy technique; Errors
1. Introduction Solar irradiance is the basic data in many fields, such as in solar energy utilization and some environmental impact analyses. Recently, there is an increasing need for more precise forecasting of solar irradiation that is helpful for operation control and optimization of some energy systems. Therefore, it is necessary to develop a more accurate method of forecasting the hourly global solar irradiance of the next day and the daily global solar irradiance. Solar irradiation consists of two parts, one of which behaves in a relatively fixed way that is subject to seasons, dates and time, geographic locations and the extraterrestrial radiation, while the other is a random part that is affected by conditions of the weather and surroundings *
Corresponding author. Tel.: +86 21 67792555; fax: +86 21 67792522. E-mail address:
[email protected] (J. Cao).
0196-8904/$ - see front matter Ó 2008 Elsevier Ltd. All rights reserved. doi:10.1016/j.enconman.2007.12.030
and is difficult to forecast precisely. For example, cloud cover at a particular location is rather difficult to describe accurately in advance, which adds difficulties to the task of achieving high accuracy in the irradiation forecast. So far, there have been a great number of models for predicting solar irradiation, most of which are based on conventional physical models or some statistical assumptions. For example, Muneer et al. have developed a series of regression models since many years ago. His new achievement is the improved meteorological model IMRM and cloud radiation model CRM [1]. Many other authors also have achievements in various clear day models, including the simple ones of the half-sine [2,3], the Collares-Pereira and Rabl model [4], etc. However, conventional models tend to pay more attention to physics and statistics than to the randomness and complexity of the weather and surroundings. Since 1990s, in view of the powerful functions of artificial neural networks (ANN) in simulating
J. Cao, X. Lin / Energy Conversion and Management 49 (2008) 1396–1406
1397
Nomenclature a b E f MRE m N n P p q RMSE R2 r s t U u V v W
dilation factor translation factor error activation function of output layer mean relative error, % node number of output layer patch number of training set node number of input layer parameter matrix of network ordinal number of patches number of sample pairs in subset root mean square error, MJ m2 coefficient of determination ordinal number of iteration node number of hidden layer ordinal number of sample subset pairs vector of feedback weight feedback weight matrix of connective weights between input and hidden layers connective weights between input and hidden layers vector of connective weights between hidden and output layers
and mapping nonlinear systems automatically, ANN approaches to forecasting solar irradiation have been applied and found to be more accurate than conventional ones in most cases. For example, Mohandes et al. [5], Sfetsos and Coonick [6], Dorvlo et al. [7], Hamdy et al. [8], Tymvios et al. [9], Cao and Cao [10] developed different ANN models for forecasting global solar irradiation, while Jacyra et al. [11] set up models to forecast hourly diffuse solar irradiance. As efforts to improve the performance of irradiation forecasting, some new methods were presented, such as the recurrent ANN model combined with data sample pre-handling using wavelet analysis by Cao and Cao [12] and the wavelet network model by Mellit et al. [13]. However, most existing ANN based models for solar irradiation forecasting seem to be not quite satisfactory in accuracy to researchers and engineers, especially when the atmospheric condition changes a lot. Therefore, further effort is necessary to develop better models for enhancing the accuracy of irradiation forecasts. In addition, the generalization capability of the ANNs needs improving. Aimed at improvement in ANN based forecasting of solar irradiation, this paper presents a new model called the diagonal recurrent wavelet neural network (DRWNN), which is based on the combination of a recurrent neural network with a wavelet one plus fuzzy technology, for the forecast of hourly and daily global solar irradiance. In this model, the wavelet basis is adopted as the activation function of the neurons instead of the conventional
w X X x y y Z z
connective weights between hidden and output layers input vector to network sum of inputs to node in hidden layer output from node in input layer output of network expected output of network sum of inputs to node of output layer output from node in hidden layer
Greek symbols a momentum factor g learning factor h defuzzificated cloudiness r standard deviation of real irradiance records w wavelet function Subscripts and superscript i ordinal number of j ordinal number of k ordinal number of p ordinal number of r ordinal number of t ordinal number of
input nodes hidden nodes output nodes patch training iteration input sample pairs
nonlinear activation functions. Also, the input vector to the network includes some fuzzificated information of the cloud cover. Examples of forecast simulation prove the new model to be effective in providing higher forecast accuracy and generalization capability. 2. Diagonal recurrent wavelet neural network 2.1. Wavelet neural networks A wavelet neural network (WNN) is an ANN that is integrated with wavelet techniques and has been used successfully in many fields. Instead of conventional nonlinear activation functions (e.g. sigmoid functions), the activation function of the nodes in a wavelet neural network is wavelet bases. Because wavelet bases are characteristic of time precision in high frequency domains and frequency precision in low frequency domains due to dilating and translating the mother wavelet, the ability of a WNN in mapping complicated nonlinear functions is enhanced considerably. Suppose w(x) 2 L2(R) is a mother wavelet, a series of daughter wavelets (wavelet bases) can be developed through dilating and translating w(x): 1 xb p ffiffiffiffiffi ffi wa;b ðxÞ ¼ w ð1Þ a j aj where a is the dilation factor and b is the translation factor.
1398
J. Cao, X. Lin / Energy Conversion and Management 49 (2008) 1396–1406
As the mother wavelet, it is suitable for this paper to adopt the Morlet wavelet as the activation function of the WNN in consideration of its high resolution in both the time and frequency domains. The Morlet wavelet is defined as follows [14]:
The output from the kth neuron in the output layer (see Fig. 1) can be expressed as below Pn ! s X i¼0 vji xi þ uj zj bj y k ðXÞ ¼ f wkj wj ð4Þ aj j¼0
wðxÞ ¼ cosðxxÞ expðx2 =cÞ
where X = (x0, x1, . . . , xn)T, xi denotes the input to node i in the input layer and vji is the connective weight from input node i to node j in the hidden layer, while x0 = 1 and vj0 are introduced to express the biases to the hidden layer, yk (k = 1, 2, . . . , m) is the output from node k in the output layer; zj (j = 0, 1, 2, . . . , s) is the output from hidden node j and wkj is the connective weight from hidden node j to output node k, while z0 = w0 1 and wk0 are introduced to yield the biases to the output layer, uj is the connective weight for the feedback from node j to itself and u0 = 0; aj and bj are the dilation factor and translation factor of hidden node j, respectively, while a0 = b0 = 0.
ð2Þ
In wavelet neural networks the signal function does not undergo wavelet transformation and inverse transformation. Therefore, it is applicable in this paper to use the type of Morlet wavelet as follows: wðxÞ ¼ cosð1:75xÞ expðx2 =2Þ
ð3Þ
2.2. Diagonal recurrent wavelet neural networks A recurrent neural network (RNN) is an important category of neural network, which is the feed forward network including feed back connections that imbed memory in the network and render a network distinguished for better dynamic properties. A diagonal recurrent neural network (DRNN) is a sort of RNN with relatively simple structure based on a BP (back propagation) algorithm. There are no crosswise connections between the nodes of hidden layers or of the output layer, which remarkably reduces the total number of connection weights and, thus, speeds up the convergence of the network [15]. When the nodes in the hidden layer of a DRNN adopt wavelet bases as activation functions, the network becomes a diagonal recurrent wavelet neural network (DRWNN) (Fig. 1). As the DRWNN combines the fine properties of wavelets in multi-resolution analyses in time–frequency domains and the self learning ability of ANNs with the dynamic properties of DRNNs, this network is quite capable of mapping solar irradiation that is usually highly nonlinear and frequently time changeable.
Hidden layer
Input layer
x0 =-1
Y0≡ -1
x0
Y0
V
Output layer W
3. DRWNN model for global solar irradiation It is helpful to analyze the factors that may affect global solar irradiation remarkably and could be components of the input vector of the DRWNN. Thus, a reasonable input layer of the DRWNN could be designed corresponding to the input vector. Usually, the input vector may consist of historical records of solar irradiance, geographic location, date and time, cloud cover, aerosol, humidity ratio of the air, etc. The most important factor is the irradiance records that deserve special attention, for it contains the information of solar radiation plus the implicit effects of all other factors. Compared with aerosol and humidity ratio, cloud cover has a stronger influence upon irradiation, and there usually exists accessible information of cloud cover in the meteorological database. As a major random factor, cloud cover as a component of the input vector can be effective in enhancing the accuracy of an irradiation forecast. However, up to now there has been no report on successful use of cloud cover in ANN models for irradiation forecasts. As the definite factors affecting irradiance, the location, date and time of observation should be the basic part of the input vector so as to reflect the regular behavior of the irradiation.
x1
Y1(
x b1 )
y1
3.1. Correlation analysis of the records of hourly global solar irradiance
x2
Y2( x b 2 )
y2
The database of historic records of solar irradiance tends to be enormous. For designing an efficient network, it is necessary to select a suitable data group, which is closely related to the target irradiance (to be forecasted), from the sample data set as the components of the input vector to the DRWNN. The selection can be completed in virtue of correlation analysis of the data series. The data set of hourly global solar irradiance records at the Baoshan Meteorological Observatory in Shanghai from January 1, 2001 to December 31, 2002 (see Fig. 2) will be used as an example for the analysis.
xn
a1
a2
Ys(
x bs )
as
ym
U Feedback layer Fig. 1. Architecture of diagonal recurrent wavelet neural network.
Global irradiance (MJ·m-2·h-1)
J. Cao, X. Lin / Energy Conversion and Management 49 (2008) 1396–1406
1399
4 3 2 1 0
0
1000
2000
3000
4000 5000 6000 Data ordinal number (h)
7000
8000
9000
10000
Fig. 2. Recorded dataset of the hourly global solar irradiance in Shanghai (January 1, 2001–December 31, 2002).
For convenience of the correlation analysis, a supposedly equal day length of 14 h (the maximum in Shanghai) is used instead of a real day length that is always changing. Indeed, this makes no difference from using real day lengths in the analysis, as long as the irradiance records for the extra hours in excess of the actual day length are all set to zero (in fact there is zero irradiance on the horizontal plane from the sun during these hours). For the sake of reducing the effects of randomness on the analysis, pre-processing is applied to the data set, i.e. let the average value of seven successive records take the place of the central one of the seven records. All of such averages form a new data series that is the same size as the original data set. The new data series is to be used in the correlation analysis. Fig. 3 shows the results of the correlation analysis of the data series, part of the correlation coefficients for different spans being listed in Table 1. It is obvious from Fig. 3 and Table 1 that the correlation coefficients show a 14 h (or a day) cycle. Two events are considered correlated here when their correlation coefficient is beyond 0.8. To forecast hourly global irradiance for the next day, the four global irradiance records that are 14, 15, 28, and 29 h before the hour to be forecasted (see Table 1) are justifiable to be selected as the components of the input vector to the DRWNN. 3.2. Defuzzification of cloud cover Cloud cover, the weather condition that affects irradiation to a great extent, is to be introduced to the input vector to the DRWNN in this paper. In China, the cloud cover in the weather forecast is usually released fuzzily as over-
Table 1 Part of average correlation coefficients in different spans Span (h)
Correlation coefficient
Span (h)
Correlation coefficient
1 2 3 4 5 6 7 8 9 10 11 12
0.9120 0.6853 0.3699 0.0293 0.2729 0.4807 0.5548 0.4814 0.2746 0.0257 0.3638 0.6763
13 14 15 16 17 – 26 27 28 29 30 –
0.8999 0.9854 0.8981 0.6703 0.3596 – 0.6580 0.8781 0.9611 0.8751 0.6527 –
cast, sunny, cloudy, cloudy to sunny, etc. The fuzzy values should be defuzzificated to be used as a component of input to the DRWNN. Suppose the cloud cover is defined on a universe of discourse of [0, 10] and is described with three fuzzy subsets, viz. sunny, cloudy and overcast (including rainy). The defuzzificated values, h0 , of sunny, cloudy and overcast can be calculated using the proportion halving method if the triangle and trapezoid membership functions are applied to the three subsets. Thus, h0 = 1.75, 5, and 8.25 correspond to sunny, cloudy and overcast, respectively. In fact, the defuzzificated values of cloud cover need calibrating finely, for defuzzification with only three values does not describe the changeable cloud cover. The method developed by ourselves [16] can be used in this paper for obtaining the daily finely defuzzificated cloud cover h as long as the historic data set of cloud cover are available.
Correlation coefficient
3.3. Modeling of DRWNN for hourly global solar irradiation 1 0.5 0 -0.5 0
14
28 42 56 70 Span of a time pair (h)
84
98
Fig. 3. Correlation coefficients of the daily global solar irradiance in Shanghai.
According to the analyses in the previous sections, the input vector of the DRWNN includes the components of the hour (time) and the ordinal number (in a year) of the day to be forecasted, the defuzzificated cloud cover on that day and the hourly records of global solar irradiance 14, 15, 28 and 29 h before the hour to be forecasted. The existing ASHRAE model [17] gives relatively basic information of the tendency of hourly solar radiation and day lengths, and therefore, it is helpful to use the irradiation data calculated using the ASHRAE model to be a component of the
1400
J. Cao, X. Lin / Energy Conversion and Management 49 (2008) 1396–1406
Table 2 The components of the input vector to the DRWNN for hourly irradiation forecast Symbol
Component of input vector
x1 x2 x3 x4 x5 x6
Hourly global irradiance 14 h before the hour to be forecasted Hourly global irradiance 15 h before the hour to be forecasted Hourly global irradiance 28 h before the hour to be forecasted Hourly global irradiance 29 h before the hour to be forecasted Daily global irradiance on the day to be forecasted Global irradiance of the hour to be forecasted, predicted with ASHRAE model Defuzzificated cloud cover on the day to be forecasted Ordinal number in a year of the day to be forecasted The hour (time) to be forecasted
x7 x8 x9
input vector so as to result in a higher forecast precision than that by ASHRAE. In addition, hourly irradiance is closely related to the level of daily total irradiance, though the latter is also a forecasted one by the model to be introduced in Section 5.2. Simulation experiments in which the daily global irradiance is applied to be a component of the input vector prove effective on reducing the errors of hourly irradiance forecasts. Hence, the input vector has nine components (see Table 2). The hidden layer of the DRWNN has 19 nodes, which is finally determined with the trial and error method, while one node is applied to the output layer. Therefore, the architecture of the DRWNN is simply expressed as 9-19-1 (see Fig. 1). 4. Training algorithm of DRWNN and forecasting of global solar irradiation 4.1. Initialization of the network At the beginning of the DRWNN training, the matrix and vectors of connective weights (including biases) and the dilation and translation factors should be set to initial values, which is an important step in network training and simulation, affecting the convergence characteristics and the generalization capability of the network. For the sake of improving network training, in this paper, the training includes two phases. At the beginning of the first phase, random initialization is adopted, i.e. the connective weights and biases are assigned values within the range of [0,1] randomly. The training set is divided into several batches according to the yearly periodicity of the data set, and then, batch training is applied, which produces a set of resultant weight matrixes. The average weight matrix of the resultant ones becomes the initial one of the second batch training phase. In this way, a steady training result is achieved with a shorter training period of time and smaller forecast errors in spite of the very big sample data set. Suppose the training set containing the data of solar irradiance in N years is divided into N subsets. In the pth subset, compose the tth input vector X pt ðt 2 ½1; qÞ successively by selecting four records for each vector in the light of what is listed in Section 3.3 plus the other five input components. An input vector X pt and an expected output y pt form the tth
sample pair. Run the DRWNN to obtain an output y pt . The error Ep of the pth can be calculated by the Pqbatch training 2 equation Ep ¼ 12 t¼1 ðy pt y pt Þ when q sample pairs have been handled completely. Then, the DRWNN calculates the increments of the connective weights and biases and obtains a new matrix Vp and new column matrixes Wp and Up by adjusting these weights and biases. When N batch trainings have been completed, the average weight matrixes are readily obtained with Eq. (5), and they are to be the initials of the second training phase W¼
N 1 X W p; N p¼1
V¼
N 1 X V p; N p¼1
U¼
N 1 X Up N p¼1
ð5Þ
The initialization of the dilation factor a and translation factor b is performed according to the method introduced in Ref. [18] and described in detail by Yuan et al. [19]. 4.2. Adjustment of parameters As is well known, the algorithm, modified with the adaptive learning factor and the momentum factor, can be summarized as the adjustment of the parameter matrix P according to Eq. (6) Prþ1 ¼ Pr gDPr þ aDPr1
ð6Þ
where g and a are the momentum factor and adaptive learning factor, respectively; subscript r is the ordinal number of iteration; P represents the matrix or vectors of connective weights and dilation and translation factors and DP is their increments. The elements of these DP are calculated with Eqs. (7)–(11) that can readily be developed according to Fig. 1 and Eq. (4) in this paper Dwj ¼ ðy y Þ
df zj dZ
dwj dwj 1 df Dvji ¼ ðy y Þ xi wj aj uj dZ dX j dX j dwj dwj 1 df wj wj Duj ¼ ðy y Þ aj uj dZ dX j dX j
ð7Þ ð8Þ ð9Þ
Daj ¼ ðy y Þ
df X j bj wj wj dZ a2j
ð10Þ
Dbj ¼ ðy y Þ
df wj wj a1 j dZ
ð11Þ
In the above equations, Xj is the sum of inputs to the jth hidden node and Z is the sum of inputs to the node of the output layer, while f denotes the activation function of the output node. It should be mentioned that the biases are also calculated through Eqs. (7) and (8). 4.3. Training algorithm (1) Initialize the weight matrixes randomly within [0,1] and the dilation and translation factors a and b as well.
J. Cao, X. Lin / Energy Conversion and Management 49 (2008) 1396–1406
Defuzzificated cloud cover
(2) Normalize the sample data to the range [0,1]. Determine other initial parameters as the following through trial and error. The momentum factor is fixed on 0.85. The initial learning rate is set at 0.1 and its decreasing and increasing rates are set at 0.7 and 1.05, respectively. The stop conditions are the limitation of the training error of 0.01 and the maximum training epochs of 5000. (3) Perform the first training phase including N batch trainings as described in Section 4.1 to adjust the parameter matrix and vectors using Eqs. (5)–(11). When the phase is finished, the resultant parameters, excluding the dilation and translation factors, are available to be the initials of the next phase. It is better to point out that the DRWNN also applies the algorithm modified with the adaptive learning factor and momentum factor. (4) Similarly, perform the second phase that uses the whole data set as a batch for training. The batch training does not stop until the stop conditions are met. The trained DRWNN is steady of simulation and resultant errors, the training outcome being independent of the initial parameters.
1401
5. Examples 5.1. Forecast of hourly global solar irradiance for next days The example forecast again uses the historical hourly records of global irradiance (see Fig. 2) at the Baoshan Meteorological Observatory in Shanghai from January 1, 2001 to December 31, 2002 as the sample data set. According to the method mentioned in Section 3.2, based on the records of cloud cover and related temperature of all the days in 2001 and 2002 in Shanghai, the daily finely defuzzificated cloud cover can be calculated as shown in Fig. 4. Besides, the calculation using the ASHRAE model is performed in advance, which gives the tendency of changing irradiation roughly and the day length for each day. The data sequence from January 1, 2001 to November 30, 2002 is used as the training set of the DRWNN, and the data sequence of December 2002 is used as the testing set. The training set is first divided into two batches for the first training phase, and then, as a batch for the second training phase. After the DRWNN has been trained, the testing set is used to complete the simulation (testing fore-
10 8 6 4 2 0 0
100
200
300 400 Ordinal number of the days
500
600
730
Global irradiance (MJ·m-2·h-1)
Fig. 4. Defuzzificated cloud cover in Shanghai (January 1, 2001–December 31, 2002).
4 3 2 1 0 0
1000
2000
3000 4000 5000 (a) Backtracking forcast
6000
7000
0
1000
2000
3000
6000
7000
8000 9000 9771 Ordinal number of time (h)
Global irradiance (MJ·m-2·h-1)
1.0 0.5 0 -0.5 -1.0 4000
5000
(b) Absolute errors of backtracking forcast
8000
9000
9771
Ordinal number of time (h)
Fig. 5. Backtracking forecast by DRWNN in training for the hourly global irradiance in Shanghai (January 1, 2001–November 30, 2002).
1402
J. Cao, X. Lin / Energy Conversion and Management 49 (2008) 1396–1406
Global irradiance (MJ·m-2·h-1)
Global irradiance (MJ·m-2·h-1)
2.5 2.0
Real records
1.5
Forecast
1.0 0.5 0 0
50
100
0
50
100
150 200 (a) Test forecast
250
300
350 400 Ordinal number of time (h)
150
250
300
350 400 Ordinal number of time (h)
1.0 0.5 0 -0.5 -1.0 200
(b) Absolute errors of test forecast
Fig. 6. Testing forecast of the hourly global irradiance by DRWNN in Shanghai (December 1–31, 2002).
cast) of the hourly global solar irradiance for the next day. Figs. 5 and 6 show the backtracking and testing forecasts, respectively, and their absolute errors are given in the figures as well.
set for the forecast using DRWNN. Also, based on the related data in Macau, the finely defuzzificated daily cloud cover can be calculated (Fig. 8) with the method mentioned in Section 3.2.
5.2. Forecast of daily global solar irradiance
5.2.1. DRWNN model for forecast of daily irradiance Similar to the DRWNN model for forecasting hourly global irradiance (Fig. 1), the forecast model for daily global irradiance is the DRWNN with the architecture of 6-14-1. Compared with the input vector in Tables 2 and 3 records of daily global irradiance instead of 4 hourly records enter the input vector. According to the correlation analysis, they are the daily records of 1, 2 and 3 days before
Daily global irradiance (MJ·m-2·day-1)
As an example of forecasting daily global solar irradiance using a DRWNN model to a different place, the historical weather data of the meteorological station in Macau is used as a sample data set in this section. Fig. 7 shows the recorded daily global solar irradiance from January 1, 1991 to December 31, 2000 that constitutes the data 30 20 10 0
0
500
1000
1500
2000
2500
3000
3500
Ordinal number of days (day)
Defuzzificated cloud cover
Fig. 7. Daily global irradiance in Macau (January 1, 1991–December 31, 2000).
10 8 6 4 2 0
0
300
600
900 1200 Ordinal number of the days
1500
Fig. 8. Defuzzificated cloud cover in Macau (January 1, 1991–December 31, 2000).
1800
J. Cao, X. Lin / Energy Conversion and Management 49 (2008) 1396–1406 Table 3 Comparisons between forecasts by various models Forecast of irradiation
Model
MRE (%)
RMSE (MJ m2 h1 or MJ m2 day1)
R2 a
Hourly global solar irradiation
Collares-Pereira and Rabl BP network DRWNN ˚ ngstro¨m–Prescott A BP network DRWNN
76.02
0.4049
0.7186
16.10 9.23 35.92 16.87 8.31
0.0692 0.0476 2.70 2.08 0.96
0.9012 0.9692 0.8423 0.8979 0.9793
Daily global solar irradiation
2
a
Daily global irradiance (MJ·m-2·day-1)
Daily global irradiance (MJ·m-2·day-1)
Coefficient of determination R2 ¼ 1 RMSE , where r is the standard r2 deviation of real irradiance records.
35 30 25 20 15 10 5 0 0
1403
the day to be forecasted. In the case of daily irradiance, it is not necessary for the input vector to include the components of ‘‘time” and ‘‘daily irradiance”. So, the input vector includes six nodes, and the hidden layer includes 14 nodes, which is determined also using the trial and error method. 5.2.2. Example of forecasting daily global solar irradiance The data set of 9 years from 1991 to 1999 is used as the training set of the DRWNN, and the dataset of year 2000 is used as the testing set. Using the same procedure as introduced in Section 4 to complete the network training and testing simulation, then the backtracking forecast in training and the testing forecast with their absolute errors can be obtained as shown in Figs. 9 and 10, respectively.
Real records
500
1000
1500 2000 (a) Backtracking forecast
500
1000 1500 2000 (b) Absolute errors of Backtracking
Forecast
2500 3000 3284 Ordinal number of days (day)
6 4 2 0 -2 -4 -6 -8 2500 3000 3284 Ordinal number of days (day)
Daily global irradiance (MJ·m-2·day-1)
30 25 20 15 10 5 0
Daily global irradiance (MJ·m-2·day-1)
Fig. 9. Backtracking forecast of the daily global irradiance in Macau (January 1, 1991–December 31, 1999).
5 3
Real records
0
50
100
150 200 (a) Test forecast
250
0
50
100
150
250
Forecast
300 350 Ordinal number of days (day)
1 -1 -3 -5 200
(b) Absolute errors of test forecast
300 350 Ordinal number of days (day)
Fig. 10. Testing forecast of the daily global irradiance in Macau (January 1, 2000–December 31, 2000).
1404
J. Cao, X. Lin / Energy Conversion and Management 49 (2008) 1396–1406
6. Comparisons of performance between DRWNN and other typical models
Globalirradiance (MJ m-2 h-1)
It is suitable to choose the models of Collares-Pereira ˚ ngstro¨m–Prescott [20,21] and BP neural and Rabl [4], A networks to be compared with DRWNN, excluding the ASHRAE model because, here, it is just a component of the input vector to the DRWNN. ˚ ngstro¨m–Prescott The Collares-Pereira and Rabl and A models are clear sky models. The BP networks apply architectures similar to those of the DRWNNs described in Sec-
tions 3.3 and 5.2.1 in this paper, respectively, i.e. they are simply three layer BP networks of 9-19-1 for hourly forecasts and 6-14-1 for daily forecasts, the activation functions being all sigmoid without wavelet. Fig. 11 shows the comparisons between the real records of hourly global irradiance and the predicted ones by the models of Collares-Pereira and Rabl, BP network and DRWNN; and the comparisons in the case of daily global irradiance are presented in Fig. 12, where ˚ ngstro¨m–Prescotts’ model substitutes for the Collthe A ares-Pereira and Rabls’ model. One can learn from the
2.0 1.5 1.0 0.5 0 6 7 8
9 10 11 12 13 14 15 16 17 18 19 6 7 8 O'clock
actural values
C-P&R model
9 10 11 12 13 14 15 16 17 18 19
BP neural network model
DRWNN model
Global irradiance (MJ·m-2·day-1)
Fig. 11. Comparison between the forecasts of hourly global irradiance on December 30 and 31, 2002 by three models.
20 15 10 5 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Ordinal number of the days Angström-Prescott model
actual values
BP neural network model
DRWNN model
Fig. 12. Comparison between the forecasts of daily global irradiance in December 2000 by three models.
Real records (MJ.m-2.h-1)
2.0
2.0
2.0
(a) C-P&R model
(c) DRWNN model
(b) BP network
1.5
1.5
1.5
1.0
1.0
1.0
0.5
y= 2.32x+0.11
0.5
y= 1.20x-0.12
2
R =0.9012
0
R =0.9692
0 0.5
y= 1.09x-0.13
2
2
R =0.7186 0
0.5
1.0
Calculation (MJ.m-2.h-1)
0 0
0.5
1.0
1.5
Forecast (MJ.m-2.h-1)
2.0
0
0.5
1.0
1.5
Forecast (MJ.m-2.h-1)
Fig. 13. Comparison between the forecasts of hourly global irradiance by three models.
2.0
J. Cao, X. Lin / Energy Conversion and Management 49 (2008) 1396–1406
Real records (MJ·m-2·day-1)
20
(a) ngström-Prescott model
20
20 (b) BP network
(c) DRWNN model
15
15
15
10
10
10
5 y=2.12x-14.79 2 R =0.8423
0
0
5
10
15 20 -2 -1 Calculation (MJ.m .day )
5 0
1405
5
y=0.87x+1.25 2 R =0.8979
0
5
10
15
Forecast (MJ.m-2.day-1)
20
0
y=1.06x+0.56 2 R =0.9793
0
5
10
15
20
Forecast (MJ.m-2.day-1)
Fig. 14. Comparison between the forecasts of daily global irradiance by three models.
figures that the forecasts by the DRWNNs coincide with the real records quite well, and the forecasts by BP networks do not perform as good as those by the DRWNN, while the predictions by the models of Coll˚ ngstro¨m–Prescott are rather ares-Pereira and Rabl and A far from the real records. Figs. 13 and 14 give similar comparisons clearly. Table 3 lists the mean forecast errors of the above four models. Obviously, the DRWNN has the highest precision, ˚ ngstro¨m–Prescott while Collares-Pereira and Rabl and A perform the worst in forecast accuracy. If W m2 is applied instead of MJ m2 h1 or MJ m2 day1, the RMSE of the DRWNN in Table 3 will be 13.2 W m2 and 19.05 W m2 for the hourly and daily forecasts, respectively, and they are far less than the RMSE of the IMRM model (see Ref. [1]) that is at least 84.12 W m2. Comparing with the performance of conventional models, the DRWNN is obviously much better in forecast precision. 7. Conclusions This paper presents a new model for forecasting global solar irradiance based on a diagonal recurrent wavelet neural network (DRWNN) and a specially designed training algorithm. Simulation examples prove that the model is capable of mapping solar irradiation that is usually highly nonlinear and time changeable. This is because the DRWNN combines the advantages of both the RNN and WNN. Simulation examples show that the forecasting errors by the DRWNN with the training algorithm described in the paper are far less than those by other typical models. This proves that the effort for improving the forecast precision in the paper is obviously fruitful. Compared with the requirement of precise forecast of solar irradiation, the daily weather forecast is less precise. Nevertheless, the information of the daily weather forecast released by meteorological observatories is surely helpful in forecasting solar irradiation. This paper gives such a positive example, though the use of cloud cover information is just an initial effort. It is worthy
to study further the application of more weather forecast information by meteorological observatories to solar irradiation forecasts.
References [1] Muneer T, Younes S, Munawwar S. Discourses on solar radiation modeling. Renew Sust Energy Rev 2007;11(4):551–602. [2] Zhu CH. The calculating and distributing of solar diffuse irradiance in China. Acta Energiae Solaris Sinica 1984;5(3):242–9 [in Chinese]. [3] Audi MS. Simple hourly global solar radiation prediction models. Renew Energy 1991;1(3–4):473–8. [4] Collares-Pereira M, Rabl A. The average distribution of solar radiation correlations between diffuse and hemispherical and between daily and hourly insulation values. Sol Energy 1979;22(2):155–64. [5] Mohandes M, Rehman S, Halawani TO. Estimation of global solar radiation using artificial neural networks. Renew Energy 1998;14:179–84. [6] Sfetsos A, Coonick AH. Univariate and multivariate forecasting of hourly solar radiation with artificial intelligence techniques. Sol Energy 2000;68(1):167–78. [7] Dorvlo ASS, Jervase JA, Al-Lawati A. Solar radiation assessment using artificial neural networks. Appl Energy 2002;71:307–19. [8] Hamdy KA, Faiz FA, Tarek SE. Estimation of solar radiation components incident on Helwan site using neural networks. Sol Energy 2005;79:270–9. [9] Tymvios FS, Jacovides CP, Michaelides SC, et al. Comparative study ˚ ngstro¨m’s and artificial neural networks’ methodologies in of A estimating global solar radiation. Sol Energy 2005;78:752–62. [10] Cao SH, Cao JC. Study of chaos optimization neural networks for the forecast of hourly total solar irradiance. Acta Energiae Solaris Sinica 2006;27(2):164–9 [in Chinese]. [11] Jacyra S, Amauri PO, Marija B, et al. Modeling hourly diffuse solarradiation in the city of Sa˜o Paulo using a neural-network technique. Appl Energy 2004;79:201–14. [12] Cao SH, Cao JC. Study of forecasting solar irradiance based on neural networks combined with wavelet analysis. Appl Thermal Eng 2005;25:161–72. [13] Mellit A, Benghanem M, Kalogirou SA. An adaptive waveletnetwork model for forecasting daily total solar-radiation. Appl Energy 2006;83:705–22. [14] Szu H, Telfer B, Kadambe S. Neural network adaptive wavelets for signal representation and classification. Opt Eng 1992;36(9):1907–16. [15] Ku CC, Lee KY. Diagonal recurrent neural networks for dynamic systems control. IEEE Trans Neural Networks 1995;6(1):144–56. [16] Cao SH. Study of methodology of load forecast for air conditioning systems using compound forecast techniques on the basis of outside
1406
J. Cao, X. Lin / Energy Conversion and Management 49 (2008) 1396–1406
meteorological parameters. PhD dissertation, Donghua University, Shanghai; 2004. p. 74–7 [in Chinese]. [17] ASHRAE. Handbook of fundamentals. Atlanta, USA: American Society of Heating, Refrigeration, and Air-Conditioning Engineers; 2005. [18] Oussar Y, Dreyfus G. Initialization by selection for wavelet network training. Neurocomputing 2000;34:131–43.
[19] Yuan SF, Zhang JM, Tian JY. Selection of the initial values of wavelet neural network. Comput Dev Appl 2005;18(2):37–9 [in Chinese]. [20] Njau EC. Generalised derivation of the Angstrom and Angstrom– Prescott equation. Renew Energy 1996;7(1):105–8. [21] Prescott JA. Evaporation from a water surface in relation to solar radiation. Trans R Soc Aust 1940;64:125–34.