Hour-Ahead Photovoltaic Power Forecasting Using an Analog Plus Neural Network Ensemble Method

: The common analog approach and ensemble methods in photovoltaic (PV) power forecasting are based on the forecasts from several numerical weather prediction (NWP) models. These may be not applicable to the very-short-term PV power forecasting, since forecasts based on NWP models are reliable in horizons longer than six hours. In this paper, a methodology for one-hour-ahead PV power forecasting is proposed. Instead of the NWP models, the persistence method is applied in the analog approach to produce meteorological forecasts. The historical data with meteorological predictions similar to the target forecast hour are identiﬁed to train the forecast model. Then, the feed forward neural networks (FNNs) act as the base predictors of the neural network ensemble method to replace the NWP-based PV power prediction methods. The forecast results produced by the FNNs are combined by the random forest (RF) algorithm. The performance of the proposed method is evaluated on a real grid-connected PV plant located in Southeast China. Results show that the proposed method outperforms six benchmark models: the persistence model, the support vector regression (SVR) model, the linear regression model, the RF model, the gradient boosting model, and XGBoost model. The improvements reach up to over 40% for the standard error metrics. forecast hour is similar to that of the historical hours. In this work, solar time and earth declination angle at the target forecast hour, and the one-hour-ahead clearness index prediction of the target forecast hour act as the metrics. The analog method selects the training data which are tested at conditions similar to that of the target forecast hour by setting limits for the metrics. Based on the selected data, an NNE method combining multiple FNN predictors of di ﬀ erent numbers of hidden layer neurons by RF is applied to train the forecast model at the target forecast hour. The methodology is tested using the measurements of a sub-array in a grid-connected PV plant. Results show that the proposed method can signiﬁcantly improve the forecast accuracy compared with the benchmark methods. The limitation of the proposed approach is that the forecast horizon considered for the very-short-term PV power forecasting is one-hour-ahead only, which is objectively limited by the current experimental conditions. In the future research work, the proposed method can be further extended to apply to longer term PV power forecasting, such as one-day-ahead.


