Permanent magnet motor bearing cross-domain fault diagnosis method and system, and medium

CN122413087BActive Publication Date: 2026-08-21QINGDAO UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610874347.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-17
Publication Date
2026-08-21
Estimated Expiration
2046-06-17

AI Technical Summary

Technical Problem

这种由于特征混杂导致的伪相关现象,使得模型始终无法剥离环境干扰,难以提取到纯粹、跨域不变的本质故障特征

Benefits of technology

本发明通过对二维时频图在频率轴维度进行插值缩放与循环平移增强,并采用按频带行划分的平滑切块与掩码策略,克服传统随机图块掩码破坏频带物理连续性的缺陷。本发明所采用策略迫使模型学习跨频带的全局谐波关联规律,而非依赖局部像素插值进行掩码恢复,显著提升模型对本质故障特征的学习能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122413087B_ABST
    Figure CN122413087B_ABST
Patent Text Reader

Abstract

The application relates to the field of fault diagnosis, and discloses a permanent magnet motor bearing cross-domain fault diagnosis method and system and a medium, which comprises the following steps: acquiring a vibration signal of a permanent magnet motor bearing, generating a two-dimensional time-frequency diagram, and performing frequency axis interpolation scaling and cyclic shift enhancement to obtain an enhanced time-frequency diagram sequence carrying physical priori. After smoothing and cutting, the diagram is divided according to frequency band rows, the visible frequency band is reserved, and the remaining frequency bands are masked as prediction targets. The missing frequency bands are predicted through the visible frequency bands. Essential fault features are pooled into global features, a working condition environment mixed factor representation is constructed, a causal background feature is generated through an attention mechanism. Global features and causal background features are fused, working conditions and faults are decoupled through a causal backdoor adjustment, and a fault diagnosis result is output. Through physical mechanism injection, direction perception alignment and causal backdoor adjustment, the application realizes pure extraction of essential fault features, and significantly improves the cross-domain generalization ability of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of fault diagnosis, and specifically relates to a method, system and medium for cross-domain fault diagnosis of permanent magnet motor bearings. Background Technology

[0002] Permanent magnet motor bearings are core components of modern industrial equipment, and their operating status directly affects the safety and stability of the entire production system. In recent years, deep learning-based intelligent fault diagnosis technology has made significant progress, automatically extracting features from massive amounts of vibration data and classifying faults. However, traditional deep learning models heavily rely on the assumption of independent and identically distributed (ICD) data, requiring that the test data and training data be under the same operating conditions.

[0003] In practical industrial scenarios, permanent magnet motors are typically driven by frequency converters for wide-range speed regulation. The interaction between frequency conversion speed regulation and alternating electromagnetic fields often places the bearings of permanent magnet motors under extremely complex dynamic conditions. Their speed and load not only change frequently but are also accompanied by strong electromagnetic-mechanical coupling vibration interference. This cross-condition application caused by the unique operating mechanism of permanent magnet motors leads to a severe and nonlinear shift in the distribution of collected vibration signal data, known as domain shift. When a deep learning model trained under a single or limited operating condition (source domain) is directly applied to an unknown new operating condition (target domain), its diagnostic accuracy often drops significantly. Therefore, researching domain generalization fault diagnosis methods for dynamic operating conditions has extremely high engineering application value. Although some research has been dedicated to improving cross-domain generalization capabilities, existing technologies still face the following bottlenecks and shortcomings that are difficult to overcome.

[0004] Current mainstream methods for processing two-dimensional time-frequency graphs typically apply random patch masking mechanisms from the field of computer vision. This disrupts the inherent physical continuity between rows in the time-frequency graph, causing the model to tend to cheat by using local pixel interpolation instead of truly learning the global harmonic correlation patterns across frequency bands. Furthermore, existing models often use mean squared error as the reconstruction loss, which is extremely sensitive to the absolute energy of the signal. If changes in operating conditions or loads cause drastic fluctuations in vibration amplitude, the model is highly prone to misjudgment.

[0005] Existing deep feature extraction networks lack causal reasoning mechanisms. The so-called fault features they extract are actually a deep interweaving of the fault's own features and the features of the current working environment. During training, the model is prone to taking shortcuts, incorrectly binding the environmental background of a specific working condition to a certain type of fault. This spurious correlation caused by feature mixing makes it impossible for the model to isolate environmental interference and extract pure, cross-domain invariant essential fault features.

[0006] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0007] To address or at least alleviate one or more of the above problems, a method, system, and medium for cross-domain fault diagnosis of permanent magnet motor bearings are provided. This method can achieve pure extraction of essential fault features through physical mechanism injection, direction-aware alignment, and causal backdoor adjustment, thereby significantly improving the model's cross-domain generalization ability.

[0008] To achieve the above objectives, according to a first aspect of the present invention, a method for diagnosing cross-domain faults in permanent magnet motor bearings is provided, comprising the following steps: S1. Obtain the original one-dimensional vibration signal of the permanent magnet motor bearing equipment, generate a two-dimensional time-frequency map through time-frequency transformation, interpolate and scale the two-dimensional time-frequency map in the frequency axis dimension while keeping the size unchanged, and simultaneously perform cyclic translation enhancement in the time axis or frequency axis direction to generate an enhanced time-frequency map sequence carrying physical priors. S2. The enhanced time-frequency map sequence is smoothly segmented to generate a continuous local frequency band feature sequence; the local frequency band feature sequence is divided into frequency band rows, some frequency band rows are retained as visible frequency band features, and the remaining frequency band rows are masked as prediction targets; S3. Predict the masked missing frequency band features using the visible frequency band features; S4. Pool the essential fault features extracted in S3 into global features, construct a confounding factor representation of the working environment, evaluate the correlation between the global features and different working environments through an attention mechanism, and generate causal background features. S5. The global features are fused with the causal background features, and the decoupling of the working environment and fault features is achieved through causal backdoor adjustment, and the fault diagnosis results are output.

[0009] To achieve the above objectives, according to a second aspect of the present invention, a cross-domain fault diagnosis system for permanent magnet motor bearings is provided, the system comprising: The acquisition and preprocessing module is used to acquire the original one-dimensional vibration signal of the permanent magnet motor bearing equipment, generate a two-dimensional time-frequency map through time-frequency transformation, interpolate and scale the two-dimensional time-frequency map in the frequency axis dimension while keeping the size unchanged, and perform cyclic translation enhancement in the time axis or frequency axis direction to generate an enhanced time-frequency map sequence carrying physical priors. The frequency band masking and local feature extraction module is used to smoothly divide the enhanced time-frequency map sequence into blocks to generate a continuous local frequency band feature sequence; the local frequency band feature sequence is divided into frequency band rows, some frequency band rows are retained as visible frequency band features, and the remaining frequency band rows are masked as prediction targets; The prediction and inference module is used to predict the masked missing frequency band features based on the visible frequency band features; The confounding factor decoupling module is used to pool the essential fault features extracted by the prediction and inference module into global features, construct a confounding factor representation of the working environment, evaluate the degree of correlation between the global features and different working environments through an attention mechanism, and generate causal background features. The feature fusion and fault diagnosis module is used to fuse the global features with the causal background features, decouple the working environment and fault features through causal backdoor adjustment, and output the fault diagnosis results.

