1 Introduction

Photovoltaic (PV) systems convert the radiation coming from the Sun to the Earth’s surface into electricity. Nowadays, PV systems are popular because they are pollution free, noise-free, reliable and durable. Due to global climate change, declining costs and financial incentives by governments for PV systems, the tendency of integrating photovoltaic systems into the grid has increased in the last decades. The high penetration of energy from PV systems makes smart grid management more challenging.

PV power generation depends upon meteorological conditions. When the weather is sunny, the power generated by the PV system is high; when the weather is partly cloudy or cloudy, it is low. Therefore, PV power generation is uncertain, intermittent and variable. In order to manage the uncertain and variable power generation by PV systems, PV power forecasts are used by grid operators for smart grid management. Transmission system operators also use PV power forecasts for grid maintenance scheduling. In this research, our motivation is to use PV power forecasts for energy monitoring and management for residential grid connected PV systems. The paper is divided into ten sections.

We have developed a daily PV power forecast model for monitoring and managing residential grid connected PV systems considering limitations of feed in tariff. In Germany, public funding of feed in tariffs for PV system is going to be decreased in the next few years. Photovoltaic systems will not be allowed to feed in more than 70% of their maximum power generation. This limit is even lower for PV systems with batteries. The main objectives of this policy are to ensure grid stability and to promote self-consumption of energy produced by grid connected PV systems. To achieve this on days when the power generation will exceed the feed-in limitation, a controller shall be able to adjust and shift residential loads and manage battery charging based on the day ahead PV power forecast. For this reason, it is necessary to have an accurate and reliable PV yield prediction over at least 24 hours.

In Section 2, state of the art PV yield prediction methodology is reviewed. In Section 3, the new PV yield prediction methodology is proposed. The measures of accuracy used for evaluation and verification of the PV power global horizontal irradiance forecast are presented in Section 4. The meteorological data from Deustcher Wetterdienst used for forecasting the PV power and irradiance are discussed in Section 5. In Section 6, an irradiance forecast model based on neural network technology is presented. Feed forward neural network architecture is presented in Section 7. In Section 8, a PV model is presented which is used to convert an irradiance forecast into a PV power forecast. In Section 9, irradiance forecast and PV power forecast results and figures are presented. Finally, Section 10 concludes this paper.

2 State of the art photovoltaic yield prediction review

Solar irradiance forecasts are important for solar resource assesment and management of energy demand. To encourage the solar forecasting development suitable for smart grid technologies and renewable integration, the Global Energy Forecasting Competition (GEFCom) was conducted by a team led by Dr. Tao Hong in 2012 and 2014 [1]. The techniques presented in these competitions were based on probabilistic forecasting. In this research, we present an artificial neural network (ANN) for forecasting irradiance, and particularly global horizontal irradiance. The reason for using an ANN is that they can learn meteorological conditions from the historic meteorological data and have better accuracy compared to conventional forecasting techniques. ANNs can determine the complex relationships among the dependent and independent variables and have the ability to solve nonlinear problems. But before presenting the methodology proposed for the irradiance forecast model, we outline the research done so far for forecasting irradiance using neural network approaches.

In [2] the authors used the air temperature and relative humidity as predictors for daily forecasting of the irradiance in (\(\mathrm {kWh/m^2/day}\)) for Saudi Arabia using a feed forward neural network. They used four years of historic meteorological data (1998–2002) for training the network using the back propagation algorithm. The forecast model predicted the dayly irradiance with an absolute percentage error of 4.49%, but it lacked the ability to model the day ahead irradiance profile. Moreover, the model was not tested for the entire year because only 240 days in the year 2002 were used for testing.

In [3] the authors proposed a the nonlinear auto-regressive neural network for predicting the irradiance at Sepang. They set the training sample size to 80%, validation sample size to 10% and testing sample size to 10% of one-year of historical global horizontal irradiance data. The number of neurons was set to 20 in the hidden layer and there were 20 delays on the predictor side. They achieved normalized mean square error of \(16.51 \times 10^{-3}\) in Jan-March, \(5.871\times 10^{-3}\) in Apr-Jun, \(18.24\times 10^{-3}\) in Jul-Sep and \(9.12\times 10^{-3}\) in Oct-Dec.

Kardaskos and Alexiadis [4] proposed two seasonal auto-regressive integrated moving average (SARIMA) models and two artificial neural network models with multiple inputs for forecasting the photovoltaic power at different PV power plants in Greece. Two SARIMA models were compared with the persistence forecast model: a SARIMA model with an exogenous factor predicted the PV power with yearly normalized root mean square error of 12.89%, an improvement of approximately 1% over the SARIMA model without the exogenous factor 13.71%. Neural Network models gave significantly better accuracy with normalized root mean square error of 11.42% and 11.24%. The SARIMA model and neural network model that use solar radiation forecasts as input performed better than other SARIMA and neural network models.

