Open Access
This article is

- freely available
- re-usable

*Inventions*
**2019**,
*4*(3),
45;
https://doi.org/10.3390/inventions4030045

Article

Prediction of Solar Irradiance Based on Artificial Neural Networks

^{1}

Electrical Department, Basra Oil Training Institute, Basra 61001, Iraq

^{2}

Department of Communication Engineering, Iraq University College, Basra 61001, Iraq

^{3}

Department of Mechatronics Engineering, Obuda University, 1117 Budapest, Hungary

^{4}

Department of Telecommunications and Media Informatics, Budapest University of Technology and Economics, 1117 Budapest, Hungary

^{5}

School of Electrical Engineering and Computer Science, Faculty of Engineering and Informatics, University of Bradford, Bradford BD7 1DP, UK

^{6}

Department of Electrical Engineering, University of Misan, Misan 62001, Iraq

^{*}

Author to whom correspondence should be addressed.

Received: 28 June 2019 / Accepted: 8 August 2019 / Published: 10 August 2019

## Abstract

**:**

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

Keywords:

artificial neural networks; energy; photovoltaic modeling; prediction of solar irradiance; pyranometer## 1. 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 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.

## 2. 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].

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 (${\mathrm{y}}_{\mathrm{j}}^{\mathrm{k}}$) and the output layer (${\mathrm{y}}_{\mathrm{o}}^{\mathrm{k}}$) 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.

$${\mathrm{S}}_{\mathrm{j}}^{\mathrm{k}}={\displaystyle \sum}_{\mathrm{i}=1}^{\mathrm{n}}{\mathrm{w}}_{\mathrm{j}\mathrm{i}}^{\mathrm{k}}\cdot {\mathrm{x}}_{\mathrm{i}}^{\mathrm{k}}+{\mathrm{b}}_{\mathrm{j}}^{\mathrm{k}}$$

$${\mathrm{y}}_{\mathrm{j}}^{\mathrm{k}}=\frac{2}{1+{\mathrm{e}}^{-{\mathrm{S}}_{\mathrm{j}}^{\mathrm{k}}}}-1$$

$${\mathrm{S}}_{\mathrm{o}}^{\mathrm{k}}={{\displaystyle \sum}}_{\mathrm{i}=1}^{\mathrm{m}}{\mathrm{w}}_{\mathrm{o}\mathrm{j}}^{\mathrm{k}}\cdot {\mathrm{y}}_{\mathrm{j}}^{\mathrm{k}}+{\mathrm{b}}_{\mathrm{o}}^{\mathrm{k}}$$

$${\mathrm{y}}_{\mathrm{o}}^{\mathrm{k}}=\frac{2}{1+{\mathrm{e}}^{-{\mathrm{S}}_{\mathrm{o}}^{\mathrm{k}}}}-1$$

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:

$${\mathrm{e}}^{\mathrm{k}}=0.5\ast {\left({\mathrm{d}}_{\mathrm{o}}^{\mathrm{k}}-{\mathrm{y}}_{\mathrm{o}}^{\mathrm{k}}\right)}^{2}$$

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:

$$\mathrm{ce}={\displaystyle \sum}_{\mathrm{k}=1}^{\mathrm{k}}{\mathrm{e}}^{\mathrm{k}}$$

- (1)
- For the weights between the output and hidden neurons, the delta rule ($\partial $) is calculated as follows:$$\partial ={\mathrm{d}}^{\mathrm{k}}-{\mathrm{y}}_{\mathrm{o}}^{\mathrm{k}}$$
- (2)
- For weights between the hidden and input neurons, the delta hidden rule (${\partial}_{\mathrm{h}}$) is calculated as follows:$${\partial}_{\mathrm{h}}={\mathrm{y}}_{\mathrm{j}}^{\mathrm{k}}\cdot (1-{\mathrm{y}}_{\mathrm{j}}^{\mathrm{k}})\cdot {\mathrm{w}}_{\mathrm{oj}}^{\mathrm{k}}\cdot \partial $$

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

$${\mathrm{I}}_{\mathrm{sc}}=\left(\frac{\mathrm{G}}{{\mathrm{G}}_{\mathrm{r}}}\right){\mathrm{I}}_{\mathrm{scr}}\text{}\left[1+\mathsf{\beta}\left(\mathrm{T}-{\mathrm{T}}_{\mathrm{r}}\right)\right]$$

