# Generation forecasting DER level in short (6-24 hours), very short term (15 minutes-1-hour ahead)

**8. Generation forecasting DER level in short (6-24 hours), very short term (15 minutes-1-hour ahead)**

**8.1 Rationale & Link to BEYOND Apps**

The short-term and very short-term energy prediction at DER level can play an important role in the day-to-day control and scheduling of building assets towards maximizing self-consumption and defining highly effective energy management strategies at building level. In this context, generation forecasts at the very short and short-term will be made available in the BEYOND AI Analytics Toolkit to, subsequently, feed with valuable insights and knowledge the Self-consumption optimization features of the Digital Twin environment (BEPO), resulting from the activities of T6.1, as well as, to the PEASH application for the visualization of energy generation forecasts in the Personal Energy Analytics dashboard (without excluding their reusability in other applications that may need to enrich their feature list in the future).

**8.2 Overview of relevant implementations**

The task of short-term energy generation forecasting in literature is typically viewed as a time series problem that is dealt with several approaches coming from statistics and artificial intelligence (AI). The statistical approaches usually involve probabilistic or linear regression models, and variations of the Auto-Regressive Moving Average (ARMA) model (e.g., ARIMA, SARIMA). Some recent examples on PV generation forecasting implementations are:

• the SARIMAX method, that integrates SARIMA model with exogenous factors (e.g., weather) [1]

• A hybrid SARIMA-SVM model [2]

The artificial intelligence relevant implementations include machine learning (ML) and deep learning (DL) techniques, such as:

• Day ahead PV forecasting with Multilayer Perceptron (MLP), also known as fully connected feedforward neural network (FFNN), [3][4]

• Recurrent Neural Network (RNN) and LSTM, [5]

• Convolutional Neural Network (CNN), [6]

• Support Vector Machines (SVM), [7]

• XGBoost tree ensemble, [8]

• Hybrid DL models [9] [10]

AI models demonstrate higher performance for very short and short term predictions compared to statistical approaches, since they can easily integrate more than one, time-dependent, input variables and capture non-linear temporal relationships between the inputs [11]. The main input variables that contribute to the forecasting accuracy are climatological conditions (such as solar irradiance, temperature, etc.) and calendar features (such as time of day, type of day, etc.).

**8.3 Implementation in BEYOND**

In BEYOND, the proposed methodology employs deep learning to train a multi-layer feedforward neural network (FFNN/MLP) so as to predict, 24 hours ahead, the PV generated power using historical data (i.e., 24 hours lag) and a day ahead weather forecast. The required data pre-processing steps are the following:

1. Nullify outliers and erroneous entries (cleaning)

2. Fill-in missing values using interpolation through padding

3. Perform resampling to 1 hour or 15 mins

4. Add extra features, like hour of the day and month

5. Perform normalisation

6. Reshape dataset with lagging features so as to be ready for multi-variable, multi-step time series supervised learning.

7. Split dataset into train, test and validation set (analogy 0.7/0.2/0.1).

For evaluation, the RMSE, the normalised RMSE (nRMSE), the NMAE and MAPE metrics were employed, since these metrics are mostly encountered and compared in the relevant literature.

**8.3.1. Data inputs and Analytics Pipeline (incl. assumptions /limitations)**

The input data used for training and validating the model derive from a publicly available dataset provided by the Solar Tech Lab, Politecnico di Milano [12]. The dataset contains recordings with a 1 min sampling interval of the output power of a PV module for a full year (2017), as well as the respective air temperature (°C), global horizontal irradiation (W/m²), global irradiation on the plane of the array (W/m²), and wind speed (m/s). The analytics pipeline includes the required data pre-processing steps (see previous paragraph), the training and testing of the model, as well as the evaluation of the results. During model development, the night hours when there is no power output were excluded from computations since they provide no information. A limitation of the proposed method is that it relies on an exogenous weather forecast, the accuracy of which can affect the performance of the proposed model.

**8.3.2. Analytics Libraries Employed**

The python libraries used for data manipulation and data analytics are the following:

• Pandas

• Keras tensorflow

**References**

[1] Vagropoulos, S. I., Chouliaras, G. I., Kardakos, E. G., Simoglou, C. K., & Bakirtzis, A. G. (2016, April). Comparison of SARIMAX, SARIMA, modified SARIMA and ANN-based models for short-term PV generation forecasting. In 2016 IEEE International Energy Conference (ENERGYCON) (pp. 1-6). IEEE.

[2] Bouzerdoum, M.; Mellit, A.; Massi Pavan, A. A hybrid model (SARIMA–SVM) for short-term power forecasting of a small-scale grid-connected photovoltaic plant. Sol. Energy 2013, 98, 226–235.

[3] Nespoli, A., Ogliari, E., Leva, S., Massi Pavan, A., Mellit, A., Lughi, V., & Dolara, A. (2019). Day-ahead photovoltaic forecasting: A comparison of the most effective techniques. Energies, 12(9), 1621.

[4] Omar, M., Dolara, A., Magistrati, G., Mussetta, M., Ogliari, E., & Viola, F. (2016, November). Day-ahead forecasting for photovoltaic power using artificial neural networks ensembles. In 2016 IEEE International Conference on Renewable Energy Research and Applications (ICRERA) (pp. 1152-1157). IEEE.

[5] Chen, B., Lin, P., Lai, Y., Cheng, S., Chen, Z., & Wu, L. (2020). Very-short-term power prediction for PV power plants using a simple and effective RCC-LSTM model based on short term multivariate historical datasets. Electronics, 9(2), 289.

[6] Lu, H. J., & Chang, G. W. (2018). A hybrid approach for day-ahead forecast of PV power generation. IFAC-PapersOnLine, 51(28), 634-63

[7] Li, J., Ward, J. K., Tong, J., Collins, L., & Platt, G. (2016). Machine learning for solar irradiance forecasting of photovoltaic system. Renewable energy, 90, 542-553.

[8] Bae, D. J., Kwon, B. S., & Song, K. B. (2021). XGBoost-Based Day-Ahead Load Forecasting Algorithm Considering Behind-the-Meter Solar PV Generation. Energies, 15(1), 128.

[9] Wang, F., Zhang, Z., Liu, C., Yu, Y., Pang, S., Duić, N., ... & Catalão, J. P. (2019). Generative adversarial networks and convolutional neural networks based weather classification model for day ahead short-term photovoltaic power forecasting. Energy conversion and management, 181, 443-462.

[10] Wang, F., Xuan, Z., Zhen, Z., Li, K., Wang, T., & Shi, M. (2020). A day-ahead PV power forecasting method based on LSTM-RNN model and time correlation modification under partial daily pattern prediction framework. Energy Conversion and Management, 212, 112766.

[11] Lee, D., & Kim, K. (2019). Recurrent neural network-based hourly prediction of photovoltaic power output using meteorological information. Energies, 12(2), 215.

[12] Politecnico 2017, Politecnico Milani Italy, PV dataset from SolarTech Lab,

http://www.solartech.polimi.it/activities/forecasting/dataset

Back to BEYOND_Baseline_Analytics