# Wind Power Forecasting with Deep Learning Networks: Time-Series Forecasting +
## 3 Wind Power Forecasting Model with Temporal Convolutional Networks
### Overall Process of the Model Operations  
Four experimental DNN models for wind power forecasting incorporating RNN, LSTM, GRU, and TCN were employed to verify the performance of model training. The execution process of model development is illustrated in Figure 10. The proposed TCN model comprised the following three subphases in the model operation process: (i) data preprocessing, (ii) model training, and (iii) model validation. Step 1. Data preprocessing  
Before performing model pretraining, engineers must perform data processing for wind farm datasets that contain real weather observations and wind turbine power outputs with anomaly data. Each record in the wind power dataset includes items such as wind speed, wind direction, temperature, humidity, height of wind turbine for model pretraining, and some null fields where linear proportions of the neighbouring observation data are noted in advance. Following the study of patterns in high-dimension data using principal component analysis, the prediction experiment employed two key model parameters, wind speed and wind direction, which were applied to model training. \begin{table}
\begin{tabular}{l l l l l l} \hline \hline
**Algorithm** & **Layers** & \begin{tabular}{l} **Total** \\ **Params/Kernels** \\ \end{tabular} & **AF/LF** & **Optimizer** & **Dilations** & \begin{tabular}{l} **Number of** \\ **Stack** \\ \end{tabular} \\ \hline \multirow{7}{*}{\begin{tabular}{l} TCN model for \\ wind power prediction \\ \end{tabular} } & TCN & 45,761/16 & norm\_Relu & Adam & [1; 2; 4; 8] & 4 \\ \cline{2-6}  & \begin{tabular}{l} Input Layer \\ Initial\_Conv \\ \end{tabular} & (11,16) & & & \\ \cline{2-6}  & \begin{tabular}{l} Dilated \\ ConvLayer \\ \end{tabular} & (16,161,16) & norm\_Relu/MSE & & \\ \cline{2-6}  & \begin{tabular}{l} Dropout layer \\ \end{tabular} & 0 & & & \\ \cline{2-6}  & \
\begin{tabular}{l} Conv Layer \\ \end{tabular} & (16,17,16) & norm\_Relu/MSE & & \\ \cline{2-6}  &
\begin{tabular}{l} OutputDense \\ Layer \\ \end{tabular} & (17,1) & linear & \\ \hline \hline \end{tabular}  
* AF = activation function, LF = loss function, MSE = mean squared error.  
\end{table} 
Table 7: Selected optimal parameters of the TCN model. Figure 9: Convergence error training of the TCN model. Step 2. Model training  
Step 2.1 Model pretraining  
In the pretraining phase, the proposed model incorporated the gradient descent optimization algorithm in order to fine-tune the model parameters for transfer learning using error derivatives of back-propagation with the optimizer for all layers. Then, a series of experiments were pretrained to investigate the performance of the TCN-based classifier using the Scada dataset, where the learning results were regarded as a basis of the optimal model parameters, including number of filters, dilatation coefficient, activation function, epochs, and prediction accuracy (Table 2). Step 2.2 Model fine-tuning  
During the fine-tuning of the model, we adopted a cross-validation scheme to evaluate the predicted accuracy of the model and overcome the problem of over-training using various n-folds of the cross-validation scheme. For example, k = 5 indicates that 80% of the dataset collected was used in the training experiment, with the remaining 20% used for alternative testing that was repeated five times. In the model validation phase, the system provided a quick response for wind power forecasting using the weights of the neural nets employed in the trained TCN model learning. Step 3. Model validation  
To test the robustness of the proposed model, the trained TCN model associated with the test dataset was adopted to examine the model performance. Finally, the MAPE was selected to evaluate the power prediction performance of the proposed model as follows:  
\[MAPE=\frac{1}{n}\sum_{i=1}^{n}\left|\frac{O_{i}-\widehat{O_{i}}}{W_{i}} \right|, \tag{12}\]  
where \(W_{i}\) represents the installed capacity of the wind turbine, \(O_{i}\) is the real value, and \(\widehat{O_{i}}\) is estimated output.