# Deep-Learning Model Selection and Parameter Estimation from a Wind Power Farm in Taiwan +
## 3 Determining the Hyperparameters for the Developed Model with Q-Learning Scheme
### Architecture Design for the TCN Model  
For a TCN model design for wind power forecasting 24-168 h ahead, it is expected that the resulting deep features will consist of climate features obtained through the convolutional feature learning process from historical weather information, thereby reducing the prediction errors of power generation (kw/h) for wind turbines as much as possible.  
Adopting TCNs for wind power forecasting has two advantages. First, in the training phase, TCNs automatically learn the correlations to capture complex variations with wind power output by leveraging a large amount of training data. Second, during the learning and testing phase, deep learning networks can be easily parallelised on GPU cores for acceleration, allowing the results to be quickly obtained [17]. Thus, we incorporated the convolutional network architecture involved in casual convolution with residual connections to construct a stable TCN-based prediction model for 24-168 h wind power forecasting.  
In the present study, a wind power forecasting technique was developed based on a TCN model, with the goal of achieving high predictive accuracy with the minimum convergence error where the input sequence comprises historical wind speed and direction observations over past periods, while the actual output is the current wind power output.  
First, TCN is used to learn the correlations between meteorological features and wind power generation from various historical data. In the case of wind power forecasting, the TCN model can be defined as follows [11]:  
\[x_{t}^{l}=\sigma(W_{x}^{l}.F_{d}\Big{(}x_{t}^{l-1}\Big{)}+b_{x}^{l}+x_{t}^{l- 1}), \tag{12}\]  
where \(F_{d}(.)\) is the dilated convolution function of \(d\)-factor; \(x_{t}^{l}\) is the value of the neuron of \(l\)-th hidden layer at time \(t\); \(W_{x}^{l}\) and \(b_{x}^{l}\) are the weights and bias corresponding to the \(l\)-th hidden layer, respectively; and \(\sigma\) is the activation function.  
A detailed workflow of the wind power forecasting using dilated residual blocks to extend a large receptive field for processing historical data is shown in Figure 1. In theory, TCN has two effective approaches to increase the receptive field size, that is, increase the dilation factor \(d\) and choose a larger filter size \(k\).  
As shown in Figure 1, we proposed a TCN based dilated causal convolution design with dilation factors \(d\) = 1, 2, 4, 8 and filter size \(k\) = 2. In the residual block, TCN uses a two-layer dilated causal convolution, the activation function of the convolution is a linear rectification function (ReLU), and weight normalization is used to normalize the convolution filter. Further, we inserted a dropout layer after each convolutional layer to avoid overfitting.  
In essence, the TCN model was composed of one or more 1D convolutional layers with dilated residual blocks for input processing. Through use of the residual block in the convolutional layers in TCN, deep and large TCNs can achieve further stabilisation. TCNs are useful for all types of long sequence problems because they can perform feature extraction and correlation analyses. An example of the residual block (\(d\) = 8) used between each layer in the TCN to accelerate convergence and enable the training of deeper models is shown in Figure 2.