- ${\mathrm{I}}_{\mathrm{scr}}$: short-circuit current at standard test conditions (STC) (Gr = 1000 w/m
^{2}and T_{r}= 25 C), - ${\mathrm{I}}_{\mathrm{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.

Mathematical model of the PV must be implemented to get the open-circuit voltage and the short-circuit current and as a data set for training NN using backpropagation. The irradiance (G) 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.## 4. 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.

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.

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

## Author Contributions

Conceptualization, W.I.H.; methodology, B.A.S., A.L.S., and S.J.A.-K.; investigation, W.I.H. and B.A.S.; resources, W.I.H., M.S.A.-R., B.A.S., A.L.S., and Y.I.A.A.-Y.; writing—original draft preparation, W.I.H., M.S.A.-R., B.A.S., A.L.S., and Y.I.A.A.-Y.; writing—review and editing, Y.I.A.A.-Y., W.I.H., and R.A.A.-A.; visualization, Y.I.A.A.-Y. and R.A.A.-A.

## Funding

This research received no external funding.

## Conflicts of Interest

The authors declare no conflict of interest.

## References

- Eltawila, M.A.; Zhao, Z. MPPT techniques for photovoltaic applications. Renew. Sustain. Energy Rev.
**2013**, 25, 793–813. [Google Scholar] [CrossRef] - Schwingshackl, C.; Petitta, M.; Wagner, J.E.; Belluardo, G.; Moser, D.; Castelli, M.; Zebisch, M.; Tetzlaff, A. Wind effect on PV module temperature: Analysis of different techniques for an accurate estimation. Energy Proc.
**2013**, 40, 77–86. [Google Scholar] [CrossRef] - Rivera, E.I.O.; Peng, F.Z. Algorithms to estimate the temperature and effective irradiance level over a photovoltaic module using the fixed point theorem. In Proceedings of the IEEE Annual Power Electronics Specialists Conference, Jeju, Korea, 18–22 June 2006; pp. 2911–2912. [Google Scholar]
- Tiwari, G.N.; Tiwari, A.S. Handbook of Solar Energy Theory Analysis and Applications; Springer Science+Business Media: Singapore, 2017. [Google Scholar]
- Kalogirou, S.A. Solar Energy Engineering Processes and Systems, 2nd ed.; Elsevier Inc.: Amsterdam, The Netherlands, 2009; pp. 1–815. [Google Scholar]
- Mubarak, R.; Hofmann, M.; Riechelmann, S.; Seckmeyer, G. Comparison of modelled and measured tilted solar irradiance for photovoltaic applications. Energies
**2017**, 10, 1688. [Google Scholar] [CrossRef] - Marzouq, M.; El Fadili, H.; Lakhliai, Z.; Zenkouar, K. A review of solar radiation prediction using artificial neural networks. In Proceedings of the IEEE International Conference on Wireless Technologies, Embedded and Intelligent Systems, Fez, Morocco, 19–20 April 2017. [Google Scholar]
- Ciulla, G.; Lo Brano, V.; Franzitta, V.; Trapanese, M. Assessment of the operating temperature of crystalline PV modules based on real use conditions. Int. J. Photoenergy Hindawi Publ. Corp.
**2014**, 2014, 1–11. [Google Scholar] [CrossRef] - Truatmoraka, P.; Waraporn, N.; Suphachotiwatana, D. Water level prediction model using back propagation neural network. In Proceedings of the IEEE 4th International Symposium on Computational and Business Intelligence, Olten, Switzerland, 5–7 September 2016. [Google Scholar]
- Aitkenhead, M.; Aitkenhead-Peterson, J.A.; McDowell, W.H.; Smart, R.P.; Cresser, M.S. Modelling DOC export from watersheds in Scotland using neural networks. Comput. Geoscis.
**2007**, 33, 423–436. [Google Scholar] [CrossRef] - Jinming, Z.; Yi, H.; Sung-Sau, S. Overview of artificial neural networks. Ser. Methods Mol. Biol. Springer
**2009**, 458, 14–22. [Google Scholar] - Hameed, W.I.; Kadhim, A.S.; Al-Thuwaynee, A.A.K. Field weakening control of a separately excited DC motor using neural network optimized by social spider algorithm. Eng. J. Sci. Res. Publ. Inc.
**2016**, 8, 1–10. [Google Scholar] - Burns, R.S. Advanced Control Engineering; Elsevier Ltd.: Gurugram, India, 2001; pp. 1–464. [Google Scholar]
- Saleh, A.L.; Obaid, B.A.; Obed, A.A. Motion control of linear induction motor based on optimal recurrent wavelet neural network-PID controller. Int. J. Eng. Technol.
**2018**, 7, 2028–2034. [Google Scholar] [CrossRef] - Sumathi, S.L.; Surekha, K.A.P. Solar PV and Wind Energy Conversion Systems An Introduction to Theory, Modeling with MATLAB/SIMULINK, and the Role of Soft Computing Techniques; Springer International Publishing: Cham, Switzerland, 2016; pp. 1–790. [Google Scholar]
- Jazayeri, M.; Uysal, S.; Jazayeri, K. A simple matlab/SIMULINK simulation for PV modules based on one-diode model. In Proceedings of the IEEE High Capacity Optical Networks and Emerging/Enabling Technologies Conference, Magosa, Cyprus, 11–13 December 2013. [Google Scholar]
- Ortiz-Rivera, E.; Peng, F.Z. Analytical model for a photovoltaic module using the electrical characteristics provided by the manufacturer data sheet. In Proceedings of the IEEE 36th Power Electronics Specialists Conference, Recife, Brazil, 16 June 2005; pp. 2087–2091. [Google Scholar]
- Skoplaki, E.; Palyvos, J.A. On the temperature dependence of photovoltaic module electrical performance: A review of efficiency/power correlations. Sol. Energy Elsevier
**2009**, 8, 614–624. [Google Scholar] [CrossRef] - Hameed, W.I.; Saleh, A.L.; Sawadi, B.A.; Al-Yasir, Y.I.; Abd-Alhameed, R.A. Maximum power point tracking for photovoltaic system by using fuzzy neural network. Inventions
**2019**, 4, 33. [Google Scholar] [CrossRef] - Gil-Antonio, L.; Saldivar, B.; Portillo-Rodríguez, O.; Ávila-Vilchis, J.C.; Martínez-Rodríguez, P.R.; Martínez-Méndez, R. Flatness-based control for the maximum power point tracking in a photovoltaic system. Energies
**2019**, 12, 1843. [Google Scholar] [CrossRef]

**Figure 1.**Photo of a pyranometer [6].

Data No. | V_{oc} (V) | I_{sc} (A) | G (W/m^{2}) |
---|---|---|---|

1 | 24 | 3 | 1000 |

2 | 23.7 | 2.44 | 800 |

3 | 23.4 | 1.8 | 600 |

4 | 22.8 | 1.22 | 400 |

5 | 22 | 0.6 | 200 |

6 | 21.2 | 3.1 | 1000 |

7 | 20.9 | 2.48 | 800 |

8 | 20.5 | 1.86 | 600 |

9 | 19.9 | 1.24 | 400 |

10 | 18.8 | 0.6 | 200 |

11 | 18.3 | 3.1 | 1000 |

12 | 17.9 | 2.5 | 800 |

13 | 17.5 | 1.88 | 600 |

14 | 16.9 | 1.25 | 400 |

15 | 16 | 0.6 | 200 |

W_{ji} | −0.1502 | −3.9070 | |||

51.4654 | −155.6956 | ||||

45.7296 | −51.6981 | ||||

−4.3849 | 7.0656 | ||||

79.0253 | −123.8607 | ||||

b_{j} | 12.7440 | ||||

34.1014 | |||||

20.4454 | |||||

2.8674 | |||||

32.3323 | |||||

W_{o} | −8.3171 | −0.2174 | 0.0757 | −0.0026 | −0.2278 |

b_{o} | 9.0913 |

Day/Month | Time | Measured V_{oc} (V) | Measured I_{sc} (A) | PV Module Temp. °C | Irradiance Estimated Using Equation (9) (W/m^{2}) | Irradiance Estimated Using ANN (W/m^{2}) | Weather State |
---|---|---|---|---|---|---|---|

14/11 | 11:00 A.M. | 20.5 | 1.1 | 27 | 355 | 369 | cold–cloudy |

11:30 A.M. | 20.38 | 0.706 | 26.5 | 226 | 255 | ||

18/11 | 10:10 A.M. | 21.3 | 1.64 | 25 | 529 | 535 | cold–sunny |

11:55 A.M. | 20.9 | 1.8 | 30 | 581 | 587 | ||

02:00 P.M. | 20.7 | 1.27 | 29 | 410 | 416 | ||

21/11 | 09:30 A.M. | 21.3 | 1.36 | 21.7 | 439 | 461 | cold–sunny |

11:45 A.M. | 20.9 | 1.75 | 29.5 | 564 | 570 | ||

12:45 P.M. | 20.6 | 1.6 | 31.7 | 516 | 525 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).