[0010] To achieve the above objectives, according to a third aspect of the present invention, a computer-readable storage medium is provided storing a computer program, which, when executed by a processor, is used to implement the cross-domain fault diagnosis method for permanent magnet motor bearings as described above.

[0011] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art: This invention enhances two-dimensional time-frequency maps by interpolation scaling and cyclic translation along the frequency axis, and employs a smooth block division and masking strategy based on frequency band rows. This overcomes the defect of traditional random patch masks that disrupt the physical continuity of frequency bands. The strategy employed in this invention forces the model to learn global harmonic correlation patterns across frequency bands, rather than relying on local pixel interpolation for mask recovery, significantly improving the model's ability to learn essential fault characteristics.

[0012] This invention abandons the traditional mean square error reconstruction loss and adopts a direction alignment loss function based on cosine similarity, so that the predicted features and target features only focus on the directional consistency in the latent space, rather than the absolute amplitude. Therefore, even if the vibration signal amplitude of the permanent magnet motor fluctuates drastically due to frequency conversion speed regulation and sudden load changes, the model can still stably extract energy-independent fault features, greatly enhancing the diagnostic robustness under various operating conditions.

[0013] This invention constructs a confounding factor representation of the operating environment and utilizes an attention mechanism to evaluate the correlation between global features and different operating environments, generating causal background features. Furthermore, it decouples the operating environment from fault features through causal backdoor adjustment. This design effectively avoids the spurious correlation and shortcut learning problems in traditional models that incorrectly bind specific operating backgrounds to fault features, enabling the model to extract truly cross-domain invariant essential fault features.

[0014] This invention, without accessing target domain data, learns fault discrimination criteria independent of operating conditions from the source domain through self-supervised pre-training based on frequency band mask prediction and causal decoupling of feature representations. Experimental verification shows that this method has higher diagnostic accuracy and stronger generalization performance than existing methods under extreme dynamic conditions such as variable frequency speed regulation and sudden load changes, and is suitable for fault diagnosis of permanent magnet motor bearings in practical industrial scenarios.

[0015] The specific embodiments of the present invention will now be described in further detail with reference to the accompanying drawings. Attached Figure Description

[0016] The accompanying drawings, as part of this invention, are provided to further illustrate the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention, but do not constitute an undue limitation thereof. Clearly, the drawings described below are merely some embodiments; those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0017] In the attached diagram: Figure 1 This is a flowchart illustrating the cross-domain fault diagnosis method for permanent magnet motor bearings in this specific embodiment. Figure 2 This is a diagram showing the result of the fault classification confusion matrix output on a specific target domain test set in this specific embodiment, where (a) is the confusion matrix diagram of task Q1 and (b) is the confusion matrix diagram of task Q2. Figure 3 Here are the confusion matrix diagrams for tasks Q3 and Q4 in this specific embodiment, where (a) is the confusion matrix diagram for task Q3 and (b) is the confusion matrix diagram for task Q4. Figure 4 Here are the confusion matrix diagrams for tasks Q5 and Q6 in this specific embodiment, where (a) is the confusion matrix diagram for task Q5 and (b) is the confusion matrix diagram for task Q6. Figure 5 Here are the confusion matrix diagrams for tasks Q7 and Q8 in this specific embodiment, where (a) is the confusion matrix diagram for task Q7 and (b) is the confusion matrix diagram for task Q8. Figure 6 Here are the confusion matrix diagrams for tasks S1, Q2, and S5 in this specific embodiment, where (a) is the confusion matrix diagram for task S1, (b) is the confusion matrix diagram for task Q2, and (c) is the confusion matrix diagram for task S5. Figure 7 This is a framework diagram of the self-supervised JEPA used to extract essential fault features in this specific embodiment; Figure 8This is a schematic diagram of the cross-domain fault diagnosis system for permanent magnet motor bearings in this specific embodiment. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments will be clearly and completely described below with reference to the accompanying drawings. The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0019] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of the present invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0020] Please see Figure 1 This invention provides a method for diagnosing cross-domain faults in permanent magnet motor bearings, comprising the following steps: S1. Obtain the original one-dimensional vibration signal of the permanent magnet motor bearing equipment, generate a two-dimensional time-frequency map through time-frequency transformation, interpolate and scale the two-dimensional time-frequency map in the frequency axis dimension while keeping the size unchanged, and simultaneously perform cyclic translation enhancement in the time axis or frequency axis direction to generate an enhanced time-frequency map sequence carrying physical priors. S2. The enhanced time-frequency map sequence is smoothly segmented to generate a continuous local frequency band feature sequence; the local frequency band feature sequence is divided into frequency band rows, some frequency band rows are retained as visible frequency band features, and the remaining frequency band rows are masked as prediction targets; S3. Predict the masked missing frequency band features using the visible frequency band features; S4. Pool the essential fault features extracted in S3 into global features, construct a confounding factor representation of the working environment, evaluate the correlation between the global features and different working environments through an attention mechanism, and generate causal background features. S5. The global features are fused with the causal background features, and the decoupling of the working environment and fault features is achieved through causal backdoor adjustment, and the fault diagnosis results are output.

[0021] It should be noted that the execution subject of the permanent magnet motor bearing cross-domain fault diagnosis method in this embodiment is a permanent magnet motor bearing cross-domain fault diagnosis device based on frequency band mask prediction and causal decoupling. This device can be an electronic device, a component in an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, etc., and non-mobile electronic devices can be servers and personal computers, etc., and this invention does not make specific limitations. The following description uses a server as the execution subject as an example to elaborate on the permanent magnet motor bearing cross-domain fault diagnosis method in this embodiment.

