Prediction of Solar Irradiance Based on Artiﬁcial Neural Networks

: Prediction of solar irradiance plays an essential role in many energy systems. The objective of this paper is to present a low-cost solar irradiance meter based on artiﬁcial neural networks (ANN). A photovoltaic (PV) mathematical model of 50 watts and 36 cells was used to extract the short-circuit current and the open-circuit voltage of the PV module. The obtained data was used to train the ANN to predict solar irradiance for horizontal surfaces. The strategy was to measure the open-circuit voltage and the short-circuit current of the PV module and then feed it to the ANN as inputs to get the irradiance. The experimental and simulation results showed that the proposed method could be utilized to achieve the value of solar irradiance with acceptable approximation. As a result, this method presents a low-cost instrument that can be used instead of an expensive pyranometer. the input–output data set was extracted using MATLAB Simulink. These data sets were utilized to train the parameters of the ANN (o ﬀ -line) using the backpropagation algorithm. The trained NN was then used to predict the solar irradiance by measuring the open-circuit voltage and the short-circuit current of the PV module. The results show the e ﬀ ectiveness of the estimation method. The model, which is based on the actual behavior of the PV module, has better accuracy than any other mathematical estimation methods of solar irradiance. At the same time, the proposed method avoids the use of an expensive pyranometer to measure solar irradiance by providing an e ﬀ ective, low-cost alternative technique to measure solar irradiance based on implications of ANN.


Introduction
Among different types of energy sources, photovoltaic (PV) energy is one of the most important renewable energy sources [1]. The production of this energy is affected by several factors, such as irradiation, temperature, shadow, and cell deviation from the diode operation. The vital factor is the incident irradiance of the sun on the horizontal top of the module. However, as semiconductors are used to construct PV cells, they are sensitive to the temperature condition as well. The characteristic of the PV power curve is considerably affected by the temperature module [2]. Therefore, environmental factors have a significant impact on the performance of PV modules. A precise measurement of the module temperature (T) and incident solar irradiance (G) are required to get better performance of PV systems with maximum power point tracking (MPPT). Moreover, the measured data is useful for active PV power system characterization.
A pyranometer is used to measure the irradiance of the sun [3]. It can be installed on a surface to measure the global irradiance received from the hemisphere, as shown in Figure 1 [4][5][6]. It is used to measure global (diffuse and beam) irradiance on a horizontal plane [3,6]. However, pyranometers have several disadvantages: (1) the price can be between $300 (with low accuracy) and $1800 (with high accuracy), (2) the sensitivity can vary with time, (3) exposure of irradiance with long time and high temperature (>50 °C) can reduce the accuracy of the device, and (4) the pyranometer needs to be calibrated daily and whenever there is a significant variation in weather conditions [3]. Taking these disadvantages into account, there is an urgent and essential need for building a system to predict the instant value of solar irradiance incident on surfaces. This can be achieved by utilizing artificial neural networks (ANN) because of their ability to learn and train the system model. Artificial neural networks make a computational model to simulate nonlinear, complex, and timevarying systems [7]. This paper proposes an ANN to predict solar irradiance based on real measurements of I-V curve parameters for a PV module. These essential parameters change with irradiance and PV cell temperature [8]. Therefore, measurement of these parameters can be used as input data for pretrained neural network (NN) to predict the irradiance value. The NN is trained based on simulating the mathematical model of the PV module. The paper is constructed as follows: Section 2 presents the architecture of NN, Section 3 describes in detail the proposed method for predicting solar irradiance, Section 4 presents the results and discussion, and Section 5 gives the conclusion.

