A bearing fault diagnosis method based on SDP and visual Transformer coding

By combining the SDP algorithm and the visual Transformer encoder, the problems of feature extraction and long-term dependency capture in bearing fault diagnosis in existing technologies are solved, and more efficient and accurate fault diagnosis is achieved.

CN117009770BActive Publication Date: 2025-10-31ANHUI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311106774.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2025-10-31
Estimated Expiration
2043-08-30

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively extract fault feature information from complex bearing vibration signals and capture long-term dependencies in time series, resulting in poor accuracy and effectiveness in bearing fault diagnosis.

Method used

The vibration signal is converted into an SDP map using the SDP algorithm. Combined with a visual Transformer encoder, local and global information is captured by segmenting image block sequences, location embedding, and multi-head self-attention mechanism. The dependencies between different parts are learned to predict the fault type.

Benefits of technology

It improves the accuracy and efficiency of bearing fault diagnosis, enabling better extraction of feature information, reduction of noise interference, capture of long-term dependencies, and provision of more intuitive and reliable diagnostic results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117009770B_ABST
    Figure CN117009770B_ABST
Patent Text Reader

Abstract

This invention specifically relates to a bearing fault diagnosis method based on SDP and visual Transformer encoding, comprising: converting vibration signals into SDP maps; inputting the SDP maps into a trained fault diagnosis model to output corresponding fault type prediction values; segmenting the SDP maps into a series of SDP image patch sequences; linearly adding position embeddings to the vectors of the SDP image patch sequences to obtain position embedding image patch sequences; capturing local and global information in the SDP image patch sequences and learning the dependencies between different parts of the SDP image patch sequences to obtain an encoded representation of the SDP image patch sequences; obtaining probability values ​​of various fault types through the MLP head layer, and then using the fault type corresponding to the highest probability value as the fault type prediction value. This invention effectively integrates the SDP algorithm and visual Transformer encoding, enabling the extraction of bearing fault feature information from complex vibration signals, while better capturing the long-term dependencies in the time series of bearing vibration signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of bearing fault diagnosis and deep learning, specifically to a bearing fault diagnosis method based on SDP and visual Transformer encoding. Background Technology

[0002] Rolling bearings are among the most widely used components in modern machinery. They support rotating parts through rolling contact between key components, supporting shafts while allowing them to rotate freely. Practical research has shown that most failures in rotating machinery, induction motors, gearboxes, and other mechanical equipment are caused by rolling bearings. By monitoring and diagnosing bearing conditions, the accident rate and maintenance costs have been significantly reduced. When bearings are monitored by sensors and analyzed using models, manpower can be greatly reduced, and more accurate information feedback can be obtained. Therefore, advanced bearing fault diagnosis systems can greatly improve the efficiency of practical engineering projects.

[0003] In recent years, due to the continuous development of deep learning technology, many researchers have considered combining the field of bearing fault diagnosis with deep learning algorithms. For example, Chinese patent CN111198098A discloses "A Method for Predicting Wind Turbine Bearing Faults Based on Artificial Neural Networks," which includes: collecting historical data on the operation of wind turbine bearings and performing data preprocessing; using an improved stationary wavelet packet transform to perform frequency transformation, thereby separating frequency bandwidths to extract fault feature frequency values; using an Elman artificial neural network and training it with a training set to obtain a neural network model; and performing fault prediction on real-time input data. This existing solution achieves bearing fault prediction through artificial neural networks.

[0004] The applicant discovered that bearing vibration signals are among the most telling indicators of a bearing's fault state. For large mechanical equipment, the operating conditions and environment of bearings are complex, resulting in complex vibration signals. However, current technologies that directly use bearing vibration signals as model inputs make it difficult for the model to extract characteristic information about bearing faults from these complex signals, leading to poor accuracy in bearing fault diagnosis. Furthermore, vibration signals exhibit strong time-dependent relationships, and existing methods for predicting bearing faults using artificial neural networks struggle to effectively capture the long-term dependencies in the time series of bearing vibration signals, further hindering the effectiveness of bearing fault diagnosis. Therefore, improving the accuracy and effectiveness of bearing fault diagnosis is a pressing technical problem that needs to be addressed. Summary of the Invention

[0005] To address the shortcomings of the existing technologies, the technical problem to be solved by this invention is: how to provide a bearing fault diagnosis method based on SDP and visual Transformer coding. By effectively integrating the SDP algorithm and visual Transformer coding, the characteristic information of bearing faults can be effectively extracted from complex vibration signals. At the same time, it can better capture the long-term dependencies in the time series of bearing vibration signals, thereby improving the accuracy and effectiveness of bearing fault diagnosis and providing a new approach to bearing fault diagnosis.

