Day-Ahead Forecasting of Hourly Photovoltaic Power Based on Robust Multilayer Perception

Photovoltaic (PV) modules convert renewable and sustainable solar energy into electricity. However, the uncertainty of PV power production brings challenges for the grid operation. To facilitate the management and scheduling of PV power plants, forecasting is an essential technique. In this paper, a robust multilayer perception (MLP) neural network was developed for day-ahead forecasting of hourly PV power. A generic MLP is usually trained by minimizing the mean squared loss. The mean squared error is sensitive to a few particularly large errors that can lead to a poor estimator. To tackle the problem, the pseudo-Huber loss function, which combines the best properties of squared loss and absolute loss, was adopted in this paper. The effectiveness and efficiency of the proposed method was verified by benchmarking against a generic MLP network with real PV data. Numerical experiments illustrated that the proposed method performed better than the generic MLP network in terms of root mean squared error (RMSE) and mean absolute error (MAE).


Introduction
Solar energy is considered to be one of the most renewable and sustainable energy resources.Photovoltaics (PV), which convert solar energy into electricity, is the most widely used technique to make use of solar energy.The increasing penetration of PV power, however, brings challenges for the planning and scheduling of the power grid due to the uncertainty of PV power production [1].Forecasting is an essential technique to alleviate the negative impacts on the grid operation [2] and to facilitate the management of grids including renewable energies [3][4][5].
PV power forecasting methods can be categorized into direct methods and indirect methods.The former produces PV power production as model outputs; while the latter first generates forecasts of solar irradiance, then PV performance models are applied to derive the PV power production based on solar irradiance [6,7].The presented modeling approaches include numerical weather prediction (NWP) models, statistical models, and artificial intelligence.NWP-based approaches dynamically model the atmospheric states and project their impacts on solar irradiance and PV power production [8].These approaches are computationally expensive, making them difficult to use for short-term forecasting.In the early stages of PV power forecasting, statistical models such as autoregressive moving average (ARMA) [9] and its variants [10] were frequently used.However, these models are linear, which cannot capture the nonlinear characteristics in PV power production.Recently, artificial intelligence including artificial neural network (ANN) [11,12] and its variants such as extreme learning machine [13], support vector regression (SVR) [14], and Gaussian process regression [15] have been widely applied to renewable energy forecasting.In [16], a wavelet recurrent neural network (WRNN) was proposed for the prediction of energy production in a PV park.As for the day-ahead forecasting of hourly solar irradiance and PV power, ANN topped the methodologies for multi-input multi-output forecasting [17][18][19].
In the aforementioned studies on ANN based forecasting of PV power production, the learnable parameters such as weights and biases of an ANN were usually derived by minimizing the mean squared error on the training dataset.However, the mean squared error can be dominated by a few particularly large errors due to the sudden change in weather patterns that are difficult to predict.This can lead to poor asymptotic relative efficiency of the mean squared error based estimator in terms of estimation theory.
This paper contributes to developing a robust ANN model for day-ahead hourly forecasting of PV power based on a robust loss function, the pseudo-Huber loss, which combines the best properties of squared loss and absolute loss.The pseudo-Huber loss is less sensitive to large errors to train a more robust ANN model.The efficacy of the proposed method was validated on real PV power data by benchmarking against the generic ANN trained on the squared loss and the persistence model.Numerical experimental results showed that the proposed method outperformed the generic ANN model and persistence model in terms of root mean squared error and mean absolute error.

Methodology
In this section, the fundamentals of ANN will first be introduced, followed by the training of neural network based on the pseudo-Huber loss function.

Multilayer Perception Network
The proposed ANN model is based on a typical network structure, the multilayer perception (MLP), as shown in Figure 1.The MLP consists of the input layer, hidden layers, and output layer, and the model can be mathematically expressed as Equations ( 1) and ( 2): Sustainability 2018, 10, x 2 of 7 [8].These approaches are computationally expensive, making them difficult to use for short-term forecasting.In the early stages of PV power forecasting, statistical models such as autoregressive moving average (ARMA) [9] and its variants [10] were frequently used.However, these models are linear, which cannot capture the nonlinear characteristics in PV power production.Recently, artificial intelligence including artificial neural network (ANN) [11,12] and its variants such as extreme learning machine [13], support vector regression (SVR) [14], and Gaussian process regression [15] have been widely applied to renewable energy forecasting.In [16], a wavelet recurrent neural network (WRNN) was proposed for the prediction of energy production in a PV park.As for the day-ahead forecasting of hourly solar irradiance and PV power, ANN topped the methodologies for multi-input multi-output forecasting [17][18][19].
In the aforementioned studies on ANN based forecasting of PV power production, the learnable parameters such as weights and biases of an ANN were usually derived by minimizing the mean squared error on the training dataset.However, the mean squared error can be dominated by a few particularly large errors due to the sudden change in weather patterns that are difficult to predict.This can lead to poor asymptotic relative efficiency of the mean squared error based estimator in terms of estimation theory.
This paper contributes to developing a robust ANN model for day-ahead hourly forecasting of PV power based on a robust loss function, the pseudo-Huber loss, which combines the best properties of squared loss and absolute loss.The pseudo-Huber loss is less sensitive to large errors to train a more robust ANN model.The efficacy of the proposed method was validated on real PV power data by benchmarking against the generic ANN trained on the squared loss and the persistence model.Numerical experimental results showed that the proposed method outperformed the generic ANN model and persistence model in terms of root mean squared error and mean absolute error.