Artificial Neural Network
The ANN is a machine-learning mechanism that has been inspired by the biological processes of the human brain [9,10]. The basic architecture of the ANN consists of simple processing units called neurons. The neurons are connected by proper links, and each simple neuron consists of weights, adder, and output transfer function, as shown in Figure 2.  Taking these disadvantages into account, there is an urgent and essential need for building a system to predict the instant value of solar irradiance incident on surfaces. This can be achieved by utilizing artificial neural networks (ANN) because of their ability to learn and train the system model. Artificial neural networks make a computational model to simulate nonlinear, complex, and time-varying systems [7]. This paper proposes an ANN to predict solar irradiance based on real measurements of I-V curve parameters for a PV module. These essential parameters change with irradiance and PV cell temperature [8]. Therefore, measurement of these parameters can be used as input data for pretrained neural network (NN) to predict the irradiance value. The NN is trained based on simulating the mathematical model of the PV module. The paper is constructed as follows: Section 2 presents the architecture of NN, Section 3 describes in detail the proposed method for predicting solar irradiance, Section 4 presents the results and discussion, and Section 5 gives the conclusion.

Artificial Neural Network
The ANN is a machine-learning mechanism that has been inspired by the biological processes of the human brain [9,10]. The basic architecture of the ANN consists of simple processing units called neurons. The neurons are connected by proper links, and each simple neuron consists of weights, adder, and output transfer function, as shown in Figure 2. high temperature (>50 °C) can reduce the accuracy of the device, and (4) the pyranometer needs to be calibrated daily and whenever there is a significant variation in weather conditions [3]. Taking these disadvantages into account, there is an urgent and essential need for building a system to predict the instant value of solar irradiance incident on surfaces. This can be achieved by utilizing artificial neural networks (ANN) because of their ability to learn and train the system model. Artificial neural networks make a computational model to simulate nonlinear, complex, and timevarying systems [7]. This paper proposes an ANN to predict solar irradiance based on real measurements of I-V curve parameters for a PV module. These essential parameters change with irradiance and PV cell temperature [8]. Therefore, measurement of these parameters can be used as input data for pretrained neural network (NN) to predict the irradiance value. The NN is trained based on simulating the mathematical model of the PV module. The paper is constructed as follows: Section 2 presents the architecture of NN, Section 3 describes in detail the proposed method for predicting solar irradiance, Section 4 presents the results and discussion, and Section 5 gives the conclusion.

Artificial Neural Network
The ANN is a machine-learning mechanism that has been inspired by the biological processes of the human brain [9,10]. The basic architecture of the ANN consists of simple processing units called neurons. The neurons are connected by proper links, and each simple neuron consists of weights, adder, and output transfer function, as shown in Figure 2.  Where x 1 , . . . , x i are the input data; w j1 , . . . , w ji are the input weights; b j is the bias; and y j is the output.
The essential feature of the ANN is to provide a supervised learning process by input-output data sets. In the learning process, the NN modifies its structure to get the same reference or set point as the supervisor. The training process is repeated to bring the difference between NN output and the supervisor within acceptable ranges [10]. Feedforward network is a net of single neurons joined and linked together by weight connections. Figure 3 shows a three-layer NN [11][12][13][14].
Inventions 2019, 4, x FOR PEER REVIEW  3 of 10 where x1, …, xi are the input data; wj1, …, wji are the input weights; bj is the bias; and yj is the output. The essential feature of the ANN is to provide a supervised learning process by input-output data sets. In the learning process, the NN modifies its structure to get the same reference or set point as the supervisor. The training process is repeated to bring the difference between NN output and the supervisor within acceptable ranges [10]. Feedforward network is a net of single neurons joined and linked together by weight connections. Figure 3 shows a three-layer NN [11][12][13][14]. The backpropagation algorithm is a supervised learning method, and it is the most popular training method for a feedforward network. The desired input and output data patterns can be obtained from the simulation study for the mathematical model of the plant. For k-input pattern, the output for the hidden layer (y ) and the output layer (y ) are calculated from Equations (1) -(4): where n is the number of inputs to NN, and m is the number of neuron in the hidden layer. Therefore, the output is compared with the desired output and the mean squared error (MSE) at iteration k and calculated as shown in the following equation: The training is repeated with all k patterns, and the cumulative MSE is calculated from Equation (6).
where k is the number of pattern or data set. The weights are changed in the backward path by the delta rule equations as follows: The backpropagation algorithm is a supervised learning method, and it is the most popular training method for a feedforward network. The desired input and output data patterns can be obtained from the simulation study for the mathematical model of the plant. For k-input pattern, the output for the hidden layer (y k j ) and the output layer (y k o ) are calculated from Equations (1)-(4): where n is the number of inputs to NN, and m is the number of neuron in the hidden layer. Therefore, the output is compared with the desired output and the mean squared error (MSE) at iteration k and calculated as shown in the following equation: The training is repeated with all k patterns, and the cumulative MSE is calculated from Equation (6). where k is the number of pattern or data set. The weights are changed in the backward path by the delta rule equations as follows: (1) For the weights between the output and hidden neurons, the delta rule (∂) is calculated as follows: (2) For weights between the hidden and input neurons, the delta hidden rule (∂ h ) is calculated as follows: where w k oj is the weight matrix between the output and hidden neurons, and d k is the desired output at k-input pattern.

