MODELING OF SOLAR RADIATION WITH A NEURAL NETWORK

Modeling of solar radiation with neural network could be used for real-time calculations of the radiation on tilted surfaces with different orientations. In the artificial neural network (ANN), latitude, day of the year, slope, surface azimuth and average daily radiation on horizontal surface are inputs, and average daily radiation on tilted surface of definite orientation is output. The possible ANN structure, the size of training data set, the number of hidden neurons, and the type of training algorithms were analyzed in order to identify the most appropriate model. The same ANN structure was trained and tested using data generated from the Klein and Theilacker model and long-term measurements. Reasonable accuracy was obtained for all predictions for practical need.


INTRODUCTION
The determination of solar radiation on tilted surfaces with different orientations is frequently required in many engineering and agricultural applications.Such applications include obtaining electricity from solar panels, drying of agricultural and food products, grain storage and greenhouse production.Are many known methods and algorithms for analysis of the solar system [1,2,3,4].The model is practical, when the capacity of the solar system is quickly and easily estimated.Such model could be realized by artificial neural network.
An artificial neural network is an information processing system, which learns from input/output data to determine the relationships between them.Unlike other modeling techniques such as differential equations and regression equations, an ANN can handle more than two variables to predict two or more outputs.The regression equations or statistical models are subject to assumptions and cautions inherent in the analyses.In recent years, ANNs have attracted researchers in many disciplines of science and engineering, since they are capable of correlating large and complex data sets.
The aim of this study is to build an artificial neural network, through which to obtain a model of the solar radiation.In practice, the ANN model can be used for faster, easier and reasonably accurate predictions of solar radiation on tilted surfaces with different orientation.

ANALYTICAL MODEL
By the method of Klein and Theilacker the average daily value of solar radiation on inclined surfaces with different orientations can be calculated.Setting the input parameters latitude  , day of the year n , slope  , surface azimuth  and average daily radiation on horizontal surface H , the output parameter -average daily radiation on tilted surfaces of any orientation T H can be calculated with Klein and Theilacker method as [2]: R H H T   (1) where: The clearness index

MODEL THROUGH ARTIFICIAL NEURAL NETWORK
The first layer of the ANN includes the five input parameters of the model described in p.2, and the last layer of the single neuron provides single output parameter T H .The neurons were positioned in two layers, with one neuron in the second layer with a linear step function.
The chosen structure of the neural network, used to model the solar radiation on inclined surfaces with different orientation, is shown in Figure 1.In Figure 1, the following notations are used for the weight and bias:     -bias {layer} neuron number  1(column vector).
In order to obtain the most appropriate ANN topology, a research is conducted on the size of the training data set, number of neurons, training algorithm and the step function for the first layer of neurons.This stage of the study is performed with the Neural Network Toolbox of Matlab [1].The success of the training was determined by the average mean square deviation between the generated values of the solar radiation by the model described in p. 2 and the values predicted by ANN, respectively.Minimization of the mean square deviation was the objective.
The size of the training and testing data sets are: for  from 4 1 41 0  to 2 1 44 0  (the latitude range is valid for Bulgaria), for  from 0 to 90 in steps of 10, for 0, 30, 60, 90, 120, 150, 180 and n from 1 to 365, 2000 data sets were generated using the above mentioned equations in p.2. From the generated data sets, 400 data sets were randomly selected as testing set (20 %) of all.The rest 1600 data sets were used for ANN training.
After every data set training, ANN weights were adjusted.Testing data sets were maintained to test trained ANN, after training for 1000 epochs.
The hidden layer of neurons was divided into two layers (Figure 1), and a study was conducted to determine the optimal number of neurons in the first layer.The average mean square error in term of the number of neurons was estimated.The deviation was acceptable when the number of neurons was around 30-35 and it was decided to use 30 neurons for further examination.
There were several options for the step function, hard-limit (hardlim), tan-sigmoid (tansig), log-sigmoid (logsig) and linear (purelin) functions, and for the first layer of neurons, the tansig function proved to be the best option.
As only one neuron is involved in the second layer of neurons, a linear step function (purelin) was applied in that case.The selected step functions are also indicated in Figure1.
The software used for training has 11 versions of the back-propagation algorithm.Only the Levenberg-Marquardt algorithm (trainlm) produced an acceptable approximation.

RESULTS AND DISCUSSION
Using the generated input data (1600 pairs), the training result determined by the average mean square deviation between generated values by K-T method and values predicted by ANN is RMSE=0.0121.
The testing set (400 pairs) was not included in the training set.In testing set, the percentage of predictions for T H with relative errors <5% and other statistical results are shown in Table 1.In 400 production sets, the percentage of prediction for T H with relative errors <5% was 94.35%.The testing results of the neural network for solar radiation on surfaces with different slope  are shown in Table 3.By increasing the surface slope, the percentage of prediction decreases.It is 97.22 % for =0 and 90.10 % for =90.

Fig. 1 .
Fig. 1.Matlab realization of ANN structure used for modeling the solar radiation.
T K can be calculated by integrated daily extraterrestrial radiation on a horizontal surface

Table 1 .
Effect of original data on prediction errors of solar radiation.Output is shown in Figure2.In this figure, a good agreement between the testing data set and the ANN produced data noted.The validation resulted in a average deviation of 0.101 MJ in the solar radiation.

Table 2 .
Percentage of data sets within 5 % relative error for months.

Table 3 .
Percentage of data sets within 5% relative error for surfaces with different slope.on differently orientated surfaces.The best percentage of prediction was obtained for south, south-eastern and south-western orientated surfaces.It is 97.5 % for 0   .The percentage of prediction is 88.05 % for north orientated surface.
T H

Table 4 .
Percentage of data sets with 5% relative error for different orientated surfaces.The results show a very good prediction accuracy for spring, summer, and autumn months, for south, southeastern and south-western orientated surfaces with slope