A Physical Hybrid Artificial Neural Network for Short Term Forecasting of PV Plant Power Output

The main purpose of this work is to lead an assessment of the day ahead forecasting activity of the power production by photovoltaic plants. Forecasting methods can play a fundamental role in solving problems related to renewable energy source (RES) integration in smart grids. Here a new hybrid method called Physical Hybrid Artificial Neural Network (PHANN) based on an Artificial Neural Network (ANN) and PV plant clear sky curves is proposed and compared with a standard ANN method. Furthermore, the accuracy of the two methods has been analyzed in order to better understand the intrinsic errors caused by the PHANN and to evaluate its potential in energy forecasting applications.


Introduction
The electricity produced by renewable energy sources (RES) is constantly increasing worldwide thanks both to government policies and technological advancements.Europe has experienced one of the largest growths in the last five years and the electricity generation by RES, especially photovoltaic and wind, has increased sensibly.
In this context of distributed energy resource (DER) systems, issues of demand response, control, storage, regulation and appropriate forecast techniques arise in the operation of energy management.Renewables integration into the grid necessarily requires the capability of managing the uncertainty related to fluctuating output and intermittent sources like for example wind or solar irradiance.Thus, forecasting models' accuracy plays a crucial role in the future smart grid progression in order to drive off traditional power distribution systems [1,2].Even the probable future widespread diffusion of electric vehicles in smart cities increases the complexity of microgrid energy systems requiring scheduling models and advanced methods to manage such uncertainty.
Thus, the challenges of controlling and maintaining energy from inherently intermittent sources, and the development of grid-connected RES penetrating the distribution systems involves many complex aspects at the same time: storage efficiency, reliability, safety, stability of the grid and ability to accurately forecast energy production.Furthermore, in countries with a day-ahead electricity market, large power plants based on RES can act as any other electricity producer, providing power generation sale offers (bids) to actively participate in the market.In electricity markets in fact, when a power producer does not follow the scheduled bid it is penalized with remunerations lower than those established in the market for those hours with deviation between the electric energy actually produced and that presented in the original bid [1,3].Very similar, in terms of economic impact, is the problem of RES energy imbalance management due to the difference between forecasted and real injections of energy into the grid.
The stochastic input from the RES as a consequence brings problems in balancing the energy supply and demand, and, in a power market perspective, different fees and marginal prices for over-and under-generation [4].Some countries have already defined technical specifications for energy time scale forecasting required for power dispatching plans and operations of grid-connected PV plants [5].Thus, forecasting of RES power generation is vital to help grid operators better manage the electric balance between power demand and supply, and to improve the penetration of distributed renewable energy sources and, in stand-alone hybrid systems, for the optimum size of all its components and to improve the reliability of the isolated systems [2].
In order to make energy supply planning rational, forecasts of RES production have to be made on the basis of the weather conditions.Any output from the weather models must then be converted into electric energy output.
In recent years several short-term power forecasting models related to PV plants have been published.The existing solutions can be classified into the categories of physical, statistical and hybrid methods.Some of these models for PV plants were at first oriented to obtain solar radiation predictions [5][6][7].Some works present models specifically dedicated to the hourly power generation forecasting in PV plants [8][9][10][11].The most applied technique in these forecasting models is a specific soft-computing technique known as Artificial Neural Networks (ANNs) but some papers use simple physical methods [3,12,13].Furthermore, in order to define the accuracy of the prediction, some error indexes are introduced to evaluate the performances of the forecasting models.Some of these definitions come from statistics while others originate from regulatory authority for market issues [3,5,14,15].The errors introduced by ANNs and physical methods sometimes are already too high for electricity market and RES imbalance issues.
This paper presents a new auxiliary hybrid system [16] model that combines a soft-computing model based on ANN and physical models of the total global irradiance (the clear sky curve) for medium-term power of a PV plant.The results are compared to those ones coming from a statistical ANN method.The comparison is based on experimental activities carried out by a real PV power plant.
The paper is organized as follows: Section 2 provides a brief review of the hourly energy production forecasting methods.In Section 3, the new proposed hybrid methods is presented and explained.Section 4 reports and revises some error indexes that can be effectively used to evaluate the performances of forecasting models.In Sections 5 and 6 a case study reporting results achieved by comparing several simulations related to a real PV production plant is discussed.Finally, we draw some conclusions outlining additional research directions for future works.