Irradiance Prediction Using ANN
The solar power system consists of some photovoltaic cells, usually referred to as PV modules, connected in parallel or in a series to achieve the required power. PV voltage-current equation can be written as shown in [15][16][17]. The US National Renewable Energy Laboratory (NREL) has developed a procedure that takes into consideration the characteristics of the incident sun irradiance in a more complex module energy rating (MER). The resulting I-V curves for each reference days are converted to actual G and T conditions, as needed by the MER procedure, using Equation (9) [18]: where I scr : short-circuit current at standard test conditions (STC) (Gr = 1000 w/m 2 and T r = 25 C), I sc : short-circuit current at any G and T, β: coefficients for temperature.
The above equation describes the current behavior of the PV module by taking into account the irradiance with the temperature effect, and it can be used to estimate the solar irradiance in the PV module [19,20]. The proposed method permits the prediction of irradiance without using a pyranometer, as shown in Figure 4. (1) For the weights between the output and hidden neurons, the delta rule (∂) is calculated as follows: (2) For weights between the hidden and input neurons, the delta hidden rule (∂ ) is calculated as follows: where w is the weight matrix between the output and hidden neurons, and d is the desired output at k-input pattern.

Irradiance Prediction Using ANN
The solar power system consists of some photovoltaic cells, usually referred to as PV modules, connected in parallel or in a series to achieve the required power. PV voltage-current equation can be written as shown in [15][16][17]. The US National Renewable Energy Laboratory (NREL) has developed a procedure that takes into consideration the characteristics of the incident sun irradiance in a more complex module energy rating (MER). The resulting I-V curves for each reference days are converted to actual G and T conditions, as needed by the MER procedure, using Equation (9) [18]: where I : short-circuit current at standard test conditions (STC) (Gr = 1000 w/m 2 and Tr = 25 C), I : short-circuit current at any G and T, β: coefficients for temperature. The above equation describes the current behavior of the PV module by taking into account the irradiance with the temperature effect, and it can be used to estimate the solar irradiance in the PV module [19,20]. The proposed method permits the prediction of irradiance without using a pyranometer, as shown in Figure 4.  can be estimated by measuring the short-circuit current (I sc ) and the open-circuit voltage (V oc ) of the same PV module using current and voltage sensors. The switch is used to change between the current and the voltage sensors. If the switch is closed, short-circuit current can be achieved, and if it is opened, then open-circuit voltage can be measured. At the same time, the DS18B20 temperature sensor is used to measure the PV panel temperature. These measured values can be fed later on to the Arduino microcontroller as an interface stage between the data and the MATLAB software. Then, the microcontroller will send the data acquisition to the NN Simulink model as input data to predict the solar irradiance.