In [5] the author presented a multi-regression technique and an Elman backpropagation neural network for the prediction of PV power for various locations in Italy. One year’s data of the PV plant are used for forecasting. Three neural network models were discussed based on different input vectors. The neural network model that includes several meteorological parameters (ambient temperature, module temperature, irradiance at tilt angles of 3 and 15) and PV power as inputs has a lower normalized root mean square error (NRMSE) of 23.99% compared to the other models using fewer weather parameters as inputs (\(\hbox {NRMSE}=25.05\%\) and \(\hbox {NRMSE}=24.33\%\)).

Mohana Alanazi and Amin Khodaei [6] suggested a nonlinear autoregressive neural network with external inputs for the prediction of irradiance. They used 15 years of meterological data, historical global horizontal irradiance data and clear sky irradiance data for training the neural network. Their forecast model achieved a mean absolute percentage error (MAPE) of 9.9%.

Adel Mellit and Massi Pavan [7] suggested mean daily irradiance, mean daily air temperature and day of the month as important predictors for day ahead irradiance forecasting in Trieste, Italy. The model achieved a correlation coefficient greater than 98% for sunny days and less than 95% for cloudy days. The author suggests the usage of genetic algorithms in future research for multilayer perceptron forecasts, as this model is slow for forecasting the irradiance.

Alzaharni [8] implemented a nonlinear autoregressive exogenous (NARX) model with external inputs for forecasting the global solar radiation using meteorological parameters. The data from 1991 to 2005 for Vichy National Airport in Rolla was used. The model achieved a mean square error ranging from 5.7% to 15.33%.

Christophe Paoli and his team [9] demonstrated that their artificial neural network model outperforms ARIMA, Bayesian interference, Markov chains, and K-Nearest Neighbors methods. They utilized 19 years of meteorological station data of Ajaccio for the implementation of their simulator.

M.E El-Hawary and his students [10] performed a comparison to determine the selection of predictors (meteorological variables) for their neural network model. Historical data from the Solar Village in Riyadh between 2007 and 2010 were used to examine the influence of seven weather variables. The neural network models achieved accuracies ranging from 3% to 10% depending on the combination of predictors such as ambient temperature, pressure, relative humidity, cloudiness, wind speed and wind direction.

Watetakarn [11] presented a forecast of solar irradiation using a feed forward neural network. The inputs to the neural network are one week of historical irradiation data and the average values of weather parameters such as temperature, humidity, rainfall, and average cloud coverage for Thailand. The model achieved mean absolute percentage errors ranging from 3% to 6% for the day ahead prediction.

In research described above, only meteorological data is used for training and testing the neural network forecast models and a single neural network is designed and trained with the meteorological data. Moreover, some researchers used more than five years of meteorological data for training the neural network. Large meteorological data sets are usually unavailable. In this research, the proposed model uses only five years of meteorological data for training the neural network. Due to training with a relatively small meteorological data set, multiple feed-forward neural network models are proposed to avoid the over fitting problem. Moreover, the proposed neural network model also includes three more predictors for forecasting the irradiation: the sun’s zenith angle, azimuth angle, and extraterrestrial irradiation apart from the meteorological data.

3 PV yield prediction methodology

The methodology proposed for predicting the yield of the grid-connected photovoltaic system is shown in Fig. 1. The forecasting of the PV power starts with the prediction of global horizontal irradiance (GHI) and direct irradiance (DI), which are based on a machine learning technique. In this research, two forecast models for irradiation are presented: a irradiance forecast model based on artificial neural networks (multiple feed-forward networks using historical meteorological data and weather forecast data) and another persistence irradiance forecast model. The latter is used as reference forecast model for evaluation and verification of the irradiance forecast based on artificial neural networks. The persistence forecast assumes that the conditions remain as they were the day before [12].

After forecasting the global horizontal irradiance and direct irradiance, a PV irradiance model based on the Hay & Davies model (discussed in Section 9.3) computes the tilted global irradiance. Then we compute global irradiance absorbed by the PV panel. The absorbed irradiance, ambient temperature and wind speed are the inputs for a model which predicts the PV module temperature. A photovoltaic electric model based on the five parameters single diode model computes the DC power generated by the PV panel according to the panel orientation and PV system specifications. Finally, the photovoltaic DC power forecast is obtained.

Fig. 1
figure 1

Photovoltaic yield prediction methodology

4 Measures of forecast accuracy

In this section, we describe the parameters used for the evaluation of the forecasts. We use mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE), correlation coefficient and skill score for analyzing the accuracy of the global solar irradiance and PV power forecasts.

Let \(y_i\) be the target time series and \(\widehat{y_i}\) be the forecast time series for a day ahead hourly forecast (\(N=24\)).

$$\begin{aligned} MAE=\, & {} \frac{\sum \limits _{i=1}^N |y_i-\widehat{y_i}|}{N} \end{aligned}$$
(1)
$$\begin{aligned} MAPE=\, & {} \frac{\sum \limits _{i=1}^N |y_i-\widehat{y_i}|}{N} \times 100\% \end{aligned}$$
(2)

Smaller values of the MAE and MAPE indicate better forecast accuracy.