[0022] In some embodiments, the original one-dimensional vibration signal of the permanent magnet motor bearing device is acquired, and a two-dimensional time-frequency map is generated through time-frequency transformation. The two-dimensional time-frequency map is interpolated and scaled along the frequency axis while maintaining its size, and simultaneously enhanced by cyclic translation along the time or frequency axis to generate an enhanced time-frequency map sequence carrying physical priors, including: The original one-dimensional vibration signal was segmented into fixed-length signal segments using an overlapping sliding window technique. The complex spectrum matrix is ​​obtained by applying short-time Fourier transform to the signal segment, and the absolute amplitude of the complex spectrum matrix is ​​extracted and then subjected to logarithmic nonlinear scaling. The time-frequency graph is scaled to a preset fixed size using bilinear interpolation, and a global normalization operation is performed. During the training phase, a random scaling factor following a uniform distribution is generated to interpolate and scale the frequency axis of the time-frequency plot by a ratio of the random scaling factor, and the size is kept unchanged by truncation or zero padding; at the same time, a cyclic translation with random step size is performed in the time axis or frequency axis direction, and finally the enhanced time-frequency plot sequence is output. Specifically, when the random scaling factor is greater than 1, the top high-frequency region of the interpolated tensor is truncated to maintain the original size; when the random scaling factor is less than 1, zero-padding is performed on the top of the interpolated tensor to maintain the original size.

[0023] Specifically, in S1, the original one-dimensional vibration signal of the permanent magnet motor bearing equipment is acquired and a two-dimensional time-frequency map is generated through time-frequency transformation. A physical frequency band scaling strategy is used to interpolate, scale, and translate the two-dimensional time-frequency map along the frequency axis to obtain an enhanced time-frequency map sequence carrying physical priors (without random data augmentation, strictly following the mechanical dynamics law that frequency scaling proportionally due to speed fluctuations). This includes the following sub-steps: S11. Using the overlapping sliding window segmentation technique, a long sequence of continuous vibration signals is divided into signal segments of fixed length, denoted as... In this embodiment, it is preferable to set the segment length. .

[0024] S12, For one-dimensional signal segments Perform a short-time Fourier transform. Specifically, use a Hanning window of length 256 as the analysis window, set the sliding step size to 64, and calculate the complex spectrum matrix containing both time and frequency dimensions.

[0025] S13. Extract the absolute amplitude of the complex spectrum matrix. Since the energy of the early, weak higher harmonics excited by mechanical faults is much lower than the fundamental frequency and background noise energy, directly using the absolute amplitude would obscure the high-frequency characteristics. Therefore, a logarithmic nonlinear scaling is performed on the absolute amplitude matrix, with the following transformation formula: ; in, This represents the amplitude spectrum after nonlinear scaling. Represents the natural logarithm or common logarithm. Represents the short-time Fourier transform. This indicates taking the absolute value of the transformation result (i.e., the amplitude spectrum). After scaling, it is expanded in the channel dimension to obtain a shape of The tensor, in which For batch size, This represents the original frequency band number. This represents the original number of time steps.

[0026] S14. To adapt to the fixed input size requirement of the subsequent overlapping convolutional mapping network and the self-supervised joint embedding predictive architecture (JEPA), and to ensure the divisibility of the slicing operation, a bilinear interpolation algorithm is used to slice the data into segments of shape [missing information]. The spatial size of the tensor is strictly scaled to Subsequently, the mean and standard deviation of the tensors in this batch were calculated, and a global standardization operation was performed to finally obtain a standard two-dimensional time-frequency plot. .

[0027] S15. Perform physical frequency band scaling and translation enhancement. Addressing the physical characteristic of permanent magnet motor bearings scaling proportionally under varying operating conditions, data augmentation is introduced during the training phase: generating a frequency band that follows... Uniformly distributed random scaling factor In a standard two-dimensional time-frequency diagram The frequency height axis is scaled as follows Bilinear interpolation. When When the value is greater than 1.0, the simulated actual rotational speed increases, and the characteristic frequency shifts upward overall. This is reflected in the interpolated standard two-dimensional time-frequency diagram. Perform top high-frequency region truncation to preserve the height dimension of the time-frequency plot. When the random scaling factor When the value is less than 1.0, the simulated actual rotational speed decreases, and the characteristic frequency shifts downward overall. This affects the interpolated standard two-dimensional time-frequency diagram. Perform zero-padding at the top to maintain In addition, introduce on the time axis or frequency axis The pixels are cyclically shifted with random step sizes to improve the model's robustness against frequency offsets. The final output is an enhanced time-frequency plot sequence.

[0028] In some embodiments, the enhanced time-frequency map sequence is smoothly segmented to generate a continuous local frequency band feature sequence; the local frequency band feature sequence is divided according to frequency band rows, retaining some frequency band rows as visible frequency band features, and masking the remaining frequency band rows as prediction targets, including: An overlapping convolutional mapping network composed of multiple layers of two-dimensional convolutional operation units is used to smoothly divide the enhanced time-frequency map sequence into blocks, generating continuous local frequency band feature sequences; The local frequency band feature sequence is masked row by row. The masking ratio is set, and some frequency band rows are randomly selected as reserved rows and the rest are masked rows. The original feature sequence is split into visible frequency band features and masked missing frequency band features.

[0029] In other embodiments, an overlapping convolutional mapping network composed of multiple layers of two-dimensional convolutional operation units is used to smoothly segment the enhanced time-frequency map sequence to generate a continuous local frequency band feature sequence. The local frequency band feature sequence is then subjected to a row-by-row masking operation, with a set masking ratio. A portion of the frequency band rows are randomly selected as retained rows, and the remainder are used as mask rows. This process splits the original feature sequence into visible frequency band features and masked missing frequency band features, including: An overlapping convolutional mapping network consisting of three consecutive two-dimensional convolutional operation units is used to smoothly segment the enhanced time-frequency map sequence. Each convolutional operation unit contains a two-dimensional convolutional layer, a batch normalization layer, and a nonlinear activation function. After three overlapping downsampling operations, the output tensor is flattened and transposed to transform it into a local frequency band feature sequence with a sequence length of 64, where each of the eight consecutive elements represents a continuous frequency band in the original time-frequency graph. Set a mask ratio, generate a uniform random noise matrix for 8 frequency band rows representing different frequency bands, calculate the number of rows to be retained according to the mask ratio, take the shuffled index and the corresponding number of rows calculated as the retained rows, and the rest as the mask rows, and map the row index back to a one-dimensional sequence index of length 64, and split the original feature sequence into visible frequency band features and masked missing frequency band features.

[0030] Specifically, the enhanced time-frequency graph sequence is input into the self-supervised joint embedding prediction architecture network.

[0031] Specifically, in S2, a local feature extraction network based on overlapping convolution is used to smoothly segment the enhanced time-frequency map sequence to obtain continuous local frequency band features; a whole-row masking strategy is used for feature segmentation. This includes the following sub-steps: S21. To overcome the problem of physical texture fragmentation caused by the direct linear non-overlapping slicing in the Vision Transformer (ViT), this embodiment constructs an overlapping convolutional mapping network to replace the pure linear slicing layer. The overlapping convolutional mapping network contains three consecutive two-dimensional convolutional operation units. Each convolutional operation unit consists of a two-dimensional convolutional layer, a batch normalization layer, and a non-linear activation function connected in series.