Energy Forecast Models
RES energy production forecasting methods are commonly divided in different categories: physical, stochastic and hybrid.An analysis of state-of-the-art approaches is proposed in [12].In physical models the ability of a RES plant to convert the introduced meteorological resources into electrical power are summarized by a physical-analytical model [3].These models can be very simple, based only to the global solar irradiance, or more complicated if they include additional parameters.As a matter of fact, it is not easy to predict PV module energy production since it depends on several parameters such as ambient and PV cells conditions.For example, the conversion process is affected by solar irradiance, cell temperature, the solar incidence angle and the load resistance.Moreover, information provided by manufacturers is usually limited and only at nominal operating conditions.The major disadvantages of these models are that they are highly sensitive to the weather forecasting and they have to be designed specifically for a particular plant and location.Physical methods are mainly used for their deterministic approach, allowing them to be the winning choice in terms of getting quickly the results by means of a mathematical model.As they analytically match inputs to the outputs they act like a "white-box".None the less, their drawback appears when the mathematical problem becomes too complex considering all the parameters to describe the physical system.
Statistical methods are based on the concept of persistence, or stochastic time series.Nowadays the most common approach to forecast a time series' future values approach is the use of machine learning methods.Reviewed literature shows that artificial neural networks (ANN) have been successfully applied for forecasts of fluctuating energy supply.ANNs are based on the combination of neurons, connections and transfer functions with several learning algorithms.These methods learn to recognize patterns in data using training data sets.After learning, an ANN represents a high-dimensional non-linear function.
They act essentially as a "black box" performing the assigned tasks for the user.They have two main drawbacks: the need of the proper size historical dataset and, even when performing very similar tasks, the proper choice of network parameters.Both of them can vary widely.These last parameters definition including training algorithm, learning rate, neural network structure and the hidden layers size, are often chosen after a long trial-and-error process [9,17].
Any combination of two or more of the previously described methods is a hybrid model.The idea is to combine different models with unique features to overcome the single negative performance and finally improve the forecast [15].Hybrid systems combine different techniques ("paradigms") to overcome weaknesses and gain strengths.According to their different groupings they can be: sequential, auxiliary and embedded.Our new proposed hybrid system is an auxiliary one as the first paradigm passes its output to the second in order to generate the output [16].
Recently, some papers show that all these methods need a phase of "pre" and "post-processing" of the data in order to increase the forecasting accuracy [13].This idea has been used by several authors with different stochastic methods also in combination with physical model to forecast the Power output of a PV plant.For instance in [18] a Time Delay Neural Network (TDNN) is used to perform the one-hour-ahead forecast starting from the air temperature and the clearness index previously obtained by two Non Linear Artificial Neural Network (NAR) based models.From the forecasts of these parameters the PV module's power production is calculated by a physic model.
In [19] the meteorological data provided by the meso-scale model (GPV-MSM), the weather forecast system of the Japan Meteorology Agency, both with the cloudiness and the extraterrestrial insolation data are numerically calculated, in order to perform a vector regression forecast one-hour-ahead, while in [20] the authors develop two models based on ANNs to forecast the output of a PV plant 24 h ahead starting from the insolation data.This model also uses data from GPV-MSM meso-scale model.
In [21] the authors presented a statistical short-term forecasting system, from 1 h up to 39 h ahead, for a grid-connected photovoltaic (PV) plant.The proposed system includes three modules composed by two numerical weather prediction models and an artificial neural network based model.
In [22] the authors predict the normalized Clear Sky Irradiance 36 h ahead, by using a stochastic method based on an autoregressive with exogenous input (ARX) model.The input data are provided by the HIRLAM meso-scale NWP model.
In [23] the authors make a short-term prediction by a multilayer perceptron (MLP), a typical ANN architecture model, of the output energy from a PV plant.The MLP has some physic data in input such as the solar azimuth angles and the solar elevation, the solar radiation data and the dry bulb temperature.Then a sensitivity analysis of the number of neurons in the hidden layer is here presented.
In this paper [24] an ANN-based approach to forecast the power output of a PV plant at 24 h ahead is proposed.The authors use a feed-forward Neural Network (FNN) with an improved back-propagation learning algorithm in order to overwhelm its weaknesses.Then the authors use a physic model to calculate the PV output power starting from previously forecasted temperature and irradiation values.
Another example of hybrid methods, even if they are not strictly equivalent to the former definition, can be found in other papers.In [25] the authors couple two stochastic methods, wavelet time series analysis with the ANN, and perform one-hour-ahead PV output forecasting and finally in [26] the authors use two dynamic NNs to forecast 1 h ahead the power yield of PV plant.