$$\begin{aligned} RMSE=\sqrt{\frac{\sum \limits _{i=1}^N \Big (y_i-\widehat{y_i}\Big )^{2}}{N}} \end{aligned}$$
(3)

Smaller values of RMSE indicate that the forecast is a closer approximation of the measured value.

$$\begin{aligned} R= \frac{\sum \limits _{i=1}^N \Big (y_i-\overline{y}\Big )\Big (\widehat{y_i}-\overline{\widehat{y}}\Big )}{\sqrt{\sum \limits _{i=1}^N \Big (y_i-\overline{y}\Big )^2\sum \limits _{i=1}^N\Big (\widehat{y_i}-\overline{\widehat{y}}\Big )^2}} \end{aligned}$$
(4)

The correlation coefficient is defined in the range \(-1 \le R \le 1\) as:

  1. 1)

    If \(R = -1\), then there is a perfect negative linear relationship between \(y_i\) and \(\widehat{y_i}\).

  2. 2)

    If \(R = 1\), then there is a perfect positive linear relationship between \(y_i\) and \(\widehat{y_i}\).

  3. 3)

    If \(R = 0\), then there is no linear relationship between \(y_i\) and \(\widehat{y_i}\).

5 Deutscher Wetterdienst (DWD) weather stations

The numerical weather prediction (NWP) forecast of meteorological variables could be used as input to the PV model for PV power prediction, but numerical weather prediction methods are computationally expensive and only a few institutes have this facility. The main idea behind a solar irradiance forecast based on artificial neural network is that they are less computationally expensive compared to NWP methods. Also we could forecast solar resource using open source historical solar irradiance data and meteorological data from the German Weather services (Deutscher Wetterdienst (DWD)). At this first stage of research, an irradiance forecast model for the Stuttgart weather station is examined; the analysis of more areas is planned using interpolation and advanced machine learning techniques. In this research, we use meterological data from the DWD. The meterological data are in the public domain and can be downloaded [13]. The irradiance data are available in hourly, daily, monthly and yearly resolution for 56 weather stations in Germany. In addition, data for other meterological parameters e.g. temperature, pressure, cloudiness, also available for different weather stations. Hourly meterological data of variables such as temperature, pressure, relative humidity, wind speed, wind direction, sunshine duration and cloudiness from the Germany Weather Station at Stuttgart are used for training and testing the neural network for forecasting solar irradiance.

6 Irradiance neural network forecast model methodology

The six years of weather data (from 2010 to 2015) are first divided into two subsets. The first subset of five years (from 2010 till 2014) is used for the design and training of the neural network. The second data set of one year (year 2015) is used to test the prediction of the neural network.

The inputs of each neural networks are the meteorological parameters such as date number, temperature, pressure, relative humidity, wind speed, wind direction, sunshine duration, cloudiness, azimuth angle, zenith angle and extraterrestrial solar radiation. The variables such as temperature, pressure, relative humidity, wind speed, wind direction, sunshine duration and cloudiness are obtained from DWD weather data.

The zenith angle, azimuth angle and extra-terrestrial radiation values are calculated using the equations presented in the Appendix A.

The data sets are initially pre-processed before feeding to each neural network. In the pre-processing stage, the training data set and test data set are reduced by removing the night time hours because solar radiation at night time is zero. The data sets are then normalized into a range [0, 1] using:

$$\begin{aligned} X_N= \frac{X-X_{\mathrm {min}}}{X_{\mathrm {max}}-X_{\mathrm {min}}} \end{aligned}$$
(5)

The data sets are normalized because artificial neural networks work with data values in the range of \([-1, 1]\). After normalization, the training data are fed into multiple neural networks.

Each neural network is trained with the five years of data. The training algorithm used is Lavenberg Marquardt. After training the 15 neural networks selected for forecasting global solar radiation, each one is applied to the one test data to calculate a prediction. Each Feed Forward network is initialized with random weights and biases and returns a different output with different performance. After training the multiple neural networks they are tested with an unseen test data set. Solar radiation is predicted by taking the average of the outputs of all 15 neural networks. The error for the average output of the multiple neural networks is likely to be small compared to the error of the individual neural networks [14, 15]. The average output is then de-normalized using the equation given below resulting in the values in units of irradiance.

$$\begin{aligned} X= X_N (X_{\mathrm {max}}-X_{\mathrm {min}})+X_{\mathrm {min}} \end{aligned}$$
(6)
Fig. 2
figure 2

Irradiance forecast methodology using multiple feed-forward neural networks

7 Feed forward network architecture

A feed forward neural network has no feedback paths and inputs are processed in the forward direction. For forecasting GHI, we have implemented a three-layer feed forward neural network consisting of an input layer, a hidden layer and an output layer.

7.1 Input layer

An input layer is a passive layer and its function is to transmit the input signals to the hidden layer. The number of neurons in the input layer corresponds to the number of input signals. Here we have used 11 input signals: temperature (T), pressure (P), relative humidity (RH), cloudiness (CC), sunshine duration (SS), wind speed (WS), wind direction (WD), zenith angle (ZA), azimuth angle (AA), extra-terrestrial irradiance (E) and date number (DN), a numerical representation of the timestamp.