[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0007] A bearing fault diagnosis method based on SDP and visual Transformer coding includes:

[0008] S1: Acquire the vibration signal of the bearing to be diagnosed;

[0009] S2: The vibration signal of the bearing to be diagnosed is converted into the corresponding SDP diagram using the SDP algorithm;

[0010] S3: Input the SDP diagram of the bearing to be diagnosed into the trained fault diagnosis model, and output the corresponding fault type prediction value.

[0011] The processing steps of the fault diagnosis model are as follows:

[0012] S301: Divide the input SDP image into a series of SDP image block sequences;

[0013] S302: Input the SDP image patch sequence into the embedding layer to linearly add positional embeddings to the vector of the SDP image patch sequence, thereby obtaining the corresponding positional embedding image patch sequence;

[0014] S303: Input the position-embedded image patch sequence into the visual Transformer encoder to capture local and global information in the SDP image patch sequence and learn the dependencies between different parts of the SDP image patch sequence to obtain the corresponding SDP image patch sequence encoded representation;

[0015] S304: Input the SDP image block sequence encoding representation into the MLP head layer to obtain the probability values ​​of various fault types, and then use the fault type corresponding to the maximum probability value as the fault type prediction value.

[0016] S4: Use the output fault type prediction value as the fault diagnosis result of the bearing to be diagnosed.

[0017] Preferably, the SDP diagram is generated through the following steps:

[0018] S201: Acquire the vibration timing signal of the bearing;

[0019] S202: Preprocess the vibration timing signal;

[0020] S203: The preprocessed vibration time sequence signal is segmented to obtain several segmented signals; each segmented signal represents the characteristics of the vibration time sequence signal within a time window;

[0021] S204: Perform SDP operation on each segmented signal to obtain the corresponding SDP diagram.

[0022] Preferably, when performing SDP operation, any point in the segmented signal is transformed into a point in polar coordinate space, thereby forming an SDP graph in polar coordinates;

[0023] Specifically:

[0024] In the time-series signal N, x i Let x be the amplitude of the time-series signal N at the i-th time point. i+a For a time-domain signal x with a hysteresis coefficient i The corresponding amplitude;

[0025] When an amplitude x i Mapped to polar coordinate space P(r(i),Θ(i),φ(i)), the polar radius r(i) is determined by the magnitude x. i The mapping, as described by the formula, is as follows:

[0026]

[0027] In the formula: x max x min Let N and N represent the maximum and minimum values ​​of the time-domain signal N, respectively.

[0028] In polar coordinate space, the counterclockwise and clockwise rotation angles along the initial line are Θ(i) and φ(i), respectively, due to x i Adjacent amplitudes x i+a The mapping yields a formula described as follows:

[0029]

[0030]

[0031]

[0032] In the formula: Θ(i) and φ(i) represent time-domain points x. i+a Clockwise and counterclockwise rotation angles; x i+a Represents a time-domain signal x with a hysteresis coefficient iThe corresponding amplitude; ζ and a represent the adjustment of the amplification factor and the time delay factor. By adjusting the amplification factor ζ and the time delay factor a, any point in the time-domain signal can be intuitively represented as polar coordinates; where the SDP diagram is based on the angle θ of l mirror-symmetric planes. l A fan-shaped leaf image formed by the axis of symmetry.

[0033] Preferably, for the input SDP graph x∈R h×w×c Where h represents the height of the SDP image, w represents the width of the SDP image, and c represents the number of channels in the SDP image, the image is divided into N image blocks x with length and width p and number of channels c. i ∈R p*p*c .

[0034] Preferably, N image patches x i ∈R p*p*c Tiled into a one-dimensional sequence x p ∈R N×(p*p*c) Then, the one-dimensional sequence x' is processed through a linear projection layer. p ∈R N×D Linear projection is performed to preserve the positional information, one-dimensional feature vector, and class label of each image patch, and each image patch is mapped to a D-dimensional vector space to obtain the corresponding position-embedded image patch sequence.

[0035] Preferably, the visual Transformer encoder is composed of multiple identical module layers stacked together, wherein each module layer contains two sub-layers, and each sub-layer consists of a multi-head self-attention layer and an MLP feedforward network, respectively;

[0036] In the multi-head self-attention layer, the input position embedding image patch sequence is processed by multiple attention heads, where each attention head learns different attention points in the SDP image patch sequence, and each attention head produces an output. The outputs of all attention heads are combined in the final result. In the MLP feedforward network, feature extraction and nonlinear mapping are performed on the final result of the multi-head self-attention layer output.

[0037] Preferably, in the visual Transformer encoder, layer normalization is applied at the end of each sub-layer, and the output of each sub-layer is represented as:

[0038] o=LayerNorm(x+Sublayer(x));

[0039] In the formula: LayerNorm(·) represents the normalization function; Sublayer(x) represents the function of the multi-head self-attention layer or MLP feedforward network in each sublayer.

[0040] Preferably, the multi-head self-attention layer jointly focuses on features of different representation subspaces at different locations in the image patch sequence through a multi-head self-attention mechanism; wherein the self-attention mechanism uses scale dot product attention to calculate the attention weights of the feature matrix;

[0041] Assume the Q and K dimensions of the input are d. K V has a dimension of d V Then calculate the dot product of Q and each K, and divide by... Then, the attention weights are calculated using the Softmax function;

[0042] The formula is described as follows:

[0043]

[0044] In the formula: Attention(Q,K,V) represents the attention weights; Q represents the query matrix; K represents the key matrix; V represents the value matrix; the three matrices Q, K, and V are respectively derived from the input feature matrix X. f With parameter matrix W Q W K W V Multiply them to get the result.

[0045] Preferably, the internal structure of the MLP feedforward network includes a fully connected layer, a GELU activation function layer, and a dropout function layer;

[0046] The output of the GELU activation function layer is as follows:

[0047]

[0048] In the formula: x represents the input of the GELU activation function layer; erf(·) represents the Gaussian error function.

[0049] Preferably, the MLP head layer includes a fully connected layer and a GELU activation function layer connected in series. The SDP image block sequence processed by the visual Transformer encoder is encoded and input into the MLP head layer to obtain the probability values ​​of various fault types. Then, the fault type corresponding to the highest probability value is used as the fault type prediction value.

[0050] Compared with existing technologies, the bearing fault diagnosis method based on SDP and visual Transformer coding in this invention has the following advantages:

[0051] This invention converts the vibration signal of the bearing to be diagnosed into an SDP graph using the SDP algorithm, and then predicts the fault type through a fault diagnosis model. On one hand, the SDP algorithm extracts fault-related modulation components by synchronously modulating and demodulating the vibration signal, effectively extracting bearing fault feature information from complex vibration signals, thus ensuring the accuracy of bearing fault diagnosis. Simultaneously, the SDP algorithm can extract multiple feature frequencies, revealing the bearing fault condition more comprehensively. Compared with traditional spectrum analysis methods, it provides more accurate and detailed fault feature information, making accurate bearing fault diagnosis easier. Furthermore, the SDP algorithm has strong noise suppression performance, effectively reducing noise interference on fault feature frequencies, thereby further improving the reliability of fault diagnosis.

[0052] On the other hand, in the fault diagnosis model of the present invention, the SDP image is first segmented into a sequence of image blocks to more clearly represent the features in the bearing vibration signal, and each image block can capture the local details of the vibration signal, making subsequent feature extraction and diagnosis more accurate. Then, the SDP image block sequence is embedded to ensure that the positional information of each image block is not lost during feature extraction and diagnosis, allowing the results of the image blocks to be easily mapped back to the original vibration signal, thus providing more intuitive diagnostic results. Simultaneously, position embedding increases robustness to noise and interference, and by using the information from position embedding during the diagnostic process, sensitivity to noise and interference can be reduced, improving the accuracy and reliability of bearing fault diagnosis. Furthermore, position embedding allows for parallel processing of each image block, leveraging the advantages of parallel computing to accelerate the feature extraction and diagnosis process, improving the efficiency and practicality of bearing fault diagnosis. Finally, a visual Transformer encoder is used to capture local and global information in the SDP image patch sequence and learn the dependencies between different parts of the SDP image patch sequence. Compared with deep learning networks such as recurrent neural networks, the visual Transformer encoder can better capture the long-term dependencies in the time series of bearing vibration signals, thereby improving the effectiveness of bearing fault diagnosis. At the same time, the visual Transformer encoder can process different parts of the input SDP image patch sequence in parallel, without having to process them sequentially. This is more efficient for processing long sequences and large amounts of data, without increasing training and inference time, thereby further improving the efficiency of bearing fault diagnosis. Attached Figure Description

[0053] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:

[0054] Figure 1The diagram shows the logic block diagram of a bearing fault diagnosis method based on SDP and visual Transformer coding.

[0055] Figure 2 A schematic diagram illustrating the transformation of an SDP graph using the SDP algorithm;

[0056] Figure 3 This is a network structure diagram of a visual Transformer encoder;

[0057] Figure 4 This is a network structure diagram for each sublayer in the visual Transformer encoder. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but only to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0059] It should be noted that similar reference numerals and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the figures, or the orientation or positional relationship commonly used when the product is in use. They are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. In addition, the terms "horizontal," "vertical," etc., do not mean that the component is required to be absolutely horizontal or suspended, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted. In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0060] The following detailed explanation illustrates the specific implementation methods:

