# A Hybrid Wind Power Forecasting Model with XGBoost, Data Preprocessing Considering Different NWPs
## 6 The Structure of Proposed Model for Probabilistic Wind Power Forecasting  
Figure 7 shows the proposed 3 h-ahead probabilistic wind power forecasting model. There are three main processes: preprocessing of dataset, deterministic wind power forecasting using XGBoost, and probabilistic wind power forecasting based on LUBE-LSTM (Lower Upper Bound Estimations-Long Short-Term Memory) model. The LUBE method was selected because it is advantageous to wind power forecasting; several previous studies [5; 6; 27] have verified its effectiveness on forecasts. LUBE can be directly constructed using the LSTM model, enabling predictors to select more input variables and generate two outputs (lower and upper bounds). For probabilistic forecasts, lower bound and upper bound are significant to build PIs. Figure 5: Construction of an autoencoder for preprocessing ensemble wind speeds. Figure 6: Results of data preprocessing using WEPS ensemble members. The outputs of the LUBE-LSTM model provide a lower bound and upper bound on wind power forecasts. Figure 8 depicts the overall steps of the proposed forecasting method. There are nine steps for the proposed forecasting method. Step 1: The input data include historical wind power measurements, spot NWPs (WRFD, RWRF), and NWP ensemble wind speeds (WEPS). Figure 8: Flow chart of probabilistic forecasting. Figure 7: Block diagram of the proposed probabilistic forecasting. Step 2: Splitting data into a training set and testing set, the dataset is shown in Table 1. \begin{tabular}{c c c} \hline \hline
**Used Data** & **Input Data** & **Time** \\ \hline Historical data & & Every hour from \\ from wind farm & & 7/2019 to 3/2020 \\  & RWRF (m/s) & Every hour from \\ Data from NWPs & & WRFD (m/s) & 7/2019 to 3/2020 \\  & WEPS ensemble wind speed & & Every 3 h from \\  & (m/s) & 7/2019 to 3/2020 \\ \hline \hline \end{tabular}   
Step 3: Since the value of wind speeds varies dramatically, the normalization must be used for calibrating them into the range of zero to unity. Step 4: The preprocessing process for the original data includes a dimension reduction using autoencoder and wind power curve calibration. The detail about the calibration of a wind power curve was proposed in our previous work [21]. In real operations, wind power curtailment is commonly implemented by wind farm operators because of some emergency conditions, resulting in deviations from a normal power curve. For instance, the manual operation of wind turbines by operators sometimes reduces wind power generation. However, in the process of model training, these abnormal operating points should be removed to avoid training errors. Step 5: Deterministic forecasting is implemented every 3 h by XGBoost, as shown in Figure 9.  
Step 6: Tuning parameters after training model by XGBoost. Step 7: Obtain all of the errors from previous generated power. Then, construct the probability density function (PDF) of the errors. The lower bound and upper bound are obtained from the forecasting errors, which are associated with the highest probability. Next, compute the lower and upper bounds of the produced power as follows:  
\[WP_{up}=WP_{forecast}+E_{up}WP_{low}=WP_{forecast}+E_{low} \tag{17}\]  
where \(E_{up}\) and \(E_{low}\) are the upper bound and lower bound of the forecasting errors, respectively; \(WP_{up}\) and \(WP_{low}\) are the upper bound and lower bound outputs of the LSTM model; and \(WP_{forecast}\) is the deterministic forecasting obtained from the XGBoost model. Step 8: Train the model with the above lower and upper bounds of wind power as the output. Different inputs are shown in Figure 10. The data in February were used for prediction, and the data in January were used as validation data. The historical data from July 2019 to December 2020 were used as the training data. \begin{table}