7.2 Hidden layer

The hidden layer is active and the number of neurons in the hidden layer is arbitrary. The hidden layer is important because it performs the necessary signal modification: the weights and biases of the neurons in the hidden layer are modified during the training to achieve the desired performance. The activation function used in the hidden layer is log-sigmoid function due to its differentiated nature.

7.3 Output layer

The output layer is also active in its nature and the neurons in the output layer correspond to the number of outputs.The function used in the output layer is the linear function. Output in our case is the global horizontal irradiance (GHI).

8 Photovoltaic model

In this section, we describe the photovoltaic model developed in MATLAB. It is composed of three parts: the photovoltaic irradiance model, the photovoltaic temperature model and the photovoltaic electric model.

8.1 Photovoltaic irradiance model

The photovoltaic irradiance model consists of two parts. The first part computes the amount of global irradiance incident on the tilted PV module, the second part computes the amount of the global irradiance absorbed by the PV module.

8.1.1 Global irradiance on the tilted PV module

We can compute the amount of global irradiance incident on the tilted PV module using the Hay & Davies model [16]. The meterological data usually includes the global irradiance on a horizontal surface. This is the sum of direct and the diffuse irradiance. The idea is to convert the global irradiance on the horizontal surface into tilted irradiance values based on the tilt of the PV panel. We present the irradiance model for an isotropic and an ansisotropic sky. The isotropic sky model assumes a uniform distribution of diffuse irradiance from the sky. For an isotropic sky model, global irradiance on the tilted surface is defined in [17] by the equation below with g represents global, d represents direct, df represents diffuse, r represents reflected, t represents tilted, gr represents ground.

$$\begin{aligned} G_{\mathrm {g,t}}=G_{\mathrm {d,t}}+G_{\mathrm {df,t}}+G_{\mathrm {r,t}} \end{aligned}$$
(7)

For an anisotropic sky model, the global irradiance on the tilted surface is given in [17, 18] by:

$$\begin{aligned} G_{\mathrm {g,t}}=G_{\mathrm {d,t}}+G_{\mathrm {aniso,d,t}}+G_{\mathrm {r,t}} \end{aligned}$$
(8)

The beam irradiance on the tilted surface can be expressed in [17] as:

$$\begin{aligned} G_{\mathrm {d,t}}=R_{\mathrm {d}}G_{\mathrm {d,t}} \end{aligned}$$
(9)

where \(R_{\mathrm {d}}\) is the geometric factor, defined in [17] as:

$$\begin{aligned} R_{\mathrm {d}}=\frac{\cos {\varTheta }}{\cos {\varTheta _{\mathrm {z}}} } \end{aligned}$$
(10)

where \(\varTheta\) is the incidence angle and \(\varTheta _{\mathrm {z}}\) is the zenith angle. The incidence angle can be calculated by using the equation in [19] below.

$$\begin{aligned} \cos {\varTheta }=\cos {\varTheta _{\mathrm {z}}}\cos {\beta }+\sin {\varTheta _{\mathrm {z}}}\sin {\beta }+\cos {(\gamma -\gamma _{s})} \end{aligned}$$
(11)

where \(\beta\) is the tilt angle; \(\gamma\) is the azimuth angle of the sun and \(\gamma _{s}\) is the PV panel azimuth angle. The diffuse irradiance on the tilted surface in [17] is given by the expression:

$$\begin{aligned} G_{\mathrm {df,t}}=R_{\mathrm {df}}G_{\mathrm {df,horizontal}} \end{aligned}$$
(12)

where the geometric factor \(R_{\mathrm {df}}\) is defined in [17] by:

$$\begin{aligned} R_{\mathrm {df}}= \frac{1}{2}(1+\cos {\beta }) \end{aligned}$$
(13)

For an anisotropic sky model, the geometric factor of the diffused irradiance on the tilted surface is slightly modified and is defined in [17] as:

$$\begin{aligned} R_{\mathrm {aniso,df}}=\frac{1}{2} (1-A_{i}) (1+\cos {\beta })+A_{i} R_{\mathrm {d}} \end{aligned}$$
(14)

where \(A_{i}\) is an anisotropic index, which is a function of transmittance of the atmosphere for the beam radiation and is defined in [17] as:

$$\begin{aligned} A_{i}=\frac{G_{\mathrm {d,horizontal}}}{G_{\mathrm {ext}}\cos {\varTheta _{\mathrm {z}}} } \end{aligned}$$
(15)

The reflected irradiance from the ground can be calculated in [17] by:

$$\begin{aligned} {G_{\mathrm {gr,t}}}={R_{\mathrm {gr}}} {\rho _{\mathrm g}} {G_{\mathrm {g,horizontal}}} \end{aligned}$$
(16)

