# TSViT: A Time Series Vision Transformer for Fault Diagnosis of Rotating Machinery
## 3 Datasets  
We tested the TSViT with three datasets to verify its effectiveness. (1) PBR dataset. The PBR dataset was collected by the co-authors. Figure 2a presents the experimental environment used for collecting the PBR dataset. The vibration signals were collected by vibration acceleration sensors. There are three types of faults: pedestal looseness (PL), broken blade of fan (BBF), and rotor unbalance (RU). The rotational speed was set to 1500 r/m, and the sampling frequency was set to 1280 Hz. The sampling duration was set to 8 s each time. Each time, 10,240 sensor data were collected. The device was sampled 100 times separately under three fault types and under the normal condition (NC). We resampled the data using a sliding window without any overlap. Non-overlapping partitions avoid test leakage and guarantee fair comparisons [29]. The width of the sliding window is 2048, resulting in a total of 2000 samples, with 500 samples for each type. Of the total samples, 80% from each type were randomly chosen for the training set, while the remaining 20% were for the test set. The details are listed in Table 1. Figure 3 illustrates the time domain waveform of the vibration signal samples in the PBR dataset. (2) CWRU dataset. The CWRU dataset [30] is an open dataset of rolling bear faults that is collected by the Case Western Reserve University and is widely used in rotating machinery fault diagnosis. In this paper, we applied it to validate the effectiveness and generalization capability of the TSViT. Figure 2b presents the experimental bench for collecting the CWRU dataset. The experimental bearing model at the drive end was 6205-2 RS. Two one-way acceleration sensors were installed at the drive end and fan end to measure the vibration signals in different fault conditions. The entire rotating shaft was powered by a 2 horsepower (HP) motor, and the motor imposed varying loads on the rotating shaft. A power meter and a torque sensor were added to the rotating shaft to detect the operating status of the motor in real time. The experiment involved nine types of bearing faults, specifically single-point faults. These faults had a depth of 0.11 inches and were implanted at the inner raceway, rolling ball, and outer raceway. The diameters of these faults were 0.007, 0.014, and 0.021 inches, \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Types** & **Marks** & **Label** & **Training** & **Test** \\ \hline Normal condition & NC & 0 & 400 & 100 \\ Pedestal looseness & F1 & 1 & 400 & 100 \\ Broken blade of fan & F2 & 2 & 400 & 100 \\ Rotor unbalance & F3 & 3 & 400 & 100 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: PBR dataset. Figure 3: Time domain waveforms of vibration signal samples in the PBR dataset (**a**) NC (**b**) PL (c) BBF (**d**) RU. Figure 2: The experimental bench of each dataset (**a**) PBR dataset (**b**) CWRU dataset (**c**) XJTU dataset. respectively, and the implantation was conducted using electro-discharge machining. When the experimental load was 0 HP, IHP, 2 HP, and 3 HP, the corresponding rotation speeds were 1797 r/m, 1772 r/m, 1750 r/m, and 1730 r/m, respectively. The experiment also collected vibration signals under the normal condition (NC) with the mentioned load conditions. The sampling frequency was set to 12 kHz. The vibration signal data for each state in the CRWU dataset consist of hundreds of thousands sampling points. Therefore, it cannot be directly used for training and testing the model. We resampled it using a sliding window with a width of 2048 points without any overlap. Any remaining data with less than 2048 points were discarded. For each type of sample, 80% was randomly selected for the training set and 20% for the test set. In the end, the training set comprised 9000 samples, and the test set comprised 2255 samples. Table 2 details the data distribution. Figure 4 illustrates the time domain waveform of the vibration signal samples in the PBR dataset.