The New Proposed Hybrid Method
The new proposed hybrid method in this paper, called Physical Hybridized Artificial Neural Network (PHANN), combines an artificial intelligence technique (ANN) with an analytical physical model: the Clear Sky solar Radiation Model (CSRM).This is a theoretical model of the solar radiation-without cloudsfor the specified location, computed according to the geographical coordinates of the PV plant site [27].
The aim of CSRM is to determine the time span between the sunrise and the sunset of each day and to set a limit to the maximum daily available solar radiation.Therefore PHANN wants to unify the best features of both ANN and physical method acting like a "grey-box".
Unlike commercial software commonly employed in the design of buildings (such as TRNSYS [28]) that use solar irradiation databases or TMY to simulate solar processes and other renewable energy sources, in order to forecast the yearly energy production, it is worth noting that the proposed method was suitably developed for forecasting of power output 24-72 h ahead.In particular the novelty of the proposed method is that, starting from the available historical data of a real PV plant in a specific place and historical data of a weather forecasting service for the same location, it is capable to predict the daily PV power profile more accurately.In particular, while in [29] a preliminary analysis was conducted considering different training periods to predict a whole year production, here we employ the next day mobile window forecast, which will be presented in detail in Section 6.This method is useful and easy to use, to make a 48 h ahead forecast with a good reliability, directly of the PV system power output and not going through the solar irradiance.The here proposed method follows three steps, as shown in Figure 1: 1. Set up: all the parameters should be arranged, such as number of hidden layers, training data set size, etc. for the ANN training, whereas longitude, latitude, tilt and azimuth for the CSRM.2. Forecast: as the ANN is trained, it is able to forecast the expected PV output power, receiving the weather forecast and the theoretical clear sky solar radiation in input.3. Error: different error definitions are evaluated after the forecasting, by comparing it with the measured PV output power.

Set Up
This step includes all those phases needed to prepare the physical method and the forecast by ANN.That is, all the parameters for the CSRM such as longitude, latitude, tilt and azimuth are set in this phase.This step also includes setting the ANN parameters such as the number of neurons in each hidden layer, the training data set size, number of iterations, etc.This allows, to cast a supervised learning of the PHANN, employing the output power measured on the PV systems and the historical weather data set.The training of the ANN consists in the updating of the weights between the neurons in the different layers as an ongoing cycle in several iterations comparing the expected data with the historical-actual ones.On each iteration the existing links between the different input variables are recognized and the weights are updated [13].

Forecast
The second step (see Figure 2) includes the forecasting process itself: after the tool has been trained, it can be used to predict the output power of the PV system.The inputs of the tool are: -the weather forecasts provided by the Meteo service; -the CSRM curve.
The output of the tool is the expected power produced by the PV plant for the next 24, 48 or 72 h according to the weather forecast time horizon in input.ANN methods are iterative procedures with a stochastic base: in fact, at the first iteration, weighted links among neurons are randomly set, then they are optimized during iterations in order to minimize the error.For this reason the resulting forecasts often depend on the initial guess of a specific trial.Therefore different trials can provide slightly different results.In the proposed procedure the final profile is the average of predictions resulting from several independent trials run in parallel.This is called "ensemble method".

Error
After this phase, the result accuracy assessment is carried out according to the error definitions discussed in the next paragraph, by comparing the actual output power measured in the PV systems with its forecast.The aim of this phase is to tune the system in order to reduce the error.

Error Definitions
In order to correctly define the accuracy of the prediction and its relative error, it is necessary to define some error indexes which will be used to evaluate the performance of the forecasting models.Some of these definitions come from statistics, others have been introduced by regulatory authorities for market issues; i.e., in [14] several definitions are presented by the Authority for Electricity and Gas in Italy (AEEG): these error definitions differ significantly, therefore here we will report some of the most significant.
The starting reference is the hourly error eh defined as the difference between the average power Pm,h produced (measured) in the hour h and its prediction Pp,h provided by the forecasting model [3,5,14]: From this basic definition, other definitions can be introduced: Absolute hourly error eh,abs, which is the absolute value of the previous definition (eh can have both positive and negative values): Hourly error percentage e%,p, if it is based on the hourly output expected power Pp,h, or e%,m, if it is based on the hourly output measured power Pm,h: || 100 Hourly errors are very important in terms of market of energy and imbalances, because fares are updated every hour.These e%,p and e%,m errors have been compared in [14].
Normalized mean absolute error NMAE % , based on the plant capacity: where C is the net capacity of the plant: here for C we will use the rated power of the PV system.In some papers (i.e., [15]) this is also called Mean Relative Error (MRE).
Weighted mean absolute error WMAE % , based on total energy production: (5) Normalized root mean square error nRMSE % , based on the maximum observed power output Pm,h: where N represents the number of samples (hours) considered: usually it is referred to a day, a month or a year.NMAE% is largely used to evaluate the precision of predictions and trend estimations.In fact, often relative errors are large because they are divided by small power values, for instance the low values associated to sunset and sunrise: in such cases, WMAE% could result very large and biased, while NMAE%, by weighting these values with respect to C, is more useful.The nRMSE% measures the average magnitude of the absolute hourly errors eh,abs.In fact it gives a relatively higher weight to larger errors, thus allowing one to emphasize particularly undesirable results.