[0032] S22. Input the enhanced time-frequency graph sequence into the overlapping convolutional mapping ConvStem network. Set the kernel size of the first layer to [value missing]. With a step size of 2 and padding of 1, the number of input channels is expanded from 1 to the feature dimension. The second convolutional layer has the same parameters as the first layer, but expands the number of channels to... The third convolutional layer further expands the number of channels to D. After three smooth, overlapping downsampling operations, the spatial size of the input tensor increases from... Dimensional reduction .

[0033] S23, shape is The output tensor is flattened and transposed in the spatial dimension to transform it into a sequence of length . The local frequency band feature sequence, denoted as In this sequence, every eight consecutive elements represent a specific, physically meaningful continuous frequency band in the original time-frequency diagram.

[0034] S24. Perform full-line bandwidth masking. Set the mask ratio parameters. Because local frequency band feature sequences correspond to high dimensionality in space. Width dimension Given a grid matrix, for each of the eight rows representing different frequency bands, generate a grid of shape [shape missing]. A uniform random noise matrix.

[0035] S25. Calculate the number of rows to be retained based on the set mask ratio. The index will be shuffled. The first row is treated as the retained row, and the remaining rows are treated as mask rows. These row indices are mapped back to a one-dimensional sequence index of length 64, thus accurately splitting the original feature sequence into visible frequency band features. and masked missing frequency band features This strategy forces the model to not rely on simple numerical interpolation predictions based on local pixels at adjacent time steps, but to learn the global physical coupling relationship between the fundamental frequency and its corresponding higher harmonics across different frequency bands.

[0036] In some embodiments, the masked missing frequency band features are predicted using visible frequency band features, wherein the essential fault features are extracted, including: Configure a context encoder to extract context features, i.e., essential fault features, from visible band features; Configure the prediction network to output predicted features based on contextual features; Configure the target encoder to extract the baseline target features for the complete frequency band features, wherein the parameters of the target encoder do not participate in backpropagation; The cosine similarity function is used to measure the directional consistency between the predicted features and the baseline target features. The cosine similarity loss is calculated as the directional alignment loss to eliminate the sensitivity to the absolute amplitude of the vibration signal.

[0037] In other embodiments, a context encoder is configured to extract context features from the visible frequency band features; a target encoder is configured to extract baseline target features from the complete frequency band features, wherein the parameters of the target encoder do not participate in backpropagation, including: Configure a context encoder based on a multi-head self-attention mechanism, input visible frequency band features into the context encoder, and extract context features through self-attention calculation and feedforward network processing; The learnable parameter tensor with shared weights is configured as a mask placeholder. The corresponding global position code is extracted based on the position index of the missing frequency band feature and added to the mask placeholder. The mask placeholder with position information is concatenated with the context features to restore the original length sequence. The concatenated sequence is input into the prediction network, and the network infers and outputs the predicted features corresponding to the mask positions. Configure an independent target encoder, input the complete local frequency band feature sequence without any mask segmentation into the target encoder, and extract the real latent features at the corresponding mask positions as the baseline target features. The weight parameters of the target encoder do not participate in the gradient calculation of backpropagation. The encoders all adopt the Transformer encoder architecture; An exponential moving average momentum update mechanism is adopted, and the parameters of the target encoder are smoothly updated through the parameters of the context encoder after each training iteration.

[0038] Specifically, please see Figure 7 S3 aims to drive the network to infer the physical characteristics of missing frequency bands from the visible frequency bands, while effectively discarding interference from absolute amplitude. Specifically, it includes the following sub-steps: S31. Configure a context encoder based on a multi-head self-attention mechanism. In this embodiment, the encoder adopts a Transformer encoder architecture with a depth of 2 and 4 attention heads. The visible band features extracted in S2... The input context encoder, after self-attention computation and feedforward network processing, extracts contextual features, denoted as... .

[0039] S32. Configure a learnable parameter tensor with shared weights as a mask placeholder. Based on the location index of the missing frequency band features recorded in S2, extract the corresponding specific location information from the system's preset global location encoding and add it to the mask placeholder, giving it spatial location awareness. Combine the mask placeholder with location information with the context features. The sequences are concatenated along the sequence dimension to restore the original sequence length.

[0040] S33. Input the concatenated sequence into the prediction network. The prediction network adopts a Transformer encoder architecture with a depth of 1 and 4 attention heads. Based on the context information, the prediction network infers and outputs the predicted features corresponding to the mask positions in the 256-dimensional latent space, and aligns the dimensions through a linear mapping layer. Let the output predicted features be denoted as... .

[0041] S34. Configure a separate target encoder. The network architecture of the target encoder is consistent with that of the context encoder. Input the complete local frequency band feature sequence from S2 (without any masking) directly into the target encoder to extract the true latent features at the corresponding mask positions. These are used as the baseline target features, denoted as... It is important to note that, to prevent the model from getting stuck in trivial solutions, the weight parameters of the target encoder are not included in the gradient calculation during network backpropagation.

[0042] S35. Implement an exponential moving average momentum update mechanism. After each forward and backward propagation training iteration, the network parameters of the target encoder are... All are obtained through the current parameters of the context encoder. A slow, smooth update is performed. In this embodiment, a momentum coefficient is preferably set. Its update formula is: ; Among them, the left side of the formula This represents the updated target encoder parameters, shown on the right side of the formula. This indicates the target encoder parameters before the update; This mechanism ensures the characteristics of the benchmark target. The smoothness and stability of the representation guide the convergence of representation learning.

[0043] S36. Calculate the orientation alignment loss. Discard the traditional mean squared error and use the cosine similarity function to measure the predicted features. Features of the benchmark target Orientational consistency in the latent space. Let the feature dimensions of both be... The total number of masks for batches and sequences is Then self-supervised prediction of loss In other words, the orientation alignment loss is defined as: ; in, Indicates the first The predicted feature vectors corresponding to each mask Indicates the first The baseline target feature vector corresponding to each mask; This cosine loss forces the model to focus only on the directional angles of the feature vectors in the 256-dimensional space when predicting and reconstructing, while ignoring the magnitude of the vectors. This effectively suppresses the adverse effects of fluctuations in the absolute magnitude of the amplitude caused by drastic changes in rotational speed or load, and enhances the robustness of the model in cross-domain applications.

[0044] In some embodiments, the essential fault features extracted in S3 are pooled into global features to construct a confounding factor representation of the operating environment. An attention mechanism is used to evaluate the correlation between the global features and different operating environments, generating causal background features, including: The essential fault features processed by S1-S3 and context encoder are compressed into a global feature vector, i.e., global features, by global mean pooling. Initialize a learnable parameter matrix that follows a standard normal distribution as a confounding factor dictionary to characterize potential operating conditions; The self-attention mechanism is used to map the global features and the confounding factor dictionary into query tensors and key tensors respectively through linear mapping. The scaling dot product attention is used to calculate the attention weight matrix between the global features and each working environment. The attention weight matrix and the confounding factor dictionary are multiplied and aggregated to generate causal background features.

