# The Wind and Photovoltaic Power Forecasting Method Based on Digital Twins
## 2 Materials and Methods
### Creating a Dataset  
The raw data used in this study comprises PV power, wind power, generation impact factor, and weather conditions data. The PV generation, wind generation, and generation impact factor are sourced from the Elia Open Data Portal [25], while the weather conditions data is based on Brussels. To ensure the relevance of the weather data, the renewable energy generation impact factor [25] is utilized as a criterion for filtering out irrelevant weather data. Among the weather variables, the following variables are retained in the dataset: T (temperature), Po (atmospheric pressure), P (precipitation), Pa (air pressure at sea level), U (relative humidity), DD (wind direction), Ff (mean wind speed), ff3 (maximum wind speed), N (cloud cover), H (average number of cloud layers), and TD (dew point temperature). For the specific meaning of each variable, see Table 1 in Appendix A.  
Renewable energy generation power was selected from the historical generation data of Flanders and Walloon regions, respectively, with 28,460 and 28,419 historical records of wind power generation and 18,366 historical data of photovoltaic power generation each. The above cleaned data were divided into four datasets: Flanders_PV, Wallonia_PV, Flanders_wind, and Wallonia_wind. Each data entry consists of 11 weather variables and a historical record of power generation, and the details of the datasets are shown in Table 2.  
Figure 1: Overall Architecture of Wind Energy and PV Power Forecasting. We changed it to be italics to match with Equation (1). Please confirm and check full text carefully. (1) Data processing layer: The input data is weather characteristic data and the corresponding renewable energy power generation \(X\), and the Min-Max function is used to normalize the raw data \(X\) to generate \(I\), and after data normalization, the features of different dimensions (\(T\), \(Po\),..., \(Td\) and \(M\)) have the same measurement scale, and the gradient decline rate have been improved. The calculation equation is shown below:  
\[I=\frac{X-Min}{Max-Min} \tag{1}\]  
\[I_{t}=\left[T_{I},Po_{I},P_{I},Pa_{I},U_{I},DD_{I},Ff_{I},ff3_{I},N_{I},H_{I}, Td_{I},M_{I}\right]_{t} \tag{2}\]  
where \(Min\) and \(Max\) are the minimum and maximum values of the corresponding features, respectively, \(t\) represents a certain moment, \(T_{I}\),\(Po_{I_{t}}\),..., \(Td_{I}\) are the data corresponding to \(11\) weather features, and \(M_{I}\) is the amount of electricity generated by the corresponding renewable energy sources at this moment. (2) GRU Layer: This layer consists of 24 GRU units in two layers, which can extract time series information and data feature information. Each GRU unit contains a reset gate \begin{table}
\begin{tabular}{c l c c c c} \hline \hline
**Name** & **Region** & **Types** & **Quantity** & **Start Time** & **End Time** \\ \hline Flanders\_PV & Flanders & PV & 18,366 & 4 March 2021 & 14 April 2023 \\ Wallonia\_PV & Wallonia & PV & 18,366 & 4 March 2021 & 14 April 2023 \\ Flanders\_wind & Flanders & Wind & 28,460 & 1 January 2020 & 13 April 2023 \\ Wallonia\_wind & Wallonia & Wind & 28,419 & 1 January 2020 & 12 April 2023 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Data set details. Figure 2: Wind and PV power prediction model WPNet. Among them, Min-Max is the normalization process, \(t\) is the time series, \(T\) is the time step, and \(M_{out}\) is the prediction result. and an update gate to control the flow and retention of information.