[0061] Example:

[0062] This embodiment discloses a bearing fault diagnosis method based on SDP and visual Transformer coding.

[0063] like Figure 1 As shown, the bearing fault diagnosis method based on SDP and visual Transformer coding includes:

[0064] S1: Acquire the vibration signal of the bearing to be diagnosed;

[0065] S2: The vibration signal of the bearing to be diagnosed is converted into the corresponding SDP diagram using the SDP (Symmetrized Dot Pattern) algorithm;

[0066] S3: Input the SDP diagram of the bearing to be diagnosed into the trained fault diagnosis model, and output the corresponding fault type prediction value.

[0067] The processing steps of the fault diagnosis model are as follows:

[0068] S301: Divide the input SDP image into a series of SDP image block sequences;

[0069] S302: Input the SDP image patch sequence as a linear projection layer of the embedding layer to linearly add position embeddings to the vector of the SDP image patch sequence to obtain the corresponding position-embedded image patch sequence.

[0070] S303: Input the location-embedded image patch sequence into a visual Transformer consisting of a multi-head attention layer and a multi-layer perceptron layer to capture local and global information in the SDP image patch sequence and learn the dependencies between different parts of the SDP image patch sequence to obtain the corresponding SDP image patch sequence encoded representation.

[0071] S304: Input the SDP image block sequence encoding representation into the MLP head layer to obtain the probability values ​​of various fault types, and then use the fault type corresponding to the maximum probability value as the fault type prediction value.

[0072] In this embodiment, the MLP head layer includes a fully connected layer and a GELU activation function layer connected in series. The SDP image block sequence processed by the visual Transformer encoder is encoded and input into the MLP head layer to obtain the probability values ​​of various fault types. Then, the fault type corresponding to the maximum probability value is used as the fault type prediction value.

[0073] In training the fault diagnosis model, different categories of SDP graphs are used as new datasets and divided into training and test sets in a ratio of 0.8:0.2.

[0074] S4: Use the output fault type prediction value as the fault diagnosis result of the bearing to be diagnosed.

[0075] This invention converts the vibration signal of the bearing to be diagnosed into an SDP graph using the SDP algorithm, and then predicts the fault type through a fault diagnosis model. On one hand, the SDP algorithm extracts fault-related modulation components by synchronously modulating and demodulating the vibration signal, effectively extracting bearing fault feature information from complex vibration signals, thus ensuring the accuracy of bearing fault diagnosis. Simultaneously, the SDP algorithm can extract multiple feature frequencies, revealing the bearing fault condition more comprehensively. Compared with traditional spectrum analysis methods, it provides more accurate and detailed fault feature information, making accurate bearing fault diagnosis easier. Furthermore, the SDP algorithm has strong noise suppression performance, effectively reducing noise interference on fault feature frequencies, thereby further improving the reliability of fault diagnosis.

[0076] On the other hand, in the fault diagnosis model of the present invention, the SDP image is first segmented into a sequence of image blocks to more clearly represent the features in the bearing vibration signal, and each image block can capture the local details of the vibration signal, making subsequent feature extraction and diagnosis more accurate. Then, the SDP image block sequence is embedded to ensure that the positional information of each image block is not lost during feature extraction and diagnosis, allowing the results of the image blocks to be easily mapped back to the original vibration signal, thus providing more intuitive diagnostic results. Simultaneously, position embedding increases robustness to noise and interference, and by using the information from position embedding during the diagnostic process, sensitivity to noise and interference can be reduced, improving the accuracy and reliability of bearing fault diagnosis. Furthermore, position embedding allows for parallel processing of each image block, leveraging the advantages of parallel computing to accelerate the feature extraction and diagnosis process, improving the efficiency and practicality of bearing fault diagnosis. Finally, a visual Transformer encoder is used to capture local and global information in the SDP image patch sequence and learn the dependencies between different parts of the SDP image patch sequence. Compared with deep learning networks such as recurrent neural networks, the visual Transformer encoder can better capture the long-term dependencies in the time series of bearing vibration signals, thereby improving the effectiveness of bearing fault diagnosis. At the same time, the visual Transformer encoder can process different parts of the input SDP image patch sequence in parallel, without having to process them sequentially. This is more efficient for processing long sequences and large amounts of data, without increasing training and inference time, thereby further improving the efficiency of bearing fault diagnosis.

[0077] In summary, by effectively integrating the SDP algorithm and visual Transformer encoding, this invention can effectively extract the feature information of bearing faults from complex vibration signals, and at the same time better capture the long-term dependencies in the time series of bearing vibration signals, thereby improving the accuracy, effectiveness and efficiency of bearing fault diagnosis, and providing a new approach to bearing fault diagnosis.

