Abstract:For the zero-fault sample problem of mechanical equipment, transfer learning-based and data generation-based methods have attracted much attention. However, the methods usually require the support of similar fault samples, which makes it difficult to ensure training data is aligned with the real-world fault sample of mechanical equipment in data distribution. The generalization is insufficient in applications. To address the aforementioned problems, a novel fault detection (FD) method is proposed based on a designed new loss function and vision transformer (ViT). First, the continuous wavelet transform knowledgebase is established by combining three different mother wavelet functions, which are used to analyze the monitored signals of mechanical equipment from different time-frequency perspectives. Secondly, a new contrastive loss function is designed based on different time-frequency features and the cosine similarity analysis to effectively optimize the parameters of a constructed ViT. Finally, a fault detection algorithm is proposed to parse the real-time monitored signals of mechanical equipment to achieve the FD. The proposed FD method is evaluated by the industrial robot test rig. The results show that a deep network-based feature encoder with high-performance feature extraction can be established with zero-fault samples, and accurate fault detection for different fault conditions can also be realized.