Simulation and Measurement Results
The Simulink model of the PV panel was realized using MATLAB software to get the open-circuit voltage and the short-circuit current. Predata was utilized as input and output mapping to train the parameter of the NN, which was established on the backpropagation algorithm. The cumulative MSE was taken as a fitness function to measure the performance of the NN. The number of data set was 15, as shown in Table 1. The configurations of ANN had five neurons in the hidden layer, two neurons in the input layer, and one neuron in the output layer. The learning ratio was set to 0.6, and the parameter values of NN were initialized randomly. Off-line learning was ended when the cumulative error became equal to or less than the chosen value (which was 0.00002). The number of iterations was chosen to be 3795. Final optimal weights and bias for the ANN are shown in Table 2.  Figure 5 shows the mean squared error via some iterations, while the Simulink model of the trained NN is shown in Figure 6.
Inventions 2019, 4, x FOR PEER REVIEW 6 of 10 Figure 7 shows the MATLAB Simulink model of a 50 watt PV panel that was used to extract the data sets. The experimental setup to measure the open-circuit voltage and the short-circuit current of the PV module is shown in Figure 8. Table 3 compares the measurement results and the proposed sun irradiance estimation of the PV module based on NN. This can be seen more clearly in Figure 9.     Figure 7 shows the MATLAB Simulink model of a 50 watt PV panel that was used to extract the data sets. The experimental setup to measure the open-circuit voltage and the short-circuit current of the PV module is shown in Figure 8. Table 3 compares the measurement results and the proposed sun irradiance estimation of the PV module based on NN. This can be seen more clearly in Figure 9.     Figure 7 shows the MATLAB Simulink model of a 50 watt PV panel that was used to extract the data sets. The experimental setup to measure the open-circuit voltage and the short-circuit current of the PV module is shown in Figure 8. Table 3 compares the measurement results and the proposed sun irradiance estimation of the PV module based on NN. This can be seen more clearly in Figure 9.

Conclusions
ANN was used to predict solar irradiance of a PV module due to its high potential to map and represent complex and nonlinear systems. Based on the mathematical model of the selected PV module, the input-output data set was extracted using MATLAB Simulink. These data sets were utilized to train the parameters of the ANN (off-line) using the backpropagation algorithm. The trained NN was then used to predict the solar irradiance by measuring the open-circuit voltage and the short-circuit current of the PV module. The results show the effectiveness of the estimation method. The model, which is based on the actual behavior of the PV module, has better accuracy than any other mathematical estimation methods of solar irradiance. At the same time, the proposed method avoids the use of an expensive pyranometer to measure solar irradiance by providing an effective, low-cost alternative technique to measure solar irradiance based on implications of ANN.

Conclusions
ANN was used to predict solar irradiance of a PV module due to its high potential to map and represent complex and nonlinear systems. Based on the mathematical model of the selected PV module, the input-output data set was extracted using MATLAB Simulink. These data sets were utilized to train the parameters of the ANN (off-line) using the backpropagation algorithm. The trained NN was then used to predict the solar irradiance by measuring the open-circuit voltage and the short-circuit current of the PV module. The results show the effectiveness of the estimation

Conclusions
ANN was used to predict solar irradiance of a PV module due to its high potential to map and represent complex and nonlinear systems. Based on the mathematical model of the selected PV module, Inventions 2019, 4, 45 9 of 10 the input-output data set was extracted using MATLAB Simulink. These data sets were utilized to train the parameters of the ANN (off-line) using the backpropagation algorithm. The trained NN was then used to predict the solar irradiance by measuring the open-circuit voltage and the short-circuit current of the PV module. The results show the effectiveness of the estimation method. The model, which is based on the actual behavior of the PV module, has better accuracy than any other mathematical estimation methods of solar irradiance. At the same time, the proposed method avoids the use of an expensive pyranometer to measure solar irradiance by providing an effective, low-cost alternative technique to measure solar irradiance based on implications of ANN.