# A Comprehensive Hybrid Deep Learning Approach for Accurate Status Predicting of Hydropower Units
## 3 Methodology
### TCN for Extracting Overall Temporal Features  
Temporal Convolutional Networks present a compelling alternative to traditional recurrent neural network architectures for sequence modeling. As highlighted by [PERSON] et al. [38], convolutional structures effectively model sequential data, addressing the latency issues inherent in recurrent networks where processing the current time step information must await the completion of the prior steps. In contrast, TCNs allow the parallel processing of input data, enhancing computational efficiency.  
The TCN architecture combines a fully convolutional network with causal convolutions using zero padding to maintain equal input and output sequence lengths. The process is mathematically represented in Equation (1), where \(*\) denotes the convolution operation:  
\[F(s)=(x*f)(s)=\sum_{i=0}^{k-1}f(i)\cdot x_{s-i} \tag{1}\]  
where \(s\) indexes the input time series, \(k\) is the kernel size, and \(x_{s-i}\) is the value at the \(s-i\) time point.  
To mitigate potential performance degradation due to increased depth, dilated convolutions and residual connections are integrated into the architecture following enhancements by [PERSON] et al. [38] and [PERSON] [39] for dilated convolutions, and [PERSON] et al. [40] for residual connections. Dilated convolutions expand the receptive field using a predefined step size as the dilation factor, detailed in Equation (2):  
\[F(s)=(x*_{l}f)(s)=\sum_{i=0}^{k-1}f(i)\cdot x_{s-d\cdot i} \tag{2}\]  
where \(*_{l}\) is called an \(l-step\) dilated convolution, \(F\) is the input, \(k\) is the convolution kernel, and \(x_{s-d\cdot i}\) represents the value of the input sequence \(x\) at the time points \(s-d\cdot i\). In this article, \(d\) is used to represent the step size.  
Residual connections enable cross-layer feature sharing and fusion between different layers. The basic expression is shown in Equation (3):  
\[o=Activation(x+F(x)) \tag{3}\]  
where \(x\) represents the input, \(F\) is a function that performs a series of transformations on \(x\), and \(o\) is the output of the residual block.  
In our study, as shown in Figure 2, \(X_{1,t}\) represents the input received by the first layer at time \(t\). This input is divided into two branches. In the left branch, \(X_{1,t}\) undergoes two stages of dilated causal convolution as specified in Equation (2) and then is combined with the original input \(X_{1,t}\) through the residual connection outlined in Equation (3) to produce the output of the first residual block, denoted as \(X^{\prime}_{1,t}\). Similarly, \(X^{\prime}_{1,t}\) is processed through another two stages of dilated causal convolution and combined with the original input \(X^{\prime}{}_{1,t}\) to form the output of the second residual block, which is the output of the first TCN layer, \(H_{2,t}\). The process of deriving \(H_{2,t}\) from \(X_{1,t}\) can be represented by Equations (4) and (6):  
\[X^{\prime}{}_{1,t}=ReLU(ReLU(X_{1,t}*_{d}k_{1})*_{d}k_{2})+X_{1,t} \tag{4}\]  
\[H_{2,t}=ReLU\big{(}ReLU\big{(}X^{\prime}{}_{1,t}*_{d}k_{3})*_{d}k_{4}\big{)}+X ^{\prime}{}_{1,t} \tag{5}\]  
\[ReLU(x)=max(0,x) \tag{6}\]  
where \(ReLU\) is the activation function used; \(d\) represents the dilation rate used in the causal dilated convolutions, taking a value of 1 in the first residual block and 2 in the second residual block; and \(k_{1}\), \(k_{2}\), \(k_{3}\), \(k_{4}\) represent different convolutional kernels used in the respective residual blocks.  
The TCN layer extracts features from the time series data from a parallel, returns an output sequence of the same length as the input sequence to preserve the extracted information, and forwards this sequence to the subsequent parallel network of REST-LSTM and GRU.