[0078] In its specific implementation, this invention employs the SDP algorithm, a method commonly used in vibration signal processing and fault diagnosis. It extracts features and performs fault diagnosis by converting vibration signals into SDP images. Based on the characteristics of SDP images, the type of bearing fault can be diagnosed through feature extraction.

[0079] Combination Figure 2 As shown, the SDP diagram is generated through the following steps:

[0080] S201: Obtain the vibration timing signal of the bearing (i.e., the timing signal of the vibration signal);

[0081] In this embodiment, the timing signals include signals under normal operating conditions and signals under various fault conditions, such as damage to the inner ring of the bearing, damage to the outer ring, and damage to the balls.

[0082] S202: Preprocess the vibration timing signal;

[0083] In this embodiment, preprocessing includes operations such as noise reduction, filtering, and normalization to ensure signal quality and reliability.

[0084] S203: The preprocessed vibration time sequence signal is segmented to obtain several segmented signals; each segmented signal represents the characteristics of the vibration time sequence signal within a time window;

[0085] S204: Perform SDP operation on each segmented signal to obtain the corresponding SDP diagram.

[0086] In this embodiment, the segmented signal can be converted into the corresponding SDP diagram through the following steps:

[0087] 1) Calculate the polar radius of each time-domain point of the segmented signal;

[0088] 2) Calculate the clockwise and counterclockwise rotation angles for each time-domain point of the segmented signal;

[0089] 3) Map all time-domain points onto a polar coordinate plot according to 1) and 2);

[0090] 4) Rotate the drawn polar coordinate graph 60 degrees 6 times to obtain a symmetrical snowflake pattern, i.e., the SDP graph;

[0091] 5) Crop the image to the required size according to the polar coordinate center position;

[0092] 6) Generate an SDP image dataset by iteratively generating segmented signals of all fault categories according to steps 1) to 5).

[0093] Specifically, when performing SDP operation, any point in the segmented signal is transformed into a point in polar coordinate space, thereby forming an SDP graph in polar coordinates;

[0094] In the time-series signal N, x i Let x be the amplitude of the time-series signal N at the i-th time point. i+a For a time-domain signal x with a hysteresis coefficient i The corresponding amplitude;

[0095] When an amplitude x i Mapped to polar coordinate space P(r(i),Θ(i),φ(i)), the polar radius r(i) is determined by the magnitude x. i The mapping, as described by the formula, is as follows:

[0096]

[0097] In the formula: x max x min Let N and N represent the maximum and minimum values ​​of the time-domain signal N, respectively.

[0098] In polar coordinate space, the counterclockwise and clockwise rotation angles along the initial line are Θ(i) and φ(i), respectively, due to x i Adjacent amplitudes x i+a The mapping yields a formula described as follows:

[0099]

[0100]

[0101]

[0102] In the formula: Θ(i) and φ(i) represent time-domain points x. i+a Clockwise and counterclockwise rotation angles; x i+a Represents a time-domain signal x with a hysteresis coefficient i The corresponding amplitude; ζ and a represent the adjustment of the amplification factor and the time delay factor. By adjusting the amplification factor ζ and the time delay factor a, any point in the time-domain signal can be intuitively represented as polar coordinates; where the SDP diagram is based on the angle θ of the l-mirror symmetry plane (l = 0, 1, 2, ..., L-1, where L is the number of symmetry planes). l A fan-shaped leaf image formed by the axis of symmetry.

[0103] In this invention, the SDP algorithm is used to extract the modulation components related to the fault by synchronously modulating and demodulating the vibration signal. This effectively extracts the characteristic information of bearing faults from complex vibration signals, thereby ensuring the accuracy of bearing fault diagnosis. At the same time, the SDP algorithm can extract multiple characteristic frequencies simultaneously, which can more comprehensively reveal the condition of the bearing fault. Compared with traditional spectrum analysis methods, it can provide more accurate and detailed fault characteristic information, making it easier to achieve accurate diagnosis of bearing faults. In addition, the SDP algorithm has strong noise suppression performance, which can effectively reduce the interference of noise on fault characteristic frequencies, thereby further improving the reliability of fault diagnosis.

[0104] The SDP image used in this invention visualizes the spectral information of the vibration signal, making the features more obvious and intuitive, which facilitates fault diagnosis and analysis. At the same time, the SDP image removes some high-frequency noise from the vibration signal, making the features more obvious, thereby improving the accuracy and robustness of diagnosis. In addition, the SDP image shows different features for different fault types, and the fault type of the bearing can be more accurately determined by analyzing the features.

[0105] In the specific implementation process, the linear projection layer is used as the embedding layer of the fault diagnosis model.

