Open access peer-reviewed chapter

Solar Radiation Prediction Using NARX Model

By Ines Sansa and Najiba Mrabet Bellaaj

Submitted: May 5th 2017Reviewed: August 10th 2017Published: February 28th 2018

DOI: 10.5772/intechopen.70570

Downloaded: 974

Abstract

The human brain, like every vital organ, is constituted of neurons. It is through this organ that we can learn and reason, reflect and memorize. The geniality of human brain and more particularly of its neurons motivates several researchers to interest to this research and to benefit from its biological aspect. The idea was to reproduce, in an artificial way, the behaviors observed in man. It was in 1943 that the first artificial neural network (ANN) was created by Warren McCulloch and Walter Pitts. It is a simple elementary processor imitating the structure and the functioning from the biological neuron. Artificial neural network is characterized by its capacity to learning and generalizing. It represents a very powerful tool. It provided multiple solutions to different complex problems. In these recent years, its effectiveness is proved in various researches fields. ANN is subdivided on two main groups, the static and dynamic neural network. The choice of the one or the other neural network type depends to the application to be processed and the complexity of model. For static neural network, information propagates in a single direction, layer by layer, and from the inlet to the outlet. They are generally used in various applications such as classifications, pattern recognition, and functions approximation. For the dynamic neural network dynamic neural network is not limited. Each neuron can send and receive information from all other neurons. The dynamic neural network architecture includes frequently one or more cycles which necessarily contain at least one delay connection. This gives rise to the dynamism notion. This neural network type is more complex than the static one, but it is more efficient for some particular applications such as dynamic modeling, monitoring, and process control. In this chapter, nonlinear autoregressive models with exogenous input (NARX) model, as type of dynamic neural network, will be used to the solar radiation prediction. Simulation results will be presented to prove the effectiveness of this model compared to those obtained using the static one.

Keywords

  • static neural network
  • NARX model
  • solar radiation prediction

1. Introduction

The human brain, like every vital organ, is constituted of a set of cells which are called neurons. It is through this organ that we can learn and reason, reflect and memorize. The geniality of human brain and more particularly of its neurons motivates several researchers to interest to this research and to benefit from its biological aspect. The idea was to reproduce, in an artificial way, the behaviors observed in man. It was in 1943 that the first artificial neural network was created by Warren McCulloch and Walter Pitts. It is a simple elementary processor imitating the structure and the functioning from the biological neuron. Artificial neural network is characterized by its capacity of learning and generalizing. It represents a very powerful tool; it provided multiple solutions to different complex problems. In these recent years, its effectiveness is proved in various researches fields. Artificial neural network are subdivided on two main groups, the static and dynamic neural network. The choice of the one or the other neural network type depends on the application to be processed and the complexity of model. For static neural network, information propagates in a single direction, layer by layer, and from the inlet to the outlet. They are generally used in various applications such as classifications, pattern recognition, and functions approximation. The connectivity between neurons in dynamic neural network is not limited. Each neuron can send and receive information from all other neurons. The dynamic neural network architecture includes frequently one or more cycles which necessarily contain at least one delay connection. This gives rise to the dynamism notion. This neural network type is more complex than the static one, but it is more efficient for some particular applications such as dynamic modeling, monitoring, and process control. In this chapter, nonlinear autoregressive models with exogenous input (NARX) model, as type of dynamic neural network, will be used to the solar radiation prediction. Simulation results will be presented to prove the effectiveness of this model compared to the static one.

2. Static neural network

Static neural network was the first and simplest type. It is a nonlooped network since it does not contain a feedback or delay connection [1]. It is a statistical regression tool which allows the approximation of any nonlinear function sufficiently regular. The neural architecture of this network is presented as shown in Figure 1 . It imitates the structure of the biological neuron. It is composed of a set of layers. The hidden one allows to receive a variable number of inputs, and information is moved only from inputs directly through hidden layer to the output layer without cycles or loops. Each connection is associated with a synaptic weight w, which represents the strength of each connection. The negative weight inhibits its input, while the positive weight accentuates it.

Figure 1.

Static neural architecture.

3. NARX model

NARX model is the abbreviation of “nonlinear autoregressive models with exogenous input”. It is registered under recurrent dynamic neural networks. It is a nonlinear autoregressive model with exogenous inputs. NARX consists of a linear ARX model with two delays, one for input and the other for output. It is based on the multilayer perceptron and the recurring connections. Its effectiveness has been proven in the research work presented in [2] to predict the PV power. It is also used in other applications such as the electricity prices prediction and the air pollution prediction [3, 4, 5]. This model is commonly used for the time series, estimation, and prediction as well as for nonlinear dynamic systems modeling. Compared to other neural network types, NARX model is characterized by a good learning, fast convergence, and better generalization [6]. The PV power prediction results presented in [2] have proven an improvement performance when using NARX model compared to those obtained using the static neural network. NARX model performances are also compared to those of static neural network and radial neural network in the research works presented in [7]. NARX gave also the best prediction results in these studies.

4. NARX model architecture

NARX model defines the output as a function of its inputs and its past outputs as described in the following equation [8],

yt=fyt1,yt2,.,ytdy;ut1,ut2,,utduE1

Where u represents the exogenous data and y are the NARX model outputs. du and dy present respectively delays order of inputs u and outputs y. Figure 2 presents the NARX model standard architecture.

Figure 2.

NARX model standard architecture.

For example, the NARX architecture of a neural network composed of three inputs, one output 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).