[0045] Specifically, in order to extract pure fault characteristics from the representation mixed with environmental noise, this embodiment first introduces a causal inference framework at the diagnostic decision-making level. This includes the following sub-steps: S41. For the vibration signal in the target domain to be diagnosed, after the same preprocessing and maskless context encoder processing as in steps S1-S3, the output shape is as follows: The feature sequence is then processed. Global mean pooling is performed on this sequence along its length dimension, compressing it into a 256-dimensional feature vector that represents the global information of the signal; this vector is denoted as the global feature vector. .

[0046] S42. In the causal classifier, a confounding factor dictionary characterizing the potential operating conditions is initialized. Considering the variable electromagnetic and mechanical coupling background under variable frequency speed regulation of permanent magnet motors, the confounding factor dictionary aims to extract and characterize potential physical confounding factors such as specific switching frequency noise, stator current harmonic interference, and sudden changes in different loads. The confounding factor dictionary is essentially an independent, learnable parameter matrix. In this embodiment, the number of potential independent operating conditions is preset. The matrix initialization follows a standard normal distribution.

[0047] S43. Utilize the self-attention mechanism to assess the degree to which the current signal is affected by various operating conditions. Then, use a linear fully connected layer to integrate global features. Mapped to query tensor Simultaneously, the confounding factor dictionary is connected through another linear fully connected layer. Mapped to key tensor .

[0048] S44. The scaling dot product attention formula is used to calculate the correlation between the current global features and the four working condition prototypes, thus obtaining the attention weight matrix. Furthermore, the attention weight matrix... With dictionary matrix Multiplicative aggregation is performed to generate causal background features that incorporate the average influence of all possible operating conditions. The calculation formula is as follows: ; .

[0049] In other embodiments, global features are fused with causal background features, and causal backdoor adjustment is used to decouple the operating environment from fault features, and output fault diagnosis results, including: Global features and causal background features are concatenated along the feature dimension to generate a fused feature vector; The fused feature vector is input into the multilayer perceptron classification head, which contains a dropout layer and a linear mapping layer, and outputs the predicted probability distribution, i.e. the fault diagnosis result. During the training phase, labeled source domain data and unlabeled cross-domain data are received simultaneously. The cross-entropy loss between the predicted result and the true label is calculated, and the joint orientation alignment loss is used as the joint loss function. The AdamW optimization algorithm is used to synchronously update the parameters of the classifier and encoder.

[0050] Specifically, feature fusion and cross-domain diagnosis, S5 includes the following sub-steps: S51. Implement causal backdoor adjustment. In the feature splicing dimension, global features representing the original signal representation will be... Causal background features representing the current working conditions Direct merging generates a fused feature vector with doubled dimensions to 512. This splicing operation forces the downstream classifier to consider both the signal itself and the operating context when making decisions, thereby creating a conditional cancellation effect within the model and achieving domain decoupling.

[0051] S52, Integrating Features The data is fed into a multilayer perceptron classification head. The classification head preferably consists of a Dropout layer with a deactivation rate of 0.3 and an output dimension of... It consists of a linear mapping layer. The classification head outputs the predicted probability distribution. .

[0052] S53. Joint Optimization Mechanism. During the model training phase, it simultaneously receives labeled source domain data and unlabeled cross-domain data. It then calculates the predicted probability distribution. With real labels Cross-entropy loss between Define the joint loss function. for: ; The AdamW optimization algorithm is used to synchronously update the parameters of the classifier and context encoder, with the initial learning rate set to... The weight decay coefficient is set to 0.05. Through this joint optimization strategy, the deep model can achieve a balance between supervised classification objectives and unsupervised physical law mining, ultimately obtaining a diagnostic model with good generalization ability across different work conditions.

[0053] In some embodiments, model training specifically includes the following steps: Data Acquisition: The model training process begins with the acquisition of two datasets. The Paderborn University (PU) dataset covers four operating conditions, C1-C4, with health states including normal, inner ring failure, outer ring failure, and rolling element failure. Additionally, our lab's self-built bearing dataset covers three operating conditions, D1-D33, with health states including normal, inner ring failure, outer ring failure, ball failure, cage failure, and combined outer ring and ball failures.

[0054] A sliding window technique was used to extract non-overlapping segments from the original one-dimensional vibration signal, with a sample length of 4096 sampling points and a step size of 4096. A short-time Fourier transform was performed on the one-dimensional segment, with a window length of 256 and a sliding step size of 64. Logarithmic scaling and bilinear interpolation were then used to uniformly transform the spectral features into... The two-dimensional time-frequency tensor is used, and global normalization is performed.

[0055] PU dataset training configuration: In each training iteration, one operating condition domain is selected as the labeled source domain, two operating condition domains as the unlabeled source domains, and the remaining domain is treated as a completely unknown target domain and does not participate in any training. Self-built bearing dataset training configuration: In each training iteration, one operating condition domain is selected as the labeled source domain, one operating condition domain as the unlabeled source domain, and one domain as the unknown target domain for generalization. The core training hyperparameter settings are shown in Table 1.

[0056] Table 1: Training Core Hyperparameter Settings Batch size 16 Number of time-frequency graph samples input to the network in a single iteration Training rounds 100 Total number of complete traversals of the entire training dataset Optimizer AdamW An adaptive moment estimation optimization algorithm with weight decay is employed. Initial learning rate <![CDATA[3×10 -4 ]]> The basic proportional coefficient controlling the step size of network weight updates Weight decay 0.05 Regularization coefficients used to prevent overfitting in deep models Mask ratio 0.3 During the whole-line frequency band masking stage, the proportion of masked feature lines to the total lines. Momentum coefficient 0.99 The smoothing coefficient for parameter updates in the target encoder using exponential moving average (EMA). During training, the model minimizes the joint loss function. Simultaneously optimize the fault classification head and feature extraction network. Cross-entropy loss. This calculation is performed only for labeled source domain samples, using standard cross-entropy loss to constrain the error between the predicted probability and the true health status label. Self-supervised prediction loss. For all source domains, a direction-aware cosine similarity loss is used. The joint loss function formula is: ; In this embodiment, to balance the gradients of the two major tasks, the loss weight coefficients are combined. The preferred setting is 0.5.

