Abstract:To address the problems of lack of labeled data and low cross-domain diagnosis accuracy in the fault diagnosis method of rotating machinery based on deep learning under new working conditions, a domain adaptive fault diagnosis method based on Transformer is proposed. A variant of Transformer, VOLO, is used to construct the feature extractor to obtain fine-grained and better fault feature representation. The supervised learning with source domain data pretrains feature extractors on source and target domain data, and freezes source domain extractor parameters to obtain fixed source domain features. Using domain adversarial adaptive strategy and local maximum mean difference combined with target domain unlabeled data to train target domain feature extractor, the edge distribution and conditional distribution of source domain features and target domain features are aligned. The proposed fault diagnosis algorithm is evaluated by two multi-condition experiments. Results show that the proposed domain adaptive fault diagnosis method based on Transformer feature extraction is more efficient than the five traditional domain adaptive methods on gear and bearing datasets. The average diagnostic accuracy is improved by 22. 15% and 11. 67% , respectively, which proves that the proposed method can improve the cross-domain diagnostic accuracy.