Forecasting the Electricity Capacity and Electricity Generation Values of Wind &Solar Energy with Artificial Neural Networks Approach: The Case of Germany

ABSTRACT Recently, studies on energy estimation have been developing rapidly to increase the efficiency of Wind & Solar energy production-consumption. Artificial Neural Networks, an algorithm based on the human brain and its nervous system inspired by the data transfer and storage mechanism, can work very well as a prediction model. In this study, total Wind & Solar Electricity Capacity (WSEC) and total Wind & Solar Electricity Generation (WSEG) values of Germany, a G8 member and a European country, have been estimated by using Artificial Neural Networks (ANN) method. Population, unemployment, GDP growth and total renewable energy capacity (excluding wind and solar energy total) parameters have been used as input variables in ANN calculations. The use of geographic, socio-economic and technological parameters has strengthened the estimation model. WSEC training and test regressions calculated by ANN have been 1 and 0.99988, respectively. WSEC Mean Absolute Deviation (MAD), Mean Squared Error (MSE), Root Mean Square Error (RMSE) and Mean Absolute Percentage Error (MAPE) parameters have been calculated as 94.783, 62496.807, 249.994 and 0.364, respectively. WSEG training and test regressions values have been 1 and 0.99983, respectively. The WSEG MAD, MSE, RMSE and MAPE parameters have been calculated as 114.406, 59252.128, 243.418 and 0.526, respectively.


Introduction
Due to technological developments all over the world, improvements in welfare and life expectancy have caused population growth. The energy requirements have also increased with the developing population. Fossil fuel derivatives are natural resources formed after many years and world fossil fuel reserves have come close to their limits because of their consumption for centuries. In addition to the decrease in natural fossil fuel resources, energy requirements have been increasing day by day as the population increases. Increasing energy consumption also brings about some negative factors. Unemployment can be given as the first example of these negative effects. Employees working in fossil fuel resources bring along an increase in unemployment rates. Population growth not only causes an increase in unemployment rates but also creates simultaneous negative effects causing an increase in carbon emissions ("World Population Prospects" 2015;Yin et al. 2014;Zhengge 2014). This situation brings with a great series of environmental damage. Countries exposed to emission increase make efforts to reduce carbon emissions that seriously harm the environment (X. Jiang 2014;Ning et al. 2020).
Unemployment rate and carbon emissions are tried to be reduced all over the world. Population growth causes an increase in fossil fuel usage and carbon emissions. However, this increase is not linear. Yang et al. have conducted a research on the nonlinear effect of population aging on carbon emission in their study (Yang and Wang 2020). Population aging has a negative coefficient on carbon emissions whether the population aging level is lower or higher than the 0.129 threshold. Moreover, the higher the population aging level is, the greater the balancing effect of population aging on carbon emissions is (Yang and Wang 2020). Han et al. have analyzed the relationship between energy consumption and carbon emission with the Kaya model. As a result of these analyzes, it has shown that China's urbanization contributes to the reduction of energy consumption and carbon emission intensity (Han, Cao, and Sun 2019). Roberts et al. have aimed to achieve economic growth reducing carbon emissions by imitating national-level policies focusing on unemployment levels (Roberts et al. 2019).
Unlike previously known renewable energy types, new energy sources are among the popular topics. New and renewable energy (NRE) sources are encouraged and supported in all countries (Hong et al. 2014;Shahbaz et al. 2020). The NRE sector creates new jobs reducing unemployment rates. This situation benefits the economy. The use of NRE has prevented the amount of carbon emissions expected to occur. As a result, the increase in the use of NRE has provided new jobs and economic and environmental benefits such as reduction in greenhouse gas emissions while increasing employment (Ferroukhi et al. 2016).
Increasing energy demands are tried to be balanced with NRE sources. Research on the trends of renewable energy is carried out in many ways. Forecasting the rising energy demands has become an important issue. Many international energy organizations have carried out studies making estimations with high accuracy. International Energy Agency has published one of them in 2016 and has predicted a 30% increase in global energy demands in 2040 (IEA, 2016). It has been inevitable for each country to develop scientific forecasting models so that they use their potential effectively.
The importance of artificial intelligence has been increasing day by day. Artificial Neural Networks (ANN), which is the subject of artificial intelligence, has an important role in this field. ANN has a workable scope in all fields of science. Economy (Chuku, Simpasa, and Oduor 2019;Feng andZhang 2014), sport (Aka, Aktuğ, andKılıç 2021;Fialho, Manhães, and Teixeira 2019), automotive (Sözen et al. 2005), natural sciences (Zhou 2020), electricity consumption (Kazemzadeh, Amjadian, and Amraee 2020;Panklib, Prakasvudhisarn, and Khummongkol 2015), architecture (Ahmad et al. 2014), medical sciences (Ceylan 2020;Kırbaş et al. 2020;Saba and Elsheikh 2020;Saniei et al. 2016) and energy systems (Ahmed and Khalid 2019; Alzoubi et al. 2018;Ergün et al. 2017;Maftah et al. 2021;Singh and Verma 2019) engineering are just a few of the areas that can be exemplified in this regard. Nam et al. have analyzed the 100% NRE and electricity generation policy of Jeju Island in Korea with different scenarios (Nam, Hwangbo, and Yoo 2020). Avila et al. have made wave energy estimation by using Fuzzy Inference Systems (FIS) and Artificial Neural Networks (ANN) methods in Canary Islands (Avila et al. 2020). Aly H. has estimated hybrid harmonic tidal energy and wave energy by using Artificial Neural Network (WNN and ANN) method (Aly 2020).
Energy production and consumption are two difficult phenomena to predict because they depend on many parameters. In this study, the total WSEC and total WSEG values have been estimated by using the input parameters of Germany; 2000-2020 population, unemployment, GDP growth and total renewable energy (excluding wind and solar) and the input values of the ANN model. Forecasting the energy parameters with ANN is a new subject. Forecasting parameters and place (in this case Germany) constitute the most important innovation part of this study. Training, validation, testing and all regressions have been estimated with the least error by running the ANN model of the MATLAB program. MAD, MSE, RMSE and MAPE error parameters have been calculated with the obtained estimation values. The prediction model developed by using ANN is a new way of estimating the total WSEC & WSEG values in Germany and has been added to the current academic literature.
In today's world, where wind and solar energy production depends on many factors, estimating the progress of electricity production and capacity has an important place for all developed countries. The aim of this study is to obtain a result that will contribute to the orientation of the country's energy management by developing a forecasting algorithm with the data of the last 20 years of Germany.

