# TSViT: A Time Series Vision Transformer for Fault Diagnosis of Rotating Machinery
## 1 Introduction
They designed a multi-scale convolution fusion layer to capture fault features in multiple time scales from vibration signals before applying the transformer. [PERSON] et al. [23] proposed an integrated Vision Transformer model based on wavelet transform for bearing fault diagnosis. It utilizes the discrete wavelet transform and continuous wavelet transform to generate time-frequency diagrams with vibration signals before applying the Vision Transformer. [PERSON] et al. [24] converted time series signals into time-frequency diagrams with Short-Time Fourier Transform (STFT) and combined the Siamese network and a Vision Transformer to propose the Siamese Vision Transformer (SviT). SviT aims to extract feature vectors in a high-level space for bearing fault diagnosis. [PERSON] et al. [25] used singular value decomposition to reduce the noise of vibration signals, used generalized S-transform to convert vibration signals into two-dimensional time-frequency images, and used a Vision Transformer to classify faults. [PERSON] et al. [26] used continuous wavelet transform, Gram angular sum field, and Gram angular difference field to convert vibration signals into three grayscale images and input the images into the improved ViT model for training. Their performance results showed that the Vision Transformer proved to be highly promising for fault diagnosis. Nevertheless, these approaches demand extensive preprocessing of vibration signals prior to employing the transformer, diminishing the computational efficiency of data processing. Motivated by these observations, we developed a new fault diagnosis method based on a Vision Transformer for rotating machinery, namely TSViT. On one hand, it incorporates a convolutional layer to divide vibration signals into patches and capture local features. On the other hand, it utilizes a transformer encoder to learn long-term temporal information. This enables comprehensive spatiotemporal feature extraction. The main contributions of this paper are as follows. (1) The TSViT is proposed, a Time Series Vision Transformer model for fault diagnosis with the capability to directly process raw time series signals. (2) A time series patch embedding method is developed to enable the TSViT to accept time domain signals in either one-dimensional or multi-dimensional formats as its input instead of image data. (3) Experiments with three distinct datasets are designed. The results demonstrate that the TSViT can achieve highly accurate fault diagnosis without using any preprocessing techniques. The implementation of this model will help improve production efficiency, extend equipment life, improve product quality, reduce safety risks, reduce economic losses caused by misdiagnosis, and reduce labor costs and maintenance costs. The remainder of this paper is organized as follows. Section 2 presents the framework of the TSViT. Section 3 presents the experiments and the datasets. Section 4 validates the effectiveness and the superiority of the TSViT over other methods with a comparative analysis of its hyperparameters' impact on model performance, computational complexity, and overall parameter quantity. Section 5 draws the conclusion and outlines future work.