A rolling bearing fault diagnosis method based on wavelet variation and improved TL-ResNet
By converting bearing vibration signals into a two-dimensional time-frequency matrix and applying an improved TL-ResNet model, the problems of poor adaptability to working conditions and complex deep learning training in traditional methods are solved, achieving efficient fault diagnosis.
Patent Information
- Application Number
- CN202510300064.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-03-14
AI Technical Summary
Traditional rolling bearing fault diagnosis methods rely on prior human knowledge, lack versatility, and are difficult to achieve high-accuracy diagnosis under different operating conditions. Deep learning faces problems such as large sample requirements and vanishing and exploding gradients in fault diagnosis.
One-dimensional vibration signals are transformed into two-dimensional time-frequency matrices and color images are generated. An improved TL-ResNet model is used for end-to-end fault classification. Feature representation is enhanced by wavelet transformation and SEResNet module. Transfer learning is combined to perform diagnosis under different working conditions.
It improves the accuracy and robustness of rolling bearing fault diagnosis, reduces reliance on prior human knowledge, simplifies the feature design process, and is applicable to fault diagnosis under multiple operating conditions.
Smart Images

Figure CN119984819B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of bearing fault diagnosis, and particularly relates to a vehicle bearing fault diagnosis method based on wavelet change and improved TL-ResNet. BACKGROUND
[0002] Rolling bearings, as key components of vehicle transmission systems and mechanical-electrical systems, are widely used in vehicle transportation. However, due to the fact that rolling bearings often operate in complex and harsh environments, the probability of failure significantly increases. According to statistics, bearing failure accounts for 40% to 70% of all vehicle transmission system failures. Therefore, it is particularly important to effectively detect and accurately determine the fault type of rolling bearings. Through regular inspection and maintenance of rolling bearings, mechanical accidents caused by bearing failure can be prevented, and equipment safety can be ensured.
[0003] Traditional fault diagnosis methods usually include three main links: signal acquisition, feature extraction, and fault classification. Traditional methods mainly rely on Fourier transform, empirical mode decomposition, Hilbert-Huang transform, etc. By converting the original time-domain vibration signal into time-frequency domain to extract features, these features are then used for fault diagnosis. However, these methods have the following shortcomings: they rely on artificial prior knowledge, researchers need to select appropriate diagnostic techniques based on specific environments, and lack of universality; it is difficult to design features suitable for all working conditions, resulting in limited diagnostic accuracy under different working conditions.
[0004] With the rapid development of computing power and technology, deep learning technology, with its end-to-end learning ability, overcomes many limitations of traditional methods and significantly improves the accuracy and efficiency of fault diagnosis. However, deep learning in the field of fault diagnosis still faces some challenges, such as the need for a large number of sample data for training, and the possibility of gradient vanishing or gradient explosion during the training process, which affects the accuracy of the diagnostic results. In this context, the application of transfer learning technology is particularly important, especially in bearing fault diagnosis under different working conditions and environments.
[0005] In this process, the processing method of converting signals into pictures plays a crucial role. According to the characteristics of bearing vibration signals, the signal is first preprocessed to remove noise interference, then the one-dimensional time-domain signal is converted into a two-dimensional time-frequency matrix using the wavelet transform method, thus simultaneously displaying the time characteristics and frequency characteristics of the signal. This representation method more intuitively reflects the fault characteristics of the signal. In order to further improve the visualization effect of the features, after the time-frequency matrix is normalized, a pseudo-color processing method is applied to generate RGB format color images. This image-based signal representation enhances the expression ability of the features. The generated color images are directly used as inputs for deep learning models, thus realizing end-to-end fault classification and diagnosis.
[0006] The processing mode of converting the vibration signal into a picture not only improves the feature expression capability, but also greatly reduces the dependence on artificial prior knowledge, and simplifies the complex feature design process in the traditional method. At the same time, this mode can provide a unified feature representation form under different working conditions, so that the transfer learning technology is more efficient in cross-domain fault diagnosis. By fine-tuning the pre-trained model of the source domain data and migrating the high-level features extracted after the signal is imaged to the target domain, the fault diagnosis accuracy and robustness of the model in the target domain can be significantly improved, thereby effectively solving the limitations of traditional fault diagnosis methods under complex working conditions. The processing mode of converting the signal into a picture lays a foundation for the application of deep learning and transfer learning in bearing fault diagnosis, and significantly improves the diagnosis efficiency and accuracy. SUMMARY
[0007] To solve the above technical problems, the embodiment of the application provides a bearing fault diagnosis method which converts one-dimensional signal data into two-dimensional image form, so as to better utilize the extraction capability of neural network, adapt to different working conditions, improve the calculation efficiency of the method, and improve the fault diagnosis accuracy of the rolling bearing.
[0008] The technical solution of the application which solves the above technical problems is: a rolling bearing fault diagnosis method based on wavelet change and improved TL-ResNet, comprising the following steps:
[0009] (1) A vehicle bearing fault diagnosis method based on wavelet change and improved TL-ResNet, characterized by comprising the following steps:
[0010] Step S1, data preprocessing: the collected bearing vibration data and the bearing vibration data of the public data set are preprocessed to prepare for subsequent model training;
[0011] Step S2, model establishment: a bearing fault diagnosis method based on wavelet change and improved TL-ResNet is designed, a pre-trained ResNet18 (Residual Network) model is used to migrate its network structure and feature parameters to the target domain for training, which can reduce the training time of the model; then the SEResNet module is introduced to enhance the expressiveness of the model, the weights of each channel are generated through compression and excitation operations, and then these weights are used to reweigh the feature responses of each channel, so that the model pays more attention to important feature maps, and the specific process of the method is as follows:
[0012] Step S21: use the ResNet18 model pre-trained on the ImageNet data set, freeze part of the layers, perform parameter migration, and obtain features
[0013] Step S22: Constructing the residual layer SE-Net, learning the mutual dependence between different feature maps (channels) through extrusion and excitation, so as to enhance the expression of useful features and suppress unimportant features.
[0014] Step S23: Migrate the fine-tuned pre-trained ResNet18 model to the source domain for high-level feature extraction.
[0015] Step S24: Migrate the high-level features extracted from the source domain to the target domain to complete the cross-domain fault diagnosis.
[0016] Step S3, model training: train the method model constructed in step S2 until the entire model converges;
[0017] (2). A bearing fault diagnosis method based on wavelet variation and improved TL-ResNet, characterized in that the specific process of step S1 is:
[0018] Step S11: Data set division;
[0019] The data set contains the running data of bearings under different fault states and working conditions. Specifically, the data set covers the running conditions of bearings under four different fault types: normal state, inner ring fault, outer ring fault, and rolling element fault. Each fault type introduces three different defect diameters to represent different fault degrees. In addition, the data set also includes the running data of bearings under four different working conditions, one of which is the normal working condition, and the other three simulate different environmental and load changes. Finally, the data set contains a total of ten groups of data, covering various combinations of fault types and working conditions, suitable for bearing fault diagnosis and model training. Through this process, a bearing vibration data set covering multiple fault types and working conditions is generated. The composition of the data set is as follows:
[0020] X1={classI1,classI2,classI3,classO1,classO2,classO3,classB1,classB2,classB3,classN,}
[0021] X2={classI1,classI2,classI3,classO1,classO2,classO3,classB1,classB2,classB3,classN,}
[0022] X2={classI1,classI2,classI3,classO1,classO2,classO3,classB1,classB2,classB3,classN,}
[0023] X2 = {classI1, classI2, classI3, classO1, classO2, classO3, classB1, classB2, classB3, classN,}
[0024] where X i represents bearing data sets obtained under different working conditions, and class represents different types of fault data. The fault classes are distinguished by subscripts:
[0025] I represents inner ring fault, and I1, I2, I3 represent three different defect sizes of the inner ring fault, respectively.
[0026] O represents outer ring fault, and O1, O2, O3 represent three different defect sizes of the outer ring fault, respectively.
[0027] B represents rolling element fault, and B1, B2, B3 represent three different defect sizes of the rolling element fault, respectively.
[0028] N represents normal state.
[0029] Each set of data X i contains all types of fault data (inner ring fault, outer ring fault, rolling element fault) and normal state operation data collected under the corresponding working condition, a total of 10 categories.
[0030] Step S12: data preprocessing
[0031] For the original data, wavelet transformation is used for processing, and the specific process is as follows:
[0032] The original data is the time series of bearing vibration signal, denoted as x(t). According to the experimental setting, the time series signal is divided into multiple samples according to the sampling length 1024, forming signal blocks of equal length. Each signal block is represented as
[0033] x i (t) = {x(t1), x(t2),..., x(t N )}i = 1, 2,..., M
[0034] where M is the number of segmented samples.
[0035] Then the segmented signal is normalized to enhance the contrast of the features and reduce the influence of amplitude on wavelet transformation. The normalization formula is:
[0036]
[0037] where μ is the mean of the signal and σ is the standard deviation of the signal.
[0038] The normalized data is then wavelet-transformed. The wavelet transformation converts the time-domain signal into a time-frequency domain, analyzes the local characteristics of the signal by adjusting the scale (frequency) and time position, and the formula of the wavelet transformation is:
[0039]
[0040] where x(t) is a time series signal, ψ(t) is a wavelet base function, a complex Gaussian wavelet cgau8 is used in this example, a is a scale parameter that controls the frequency range of the wavelet, and b is a translation parameter that determines the position of the wavelet on the time axis.
[0041] The amplitude (modulus) of the wavelet coefficient is taken as the energy distribution of the signal, and the calculation formula is
[0042] Amplitude(a,b)=|W(a,b)|
[0043] Then the amplitude matrix |W(a,b)| of the wavelet coefficient is used to draw a time-frequency graph, and the specific steps are as follows:
[0044] Time axis division: construct a time axis t whose length is equal to the number of sampling points of the signal block: 1024;
[0045] Frequency axis division: according to the selected scale range a, calculate the corresponding frequency range f;
[0046] Plotting: use a two-dimensional pseudo-color graph (such as a heat map) to display the amplitude matrix, where:
[0047] The horizontal axis represents time t, the vertical axis represents frequency f, and the color represents the energy amplitude |W(a,b)|.
[0048] The image size is fixed at 224x224, and the time-frequency graph is standardized to the specified size by interpolation. The generated time-frequency graph is saved as an image file for subsequent model training. The time-frequency graph of each sample corresponds to a fault category, and the path name contains the fault type and sample serial number.
[0049] (3). A bearing fault diagnosis method based on wavelet transformation and improved TL-ResNet, characterized in that the specific process of step S21 is: loading a pre-trained ResNet18 model: using a ResNet18 model that has been trained on an ImageNet dataset as a pre-trained model. The model has learned many general features of images during the training process. The ResNet network alleviates the gradient vanishing problem in the training of deep networks by introducing residual connections. The structure of ResNet18 is as follows:
[0050] Y=F(X,{W i})+X
[0051] where X is the input feature map, Y is the output feature map, F represents the residual function, and W i are the weights of each layer. Residual connections allow the input of each layer to be directly passed to the output, avoiding information loss. Using the pre-trained weights of the original ResNet18 model, the model is fine-tuned for the target task (bearing fault diagnosis), and the first three convolutional layers (Conv1 and the first two residual layers) of ResNet18 are frozen, meaning their parameters are not updated during training and remain in their initial state. Freezing these layers means that their parameters will not be updated during training, only the subsequent layers will be adjusted.
[0052] The freezing operation can be achieved by setting the gradient update to zero:
[0053]
[0054] where L is the loss function, and W i represent the weights of the frozen layers. In this case, the parameters of the frozen layers are not updated according to the gradient descent, thereby accelerating the training process and reducing the complexity of the model.
[0055] The weights of Conv1 and the first three residual layers are fixed so that they act as shallow feature extractors, thereby reducing training time and avoiding overfitting of these layers. The Conv1 layer and the first three residual layers in ResNet18 learn low-level features (such as edges, corner points, etc.), which are generally common and contribute significantly to all images (including the bearing fault dataset), so we fix the weights of these layers. At this stage, by keeping these shallow feature extractors unchanged, the model can focus on learning deep features, improving training efficiency. Mathematically, it can be represented as:
[0056] X input → Conv1 → ResidualBlock1 → ResidualBlock2 → Frozen Parameters
[0057] In this way, by utilizing the pre-trained features of the original ResNet18 model, the model can share these shallow knowledge between different tasks, avoiding repeated learning of this part of knowledge.
[0058] Step S22: Construct a residual layer SE Net to learn the interdependence between different feature maps (channels) through squeezing and excitation, so as to enhance the expression of useful features and suppress unimportant features. Replace the fourth residual layer with SE Net, which mainly includes two operations: squeezing (Squeeze) and excitation (Excitation) to model the global information between channels and adjust the response weight of the channel. Specifically, for the input feature map where H and W are the height and width of the feature map respectively, and C is the number of channels. Global information of each channel is obtained by global average pooling (GAP). The specific steps are as follows:
[0059] 1) Squeeze operation, the input feature map Global information of each channel is obtained by global average pooling (GAP). The calculation formula of GAP is as follows:
[0060]
[0061] where z represents the global average value of the cth channel, H and W are the height and width of the feature map respectively, and X C (i,j) represents the pixel value of the cth channel at position (i,j).
[0062] 2) Excitation operation, the global information vector after squeezing Two fully connected operations are performed to model the mutual dependence between channels and generate channel weights, wherein the first fully connected operation: maps z to a lower-dimensional feature space to reduce the computational complexity:
[0063] s = σ (W2·δ (W1·z) )
[0064] wherein, and W1 and W2 are weight matrices of the fully connected layer, and r is a scaling factor, which is set to 16; δ represents the ReLU activation function, and σ represents the Sigmoid activation function, is the generated channel weight.
[0065] 3) Reweighting, the generated channel weight s is applied to the input feature map X through channel-by-channel multiplication to adjust the response intensity of each channel:
[0066]
[0067] wherein, represents the adjusted cth channel feature map.
[0068] 4) Replace the fourth residual layer, apply the above constructed SENet module to the fourth residual layer of ResNet18, so that the model can adaptively strengthen key features and suppress redundant information. The output of the replaced residual block is:
[0069]
[0070] wherein, The input feature map weighted by the SENet, The mapping result of the convolutional layer
[0071] Step S23: Migrate the fine-tuned pre-trained ResNet18 model to the source domain for high-level feature extraction. The specific process is as follows:
[0072] 1) Load the fine-tuned model weight, load the fine-tuned ResNet18 model in step S22 to the target environment. At this time, the first four layers (Conv1, Block1, Block2, Block3) of the model and the SENet enhanced Block4 have been optimized to adapt to the fault diagnosis task.
[0073] 2) The target of source domain feature extraction is the data in the source domain contains samples x i and corresponding labels y i , extract its high-level semantic features f(x i ) through ResNet18, which is used for subsequent fault pattern recognition. The mathematical representation of feature extraction is:
[0074] f(xi)=ResNet(xi;Θ)
[0075] Where, Θ represents the parameter set of the model, including the frozen part and the fine-tuned part
[0076] 3) High-level feature extraction process, first input data, sample data x i in the source domain is input into the fine-tuned ResNet18 model, when the data flows through the low layer (Conv1 to Block3) of the model, the basic features are extracted; when passing through the fourth residual layer (Block4), the SENet module is used to enhance the high-level semantic features. Then use the fully connected layer output of the model Feature vector z i is used to represent the high-level features of sample x i . The fully connected layer output feature vector z i of the model is represented as:
[0077] z i =FC(GlobalAvgPool(Block4(...Block1(Conv1(x i )))))
[0078] Where, FC represents the fully connected layer. The extracted high-level features are stored as a feature matrix for subsequent classification or transfer learning tasks.
[0079] Step S24: Migrate the high-level features extracted from the source domain to the target domain to complete cross-domain fault diagnosis. The specific process is as follows:
[0080] 1) Preparation of target domain data, target domain data The data sample without label or with a small amount of label is input into the model. And there is a certain difference between the distribution of the target domain and the source domain data. The distribution of the target domain is adapted through the transfer learning method.
[0081] 2) Feature mapping and alignment, input the target domain sample xj into the fine-tuned ResNet18 model, and extract the corresponding high-level feature zj:
[0082] z j = FC (GlobalAvgPool (Block4 (… Block1 (Conv1 (x j )))))
[0083] 3) Training of the transfer learning task, using the features extracted from the source domain and the target domain unlabeled data
[0084] (4). A bearing fault diagnosis method based on wavelet variation and improved TL-ResNet, characterized in that the step S3 is specifically: for the fault diagnosis problem of rolling bearings under different working conditions, the improved TL-ResNet model is adjusted by using the test data under different working conditions, and the transfer effect of the method between different working conditions is studied through transfer learning, wherein the transfer task "0-1" means that the TL-ResNet model generated under working condition 0 (working condition 0 is the source domain) is migrated and applied to the rolling bearing fault diagnosis problem under working condition 1 (working condition 1 is the target domain). Through this transfer training method, the model can effectively obtain features from the source domain and adapt to the target domain, further improving the diagnosis performance and robustness under working condition changes. BRIEF DESCRIPTION OF DRAWINGS
[0085] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0086] Figure 1 A transfer learning principle diagram is provided for the embodiments of the present application;
[0087] Figure 2 A wavelet variation flowchart is provided for the embodiments of the present application;
[0088] Figure 3A method flowchart provided for the embodiments of the present application is shown in the following.
[0089] Figure 4 A SENet flowchart provided for the embodiments of the present application is shown in the following. DETAILED DESCRIPTION
[0090] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0091] The embodiments of the present application are described below by way of specific examples. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the specification. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. The present application can also be implemented or applied by other different specific embodiments, and various modifications or changes can be made to the details in the specification without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0092] In order to make the technical scheme in the embodiments of the present application more clear and complete, the specific implementation of the embodiments of the present application will be described in detail below, and the general flowchart is shown in the following. Figure 3
[0093] (2) A vehicle bearing fault diagnosis method based on wavelet change and improved TL-ResNet, characterized in that it comprises the following steps:
[0094] Step S1, data preprocessing: the collected bearing vibration data and the bearing vibration data of the public data set are preprocessed to prepare for subsequent model training;
[0095] Step S2, model establishment: a bearing fault diagnosis method based on wavelet change and improved TL-ResNet is designed, and by using a pre-trained ResNet18 (residual network) model, the network structure and feature parameters thereof are migrated to the target domain for training, which can reduce the training time of the model; then a SEResNet module is introduced to enhance the expressiveness of the model, through compression and excitation operations, the weight of each channel is generated, and then these weights are used to reweigh the feature response of each channel, so that the model pays more attention to important feature maps, and the specific process of the method is shown in the following:
[0096] Step S21: use the ResNet18 model pre-trained on the ImageNet data set, freeze part of the layers, perform parameter migration, and obtain the feature
[0097] Step S22: Constructing the residual layer SE-Net to learn the interdependence between different feature maps (channels) through squeezing and excitation, so as to enhance the expression of useful features and suppress unimportant features.
[0098] Step S23: Migrate the fine-tuned pre-trained ResNet18 model to the source domain for high-level feature extraction.
[0099] Step S24: Migrate the high-level features extracted from the source domain to the target domain to complete the cross-domain fault diagnosis.
[0100] Step S3, model training: train the method model constructed in step S2 until the entire model converges;
[0101] (2). A bearing fault diagnosis method based on wavelet transform and improved TL-ResNet, characterized in that the specific process of step S1 is:
[0102] Step S11: Data set division;
[0103] The data set contains the running data of bearings under different fault states and working conditions. Specifically, the data set covers the running conditions of bearings under four different fault types: normal state, inner ring fault, outer ring fault and rolling element fault. Three different diameters of defects are introduced for each fault type to represent different fault levels. In addition, the data set also includes the running data of bearings under four different working conditions, one of which is the normal working condition, and the other three simulate different environmental and load changes. Finally, the data set contains a total of ten groups of data, covering various combinations of fault types and working conditions, suitable for bearing fault diagnosis and model training. Through this process, a bearing vibration data set covering multiple fault types and working conditions is generated. The composition of the data set is as follows:
[0104] X1={classI1,classI2,classI3,classO1,classO2,classO3,classB1,classB2,classB3,classN,}
[0105] X2={classI1,classI2,classI3,classO1,classO2,classO3,classB1,classB2,classB3,classN,}
[0106] X2={classI1,classI2,classI3,classO1,classO2,classO3,classB1,classB2,classB3,classN,}
[0107] X2 = {classI1, classI2, classI3, classO1, classO2, classO3, classB1, classB2, classB3, classN,}
[0108] where X i represents bearing data sets acquired under different working conditions, and class represents different types of fault data. The fault classes are distinguished by subscripts:
[0109] I represents inner ring fault, and I1, I2, I3 represent three different defect sizes of the inner ring fault, respectively.
[0110] O represents outer ring fault, and O1, O2, O3 represent three different defect sizes of the outer ring fault, respectively.
[0111] B represents rolling element fault, and B1, B2, B3 represent three different defect sizes of the rolling element fault, respectively.
[0112] N represents normal state.
[0113] Each set of data X i contains all types of fault data (inner ring fault, outer ring fault, rolling element fault) and normal state operation data collected under the corresponding working condition, a total of 10 categories.
[0114] Step S12: data preprocessing
[0115] For the original data, wavelet transformation is used for processing, and the specific process is as follows:
[0116] The original data is the time series of bearing vibration signal, denoted as x(t). According to the experimental setting, the time series signal is divided into multiple samples according to the sampling length 1024, forming signal blocks of equal length. Each signal block is represented as
[0117] x i (t) = {x(t1), x(t2),..., x(t N )}i = 1, 2,..., M
[0118] where M is the number of segmented samples.
[0119] Then the segmented signal is normalized to enhance the contrast of the features and reduce the influence of amplitude on wavelet transformation. The normalization formula is:
[0120]
[0121] where μ is the mean of the signal, and σ is the standard deviation of the signal.
[0122] Then the normalized data is wavelet transformed. The wavelet transform converts the time domain signal into time-frequency domain, and analyzes the local characteristics of the signal by adjusting the scale (frequency) and time position. The formula of wavelet transform is:
[0123]
[0124] where x(t) is the time series signal, ψ(t) is the wavelet base function, in this example, the complex Gaussian wavelet cgau8 is used, a is the scale parameter, which controls the frequency range of the wavelet, and b is the translation parameter, which determines the position of the wavelet on the time axis.
[0125] Take the amplitude (modulus) of the wavelet coefficient as the energy distribution of the signal, and the calculation formula is
[0126] Amplitude(a,b)=|W(a,b)|
[0127] Then use the amplitude matrix |W(a,b)| of the wavelet coefficient to draw the time-frequency graph, the specific steps are as follows:
[0128] Time axis division: construct the time axis t, whose length is equal to the number of sampling points of the signal block: 1024;
[0129] Frequency axis division: according to the selected scale range a, calculate the corresponding frequency range f;
[0130] Plotting: use two-dimensional pseudo-color graph (such as heat map) to display the amplitude matrix, where:
[0131] The horizontal axis represents time t, the vertical axis represents frequency f, and the color represents the energy amplitude |W(a,b)|.
[0132] The image size is fixed at 224x224, and the time-frequency graph is standardized to the specified size by interpolation. Save the generated time-frequency graph as an image file for subsequent model training. The time-frequency graph of each sample corresponds to a fault category, and the path name contains the fault type and sample serial number.
[0133] (3). A bearing fault diagnosis method based on wavelet transform and improved TL-ResNet, characterized in that the specific process of step S21 is: loading a pre-trained ResNet18 model: using a ResNet18 model that has been trained on an ImageNet dataset as a pre-trained model. The model has learned many general features of images during the training process. The ResNet network alleviates the gradient vanishing problem in deep network training by introducing residual connections. The structure of ResNet18 is as follows:
[0134] Y = F(X, {W i}) + X
[0135] where X is the input feature map, Y is the output feature map, F represents the residual function, and W i is the weight of each layer. The residual connection allows the input of each layer to be directly passed to the output, avoiding information loss. Using the pre-trained weights of this structure, the target task (bearing fault diagnosis) is fine-tuned, and the first three convolutional layers (Conv1 and the first two residual layers) of ResNet18 are frozen, with their parameters not being updated and remaining in the initial state. The freezing operation means that the parameters of these layers will not be updated during the training process, and only the subsequent layers will be adjusted.
[0136] The freezing operation can be achieved by setting the gradient update to zero:
[0137]
[0138] where L is the loss function, and W i represents the weight of the frozen layer. In this case, the parameters of the frozen layer will not be updated according to the gradient descent, thereby accelerating the training process and reducing the model complexity.
[0139] By fixing the weights of Conv1 and the first three residual layers, they serve as shallow feature extractors, thereby reducing the training time and avoiding overfitting to these layers. The Conv1 layer and the first three residual layers in ResNet18 learn low-level features (such as edges, corner points, etc.), which are generally universal and have a great contribution to all images (including the bearing fault dataset), so we fix the weights of these layers. At this stage, by keeping these shallow feature extractors unchanged, the model can focus on learning deep features, improving the training efficiency. Mathematically, it can be represented as:
[0140] X input → Conv1 → ResidualBlock1 → ResidualBlock2 → Frozen Parameters
[0141] In this way, by utilizing the pre-trained features of the original ResNet18 model, the model can share these shallow knowledge between different tasks, avoiding repeated learning of this part of knowledge.
[0142] Step S22: Constructing a residual layer SE-Net, learning the interdependence between different feature maps (channels) through squeezing and excitation, so as to enhance the expression of useful features and suppress unimportant features. The fourth residual layer is replaced by SE-Net. The SE-Net module mainly includes two operations: squeezing (Squeeze) and excitation (Excitation), which are used to model the global information between channels and adjust the response weight of the channel, respectively. Specifically, for the input feature map where H and W are the height and width of the feature map, respectively, and C is the number of channels. The global information of each channel is obtained by global average pooling (GAP). The specific steps are as follows:
[0143] 1) Squeeze operation, the input feature map The global information of each channel is obtained by global average pooling (GAP). The calculation formula of GAP is as follows:
[0144]
[0145] where z represents the global average value of the cth channel, H and W are the height and width of the feature map, respectively, and X C (i,j) represents the pixel value of the cth channel at position (i,j).
[0146] 2) Excitation operation, the global information vector after squeezing is subjected to two-layer full connection operation for modeling the interdependence between channels and generating channel weights, wherein the first layer full connection: maps z to a lower-dimensional feature space to reduce the calculation complexity:
[0147] s = σ (W2·δ (W1·z))
[0148] wherein, and the weight matrix of the full connection layer, r is a scaling factor, which is set to 16; δ represents the ReLU activation function, σ represents the Sigmoid activation function, is the generated channel weight.
[0149] 3) Reweighting, the generated channel weight s is applied to the input feature map X through channel-by-channel multiplication to adjust the response strength of each channel:
[0150]
[0151] wherein, represents the adjusted cth channel feature map.
[0152] 4) Replace the fourth residual layer, apply the above constructed SENet module to the fourth residual layer of ResNet18, so that the model can adaptively strengthen key features and suppress redundant information. The output of the replaced residual block is:
[0153]
[0154] wherein, is the input feature map after SENet weighting, is the mapping result of the convolution layer
[0155] Step S23: Migrate the fine-tuned pre-trained ResNet18 model to the source domain for high-level feature extraction. The specific process is:
[0156] 1) Load the fine-tuned model weights, load the ResNet18 model fine-tuned in step S22 to the target environment. At this time, the first four layers (Conv1, Block1, Block2, Block3) of the model and the Block4 enhanced by SENet have been optimized to adapt to the fault diagnosis task.
[0157] 2) The target of source domain feature extraction is the data in the source domain contains samples x i and corresponding labels y i , extract its high-level semantic features f(x i ) through ResNet18 for subsequent fault pattern recognition. The mathematical representation of feature extraction is:
[0158] f(xi) = ResNet(xi; Θ)
[0159] wherein, Θ represents the parameter set of the model, including the frozen part and the fine-tuned part
[0160] 3) High-level feature extraction process, first input data, sample data x i in the source domain through the fine-tuned ResNet18 model, when the data flows through the low layer (Conv1 to Block3) of the model, the basic features are extracted; when passing through the fourth residual layer (Block4), the SENet module is used to enhance the high-level semantic features. Then use the fully connected layer of the model to output the feature vector z i , used to represent the high-level features of sample x i . The fully connected layer output feature vector zi of the model is represented as:
[0161] z i = FC(GlobalAvgPool(Block4(...Block1(Conv1(xi )))))
[0162] where FC denotes the fully connected layer. The extracted high-level features are stored as a feature matrix for subsequent classification or transfer learning tasks.
[0163] Step S24: Transfer the high-level features extracted from the source domain to the target domain to complete the cross-domain fault diagnosis. The specific process is as follows:
[0164] 1) Preparation of target domain data. The target domain data are input into the model as unlabeled or few-labeled data samples. There is a certain difference between the distributions of the target domain and the source domain, and the transfer learning method is used to adapt to the distribution of the target domain.
[0165] 2) Feature mapping and alignment. The target domain sample xj is input into the fine-tuned ResNet18 model to extract the corresponding high-level feature zj:
[0166] z j = FC(GlobalAvgPool(Block4(...Block1(Conv1(x j ))))
[0167] 3) Training of the transfer learning task. The features extracted from the source domain and the unlabeled data of the target domain are used to adapt to the target domain data through transfer learning, and then the classification accuracy and recall rate are calculated on the test set of the target domain.
[0168] (4) A bearing fault diagnosis method based on wavelet variation and improved TL-ResNet, characterized in that the step S3 is specifically as follows: for the fault diagnosis problem of rolling bearings under different working conditions, the improved TL-ResNet model is adjusted using test data under different working conditions, and the transfer effect of the method between different working conditions is studied through transfer learning, wherein the transfer task "0-1" means that the TL-ResNet model generated under working condition 0 (working condition 0 is the source domain) is transferred and applied to the rolling bearing fault diagnosis problem under working condition 1 (working condition 1 is the target domain). Through this transfer training method, the model can effectively obtain features from the source domain and adapt to the target domain, further improving the diagnosis performance and robustness under working condition changes.
[0169] Obviously, the above embodiments are only examples for clearly illustrating the technical solutions of the present application, and are not intended to limit the manner of the present application. Any modification, equivalent replacement and improvement made on the basis of the above description by those skilled in the art shall be included in the protection scope of the claims of the present application.
Claims
1. A vehicle bearing fault diagnosis method based on wavelet variation and improved TL-ResNet, characterized in that, Comprise the following steps: S1. Data preprocessing: the collected bearing vibration data and public data set of bearing vibration data are pretreated, and the subsequent model training is prepared, the specific steps include: Step S11: data set division, obtaining running data under different fault states and working conditions; Step S12: data preprocessing, respectively wavelet change decomposition is carried out to the divided training set and test set data, the time-frequency characteristics of the signal are extracted, and the image data set for model training is generated; S2. Model establishment: Step S21: using ResNet18 model pre-trained on ImageNet data set, freezing part of layer, parameter migration, obtaining feature; Step S22: constructing residual layer SENet, learning the interdependence between different feature maps through squeezing and exciting, so as to enhance the expression of useful features and suppress unimportant features Step S23: the fine-tuned pre-trained ResNet18 model is migrated to the source domain for high-level feature extraction; Step S24: the high-level features extracted from the source domain are migrated to the target domain, and the cross-domain fault diagnosis is completed; Step S3, model training: the model is migrated from the source domain to the target domain, the feature distribution difference between the source domain and the target domain is reduced through fine-tuning training, and finally the fault diagnosis of the target domain data is completed.
2. The vehicle bearing fault diagnosis method based on wavelet variation and improved TL-ResNet according to claim 1, characterized in that: The step S11 is for the running of the bearing under four different fault types of normal state, inner ring fault, outer ring fault and rolling body fault; three different diameters of defects are introduced for each fault type to represent different fault degrees; in addition, the data set also includes the running data of the bearing under four different working conditions, one of which is normal working condition, and the other three simulate different environment and load changes; finally, the data set contains a total of ten groups of data, covering various combinations of fault types and working conditions, which is suitable for bearing fault diagnosis and model training.
3. The vehicle bearing fault diagnosis method based on wavelet variation and improved TL-ResNet according to claim 1, characterized in that: The step S12 includes: For the original data, wavelet change is used for processing, the specific process is as follows: The original data is the time sequence of bearing vibration signal, denoted as x(t), according to the experimental setting, the time sequence signal is divided into multiple samples according to the sampling length 1024, forming signal blocks with equal length; each signal block is represented as: x i (t) = {x(t1), x(t2),..., x(t N )}i = 1, 2,..., M Wherein M is the number of segmented samples; Then the segmented signal is normalized to enhance the contrast of features and reduce the influence of amplitude on wavelet transform, the normalization formula is: Wherein μ is the signal mean, σ is the signal standard deviation; The normalized data is subjected to wavelet change, which converts the time domain signal to time-frequency domain, analyzes the local features of the signal by adjusting the scale and time position, and the formula of wavelet change is: Wherein x(t) is the time sequence signal, ψ(t) is the wavelet base function, in this example, complex gaussian wavelet cgau8 is used, a is the scale parameter, which controls the frequency range of wavelet, b is the translation parameter, which determines the position of wavelet on the time axis; Take the amplitude of wavelet coefficient as the energy distribution of signal, the calculation formula is Amplitude(a,b)=|W(a,b)| Then the time-frequency graph is drawn using the amplitude matrix of wavelet coefficients |W(a, b)|, and the specific steps are as follows: Time axis division: construct the time axis t, whose length is equal to the sampling point number of the signal block: 1024; Frequency axis division: according to the selected scale range a, the corresponding frequency range f is calculated; Drawing: use two-dimensional pseudo-color map to display the amplitude matrix, wherein: The horizontal axis represents time t, the vertical axis represents frequency f, and the color represents the energy amplitude |W(a, b)|; The image size is fixed to 224x224, the time-frequency graph is standardized to the specified size by interpolation, and the generated time-frequency graph is saved as an image file for subsequent model training. The time-frequency graph of each sample corresponds to a fault category, and the path name contains the fault type and sample serial number.
4. The vehicle bearing fault diagnosis method based on wavelet variation and improved TL-ResNet according to claim 1, characterized in that The specific process of step S21 is: loading a pre-trained ResNet18 model: using the ResNet18 model trained on the ImageNet dataset as a pre-trained model; the model learns general features of images during training, and the ResNet network alleviates the gradient vanishing problem in deep network training by introducing residual connection. The structure of ResNet18 is as follows: Y = F(X, {W i}) + X where X is the input feature map, Y is the output feature map, F represents the residual function, W i is the weight of each layer; the residual connection makes the input of each layer directly pass to the output, avoiding information loss, using the pre-training weight of this structure to fine-tune the target task, and freezing the first three convolutional layers of ResNet18, the parameters of which are not updated and remain in the initial state. The freezing operation means that the parameters of these layers will not be updated during training, and only the subsequent layers will be adjusted. The freezing operation is realized by setting the gradient update to zero: where L is a loss function, W i denotes the weights of the frozen layers; in this case, the parameters of the frozen layers are not updated according to gradient descent, thus accelerating the training process and reducing the model complexity; Fix the weights of Conv1 and the first three residual layers so that they act as shallow feature extractors, thereby reducing the training time and avoiding overfitting of these layers; the Conv1 layer and the first three residual layers in ResNet18 learn low-level features, which are usually general and contribute greatly to all images, so we fix the weights of these layers; in this stage, by keeping these shallow feature extractors unchanged, the model focuses on learning deep features, improving training efficiency, which is mathematically represented as: X input → Conv1 → ResidualBlock1 → ResidualBlock2 → FrozenParameters In this way, by utilizing the pre-trained features of the original ResNet18 model, the model shares these shallow knowledge between different tasks, avoiding repeated learning of this part of knowledge.
5. The vehicle bearing fault diagnosis method based on wavelet variation and improved TL-ResNet according to claim 1, wherein the specific process of step S22 is: learning the mutual dependence between different feature maps by extrusion and excitation, so as to enhance the expression of useful features and suppress unimportant features. The fourth residual layer is replaced by an SENet, and the SENet module mainly includes two operations of squeezing and excitation, which are respectively used for modeling global information between channels and adjusting response weights of channels; specifically, for an input feature map X∈R H×W×C where H and W are the height and width of the feature map respectively, and C is the number of channels; global information of each channel is obtained through global average pooling; The specific steps are: a) Introduce the Squeeze-and-Excitation module based on the residual layers of the ResNet18 model; b) Perform "squeeze" operation on each feature map, that is, obtain the global features of each channel through global average pooling; c) Perform "excitation" operation on the features of each channel, learn the dependency between channels through fully connected layer and ReLU activation function; d) According to the channel weights obtained by excitation, weight the feature map, and readjust the feature response to enhance the expression of important features and suppress the influence of unimportant features.
6. The vehicle bearing fault diagnosis method based on wavelet variation and improved TL-ResNet according to claim 1, characterized in that The step S23 migrates the fine-tuned pre-trained ResNet18 model to the source domain for high-level feature extraction; The specific process is: migrate the fine-tuned ResNet18 model to the source domain data of the target bearing fault diagnosis task for high-level feature extraction; Use the strategy of transfer learning to apply the weights of the model to the source domain data to extract high-level feature representations of the input bearing fault data; The core of the process is to provide accurate and meaningful high-level features for the fault diagnosis task of the target domain through feature extraction of the source domain data, which can be used for further classification or regression tasks, thereby enhancing the performance and adaptability of the model in the target task; through transfer learning, the knowledge of the source domain data can be effectively transferred to the target domain, thereby shortening the training time of the target task and improving the learning efficiency and accuracy of the model.
7. The wavelet variation and improved TL-ResNet-based vehicle bearing fault diagnosis method according to claim 1, characterized in that The step S24 includes: the target domain data is unlabeled or a small amount of labeled samples, and the data distribution difference between the target domain and the source domain is adapted through transfer learning; the fine-tuned ResNet18 model is input with the target domain samples to extract corresponding high-level features, realize feature mapping and alignment; the source domain features and the unlabeled data of the target domain are used for transfer learning training, prediction is performed on the target domain test set, and classification accuracy and recall rate are calculated to complete the diagnosis task.
8. The wavelet variation and improved TL-ResNet based vehicle bearing fault diagnosis method according to claim 1, characterized in that The step S3 includes: for the fault diagnosis problem of rolling bearings under different working conditions, the improved TL-ResNet model is adjusted by using the test data under different working conditions, and the transfer effect of the model between different working conditions is studied through transfer learning, wherein the transfer task "0→1" means that the TL-ResNet model trained under the source domain working condition 0 is applied to the fault diagnosis problem of rolling bearings under the target domain working condition 1 through transfer learning.
Citation Information
Patent Citations
Rolling bearing fault diagnosis method based on deformable convolution and Transform
CN115808312A
Bearing variable working condition fault diagnosis method based on deep transfer learning
CN117629635A