Socio-Economic and Energy Indicators in Germany
There are four European countries (United Kingdom, France, Italy and Germany) that are members of G8. Germany has one of the strongest economies among them. Germany's 82 million population in 2000 still remained at a constant value in 2018 ("The World Bank ", 2020) ( Figure 1). In addition, the population reached 83 million in 2019. Germany Gross Domestic Product (GDP) growth (annual%) was 2.8% in 2000 and 1.5% in 2018 ("The World Bank ", 2020). In addition, GDP growth (annual%) fell to 0.5 in 2019. Unemployment is a term which has many evaluation criteria such as gender, age, and type of job. In this study, the term unemployment is used only by the percentage of total labor force. While unemployment in Germany was 7.92 in 2000, it was determined as 3.38 in 2018 and decreased to 3.14 in 2019 ("The

e2033911-2260
World Bank ", 2020). This shows that Germany can reduce unemployment rates despite the increase in population. In recent years, the COVID-19 epidemic's effects on population (Paulino et al. 2021;Solanki et al. 2021), GDP (Paulino et al. 2021) and unemployment (Barbieri Góes and Gallo 2021; Gururaja and Ranjitha 2021; Ruiz Estrada 2021) are extremely negative. According to International Renewable Energy Agency (IRENA) data, the total electricity capacity of Germany was 11.8 GW in 2000, while the electricity capacity in 2018 was 119.2 GW (Table 1). While electricity generation was 35.4 GWh in 2000, the electricity capacity in 2018 was 224.7 GWh (Table 2).

