**6. Solar radiation prediction**

In the present work, solar radiation will be predicted firstly with static neural network and then with NARX model. This study begins firstly with the observation of the solar radiation data base. In fact, the data base used in this work is composed of a set of solar radiation and temperature measurements correspond to an industrial company located on north of Barcelona [9]. These measurements are taken every day and every 5 minutes throughout 2010. In **Figure 4**, the daily evolution of solar radiation during 2010 is presented.

As shown in the above figure, the presented database is so large. So in order to reduce this annual solar radiation descriptive curve, just the solar radiation weekly averages will be taken into consideration in the solar radiation prediction. The curve presented in **Figure 4** is thus reduced as presented in **Figure 5**.

**Figure 4.** Solar radiation daily evolution during 2010.

Where u represents the exogenous data and y are the NARX model outputs. du and dy

put and six neurons in its hidden layer is presented as shown in the **Figure 3**.

**Figure 3.** Example NARX model standard architecture *(3 inputs, 1 hidden layer, and 1 output).*

standard architecture.

**5. Learning and generalization**

**Figure 2.** NARX model standard architecture.

254 Advanced Applications for Artificial Neural Networks

ent respectively delays order of inputs u and outputs y. **Figure 2** presents the NARX model

For example, the NARX architecture of a neural network composed of three inputs, one out-

Learning and generalization are two specifics properties that characterize any neural network. Unlike traditional methods that build programs to solve a problem, neural network operates mainly on a learning basis. We do not program a neural network, but we learn it. This is why the learning phase is among the most important properties of neural network.

pres-

**Figure 5.** Weekly evolution of solar radiation during 2010.

### **7. Solar radiation prediction using static neural network**

In this paragraph, solar radiation will be predicted using the static neural network. Inputs chosen for this neural network are the temperature and the output will be the radiation as presented in **Figure 6**.

To determine the optimal neural structure for this network, the learning and test performances are treated for different neurons in the hidden layer. The transfer functions chosen for the hidden layer and for the output layer are respectively "tansig" and "purelin." As presented in **Table 1**, the optimal neurons number obtained for this static neural network is equal to 2. The simulation results of learning, test, and validation obtained with this structure are presented in **Figure 7**.

**Figure 6.** Inputs and the output for the static neural network.


**Table 1.** MSE versus neurons in the hidden layer for static neural network.

**7. Solar radiation prediction using static neural network**

**Figure 5.** Weekly evolution of solar radiation during 2010.

256 Advanced Applications for Artificial Neural Networks

**Figure 6.** Inputs and the output for the static neural network.

presented in **Figure 6**.

presented in **Figure 7**.

In this paragraph, solar radiation will be predicted using the static neural network. Inputs chosen for this neural network are the temperature and the output will be the radiation as

To determine the optimal neural structure for this network, the learning and test performances are treated for different neurons in the hidden layer. The transfer functions chosen for the hidden layer and for the output layer are respectively "tansig" and "purelin." As presented in **Table 1**, the optimal neurons number obtained for this static neural network is equal to 2. The simulation results of learning, test, and validation obtained with this structure are

> Network Static Neural Temperature SolarRadiation

The optimal neural structure for the static neural network is thus composed of temperature (T) as input, radiation (R) as output, and one hidden layer which contains two neurons as shown in **Figure 8**.

The results of solar radiations prediction with static neural network are presented in **Figure 9.** All inputs are normalized, so the maximum solar radiation value is equal to 1. The blue curve corresponds to the real solar radiation, and the red one corresponds to the predicted one. As shown in the figure, the predicted solar radiation follows the evolution of the real one, but there is not an

**Figure 7.** Learning, test, and validation of static neural network.

**Figure 8.** Optimal neural architecture for the static neural network.

approximation between the two curves. This is remarked especially when the solar radiation fluctuations are so important. To better treat these results, prediction error is presented in **Figure 10**, and the different error mean square error (MSE), mean absolute error (MAE), and root mean square error (RMSE) are computed and presented in **Table 2**.

**Figure 11** shows that the prediction error is variable. It reaches a maximum value of 0.5 and a minimum value of 0.02. This is shows the performances of static neural network to predict the solar radiation for certain period of time and its weakness to predict it in other periods. The MSE value is equal to 0.0516; it is lower than MAE and RMSE. It is not considered too small, thus shows the inefficiency of the static neural network to best predict the solar radiation.

**Figure 9.** Solar radiation prediction using the static neural network.

**Figure 10.** Solar radiation prediction error with the static neural network.

approximation between the two curves. This is remarked especially when the solar radiation fluctuations are so important. To better treat these results, prediction error is presented in **Figure 10**, and the different error mean square error (MSE), mean absolute error (MAE), and root mean square

T R

**Figure 11** shows that the prediction error is variable. It reaches a maximum value of 0.5 and a minimum value of 0.02. This is shows the performances of static neural network to predict the solar radiation for certain period of time and its weakness to predict it in other periods. The MSE value is equal to 0.0516; it is lower than MAE and RMSE. It is not considered too small, thus shows the inefficiency of the static neural network to best predict the solar

error (RMSE) are computed and presented in **Table 2**.

**Figure 8.** Optimal neural architecture for the static neural network.

258 Advanced Applications for Artificial Neural Networks

**Figure 9.** Solar radiation prediction using the static neural network.

radiation.


**Table 2.** MSE, MAE, and RMSE for solar radiation prediction with static neural network.
