A Novel 2-D Model Approach for the Prediction of Hourly Solar Radiation F Onur Hocao glu, Ö Nezih Gerek, and Mehmet Kurban Anadolu University, Dept of Electrical and Electronics Eng, Eskisehir, Turkey {fohocaoglu,ongerek,mkurban}@anadoluedutr Abstract In this work, a two-dimensional (2-D) representation of the hourly solar radiation data is proposed The model enables accurate forecasting using image prediction methods One year solar radiation data that is acquired and collected between August 1, 25 and July 3, 26 in Iki Eylul campus of Anadolu University, and a 2-D representation is formed to construct an image data The data is in raster scan form, so the rows and columns of the image matrix indicate days and hours, respectively To test the forecasting efficiency of the model, first 1-D and 2-D optimal 3-tap linear filters are calculated and applied Then, the forecasting is tested through three input one output feed forward neural networks (NN) One year data is used for training, and 2 month(from August 1,26 to September 3,26) for testing Optimal linear filters and NN models are compared in the sense of root mean square error (RMSE) It is observed that the 2-D model has advantages over the 1- D representation Furthermore, the NN model accurately converges to forecasting errors smaller than the linear prediction filter results 1 Introduction The prediction of hourly solar radiation data has important consequences in many solar applications Such data can be regarded as a time series and its prediction depends on accurate modeling of the stochastic process The computation of the conditional expectation, which is in general non-linear, requires the knowledge of the high order distribution of the samples Using a finite data, such distributions can only be estimated or fit into a pre-set stochastic model Methods like Auto Regressive (AR) [1] prediction, Markov chains [2,4] and ARMA model [3] for designing the non-linear signal predictors are examples to this approach The neural network (NN) approach also provides a good to the problem by utilizing the inherent adaptive nature Since NN s can be trained to predict results from examples, they are able to deal with non linear problems Once the training is complete, the predictor can be set to a fixed value for further prediction at high speed A number of researchers have used NN for prediction of hourly global solar radiation data In these works, the data is treated in its raw form as a 1-D time series, therefore the inter-day dependencies are not exploited This paper introduces a new and simple approach for hourly solar radiation forecasting First, the data are rendered in a matrix to form a 2-D image-like F Sandoval et al (Eds): IWANN 27, LNCS 457, pp 749 756, 27 c Springer-Verlag Berlin Heidelberg 27
75 FO Hocao glu, ÖN Gerek, and M Kurban model, as explained in Section 2 As a first attempt to test the 2-D model efficiency, optimal linear image prediction filters [5] are constructed in Section 3 In order to take into account the adaptive nature for complex and non-stationary time series, neural networks are also applied to the forecasting problem in Section 4 The training algorithms for feed forward neural networks are also discussed briefly in this Section In Section 5, the prediction (forecasting) results that are obtained from both optimal linear filters and neural network models are presented 2 The 2-D Representation of Solar Radiation Data The collected hourly solar radiation data is a 1-D discrete-time signal In this work, we render this data in a 2-D matrix form as given in equation 1 x 11 x 1n Rad = (1) x m1 x mn where the rows and columns of the hourly solar radiation matrix indicate days and hours, respectively Such 2-D representation provides significant insight about the radiation pattern with time The informational insight is apparent from the sample surface-plots and image visualizations (in gray-scale) presented in Figures 1 and 2 6 5 4 Solar Radiation(W/m 2 ) 3 2 1 1 2 3 4 5 6 7 8 9 Hours Fig 1 Plot of hourly solar radiation data Although the surface-plot provides an intuitive information, the 2-D grayscale image interpretation enables tools that can be borrowed from the well established image processing world By inspecting the image version of the data in Fig 3, it is easy to interpret daily and seasonal behavior of solar radiation Dark regions of the image indicate that there is no sun shine on horizontal surface The transition from black to white indicates that solar radiation fall on horizontal surface is increasing or decreasing During winter time, the dawn to
A Novel 2-D Model Approach for the Prediction of Hourly Solar Radiation 751 6 5 Solar radiation(w/m 2 ) 4 3 2 1 4 3 25 2 15 2 1 1 5 Day Hour Fig 2 Plot of hourly two dimensional solar radiation data dusk period is shorter, producing a narrower protruding blob Conversely, the white blob is wider during summer times, indicating that the day-time is longer The width behavior of the white blob clearly indicates the seasonal changes of sun-light periods The horizontal and vertical correlations within the 2-D data is quite pronounced This implies that, given the vertical correlation among the same hours of consecutive days, it is beneficial to use 2-D prediction for hourly forecasting The prediction efficiency of the proposed model is illustrated with 2-D optimum linear prediction filters and neural networks 35 3 25 2 15 1 5 5 1 15 2 25 Fig 3 Image view of solar radiation data 3 Optimal 2-D Linear Prediction Filter Design Due to predictive image coding literature, it is known that a 2-D matrix can be efficiently modeled by linear predictive filters The prediction domain is a free
752 FO Hocao glu, ÖN Gerek, and M Kurban parameter determined according to the application Consider a three coefficient prediction filter structure as given in expression 2: x i,j x i,j+1 x i+1,j ˆx i+1,j+1 =? (2) The linear filter coefficients: a 1, a 2 and a 3 are optimized, and the prediction result ˆx i+1,j+1 is estimated as The prediction error for this term is: ˆx i+1,j+1 = a 1 x i,j + a 2 x i,j+1 + a 3 x i+1,j (3) ɛ i+1,j+1 =ˆx i+1,j+1 x i+1,j+1 (4) The total error energy corresponding to the whole image prediction can be calculated as: m n ε = ɛ 2 ij (5) i=1 j=1 where m and n correspond to the width and height of the image, which are, for the solar data, 365 and 24, respectively The filter coefficients that minimize this function can be found from the solution of the minimization derivative equation: ε = ε = ε = (6) a 1 a 2 a 3 The solution to equation 6 yields the following matrix-vector equation: R 11 R 12 R 13 R 21 R 22 R 23 a 1 a 2 = r 1 r 2 (7) R 13 R 23 R 33 a 3 r 3 which is compactly written as R a = r, so the optimal filter coefficients can be obtained as a = R 1 r (8) where a contains the filter tap coefficients, r includes the correlation of the target pixel to the prediction template, and R includes correlation within the prediction template [5] Similar analysis holds for 1-D prediction, as well The performance comparisons of various sizes of 2-D prediction are presented in Section 5 The results indicate that by using larger prediction templates, better prediction performance can be achieved 4 Learning Techniques of Feed Forward NN s An alternative method to exploit the proposed 2-D representation is to use adaptive methods that converge to a global predictor for the solar radiation
A Novel 2-D Model Approach for the Prediction of Hourly Solar Radiation 753 data There are several techniques to achieve high speed NN algorithms Among these techniques, heuristic techniques were developed from an analysis of the performance of the standard steepest descent algorithm Among the category of fast algorithms, the methods use standard numerical optimization techniques such as conjugate gradient, quasi-newton, and Levenberg-Marquard The basic back propagation algorithm adjusts the weights in the steepest descent direction It turns out that, although the function decreases most rapidly along the negative of the gradient, this does not necessarily produce the fastest convergence In the conjugate gradient algorithms a search is performed along conjugate directions, which produces generally faster convergence than steepest descent directions Newtons method is an alternative to the conjugate gradient methods, which often converges faster As a drawback, the method is complex and expensive for its the Hessian matrix calculation in feed forward neural networks The computationally simpler quasi-newton methods do not require calculation of second derivatives Similarly, the Levenberg-Marquardt algorithm was also designed to approach second-order training speed without having to compute the Hessian matrix [6] Since Levenberg-Marquardt algorithm supplies faster convergence it is adopted and used in this study 5 Experimental Results In order to reduce computational complexity and to focus to the proposition, relatively short 1-D and 2-D prediction filters are used in this work The filter templates are given in Fig 4 These templates are also widely used in predictive image and signal coding 1D predict temp 2D predict temp x 13 x 11 x 12 x 1n x 22 x m1 x mn x 11 x 12 x 1n x 21 x 22 x m1 x mn Fig 4 1-D and 2-D prediction templates used for modeling the image For the minimum RMSE linear prediction, the optimal coefficients are analytically determined by solving Eq 8 The 2-D image data is fed to the prediction system, and error figures are obtained for each hour The error figure for 2-D 3-tap optimum filter is given in Fig 5 As a second step prediction model, two neural network structures given in Fig 6 are applied to the data In the first structure, the input is treated as 1-D, and the input network elements are i th, i+1 th and i+2 th elements of the
754 FO Hocao glu, ÖN Gerek, and M Kurban 4 2 Error 2 4 6 4 3 2 Day 1 5 1 Hour 15 2 25 Fig 5 Error image obtained from 2-D optimal linear filter NN2-2D inputs NN1-1D inputs NN1-1D output NN2-2D output Rad (i, j) C(i) Rad (i+1, j) C(i+1) C(i+3) Rad (i+1, j+1) Rad (i, j+1) C(i+2) Input Layer Hidden Layer Output Layer Fig 6 The ANN structure data, where the output is the i+3 th element for each sample in the data In the second structure, the proposed 2-D image matrix form is used The inputs of the networks are i,j th, i+1,j th and i,j+1 th elements of the 2-D data matrix and the output is i+1,j+1 th element of the data matrix for each i and j For each case, 1/6 of the hourly solar radiation data (2 months) is used for training Solar radiation(w/m 2 ) 6 5 4 3 2 1 2 4 Day 6 8 25 2 15 Hour 1 5 Fig 7 The test data
A Novel 2-D Model Approach for the Prediction of Hourly Solar Radiation 755 4 2 Error 2 4 6 4 Day 2 5 1 Hour 15 2 25 Fig 8 Test error image obtained from feed forward BP-NN Table 1 RMSE values for proposed structures and Autocorrelation coefficients between actual values and predicted values of solar radiation data RMSE RMSE for R Rfor test data test data 1-D lin filter 4433-963 - 2-D lin filter 419-968 - NN1 1-D 4512 4212 963 973 NN2 2-D 3917 3866 971 976 6 5 R = 976 Actual pixel values(w/m 2 ) 4 3 2 1 1 2 3 4 5 6 Predicted pixel values(w/m 2 ) Fig 9 Plot of actual pixel values versus predicted pixel values obtained from NN 2-D The sigmoid function and the gradient descent algorithm with Levenberg- Marquard modification are used during learning process with three neurons at the hidden layer To accelerate the speed of learning process a momentum term is used and is updated by a fraction of the previous weight update to the current one After the learning phase, the network is simulated by the remaining image data (Fig 7) and error samples ere obtained (Fig 8) Root Mean Square Error (RMSE) values that are obtained from proposed optimum linear prediction filters and neural networks are presented in Table I The correlation coefficients
756 FO Hocao glu, ÖN Gerek, and M Kurban between actual data values and predicted data values are also tabulated here The correlation coefficients are also presented as a plot of actual pixel values versus predicted pixel values obtained from 2-D NN2 in Fig 9 6 Conclusion In this work, a novel approach is proposed for hourly solar radiation forecasting The hourly solar radiation is interpreted and rendered as an 2-D image and its properties are examined It is observed that two dimensional representation gives more insight to the solar pattern than the regular 1-D interpretation As an illustration, 1-D and 2-D optimal linear prediction filters with 3 coefficients are designed and compared in the sense of RMSE and correlation coefficients The RMS energy value of the data and the prediction sequence are around 198 After applying the prediction, the RMS value of the prediction error reduces down to 4433 using 1-D prediction This value also constitutes the standard deviation of the statistical system By using 2-D prediction, this value is reduced further to 419 To emphasize the efficiency of the proposed 2-D representation, two feed forward neural network structures, one for 1-D modeling and the other for the 2-D, are built and trained by the same data The RMSE values are obtained as 4212 and 3866 for 1-D and 2-D case, respectively This observation also justifies the efficiency of the 2-D data representation that exploits inter-day dependencies of the solar radiation pattern Furthermore, it is clear that the 2-D NN structure provides better prediction than the optimum linear filter The 2-D representation has potential uses for different meteorological parameters and different models such as surface matching, clustering based classification, etc Dynamical time varying behavior of the model may also be analyzed Such analysis can be regarded as future works of this study References 1 Maafi, A, Adane, A: A Two State Markovian Model of Global Irradiation Suitable for Photovoltaic Conversion Solar and Wind Technology 6, 247 252 (1989) 2 Amato, U, Andretta, A, Bartolli, B, Coluzzi Cuomo, BV, Fontana, F, Serio, C: Markov Process and Fourier Analysis as a Tool to Describe and Simulate Solar Irradiation Solar Energy 37, 197 21 (1986) 3 Mellit, A, Benghanem, M, Hadj Arab, A, Guessoum, A: A Simplified Model for Generating Sequences of Global Solar Radiation Data for Isolated Sites: Using Artificial Neural Network and a Library of Markov Transition Matrices Approach Solar Energy 79, 469 482 (25) 4 Aguiar, J, Collares-Perrira, M, Conde, SP: Simple Procedure for Generating of Daily Radiation Values Using Library of Markov Transition Matrices Solar Energy 49, 229 279 (1988) 5 Gonzalez, RC, Woods, RE: Digital Image Processing, pp 461 463 Prentice-Hall, Englewood Cliffs (22) 6 Hagan, MT, Menhaj, MB: Training Feedforward Networks with the Marquardt Algorithm IEEE Transactions On Neural Networks 5, 989 993 (1994)