[0057] The automated training process begins with network initialization, randomly initializing the parameters of the context encoder, prediction network, and fully connected classifier. The weights of the target encoder are initially copied from the context encoder, and its gradient backpropagation is truncated. In each training batch, labeled and unlabeled data are simultaneously captured, and physical band scaling and translational dynamic data augmentation are performed respectively. These are then fed into the network for feature extraction, band mask prediction, and causal backdoor fusion. The joint loss function for the current batch is calculated, and the optimizer is invoked to calculate gradients and update the parameters of the context encoder and classifier. After each optimizer training batch, the parameters of the target encoder are adjusted according to the momentum coefficient. The parameters are approximated by an exponential moving average to provide a stable reconstruction baseline. After each training epoch, all network parameters are frozen, and testing is immediately performed on unknown target domain data. The system monitors the diagnostic accuracy in the target domain in real time.

[0058] In some embodiments, the rotor support system of industrial permanent magnet motors commonly employs 6200 or 6400 series deep groove ball bearings. To evaluate the robustness and engineering practical value of the method described in this invention in cross-domain diagnosis when facing complex and unknown operating conditions of permanent magnet motors, this embodiment specifically conducts a domain-generalized comparative experiment based on the two typical types of permanent magnet motor-specific bearings mentioned above. The experiments utilize the internationally recognized PU dataset, whose core testing component is the 6203 model bearing adapted for small and medium-sized permanent magnet motors, and a self-built bearing dataset, whose core testing component is the 6412 model bearing adapted for large permanent magnet motors.

[0059] Vibration signals from different operating conditions were captured and divided into four distinct physical operating condition domains, denoted as C1, C2, C3, and C4. The health status labels for permanent magnet motor bearings were set to four categories: Category 1 Normal State, Category 2 Inner Ring Fault, Category 3 Outer Ring Fault, and Category 4 Rolling Element Fault.

[0060] Experimental task configuration: A joint semi-supervised domain generalization setting was adopted, with eight cross-domain tasks designed from Q1 to Q8. During the training phase, the model can only acquire labeled data from one source domain and unlabeled data from two other source domains, and is tested on the unknown target domain. This embodiment selects the Random Norm Adversarial General-Ization Network (RNAGN) and the Contrast-Assisted Domain-Specificity-Removal Network (CDSRN) method as baseline comparisons. The working conditions of the PU bearing dataset are divided as shown in Table 2, containing four bearing health states, and 100 data sample fragments are collected and generated for each state. The task settings of the PU bearing dataset are shown in Table 3, and the comparison of target domain diagnosis accuracy under different cross-domain tasks of the PU bearing dataset is shown in Table 4.

[0061] Table 2: Working Condition Classification of PU Bearing Dataset C1 1500 0.7 1000 4×100 C2 900 0.7 1000 4×100 C3 1500 0.1 1000 4×100 C4 1500 0.7 400 4×100 Table 3: PU Bearing Dataset Task Settings Table Q1 C1,C3,C4 C2 Q2 C1,C2,C3 C4 Q3 C2,C1,C4 C3 Q4 C2,C1,C3 C4 Q5 C3,C2,C4 C1 Q6 C3,C1,C4 C2 Q7 C4,C2,C3 C1 Q8 C4,C1,C2 C3 Note: The bold font in Table 3 indicates the source domains with labels, while the other two are unlabeled. In each task, the first source domain in Table 3 (such as C1 in task Q1, C1 in task Q2, C2 in task Q3, etc.) is a labeled domain, while the other two source domains are unlabeled domains.

[0062] Table 4: Comparison of Target Domain Diagnostic Accuracy under Different Cross-Domain Tasks in the PU Bearing Dataset RNAGN 61.25 94.25 91.50 76.75 96.50 62.75 95.25 94.75 84.12 CDSRN 69.79 93.69 99.25 93.25 98.83 68.65 99.01 96.71 89.90 This invention 95.25 81.50 97.25 91.50 97.50 95.25 96.00 98.75 94.13 Based on the experimental data comparison in Table 4, it can be seen that RNAGN and CDSRN are prone to feature overfitting when dealing with tasks Q3, Q5, and Q7 where the domain distribution difference is small. Although they can achieve high scores, when faced with the extremely harsh working conditions of Q1 and Q6 where the target domain is C2, the existing methods will suffer from severe negative migration due to the inability to remove mixed environmental noise, and the accuracy can only reach 60%~69%.

[0063] Vibration signals from different operating conditions were captured and divided into four distinct physical operating condition domains, denoted as D1, D2, and D3. The health status labels for permanent magnet motor bearings were set to six categories, specifically including: normal condition, inner ring fault, outer ring fault, ball fault, cage fault, and a combination of outer ring and ball faults.

[0064] Experimental task configuration: A joint semi-supervised domain generalization setting was adopted, which differs from the PU dataset design. Six cross-domain tasks, S1 to S6, were designed. During the training phase, the model can only acquire labeled data from one source domain and unlabeled data from another source domain, and is tested on the unknown target domain. In this embodiment, RNAGN and CDSRN networks were selected as baselines for comparison. The working conditions of the self-built bearing dataset are shown in Table 5, which includes 6 bearing health states, and 100 data sample fragments are collected and generated for each state. The task settings of the self-built bearing dataset are shown in Table 6, and the comparison of the target domain diagnostic accuracy of the self-built bearing dataset under different cross-domain tasks is shown in Table 7.

[0065] Table 5: Working Condition Classification of Self-built Bearing Dataset D1 1200 6×100 D2 1500 6×100 D3 1800 6×100 Table 6: Task Settings Table for Self-built Bearing Dataset S1 D1, D3 D2 S2 D3,D1 D2 S3 D2,D1 D3 S4 D1,D2 D3 S5 D2, D3 D1 S6 D3,D2 D1 Note: The bold font in Table 6 indicates the source domains with labels, while the other two are unlabeled. The first source domain in Table 6 (such as D1 in task S1, D3 in task S2, D2 in task S3, etc.) is a labeled domain, while the other two source domains are unlabeled domains.

[0066] Table 7: Comparison of Target Domain Diagnostic Accuracy under Different Cross-Domain Tasks for Self-Built Bearing Dataset RNAGN 72.67 81.83 93.33 48.83 92.00 52.50 73.52 CDSRN 93.21 89.91 83.14 79.53 89.41 66.35 83.59 This invention 99.50 97.67 88.83 94.50 97.33 86.17 94.00 Based on the comparison of experimental data in Table 7, it can be seen that RNAGN can achieve a good recognition rate when dealing with tasks S2, S3, and S5 with relatively small differences in domain distribution, while CDSRN can achieve a good recognition rate when dealing with tasks S1, S2, and S5 with relatively small differences in domain distribution, but there is still a significant gap compared with the present invention.

[0067] Combination Figure 2 Further analysis was conducted. Taking the confusion matrices of the most challenging Q1 and Q6 tasks as examples, although the rotational speed characteristics of the target domain C2 are completely different from those of the source domain, the method of this invention only caused confusion between a very small number of categories 0 and 2 in the Q1 task, achieving a recognition rate of 98% for category 1 and 96% for category 3. This clearly demonstrates that even under strong noise generated by varying operating conditions, the model can still accurately remove interference through the causal dictionary and achieve high-confidence differentiation of different fault modes.