where \(R_{\mathrm {gr}}\) is a geometric factor and is defined in [17] by the equation below and \(\rho _{\mathrm g}\) is the Albedo coefficient.

$$\begin{aligned} R_{\mathrm {gr}}= \frac{1}{2}(1-\cos {\beta }) \end{aligned}$$
(17)

8.1.2 Global irradiance absorbed by the tilted PV module

The output power of the photovoltaic system depends directly on the amount of tilted global irradiance absorbed by the surface which is a function of the incident tilted global irradiance, air mass and angle of incidence [20].

We can approximate the amount of the irradiance absorbed by the photovoltaic module by (as shown in [20]):

$$\begin{aligned} G_{\mathrm {absorbed}}=G_{\mathrm {d,t}}(\tau \alpha )+G_{\mathrm {df,t}}(\tau \alpha )+G_{\mathrm {g,t}}( \tau \alpha ) \end{aligned}$$
(18)

where α is transmittance absorption product. The transmittance-absorption product is based on Snell’s law, Fresnel’s law and Boughers’s law (compare to [20]):

$$\tau \alpha (\theta ) = {{\rm{e}}^{ - \left( {\frac{{KL}}{{\cos {\theta _{\rm{r}}}}}} \right)}}\left[ {1 - \frac{1}{2}\left( {\frac{{{{\sin }^2}\left( {{\theta _{\rm{r}}} + {\theta _{\rm{i}}}} \right)}}{{{{\sin }^2}\left( {{\theta _{\rm{r}}} + {\theta _{\rm{i}}}} \right)}} + \frac{{{{\tan }^2}\left( {{\theta _{\rm{r}}} + {\theta _{\rm{i}}}} \right)}}{{{{\tan }^2}\left( {{\theta _{\rm{r}}} + {\theta _{\rm{i}}}} \right)}}} \right)} \right]$$
(19)

where \(\theta _{\mathrm r}\) is the refraction angle; \(\theta _{\mathrm i}\) is the incidence angle and is computed for direct, diffuse and reflected radiation; K is the glazing extinction coefficient and L is the glazing thickness. For most PV systems \(K=4m^{-1}\) and \(L=2mm\) are used.

For direct irradiance, the incidence angle \(\theta _{\mathrm {i,d}}\) is computed using (11):

$$\begin{aligned} \theta _{\mathrm {i,d}}=\arccos {(\cos {\alpha }\cos {(\gamma _{\mathrm {sun}}-\gamma _{p})}\sin {\beta }+\sin {\alpha }\cos {\beta })} \end{aligned}$$
(20)

where γsun is the azimuth angle of the sun and γ p is the azimuth angle of the panel. For diffused irradiance (isotropic sky is assumed), the incidence angle is computed in [20] using:

$$\begin{aligned} \theta _{\mathrm {i,df}}=59.7-0.1388\beta +0.001497\beta ^{2} \end{aligned}$$
(21)

For reflected irradiance (isotropic sky is assumed), the incidence angle is calculated in [20] in accordance to:

$$\begin{aligned} \theta _{\mathrm {i,r}}=90-0.5788\beta +0.002693\beta ^{2} \end{aligned}$$
(22)

The refraction angle for the direct, diffuse and reflected irradiance is given in [20] by:

$${\theta _{{\mathrm r}}}= \arcsin \left( \frac{n_2 \sin \theta _2}{n_1}\right)$$
(23)

where \(n_1\) is the refractive index of the air and \(n_2\) is the refractive index of the PV glazing.

8.2 Photovoltaic temperature model

Photovoltaic module efficiency and performance depends, besides other effects, on the temperature of the module/cell. The photovoltaic cell temperature changes during operation either due to changes in the ambient temperature \((T_{\mathrm {amb}})\) or due to the radiation absorbed by the PV module [21, 22].

The PV module temperature \((T_{\mathrm {Module}})\) can be calculated by using the ambient temperature for any type of PV array mounting [23]:

$$\begin{aligned} T_{\mathrm {Module}}=T_{\mathrm {amb}}+\omega \left( \frac{0.32G}{8.91+2.0\frac{v_w}{0.67}}\right) \end{aligned}$$
(24)

The reason for using (24) for modeling the PV module temperature is that it is a preferred model for size optimization, simulation and design of PV systems [24].

8.3 Photovoltaic electric model

The power produced by the photovoltaic module is a function of the irradiance absorbed by the PV module and PV module temperature. The irradiance absorbed by the PV module is obtained from the photovoltaic irradiance model. The PV temperature model accounts for the variation in the PV module temperature due to changes in the ambient temperature and the amount of the global irradiance absorbed by the PV module. A PV electric model is based on a single diode model of the solar cell [20, 25].

Fig. 3
figure 3

Single diode model

The equivalent circuit consists of a current source (\(I_{\mathrm {ph}}\)) dependent upon the absorbed irradiance \(G_{\mathrm {absorbed}}\), which is in parallel with the diode \(\mathrm D\). The series resistance (\(R_{\mathrm {series}}\)) is due to resistance between metal contacts and silicon. The shunt resistance (\(R_{\mathrm {shunt}}\)) is due to defects created in the PV module during the manufacturing. The equation of the one diode model for the current \(\mathrm {I}\) is given in [20] by:

