## 2 Materials and Methods
### Methods
#### 2.2.1 Overview
The S was classified into a training set (train\({}_{X}\), train\({}_{label}\), train\({}_{type}\)), a validation set (val\({}_{X}\), val\({}_{label}\), val\({}_{type}\)), a testing set (test\({}_{X}\), test\({}_{label}\), test\({}_{type}\)) in a ratio of 7.6:1.2:1.2. The number of learning epochs was denoted as M. num represented num hidden layers. Output: the optimal Model and its classification statistics. 1. Load the Dataset
2. Begin
3. Initialize all weights and biases
4. For m = 1, 2, \(\ldots\), M do
5. Extract features through DWCNN model (DWFE) \(\rightarrow\) X\({}_{\text{DWFE}}\)
6. Input X\({}_{\text{DWFE}}\) to Patch Embedding (patch size = 16, channels = 16)
7. for k in range num
8. Ln1 = RMSNorm (X\({}_{\text{PE}}\))
9. Ln2 = 2D RoPE Attention (Ln1)
10. Ln3 = RMSNorm (Ln2)
11. Ln4 = MLP (Ln3)
12. Logit layers = Linear (Ln4)
13. return Logits
14. Model Fit (AdamW, (train\({}_{X}\), train\({}_{label}\), train\({}_{type}\))) \(\rightarrow\) M(m)
15. Model Evaluate (M(m), (val\({}_{X}\), val\({}_{label}\), val\({}_{type}\))) \(\rightarrow\) R\({}_{\text{acc}}\)(m)
16. End For
17. Save the optimal model which has max R\({}_{\text{acc}}\) in M epochs
18. End
19. End
20. Load the testing set
21. Load the optimal model in terms of classification performances

Figure 3: Schematic illustration of the proposed method. #### 2.2.2 Data Preprocessing

To standardize the processing workflow for different datasets, this paper applies consistent data preprocessing methods to the MCC5 and HUST gearbox datasets. Each sample in the MCC5 gearbox dataset contains 768,000 data points (corresponding to a sampling duration of 60 s with a sampling rate of 12.8 kHz), while each sample in the HUST gearbox dataset contains 256,001 data points (with a sampling rate of 25.6 kHz). During the data preprocessing phase, to explore the impact of different sampling intervals on fault signal feature extraction, two-time segment extraction strategies were designed: one strategy extracted a 6 s segment every 4 s, and the other extracted the same-length segment every 10 s. Based on the original 60 s duration of the signal (corresponding to 768,000 points), the 4 s extraction interval strategy could extract 14 sub-segments from each sample, and the 10 s extraction interval strategy could extract 6 sub-segments. In actual statistics, the MCC5 gearbox dataset (with 240 original csv files) generates approximately 3360 samples using the 4 s extraction interval strategy and approximately 1440 samples using the 10 s extraction interval strategy; the HUST gearbox dataset (with 90 original

Figure 4: The RoPE-DWTrans model. txt files) generates approximately 180 samples and 90 samples, respectively. The total numbers of samples generated by the two strategies are 3540 and 1530. By inputting the data constructed with different sampling intervals into the fault diagnosis model and performing experimental comparisons, this paper further analyzes the impact of sampling frequency and segment interval on the model's feature extraction capability and fault identification performance, thereby providing a theoretical basis and practical reference for the selection of sampling strategies in time-series modeling in practical engineering, as shown in Table 1 and Figure 5.

As shown in Figure 6, during the signal preprocessing phase, for the data of each channel in each segment, the Min-Max normalization method is first applied to scale the data to the range of [0, 1]. Then, for the time-series data of each channel, the PPA method is used to reduce the dimensionality to 256. Next, the GASF and GADF methods are used to convert the data into 512 \(\times\) 512 images. Finally, the GASF and GADF images corresponding to each channel are concatenated along the channel dimension, forming a 16 \(\times\) 512 \(\times\) 512 three-dimensional tensors, which is saved as a npy format file to be used as input data for the subsequent deep learning model. The data preprocessing pseudocode was shown in Algorithm 2.