[0068] Combination Figures 3 to 5 Further analysis was conducted on other cross-domain tasks in the PU dataset. Figure 3 , Figure 4 and Figure 5 The confusion matrices for tasks Q3 through Q8 in specific target domains are displayed. As can be clearly seen from the figures, when the operating conditions of the target domain shift, the prediction results of the confusion matrices for each task are mostly concentrated on the main diagonal, with fewer misclassified samples on the off-diagonal. Even for bearing inner and outer race faults with similar vibration characteristics, the model can still maintain a clear identification decision boundary. This visualization result confirms that the self-supervised bandgap masking strategy and causal decoupling mechanism adopted in this invention can effectively eliminate environmental pseudo-correlation caused by changing operating conditions and extract pure global harmonic invariance features.

[0069] Furthermore, combined Figure 6 A detailed textual analysis was performed on the classification results of the self-built bearing dataset. Figure 6 In the diagram, (a)-(c) correspond to the confusion matrices for the S1, S2, and S5 cross-domain diagnostic tasks, respectively. Compared to the PU dataset, the self-built bearing dataset has a higher health status dimension, introducing cage faults with weak features and complex outer ring and ball joint faults with more complex coupling features, increasing the classification difficulty. Figure 6 As can be seen from the confusion matrix, when facing such cross-domain diagnostic tasks, the prediction and recognition rate of the method of this invention is consistently above 97% for most fault categories. There is almost no serious cross-confusion between the various sub-fault categories, which verifies that the proposed causal backdoor adjustment architecture can decouple and eliminate the mixed electromagnetic and mechanical background noise of large permanent magnet motors under variable frequency speed regulation, lock in extremely weak essential fault features, and has high value for industrial field deployment.

[0070] The cross-domain fault diagnosis method for permanent magnet motor bearings proposed in this invention integrates physical signal processing priors, visual self-supervised architecture, and causal inference theory. It directly addresses the pain point that existing deep learning models are prone to collapse under extreme domain biases, effectively solving the problem of diagnostic model failure caused by permanent magnet motors under complex operating conditions of variable frequency and load. It has high robustness, physical interpretability, and industrial deployment value.

[0071] Based on the same inventive concept, the present invention also provides a cross-domain fault diagnosis system for permanent magnet motor bearings, the system comprising: The acquisition and preprocessing module is used to acquire the original one-dimensional vibration signal of the permanent magnet motor bearing equipment, generate a two-dimensional time-frequency map through time-frequency transformation, interpolate and scale the two-dimensional time-frequency map in the frequency axis dimension while keeping the size unchanged, and perform cyclic translation enhancement in the time axis or frequency axis direction to generate an enhanced time-frequency map sequence carrying physical priors. The frequency band masking and local feature extraction module is used to smoothly divide the enhanced time-frequency map sequence into blocks to generate a continuous local frequency band feature sequence; the local frequency band feature sequence is divided into frequency band rows, some frequency band rows are retained as visible frequency band features, and the remaining frequency band rows are masked as prediction targets; The prediction and inference module is used to predict the missing frequency band features of the masked area using visible frequency band features; The confounding factor decoupling module is used to pool the essential fault features extracted by the prediction and inference module into global features, construct a confounding factor representation of the working environment, evaluate the degree of correlation between the global features and different working environments through an attention mechanism, and generate causal background features. The feature fusion and fault diagnosis module is used to fuse global features with causal background features, decouple the working environment and fault features through causal backdoor adjustment, and output fault diagnosis results.

[0072] Based on the same inventive concept, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, is used to implement the cross-domain fault diagnosis method for permanent magnet motor bearings as described above.

[0073] The program product of the present invention for implementing the above-described method may employ a portable compact disk read-only memory and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In the present invention, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0074] It should be noted that a computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0075] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-described technical content to create equivalent embodiments without departing from the scope of the present invention. The implementation schemes in the above embodiments can also be further combined or replaced. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for diagnosing cross-domain faults in permanent magnet motor bearings, characterized in that, Includes the following steps: S1. Obtain the original one-dimensional vibration signal of the permanent magnet motor bearing equipment, generate a two-dimensional time-frequency map through time-frequency transformation, interpolate and scale the two-dimensional time-frequency map in the frequency axis dimension while keeping the size unchanged, and simultaneously perform cyclic translation enhancement in the time axis or frequency axis direction to generate an enhanced time-frequency map sequence carrying physical priors. S2. The enhanced time-frequency map sequence is smoothly segmented to generate a continuous local frequency band feature sequence; the local frequency band feature sequence is divided into frequency band rows, some frequency band rows are retained as visible frequency band features, and the remaining frequency band rows are masked as prediction targets; S3. Predict the masked missing frequency band features using the visible frequency band features; S4. Pool the essential fault features extracted in S3 into global features, construct a confounding factor representation of the working environment, evaluate the correlation between the global features and different working environments through an attention mechanism, and generate causal background features. S5. The global features are fused with the causal background features, and the decoupling of the working environment and fault features is achieved through causal backdoor adjustment, and the fault diagnosis results are output.

2. The method according to claim 1, characterized in that, The process involves acquiring the original one-dimensional vibration signal of the permanent magnet motor bearing equipment, generating a two-dimensional time-frequency map through time-frequency transformation, interpolating and scaling the two-dimensional time-frequency map along the frequency axis while maintaining its size, and simultaneously performing cyclic translation enhancement along either the time or frequency axis to generate an enhanced time-frequency map sequence carrying physical priors, including: The original one-dimensional vibration signal was segmented into fixed-length signal segments using an overlapping sliding window technique. The signal segment is subjected to short-time Fourier transform to obtain a complex spectrum matrix. The absolute amplitude of the complex spectrum matrix is ​​extracted and then subjected to logarithmic nonlinear scaling. The time-frequency graph is scaled to a preset fixed size using bilinear interpolation, and a global normalization operation is performed. During the training phase, a random scaling factor following a uniform distribution is generated to interpolate and scale the frequency axis of the time-frequency plot by the ratio of the random scaling factor, and the size is kept unchanged by truncation or zero padding; at the same time, a cyclic translation with random step size is performed in the time axis or frequency axis direction, and finally an enhanced time-frequency plot sequence is output. Specifically, when the random scaling factor is greater than 1, the top high-frequency region of the interpolated tensor is truncated to maintain the original size; when the random scaling factor is less than 1, zero-padding is performed on the top of the interpolated tensor to maintain the original size.