$$I=\left( {I_{\mathrm {ph}}}+{I_{\mathrm o}}\left( \exp {\left( \frac{V_{\mathrm {diode}}}{V_{\mathrm t}}\right) }-1\right) - \frac{V_{\mathrm {diode}}}{R_{\mathrm {shunt}}}\right)$$
(25)

where \(I_\mathrm o\) is the reverse saturation current of the diode, the diode thermal voltage.

The photocurrent \(I_{\mathrm {ph}}\) is given in [20] by:

$$\begin{aligned} I_{\mathrm {ph}}=\frac{G_{\mathrm {absorbed}}}{G_{\mathrm {ref}}}\left( I_{\mathrm {ph,ref}}+ \mu _{\mathrm {SC}} \left( T_{\mathrm {amb}}-T_{\mathrm {ref}}\right) \right) \end{aligned}$$
(26)

where \(T_{\mathrm {amb}}\) is the ambient temperature; \(I_{\mathrm {ph,ref}}\) is the photo-current at standard test conditions and \(T_{\mathrm {ref}}\) is the temperature at standard test conditions (STC) which is \(25\mathrm {^{\circ }C}\); \(G_{\mathrm {ref}}\) is the reference irradiance at STC, 1000 \(\mathrm {W/m^2}\); \(G_{\mathrm {absorbed}}\) is the irradiation absorbed at the surface and \(\mu _{\mathrm {SC}}\) is the relative temperature coefficient of the short-circuit current, which represents the rate of change of the short-circuit current with respect to temperature.

The equation for the saturation current \(I_\mathrm o\) is therefore given in [20] by:

$$\frac{{{I_{\rm{o}}}}}{{{I_{{\rm{o}},{\rm{ref}}}}}} = {\left[ {\frac{{{T_{{\rm{amb}}}}}}{{{T_{{\rm{ref}}}}}}} \right]^3}\exp \left[ {\frac{1}{k}\left( {\frac{{{E_{{\rm{g}},{\rm{ref}}}}}}{{{T_{{\rm{ref}}}}}} - \frac{{{E_{\rm g}}}}{{{T_{{\rm{amb}}}}}}} \right)} \right]$$
(27)

where \(I_{\mathrm {o,ref}}\) represents the reference diode reverse saturation current; \(E_{\mathrm {g,ref}}\) is the reference band gap energy and k is the Boltzman constant \((k=1.38\times 10^{-23}\mathrm {m^2kgs^{-2} K^{-1}})\). The values of the reference diode reverse saturation current and reference band gap energy can be obtained from PV panel data sheets. The band gap energy is given in [20] by the expression:

$$\frac{{{E_{\rm{g}}}}}{{{E_{{\rm{g}},{\rm{ref}}}}}} = 1 - 0.0002677\left( {T - {T_{{\rm{ref}}}}} \right)$$
(28)