[0106] In the linear projection layer, for the input SDP graph x∈R h×w×c Where h represents the height of the SDP image, w represents the width of the SDP image, and c represents the number of channels in the SDP image, the image is divided into N image blocks x with length and width p and number of channels c. i ∈R p*p*c Simultaneously, N image patches x i ∈R p*p*c Tiled into a one-dimensional sequence x p ∈R N×(p*p*c) Then, the one-dimensional sequence x' is processed through a linear projection layer. p ∈R N×D Linear projection is performed to preserve the positional information, one-dimensional feature vector, and class label of each image patch, and each image patch is mapped to a D-dimensional vector space to obtain the corresponding position-embedded image patch sequence.

[0107] This invention embeds the vectors of SDP image patch sequences into positions using a linear projection layer. The linear projection layer reduces the dimensionality of the SDP image patch sequences, mapping high-dimensional data to a low-dimensional space. This helps highlight fault type features, improves feature discrimination, and transforms the SDP image patch sequences into more discriminative feature vectors, making fault types more obvious. Simultaneously, the linear projection layer reduces data dimensionality to an appropriate range, accelerating the fault diagnosis process and improving the efficiency of bearing fault diagnosis. Furthermore, the unknown embedding through the linear projection layer allows the model to better adapt to different SDP image patch sequences, increasing the model's generalization ability.

[0108] Combination Figure 3 As shown, the visual Transformer of the fault diagnosis model of the present invention consists of a multi-head attention layer and a multi-layer perceptron layer.

[0109] Specifically, the visual Transformer encoder consists of multiple identical module layers stacked together. Each module layer contains two sub-layers, each consisting of a multi-head self-attention layer and an MLP feedforward network. In the multi-head self-attention layer, multiple attention heads process the position-embedded image patch sequence of the input. Each attention head learns different points of interest in the SDP image patch sequence, and each attention head produces an output. The outputs of all attention heads are combined in the final result. In the MLP feedforward network, feature extraction and non-linear mapping are performed on the final result output by the multi-head self-attention layer.

[0110] Combination Figure 4As shown, in the visual Transformer encoder, layer normalization is applied at the end of each sub-layer, and the output of each sub-layer is represented as:

[0111] o=LayerNorm(x+Sublayer(x));

[0112] In the formula: LayerNorm(·) represents the normalization function; Sublayer(x) represents the function of the multi-head self-attention layer or MLP feedforward network in each sublayer.

[0113] The visual Transformer of this invention consists of a multi-head attention layer and a multi-layer perceptron layer. The multi-head attention layer allows the visual Transformer to learn attention points at different positions in the sequence across different attention heads. This enables the visual Transformer to learn the correlations between different fault modes at different frequencies of the vibration signal through the multi-head attention mechanism, allowing it to understand and distinguish different fault modes and thus better capture the long-term dependencies in the time series of bearing vibration signals. Simultaneously, the multi-layer perceptron layer provides additional nonlinear modeling capabilities, allowing more layers to be added to the visual Transformer encoder to improve the model's representational power. This is particularly important for bearing fault diagnosis tasks because the characteristics of vibration signals are often nonlinear, requiring a model with sufficient expressive power to capture these features, and also assisting in capturing long-term dependencies.

[0114] In practice, multi-head self-attention is an attention mechanism used for sequence modeling and natural language processing tasks, and it is one of the key components of the Transformer model. Self-attention refers to the ability of each element in a sequence to establish associations with other elements in the sequence, and these associations are weighted. Multi-head self-attention extends this attention mechanism by using multiple independent attention heads for modeling.

[0115] In multi-head self-attention, the input sequence is processed by multiple attention heads. Each attention head learns different attention weights. This allows the model to simultaneously focus on different semantic information, thereby capturing multiple different aspects of the input sequence. Specifically, the operation of multi-head self-attention is as follows:

[0116] 1) Each element in the input sequence is mapped to a vector space of different queries, keys, and values ​​through a linear transformation;

[0117] 2) Each attention head obtains its attention weight by calculating query-key similarity;

[0118] 3) Calculate the weighted value for each attention head, which is the dot product of the attention weight and the corresponding value;

[0119] 4) The weighted values ​​of multiple attention heads are concatenated or merged together, and the final output is obtained through a linear transformation.

[0120] Through multi-head self-attention, the visual Transformer can model the input sequence from different perspectives and capture different semantic information.

[0121] Specifically, the multi-head self-attention layer jointly focuses on features of different representation subspaces at different locations in the image patch sequence through a multi-head self-attention mechanism; the self-attention mechanism uses scale dot product attention to calculate the attention weights of the feature matrix and performs dot product attention proportionally.

