# Short-Term Power Forecasting Framework for Microgrids Using Combined Baseline and Regression Models
## 7 Conclusions  
As previously mentioned, forecasting is an essential tool for energy management. Many approaches apply online training, which can increase the daily computational cost (as the system must perform tasks related to updating the model daily) and does not usually involve tests with many different dataset types. Therefore, this paper presents a methodology for power variable forecasting that provides multiple combinations of information inputs and techniques without necessarily requiring online training. Therefore, model updating can be performed every few days or even every few weeks, when the inclusion of newly available historical data is desired to retrain the models. This characteristic permits a reduction of the daily computational cost incurred by the proposed framework according to current needs. The proposed methodology provides recommendations on how to perform the analysis, which indicators can be used, and how to select the best indicators for the case under study. Specifically, it was applied to a university campus in Italy and used for the prediction of five different power variables. Remarkably, in the proposed methodology, it is important not only to identify the best obtained model, but also to retain the information of the best model for each type of input information required. This approach makes it possible to use another model for which the system has the required inputs if for a certain day a portion of the information is missing (e.g., the weather forecast is not received). In this way, the feasibility and robustness of the system is increased, lowering the probability of failure during the forecasting process. This methodology can be used by all the actors involved in flexibility services and/or the energy management of microgrids, i.e., DSOs, aggregators, and customers. The applied methods include the definition of rule-based baselines, which perform forecasts using the measurements of the previous days obtained under different criteria and machine learning techniques (random forests and neural networks). Moreover, the proposed baselines are included as inputs of machine learning methods, which has been shown to improve the quality of the forecasting. Notably, the types of datasets that can be created depend on the available information, such as the mentioned baselines, weather data, calendar information, and other data of interest (such as occupancy in cases regarding certain types of buildings). Moreover, the forecasting horizon can also change depending on the application. In the present case study, the prediction horizon is one day, but the same models could be trained and tested using other horizons. The only requirement is to adapt the input datasets with the information that is available in the considered horizons. The presented case study shows that an MLPR outperforms an RFR for the majority of the variables (except for the forecasting of the PV generation, _pv_). Moreover, the inclusion of external baseline (EXBL) information from the campus load (_lc_) yields a forecast improvement over those of the models in which EXBLs are not included. From a global point of view, the presented experiments show that the proposed models achieve an accuracy improvement of up to 62% over that of the reference model. Conceptualization, A.P. and S.B. ; methodology, A.P., S.B., E.P. and D.F.L. ; software, A.P. ; validation, E.P., D.F.L. and S.B. ; formal analysis, S.B. and A.P. ; investigation, A.P. and S.B. ; writing--original draft preparation, A.P. and S.B. ; writing--review and editing, E.P., D.F.L., C.L. ; visualization, A.P. ; supervision, S.B., F.D. and C.L. ; project administration, S.B., F.D. and C.L. ; funding acquisition, C.L. All authors have read and agreed to the published version of the manuscript.