## 3 Methodology
### Temporal Convolutional Network Model with Channel Attention
#### 3.1.4 Model Analysis
The experiment further compares the classification performance when applying CWT and STFT. As indicated in Table 2, the original PPG signal data are processed using both CWT and STFT, followed by feeding the processed time-frequency feature data into the TCN + GRU neural network model. Using STFT for PPG data processing results in a training accuracy of 60.00%. This represents a significant improvement over raw data-based \begin{table}
\begin{tabular}{c c} \hline
**Method** & **Accuracy** \\ \hline Random Forest (HRV) & 47.12\% \\ \hline
1D-CNN (Original) & 52.36\% \\ \hline TCN[25,25] + GRU (STFT) & 60.00\% \\ \hline TCN[25,25] + GRU (CWT) & 62.43\% \\ \hline MSTCN (CWT) [32] & 62.11\% \\ \hline AS + TCN[25,25,25,25] + GRU (CWT) & 67.37\% \\ \hline \end{tabular}
\end{table} 
Table 2: PPG signal emotion recognition accuracy. Figure 4: Confusion matrix diagram of Random Forest emotion classification. one-dimensional neural networks, with an increase of 7.64%. Processing PPG data with CWT and training the model yields an accuracy of 62.43%, which is 2.43% higher than the time-frequency feature processing using STFT. The results suggest that CWT outperforms Fourier transform in time-frequency feature processing. To investigate the reasons, it is observed that PPG signals are susceptible to interference from human movements during acquisition, leading to noise. CWT effectively filters out noise. Additionally, STFT requires setting parameters during its time-frequency processing, such as the size of the time window. STFT divides time into segments based on a set window and calculates the time-frequency characteristics through Fourier transform on each segment. Consequently, it is challenging to determine the appropriate window size. A small window may result in insufficient data signal within the window for accurate frequency analysis, while a large window may lack sufficient granularity in the time dimension, leading to relatively low time resolution. Therefore, CWT offers superior time-frequency characteristics compared to STFT. After adopting the time-frequency processing technique for PPG data, the channel attention-based temporal convolutional network model yielded the best performance in emotion recognition, with 67.37% accuracy, surpassing that of one-dimensional neural networks, which rely on raw data, and machine learning classification methods, that  
Figure 5: PPG frequency analysis diagram of short-time Fourier transform time. Color indicates the amplitude of the corresponding frequency. Brighter colors represent larger values. Figure 6: CWT time–frequency analysis diagram. Color indicates the amplitude of the corresponding frequency. Brighter colors represent larger values. depend on manually extracted features. Compared to MSTCN [32], our approach enhanced recognition accuracy by 5.26% and was faster for inference. (2) Ablation Study  
To delineate the roles of individual modules within the neural network for emotion recognition, a series of six ablation experiments was conducted. These experiments investigated the impact of the TCN, the TCN hidden layers, and the scale dimension attention compression modules on emotion recognition accuracy within the model. All time-frequency features in the ablation studies were processed utilizing CWT. The results when employing the network comprising three layers of GRU exclusively are presented in Table 3, achieving an emotion recognition accuracy of 57.90%. When combining the TCN and GRU, the accuracy elevated to 62.43%, marking a 4.53% improvement over the GRU-only model. These results underscore the TCN's capacity to broaden the model's receptive field and its prowess in extracting data features through convolution, thus enhancing emotion recognition performance. The TCN architecture has several inherent parameters, including the number of convolutional layers, the kernel size, the number of channels in each hidden layer, and the size of the expansion factor.