[0122] It should be noted that dot product attention is a commonly used method for calculating attention weights; it is a specific mathematical formula used to calculate attention weights. Attention weights are calculated numerical values ​​representing the degree of attention, used in attention mechanisms to measure the level of attention given to different elements.

[0123] Assume the Q and K dimensions of the input are d. K V has a dimension of d V Then calculate the dot product of Q and each K, and divide by... Then, the attention weights are calculated using the Softmax function;

[0124] The formula is described as follows:

[0125]

[0126] In the formula: Attention(Q,K,V) represents the attention weights; Q represents the query matrix; K represents the key matrix; V represents the value matrix; the three matrices Q, K, and V are respectively derived from the input feature matrix X. f With parameter matrix W Q W K W V Multiply them to get the result.

[0127] In practical implementation, the Multi-Layer Perceptron Feed-Forward Network (MLP) is a crucial component in the visual Transformer encoder, used for feature extraction and nonlinear transformation. The MLP is a submodule of each encoder layer in the Transformer model. Its role is to further process the features obtained after the self-attention mechanism to enhance their representational and expressive power. The MLP consists of two linear transformation layers and an activation function. The linear transformation layers perform linear transformations and mappings on the input features, increasing their complexity and expressive power. The activation function introduces nonlinear transformations, further enriching the feature representational capabilities.

[0128] In each encoder layer, the input to the MLP feedforward network is features obtained through a self-attention mechanism. These features pass through a fully connected hidden layer, where the dimensionality of the hidden layer is typically larger than the dimension of the input features. The output of this hidden layer then passes through a fully connected output layer, remapping the feature dimension back to its original dimension. Finally, an activation function (e.g., ReLU) applies a non-linear transformation to the output features. Through the MLP feedforward network, the encoder is able to perform more complex feature extraction and non-linear transformations. This helps improve the representational power of the features, allowing the model to better capture semantic information and complex relationships in the input sequence.

[0129] Specifically, the internal structure of the MLP feedforward network includes a fully connected layer, a GELU activation function layer, and a dropout function layer;

[0130] To improve network convergence, the Gaussian Error Linear Unit (GELU) activation function is used instead of the original ReLU activation function in the MLP feedforward network. The output of the GELU activation function layer is as follows:

[0131]

[0132] In the formula: x represents the input of the GELU activation function layer; erf(·) represents the Gaussian error function.