Case Study
This section describes the forecasts achieved by comparing the results of several simulations by means of the two different models: The main objective is to compare the accuracy of the forecasts first using the ANN method and then adding the CSRM in the input into the PHANN one.In this case, the considered ANN structure is the so-called Multi-Layer Perceptron (MLP), whereas the training procedure (training) for the neural network is the Error Back Propagation (EBP) with the Levenberg-Markquard algorithm.The mean square error (MSE) is adopted as the error definition during the learning process.The ANNs with the same settings have been trained with the same data set, and the forecasting activity was performed as described in Section 3.Besides the comparison of two models after the error assessments is lead.Finally the results of some significant days are presented.
Furthermore the procedure described above has been developed varying the training set (in terms of number of days in the time frame) to improve a sensitivity analysis of the errors committed by the methods.To verify the performance of the forecasting ANN and PHANN models the NMAE%, WMAE% and nRMSE% errors are reported.

System Description
The considered PV plant is located in the north of Italy and its rated power is 264 kWp.It is composed of several polycrystalline silicon photovoltaic panels fixed on the roof of a factory, 19 tilted, facing south.These information have been used to suitably set up the CSRM.While the PV plant hourly electric power generation data are recorded with measurement equipment placed at the location, 72 h ahead meteorological predictions are obtained by a weather forecasting service.In fact, weather predictions and CSRM data correspond to the input of the implemented neural network: this historical dataset is used in conjunction with the measured PV output power to train the ANN in order to predict the next 48 h PV power output.A total of 240 days (eight months) is covered (starting from 1 January 2012).

Set Up of the Two Models and Tests
With reference to the prediction of the hourly production relative to 24 h, the analysis are performed using a multilayered perceptron with the following characteristics: ˗ nine neurons in the first layer; ˗ seven neurons in the second layer; ˗ sigmoid activation function in the single neuron; ˗ 3000 iterations for EBP training.This configuration has been already tested in previous works [14,30,31] and it was found to be a good compromise in terms of effectiveness and time-efficiency.The training set is extracted from the whole data set of 240 days according to the mobile window approach explained in the following.
For each considered simulation, we produce an ensemble of 10 independent forecasting models, trained in parallel.As reported above, the resulting forecast of the output power profile is the average of the 10 trials' time profiles.

Results
The forecasting activity is performed in order to evaluate the accuracy of the two methods by comparing the previously exposed daily error definitions according to different forecasted time periods (1 day and 30 days).Moreover different training data sets (60, 90 and 120 days) are considered.Finally some significant days are presented to emphasize the efficiency of the PHANN method in comparison to the classical ANN one.

Comparison among Errors Definitions and Methods
The comparison of the two methods starts with the PV power daily output forecast of the first day after a specific training period: the so called "next day forecast".The size of the training period can be 60, 90 or 120 days.This is repeated with a mobile window technique, moving forward the next day forecast according to the new available data set as shown in Figure 3, and re-training the network.Thus all the results reported in the following measure the network's ability to generalize.The different error definitions are computed for each forecasted day. Figure 4 shows the results in terms of NMAE%, nRMSE% and WMAE% for the ANN (blue line) and PHANN (red line) methods, considering 120 training days for each single day in the 180-240 time frame.The reported errors show that most days, the PHANN method is significantly more accurate than the ANN method.In particular this advantage is quantitatively more significant considering NMAE%, and WMAE%, which reach almost 50% reduction of the error in many days; for the nRMSE% although this reduction is lower, a non-negligible advantage is obtained in most of the days.Similar results have been found considering also the training data sets of 60 and 90 days and different forecasted periods.Generally, some similarities can be noticed among the trends of NMAE%, nRMSE% and WMAE%.However in some specific days the different error definitions have different behaviors, showing those peculiarities anticipated in Section 4.