Introduction
Fast growing penetration of solar energy has introduced noticeable challenges to the operation of the electric grid due to the dynamic nature and intermittency of solar power. Accordingly, the uncertainty and fluctuations of solar photovoltaic (PV) power must be handled properly. Solar PV output power forecasting has emerged as an efficient tool to address this issue. An accurate power forecasting model can reduce the impacts of PV power variability on the grid, improve system reliability and power quality, and promote large-scale PV power penetration [1,2].
A good number of studies have been conducted to forecast PV power at different temporal scales. Based on the forecast horizon, PV power forecasting methods can be divided into the following categories: very-short-term (i.e., few seconds to hours ahead), short-term (i.e., one to three days ahead), medium-term (i.e., one week ahead), and long-term (i.e., months to year ahead) [3]. In this paper, we focus on the very-short-term PV power forecasting. It is used for forecasting ramps and frequent fluctuations in energy production to ensure unit commitment, scheduling, and dispatching of electrical power [1,4].
Statistical approaches based on historical data have been the most popular technique for PV power forecast [5]. The generally used statistical techniques include the time series methods [6], regression methods [7], and machine learning methods [8]. The considered historical data contain meteorological and power measurements. The main drawback of these methods is the lack of physical information of PV systems during forecasting [5,9,10].
In order to take the physical properties of PV modules into consideration when using statistical techniques for PV power forecast, the analog approach is widely utilized [5,[11][12][13][14][15][16]. As PV output strongly depends on meteorological factors, PV modules would have similar output in similar meteorological conditions [11]. In other words, there will be an approximate relation between the inputs and the forecasted results when the external conditions are similar. Accordingly, the analog methods attempt to select data, which are collected at the conditions similar to that of the target forecast time, to train the forecast models.
To this end, the meteorological predictions on the target forecast time are compared with their historical forecasts. The specific time periods, which have meteorological forecasts analogous to the current meteorological forecasts, are identified. In general, numerical weather prediction (NWP) models are applied to give the predictions [5,11,[13][14][15].
The ensemble method is a technique in machine learning. Through combining several base learners, the ensemble method can achieve higher predictive accuracy than using base learner only. At present, the ensemble method has been widely used in many fields. In recent years, the ensemble method for solar PV power forecasting has become one of the most widely utilized approaches, since it has better predictive performance compared to a single model. In a review paper [9], the ensemble method was identified as an important direction for future solar PV power forecasting research. The commonly used ensemble technique in PV power forecasting is used by blending NWP data from multiple sources [5,11,[17][18][19][20].
However, these methods may not be applicable to the very-short-term PV power forecasting. NWP simulations over a sizable domain are often delayed, since they run on supercomputers, and require spin-up time. Hence, the NWP-based methods are more accurate with a horizon longer than six hours [5,14,17,21].
In this paper, we propose a method for the very-short-term PV power forecasting. Specifically, the forecast horizon considered is one-hour ahead. This paper makes the following research contributions: (1) A novel analog approach for the very-short-term PV power forecasting is proposed to select training data for the target forecast time. The meteorological forecasts and astronomical data are utilized as the features for the analog approach to measure the similarity of the operating conditions. Without using NWP forecasts, the meteorological forecasts are produced by the persistence method, which is simple to use, and has high accuracies for very short timeframe forecasts [5]. (2) Then an ensemble forecast framework is trained for the target forecast time using the selected training data. It does not utilize NWP models, but rather uses the artificial neural network (ANN) to act as the base predictors, which is more accurate than the NWP-based methods for the forecast horizons shorter than six hours [18]. These approaches have been known as the neural network ensemble (NNE) [22]. In this work, the random forest (RF) algorithm is then adopted to blend the forecasts of the ANNs.
The rest of the paper is organized as follows: Section 2 describes the PV plant and the prepared data for simulating the forecast models. Section 3 discusses the proposed methodology for the very-short-term PV power prediction. In Section 4, numerical results and discussions are presented. Finally, Section 5 concludes the paper.

PV Plant and Data Preparation
In this work, the used data are from a grid-connected PV plant located in Southeast China, which was also analyzed in our previous work [23]. There are 17 sub-arrays in the PV plant, and each sub-array is connected to one inverter. One of the sub-arrays was randomly selected to provide data for the simulation of the method.
The data of the PV plants include the observations of the meteorological variables (i.e., solar irradiance, ambient temperature, and wind speed), and the output power of the PV modules. The collected data range from 24 June 2015 to 23 June 2016. All the measurements are averaged and sampled every minute. Then the one minute measurements are averaged over one hour for one-hour-ahead PV power forecasting. There is no missing point among the one-hour data. The details of raw data without preprocessing are shown in Table 1. Figure 1 shows the randomly selected data which are from 24 June 2015 00:00:00 to 24 June 2015 23:59:00 as the samples. In this work, the used data are from a grid-connected PV plant located in Southeast China, which was also analyzed in our previous work [23]. There are 17 sub-arrays in the PV plant, and each sub-array is connected to one inverter. One of the sub-arrays was randomly selected to provide data for the simulation of the method.
The data of the PV plants include the observations of the meteorological variables (i.e., solar irradiance, ambient temperature, and wind speed), and the output power of the PV modules. The collected data range from 24 June 2015 to 23 June 2016. All the measurements are averaged and sampled every minute. Then the one minute measurements are averaged over one hour for one-hour-ahead PV power forecasting. There is no missing point among the one-hour data. The details of raw data without preprocessing are shown in Table 1. Figure 1 shows the randomly selected data which are from 24 June 2015 00:00:00 to 24 June 2015 23:59:00 as the samples.

Methods
In this section, the proposed PV power forecasting method is introduced. Figure 2 shows the main procedure of the proposed method, which mainly consists of three steps.

Methods
In this section, the proposed PV power forecasting method is introduced. Figure 2 shows the main procedure of the proposed method, which mainly consists of three steps. Step (1) Data preprocessing: The flowchart of the data preprocessing is shown in Figure 3. Firstly, the whole data is sequentially split into two subsets. One containing the first 50% data is used as the initial training data candidates. The other one including the remaining 50% data is the test data for validating the proposed method. The specific dates of training data are from 23 June 2015 14:24:00 to 9 January 2016 19:00:00, and the specific dates of test data are from 9 January 2016 20:00:00 to 20 April 2016 23:00:00. Then the observations measured at low solar irradiance levels, which here are arbitrarily set to be less than 50 W/m 2 , are eliminated from the training data candidates. This is because the uncertainty levels of the observations increase as the solar irradiance levels decrease [24]. In addition, observations with zero power output are also removed.

Overview
Under normal conditions, the conversion efficiency of PV modules varies within a range. The PV efficiency may exceed the normal range when the measured PV output power is significantly lower or higher than it should be at the measured irradiance level. What causes the abnormal Overview of the proposed analog ensemble PV power forecasting method for hour-ahead forecast.
Step (1) Data preprocessing: The flowchart of the data preprocessing is shown in Figure 3. Firstly, the whole data is sequentially split into two subsets. One containing the first 50% data is used as the initial training data candidates. The other one including the remaining 50% data is the test data for validating the proposed method. The specific dates of training data are from 23 June 2015 14:24:00 to 9 January 2016 19:00:00, and the specific dates of test data are from 9 January 2016 20:00:00 to 20 April 2016 23:00:00. Step (1) Data preprocessing: The flowchart of the data preprocessing is shown in Figure 3. Firstly, the whole data is sequentially split into two subsets. One containing the first 50% data is used as the initial training data candidates. The other one including the remaining 50% data is the test data for validating the proposed method. The specific dates of training data are from 23 June 2015 14:24:00 to 9 January 2016 19:00:00, and the specific dates of test data are from 9 January 2016 20:00:00 to 20 April 2016 23:00:00. Then the observations measured at low solar irradiance levels, which here are arbitrarily set to be less than 50 W/m 2 , are eliminated from the training data candidates. This is because the uncertainty levels of the observations increase as the solar irradiance levels decrease [24]. In addition, observations with zero power output are also removed.
Under normal conditions, the conversion efficiency of PV modules varies within a range. The PV efficiency may exceed the normal range when the measured PV output power is significantly lower or higher than it should be at the measured irradiance level. What causes the abnormal efficiency may be system failures, inaccurate measurements, data transmission or storage error, etc. The abnormal PV efficiency can be identified using the box plot rule, and then can be removed. Then the observations measured at low solar irradiance levels, which here are arbitrarily set to be less than 50 W/m 2 , are eliminated from the training data candidates. This is because the uncertainty levels of the observations increase as the solar irradiance levels decrease [24]. In addition, observations with zero power output are also removed.
Under normal conditions, the conversion efficiency of PV modules varies within a range. The PV efficiency may exceed the normal range when the measured PV output power is significantly lower or higher than it should be at the measured irradiance level. What causes the abnormal efficiency may be system failures, inaccurate measurements, data transmission or storage error, etc. The abnormal PV efficiency can be identified using the box plot rule, and then can be removed.
The box plot rule classifies an observation as an outlier if Eff pv > Q 3 + 1.5IQR or Eff pv < Q 1 − 1.5IQR [25]. Here, Eff pv denotes the PV efficiency of the historical data. Q 1 and Q 3 denote the first and third quantiles of all values of Eff pv . IQR denotes the interquartile range (i.e., Q 3 -Q 1 ).
Step (2) Analog approach for hour-ahead power forecast: As aforementioned, the previous reported analog approaches select the training data collected at the historical period of the NWP predictions similar to the target forecast time. In this paper, the proposed analog method applies the meteorological observations of the hour before the analyzed historical hour and the target hour as the one-hour-ahead meteorological forecasts instead of the NWP forecasts. This approach is motivated by the one-hour-ahead persistence forecast method, which assumes that the hour-ahead condition will be the same as the present condition. Accordingly, the meteorological observations at the hour before can be roughly considered as the hour-ahead meteorological predictions, and thus be used to select similar historical data.
Step (3) NNE forecast method: For ensemble forecasting, diversity is a key feature, as there will be less improvement if the base predictors return similar decisions [26]. In this paper, the diversity of the base predictors is generated by changing the numbers of hidden layer neurons of the neural networks (NNs). Specifically, within an NNE framework, the base predictors are created and trained using the training data selected in Step (2) for the target hour; then the forecast results of the base predictors are blended to derive the final predictions.

Analog Approach for Hour-Ahead Power Forecasting
Analog methods rely on the fact that the past may reappear in the future when the external conditions are the same. Therefore, it firstly needs to measure the similarity of the past to the current [15]. The weighted distance is the most commonly used metric [11,13]. In one study [15], a Taylor expansion for the distance metric is used. In other studies [5,11], both the astronomical and the meteorological features are used to select analogs for training purposes. In addition, the analog method can be used to generate both deterministic and probabilistic forecasts [11,13,14]. It assumes that if a forecast made in the past is analogous to a current meteorological forecast, then it is likely to produce the same error characteristics as is probable in a current forecast.
Motivated by the widely used analog methods based on the NWP data, we propose a new analog approach which is suitable for one-hour-ahead PV power forecasting, without using the NWP data. In the NWP-based analog approaches, the similarity between the past and the present is measured using the meteorological forecasts of NWP models. In this paper, we use the persistence model for one-hour-ahead meteorological forecasts. The persistence model utilizes the most recent measurements as the forecast values. The persistence method is used here since it has high accuracies for short timeframe forecasts (e.g., one-hour-ahead forecast) [5], and its simplicity can reduce the whole computational complexity significantly. Furthermore, the astronomical information is also applied as critical physical factors for the proposed analog approach.
The steps of the proposed analog approach for one-hour-ahead PV power forecasting are shown in Figure 4. The analog training data for the target forecast time (t g ) are chosen from the training data candidates tested at t i (i = 1, . . . , n train ).
Energies 2020, 13, x FOR PEER REVIEW 6 of 18 Firstly, both astronomical information including solar time (tsolar) and earth declination angle (δ), and meteorological feature (i.e., the one-hour-ahead prediction of the clearness index (KT)) are utilized as the features to measure the similarity degree of the weather conditions. In a study by Zhang and colleagues [5], solar time and earth declination angle are applied as physical factors. On the other hand, weather conditions have notable effects on PV performance, and have been widely taken into consideration for PV power forecasting [27,28]. The clearness index is defined as the ratio of the horizontal global irradiance passing through the aerosphere to the Earth's surface to the extraterrestrial solar radiation [27]. Its value reflects the variations of cloud cover and atmospheric conditions, which are the causes of the PV power variability. Therefore, we apply the prediction of the hourly KT at ti (KT_fore(ti)) predicted by the persistence model as the meteorological feature, which can be calculated using Equations (1) and (2).
where GHIfore(ti), GHImeas(ti − 1), and GHIext(ti) denote the forecasted horizontal global irradiance on the Earth's surface at ti, the measured horizontal global irradiance at ti − 1, and the extraterrestrial solar radiation at ti. Firstly, both astronomical information including solar time (t solar ) and earth declination angle (δ), and meteorological feature (i.e., the one-hour-ahead prediction of the clearness index (K T )) are utilized as the features to measure the similarity degree of the weather conditions. In a study by Zhang and colleagues [5], solar time and earth declination angle are applied as physical factors. On the other hand, weather conditions have notable effects on PV performance, and have been widely taken into consideration for PV power forecasting [27,28]. The clearness index is defined as the ratio of the horizontal global irradiance passing through the aerosphere to the Earth's surface to the extraterrestrial solar radiation [27]. Its value reflects the variations of cloud cover and atmospheric conditions, which are the causes of the PV power variability. Therefore, we apply the prediction of the hourly K T at t i (K T_fore (t i )) predicted by the persistence model as the meteorological feature, which can be calculated using Equations (1) and (2).
where GHI fore (t i ), GHI meas (t i − 1), and GHI ext (t i ) denote the forecasted horizontal global irradiance on the Earth's surface at t i , the measured horizontal global irradiance at t i − 1, and the extraterrestrial solar radiation at t i . Secondly, the absolute deviations between the values of the three features at t i and t g are compared with the corresponding limits as shown in Equations (3)- (5). When the three absolute deviations satisfy the requirements at the same time, the data measured at t i are considered as analog data of t g and selected to constitute the training data for t g . The limits of the absolute deviations between the values of t solar , δ, and K T_fore at t i and t g (i.e., L t , L δ and L KT ) are defined by trial and error. The definition of these parameters is discussed in Section 4.2.
The final step is to update the training data candidates for the next forecast time (i.e., t g + 1). When the measurements at t g are available, their qualities are checked. The quality testing procedure is the same as the data preprocessing in Section 3.1. The data with low solar irradiance, zero power, and abnormal efficiency cannot be added to the training data candidates. It can be seen that updating the training data candidates can increase the size of the training data, and also take into account the latest effects (e.g., aging of the PV modules).

Neural Network Ensemble (NNE) Forecast Method
A great number of the existing research literature on ensemble PV power forecasting methods blends forecast results from different NWP models to get the final forecasted PV power. In a study by Zhang and colleauges [5], a day-ahead hourly PV power forecasting method is proposed, which blends forecasted power obtained by three NWP models using the weighting coefficients. For each forecasting hour, one set of weights is obtained by minimizing the forecast normalized mean absolute error (NMAE). The strategy to compute the weights of multiple forecasts from NWP models is to minimize the continuous ranked probability score [20]. Moreover, using the mean value of all forecasts as the final forecast is the simplest way to combine forecasts. It often outperforms more complex methods [19]. However, the NWP-based ensemble forecast methods are relatively less accurate for horizons shorter than six hours.
Another category of ensemble methods applies the ensembles of neural networks (NNs) for PV power forecasting. In a study by Raza and co-workers [22], feed forward neural network (FNN), Elman backpropagation network, and cascade-forward backpropagation networks are trained as base predictors, and then aggregated using Bayesian model averaging. Except for training different types of ANNs, other strategies to build ANN predictors of different structures include changing the number of hidden layer neurons and using diverse training data [29,30]. In this paper, we investigate the application of ensembles of NNs for the one-hour ahead PV power forecasting. Since the base learner used in many ensemble methods is a weak learner and the neural network is a strong learner, using neural networks as a base learner can improve the model performance.
The proposed NNE framework is a systematic ensemble of the FNN predictors, as shown in Figure 5. Several common ANN models, including the FNN, the radial basis function (RBF) network, and the Elman network, are compared. The FNN is chosen as the base predictor for its good performance. The FNN has a single hidden layer and is trained using the backpropagation (BP) algorithm and genetic algorithm (GA) for better network learning. The PV power predictions at t g are denoted by F base (t g ), which are the outputs of the base predictors; the global horizontal irradiance (GHI meas ), the ambient temperature (T amb ), the wind speed (ws), and the PV power (P) measured at the prior hour before t g (denoted by GHI meas (t g − 1), T amb (t g − 1), ws (t g − 1) and P (t g − 1), respectively) act as the inputs of the base predictors.
The construction procedure of the proposed NNE framework is shown in Figure 6. The NNE framework is developed based on the training data selected by the analog approach in Section 3.2. There are 9 base predictors in the proposed NNE framework. In the NNE framework, the inputs are GHI (t g − 1), T amb (t g − 1), ws (t g − 1), and P (t g − 1). Every base FNN model has 4 input neurons as shown in Figure 5. In order to build diverse base predictors, the numbers of hidden layer neurons are different for each FNN model. We determine the number of hidden layer neurons based on a rule of thumb [31]. In the first FNN predictor (Network1), 4 hidden layer neurons are selected, the second FNN model contains 1 more than the first one, which is 5, and so on. The last or ninth FNN model contains 12 hidden layer neurons. The computational complexity and forecast accuracy of each FNN model vary due to the network architecture and the number of neurons in the hidden layer. The construction procedure of the proposed NNE framework is shown in Figure 6. The NNE framework is developed based on the training data selected by the analog approach in Section 3.2. There are 9 base predictors in the proposed NNE framework. In the NNE framework, the inputs are GHI (tg − 1), Tamb (tg − 1), ws (tg − 1), and P (tg − 1). Every base FNN model has 4 input neurons as shown in Figure 5. In order to build diverse base predictors, the numbers of hidden layer neurons are different for each FNN model. We determine the number of hidden layer neurons based on a rule of thumb [31]. In the first FNN predictor (Network1), 4 hidden layer neurons are selected, the second FNN model contains 1 more than the first one, which is 5, and so on. The last or ninth FNN model contains 12 hidden layer neurons. The computational complexity and forecast accuracy of each FNN model vary due to the network architecture and the number of neurons in the hidden layer. We use the RF algorithm as the ensemble learning tool to combine the forecast results of the base predictors. The RF algorithm is actually an ensemble of decision trees (DTs). It employs the bootstrap samples from the training data, and the random node and the split point selection to grow the ensemble of trees [32]. In this paper, the parameters of the RF are selected empirically: the number of DTs is 200, the number of samples to select at random for each decision split is 3 (i.e., 9/3), and the minimum number of samples per leaf is 5. The ensemble result for the forecast time tg is made by averaging the individual tree's outputs. As the training data is updated every hour, the We use the RF algorithm as the ensemble learning tool to combine the forecast results of the base predictors. The RF algorithm is actually an ensemble of decision trees (DTs). It employs the bootstrap samples from the training data, and the random node and the split point selection to grow the ensemble of trees [32]. In this paper, the parameters of the RF are selected empirically: the number of DTs is 200, the number of samples to select at random for each decision split is 3 (i.e., 9/3), and the minimum number of samples per leaf is 5. The ensemble result for the forecast time t g is made by averaging the individual tree's outputs. As the training data is updated every hour, the NNE framework should be reconstructed every hour as well using the updated training data.

Numerical Results
In this section, the performance of the proposed methodology for hour-ahead PV power forecasting is tested using the measurements of a randomly chosen sub-array in a study by Wang and colleagues [23]. In addition, in order to demonstrate the effectiveness of the proposed method, several benchmark methods for one-hour-ahead PV power forecasting are applied for comparison.
Normalized root mean square error (NRMSE) and normalized mean absolute error (NMAE) are widely applied to evaluate the accuracy of the forecasting methods. They are formulated as: where n test is the number of the test data; F, P, and Capacity denote the predicted, the measured, and the rated output power of the tested PV sub-array, respectively.

Forecast Performance of the Proposed Methods
Before developing the methodology for PV power forecast, the limits of the changes of t solar , δ, and K T are set for the proposed analog approach. The target of the analog approach is to select the training data which are tested at the similar conditions from the historical observations, while guaranteeing enough data for the development of models. To this end, the limits (i.e., L t , L δ , and L KT ) are chosen for minimizing the NRMSE obtained by the analog plus NNE method tested on the validation data. The rough changing trend of the values of the NRMSE with the varied L t , L δ , and L KT is shown in Figure 7. It can be seen that the minimized NRMSE occurs at L t of 1 h, L δ of 1 rad, and L KT of 0.8, respectively. Accordingly, L t , L δ , and L KT are set to be 1 h, 1 rad, and 0.8.
Energies 2020, 13, x FOR PEER REVIEW 10 of 18 where ntest is the number of the test data; F, P, and Capacity denote the predicted, the measured, and the rated output power of the tested PV sub-array, respectively.

Forecast Performance of the Proposed Methods
Before developing the methodology for PV power forecast, the limits of the changes of tsolar, δ, and KT are set for the proposed analog approach. The target of the analog approach is to select the training data which are tested at the similar conditions from the historical observations, while guaranteeing enough data for the development of models. To this end, the limits (i.e., Lt, Lδ, and LKT) are chosen for minimizing the NRMSE obtained by the analog plus NNE method tested on the validation data. The rough changing trend of the values of the NRMSE with the varied Lt, Lδ, and LKT is shown in Figure 7. It can be seen that the minimized NRMSE occurs at Lt of 1 h, Lδ of 1 rad, and LKT of 0.8, respectively. Accordingly, Lt, Lδ, and LKT are set to be 1 h, 1 rad, and 0.8. For instance, the forecasting results and the measured power from 14 January 2016 00:00 to 16 January 2016 00:00 are shown in Figure 8. Different methods, including the proposed analog plus NNE (analog + NNE) method, the NNE method, and the single FNN model, are compared in this period. In Figure 8, it can be seen that the proposed analog + NNE method has forecasting results For instance, the forecasting results and the measured power from 14 January 2016 00:00 to 16 January 2016 00:00 are shown in Figure 8. Different methods, including the proposed analog plus NNE (analog + NNE) method, the NNE method, and the single FNN model, are compared in this period. In Figure 8, it can be seen that the proposed analog + NNE method has forecasting results closest to the measured power. On the other hand, the NNE method outperforms the single FNN at most test points. It proves that the ensemble technique based on the RF algorithm is effective to enhance the forecast accuracy of the single FNN model. Since the analog + NNE method uses the same forecast model with the NNE method, the improvements are made by the proposed analog approach selecting training data. The values of the NRMSE and NMAE computed for the methods are shown in Figure 9. The proposed method combining the analog approach for one-hour-ahead forecast with the NNE provides the most accurate results. Compared to the single FNN model, the NNE approach reduces the forecast error metrics from 9.02% NRMSE and 4.92% NMAE to 7.60% NRMSE and 4.38% NMAE. This demonstrates the effectiveness of the proposed ensemble method based on the RF. The comparison between the analog + NNE and the NNE methods indicates that the proposed analog approach can reduce the error from 7.60% NRMSE and 4.38% NMAE to 5.18% NRMSE and 2.42% NMAE. This shows the importance of selecting the proper data for the model training.

Impact of Weather Types on Forecasting
For PV power forecasting, weather type is widely taken into account. For instance, in a study by Yang and co-workers [28], features were extracted from the collected historical data and then used to classify the weather type. Sub-models were further established for the corresponding weather conditions. Generally, solar irradiance is stable on sunny days, however, it fluctuates on partial cloudy days. Influenced by varying solar irradiation, PV power output is intermittent and undispatchable when solar irradiance is varying. In addition, the forecast accuracies change with the different weather types [33]. In this section, the forecast performances of the methods under different weather types are analyzed. The values of the NRMSE and NMAE computed for the methods are shown in Figure 9. The proposed method combining the analog approach for one-hour-ahead forecast with the NNE provides the most accurate results. Compared to the single FNN model, the NNE approach reduces the forecast error metrics from 9.02% NRMSE and 4.92% NMAE to 7.60% NRMSE and 4.38% NMAE. This demonstrates the effectiveness of the proposed ensemble method based on the RF. The comparison between the analog + NNE and the NNE methods indicates that the proposed analog approach can reduce the error from 7.60% NRMSE and 4.38% NMAE to 5.18% NRMSE and 2.42% NMAE. This shows the importance of selecting the proper data for the model training. The values of the NRMSE and NMAE computed for the methods are shown in Figure 9. The proposed method combining the analog approach for one-hour-ahead forecast with the NNE provides the most accurate results. Compared to the single FNN model, the NNE approach reduces the forecast error metrics from 9.02% NRMSE and 4.92% NMAE to 7.60% NRMSE and 4.38% NMAE. This demonstrates the effectiveness of the proposed ensemble method based on the RF. The comparison between the analog + NNE and the NNE methods indicates that the proposed analog approach can reduce the error from 7.60% NRMSE and 4.38% NMAE to 5.18% NRMSE and 2.42% NMAE. This shows the importance of selecting the proper data for the model training.

Impact of Weather Types on Forecasting
For PV power forecasting, weather type is widely taken into account. For instance, in a study by Yang and co-workers [28], features were extracted from the collected historical data and then used to classify the weather type. Sub-models were further established for the corresponding weather conditions. Generally, solar irradiance is stable on sunny days, however, it fluctuates on partial cloudy days. Influenced by varying solar irradiation, PV power output is intermittent and undispatchable when solar irradiance is varying. In addition, the forecast accuracies change with the different weather types [33]. In this section, the forecast performances of the methods under different weather types are analyzed.

Impact of Weather Types on Forecasting
For PV power forecasting, weather type is widely taken into account. For instance, in a study by Yang and co-workers [28], features were extracted from the collected historical data and then used to classify the weather type. Sub-models were further established for the corresponding weather conditions. Generally, solar irradiance is stable on sunny days, however, it fluctuates on partial cloudy days. Influenced by varying solar irradiation, PV power output is intermittent and undispatchable when solar irradiance is varying. In addition, the forecast accuracies change with the different weather types [33]. In this section, the forecast performances of the methods under different weather types are analyzed.
The measured and the predicted PV power under the different weather types are shown in Figure 10. The days can be divided into different weather types based on the value of the daily K T [30]. The clear day has a daily K T more than 0.45; the partially cloudy day corresponds to a daily K T in the range of (0.25, 0.45); and the cloudy day has a daily K T less than 0.25. It can be seen that the PV power highly fluctuates due to the moving clouds on a partially cloudy day as shown in Figure 10b. Due to the shadings of clouds, the power generations on a cloudy day in Figure 10c are much smaller than that on a clear day as shown in Figure 10a.
Energies 2020, 13, x FOR PEER REVIEW 12 of 18 PV power highly fluctuates due to the moving clouds on a partially cloudy day as shown in Figure  10(b). Due to the shadings of clouds, the power generations on a cloudy day in Figure 10(c) are much smaller than that on a clear day as shown in Figure 10 Table 2 lists the error metrics computed for the forecasting methods under the three weather types. The proposed analog + NNE method outperforms the comparative methods in terms of accuracy under all weather conditions. During the clear days, the analog plus NNE method reduces the NRMSE and NMAE by 52.81% and 62.00% compared with the single FNN method. The proposed analog approach reduces NRMSE and NMAE by 50.77% and 59.96%. This is derived by comparing the analog plus NNE method with the NNE method. The NNE method does better than  Table 2 lists the error metrics computed for the forecasting methods under the three weather types. The proposed analog + NNE method outperforms the comparative methods in terms of accuracy under all weather conditions. During the clear days, the analog plus NNE method reduces the NRMSE and NMAE by 52.81% and 62.00% compared with the single FNN method. The proposed analog approach reduces NRMSE and NMAE by 50.77% and 59.96%. This is derived by comparing the analog plus NNE method with the NNE method. The NNE method does better than the single FNN method. It reduces NRMSE and NMAE of the single FNN method by 4.16% and 5.1%, respectively. It can be inferred that the analog approach makes a greater contribution for improving the forecasting accuracy than the ensemble technique based on the RF. In Table 2, all the methods have the highest error during the partially cloudy days. On a partially cloudy day, the observed PV power fluctuates significantly due to the fluctuating solar irradiance. Thus, we deduce that it is difficult for the predicted PV power to track the rapidly changing trends of the measured PV power accurately.
Furthermore, there is another noteworthy point in Table 2 to discuss. The analog plus NNE method produces the most accurate results during clear days. This coincides with the related results in literature (e.g., [30]). However, in Table 2, the NNE method and the single FNN method give lower NRMSE and NMAE values during the cloudy days than the clear days. As shown in Figure 10, due to the shading effects of clouds, the PV power productions on a cloudy day are approximately less than half the power generations on a clear day. This indicates that the absolute deviation between the predicted and the measured PV power (i.e., F(t i ) − P(t i )) in Equations (6) and (7) on a clear day will be essentially larger than that on a cloudy day. Thus, the larger NRMSE and NMAE of the NNE and the FNN methods during the clear days are mainly caused by the larger absolute deviation between F(t i ) and P(t i ) compared with the cloudy days.

Comparison Results with Benchmark Methods
In this section, the proposed analog plus NNE method is compared with six benchmark methods for PV power forecasting, namely, the persistence model, the support vector regression (SVR) model, the linear regression model, the RF model, the gradient boosting model, and XGBoost model.

A. Persistence model
The first benchmark model is the persistence model, which is typically used for short-term forecasting, such as one-hour-ahead forecasting [5]. The persistence model is based on the memory properties of time series. It assumes that the conditions at the target forecast time are the same as that at the most recent moment. Accordingly, the forecast value at t g (i.e., F(t g )) obtained by the persistence model is equal to the last measured value (i.e., P(t g − 1)): Despite its simplicity, the persistence model can achieve tolerable results for short-term PV power forecasting. Therefore, it widely acts as a benchmark method to test the qualities of new forecasting approaches [5]. In this section, the persistence model is tested on the same test data.

B. SVR model
The SVR model has been widely used to predict PV power with good generalization capability [5]. The outstanding aspect of SVR is that it realizes the best trade-off between the empirical error and the model complexity [34]. SVR is able to perform an improved non-linear regression by the kernel trick and other optimization features. In this work, an RBF kernel is applied. The parameters of the SVR model are optimized by the grid-search with cross-validation. In order to make comparison with the proposed method, we use the same inputs, training data, and data preprocessing approach for the development of the SVR model. The performance of the SVR model is tested on the same test data. This procedure is shown in Figure 11. The SVR model has been widely used to predict PV power with good generalization capability [5]. The outstanding aspect of SVR is that it realizes the best trade-off between the empirical error and the model complexity [34]. SVR is able to perform an improved non-linear regression by the kernel trick and other optimization features. In this work, an RBF kernel is applied. The parameters of the SVR model are optimized by the grid-search with cross-validation. In order to make comparison with the proposed method, we use the same inputs, training data, and data preprocessing approach for the development of the SVR model. The performance of the SVR model is tested on the same test data. This procedure is shown in Figure 11.

C. Linear regression model
In addition to the above two models, the linear regression model is also used to compare with the proposed analog plus NNE method as the base line of the evaluation of the forecast results. D. RF model RF model has been widely used to predict PV power output. The random forest is an ensemble method that aggregates the output of several uncorrelated decision trees [35]. In this study, the RF model is tested on the same test data.

E. Gradient boosting model
Gradient boosting is a machine learning technique for regression problems which is typically used for short-term forecasting. In this study, a gradient boosting model is tested on the same test data.

F. XGBoost model
In addition to the above five models, XGBoost model is also used to compare with the proposed analog plus NNE method. XGBoost has shown superiorities in many power forecasting projects in recent years due to its advantages [36]. The performance of the XGBoost model is tested Figure 11. The framework of support vector regression (SVR) benchmark model.

C. Linear regression model
In addition to the above two models, the linear regression model is also used to compare with the proposed analog plus NNE method as the base line of the evaluation of the forecast results. D. RF model RF model has been widely used to predict PV power output. The random forest is an ensemble method that aggregates the output of several uncorrelated decision trees [35]. In this study, the RF model is tested on the same test data.

E. Gradient boosting model
Gradient boosting is a machine learning technique for regression problems which is typically used for short-term forecasting. In this study, a gradient boosting model is tested on the same test data.

F.
XGBoost model In addition to the above five models, XGBoost model is also used to compare with the proposed analog plus NNE method. XGBoost has shown superiorities in many power forecasting projects in recent years due to its advantages [36]. The performance of the XGBoost model is tested on the same test data.
Forecast skill (FS) metric is a popular metric to evaluate the forecasting accuracy improved by a method compared with the benchmark methods [9]. It is computed by: where error and error b refer to the error values of the proposed method and the benchmark models, respectively. The evaluated method with more accurate forecasts yields a positive skill. The larger the FS, the better the performance of the method. Table 3 highlights that the proposed analog plus NNE method produces a higher forecast accuracy in comparison with the persistence model, the SVR model, the linear regression model, the RF model, the gradient boosting model, and XGBoost model. The linear regression model has the largest value for the NRMSE error metric, and the gradient boosting model has the largest value for the NMAE error metric. Compared with the other five methods, the SVR model gives a better forecasting result in terms of accuracy. However, the improvement made by the SVR model is relatively low (FS of NRMSE of 0.03, and FS of NMAE of 0.01). This indicates that, compared with the other five methods, the advantage of the SVR model is not obvious for one-hour-ahead PV power forecasting. The analog plus NNE method can significantly reduce the forecast error. As shown in Table 3  Additionally, in this study, the proposed analog plus NNE method, persistence model, SVR model, linear regression model, and RF model are implemented using the Matlab script. The gradient boosting model and XGBoost model are implemented using the Python script.

Conclusions
This paper proposes an analog plus NNE method for one-hour-ahead PV power forecasting. The analog approach utilizes certain metrics to describe how much the test conditions of the target forecast hour is similar to that of the historical hours. In this work, solar time and earth declination angle at the target forecast hour, and the one-hour-ahead clearness index prediction of the target forecast hour act as the metrics. The analog method selects the training data which are tested at conditions similar to that of the target forecast hour by setting limits for the metrics. Based on the selected data, an NNE method combining multiple FNN predictors of different numbers of hidden layer neurons by RF is applied to train the forecast model at the target forecast hour. The methodology is tested using the measurements of a sub-array in a grid-connected PV plant. Results show that the proposed method can significantly improve the forecast accuracy compared with the benchmark methods. The limitation of the proposed approach is that the forecast horizon considered for the very-short-term PV power forecasting is one-hour-ahead only, which is objectively limited by the current experimental conditions. In the future research work, the proposed method can be further extended to apply to longer term PV power forecasting, such as one-day-ahead.

Conflicts of Interest:
The authors declare no conflict of interest.

Nomenclature
Eff pv PV efficiency Q 1 and Q 3 First and third quantiles of Eff pv IQR Interquartile range (i.e., Q 3 -Q 1 ) t g Target forecast time t i Training data candidates test time t solar Solar time δ Earth declination angle K T Clearness index K T_fore One hour-ahead forecast of the hourly K T GHI fore Forecasted horizontal global irradiance on the earth's surface GHI meas Measured horizontal global irradiance GHI ext Extraterrestrial solar radiation L t , L δ and L KT Absolute deviations between the values of t solar , δ and K T_fore at t i and t g F base PV power predicted by the base predictors