Methodology
In this section, the fundamentals of ANN will first be introduced, followed by the training of neural network based on the pseudo-Huber loss function.

Multilayer Perception Network
The proposed ANN model is based on a typical network structure, the multilayer perception (MLP), as shown in Figure 1.The MLP consists of the input layer, hidden layers, and output layer, and the model can be mathematically expressed as Equations ( 1) and ( 2): ( ) ( ) In Equations ( 1) and ( 2), X = (x1, x2, …, xM) and Y = (y1, y2, …, yQ) denote the M-dimensional and Qdimensional model input and output, respectively; ω and b represent the weights and biases of the network, respectively; f denotes the activation function; and the subscripts h and y stand for the hidden layer and output layer, respectively.In Equations ( 1) and ( 2), X = (x 1 , x 2 , . . ., x M ) and Y = (y 1 , y 2 , . . ., y Q ) denote the M-dimensional and Q-dimensional model input and output, respectively; ω and b represent the weights and biases of the network, respectively; f denotes the activation function; and the subscripts h and y stand for the hidden layer and output layer, respectively.
The learnable parameters including ω and b are usually obtained by minimizing the mean squared error with optimizing algorithms such as the Adam optimization [21].The mean squared error is sensitive to a few particularly large errors and can lead to a poor estimator.In this paper, the pseudo-Huber loss was applied to the training of the MLP.

Pseudo-Huber Loss
The pseudo-Huber loss function is defined in Equation (3) [22]: In Equation ( 3), δ is a controlling parameter.The pseudo-Huber loss function combines the best properties of squared loss and absolute loss that with small errors e, L δ (e) approximates e 2 /2, which is strongly convex, and with extremely large e, L δ (e) approximates a straight line with a slope of δ, which is less steep than the squared loss.This property of the pseudo-Huber loss makes it less sensitive to large errors.This paper took advantage of this property of the pseudo-Huber loss to train the MLP as the sudden change in weather patterns can result in large modeling errors.The objective function based on the pseudo-Huber loss for the training of the MLP is expressed in Equation ( 4): In Equation ( 4), e i,q = ŷi,q − y i,q for i = 1, . . ., N and q = 1, . . ., Q where i denotes the number of training data point and q indexes the output element, respectively, and y and ŷ denote the observed and modeling PV power, respectively.To improve the forecasting performance, swarm intelligence-based optimization algorithms such as the Jaya algorithm [23][24][25][26] can be adopted to optimize δ.

Data Description
The hourly PV power production between 1 January 2012 and 31 December 2017 of a PV plant installed at the Andre Agassi Preparatory Academy Building B (36.19N, 115.16W, elevation of 620 m) in the USA was used to verify the efficacy of the proposed MLP for day-ahead hourly PV power forecasting.The specifications of the PV power plant is shown in Table 1, and the data are available at https://maps.nrel.gov/pvdaq/.The histogram on the hourly power production is shown in Figure 2 where it can be observed that the hourly PV power production showed high variability, which induces great challenges for the forecasting model.
The hourly PV power produced over 2017 is illustrated in Figure 3 (data on some days were not available).It can be seen that the hourly PV power production showed strong seasonality and diurnal cycle.In the case study, day time data from 6:00 am to 19:00 pm including 14 h a day were considered.The input of the MLP model was composed of the PV power production of the last seven days for the hourly forecasting of the upcoming day.Hence, the dimensions of input vector and output vector were M = 7 × 14 and Q = 14, respectively.The total data were divided into two groups, the training dataset consisted of observations from 1 January 2012 to 31 December 2016 and the test dataset included data over the whole year of 2017.The data were not always available for the PV plant, so the real training and test data sizes were 1742 and 309, respectively.To simplify the training of the MLP model, all data were normalized to [0, 1] by dividing the nominal power.The operation of normalization also facilitated the comparison of forecasting performance between the different datasets.

Performance Metrics
To compare the forecasting performance by different methods, root mean squared error (RMSE) and mean absolute error (MAE) as defined in Equations ( 5) and ( 6) were employed.
( ) In Equations ( 5) and ( 6), ˆk p and pk for k = 1, …, K are the normalized forecasts and observations of PV power, respectively.