[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.

Claims

1. A bearing fault diagnosis method based on SDP and visual Transformer coding, characterized in that, include: S1: Acquire the vibration signal of the bearing to be diagnosed; S2: The vibration signal of the bearing to be diagnosed is converted into the corresponding SDP diagram using the SDP algorithm; S3: Input the SDP diagram of the bearing to be diagnosed into the trained fault diagnosis model, and output the corresponding fault type prediction value. The processing steps of the fault diagnosis model are as follows: S301: Divide the input SDP image into a series of SDP image block sequences; S302: Input the SDP image patch sequence into the embedding layer to linearly add positional embeddings to the vector of the SDP image patch sequence, thereby obtaining the corresponding positional embedding image patch sequence; S303: Input the position-embedded image patch sequence into the visual Transformer encoder to capture local and global information in the SDP image patch sequence and learn the dependencies between different parts of the SDP image patch sequence to obtain the corresponding SDP image patch sequence encoded representation; S304: Input the SDP image block sequence encoding representation into the MLP head layer to obtain the probability values ​​of various fault types, and then use the fault type corresponding to the maximum probability value as the fault type prediction value. S4: Use the output fault type prediction value as the fault diagnosis result of the bearing to be diagnosed.

2. The bearing fault diagnosis method based on SDP and visual Transformer coding as described in claim 1, characterized in that, In step S2, the SDP diagram is generated through the following steps: S201: Acquire the vibration timing signal of the bearing; S202: Preprocess the vibration timing signal; S203: The preprocessed vibration time sequence signal is segmented to obtain several segmented signals; each segmented signal represents the characteristics of the vibration time sequence signal within a time window; S204: Perform SDP operation on each segmented signal to obtain the corresponding SDP diagram.

3. The bearing fault diagnosis method based on SDP and visual Transformer coding as described in claim 2, characterized in that: In step S204, when performing the SDP operation, any point in the segmented signal is transformed into a point in polar coordinate space, thereby forming an SDP graph in polar coordinates. Specifically: In the time-series signal N, x i Let x be the amplitude of the time-series signal N at the i-th time point. i+a For a time-domain signal x with a hysteresis coefficient i The corresponding amplitude; When an amplitude x i Mapped to polar coordinate space P(r(i),Θ(i),φ(i)), the polar radius r(i) is determined by the magnitude x. i The mapping, as described by the formula, is as follows: In the formula: x max x min Let N and N represent the maximum and minimum values ​​of the time-domain signal N, respectively. In polar coordinate space, the counterclockwise and clockwise rotation angles along the initial line are Θ(i) and φ(i), respectively, due to x i Adjacent amplitudes x i+a The mapping yields a formula described as follows: In the formula: Θ(i) and φ(i) represent time-domain points x. i+a Clockwise and counterclockwise rotation angles; x i+a Represents a time-domain signal x with a hysteresis coefficient i The corresponding amplitude; ζ and a represent the adjustment of the amplification factor and the time delay factor. By adjusting the amplification factor ζ and the time delay factor a, any point in the time-domain signal can be intuitively represented as polar coordinates; where the SDP diagram is based on the angle θ of l mirror-symmetric planes. l A fan-shaped leaf image formed by the axis of symmetry.

4. The bearing fault diagnosis method based on SDP and visual Transformer coding as described in claim 1, characterized in that: In step S301, for the input SDP graph x∈R h×w×c Where h represents the height of the SDP image, w represents the width of the SDP image, and c represents the number of channels in the SDP image, the image is divided into N image blocks x with length and width p and number of channels c. i ∈R p*p*c .

5. The bearing fault diagnosis method based on SDP and visual Transformer coding as described in claim 4, characterized in that: In step S302, N image patches x i ∈R p*p*c Tiled into a one-dimensional sequence x p ∈R N×(p*p*c) Then, the one-dimensional sequence x' is processed through a linear projection layer. p ∈R N×D Linear projection is performed to preserve the positional information, one-dimensional feature vector, and class label of each image patch, and each image patch is mapped to a D-dimensional vector space to obtain the corresponding position-embedded image patch sequence.

6. The bearing fault diagnosis method based on SDP and visual Transformer coding as described in claim 1, characterized in that: In step S303, the visual Transformer encoder is composed of multiple identical module layers stacked together, wherein each module layer contains two sub-layers, and each sub-layer is composed of a multi-head self-attention layer and an MLP feedforward network respectively; In the multi-head self-attention layer, the input position embedding image patch sequence is processed by multiple attention heads, where each attention head learns different attention points in the SDP image patch sequence, and each attention head produces an output. The outputs of all attention heads are combined in the final result. In the MLP feedforward network, feature extraction and nonlinear mapping are performed on the final result of the multi-head self-attention layer output.

7. The bearing fault diagnosis method based on SDP and visual Transformer coding as described in claim 6, characterized in that: In the visual Transformer encoder, layer normalization is applied at the end of each sub-layer; The output of each sub-layer is represented as follows: o=LayerNorm(x+Sublayer(x)); In the formula: LayerNorm(·) represents the normalization function; Sublayer(x) represents the function of the multi-head self-attention layer or MLP feedforward network in each sublayer.

8. The bearing fault diagnosis method based on SDP and visual Transformer coding as described in claim 6, characterized in that: The multi-head self-attention layer jointly focuses on features of different representation subspaces at different locations in the image patch sequence through a multi-head self-attention mechanism; the self-attention mechanism uses scale dot product attention to calculate the attention weights of the feature matrix; Assume the Q and K dimensions of the input are d. K V has a dimension of d V Then calculate the dot product of Q and each K, and divide by... Then, the attention weights are calculated using the Softmax function; The formula is described as follows: In the formula: Attention(Q,K,V) represents the attention weights; Q represents the query matrix; K represents the key matrix; V represents the value matrix; the three matrices Q, K, and V are respectively derived from the input feature matrix X. f With parameter matrix W Q W K W V Multiply them to get the result.

9. The bearing fault diagnosis method based on SDP and visual Transformer coding as described in claim 6, characterized in that: The internal structure of the MLP feedforward network includes a fully connected layer, a GELU activation function layer, and a dropout function layer; The output of the GELU activation function layer is as follows: In the formula: x represents the input of the GELU activation function layer; erf(·) represents the Gaussian error function.

10. The bearing fault diagnosis method based on SDP and visual Transformer coding as described in claim 1, characterized in that: In step S304, the MLP head layer includes a fully connected layer and a GELU activation function layer connected in series. The SDP image block sequence processed by the visual Transformer encoder is encoded and input into the MLP head layer to obtain the probability values ​​of various fault types. Then, the fault type corresponding to the maximum probability value is used as the fault type prediction value.

Citation Information

Patent Citations

  • Wind driven generator bearing fault prediction method based on artificial neural network

    CN111198098A

  • Rolling bearing fault diagnosis method based on time-frequency domain expression

    CN113865868A

  • Optical fiber current transformer fault diagnosis method based on deep residual network

    CN116451163A