Error Measurement Parameters
The difference between actual value and predicted value is called error. Error is used as the estimation evaluation method. The less the error is, the more accurate the prediction is. The lower error value is an indicator of the success of the prediction model. In this study, error measurement methods such as Mean Absolute Deviation ( MAD is calculated as in Eq. 1.
RMSE is calculated as in Eq. 3.

RMSE ¼
ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffiffi P n t¼1 ðA t À F t Þ 2 n s MAPE is calculated as in Eq. 4.
If the MAE, MAPE, MSE and RMSE parameters are close to zero, it means that better predictions can be made.

Artificial Neural Network (ANN)
Artificial Neural Networks is an algorithm based on the human brain and nervous system, inspired by the data transmission and storage mechanism (Özden and Kılıç 2020). The process of repeated trials in normal life is the training process. ANN is operated just like in real life with numerical algorithms. Learning is defined as approaching the result more accurately in a short time (Alpaydin 2020). Checking the network results as a result of learning is the confirmation of the event. 70% of the data have been run in training, 15% in validation and 15% in testing in the software made in the MATLAB program. In the artificial neural network, the output variable is the dependent variable and is called the output layer (H. Jiang et al. 2020). Input variables are independent variables and are called input layers. The structure called the hidden layer that associates a complex network between the inputoutput layers has been used. In this study, ANN network structure and input/ output variables created are presented in Figure 2. The ANN hidden layer used the Levenberg-Marquardt training algorithm (Huang and Ma 2019;Mammadli 2017). Two different networks have been set up to estimate the WSEC and WSEG values of Germany between the years 2000-2020. In the first network; population, unemployment, GDP growth and total renewable energy electricity capacity (except WSEC) have been used as the input layer (Figure 3). The output layer is the WSEC value. In the second network; population,  unemployment, GDP growth and total renewable energy electricity generation (except WSEG) have been used as the input layer. The output layer is the WSEG value.
Total renewable energy also includes WSEC and WSEG. For this reason, WSEC and WSEG have been subtracted from the total renewable energy, resulting in total renewable energy with input values. Wind energy is the total value of offshore wind energy and onshore wind energy. Solar energy is the total value of solar photovoltaic energy and solar thermal energy. Solar and wind energy total has been taken as output value. This forecasting study with the ANN model has an important role in determining the weight of the wind & solar energy forecast trend in Germany. The fact that the inputs of the ANN model, which is established in the pandemic COVID-19 virus all around the world, are significantly affecting the inputs of this study, reinforces the importance of the outputs and the novelty of the study.

Results and Discussion
In order to obtain the ANN structure with the least error, different numbers of hidden layers have been graphed with the structure program software found by using trial and error method [50]. When the mean square error has been minimum, the ANN structure has been accepted as optimal. The results obtained according to the structure in minimum MSE condition have been obtained as predictive values. After the estimation and real value results, MAE, MAPE, MSE and RMSE parameters have been calculated and given in Table 4, Table 5 and Table 7. Germany WSEC & WSEG values have been given in Table 3 and Table 6, respectively.
Germany WSEC output value has been forecasted. Four regression outputs of the first network, training, validation, test and all, can be seen in Figure 4. Training regression value has been 1, validation regression value has been 0.99999, test regression value has been 0.99988 and all regression value has been 0.99998. Regression results, which is close to the value of 1, are an indicator of how strong the prediction is. Li et al. have obtained regression values for building energy systems by making an ANN-based optimization approach. In their swimming pool case study, high accuracy regression results such as 0.99997 and 0.99999 have been obtained (Li et al. 2020).
WSEC actual values and estimation values resolved in 6*4 hidden layer structure are given in Table 3.
The error parameters of MAD, MSE, RMSE and MAPE coefficients are given in Table 4. 21 actual values have been estimated for WSEC & WSEG between the years 2000 and 2020.
In order to determine if the difference between real and estimated values are meaningful or not, paired sample t test has been carried out. According to the test results, whether the difference between the averages of real and estimated values is statistically not meaningful will show that artificial neural network method has a high estimation power. Thus, the results of paired sample t test between real and estimated values have been shown in Table 5.
When Table 5 has been examined, it has seen that the averages of real and estimated values are ( � X ¼ 52751:33) and ( � X ¼ 52806:29), respectively. It has been understood that the difference between both average points is meaningful (t (20) = −1.008; p = .326 > 0.05). Whether the difference between the average values is not meaningful has indicated that the estimated values have been very close to the real values. Besides, it shows that the artificial neural network method used in the analysis has a high estimation power. Germany's WSEG output value has been estimated. Four regression outputs of the first case, training, validation, test and all, can be seen in Figure 5. Training regression value has been 1, validation regression value has been 1, test regression value has been 0.99983 and all regression value has been 0.99999. Sözen et al. have developed estimation algorithms for ARIMA, NARNN and LSTM models on the Turkey sample model. The MAPE performance values of these models have been obtained as 18.54, 7.57 and 3.91, respectively (Sözen et al. 2021). In this study, the Germany WSEC regression value has been obtained as 0.99998 by making estimations with lower error than the regression values found by Sözen et al. The MAPE value of 0.364 obtained is much smaller than that of Sözen et al. indicating that the prediction model is stronger.
WSEG actual values and estimation values resolved in 6*4 hidden layer structure have been given in Table 6.
Germany's 2000-2018 WSEG error parameters for MAD, MSE, RMSE and MAPE have been shown in Table 7.   In this study, the Germany's WSEG regression value has been obtained as 0.99999 by making estimations with lower errors. Since the error has been quite low, the MAPE value has been calculated as 0,526, which is much lower than the range of 3-18 found by Sözen et al. (Sözen et al. 2021).
In order to determine whether the difference between real and estimated values are meaningful or not, paired sample t test has been carried out. According to the test results, whether the difference between the means of real and estimated values is statistically not meaningful will show that artificial neural network method has a high estimation power. Thus, the results of paired sample t test between real and estimated values have been shown in Table 8.
When Table 8 has been examined, it has seen that the averages of real and estimated values are ( � X ¼ 68328:70) and ( � X ¼ 68531:79), respectively. It has been understood that the difference between both average points is meaningful (t (19) = −1.116; p = .278 > 0,05). Whether the difference between the average values is not meaningful has indicated that the estimated values have been very close to the real values. Besides, it shows that the artificial neural network method used in the analysis has a high estimation power.  The lower error values in the estimations and the regression values greater than 99% showed that the results contained with high accuracy. The study solved the WSEC and WSEG characteristics of Germany with the ANN method. With ANN, 2020 German WSEC and WSEG values can also be estimated. Strategies focusing on NRE resources, which have an important place in the German's economy, can be evaluated with the ANN network structure. Each country has its own WSEC and WSEG characteristics. These characteristic values are individually operable for each country. The error values of the Germany's Electricity  production forecast model are in between a very small value range. These lower error values has put the German government in a position to predict its own energy consumption demands. Developing a dynamic model for inputs under pandemic conditions puts Germany in a position which it can predict the electricity consumption trend. COVID-19, which causes very rapid worldwide changes, has come to the fore as the most important innovation of the study. The ANN model's working principle, affects this obtained data set. When the results of this study evaluated according to the data, the German administration will be able to make predictions with the error parameters of Table 4 and Table 7 if the results obtained with ANN have been applied in determining the prediction about electricity consumption. It has been observed that the ANN model is in between a superior working range due to the reasonable amount of error in applying the results quickly according to the data since Figure 4 and Figure 5 Germany regression graphs are also balanced.

Conclusions
The data used for WSEC & WSEG estimations include the years between 2000-2020 and 2000-2019, respectively. Germany's WSEC & WSEG values have been obtained by running the prediction algorithm with ANN in MATLAB program. Population, unemployment, GDP growth and total renewable capacity has formed the input layer of the case. Three hidden layers have given the best regression results at 6*4. WSEC training regression value has been 1, validation regression value has been 0.99999, test regression value has been 0.99988 and all regression value has been 0.99998. MAPE value of WSEC has been determined as 0,364. WSEG training regression value has been 1, validation regression value has been 1, test regression value has been 0.99983 and all regression value has been 0.99999. MAPE value of WSEG has been obtained as 0,526. As a result, the model provides a prediction about Wind and Solar energy considering population unemployment GDP and Total Renewable capacity. Although many factors affect the future predictions, a usable model has been obtained. Government policies regarding the energy sector and developments in world energy markets will play a key role in future energy consumption models. In these extraordinary years, COVID-19 has serious effects on population, GDP and unemployment rates. It is a significant innovation that studies carried out with ANN estimation on the German situation provide a forecast on the population, GDP and unemployment rates, and Total Renewable capacity inputs, as well as the solar and wind energy WSEG & WSEC trend. In addition, the trend of German WSEG & WSEC demand can be verified by working on different countries and it has been thought that it can be applied on different models.
Some recommendations for future studies have been made using the ANN method.
• A more efficient model can be created by multiplying input variables. • By increasing the number of entries or shortening the time intervals, more efficient and low error results can be estimated. • Prospective future predictions can be studied. • Different output estimates can be studied by establishing total estimation algorithms of different countries. • Comparative estimation studies can be made with aggressive solution methods such as NAR-NARX.

Disclosure statement
No potential conflict of interest was reported by the author(s).