^{1}

^{2}

^{3}

^{2}

^{3}

^{1}

^{2}

^{3}

^{2}

^{2}

^{3}

^{1}

^{2}

^{3}

The intermittence and fluctuation character of solar irradiance places severe limitations on most of its applications. The precise forecast of solar irradiance is the critical factor in predicting the output power of a photovoltaic power generation system. In the present study, Model I-A and Model II-B based on traditional long short-term memory (LSTM) are discussed, and the effects of different parameters are investigated; meanwhile, Model II-AC, Model II-AD, Model II-BC, and Model II-BD based on a novel LSTM-MLP structure with two-branch input are proposed for hour-ahead solar irradiance prediction. Different lagging time parameters and different main input and auxiliary input parameters have been discussed and analyzed. The proposed method is verified on real data over 5 years. The experimental results demonstrate that Model II-BD shows the best performance because it considers the weather information of the next moment, the root mean square error (RMSE) is 62.1618 W/m^{2}, the normalized root mean square error (nRMSE) is 32.2702%, and the forecast skill (FS) is 0.4477. The proposed algorithm is 19.19% more accurate than the backpropagation neural network (BPNN) in terms of RMSE.

Along with the rapid increase of solar power generation, more and more solar power is connected to the grid, which has already shown its substantial economic impact. Based on the statistics of the International Renewable Energy Agency (IRENA), the total installed capacity for PV has reached 205.493 GW in China at the end of 2019 [

Solar forecasting is a timely topic, and several short-term solar irradiance forecasting approaches have been presented recently. Broadly, prediction can be divided into five categories based on forecast methods as follows [

As a novel machine learning tool, LSTM has successful applications in solar irradiance forecasting [

However, the LSTM methods mentioned above do not deeply study the effects of different parameters and structures on experimental results, but these factors will affect the prediction accuracy. In this paper, two different models based on traditional LSTM network are applied, and the effects of various parameters are investigated; meanwhile, four models based on a novel LSTM-MLP structure with two-branch input is proposed. For the new LSTM-MLP model, we use historical irradiance (or historical irradiance and meteorological parameters) as the main input and the meteorological parameters at the current time or the next time as the auxiliary input to predict the irradiance at the next time through the multilayer LSTM-MLP network. Experimental results show that the proposed model can achieve better prediction results.

The main innovations of this study are as follows: (1) An LSTM-MLP structure with two branches, including main input and auxiliary input, is proposed, which can provide a reference for similar models. (2) It is confirmed that the lagging time plays an important role when the input variables of the LSTM model are small. Still, for more input information, it is not that the more the lagging parameters, the higher the accuracy. (3) The meteorological parameters at the next moment play a vital role in the prediction accuracy, which can be gained by the weather forecast.

The organization of this paper is as follows: The methodology is described in detail in Section

In the learning phase, the traditional neural network cannot use the information learned in the previous time step to model the data of the current step. This is the main shortcoming of conventional neural networks. RNNs attempt to solve this problem by using loops that pass information from one step of the network to the next, ensuring the persistence of the information. In other words, the RNNs connect the previous information to the current task. Using previous sequence samples may help to understand the current sample.

The LSTM network, which has the time-varying inputs and targets, is a special RNN and was initially introduced by Hochreiter and Schmidhuber [

A schematic of the LSTM block can be seen in Figure

Detailed schematic of the long short-term memory block.

The model input is denoted as

As previously mentioned, the primary objective of this study is to examine the feasibility of the LSTM network for short-term solar irradiance forecasting and find the optimal structure of the LSTM for the forecast. In this section, firstly, the standard LSTM solar irradiance forecasting pipeline is introduced. Then, a classical LSTM model with two input structures and a novel model with four different input structures were conducted to discuss the performance of the LSTM network.

Figure

The standard LSTM solar irradiance forecasting pipeline.

The structure of the conventional LSTM model (we call it Model I) for solar irradiance forecasting can be seen in Figure

The framework of the traditional LSTM Model I.

Meanwhile, the novel LSTM-MLP structure is proposed in Figure

The framework of the proposed LSTM Model II.

The simplified expression of the above operation is as follows:

As can be seen in Figure

Figure

Input (or main input) time series structure of the train samples.

To assess the prediction performance of the involved models, four error measures, which include the root mean square error (RMSE), the normalized root mean square error (nRMSE), the mean absolute error (MAE), the mean bias error (MBE), and

These indexes can be defined as follows:

Besides, forecast skill (FS) is an indicator that compares a selected model with a reference model (usually with the persistence model), regardless of the prediction horizon and location [

The persistence model is one of the most basic prediction models, which is often applied to compare the performance of other prediction models. The definitions of this model are varied; this paper adopts the most basic definition, which is to assume that the predicted value at the next time is the same as the present value [

To further evaluate the performance of the adopted model compared with the benchmark model, the promoting percentage of RMSE

The data used in this study came from a solar power plant in Denver, Colorado, USA. Average global horizontal irradiance (GHI; in this paper, solar irradiance represents GHI) and meteorological data (such as ambient temperature, relative humidity, wind velocity, atmospheric pressure, precipitation, and so on) have been collected in a one-hour resolution during January 1, 2012, to December 31, 2016, from NREL Solar Radiation Research Laboratory [

Main statistical features of solar irradiance in the dataset.

Samples | Statistical indicator (GHI (W/m^{2})) | |||
---|---|---|---|---|

Number | Max | Mean | Std. | |

All samples | 43824 | 1090 | 188.8933 | 270.6560 |

Training samples | 35040 | 1090 | 187.9399 | 270.3011 |

Testing samples | 8784 | 1050 | 192.6963 | 272.0491 |

Pearson’s correlation coefficient is the test statistics that measures the statistical relationship or association between two continuous variables. The relationship between irradiation and wind speed, atmospheric pressure, air temperature, and relative air humidity was analyzed to determine whether these variables should be included as inputs and which parameters to choose as inputs in this network. Table

Pearson’s

Meteorological parameters | Pearson’s |
---|---|

Wind speed | 0.0053 |

Atmospheric pressure | 0.0429 |

Precipitation | −0.0328 |

Relative air humidity | −0.3044 |

Air temperature | 0.3745 |

Hourly average solar irradiance data for different months in 2016.

Autocorrelation function (ACF) refers to the degree of similarity between time series and their own lag series in a continuous-time interval. However, irradiance is a time-series data, which can be characterized by ACF. Let

From the ACF plot above, we can see that our daily period consists of 24 timesteps (where the ACF has the second-largest positive peak). While it was easily apparent from the natural law, it can also be seen from Figure

ACF plot of hourly solar irradiance. The abscissa represents lag time, and the ordinate represents the autocorrelation coefficient.

The training dataset is optimized by Adam algorithm, and the sigmoid function is used in the output layer for all models. The program code of this paper is performed on an Intel® Core™ I7-8600 CPU using Python 3.7.5 and Keras 2.3.1 with TensorFlow 2.0.0 backend.

In this section, the above six models were simulated and calculated to verify the performance of the proposed method. We discuss the effect of the input length (determined by the lagging time). The forecasting results under different lengths of the input sequence with different models are shown in Tables

For Model I, since it has only one single-branch input, the number of input variables directly affects the prediction accuracy. As can be seen in Table

However, when the historical irradiance and meteorological parameters are input to the LSTM network at the same time, the influence of the lagging time parameters on forecasting accuracy has a significant downward trend. When the lagging time is only one hour, the RMSE of Model I-A is 110.64 W/m^{2}, and the RMSE of Model I-B is 75.4654 W/m^{2}, which shows that when the lagging time is fixed, the information of meteorological parameters helps the prediction of irradiance very well.

As can be seen in Tables

For Model II-AC and Model II-AD, compared with Model I, we add an independent branch with meteorological parameters (C: meteorological parameters at the current time; D: meteorological parameters at the next time) as input, which plays an important role. Comparing the results with Models I-A and II-AC in Tables ^{2} in Model I-A, but the RMSE is 73.2477 W/m^{2} in Model II-AC. The best prediction accuracy of the two models is 75.22 W/m^{2} and 71.0791 W/m^{2} by RMSE, respectively, which shows that the proposed new branch can improve the prediction accuracy. Meanwhile, it can also be seen from Table

Comparing Tables ^{2} and 32.2702, respectively. For Model II-BC, because the current meteorological parameters in the auxiliary input already exist in the main input, the accuracy improvement effect is not apparent.

The performance of Model I-A with 1–12-hour historical irradiance (from Lagging 1 to Lagging 12).

RMSE (W/m^{2}) | nRMSE (%) | MAE (W/m^{2}) | MBE (W/m^{2}) | ||
---|---|---|---|---|---|

Lagging 1 (1 h) | 110.64 | 55.67 | 66.32 | −1.57 | 0.9216 |

Lagging 2 (2 h) | 84.77 | 43.02 | 45.52 | 2.65 | 0.9524 |

Lagging 3 (3 h) | 80.37 | 40.75 | 40.88 | 1.57 | 0.9574 |

Lagging 4 (4 h) | 79.56 | 40.35 | 43.15 | −0.07 | 0.9583 |

Lagging 5 (5 h) | 78.45 | 39.78 | 42.71 | 0.63 | 0.9596 |

Lagging 6 (6 h) | 76.95 | 39.00 | 40.38 | 1.07 | 0.9610 |

Lagging 7 (7 h) | 77.53 | 39.21 | 42.17 | 0.22 | 0.9607 |

Lagging 8 (8 h) | 75.91 | 38.47 | 38.26 | −0.94 | 0.9621 |

Lagging 9 (9 h) | 75.81 | 38.43 | 37.43 | 0.85 | 0.9622 |

− | |||||

Lagging 11 (11 h) | 75.26 | 38.15 | 37.36 | 2.02 | 0.9628 |

Lagging 12 (12 h) | 75.91 | 38.25 | 41.15 | 2.25 | 0.9624 |

The performance of Model I-B with 1–12 hour historical irradiance (from Lagging 1 to Lagging 12).

RMSE (W/m^{2}) | nRMSE (%) | MAE (W/m^{2}) | MBE (W/m^{2}) | ||
---|---|---|---|---|---|

Lagging 1 (1 h) | 75.4654 | 39.2068 | 34.179 | −7.2412 | 0.9615 |

Lagging 2 (2 h) | 73.0181 | 37.9311 | 32.2728 | −5.3405 | 0.9637 |

Lagging 3 (3 h) | 72.0597 | 37.429 | 33.022 | −8.7159 | 0.9648 |

Lagging 4 (4 h) | 73.1294 | 37.9803 | 35.0303 | −13.1121 | 0.9649 |

Lagging 5 (5 h) | 72.5747 | 37.6879 | 32.0244 | −5.851 | 0.9641 |

Lagging 6 (6 h) | 73.3373 | 38.0796 | 34.9869 | −10.9972 | 0.9638 |

Lagging 7 (7 h) | 72.0033 | 37.3826 | 30.9602 | −3.4511 | 0.9648 |

Lagging 8 (8 h) | 71.9089 | 37.3294 | 30.8381 | −3.7222 | 0.9647 |

Lagging 9 (9 h) | 71.4177 | 37.0707 | 31.2055 | −2.3624 | 0.9656 |

Lagging10 (10 h) | 72.6381 | 37.7026 | 30.7169 | −0.6251 | 0.9642 |

− | |||||

Lagging 12 (12 h) | 71.8434 | 37.2962 | 30.6385 | −1.9523 | 0.9649 |

The performance of Model II-AC and II-AD with 1–12-hour historical irradiance (from Lagging 1 to Lagging 12).

Model II-AC | Model II-AD | |||
---|---|---|---|---|

RMSE (W/m^{2}) | nRMSE (%) | RMSE (W/m^{2}) | nRMSE (%) | |

Lagging 1 (1 h) | 73.2477 | 38.0547 | 71.843 | 37.3249 |

Lagging 2 (2 h) | 71.9784 | 37.391 | 71.2248 | 36.9995 |

Lagging 3 (3 h) | 71.4207 | 37.0971 | 71.2623 | 37.0148 |

Lagging 4 (4 h) | 71.3815 | 37.0725 | 71.2267 | 36.9921 |

Lagging 5 (5 h) | 71.1067 | 36.9256 | 71.8271 | 37.2996 |

Lagging 6 (6 h) | 71.3472 | 37.0462 | 70.0358 | 36.3653 |

Lagging 7 (7 h) | 71.2828 | 37.0086 | 70.3305 | 36.5142 |

Lagging 8 (8 h) | 71.6838 | 37.2126 | ||

Lagging 9 (9 h) | 71.1645 | 36.9392 | 71.8127 | 37.2757 |

Lagging 10 (10 h) | 71.2756 | 36.9954 | ||

Lagging 11 (11 h) | 72.045 | 37.3973 | 71.3583 | 37.0408 |

Lagging 12 (12 h) | 70.4213 | 36.558 | 70.1675 | 36.4262 |

The performance of Model II-BC and II-BD with 1–12-hour historical irradiance (from Lagging 1 to Lagging 12).

Model II-BC | Model II-BD | |||
---|---|---|---|---|

RMSE (W/m^{2}) | nRMSE (%) | RMSE (W/m^{2}) | nRMSE (%) | |

Lagging 1 (1 h) | 72.3486 | 37.5875 | 67.076 | 34.8482 |

Lagging 2 (2 h) | 72.7865 | 37.8108 | 66.3851 | 34.4854 |

Lagging 3 (3 h) | 71.5573 | 37.168 | 66.7471 | 34.6695 |

Lagging 4 (4 h) | 72.5258 | 37.6668 | 66.0398 | 34.2982 |

Lagging 5 (5 h) | 72.8937 | 37.8535 | 64.2217 | 33.3502 |

Lagging 6 (6 h) | 70.9322 | 36.8307 | 63.4328 | 32.9368 |

Lagging 7 (7 h) | 64.4025 | 33.4365 | ||

Lagging 8 (8 h) | 71.8012 | 37.2735 | 63.4285 | 32.927 |

Lagging 9 (9 h) | 71.4277 | 37.0758 | 62.955 | 32.678 |

Lagging 10 (10 h) | 71.2123 | 36.9626 | 63.0588 | 32.7305 |

Lagging 11 (11 h) | 70.8344 | 36.7688 | 64.965 | 33.7222 |

Lagging 12 (12 h) | 71.6534 | 37.1976 |

The best parameters and architecture of the LSTM network for 1-hour-ahead forecasting with the proposed six models are shown in Table

The best parameters and architecture of the six LSTM models for 1 hour ahead forecasting.

Model | Input shape | Structure (hidden layers) | Optimizer/epoch | |
---|---|---|---|---|

Main input | Auxiliary input | |||

Model I-A | ( | — | 100-40 (LSTM) | Adam/200 |

Model I-B | ( | — | 100-40 (LSTM) | Adam/200 |

Model II-AC | ( | ( | 32 (LSTM)-64-32 (MLP) | Adam/200 |

Model II-AD | ( | ( | 32 (LSTM)-64-32 (MLP) | Adam/200 |

Model II-BC | ( | ( | 32 (LSTM)-64-32 (MLP) | Adam/200 |

Model II-BD | ( | ( | 30-10 (LSTM)-64-32 (MLP) | Adam/200 |

The performance of the six models with the optimal parameters and structure can be seen in Table

The performance of the six models with the optimal parameters and structure.

Model | Model I-A | Model I-B | Model II-AC | Model II-AD | Model II-BC | Model II-BD | Persistence | BPNN |
---|---|---|---|---|---|---|---|---|

RMSE (W/m^{2}) | 75.22 | 71.0791 | 70.2837 | 69.7479 | 70.4761 | 62.1618 | 112.5854 | 76.9272 |

nRMSE (%) | 38.12 | 36.895 | 36.4806 | 36.2076 | 36.5898 | 32.2702 | 58.4263 | 39.9215 |

FS | 0.3476 | 0.36856 | 0.37566 | 0.3803 | 0.3737 | 0.4477 | 0 | 0.3167 |

P1 (%) | 33.19 | 36.87 | 37.57 | 38.05 | 37.40 | 44.79 | 0 | 0.3167 |

P2 (%) | 2.22 | 7.60 | 8.64 | 9.33 | 8.39 | 19.19 | −46.35 | 0 |

P1: the benchmark model is persistence model; P2: the benchmark model is BPNN model.

The RMSE of the six models with different lagging time (from 1 hour to 12 hours) based on the optimal parameters and structure.

The RMSE and time cost curve of the different models with different lagging time are shown in Figure

The RMSE and time cost curve of the different models with different lagging time. (a) Model I-A, (b) Model I-B, (c) Model II-AC, (d) Model II-AD, (e) Model II-BC, and (f) Model II-BD.

The one-hour-ahead irradiance forecasted results for the proposed Model II-BD with the best parameters and architecture are shown in Figure ^{∗}) denotes the forecasted value, and the predicted value and the actual value can remain the same for most of the time. It can be shown more clearly from the local enlarged drawing that the difference between measured and forecasted values is small. It is clear from Figure

Scatter plots of actual vs. predicted values for the proposed Model II-BD with the best parameters and architecture.

Through the above experimental results, we found that the Model II-BD structure of the LSTM-MLP model has the best prediction accuracy. The following LSTM-MLP model specifically represents the LSTM-MLP model with a Model II-BD structure.

Six experimental simulations were performed to verify the performance of the proposed LSTM-MLP model, including BP network, general RNN network, random forest network, SVM network, general LSTM, and LSTM-MLP model. The forecasting results are shown in Table

Performance comparison between the proposed LSTM-MLP model and the general machine learning method.

Model | RMSE (W/m^{2}) | nRMSE (%) | MAE | MBE | |
---|---|---|---|---|---|

BPNN | 76.9272 | 39.9215 | 33.2872 | −4.7798 | 0.9601 |

RNN | 77.8444 | 40.4115 | 40.0704 | −16.2864 | 0.9602 |

Random forest | 70.3808 | 36.5369 | 30.5618 | −0.9593 | 0.9659 |

SVM | 77.0384 | 39.9931 | 50.9564 | −1.6776 | 0.9593 |

General LSTM | 71.8434 | 37.2962 | 30.6385 | −1.9523 | 0.9649 |

The proposed LSTM-MLP | 62.1618 | 32.2702 | 26.6538 | −0.4547 | 0.9737 |

Furthermore, the data of three weather conditions are randomly selected from the test set, and the results are shown in Figure

Comparison between measured and forecasted hourly solar irradiance for three types of weather with different methods. (a) Sunny (June 27, 2016), (b) cloudy (June 8, 2016), and (c) rainy (May 17, 2016).

Root mean square error (RMSE, W/m^{2}) and normalized root mean square error (nRMSE, %) of different models in sunny, cloudy, and rainy weather.

Model | Sunny (June 27, 2016) | Cloudy (June 8, 2016) | Rainy (May 17, 2016) | |||
---|---|---|---|---|---|---|

RMSE | nRMSE | RMSE | nRMSE | RMSE | nRMSE | |

BPNN | 38.0148 | 7.1308 | 186.9453 | 47.3051 | 42.6140 | 74.164 |

RNN | 49.4941 | 9.2841 | 188.9789 | 47.8197 | 37.2885 | 64.8956 |

Random forest | 29.4791 | 5.5297 | 147.7844 | 37.3957 | 43.9405 | 76.4725 |

SVM | 66.8935 | 12.5478 | 171.4332 | 43.3799 | 61.1678 | 106.4545 |

General LSTM | 183.1270 | 46.3389 | 29.0062 | 50.4815 | ||

The proposed LSTM-MLP | 25.2291 | 4.7325 |

In order to place the work with other published works, the results with the proposed approach and results from different studies of others are compared in Table

Comparison between the best result obtained in this study and conventional methods.

Reference | Model type | Location of data used | Performance |
---|---|---|---|

Lee et al. [ | Angstrom-type equations | South Korea (Seoul) | nRMSE (%) = 43.09 |

Brabec et al. [ | Heteroscedastic model (HR) | Romania (Timisoara) | nRMSE (%) = 45.80 |

Voyant et al. [ | MLP | France (Ajaccio, Corsica) | nRMSE (%) = 40.55 |

Voyant et al. [ | ARMA | France (Ajaccio, Corsica) | nRMSE (%) = 40.32 |

Voyant et al. [ | Hybrid MLP-ARMA | France (Ajaccio, Corsica) | nRMSE (%) = 36.59 |

Trapero et al. [ | ARIMA | Spain (Castilla-La Mancha) | nRMSE (%) = 37.34 |

Akarslan and Hocaoglu [ | Adaptive approach | Turkey (Çanakkale) | nRMSE (%) = 34.86^{2} |

Zhao et al. [ | 3D-CNN with AR | NREL database | nRMSE (%) = 34.97 |

Bae [ | ANN | South Korea (Yuseong-gu, Daejeon) | RMSE = 71.41 W/m^{2} |

Bae [ | NAR | South Korea (Yuseong-gu, Daejeon) | RMSE = 111.41 W/m^{2} |

Bae [ | SVM | South Korea (Yuseong-gu, Daejeon) | RMSE = 58.72 W/m^{2} |

Qing and Niu [ | LSTM | Cape Verde (Santiago) | RMSE = 76.245 W/m^{2} |

Yu [ | LSTM | USA (Hawaii) | RMSE = 66.69 W/m^{2}^{2} |

Yu [ | SVR | USA (Hawaii) | RMSE = 144.43 W/m^{2}^{2} |

This study | Model II-BD based on LSTM-MLP | USA (Denver, Colorado) | nRMSE (%) = 32.27^{2}^{2}^{2} |

In this work, a new novel LSTM-MLP structure with two-branch input is proposed. The proposed LSTM-MLP includes one main input, one auxiliary input, one main output, and one auxiliary output. The data of historical irradiance (or irradiance and meteorological parameters) is as main input, which is feed to LSTM layers. One part from the LSTM layer is output as auxiliary output, and the other part is previously combined with the meteorological parameters (auxiliary input) and sent to a new MLP structure. The output from several hidden layers of MLP is the main output, which is the final irradiance prediction value. Four network structures based on LSTM-MLP and two network structures based on traditional LSTM are designed and developed. A real-world test case in Denver, which consists of 5 years of data, is used to verify and discuss the potential of each model.

The experimental results demonstrate that the proposed Model II-BD, which with historical irradiance and meteorological parameters as main input and the next moment meteorological parameters as an auxiliary input, significantly outperforms other models in terms of three widely used evaluation criteria. The RMSE is 62.1618 W/m^{2}, the nRMSE is 32.2702%, and FS is 0.4477. Compared with BPNN, the promoting percentage of RMSE (P) of Model II-BD is 19.19%. The meteorological parameters at the next moment play a vital role in the prediction accuracy, which can be gained by the weather forecast. The lagging time is a significant variable for the input of LSTM, especially when only historical irradiance is used as input (e.g., Model I-A).

The data used to support the findings of this study are available from the corresponding author upon request.

The authors declare that there are no conflicts of interest regarding the publication of this article.

This work was supported by the National Natural Science Foundation of China (Grant nos. 61875171, 61865015, and 61705192) and the National Natural Science Foundation of Yunnan Province (Grant no. 2017FD069).