5. Learning and generalization

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.

The learning phase consists to estimate the parameter of the network in such a way that it can best fulfill the task assigned to it. This phase cannot be effective only after having accumulated a set of inputs/outputs. When creating a neural network, the inputs and outputs are fixed relative to the application to be accomplished, it is the network weights that are modified and adjusted during the learning phase. The weight adjustment cannot be done in a random way but according to a “learning algorithm.” The generalization phase, known also the test phase, is one of the characteristics that determines the neural network performance. It consists to treat the output network with respect to the nonlearned inputs. The network generalization capacity degrades in the case of under/on learning.

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.

Figure 4.

Solar radiation daily evolution during 2010.

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 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 .

Figure 6.

Inputs and the output for the static neural network.

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 .

Number of neuronsMSE
10.0288
20.0016
30.0140
40.0041
50.0071
60.0298
70.0043
80.0058
90.0106
100.0097

Table 1.

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

Figure 7.

Learning, test, and validation of static neural network.

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 .

Figure 8.

Optimal neural architecture for the static neural network.

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 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 9.

Solar radiation prediction using the static neural network.

Figure 10.

Solar radiation prediction error with the static neural network.

ErrorPerformances
MSE0.0516
MAE0.2076
RMSE0.2272

Table 2.

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

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 11.

Inputs and output for the NARX model.

8. Solar radiation prediction using NARX model

In this part, solar radiation will be predicted using the NARX model. As presented in the previous paragraph, to predict a future value, NARX model is based on the historical data related to this value and involves some exogenous data. As temperature influences the solar radiation variation, it is chosen as an exogenous data. So the NARX model inputs will be the historical solar radiation data and temperature data as presented in Figure 11 .

The hidden layers number and their neurons must be chosen in such a way that they offer the best network performances in learning and in generalization. So in this paragraph, the network performances will be treated for different neural network architecture. Inputs for NARX model correspond to the historical solar radiations (R(t−1) and R(t−2)) and the ambient temperatures (T(t−1) and T(t−2)). The output will be the predicted solar radiation at time t (R(t)) as presented in Figure 12 . The transfer functions used for the hidden layer and for the output layer are respectively “tansig” and “purelin.”

Figure 12.

Neural architecture for the NARX model.

First, the network performances will be studied with just one neuron in the hidden layer; then, number of neurons will be incremented and the network performances will be restudied. Network performances are treated by the compute of the mean square error of learning and test (MSE). The optimal neural structure corresponds to the one which presented the minimal MSE. Simulations results for this study are presented in Table 3 and in Figure 13 . The optimal neural architecture obtained is the one which its hidden layer contains five neurons as presented in Figure 14 .

Number of neuronsMSE
10.0047
20.0217
30.0122
40.0072
50.00089
60.0016
70.0076
80.0258
90.0784
100.0460

Table 3.

MSE versus neurons in hidden layer for NARX model.

Figure 13.

Learning, test and validation of NARX model.

Figure 14.

Optimal neural architecture for the NARX model.

Based on this neural network, solar radiation is predicted by NARX model. Simulation results are presented in Figure 15 . The blue curve corresponds to the real solar radiation, and the red curve corresponds to the predicted one. As obtained with the static neural network, the predicted solar radiation follows the evolution of the real one. Furthermore, an approximation between the real and predicted curves is remarked, the two curves are overlapped for certain period of time especially when the solar radiation fluctuations are low. So an improvement in the quality of solar radiation prediction with NARX model is remarked compared to that obtained with the static neural network.

Figure 15.

Solar radiation predicted by NARX.

To the best evaluation of the NARX model performances, the solar radiation prediction error is presented in Figure 16 . The different error MSE, MAE, and RMSE are computed and presented in Table 4 . As presented in Figure 16 , the maximum error reaches the value of 0.42, and the minimum one is equal to 0. MSE is always the lowest one. It indicates a value of 0.0348. It is low compared to this one obtained with static neural network. Therefore, the performance of NARX model is proven in this work to predict the solar radiation.

Figure 16.

Solar radiation prediction error with NARX model.

ErrorPerformances
MSE0.0348
MAE0.1360
RMSE0.1864

Table 4.

MSE, MAE, and RMSE for solar radiation prediction with NARX model.

9. Conclusion

In this chapter, the solar radiation is predicted using two different neural networks, the static one and the NARX model. Simulations results are presented and are proven the effectiveness of NARX model to predict the solar radiation compared to the static neural network. The efficiency of NARX model is proven especially for the low solar radiation fluctuations. The NARX model is characterized by the presence of a direct feedback of the output which has given it an additional predictive power.

How to cite and reference

Link to this chapter Copy to clipboard

Cite this chapter Copy to clipboard

Ines Sansa and Najiba Mrabet Bellaaj (February 28th 2018). Solar Radiation Prediction Using NARX Model, Advanced Applications for Artificial Neural Networks, Adel El-Shahat, IntechOpen, DOI: 10.5772/intechopen.70570. Available from:

chapter statistics

974total chapter downloads

1Crossref citations

More statistics for editors and authors

Login to your personal dashboard for more detailed statistics on your publications.

Access personal reporting

Related Content

This Book

Next chapter

Data Assimilation by Artificial Neural Networks for an Atmospheric General Circulation Model

By Rosangela Saher Cintra and Haroldo F. de Campos Velho

Related Book

First chapter

Introductory Chapter: Electric Machines for Smart Grids and Electric Vehicles Applications

By Adel El-Shahat

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

More About Us