# Long-Term Forecasting Potential of Photo-Voltaic Electricity Generation and Demand Using R
## 1 Introduction  
Increasing the share of renewable energy is crucial to overcome climate change, and to target 7.2 of the sustainable development goals to be reached by 2030. Micro-grids are increasingly becoming more popular as solutions for helping to reach renewable energy goals [1]. Micro-grids allow for local energy production, often combined with local energy storage, and often combined with an awareness or ambition to reduce overall energy demand. As micro-grids involve the management of both energy production and demand, both of these sides need to be predicted simultaneously in order to generate future cost benefit analyses. What we have found is that there is still a wide gap between predicting energy production and demand, in terms of scale, time, methodology, and software. In this study we aim to determine the potential of long-term forecasting (at least one year) of energy production and demand on the scale of a research building by means of programming with the software R and applying linear, non-linear, and support vector regression. The research buildingin question is the National Institute of Materials Science (NIMS) NanoGREEN/WPI-MANA building in Tsukuba, Japan, which has a micro-grid consisting of four arrays of solar panels and has been in operation since 2013. The raw data per second of this micro-grid contained gaps and erroneous data, which have been cleansed in a previous study as described [2]. Using the improved data records from 2015 to 2017, we evaluated the potential of predicting future energy demand and energy generation. Published studies on optimizing building energy consumption have increased 10 fold in the past 10 years [3]. This has included numerous variations of machine learning studies, which have explored either the forecasting of building energy demand [4], or renewable energy generation and weather patterns (for solar irradiance) [5], separate from each other. However, for micro-grid costs estimations it is necessary to consider these two factors simultaneously. A second shortcoming of previous studies is that they tend to focus on short term predictions and neglect long-term predictions. For micro-grid cost and benefit analyses we require long-term future predictions of the amount of solar power generated and the energy demand of the building. What is considered long- and short-term is defined differently for energy demand and weather prediction, as seen in Appendix A. According to the sources in Appendix A, the long-term for solar irradiance, our main weather parameter of interest, ranges from one day to two months, whereas for energy demand this is 1-10 years. Ideally it would be useful to predict the costs and benefits of the micro-grid one year ahead, with monthly averages and hourly estimates, as the electricity price varies per hour. We expect to see reduced solar power generation over time as the efficiency of the solar panels decreases, and an increase in building energy demand due to higher occupancy and laboratory use over the years. So far no study has considered how to incorporate both energy demand and solar power generation by means of machine learning for the long-term of one year. To reach this, it is important to consider not just the optimum results from higher-level regression analysis, but also the underlying physical and chemical mechanisms causing the found results in the actual data and suggest practical solutions based on these principles. The hypotheses for solar power generation are the following. [PERSON] et al. [6] showed a linear relationship between solar power generation and solar irradiance. However, it is also shown by [PERSON] et al. [7] that temperatures higher than 25 degrees Celsius negatively affect the capability of crystalline silicon to generate electricity. Similarly, it should perform between 1 and 1.1 times the normalized efficiency between 25 and 0 degrees Celsius, and presumably even high at colder temperatures. It is therefore expected to see an influence of temperature as well.