Adaptive bearing fault diagnosis method based on lightweight convolutional neural network
By designing lightweight convolution neural networks and adaptive model structures, the problem of incomplete feature extraction and low modeling ability in the diagnosis of existing technologies in the diagnosis of the bearing fault of the existing technology, and achieved efficient and accurate diagnosis of bearing fault.
Patent Information
- Application Number
- CN202310517323.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-09
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2043-05-09
AI Technical Summary
In the bearing fault diagnosis, existing convolutional neural networks have problems such as incomplete feature extraction, too deep network layers, and low model generalization capabilities, resulting in low diagnostic accuracy.
Using lightweight convolutional neural networks, through the design of the zoom factor and module structure of the initial model, including multi -layer convolution and full connection layer, combined with pre -processing of grayscale images and the division of data sets to build adaptive bearing fault diagnosis Model.
It improves the diagnostic efficiency and diagnostic accuracy of bearing fault diagnosis, enhance the generalization ability of the model, and enable the model to maintain a high diagnostic accuracy under different data sets.
Smart Images

Figure CN116524272B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mechanical equipment fault diagnosis, and in particular to an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network. Background Art
[0002] Rolling bearings are one of the most important parts in mechanical equipment. Their working stability directly affects the reliability of the entire equipment. As an important supporting component, once a failure occurs, it will cause very serious consequences. At the least, the equipment will stop suddenly, and at the worst, the entire production line will stop working, resulting in irreversible consequences. Therefore, rolling bearing fault diagnosis and detection is very meaningful. It can predict the health status of the bearing in advance, and reasonable application will effectively help production.
[0003] With the rapid development of machine learning, it has been widely used in traditional fault diagnosis, and rolling bearing diagnosis is no exception. The most significant effect is the application of convolutional neural networks to bearing fault diagnosis. Due to its super feature extraction ability, convolutional neural networks can extract useful feature information from limited data. However, some existing models that use convolutional neural networks for fault diagnosis cannot completely extract the original information features, and some network layers are too deep, resulting in slow calculation speeds. In addition, most methods build the model based on one data set, which leads to a serious decline in accuracy when the model is used for detection of other data sets, that is, low generalization ability, which ultimately causes inaccurate diagnosis of bearing faults when the model is applied. Summary of the invention
[0004] The present invention provides an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network, which is used to improve the diagnostic efficiency and diagnostic accuracy of bearing fault diagnosis.
[0005] An adaptive bearing fault diagnosis method based on a lightweight convolutional neural network includes:
[0006] Step 1: extract bearing images from the bearing data set and preprocess them to obtain grayscale images, and divide the grayscale images into a training set and a test set according to a preset ratio;
[0007] Step 2: Design a scaling factor of the initial model, and iteratively train the initial model using the training set to determine the model weight of the optimal diagnostic accuracy, and obtain the first diagnostic model based on the model weight;
[0008] Step 3: Use the test set to test the first diagnostic model, and adjust the first diagnostic model according to the test results to obtain the target diagnostic model;
[0009] Step 4: Use the target diagnosis model to perform fault diagnosis on the target bearing image of the current mechanical equipment to obtain the fault type.
[0010] Preferably, in step 1, extracting a bearing image from a bearing data set and preprocessing it to obtain a grayscale image includes:
[0011] Acquire a bearing image whose similarity to a target bearing of the current mechanical equipment is greater than a preset similarity;
[0012] A preset number of segments are randomly selected for sampling from the original vibration signals at the driving end, the load end, and the bearing end corresponding to the bearing image to obtain amplitude points, and the amplitude points are expanded and recombined in sequence to obtain a grayscale image corresponding to the bearing image.
[0013] Preferably, the sampling of any preset number of segments is non-overlapping sampling.
[0014] Preferably, before step 2, the initial model is constructed, specifically:
[0015] Establish a 5*5 convolutional layer as the first layer of the initial model;
[0016] The two first-type modules are respectively used as the second and third layers of the initial model, and the two first-type modules are used as the fourth and fifth layers of the initial model;
[0017] Use the fully connected layer as the sixth layer of the initial model;
[0018] The first to sixth layers are connected in sequence to construct the initial model.
[0019] Preferably, in the second to fifth layers, the output of the previous layer will serve as the input of all subsequent layers, and the feature matrix output by the first type module corresponding to the second layer will serve as the input value of the first type module corresponding to the third layer and the second type modules corresponding to the fourth and fifth layers.
[0020] Preferably, the structure of the first type module is as follows:
[0021] The first layer of the first type of module is two different convolution kernels, 3*3 and 5*5, and the two convolution kernels are arranged in parallel. The second layer is the attention module, and the third layer is a 1*1 convolution.
[0022] The structure of the second type module is as follows:
[0023] The first layer of the second type of module is a 1*1 convolution, the second layer is four different convolution kernels: 3*3, 5*5, 7*7 and 9*9, and the four convolution kernels are arranged in parallel. The third layer is an attention module, and the fourth layer is a 1*1 convolution.
[0024] Preferably, the scaling factor of the initial model is designed, including:
[0025] The scaling factors of the initial model include a width scaling factor β for the first type module and the second type module and a repetition number scaling factor γ for the first type module and the second type module;
[0026] The number of module repetitions from the second layer to the fifth layer of the initial model is 1γ, 2γ, 1γ, 2γ, respectively;
[0027] The values of the width scaling factor β and the repetition scaling factor γ satisfy the following formula:
[0028] r=α Φ
[0029] N=n Φ
[0030] w=β Φ
[0031] d = γ Φ
[0032] α·n·β 2 γ 2 ≈4
[0033] α≥1,n≥1,β≥1,γ≥1
[0034] Wherein, r represents the resolution of the initial model, α represents the size scaling factor of the grayscale image, N represents the channel expansion value of the initial model, n represents the channel scaling factor of the initial model, w represents the width of the first type module and the second type module, d represents the depth of the first type module and the second type module, and Φ represents the composite coefficient;
[0035] According to the above constraints, a set of possible values of the width scaling factor β and the repetition scaling factor γ is determined, and a target value corresponding to the maximum diagnostic accuracy of the initial model when other parameters remain unchanged is selected from the value set as the scaling factor of the initial model.
[0036] Preferably, in step 2, the initial model is iteratively trained using the training set to determine the model weight of the optimal diagnostic accuracy, and a first diagnostic model is obtained based on the model weight, including:
[0037] The neurons in the convolutional layer of the initial model are randomly inactivated, and the inactivation ratio of the neurons in each convolutional layer is as follows:
[0038]
[0039] Among them, D i Represents the inactivation ratio value of the i-th convolution layer, Ltotal Denotes the number of convolution layers in the initial model, D target Represents the overall deactivation ratio value of the initial model;
[0040] The initial model is set according to the deactivation ratio and the preset activation function, and the set initial model is iteratively trained using the training set, and the model weight is updated according to the training result of each iteration, and the model weight corresponding to the optimal diagnostic accuracy is selected after the iteration is completed;
[0041] The model weights corresponding to the optimal diagnostic accuracy replace the initial weights of the initial model, and the replaced initial model is used as the first diagnostic model.
[0042] Preferably, in step 3, the first diagnostic model is tested using a test set, and the first diagnostic model is adjusted according to the test result to obtain a target diagnostic model, including:
[0043] Obtain a first test set corresponding to the first data set and a second test set corresponding to the second data set;
[0044] Using the first test set and the second test set to test the first diagnostic model respectively, and establishing a first confusion matrix corresponding to the first test set and a second confusion matrix corresponding to the second test set according to the test results;
[0045] Determine a first fault classification accuracy based on the first confusion matrix, and determine a second fault classification accuracy based on the second confusion matrix;
[0046] When both the first fault classification accuracy and the second fault classification accuracy meet preset accuracy requirements, determining the first diagnostic model as a target diagnostic model;
[0047] Otherwise, repeat step 2 to iteratively train the first diagnostic model again until the test result meets the preset accuracy requirement.
[0048] Preferably, in step 4, the target diagnosis model is used to perform fault diagnosis on the target bearing image of the current mechanical equipment to obtain the fault type, including:
[0049] Acquire multiple target bearing images from different angles and at different times of the current mechanical equipment;
[0050] Process the target bearing image in the same way as the image preprocessing of the bearing data set to obtain a target grayscale image;
[0051] Inputting each target grayscale image into the target diagnosis model to perform fault diagnosis and obtain the corresponding fault type;
[0052] The fault types corresponding to all target grayscale images are analyzed, and the fault type with the largest number of fault types is determined as the fault type of the current mechanical equipment.
[0053] Compared with the prior art, the present invention has achieved the following beneficial effects:
[0054] 1) By determining the size of the image, the depth and width of the model, and establishing the parameter design of the module in the initial model, the excellent feature extraction capability of the convolutional neural network is applied to bearing fault data, and the diagnosis results are obtained efficiently and accurately. By converting the original amplitude signal into a grayscale image, building a lightweight convolutional neural network, and introducing a scaling factor, the model parameters under different data sets can be flexibly adjusted according to the needs, and can be scaled on demand to achieve the effect of high diagnostic accuracy under different data sets, automatically adapt to different data sets, and have strong generalization ability, ultimately improving the diagnostic efficiency and diagnostic accuracy of bearing fault diagnosis.
[0055] 2) By determining the size scaling factor of the grayscale image, the channel scaling factor of the initial model, the association constraint rules between the width scaling factor β and the repetition scaling factor γ, the optimal scaling factor is determined through testing to improve the diagnostic accuracy of the initial model.
[0056] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings.
[0057] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0059] Figure 1 Flow chart of an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network according to an embodiment of the present invention;
[0060] Figure 2 This is a model overall structure diagram of an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network according to an embodiment of the present invention;
[0061] Figure 3 A diagram showing the internal structure of a model of an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network according to an embodiment of the present invention;
[0062] Figure 4 is a structural diagram of the first module in an embodiment of the present invention;
[0063] Figure 5 is a structural diagram of the second module in an embodiment of the present invention;
[0064] Figure 6 A diagram showing the relationship between accuracy and parameter quantity when each scaling factor takes different values in an embodiment of the present invention;
[0065] Figure 7 This is a confusion matrix diagram of two data sets of the adaptive bearing fault diagnosis method based on a lightweight convolutional neural network according to an embodiment of the present invention. DETAILED DESCRIPTION
[0066] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0067] Embodiment 1:
[0068] Step 102 continues to process the data set, and by repeating step 101, 3n grayscale images with 32α*32α pixels can be obtained. The present invention groups these grayscale images into samples and uses them as inputs to the network, each sample having 3n channels. By performing overlapping sampling using this method, a plurality of training set samples with 3n channels can be generated. These training set samples can effectively support the training and testing of lightweight convolutional neural networks, thereby achieving accurate diagnosis of adaptive bearing faults. Therefore, the present invention provides an economical and feasible data preprocessing method, which is convenient for building a high-quality bearing fault diagnosis system.
[0069] The embodiment of the present invention provides an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network, such as Figure 1 As shown, including:
[0070] Step 1: extract bearing images from the bearing data set and preprocess them to obtain grayscale images, and divide the grayscale images into a training set and a test set according to a preset ratio;
[0071] Step 2: Design a scaling factor of the initial model, and iteratively train the initial model using the training set to determine the model weight of the optimal diagnostic accuracy, and obtain the first diagnostic model based on the model weight;
[0072] Step 3: Use the test set to test the first diagnostic model, and adjust the first diagnostic model according to the test results to obtain the target diagnostic model;
[0073] Step 4: Use the target diagnosis model to perform fault diagnosis on the target bearing image of the current mechanical equipment to obtain the fault type.
[0074] In this embodiment, the lightweight convolutional neural network is constructed. In order to ensure the lightweight of the model, a large number of deep separable convolutions are introduced to reduce the number of parameters while reducing the calculation time. It includes two modules, wherein the second step size in each module is 2. After passing through these convolutional layers, it reaches s and passes through the global average pooling and fully connected layers to achieve fault diagnosis. Among them, the number of repetitions of each module is 1γ, 2γ, 1γ, 2γ, respectively, which can expand and reduce the depth of the model according to demand. The width in the two modules can be multiplied by the width scaling factor β, and the number of repetitions of the two modules is controlled by the scaling factor γ.
[0075] In this embodiment, the preset ratio is 7:3.
[0076] In this embodiment, the initial model is formed by connecting multiple levels in sequence, and the scaling factor includes two control parameters: the number of repetitions of the module and the width of the module.
[0077] In this embodiment, the purpose of the model weights is to enable useful information to be learned during the model training process.
[0078] In this embodiment, in step 101, the original amplitude signal can be converted into multiple grayscale images. Specifically, the present invention arbitrarily divides the three different original vibration signals into n continuous segments. The total length of each frame consists of 1024α vibration points. These points are recombined and drawn into a grayscale image consisting of 32α*32α pixels. After processing in step 101, the original signal is converted into a grayscale image;
[0079] Step 102 continues to process the data set, and by repeating step 101, 3n grayscale images with 32α*32α pixels can be obtained. The present invention groups these grayscale images into samples and uses them as inputs to the network, each sample having 3n channels. By performing overlapping sampling using this method, a plurality of training set samples with 3n channels can be generated. These training set samples can effectively support the training and testing of lightweight convolutional neural networks, thereby achieving accurate diagnosis of adaptive bearing faults. Therefore, the present invention provides an economical and feasible data preprocessing method, which is convenient for building a high-quality bearing fault diagnosis system.
[0080] The beneficial effect of the above design scheme is: by determining the size of the image, the depth and width of the model, and establishing the parameter design of the module in the initial model, the excellent feature extraction ability of the convolutional neural network can be used for bearing fault data, and the diagnosis results can be obtained efficiently and accurately. By converting the original amplitude signal into a grayscale image, building a lightweight convolutional neural network, and introducing a scaling factor, the model parameters under different data sets can be flexibly adjusted according to needs, and can be scaled as needed to achieve the effect of having a higher diagnostic accuracy under different data sets, automatically adapt to different data sets, and have strong generalization ability, ultimately improving the diagnostic efficiency and diagnostic accuracy of bearing fault diagnosis.
[0081] Embodiment 2:
[0082] Based on Example 1, the embodiment of the present invention provides an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network. In step 1, a bearing image is extracted from a bearing data set and preprocessed to obtain a grayscale image, including:
[0083] Acquire a bearing image whose similarity to a target bearing of the current mechanical equipment is greater than a preset similarity;
[0084] A preset number of segments are randomly selected for sampling from the original vibration signals at the driving end, the load end, and the bearing end corresponding to the bearing image to obtain amplitude points, and the amplitude points are expanded and recombined in sequence to obtain a grayscale image corresponding to the bearing image.
[0085] In this embodiment, sampling is performed by randomly selecting a preset number of segments, which is non-overlapping sampling.
[0086] In this embodiment, the load end, based on the data preprocessing process, the input image size is 32α*32α, α is a scaling factor, which is used to control the size of the input image, and its value is selected according to the demand, and the initial value is set to 1. Grayscale images are different from RGB images in that they have only one channel, which invisibly reduces the amount of data. For the CWRC data set, the three original vibration signals of the drive end and the bearing end are randomly selected into n segments. Taking the last segment of the red frame in the figure as an example, the total length of each red frame is composed of 1024α amplitude points, and the processing process is expanded, and the amplitude points of 1024α length are expanded, and recombined in sequence, and finally a grayscale image composed of 32α*32α pixels is drawn.
[0087] The beneficial effect of the above design scheme is: by controlling the image size, the amount of data is reduced and the model operation efficiency is improved while ensuring the diagnostic accuracy.
[0088] Embodiment 3:
[0089] Based on Example 2, the embodiment of the present invention provides an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network, wherein the sampling of any preset number of segments is non-overlapping sampling.
[0090] The beneficial effects of the above design scheme are: avoiding duplication of collected data and ensuring the simplicity of collected data.
[0091] Embodiment 4:
[0092] Based on Example 1, the embodiment of the present invention provides an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network. Before step 2, it also includes constructing the initial model, specifically:
[0093] Establish a 5*5 convolutional layer as the first layer of the initial model;
[0094] The two first-type modules are respectively used as the second and third layers of the initial model, and the two first-type modules are used as the fourth and fifth layers of the initial model;
[0095] Use the fully connected layer as the sixth layer of the initial model;
[0096] The first to sixth layers are connected in sequence to construct the initial model.
[0097] In this embodiment, the first type module is a Fused-MMBConv module, the second layer is a Fused-MMBConv1 module, the third layer is a Fused-MMBConv2 module, the second type module is an MMBConv module, the fourth layer is an MMBConv1 module, and the fifth layer is an MMBConv2 module.
[0098] In this embodiment, the input value passes through the first to sixth layers in sequence and then outputs a diagnosis structure.
[0099] The beneficial effects of the above design scheme are: by designing two types of modules, the model can extract features, and the two types of modules can realize the construction of a lightweight convolutional neural network, improve the model operation speed, realize the accurate extraction of features by the model, and improve the generalization ability.
[0100] In this embodiment, if Figure 2 As shown in the figure, the network consists of multiple convolutional layers and fully connected layers, where the first layer is a 5×5 convolutional layer, followed by two Fused-MMBConv and two MMBConv submodules. Each submodule consists of multiple convolutional layers, where the second stride is 2. Finally, the signal passes through the global average pooling and fully connected layers to achieve accurate diagnosis of bearing faults.
[0101] It should be noted that the entire network is divided into 5 stages from stage1 to stage5. In each stage, the number of convolutional submodules and the number of repetitions are different, so that the depth of the model can be expanded or reduced according to needs. In particular, the number of repetitions of each submodule in stage1 to stage4 is 1, 2, 1, 2 respectively, while there is only one submodule in stage5. The design of this model structure is aimed at reducing the number of parameters and computations of the model, so as to achieve accurate fault diagnosis at a lower computational cost.
[0102] The beneficial effects of the above design scheme are: by designing two types of modules, the model can extract features, and the two types of modules can realize the construction of a lightweight convolutional neural network, improve the model operation speed, realize the accurate extraction of features by the model, and improve the generalization ability.
[0103] Embodiment 5:
[0104] Based on Example 4, an embodiment of the present invention provides an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network. In the second to fifth layers, the output of the previous layer will be used as the input of all subsequent layers, and the feature matrix output by the first type module corresponding to the second layer will be used as the input value of the first type module corresponding to the third layer and the second type modules corresponding to the fourth and fifth layers.
[0105] like Figure 3 As shown, the output of each layer of the model proposed in this patent is used as the input of all subsequent layers, and the values of these inputs are added together to enhance the model's feature extraction capabilities. For example, taking the green line as an example, the feature matrix output by Fused-MMBConv1 is used as the input of the Fused-MMBConv2, MMBConv1, and MMBConv2 modules, and is added to the original input value to keep the number of channels unchanged. Similarly, the black, red, and blue lines represent different feature matrix sharing relationships. By globally sharing features, more feature information can be extracted without increasing the model size, thereby improving the model's fault diagnosis rate.
[0106] The beneficial effect of the above design scheme is: in order to enable the initial model to extract more features, the initial model uses the output of each layer as the input of all subsequent layers, adds the values of these inputs, and realizes the global sharing of the features of each layer. In this way, more feature information can be extracted without increasing the size of the model, thereby improving the diagnostic rate of the model.
[0107] Embodiment 6:
[0108] Based on Example 4, the embodiment of the present invention provides an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network, such as Figure 4As shown, the structure of the first type module is as follows:
[0109] The first layer of the first type of module is two different convolution kernels, 3*3 and 5*5, and the two convolution kernels are arranged in parallel. The second layer is the attention module, and the third layer is a 1*1 convolution.
[0110] like Figure 5 As shown, the structure of the second type module is as follows:
[0111] The first layer of the second type of module is a 1*1 convolution, the second layer is four different convolution kernels: 3*3, 5*5, 7*7 and 9*9, and the four convolution kernels are arranged in parallel. The third layer is an attention module, and the fourth layer is a 1*1 convolution.
[0112] In this embodiment, the MMBConv module doubles the number of convolutions compared to the Fused-MMBConv module, but replaces the ordinary convolution with a 1*1 convolution, so that although the number of convolution kernels increases, the amount of calculation and the number of parameters are reduced.
[0113] The beneficial effect of the above design scheme is: by designing the Fused-MMBConv type module and the MMBConv type module, the lightweight of the initial model is achieved, and the model operation efficiency is improved while ensuring the feature extraction capability.
[0114] Embodiment 7:
[0115] Based on Example 4, the embodiment of the present invention provides an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network, and designs a scaling factor of the initial model, including:
[0116] The scaling factors of the initial model include a width scaling factor β for the first type module and the second type module and a repetition number scaling factor γ for the first type module and the second type module;
[0117] The number of module repetitions from the second layer to the fifth layer of the initial model is 1γ, 2γ, 1γ, 2γ, respectively;
[0118] The values of the width scaling factor β and the repetition scaling factor γ satisfy the following formula:
[0119] r=α Φ
[0120] N=n Φ
[0121] w=β Φ
[0122] d = γ Φ
[0123] α·n·β2 γ 2 ≈4
[0124] α≥1,n≥1,β≥1,γ≥1
[0125] Wherein, r represents the resolution of the initial model, α represents the size scaling factor of the grayscale image, N represents the channel expansion value of the initial model, n represents the channel scaling factor of the initial model, w represents the width of the first type module and the second type module, d represents the depth of the first type module and the second type module, and Φ represents the composite coefficient;
[0126] According to the above constraints, a set of possible values of the width scaling factor β and the repetition scaling factor γ is determined, and a target value corresponding to the maximum diagnostic accuracy of the initial model when other parameters remain unchanged is selected from the value set as the scaling factor of the initial model.
[0127] In this embodiment, the present invention provides a method for optimizing the performance of a lightweight convolutional neural network by adjusting a scaling factor. Figure 7 As shown in the figure, within the range of four different scaling factors, the present invention evaluates the relationship between accuracy and parameter quantity, and finds that after all scaling factors reach a certain value, the accuracy gain is not high. Among them, the factor n has a large increase in accuracy in the early stage, but as the value increases, its gain effect gradually decreases, which will lead to a huge increase in the parameter quantity.
[0128] Through experimental comparison, the present invention fixes Φ=1.2, takes α=1.2, n=2.08, β=1.15, and γ=1.1, and optimizes the best combination of scaling factors. Under the CWRU dataset, the lightweight convolutional neural network obtained by this method can achieve a diagnostic accuracy of more than 99%, which has greater room for improvement than the existing technology.
[0129] In general, this method provides a feasible and practical lightweight convolutional neural network optimization method, which can effectively improve the adaptive bearing fault diagnosis effect and achieve higher accuracy and stability.
[0130] In this embodiment, if Figure 6 As shown, it is a relationship diagram between accuracy and parameter quantity when each scaling factor of the adaptive bearing fault diagnosis method based on lightweight convolutional neural network of the present invention takes different values.
[0131] The beneficial effect of the above design scheme is: by determining the size scaling factor of the grayscale image, the channel scaling factor of the initial model, the association constraint rules between the width scaling factor β and the repetition scaling factor γ, the optimal scaling factor is determined through testing, thereby improving the diagnostic accuracy of the initial model.
[0132] Embodiment 8:
[0133] Based on Example 1, the embodiment of the present invention provides an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network. In step 2, the initial model is iteratively trained using a training set to determine a model weight with optimal diagnostic accuracy, and a first diagnostic model is obtained based on the model weight, including:
[0134] The neurons in the convolutional layer of the initial model are randomly inactivated, and the inactivation ratio of the neurons in each convolutional layer is as follows:
[0135]
[0136] Among them, D i Represents the inactivation ratio value of the i-th convolution layer, L total Denotes the number of convolution layers in the initial model, D target Represents the overall deactivation ratio value of the initial model;
[0137] The initial model is set according to the deactivation ratio and the preset activation function, and the set initial model is iteratively trained using the training set, and the model weight is updated according to the training result of each iteration, and the model weight corresponding to the optimal diagnostic accuracy is selected after the iteration is completed;
[0138] The model weights corresponding to the optimal diagnostic accuracy replace the initial weights of the initial model, and the replaced initial model is used as the first diagnostic model.
[0139] In this embodiment, randomly inactivating a certain proportion of neurons during the training process can help improve the training speed of the model and prevent overfitting.
[0140] In this embodiment, the activation function in the training process is used to increase the nonlinear fitting ability of the model.
[0141] In this embodiment, the preset activation function is the GELU activation function.
[0142] The beneficial effect of the above design scheme is: by re-designing and selecting the neuron deactivation ratio and activation function in the initial model training process, the training effect of the training process is guaranteed, the optimal model weight is obtained, and the model accuracy of the first diagnostic model obtained by training is guaranteed.
[0143] Embodiment 9:
[0144] Based on Example 1, the embodiment of the present invention provides an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network. In step 3, the first diagnostic model is tested using a test set, and the first diagnostic model is adjusted according to the test result to obtain a target diagnostic model, including:
[0145] Obtain a first test set corresponding to the first data set and a second test set corresponding to the second data set;
[0146] Using the first test set and the second test set to test the first diagnostic model respectively, and establishing a first confusion matrix corresponding to the first test set and a second confusion matrix corresponding to the second test set according to the test results;
[0147] Determine a first fault classification accuracy based on the first confusion matrix, and determine a second fault classification accuracy based on the second confusion matrix;
[0148] When both the first fault classification accuracy and the second fault classification accuracy meet preset accuracy requirements, determining the first diagnostic model as a target diagnostic model;
[0149] Otherwise, repeat step 2 to iteratively train the first diagnostic model again until the test result meets the preset accuracy requirement.
[0150] In this embodiment, if Figure 7 As shown, the first data set is the CWRU data set, and the second data set is the Paderborn University bearing data set.
[0151] The beneficial effect of the above design scheme is: by designing two data sets to test the model, it is possible to avoid a serious drop in accuracy when the model is used for detection of other data sets, that is, a performance of low generalization ability.
[0152] Embodiment 10:
[0153] Based on Example 1, the embodiment of the present invention provides an adaptive bearing fault diagnosis method based on a lightweight convolutional neural network. In step 4, the target diagnosis model is used to perform fault diagnosis on the target bearing image of the current mechanical equipment to obtain the fault type, including:
[0154] Acquire multiple target bearing images from different angles and at different times of the current mechanical equipment;
[0155] Process the target bearing image in the same way as the image preprocessing of the bearing data set to obtain a target grayscale image;
[0156] Inputting each target grayscale image into the target diagnosis model to perform fault diagnosis and obtain the corresponding fault type;
[0157] The fault types corresponding to all target grayscale images are analyzed, and the fault type with the largest number of fault types is determined as the fault type of the current mechanical equipment.
[0158] The beneficial effects of the above design scheme are: by obtaining a target grayscale image that fits the target diagnosis model, the fault identification accuracy is ensured, and by using the trained lightweight target diagnosis model to diagnose the target bearing image of the current mechanical equipment, the diagnosis efficiency and accuracy are ensured.
[0159] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An adaptive bearing fault diagnosis method based on lightweight convolutional neural network, characterized in that: include: Step 1: extract bearing images from the bearing data set and preprocess them to obtain grayscale images, and divide the grayscale images into a training set and a test set according to a preset ratio; Step 2: Design a scaling factor of the initial model, and iteratively train the initial model using the training set to determine the model weight of the optimal diagnostic accuracy, and obtain the first diagnostic model based on the model weight; Step 3: Use the test set to test the first diagnostic model, and adjust the first diagnostic model according to the test results to obtain the target diagnostic model; Step 4: using the target diagnosis model to perform fault diagnosis on the target bearing image of the current mechanical equipment to obtain the fault type; Before step 2, the initial model is constructed, specifically: Establish a 5*5 convolutional layer as the first layer of the initial model; The two first-type modules are used as the second and third layers of the initial model, and the two second-type modules are used as the fourth and fifth layers of the initial model; Use the fully connected layer as the sixth layer of the initial model; Connecting the first to sixth layers in sequence to construct the initial model; In the second to fifth layers, the output of the previous layer will be used as the input of all subsequent layers, and the feature matrix output by the first type module corresponding to the second layer will be used as the input value of the first type module corresponding to the third layer and the second type modules corresponding to the fourth and fifth layers; The structure of the first type module is as follows: The first layer of the first type of module is two different convolution kernels, 3*3 and 5*5, and the two convolution kernels are arranged in parallel. The second layer is the attention module, and the third layer is a 1*1 convolution. The structure of the second type module is as follows: The first layer of the second type of module is a 1*1 convolution, the second layer is four different convolution kernels: 3*3, 5*5, 7*7 and 9*9, and the four convolution kernels are arranged in parallel, the third layer is an attention module, and the fourth layer is a 1*1 convolution; Design the scaling factors for the initial model, including: The scaling factors of the initial model include a width scaling factor β for the first type module and the second type module and a repetition number scaling factor γ for the first type module and the second type module; The number of module repetitions from the second layer to the fifth layer of the initial model is 1γ, 2γ, 1γ, 2γ, respectively; The values of the width scaling factor β and the repetition scaling factor γ satisfy the following formula: r=α Φ N=n Φ w=β Φ d=γ Φ a·n·b 2 ·c 2 ≈4 α≥1,n≥1,β≥1,γ≥1 Wherein, r represents the resolution of the initial model, α represents the size scaling factor of the grayscale image, N represents the channel expansion value of the initial model, n represents the channel scaling factor of the initial model, w represents the width of the first type module and the second type module, d represents the depth of the first type module and the second type module, and Φ represents the composite coefficient; According to the above constraints, a set of possible values of the width scaling factor β and the repetition scaling factor γ is determined, and a target value corresponding to the maximum diagnostic accuracy of the initial model when other parameters remain unchanged is selected from the value set as the scaling factor of the initial model.
2. The adaptive bearing fault diagnosis method based on lightweight convolutional neural network according to claim 1 is characterized in that: In step 1, the bearing image is extracted from the bearing data set and preprocessed to obtain a grayscale image, including: Acquire a bearing image whose similarity to a target bearing of the current mechanical equipment is greater than a preset similarity; A preset number of segments are randomly selected for sampling from the original vibration signals at the driving end, the load end, and the bearing end corresponding to the bearing image to obtain amplitude points, and the amplitude points are expanded and recombined in sequence to obtain a grayscale image corresponding to the bearing image.
3. The adaptive bearing fault diagnosis method based on lightweight convolutional neural network according to claim 2 is characterized in that: The sampling is performed by randomly selecting a preset number of segments, which is non-overlapping sampling.
4. The adaptive bearing fault diagnosis method based on lightweight convolutional neural network according to claim 1 is characterized in that: In step 2, the initial model is iteratively trained using the training set to determine the model weight of the optimal diagnostic accuracy, and a first diagnostic model is obtained based on the model weight, including: The neurons in the convolutional layer of the initial model are randomly inactivated, and the inactivation ratio of the neurons in each convolutional layer is as follows: Among them, D i Represents the inactivation ratio value of the i-th convolution layer, L total Denotes the number of convolution layers in the initial model, D target Represents the overall deactivation ratio value of the initial model; The initial model is set according to the deactivation ratio and the preset activation function, and the set initial model is iteratively trained using the training set, and the model weight is updated according to the training result of each iteration, and the model weight corresponding to the optimal diagnostic accuracy is selected after the iteration is completed; The model weights corresponding to the optimal diagnostic accuracy replace the initial weights of the initial model, and the replaced initial model is used as the first diagnostic model.
5. The adaptive bearing fault diagnosis method based on lightweight convolutional neural network according to claim 1 is characterized in that: In step 3, the first diagnostic model is tested using the test set, and the first diagnostic model is adjusted according to the test result to obtain a target diagnostic model, including: Obtain a first test set corresponding to the first data set and a second test set corresponding to the second data set; Using the first test set and the second test set to test the first diagnostic model respectively, and establishing a first confusion matrix corresponding to the first test set and a second confusion matrix corresponding to the second test set according to the test results; Determine a first fault classification accuracy based on the first confusion matrix, and determine a second fault classification accuracy based on the second confusion matrix; When both the first fault classification accuracy and the second fault classification accuracy meet preset accuracy requirements, determining the first diagnostic model as a target diagnostic model; Otherwise, repeat step 2 to iteratively train the first diagnostic model again until the test result meets the preset accuracy requirement.
6. The adaptive bearing fault diagnosis method based on lightweight convolutional neural network according to claim 1 is characterized in that: In step 4, the target diagnosis model is used to perform fault diagnosis on the target bearing image of the current mechanical equipment to obtain the fault type, including: Acquire multiple target bearing images from different angles and at different times of the current mechanical equipment; Process the target bearing image in the same way as the image preprocessing of the bearing data set to obtain a target grayscale image; Inputting each target grayscale image into the target diagnosis model to perform fault diagnosis and obtain the corresponding fault type; The fault types corresponding to all target grayscale images are analyzed, and the fault type with the largest number of fault types is determined as the fault type of the current mechanical equipment.
Citation Information
Patent Citations
Bearing fault diagnosis method based on complex Morlet wavelet and lightweight convolutional network
CN113158984A
Bearing fault diagnosis method based on improved lightweight deep convolutional neural network
CN115452376A