One way of calulating the current I of the one diode model is to solve the equation numerically using the Newton’s method. \(I_{h+1}\) is the approximate solution of \(f(I_{h})=0\) and if \(f'(I_{h})\ne 0\) then the next approximation is given by:

$$\begin{aligned} I_{h+1}=I_{h}-\frac{f(I_{h})}{f '(I_{h})} \end{aligned}$$
(29)

Another way is to use the voltage over the diode, \(V_{\mathrm {diode}}\). For the results presented here we have used the second method for calulating the current I. The shunt resistance \(R_{\mathrm {shunt}}\) at operating conditions is given in [20] by:

$$\begin{aligned} R_{\mathrm {shunt}}= \frac{G_{\mathrm {absorbed}}}{G_{\mathrm {ref}}} R_{\mathrm {shunt,ref}} \end{aligned}$$
(30)

where \(R_{\mathrm {shunt,ref}}\) is the shunt resistance at STC. The series resistance is assumed to be independent of temperature and irradiation at both operating conditions and STC [20]:

$$\begin{aligned} R_{\mathrm {series}}= R_{\mathrm {series,ref}} \end{aligned}$$
(31)

The values of the series resistance \(R_{\mathrm {series,ref}}\) and shunt resistance \(R_{\mathrm {shunt,ref}}\) for different PV panels are obtained from a Bosch PV Panel database.

$$\begin{aligned} V= V_{\mathrm {diode}}-I R_{\mathrm {series}} \end{aligned}$$
(32)

Let \(N_\mathrm p\) be the number of PV modules in a string and \(N_\mathrm s\) be the number of the strings in the PV array, then the power of the PV array (\(P_{\mathrm {PV,DC}}\)) is calculated under the assumption of no mismatch and shading effects as follows:

$$\begin{aligned} I_{\mathrm {PV,DC}}=\, & {} I N_{\mathrm s} \end{aligned}$$
(33)
$$\begin{aligned} V_{\mathrm {PV,DC}}=\, & {} V N_{\mathrm p} \end{aligned}$$
(34)
$$\begin{aligned} P_{\mathrm {PV,DC}}=\, & {} V_{\mathrm {PV,DC}} I_{\mathrm {PV,DC}} \end{aligned}$$
(35)

A maximum power point tracker is usually used to ensure that the PV panels operate close to their the maximum power point. The maximum power point of the array is defined here as:

$$\begin{aligned} P_{\mathrm {MPP,PV}}= \mathrm {max}(P_{\mathrm {PV,DC}}) \end{aligned}$$
(36)

If we assume the constant efficiency of the PV panels, then the power can be computed using the equation in [26] given below:

$$\begin{aligned} P_{\mathrm {PV,DC}}=\eta _{\mathrm {PV}} G_{\mathrm {absorbed}}\left( 1-\beta _{\mathrm {PV}}\left( T_{\mathrm {Mod}}-T_{\mathrm {ref}}\right) \right) \end{aligned}$$
(37)

where \(\eta _{\mathrm {PV}}\) is the PV module efficiency; \(A_{\mathrm {PV}}\) is the PV module surface area and \(\beta _{\mathrm {PV}}\) is the temperature coefficient for the power of the PV panel.

9 Irradiance forecast and photovoltaic power forecast results

In this section we present global horizontal irradiance (GHI) and photovoltaic forecast results respectively. The irradiance forecast is converted into a PV power forecast using the PV model as explained in the section above.

9.1 Global horizontal irradiance forecast

The global horizontal irradiance forecast is obtained by averaging the output of the 15 feed-forward neural networks trained with five years of meteorological data. Each feed forward neural network has 3 layers with 11 meteorological parameters as inputs. In this section, we compare the global horizontal irradiance (GHI) forecast based on networks with a persistence forecast (as shown in Fig. 2).

Table 1 Accuracy comparison of global horizontal irradiance(GHI) forecast models under different day types for Stuttgart

Table 1 shows the accuracy comparison of the GHI neural network forecast model compared to the GHI persistence forecast model several meteorological conditions (days types). The type of the day is classified by cloudiness: clear sky, partly cloudy and cloudy. The GHI neural network forecast model has much better accuracy in all day types in comparison to the GHI persistence model. The regression values of the GHI persistence model are moderate but it has much higher mean absolute errors and root mean squared error values. Overall, the GHI neural network forecast model has strong regression values in comparison to GHI persistence forecast model (as shown in Fig. 3) [20].

Fig. 4
figure 4

A comparison between global horizontal irradiance (GHI) neural network forecast, persistence forecast and measured global horizontal irradiance (GHI) on clear sky day (day of the \(\hbox {year}=191\))

Figure 4 shows that the GHI neural network forecast on a clear sky day is quite accurate and is in line with the measured GHI profile, whereas the GHI persistence forecast underestimates the GHI.

Figure 5 shows the GHI forecast based on the neural network during a partly cloudy day. It can be seen that the measured GHI from DWD data and the predicted GHI are quite congruent compared to the GHI persistence forecast. Figure 6 shows that the measured GHI has lower values on a cloudy day compared to clear sky and partly cloudy days. However the GHI neural network forecast still follows the measured GHI profile more closely in comparison to the GHI persistence forecast. The GHI persistence forecast overestimates the GHI on a cloudy day. The accuracy of the GHI neural network forecast decreases as the weather changes from clear sky to cloudy.

Fig. 5
figure 5

A comparison between global horizontal irradiance (GHI) neural network forecast, persistence forecast and measured global horizontal irradiance (GHI) on a day with a partly cloudy sky (day of the \(\hbox {year}=176\))

Fig. 6
figure 6

A comparison between global horizontal irradiance (GHI) neural network forecast, persistence forecast and measured global horizontal irradiance (GHI) on a day with a cloudy sky (day of the \(\hbox {year}=117\))

9.2 Sensitivity analysis neural network irradiance forecast model

A sensitivity analysis of the global horizontal irradiance neural network forecast model has been performed for different weather variables, solar angles, and extraterrestrial irradiance to determine which are good predictors for forecasting the global horizontal irradiance. In the first case, each weather variable is excluded from the input set, one by one, while all other variables are included and accuracy is computed.

The GHI neural network forecast model is more sensitive to the sunshine variable which is a very important predictor for forecasting GHI, as the accuracy of the model deteriorates if it is not included as input, MAE increases in Fig. 7 when sunshine is excluded. The interquartile range of the MAE box labeled as SS (sunshine not included in the input set) is greater than rest of the boxes and the median value of the MAE box labelled SS is larger than the median values for rest of the box plots.

In another sensitivity test the GHI neural network forecast model is given a different combination of the weather variables as shown in Table 2.

Table 2 Different combinations of weather variables as inputs to irradiance neural network model

As shown in the Fig. 7, the median value of the MAE decreases as wind speed is added to the smallest input set (case 2). MAE decreases further if cloudiness is included as an input (case 4). This shows that temperature, relative humidity, cloudiness and the sunshine are important weather variables for forecasting the GHI. But if all the weather variables are included (case ALL) as input, the median value of the GHI neural network forecast error decreases and the maximum value of the MAE also decreases (as shown in Fig. 8).

Fig. 7
figure 7

Sensitivity analysis of the GHI neural network forecast model for different weather variables

Fig. 8
figure 8

Sensitivity analysis of the GHI neural network forecast model for different combination of weather variables (see Table 2 for the box-labels)

Apart from the weather variables, three more predictors are proposed for forecasting the solar irradiance. As shown in Fig. 9, the MAE decreases if we include extraterrestrial irradiance (case E) in addition to weather data as inputs. The MAE decreases even further if we add azimuth angle (case AZ) and zenith angle (case ZA) in addition to the weather data and extraterrestrial irradiance. Hence, it shows that azimuth angle, zenith angle and extraterrestrial irradiance are important predictors in addition to weather variables.

Fig. 9
figure 9

Sensitivity analysis of the GHI neural network forecast model for different combination of weather variables

9.3 Photovoltaic power forecast

The PV power forecast is obtained after performing the PV simulation using an irradiance forecast obtained from the neural network model. The PV power forecast analysis is performed for different day types and then compared with the PV power persistence forecast. The actual PV power time series is estimated by performing a PV simulation using meteorological data.

Fig. 10 shows that the PV power forecast by the irradiance neural network model follows the estimated PV power on clear sky day whereas the PV power persistence forecast underestimates the PV power.

Fig. 10
figure 10

A comparison between PV power neural network forecast, PV power persistence forecast and target PV power on clear sky day (day of the \(\hbox {year}=191\))

Figure 11 shows that the PV power forecast based on the irradiance neural network model follows the estimated PV power quite accurately in comparison to the persistence PV power forecast.

Fig. 11
figure 11

A comparison between PV power neural network forecast, PV power persistence forecast and target PV power on partly cloudy day (day of the \(\hbox {year}=176\))

Figure 12 shows that on a cloudy day the PV power forecast based on the irradiance neural network model still follows the target PV power accurately compared to the PV power persistence forecast, but the accuracy of the PV power forecast based on the irradiance neural network model decreases as the weather changes from a clear sky to a cloudy day.

Fig. 12
figure 12

A comparison between PV power neural network forecast, PV power persistence forecast and target PV power on cloudy day (day of the \(\hbox {year}=117\))

Table 3 shows that PV DC power forecasts based on the neural network irradiance model are more accurate for all day types, i.e. clear sky, partly cloudy and cloudy, than the PV power persistence forecast. The mean absolute error (MAE) is quite small for the PV power neural network forecast compared to PV power persistence forecast. Also, the PV power neural network forecast has strong regression values on all day types whereas the PV power persistence forecast has modest regression values on clear sky and cloudy days. Moreover, the PV power persistence forecast also has a mean absolute percentage error of more than 50% on a clear sky and cloudy days. Therefore, the PV power persistence forecast could be used as approximate tool, but for an accurate prediction of the PV power the neural network model is the preferred choice.

Table 3 Accuracy comparison PV DC power forecast models under different day types for Stuttgart

10 Conclusion and future work

In this research, we proposed a PV yield prediction system based on multiple feed-forward neural network irradiance forecast models. The PV power forecast based on this system outperforms the PV persistence power forecast model.

The multiple feed-forward models predict the GHI with a mean absolute percentage error of 3% on a sunny day and a mean absolute percentage error of approximately 23% on a cloudy day for Stuttgart. The mean absolute error is analyzed for the entire year and its average is \(25 \,\mathrm {W/m}^2\) for the day ahead forecast horizon. Hence, the GHI forecast based on multiple neural networka is selected for predicting the yield of the PV system. From the sensitivity analysis of the multiple feed-forward neural network GHI forecast model, it can be concluded that apart from weather variables, solar angles (azimuth angle and zenith angle) and extraterrestrial irradiance are possible predictors for forecasting the GHI. It can also be concluded that the GHI neural network forecast model is more sensitive to sunshine, cloudiness and temperature than to other inputs.

PV DC power forecasts are obtained by converting irradiance to power using a PV model. PV power forecasts based on the multiple feed forward irradiance forecast model outperform the PV power persistence forecasts. The PV Power neural network forecast model has a MAPE of 18% to 21% in summer and spring and an overall MAPE of 26%.

Upcoming work is the implementation of a controller that uses the PV power and load forecasts for efficient operational strategies for battery charging and load scheduling.

The proposed irradiance forecast model based on multiple feed-forward neural networks uses five years of historical meteorological data for training the neural networks. Such a large meteorological data set for the location under observation is usually unavailable, so upcoming work includes the development of prediction algorithms capable of handling small data sets. This may use an irradiance forecast model based on other advanced neural network techniques. On the other hand, upcoming work will also include large-data approaches for accurate irradiance prediction development of a hybrid prediction algorithm based on satellite images, historical meteorological data and numerical weather prediction forecast models.