3. The method according to claim 1, characterized in that, The enhanced time-frequency map sequence is smoothly segmented to generate a continuous local frequency band feature sequence; the local frequency band feature sequence is divided into frequency band rows, retaining some frequency band rows as visible frequency band features, and masking the remaining frequency band rows as prediction targets, including: An overlapping convolutional mapping network composed of multiple layers of two-dimensional convolutional operation units is used to smoothly divide the enhanced time-frequency map sequence into blocks, generating a continuous local frequency band feature sequence; The local frequency band feature sequence is masked row by row, the masking ratio is set, some frequency band rows are randomly selected as reserved rows and the rest are masked rows, and the original feature sequence is split into visible frequency band features and masked missing frequency band features.

4. The method according to claim 3, characterized in that, The enhanced time-frequency map sequence is smoothly segmented using an overlapping convolutional mapping network composed of multiple layers of two-dimensional convolutional operation units to generate a continuous local frequency band feature sequence. The local frequency band feature sequence is then subjected to a row-by-row masking operation, with a set masking ratio. A portion of the frequency band rows are randomly selected as retained rows, and the remainder are used as mask rows. This process splits the original feature sequence into visible frequency band features and masked missing frequency band features, including: An overlapping convolutional mapping network consisting of three consecutive two-dimensional convolutional operation units is used to smoothly divide the enhanced time-frequency map sequence into blocks. Each convolutional operation unit includes a two-dimensional convolutional layer, a batch normalization layer, and a nonlinear activation function. After three overlapping downsampling operations, the output tensor is flattened and transposed to transform it into a local frequency band feature sequence with a sequence length of 64, where each of the eight consecutive elements represents a continuous frequency band in the original time-frequency graph. Set a mask ratio, generate a uniform random noise matrix for 8 frequency band rows representing different frequency bands, calculate the number of rows to be retained according to the mask ratio, take the shuffled index and the corresponding number of rows calculated as the retained rows, and the rest as the mask rows, and map the row index back to a one-dimensional sequence index of length 64, and split the original feature sequence into visible frequency band features and masked missing frequency band features.

5. The method according to claim 3, characterized in that, The prediction of the masked missing frequency band features using the visible frequency band features includes: Configure a context encoder to extract context features, i.e., essential fault features, from visible band features; Configure the prediction network to output predicted features based on the context features; Configure a target encoder to extract baseline target features from the full frequency band features, wherein the parameters of the target encoder do not participate in backpropagation; The cosine similarity function is used to measure the directional consistency between the predicted features and the baseline target features. The cosine similarity loss is calculated as the directional alignment loss to eliminate the sensitivity to the absolute amplitude of the vibration signal.

6. The method according to claim 5, characterized in that, The configuration context encoder extracts context features from the visible frequency band features; Configure a target encoder to extract baseline target features from the full frequency band features, wherein the parameters of the target encoder do not participate in backpropagation, including: Configure a context encoder based on a multi-head self-attention mechanism, input the visible frequency band features into the context encoder, and extract the context features through self-attention calculation and feedforward network processing; The learnable parameter tensor with shared weights is configured as a mask placeholder. The corresponding global position code is extracted according to the position index of the missing frequency band feature and added to the mask placeholder. The mask placeholder with position information is concatenated with the context features to restore the original length sequence. The concatenated sequence is input into the prediction network, and the network infers and outputs the predicted features corresponding to the mask positions. Configure an independent target encoder, input the complete local frequency band feature sequence without any mask segmentation into the target encoder, and extract the real latent features at the corresponding mask positions as the baseline target features. The weight parameters of the target encoder do not participate in the gradient calculation of backpropagation. All of the encoders mentioned above adopt the Transformer Encoder architecture; An exponential moving average momentum update mechanism is adopted, and the parameters of the target encoder are smoothly updated through the parameters of the context encoder after each training iteration.

7. The method according to claim 5, characterized in that, The essential fault features extracted in S3 are pooled into global features to construct a confounding factor representation of the operating environment. An attention mechanism is used to evaluate the correlation between the global features and different operating environments, generating causal background features, including: The essential fault features processed by S1-S3 and context encoder are compressed into a global feature vector, i.e., global features, by global mean pooling. Initialize a learnable parameter matrix that follows a standard normal distribution as a confounding factor dictionary to characterize potential operating conditions; A self-attention mechanism is used to map global features and a dictionary of confounding factors into query tensors and key tensors respectively through linear mapping. Scaling dot product attention is used to calculate the attention weight matrix between global features and each working environment. The attention weight matrix is ​​then multiplied and aggregated with the dictionary of confounding factors to generate causal background features.

8. The method according to claim 7, characterized in that, The decoupling of operating conditions and fault characteristics through causal backdoor adjustment, and the output of fault diagnosis results, include: The global features and the causal background features are concatenated along the feature dimension to generate a fused feature vector; The fused feature vector is input into the multilayer perceptron classification head, and the output is the predicted probability distribution, which is the fault diagnosis result. During the training phase, labeled source domain data and unlabeled cross-domain data are received simultaneously. The cross-entropy loss between the predicted result and the true label is calculated, and the joint orientation alignment loss is used as the joint loss function. The AdamW optimization algorithm is used to synchronously update the parameters of the classifier and encoder.

9. A cross-domain fault diagnosis system for permanent magnet motor bearings, characterized in that, The permanent magnet motor bearing cross-domain fault diagnosis system includes: The acquisition and preprocessing module is used to acquire the original one-dimensional vibration signal of the permanent magnet motor bearing equipment, generate a two-dimensional time-frequency map through time-frequency transformation, interpolate and scale the two-dimensional time-frequency map in the frequency axis dimension while keeping the size unchanged, and perform cyclic translation enhancement in the time axis or frequency axis direction to generate an enhanced time-frequency map sequence carrying physical priors. The frequency band masking and local feature extraction module is used to smoothly divide the enhanced time-frequency map sequence into blocks to generate a continuous local frequency band feature sequence; the local frequency band feature sequence is divided into frequency band rows, some frequency band rows are retained as visible frequency band features, and the remaining frequency band rows are masked as prediction targets; The prediction and inference module is used to predict the masked missing frequency band features based on the visible frequency band features; The confounding factor decoupling module is used to pool the essential fault features extracted by the prediction and inference module into global features, construct a confounding factor representation of the working environment, evaluate the degree of correlation between the global features and different working environments through an attention mechanism, and generate causal background features. The feature fusion and fault diagnosis module is used to fuse the global features with the causal background features, decouple the working environment and fault features through causal backdoor adjustment, and output the fault diagnosis results.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it is used to implement the cross-domain fault diagnosis method for permanent magnet motor bearings as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Bearing fault diagnosis method and system for Meta-Transform driven multi-working-condition equipment

    CN121542830A

  • Method and system for bearing fault diagnosis based on transfer learning with few samples

    CN122220859A