Training Time Period Sensitivity Analysis
The accuracy of the two methods has been assessed on a longer forecast time frame (30 days) again by varying the length of the training set (60, 90 or 120 days).Now, the next day forecast is repeated for 30 days, keeping the same trained models for the whole time frame.The error definitions are applied to this entire period.By doing this, the robustness of the two methods can be evaluated considering different periods of the year.Figure 5 shows, for instance, how this process works for the PV output forecasting in the period from 151th to 180th day.A quantitative comparison between the two methods is shown in Table 1.It is generally accepted that the larger the training dataset size is, the lower the errors are.However, some peculiar weather conditions play an important role: i.e., in the considered 240 days dataset we know that snow occurred from days 27 to 53, 66 and 67.Moreover, a few days after (days 101, 104 and 105), the actual weather conditions were bad (overcast sky and heavy rain).It can be noted how these bad weather conditions, highlighted in Figure 5, affected the forecasting reliability.In fact, even with long training sets, the global forecasting accuracy was lowered when these particular weather conditions were included in training.
In particular, looking at the 121-150 and 181-210 cases, the 90-and 120-days training sets take into account a greater number of days with peculiar wheatear conditions than 60-days training set.In the 211-240 case, the 120 days training set takes into account some days with peculiar wheatear conditions that are not involved in 60 and 90 days training set.In the 151-180 case, the number of days with peculiar wheatear conditions reduces as the training set grows.
From the results reported in Table 1 we can see that in all the considered cases the hybrid method outperforms the ANN alone.Moreover, it is clear from these results that both quantity and quality of the samples in the training set are critical.

Some Significant Days
Finally, some significant days have been taken into account in order to evaluate the forecast accuracy of the two different methods with different weather conditions.The accuracy of the forecasts, performed with the same settings listed in paragraph A and with 120 days of training, are evaluated for these three typical weather conditions: i.e., a sunny day with sunny weather forecasts (Figure 6), an unstable day (Figure 7), and an extremely cloudy day (Figure 8).These figures show the trends of the PV plant predicted power obtained by using ANN (PpANN) and PHANN (PpPHANN) methods and the measured power (Pm) based on the rated power of the plant (C); the irradiance provided by the weather forecasts service (Gp) and the measured irradiance (Gm) based on the irradiance at the standard test conditions (GSTC = 1000 W/m 2 ).It can be noticed how the new PHANN method is more effective than traditional ones especially with sunny days, where the error reduction reaches 50%, as shown in Figure 6.All the error indicators increase during unstable days, when the weather conditions suddenly change with time, as reported in Figure 7; moreover a significant increase in WMAE% is registered in extremely cloudy days, as shown in Figure 8.In fact, these conditions are a big challenge for weather forecast, since it is very difficult to predict with accuracy the change of the weather in the right time.Finally these figures show the remarkable importance the weather forecasts accuracy plays on the energy production forecasting, regardless of the method.

Conclusions
Forecasting tools play a crucial role for solving problem related to RES energy integration in smart grid models.In this paper a new hybrid forecasting method, by means of an artificial neural network mixed with the clear sky solar radiation model is presented.The results from the error assessment, according to the error definitions here explained, lead to the conclusion that the hybrid method is more accurate than just the ANN even changing some settings in the neural network.Besides it has been emphasized that the accuracy of these methods, ANN above all, is strictly related to the historical data preprocessing phase and to the accuracy of the historical weather forecast data used for the training phase.The trend of the errors clearly shows how the accuracy in all the considered day-types is higher with PHANN in comparison to the ANN method, although in partially cloudy and cloudy days the overall efficiency decreases.Some improvements are therefore connected to the reliability of the weather forecast and to the pre-processng of the raw data used to train the network.Additional research directions for future works will include day clustering in the training dataset, to properly forecast the next day production according to the specific day-types.

Figure 1 .
Figure 1.Block diagram of the PHANN method.

Figure 2 .
Figure 2. The forecast process used in PHANN method.

Figure 3 .
Figure 3. Next day mobile window forecast with different number of training days considered.

Figure 4 .
Figure 4. Daily error definitions evaluated for two methods comparison with 120 days of training.

Figure 5 .
Figure 5. Scheme of the 30 consecutive forecasted days with a different size of the training period.

Figure 6 .
Figure 6.Power curves and daily error definitions applied to the forecasts in a sunny day.These trends are in agreement with the weather forecast provided by the Meteo service.

Figure 7 .
Figure 7.Power curves and daily error definitions applied to the forecasts in an unstable day.These trends are in agreement with the weather forecast provided by the Meteo service.Nevertheless it wasn't able to forecast the precise time when the instability appeared.

Figure 8 .
Figure 8. Power curves and daily error definitions applied to the forecasts in a cloudy day.These trends are in agreement with the weather forecast provided by the Meteo service.

Table 1 .
Errors as a function of the size of the training set and of the different period of the year.