Numerical Results and Analysis
The forecasting performance of the proposed method based on robust loss function was compared with the generic MLP network trained by minimizing the mean squared error.The

Performance Metrics
To compare the forecasting performance by different methods, root mean squared error (RMSE) and mean absolute error (MAE) as defined in Equations ( 5) and ( 6) were employed.
( ) In Equations ( 5) and ( 6), ˆk p and pk for k = 1, …, K are the normalized forecasts and observations of PV power, respectively.

Numerical Results and Analysis
The forecasting performance of the proposed method based on robust loss function was compared with the generic MLP network trained by minimizing the mean squared error.The

Performance Metrics
To compare the forecasting performance by different methods, root mean squared error (RMSE) and mean absolute error (MAE) as defined in Equations ( 5) and (6) were employed.
In Equations ( 5) and ( 6), pk and p k for k = 1, . . ., K are the normalized forecasts and observations of PV power, respectively.

Numerical Results and Analysis
The forecasting performance of the proposed method based on robust loss function was compared with the generic MLP network trained by minimizing the mean squared error.The persistence model, pd,h = p d−1,h where the power production at hour h on the targeted day d was assumed to be equal to the observation of power production at hour h on the day indexed by d − 1, was also considered as a benchmark.The RMSE and MAE computed based on the whole test dataset for all of the forecasting methods are provided in Table 2.It can be observed that the proposed method performed better than the generic MLP model and the persistence model in terms of both RMSE and MAE.To provide insight into the forecasting performance for each hour, Table 3 gives the RMSE and MAE indexed by the hour.From Table 3, the proposed forecasting method outperformed the generic MLP model for each hour with a lower RMSE and MAE.However, the RMSE and MAE were greater in the middle of the day.At early and late hours (6:00 am, 18:00 pm, and 19:00 pm) in the day, the performance of the persistence model was better than the proposed method and the generic MLP.This is because PV power production at early and late hours are usually very small (in winter the power production at these hours can be zero) and there is little difference each day, which fits the persistence model well.The daily forecasting performance was also investigated as shown in Table 4.The daily forecasting of power production was computed by summing the forecasts of each hour in a day.It was also observable that the proposed method beat the generic MLP-based forecasting method and the persistence model for daily performance.The forecasting of PV power production by the proposed method compared with the observations and forecasts by the generic MLP model on consecutive days is depicted in Figure 4.It can be observed that the proposed method well captured the evolution of hourly PV power production and the forecasting errors by the proposed method were generally smaller than the generic MLP network.The forecasting of PV power production by the proposed method compared with the observations and forecasts by the generic MLP model on consecutive days is depicted in Figure 4.It can be observed that the proposed method well captured the evolution of hourly PV power production and the forecasting errors by the proposed method were generally smaller than the generic MLP network.

Conclusions
In this paper, a robust MLP network was proposed for day-ahead hourly forecasting of PV power production.The generic MLP network is usually trained by minimizing the mean squared error; however, the mean squared error loss is sensitive to a few particularly large errors, which can result in an estimator with poor asymptotic relative efficiency.To tackle this problem, this paper adopted the pseudo-Huber loss, which combines the best properties of squared loss and absolute loss.
The efficacy of the proposed method was validated by testing on real PV data.The numerical experiments demonstrated that the proposed method outperformed the generic MLP network in terms of both RMSE and MAE for various time scales.This study suggests that the pseudo-Huber loss can be employed to optimize artificial intelligence-based approaches in handling solar data.

Conclusions
In this paper, a robust MLP network was proposed for day-ahead hourly forecasting of PV power production.The generic MLP network is usually trained by minimizing the mean squared error; however, the mean squared error loss is sensitive to a few particularly large errors, which can result in an estimator with poor asymptotic relative efficiency.To tackle this problem, this paper adopted the pseudo-Huber loss, which combines the best properties of squared loss and absolute loss.
The efficacy of the proposed method was validated by testing on real PV data.The numerical experiments demonstrated that the proposed method outperformed the generic MLP network in terms of both RMSE and MAE for various time scales.This study suggests that the pseudo-Huber loss can be employed to optimize artificial intelligence-based approaches in handling solar data.

Figure 2 .
Figure 2. Histogram on the hourly power production.

Figure 2 .
Figure 2. Histogram on the hourly power production.

Figure 2 .
Figure 2. Histogram on the hourly power production.

Table 1 .
Specifications of the PV power plant.

Table 1 .
Specifications of the PV power plant.

Table 1 .
Specifications of the PV power plant.

Table 2 .
RMSE and MAE on the test dataset.

Table 3 .
RMSE and MAE for each hour in the test dataset.

Table 4 .
Daily forecasting performance on the test dataset.